@nuxt/devtools 1.0.0-beta.2 → 1.0.0-beta.3

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 (115) hide show
  1. package/README.md +19 -3
  2. package/dist/chunks/module-main.mjs +20 -14
  3. package/dist/chunks/vscode.mjs +1 -1
  4. package/dist/client/200.html +17 -17
  5. package/dist/client/404.html +17 -17
  6. package/dist/client/__blank/index.html +17 -17
  7. package/dist/client/_nuxt/{CodeDiff.vue.b74b0167.js → CodeDiff.vue.4fcef1e4.js} +1 -1
  8. package/dist/client/_nuxt/{ComposableItem.vue.66a98e20.js → ComposableItem.vue.b4d03c6d.js} +1 -1
  9. package/dist/client/_nuxt/{DataSchemaButton.vue.b30dcd6f.js → DataSchemaButton.vue.18fef0d4.js} +1 -1
  10. package/dist/client/_nuxt/{DataSchemaDrawer.d00941d6.js → DataSchemaDrawer.714650a4.js} +1 -1
  11. package/dist/client/_nuxt/{DurationDisplay.vue.5b7cc04d.js → DurationDisplay.vue.dd0f91f1.js} +1 -1
  12. package/dist/client/_nuxt/{FilepathItem.vue.6dd69314.js → FilepathItem.vue.a1b71b8d.js} +1 -1
  13. package/dist/client/_nuxt/{HelpFab.vue.314bc83b.js → HelpFab.vue.f0924b60.js} +1 -1
  14. package/dist/client/_nuxt/LaunchPage.vue.c617b6d5.js +1 -0
  15. package/dist/client/_nuxt/{NBadge.e849763e.js → NBadge.ff27dca2.js} +1 -1
  16. package/dist/client/_nuxt/NCheckbox.vue.b56304c9.js +1 -0
  17. package/dist/client/_nuxt/{NCodeBlock.vue.882d562f.js → NCodeBlock.vue.9ce69690.js} +2 -2
  18. package/dist/client/_nuxt/{NDrawer.vue.a4010d93.js → NDrawer.vue.2b176b54.js} +1 -1
  19. package/dist/client/_nuxt/NDropdown.vue.e90fcd0b.js +1 -0
  20. package/dist/client/_nuxt/{NIconTitle.vue.71113a3f.js → NIconTitle.vue.7b846ffe.js} +1 -1
  21. package/dist/client/_nuxt/{NLink.vue.a09685db.js → NLink.vue.9859bf11.js} +1 -1
  22. package/dist/client/_nuxt/{NMarkdown.vue.13c5f0c3.js → NMarkdown.vue.79860402.js} +1 -1
  23. package/dist/client/_nuxt/{NNavbar.vue.d9a029e0.js → NNavbar.vue.737ef1b1.js} +1 -1
  24. package/dist/client/_nuxt/NSectionBlock.acf7c6ed.js +1 -0
  25. package/dist/client/_nuxt/NSelect.vue.04805728.js +1 -0
  26. package/dist/client/_nuxt/NSelectTabs.vue.626ecbdd.js +1 -0
  27. package/dist/client/_nuxt/NSwitch.vue.ff927669.js +1 -0
  28. package/dist/client/_nuxt/{NTip.vue.3f5fb5a1.js → NTip.vue.c98a31a2.js} +1 -1
  29. package/dist/client/_nuxt/StateEditor.vue.1c34496c.js +1 -0
  30. package/dist/client/_nuxt/{__blank.f49c5a73.js → __blank.eaeade3a.js} +1 -1
  31. package/dist/client/_nuxt/{analyze-build.988e7c9e.js → analyze-build.92ac65df.js} +1 -1
  32. package/dist/client/_nuxt/assets.c6f47fab.js +16 -0
  33. package/dist/client/_nuxt/client.17f79a3c.js +1 -0
  34. package/dist/client/_nuxt/components.80a04311.js +98 -0
  35. package/dist/client/_nuxt/{custom-_name_.0e141ac3.js → custom-_name_.b17c1362.js} +1 -1
  36. package/dist/client/_nuxt/{default.a50dad07.js → default.201686e7.js} +1 -1
  37. package/dist/client/_nuxt/entry.909ad6c7.js +27 -0
  38. package/dist/client/_nuxt/entry.aac067b6.css +1 -0
  39. package/dist/client/_nuxt/{error-404.429edf81.js → error-404.18967c67.js} +1 -1
  40. package/dist/client/_nuxt/{error-500.9e83b20b.js → error-500.dcd91098.js} +1 -1
  41. package/dist/client/_nuxt/{full.c90b8ab9.js → full.a9db422e.js} +1 -1
  42. package/dist/client/_nuxt/{hooks.40588927.js → hooks.ad5f725f.js} +1 -1
  43. package/dist/client/_nuxt/{imports.7b590e48.js → imports.468b0281.js} +1 -1
  44. package/dist/client/_nuxt/index.86b321d0.js +1 -0
  45. package/dist/client/_nuxt/{index.8013a14e.js → index.dacd63c3.js} +1 -1
  46. package/dist/client/_nuxt/{json-editor-vue.465dc720.js → json-editor-vue.8a771ed0.js} +1 -1
  47. package/dist/client/_nuxt/modules.dc1dbdef.js +2 -0
  48. package/dist/client/_nuxt/{none.ab2b300f.js → none.37b64ac4.js} +1 -1
  49. package/dist/client/_nuxt/open-graph.03011848.js +3 -0
  50. package/dist/client/_nuxt/open-graph.484b1a77.css +1 -0
  51. package/dist/client/_nuxt/overview.acf4105d.js +1 -0
  52. package/dist/client/_nuxt/{pages.7f7e1a57.js → pages.061895e9.js} +1 -1
  53. package/dist/client/_nuxt/payload.b7f38f74.js +1 -0
  54. package/dist/client/_nuxt/{plugins.1f073986.js → plugins.59bd86e7.js} +1 -1
  55. package/dist/client/_nuxt/{runtime-configs.6d4dd513.js → runtime-configs.aaa20729.js} +1 -1
  56. package/dist/client/_nuxt/server-routes.c8d34f99.js +9 -0
  57. package/dist/client/_nuxt/settings.12ae4ad7.js +1 -0
  58. package/dist/client/_nuxt/{state-components.c2be3414.js → state-components.a78445e5.js} +1 -1
  59. package/dist/client/_nuxt/state-modules.199ca5da.js +1 -0
  60. package/dist/client/_nuxt/storage-options.aeaf572e.js +1 -0
  61. package/dist/client/_nuxt/{storage.8cd70b69.js → storage.f2e2d671.js} +1 -1
  62. package/dist/client/_nuxt/{terminals.ce3bbf0e.js → terminals.091a556d.js} +1 -1
  63. package/dist/client/_nuxt/timeline.1210bb98.js +29 -0
  64. package/dist/client/_nuxt/{unocss-runtime.41db0d67.js → unocss-runtime.c55f86fd.js} +1 -1
  65. package/dist/client/_nuxt/virtual-files.7767a81f.js +1 -0
  66. package/dist/client/index.html +17 -17
  67. package/dist/client/modules/analyze-build/index.html +17 -17
  68. package/dist/client/modules/assets/index.html +17 -17
  69. package/dist/client/modules/components/index.html +17 -17
  70. package/dist/client/modules/hooks/index.html +17 -17
  71. package/dist/client/modules/imports/index.html +17 -17
  72. package/dist/client/modules/modules/index.html +17 -17
  73. package/dist/client/modules/open-graph/index.html +17 -17
  74. package/dist/client/modules/overview/index.html +17 -17
  75. package/dist/client/modules/pages/index.html +17 -17
  76. package/dist/client/modules/payload/index.html +17 -17
  77. package/dist/client/modules/plugins/index.html +17 -17
  78. package/dist/client/modules/runtime-configs/index.html +17 -17
  79. package/dist/client/modules/server-routes/index.html +17 -17
  80. package/dist/client/modules/storage/index.html +17 -17
  81. package/dist/client/modules/terminals/index.html +17 -17
  82. package/dist/client/modules/timeline/index.html +17 -17
  83. package/dist/client/modules/virtual-files/index.html +17 -17
  84. package/dist/client/settings/index.html +17 -17
  85. package/dist/module.json +1 -1
  86. package/dist/module.mjs +1 -1
  87. package/dist/runtime/plugins/view/client.mjs +1 -1
  88. package/dist/shared/{devtools.d18bab28.mjs → devtools.ca660ec5.mjs} +31 -1
  89. package/package.json +7 -7
  90. package/dist/client/_nuxt/LaunchPage.vue.017c62ce.js +0 -1
  91. package/dist/client/_nuxt/NCheckbox.vue.cf7e1e9d.js +0 -1
  92. package/dist/client/_nuxt/NDropdown.vue.3b1768f5.js +0 -1
  93. package/dist/client/_nuxt/NSectionBlock.7f41e147.js +0 -1
  94. package/dist/client/_nuxt/NSelect.vue.e7f8c81a.js +0 -1
  95. package/dist/client/_nuxt/NSelectTabs.vue.ddc009ff.js +0 -1
  96. package/dist/client/_nuxt/NSwitch.vue.8d3010b0.js +0 -1
  97. package/dist/client/_nuxt/StateEditor.vue.162475d5.js +0 -1
  98. package/dist/client/_nuxt/assets.2b649247.js +0 -16
  99. package/dist/client/_nuxt/client.253674ec.js +0 -1
  100. package/dist/client/_nuxt/components.7583b49c.js +0 -98
  101. package/dist/client/_nuxt/entry.3dd66f35.js +0 -27
  102. package/dist/client/_nuxt/entry.960c025a.css +0 -1
  103. package/dist/client/_nuxt/index.90ae56cb.js +0 -1
  104. package/dist/client/_nuxt/middleware.72aa446e.js +0 -1
  105. package/dist/client/_nuxt/modules.d997669f.js +0 -2
  106. package/dist/client/_nuxt/open-graph.1cc10683.js +0 -3
  107. package/dist/client/_nuxt/overview.014aea35.js +0 -1
  108. package/dist/client/_nuxt/payload.58a8bb6b.js +0 -1
  109. package/dist/client/_nuxt/server-routes.b5fc14db.js +0 -9
  110. package/dist/client/_nuxt/settings.04d1166d.js +0 -1
  111. package/dist/client/_nuxt/state-modules.5bf4563c.js +0 -1
  112. package/dist/client/_nuxt/storage-options.2224e06b.js +0 -1
  113. package/dist/client/_nuxt/timeline.23647b38.js +0 -29
  114. package/dist/client/_nuxt/virtual-files.bc5e9072.js +0 -1
  115. package/dist/client/modules/middleware/index.html +0 -42
@@ -0,0 +1,98 @@
1
+ import{o as ee,m as we,k as Q,d as Un,a as Zt,v as Vh,t as tu,f as q,e as nT,i as be,h as nt,p as at,F as ur,n as yi,a8 as Pu,_ as of,r as gn,ai as aT,aj as oT,aa as sT,ak as uT,al as lT,w as dT,j as Le,B as e1,am as hT,l as mi,an as cT,G as fT,ao as vT,af as pT,ap as gT,aq as yT,ar as Qo,a4 as mT,as as bT,a0 as $T,at as wT,I as Lv}from"./entry.909ad6c7.js";import{_ as _T}from"./HelpFab.vue.f0924b60.js";import{u as ET,a as ST}from"./state-components.a78445e5.js";import{_ as OT}from"./NCheckbox.vue.b56304c9.js";import{_ as t1}from"./NNavbar.vue.737ef1b1.js";import{_ as r1}from"./NBadge.ff27dca2.js";import{_ as i1}from"./FilepathItem.vue.a1b71b8d.js";import{_ as TT}from"./NDrawer.vue.2b176b54.js";import{_ as kT}from"./NSelectTabs.vue.626ecbdd.js";import{_ as PT}from"./NSectionBlock.acf7c6ed.js";import{_ as IT}from"./NIconTitle.vue.7b846ffe.js";import{D as Al}from"./constants.2cc6e981.js";const CT={class:"markdown-body"},AT=Q("h1",null,"Components",-1),xT=Q("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),DT=Q("p",null,"Components placed in the components/ directory are automatically registered by Nuxt. They can be used in your templates without importing them.",-1),RT=Q("p",null,[Q("a",{href:"https://nuxt.com/docs/guide/directory-structure/components",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),MT=[AT,xT,DT,RT],NT={__name:"components",setup(r,{expose:n}){return n({frontmatter:{}}),(t,i)=>(ee(),we("div",CT,MT))}},FT=/\d/,BT=["-","_","/","."];function LT(r=""){if(!FT.test(r))return r.toUpperCase()===r}function jT(r,n){const e=n??BT,t=[];if(!r||typeof r!="string")return t;let i="",a,o;for(const s of r){const u=e.includes(s);if(u===!0){t.push(i),i="",a=void 0;continue}const l=LT(s);if(o===!1){if(a===!1&&l===!0){t.push(i),i=s,a=l;continue}if(a===!0&&l===!1&&i.length>1){const d=i[i.length-1];t.push(i.slice(0,Math.max(0,i.length-1))),i=d+s,a=l;continue}}i+=s,a=l,o=u}return t.push(i),t}function zT(r){return r?r[0].toUpperCase()+r.slice(1):""}function n1(r){return r?(Array.isArray(r)?r:jT(r)).map(n=>zT(n)).join(""):""}const HT={"text-sm":"","font-mono":""},WT=Q("span",{mr1:"",op20:""},"<",-1),VT=Q("span",{ml1:"",op20:""},"/>",-1),a1=Un({__name:"ComponentName",props:{component:{}},setup(r){const n=r,e=Zt(()=>n.component.pascalName||n1(n.component.name||n.component.__name||n.component.kebabName||""));return(t,i)=>(ee(),we("code",HT,[WT,Vh(tu(q(e)),1),VT]))}}),UT={flex:"~ col gap1","items-start":"","of-hidden":""},GT={flex:"~ gap2",px3:""},KT={px3:"",pb2:""},qT={key:0,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},YT={"text-sm":""},XT={"text-primary":""},QT=Q("span",{op50:""}," references",-1),JT={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},ZT={key:1,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},ek={"text-sm":""},tk={"text-primary":""},rk=Q("span",{op50:""}," dependencies",-1),ik={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},o1=Un({__name:"ComponentDetails",props:{component:{},dependencies:{},dependents:{}},setup(r){const n=r,e=Zt(()=>n.component.pascalName||n1(n.component.name||n.component.__name||n.component.kebabName||"")),t=Zt(()=>n.component.filePath||n.component.file||n.component.__file||""),i=nT();return(a,o)=>{const s=a1,u=of,l=r1,d=i1;return ee(),we("div",UT,[Q("div",GT,[be(s,{component:a.component},null,8,["component"]),be(u,{title:"Copy name","flex-none":"",icon:"carbon-copy",border:!1,onClick:o[0]||(o[0]=h=>q(i)(`<${q(e)}></${q(e)}>`,"component-name"))}),a.component.global?(ee(),nt(l,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"runtime"})):at("",!0)]),Q("div",KT,[q(t)?(ee(),nt(d,{key:0,filepath:q(t),"w-full":"","text-sm":"",op40:"","group-hover:op75":""},null,8,["filepath"])):at("",!0)]),a.dependents?(ee(),we("div",qT,[Q("div",YT,[Q("strong",XT,tu(a.dependents.length),1),QT]),a.dependents.length?(ee(),we("div",JT,[(ee(!0),we(ur,null,yi(a.dependents,h=>(ee(),nt(d,{key:h,filepath:h},null,8,["filepath"]))),128))])):at("",!0)])):at("",!0),a.dependencies?(ee(),we("div",ZT,[Q("div",ek,[Q("strong",tk,tu(a.dependencies.length),1),rk]),a.dependencies.length?(ee(),we("div",ik,[(ee(!0),we(ur,null,yi(a.dependencies,h=>(ee(),nt(d,{key:h,filepath:h},null,8,["filepath"]))),128))])):at("",!0)])):at("",!0),Pu(a.$slots,"default")])}}});/**
2
+ * vis-data
3
+ * http://visjs.org/
4
+ *
5
+ * Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data.
6
+ *
7
+ * @version 7.1.7
8
+ * @date 2023-09-13T18:13:28.258Z
9
+ *
10
+ * @copyright (c) 2011-2017 Almende B.V, http://almende.com
11
+ * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
12
+ *
13
+ * @license
14
+ * vis.js is dual licensed under both
15
+ *
16
+ * 1. The Apache 2.0 License
17
+ * http://www.apache.org/licenses/LICENSE-2.0
18
+ *
19
+ * and
20
+ *
21
+ * 2. The MIT License
22
+ * http://opensource.org/licenses/MIT
23
+ *
24
+ * vis.js may be distributed under either license.
25
+ */function Iu(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}var jv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function X(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var s1={exports:{}},Jo=function(r){return r&&r.Math==Math&&r},De=Jo(typeof globalThis=="object"&&globalThis)||Jo(typeof window=="object"&&window)||Jo(typeof self=="object"&&self)||Jo(typeof jv=="object"&&jv)||function(){return this}()||Function("return this")(),ue=function(r){try{return!!r()}catch{return!0}},nk=ue,io=!nk(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),ak=io,u1=Function.prototype,zv=u1.apply,Hv=u1.call,Gn=typeof Reflect=="object"&&Reflect.apply||(ak?Hv.bind(zv):function(){return Hv.apply(zv,arguments)}),l1=io,d1=Function.prototype,Uh=d1.call,ok=l1&&d1.bind.bind(Uh,Uh),ge=l1?ok:function(r){return function(){return Uh.apply(r,arguments)}},h1=ge,sk=h1({}.toString),uk=h1("".slice),ni=function(r){return uk(sk(r),8,-1)},lk=ni,dk=ge,c1=function(r){if(lk(r)==="Function")return dk(r)},Gh=typeof document=="object"&&document.all,hk=typeof Gh>"u"&&Gh!==void 0,f1={all:Gh,IS_HTMLDDA:hk},v1=f1,ck=v1.all,Ee=v1.IS_HTMLDDA?function(r){return typeof r=="function"||r===ck}:function(r){return typeof r=="function"},Hi={},fk=ue,Ve=!fk(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),vk=io,Zo=Function.prototype.call,Ue=vk?Zo.bind(Zo):function(){return Zo.apply(Zo,arguments)},Cu={},p1={}.propertyIsEnumerable,g1=Object.getOwnPropertyDescriptor,pk=g1&&!p1.call({1:2},1);Cu.f=pk?function(n){var e=g1(this,n);return!!e&&e.enumerable}:p1;var Wi=function(r,n){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:n}},gk=ge,yk=ue,mk=ni,xl=Object,bk=gk("".split),Au=yk(function(){return!xl("z").propertyIsEnumerable(0)})?function(r){return mk(r)=="String"?bk(r,""):xl(r)}:xl,no=function(r){return r==null},$k=no,wk=TypeError,sf=function(r){if($k(r))throw wk("Can't call method on "+r);return r},_k=Au,Ek=sf,yr=function(r){return _k(Ek(r))},Wv=Ee,y1=f1,Sk=y1.all,it=y1.IS_HTMLDDA?function(r){return typeof r=="object"?r!==null:Wv(r)||r===Sk}:function(r){return typeof r=="object"?r!==null:Wv(r)},me={},Dl=me,Rl=De,Ok=Ee,Vv=function(r){return Ok(r)?r:void 0},ft=function(r,n){return arguments.length<2?Vv(Dl[r])||Vv(Rl[r]):Dl[r]&&Dl[r][n]||Rl[r]&&Rl[r][n]},Tk=ge,je=Tk({}.isPrototypeOf),ai=typeof navigator<"u"&&String(navigator.userAgent)||"",m1=De,Ml=ai,Uv=m1.process,Gv=m1.Deno,Kv=Uv&&Uv.versions||Gv&&Gv.version,qv=Kv&&Kv.v8,Yt,ru;qv&&(Yt=qv.split("."),ru=Yt[0]>0&&Yt[0]<4?1:+(Yt[0]+Yt[1]));!ru&&Ml&&(Yt=Ml.match(/Edge\/(\d+)/),(!Yt||Yt[1]>=74)&&(Yt=Ml.match(/Chrome\/(\d+)/),Yt&&(ru=+Yt[1])));var Kn=ru,Yv=Kn,kk=ue,qn=!!Object.getOwnPropertySymbols&&!kk(function(){var r=Symbol();return!String(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&Yv&&Yv<41}),Pk=qn,b1=Pk&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Ik=ft,Ck=Ee,Ak=je,xk=b1,Dk=Object,ao=xk?function(r){return typeof r=="symbol"}:function(r){var n=Ik("Symbol");return Ck(n)&&Ak(n.prototype,Dk(r))},Rk=String,Yn=function(r){try{return Rk(r)}catch{return"Object"}},Mk=Ee,Nk=Yn,Fk=TypeError,Tt=function(r){if(Mk(r))return r;throw Fk(Nk(r)+" is not a function")},Bk=Tt,Lk=no,uf=function(r,n){var e=r[n];return Lk(e)?void 0:Bk(e)},Nl=Ue,Fl=Ee,Bl=it,jk=TypeError,zk=function(r,n){var e,t;if(n==="string"&&Fl(e=r.toString)&&!Bl(t=Nl(e,r))||Fl(e=r.valueOf)&&!Bl(t=Nl(e,r))||n!=="string"&&Fl(e=r.toString)&&!Bl(t=Nl(e,r)))return t;throw jk("Can't convert object to primitive value")},$1={exports:{}},Hk=!0,Xv=De,Wk=Object.defineProperty,Vk=function(r,n){try{Wk(Xv,r,{value:n,configurable:!0,writable:!0})}catch{Xv[r]=n}return n},Uk=De,Gk=Vk,Qv="__core-js_shared__",Kk=Uk[Qv]||Gk(Qv,{}),lf=Kk,Jv=lf;($1.exports=function(r,n){return Jv[r]||(Jv[r]=n!==void 0?n:{})})("versions",[]).push({version:"3.29.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Xn=$1.exports,qk=sf,Yk=Object,xt=function(r){return Yk(qk(r))},Xk=ge,Qk=xt,Jk=Xk({}.hasOwnProperty),Be=Object.hasOwn||function(n,e){return Jk(Qk(n),e)},Zk=ge,eP=0,tP=Math.random(),rP=Zk(1 .toString),xu=function(r){return"Symbol("+(r===void 0?"":r)+")_"+rP(++eP+tP,36)},iP=De,nP=Xn,Zv=Be,aP=xu,oP=qn,sP=b1,yn=iP.Symbol,Ll=nP("wks"),uP=sP?yn.for||yn:yn&&yn.withoutSetter||aP,Se=function(r){return Zv(Ll,r)||(Ll[r]=oP&&Zv(yn,r)?yn[r]:uP("Symbol."+r)),Ll[r]},lP=Ue,ep=it,tp=ao,dP=uf,hP=zk,cP=Se,fP=TypeError,vP=cP("toPrimitive"),pP=function(r,n){if(!ep(r)||tp(r))return r;var e=dP(r,vP),t;if(e){if(n===void 0&&(n="default"),t=lP(e,r,n),!ep(t)||tp(t))return t;throw fP("Can't convert object to primitive value")}return n===void 0&&(n="number"),hP(r,n)},gP=pP,yP=ao,Du=function(r){var n=gP(r,"string");return yP(n)?n:n+""},mP=De,rp=it,Kh=mP.document,bP=rp(Kh)&&rp(Kh.createElement),df=function(r){return bP?Kh.createElement(r):{}},$P=Ve,wP=ue,_P=df,w1=!$P&&!wP(function(){return Object.defineProperty(_P("div"),"a",{get:function(){return 7}}).a!=7}),EP=Ve,SP=Ue,OP=Cu,TP=Wi,kP=yr,PP=Du,IP=Be,CP=w1,ip=Object.getOwnPropertyDescriptor;Hi.f=EP?ip:function(n,e){if(n=kP(n),e=PP(e),CP)try{return ip(n,e)}catch{}if(IP(n,e))return TP(!SP(OP.f,n,e),n[e])};var AP=ue,xP=Ee,DP=/#|\.prototype\./,oo=function(r,n){var e=MP[RP(r)];return e==FP?!0:e==NP?!1:xP(n)?AP(n):!!n},RP=oo.normalize=function(r){return String(r).replace(DP,".").toLowerCase()},MP=oo.data={},NP=oo.NATIVE="N",FP=oo.POLYFILL="P",_1=oo,np=c1,BP=Tt,LP=io,jP=np(np.bind),oi=function(r,n){return BP(r),n===void 0?r:LP?jP(r,n):function(){return r.apply(n,arguments)}},Dt={},zP=Ve,HP=ue,E1=zP&&HP(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),WP=it,VP=String,UP=TypeError,Rt=function(r){if(WP(r))return r;throw UP(VP(r)+" is not an object")},GP=Ve,KP=w1,qP=E1,es=Rt,ap=Du,YP=TypeError,jl=Object.defineProperty,XP=Object.getOwnPropertyDescriptor,zl="enumerable",Hl="configurable",Wl="writable";Dt.f=GP?qP?function(n,e,t){if(es(n),e=ap(e),es(t),typeof n=="function"&&e==="prototype"&&"value"in t&&Wl in t&&!t[Wl]){var i=XP(n,e);i&&i[Wl]&&(n[e]=t.value,t={configurable:Hl in t?t[Hl]:i[Hl],enumerable:zl in t?t[zl]:i[zl],writable:!1})}return jl(n,e,t)}:jl:function(n,e,t){if(es(n),e=ap(e),es(t),KP)try{return jl(n,e,t)}catch{}if("get"in t||"set"in t)throw YP("Accessors not supported");return"value"in t&&(n[e]=t.value),n};var QP=Ve,JP=Dt,ZP=Wi,Rr=QP?function(r,n,e){return JP.f(r,n,ZP(1,e))}:function(r,n,e){return r[n]=e,r},ts=De,eI=Gn,tI=c1,rI=Ee,iI=Hi.f,nI=_1,nn=me,aI=oi,an=Rr,op=Be,oI=function(r){var n=function(e,t,i){if(this instanceof n){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,i)}return eI(r,this,arguments)};return n.prototype=r.prototype,n},Y=function(r,n){var e=r.target,t=r.global,i=r.stat,a=r.proto,o=t?ts:i?ts[e]:(ts[e]||{}).prototype,s=t?nn:nn[e]||an(nn,e,{})[e],u=s.prototype,l,d,h,c,f,v,p,g,y;for(c in n)l=nI(t?c:e+(i?".":"#")+c,r.forced),d=!l&&o&&op(o,c),v=s[c],d&&(r.dontCallGetSet?(y=iI(o,c),p=y&&y.value):p=o[c]),f=d&&p?p:n[c],!(d&&typeof v==typeof f)&&(r.bind&&d?g=aI(f,ts):r.wrap&&d?g=oI(f):a&&rI(f)?g=tI(f):g=f,(r.sham||f&&f.sham||v&&v.sham)&&an(g,"sham",!0),an(s,c,g),a&&(h=e+"Prototype",op(nn,h)||an(nn,h,{}),an(nn[h],c,f),r.real&&u&&(l||!u[c])&&an(u,c,f)))},sI=Y,uI=Ve,sp=Dt.f;sI({target:"Object",stat:!0,forced:Object.defineProperty!==sp,sham:!uI},{defineProperty:sp});var lI=me,S1=lI.Object,dI=s1.exports=function(n,e,t){return S1.defineProperty(n,e,t)};S1.defineProperty.sham&&(dI.sham=!0);var hI=s1.exports,cI=hI,O1=cI,fI=O1,vI=fI,pI=vI,gI=pI,yI=gI,T1=yI,Ru=X(T1),mI=ni,si=Array.isArray||function(n){return mI(n)=="Array"},bI=Math.ceil,$I=Math.floor,wI=Math.trunc||function(n){var e=+n;return(e>0?$I:bI)(e)},_I=wI,Mu=function(r){var n=+r;return n!==n||n===0?0:_I(n)},EI=Mu,SI=Math.min,OI=function(r){return r>0?SI(EI(r),9007199254740991):0},TI=OI,Wt=function(r){return TI(r.length)},kI=TypeError,PI=9007199254740991,hf=function(r){if(r>PI)throw kI("Maximum allowed index exceeded");return r},II=Du,CI=Dt,AI=Wi,Qn=function(r,n,e){var t=II(n);t in r?CI.f(r,t,AI(0,e)):r[t]=e},xI=Se,DI=xI("toStringTag"),k1={};k1[DI]="z";var cf=String(k1)==="[object z]",RI=cf,MI=Ee,Fs=ni,NI=Se,FI=NI("toStringTag"),BI=Object,LI=Fs(function(){return arguments}())=="Arguments",jI=function(r,n){try{return r[n]}catch{}},Mr=RI?Fs:function(r){var n,e,t;return r===void 0?"Undefined":r===null?"Null":typeof(e=jI(n=BI(r),FI))=="string"?e:LI?Fs(n):(t=Fs(n))=="Object"&&MI(n.callee)?"Arguments":t},zI=ge,HI=Ee,qh=lf,WI=zI(Function.toString);HI(qh.inspectSource)||(qh.inspectSource=function(r){return WI(r)});var P1=qh.inspectSource,VI=ge,UI=ue,I1=Ee,GI=Mr,KI=ft,qI=P1,C1=function(){},YI=[],A1=KI("Reflect","construct"),ff=/^\s*(?:class|function)\b/,XI=VI(ff.exec),QI=!ff.exec(C1),ma=function(n){if(!I1(n))return!1;try{return A1(C1,YI,n),!0}catch{return!1}},x1=function(n){if(!I1(n))return!1;switch(GI(n)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return QI||!!XI(ff,qI(n))}catch{return!0}};x1.sham=!0;var Nu=!A1||UI(function(){var r;return ma(ma.call)||!ma(Object)||!ma(function(){r=!0})||r})?x1:ma,up=si,JI=Nu,ZI=it,eC=Se,tC=eC("species"),lp=Array,rC=function(r){var n;return up(r)&&(n=r.constructor,JI(n)&&(n===lp||up(n.prototype))?n=void 0:ZI(n)&&(n=n[tC],n===null&&(n=void 0))),n===void 0?lp:n},iC=rC,Fu=function(r,n){return new(iC(r))(n===0?0:n)},nC=ue,aC=Se,oC=Kn,sC=aC("species"),so=function(r){return oC>=51||!nC(function(){var n=[],e=n.constructor={};return e[sC]=function(){return{foo:1}},n[r](Boolean).foo!==1})},uC=Y,lC=ue,dC=si,hC=it,cC=xt,fC=Wt,dp=hf,hp=Qn,vC=Fu,pC=so,gC=Se,yC=Kn,D1=gC("isConcatSpreadable"),mC=yC>=51||!lC(function(){var r=[];return r[D1]=!1,r.concat()[0]!==r}),bC=function(r){if(!hC(r))return!1;var n=r[D1];return n!==void 0?!!n:dC(r)},$C=!mC||!pC("concat");uC({target:"Array",proto:!0,arity:1,forced:$C},{concat:function(n){var e=cC(this),t=vC(e,0),i=0,a,o,s,u,l;for(a=-1,s=arguments.length;a<s;a++)if(l=a===-1?e:arguments[a],bC(l))for(u=fC(l),dp(i+u),o=0;o<u;o++,i++)o in l&&hp(t,i,l[o]);else dp(i+1),hp(t,i++,l);return t.length=i,t}});var wC=Mr,_C=String,Vi=function(r){if(wC(r)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return _C(r)},Bu={},EC=Mu,SC=Math.max,OC=Math.min,Lu=function(r,n){var e=EC(r);return e<0?SC(e+n,0):OC(e,n)},TC=yr,kC=Lu,PC=Wt,cp=function(r){return function(n,e,t){var i=TC(n),a=PC(i),o=kC(t,a),s;if(r&&e!=e){for(;a>o;)if(s=i[o++],s!=s)return!0}else for(;a>o;o++)if((r||o in i)&&i[o]===e)return r||o||0;return!r&&-1}},IC={includes:cp(!0),indexOf:cp(!1)},uo={},CC=ge,Vl=Be,AC=yr,xC=IC.indexOf,DC=uo,fp=CC([].push),R1=function(r,n){var e=AC(r),t=0,i=[],a;for(a in e)!Vl(DC,a)&&Vl(e,a)&&fp(i,a);for(;n.length>t;)Vl(e,a=n[t++])&&(~xC(i,a)||fp(i,a));return i},vf=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],RC=R1,MC=vf,ju=Object.keys||function(n){return RC(n,MC)},NC=Ve,FC=E1,BC=Dt,LC=Rt,jC=yr,zC=ju;Bu.f=NC&&!FC?Object.defineProperties:function(n,e){LC(n);for(var t=jC(e),i=zC(e),a=i.length,o=0,s;a>o;)BC.f(n,s=i[o++],t[s]);return n};var HC=ft,M1=HC("document","documentElement"),WC=Xn,VC=xu,vp=WC("keys"),zu=function(r){return vp[r]||(vp[r]=VC(r))},UC=Rt,GC=Bu,pp=vf,KC=uo,qC=M1,YC=df,XC=zu,gp=">",yp="<",Yh="prototype",Xh="script",N1=XC("IE_PROTO"),Ul=function(){},F1=function(r){return yp+Xh+gp+r+yp+"/"+Xh+gp},mp=function(r){r.write(F1("")),r.close();var n=r.parentWindow.Object;return r=null,n},QC=function(){var r=YC("iframe"),n="java"+Xh+":",e;return r.style.display="none",qC.appendChild(r),r.src=String(n),e=r.contentWindow.document,e.open(),e.write(F1("document.F=Object")),e.close(),e.F},rs,Bs=function(){try{rs=new ActiveXObject("htmlfile")}catch{}Bs=typeof document<"u"?document.domain&&rs?mp(rs):QC():mp(rs);for(var r=pp.length;r--;)delete Bs[Yh][pp[r]];return Bs()};KC[N1]=!0;var Ui=Object.create||function(n,e){var t;return n!==null?(Ul[Yh]=UC(n),t=new Ul,Ul[Yh]=null,t[N1]=n):t=Bs(),e===void 0?t:GC.f(t,e)},lo={},JC=R1,ZC=vf,eA=ZC.concat("length","prototype");lo.f=Object.getOwnPropertyNames||function(n){return JC(n,eA)};var pf={},bp=Lu,tA=Wt,rA=Qn,iA=Array,nA=Math.max,B1=function(r,n,e){for(var t=tA(r),i=bp(n,t),a=bp(e===void 0?t:e,t),o=iA(nA(a-i,0)),s=0;i<a;i++,s++)rA(o,s,r[i]);return o.length=s,o},aA=ni,oA=yr,L1=lo.f,sA=B1,j1=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],uA=function(r){try{return L1(r)}catch{return sA(j1)}};pf.f=function(n){return j1&&aA(n)=="Window"?uA(n):L1(oA(n))};var ho={};ho.f=Object.getOwnPropertySymbols;var lA=Rr,Jn=function(r,n,e,t){return t&&t.enumerable?r[n]=e:lA(r,n,e),r},dA=Dt,gf=function(r,n,e){return dA.f(r,n,e)},co={},hA=Se;co.f=hA;var $p=me,cA=Be,fA=co,vA=Dt.f,Oe=function(r){var n=$p.Symbol||($p.Symbol={});cA(n,r)||vA(n,r,{value:fA.f(r)})},pA=Ue,gA=ft,yA=Se,mA=Jn,z1=function(){var r=gA("Symbol"),n=r&&r.prototype,e=n&&n.valueOf,t=yA("toPrimitive");n&&!n[t]&&mA(n,t,function(i){return pA(e,this)},{arity:1})},bA=cf,$A=Mr,wA=bA?{}.toString:function(){return"[object "+$A(this)+"]"},_A=cf,EA=Dt.f,SA=Rr,OA=Be,TA=wA,kA=Se,wp=kA("toStringTag"),Gi=function(r,n,e,t){if(r){var i=e?r:r.prototype;OA(i,wp)||EA(i,wp,{configurable:!0,value:n}),t&&!_A&&SA(i,"toString",TA)}},PA=De,IA=Ee,_p=PA.WeakMap,CA=IA(_p)&&/native code/.test(String(_p)),AA=CA,H1=De,xA=it,DA=Rr,Gl=Be,Kl=lf,RA=zu,MA=uo,Ep="Object already initialized",Qh=H1.TypeError,NA=H1.WeakMap,iu,ja,nu,FA=function(r){return nu(r)?ja(r):iu(r,{})},BA=function(r){return function(n){var e;if(!xA(n)||(e=ja(n)).type!==r)throw Qh("Incompatible receiver, "+r+" required");return e}};if(AA||Kl.state){var ar=Kl.state||(Kl.state=new NA);ar.get=ar.get,ar.has=ar.has,ar.set=ar.set,iu=function(r,n){if(ar.has(r))throw Qh(Ep);return n.facade=r,ar.set(r,n),n},ja=function(r){return ar.get(r)||{}},nu=function(r){return ar.has(r)}}else{var on=RA("state");MA[on]=!0,iu=function(r,n){if(Gl(r,on))throw Qh(Ep);return n.facade=r,DA(r,on,n),n},ja=function(r){return Gl(r,on)?r[on]:{}},nu=function(r){return Gl(r,on)}}var Zn={set:iu,get:ja,has:nu,enforce:FA,getterFor:BA},LA=oi,jA=ge,zA=Au,HA=xt,WA=Wt,VA=Fu,Sp=jA([].push),Lr=function(r){var n=r==1,e=r==2,t=r==3,i=r==4,a=r==6,o=r==7,s=r==5||a;return function(u,l,d,h){for(var c=HA(u),f=zA(c),v=LA(l,d),p=WA(f),g=0,y=h||VA,m=n?y(u,p):e||o?y(u,0):void 0,w,b;p>g;g++)if((s||g in f)&&(w=f[g],b=v(w,g,c),r))if(n)m[g]=b;else if(b)switch(r){case 3:return!0;case 5:return w;case 6:return g;case 2:Sp(m,w)}else switch(r){case 4:return!1;case 7:Sp(m,w)}return a?-1:t||i?i:m}},ea={forEach:Lr(0),map:Lr(1),filter:Lr(2),some:Lr(3),every:Lr(4),find:Lr(5),findIndex:Lr(6),filterReject:Lr(7)},Hu=Y,yf=De,mf=Ue,UA=ge,xn=Ve,Dn=qn,GA=ue,He=Be,KA=je,Jh=Rt,Wu=yr,bf=Du,qA=Vi,Zh=Wi,za=Ui,W1=ju,YA=lo,V1=pf,XA=ho,U1=Hi,G1=Dt,QA=Bu,K1=Cu,Op=Jn,JA=gf,$f=Xn,ZA=zu,q1=uo,Tp=xu,ex=Se,tx=co,rx=Oe,ix=z1,nx=Gi,Y1=Zn,Vu=ea.forEach,$t=ZA("hidden"),Uu="Symbol",Ha="prototype",ax=Y1.set,kp=Y1.getterFor(Uu),er=Object[Ha],Si=yf.Symbol,Oa=Si&&Si[Ha],ox=yf.TypeError,ql=yf.QObject,X1=U1.f,bi=G1.f,Q1=V1.f,sx=K1.f,J1=UA([].push),Cr=$f("symbols"),fo=$f("op-symbols"),ux=$f("wks"),ec=!ql||!ql[Ha]||!ql[Ha].findChild,tc=xn&&GA(function(){return za(bi({},"a",{get:function(){return bi(this,"a",{value:7}).a}})).a!=7})?function(r,n,e){var t=X1(er,n);t&&delete er[n],bi(r,n,e),t&&r!==er&&bi(er,n,t)}:bi,Yl=function(r,n){var e=Cr[r]=za(Oa);return ax(e,{type:Uu,tag:r,description:n}),xn||(e.description=n),e},Gu=function(n,e,t){n===er&&Gu(fo,e,t),Jh(n);var i=bf(e);return Jh(t),He(Cr,i)?(t.enumerable?(He(n,$t)&&n[$t][i]&&(n[$t][i]=!1),t=za(t,{enumerable:Zh(0,!1)})):(He(n,$t)||bi(n,$t,Zh(1,{})),n[$t][i]=!0),tc(n,i,t)):bi(n,i,t)},wf=function(n,e){Jh(n);var t=Wu(e),i=W1(t).concat(rw(t));return Vu(i,function(a){(!xn||mf(Z1,t,a))&&Gu(n,a,t[a])}),n},lx=function(n,e){return e===void 0?za(n):wf(za(n),e)},Z1=function(n){var e=bf(n),t=mf(sx,this,e);return this===er&&He(Cr,e)&&!He(fo,e)?!1:t||!He(this,e)||!He(Cr,e)||He(this,$t)&&this[$t][e]?t:!0},ew=function(n,e){var t=Wu(n),i=bf(e);if(!(t===er&&He(Cr,i)&&!He(fo,i))){var a=X1(t,i);return a&&He(Cr,i)&&!(He(t,$t)&&t[$t][i])&&(a.enumerable=!0),a}},tw=function(n){var e=Q1(Wu(n)),t=[];return Vu(e,function(i){!He(Cr,i)&&!He(q1,i)&&J1(t,i)}),t},rw=function(r){var n=r===er,e=Q1(n?fo:Wu(r)),t=[];return Vu(e,function(i){He(Cr,i)&&(!n||He(er,i))&&J1(t,Cr[i])}),t};Dn||(Si=function(){if(KA(Oa,this))throw ox("Symbol is not a constructor");var n=!arguments.length||arguments[0]===void 0?void 0:qA(arguments[0]),e=Tp(n),t=function(i){this===er&&mf(t,fo,i),He(this,$t)&&He(this[$t],e)&&(this[$t][e]=!1),tc(this,e,Zh(1,i))};return xn&&ec&&tc(er,e,{configurable:!0,set:t}),Yl(e,n)},Oa=Si[Ha],Op(Oa,"toString",function(){return kp(this).tag}),Op(Si,"withoutSetter",function(r){return Yl(Tp(r),r)}),K1.f=Z1,G1.f=Gu,QA.f=wf,U1.f=ew,YA.f=V1.f=tw,XA.f=rw,tx.f=function(r){return Yl(ex(r),r)},xn&&JA(Oa,"description",{configurable:!0,get:function(){return kp(this).description}}));Hu({global:!0,constructor:!0,wrap:!0,forced:!Dn,sham:!Dn},{Symbol:Si});Vu(W1(ux),function(r){rx(r)});Hu({target:Uu,stat:!0,forced:!Dn},{useSetter:function(){ec=!0},useSimple:function(){ec=!1}});Hu({target:"Object",stat:!0,forced:!Dn,sham:!xn},{create:lx,defineProperty:Gu,defineProperties:wf,getOwnPropertyDescriptor:ew});Hu({target:"Object",stat:!0,forced:!Dn},{getOwnPropertyNames:tw});ix();nx(Si,Uu);q1[$t]=!0;var dx=qn,iw=dx&&!!Symbol.for&&!!Symbol.keyFor,hx=Y,cx=ft,fx=Be,vx=Vi,nw=Xn,px=iw,Xl=nw("string-to-symbol-registry"),gx=nw("symbol-to-string-registry");hx({target:"Symbol",stat:!0,forced:!px},{for:function(r){var n=vx(r);if(fx(Xl,n))return Xl[n];var e=cx("Symbol")(n);return Xl[n]=e,gx[e]=n,e}});var yx=Y,mx=Be,bx=ao,$x=Yn,wx=Xn,_x=iw,Pp=wx("symbol-to-string-registry");yx({target:"Symbol",stat:!0,forced:!_x},{keyFor:function(n){if(!bx(n))throw TypeError($x(n)+" is not a symbol");if(mx(Pp,n))return Pp[n]}});var Ex=ge,vo=Ex([].slice),Sx=ge,Ip=si,Ox=Ee,Cp=ni,Tx=Vi,Ap=Sx([].push),kx=function(r){if(Ox(r))return r;if(Ip(r)){for(var n=r.length,e=[],t=0;t<n;t++){var i=r[t];typeof i=="string"?Ap(e,i):(typeof i=="number"||Cp(i)=="Number"||Cp(i)=="String")&&Ap(e,Tx(i))}var a=e.length,o=!0;return function(s,u){if(o)return o=!1,u;if(Ip(this))return u;for(var l=0;l<a;l++)if(e[l]===s)return u}}},Px=Y,aw=ft,ow=Gn,Ix=Ue,po=ge,sw=ue,xp=Ee,Dp=ao,uw=vo,Cx=kx,Ax=qn,xx=String,Yr=aw("JSON","stringify"),is=po(/./.exec),Rp=po("".charAt),Dx=po("".charCodeAt),Rx=po("".replace),Mx=po(1 .toString),Nx=/[\uD800-\uDFFF]/g,Mp=/^[\uD800-\uDBFF]$/,Np=/^[\uDC00-\uDFFF]$/,Fp=!Ax||sw(function(){var r=aw("Symbol")();return Yr([r])!="[null]"||Yr({a:r})!="{}"||Yr(Object(r))!="{}"}),Bp=sw(function(){return Yr("\uDF06\uD834")!=='"\\udf06\\ud834"'||Yr("\uDEAD")!=='"\\udead"'}),Fx=function(r,n){var e=uw(arguments),t=Cx(n);if(!(!xp(t)&&(r===void 0||Dp(r))))return e[1]=function(i,a){if(xp(t)&&(a=Ix(t,this,xx(i),a)),!Dp(a))return a},ow(Yr,null,e)},Bx=function(r,n,e){var t=Rp(e,n-1),i=Rp(e,n+1);return is(Mp,r)&&!is(Np,i)||is(Np,r)&&!is(Mp,t)?"\\u"+Mx(Dx(r,0),16):r};Yr&&Px({target:"JSON",stat:!0,arity:3,forced:Fp||Bp},{stringify:function(n,e,t){var i=uw(arguments),a=ow(Fp?Fx:Yr,null,i);return Bp&&typeof a=="string"?Rx(a,Nx,Bx):a}});var Lx=Y,jx=qn,zx=ue,lw=ho,Hx=xt,Wx=!jx||zx(function(){lw.f(1)});Lx({target:"Object",stat:!0,forced:Wx},{getOwnPropertySymbols:function(n){var e=lw.f;return e?e(Hx(n)):[]}});var Vx=Oe;Vx("asyncIterator");var Ux=Oe;Ux("hasInstance");var Gx=Oe;Gx("isConcatSpreadable");var Kx=Oe;Kx("iterator");var qx=Oe;qx("match");var Yx=Oe;Yx("matchAll");var Xx=Oe;Xx("replace");var Qx=Oe;Qx("search");var Jx=Oe;Jx("species");var Zx=Oe;Zx("split");var eD=Oe,tD=z1;eD("toPrimitive");tD();var rD=ft,iD=Oe,nD=Gi;iD("toStringTag");nD(rD("Symbol"),"Symbol");var aD=Oe;aD("unscopables");var oD=De,sD=Gi;sD(oD.JSON,"JSON",!0);var uD=me,lD=uD.Symbol,ta={},rc=Ve,dD=Be,dw=Function.prototype,hD=rc&&Object.getOwnPropertyDescriptor,_f=dD(dw,"name"),cD=_f&&function(){}.name==="something",fD=_f&&(!rc||rc&&hD(dw,"name").configurable),vD={EXISTS:_f,PROPER:cD,CONFIGURABLE:fD},pD=ue,hw=!pD(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),gD=Be,yD=Ee,mD=xt,bD=zu,$D=hw,Lp=bD("IE_PROTO"),ic=Object,wD=ic.prototype,Ku=$D?ic.getPrototypeOf:function(r){var n=mD(r);if(gD(n,Lp))return n[Lp];var e=n.constructor;return yD(e)&&n instanceof e?e.prototype:n instanceof ic?wD:null},_D=ue,ED=Ee,SD=it,OD=Ui,jp=Ku,TD=Jn,kD=Se,nc=kD("iterator"),cw=!1,wr,Ql,Jl;[].keys&&(Jl=[].keys(),"next"in Jl?(Ql=jp(jp(Jl)),Ql!==Object.prototype&&(wr=Ql)):cw=!0);var PD=!SD(wr)||_D(function(){var r={};return wr[nc].call(r)!==r});PD?wr={}:wr=OD(wr);ED(wr[nc])||TD(wr,nc,function(){return this});var fw={IteratorPrototype:wr,BUGGY_SAFARI_ITERATORS:cw},ID=fw.IteratorPrototype,CD=Ui,AD=Wi,xD=Gi,DD=ta,RD=function(){return this},MD=function(r,n,e,t){var i=n+" Iterator";return r.prototype=CD(ID,{next:AD(+!t,e)}),xD(r,i,!1,!0),DD[i]=RD,r},ND=ge,FD=Tt,BD=function(r,n,e){try{return ND(FD(Object.getOwnPropertyDescriptor(r,n)[e]))}catch{}},LD=Ee,jD=String,zD=TypeError,HD=function(r){if(typeof r=="object"||LD(r))return r;throw zD("Can't set "+jD(r)+" as a prototype")},WD=BD,VD=Rt,UD=HD,vw=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,n={},e;try{e=WD(Object.prototype,"__proto__","set"),e(n,[]),r=n instanceof Array}catch{}return function(i,a){return VD(i),UD(a),r?e(i,a):i.__proto__=a,i}}():void 0),GD=Y,KD=Ue,qD=vD,YD=MD,XD=Ku,QD=Gi,zp=Jn,JD=Se,Hp=ta,ZD=fw,eR=qD.PROPER,ns=ZD.BUGGY_SAFARI_ITERATORS,Zl=JD("iterator"),Wp="keys",as="values",Vp="entries",tR=function(){return this},Ef=function(r,n,e,t,i,a,o){YD(e,n,t);var s=function(y){if(y===i&&c)return c;if(!ns&&y in d)return d[y];switch(y){case Wp:return function(){return new e(this,y)};case as:return function(){return new e(this,y)};case Vp:return function(){return new e(this,y)}}return function(){return new e(this)}},u=n+" Iterator",l=!1,d=r.prototype,h=d[Zl]||d["@@iterator"]||i&&d[i],c=!ns&&h||s(i),f=n=="Array"&&d.entries||h,v,p,g;if(f&&(v=XD(f.call(new r)),v!==Object.prototype&&v.next&&(QD(v,u,!0,!0),Hp[u]=tR)),eR&&i==as&&h&&h.name!==as&&(l=!0,c=function(){return KD(h,this)}),i)if(p={values:s(as),keys:a?c:s(Wp),entries:s(Vp)},o)for(g in p)(ns||l||!(g in d))&&zp(d,g,p[g]);else GD({target:n,proto:!0,forced:ns||l},p);return o&&d[Zl]!==c&&zp(d,Zl,c,{name:i}),Hp[n]=c,p},Sf=function(r,n){return{value:r,done:n}},rR=yr,Up=ta,pw=Zn;Dt.f;var iR=Ef,os=Sf,gw="Array Iterator",nR=pw.set,aR=pw.getterFor(gw);iR(Array,"Array",function(r,n){nR(this,{type:gw,target:rR(r),index:0,kind:n})},function(){var r=aR(this),n=r.target,e=r.kind,t=r.index++;return!n||t>=n.length?(r.target=void 0,os(void 0,!0)):e=="keys"?os(t,!1):e=="values"?os(n[t],!1):os([t,n[t]],!1)},"values");Up.Arguments=Up.Array;var oR={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},sR=oR,uR=De,lR=Mr,dR=Rr,Gp=ta,hR=Se,Kp=hR("toStringTag");for(var ed in sR){var qp=uR[ed],td=qp&&qp.prototype;td&&lR(td)!==Kp&&dR(td,Kp,ed),Gp[ed]=Gp.Array}var cR=lD,yw=cR,fR=Oe;fR("dispose");var vR=yw,pR=vR,gR=Oe;gR("asyncDispose");var yR=Y,mR=ft,bR=ge,mw=mR("Symbol"),$R=mw.keyFor,wR=bR(mw.prototype.valueOf);yR({target:"Symbol",stat:!0},{isRegistered:function(n){try{return $R(wR(n))!==void 0}catch{return!1}}});var _R=Y,ER=Xn,bw=ft,SR=ge,OR=ao,TR=Se,au=bw("Symbol"),Yp=au.isWellKnown,$w=bw("Object","getOwnPropertyNames"),kR=SR(au.prototype.valueOf),Xp=ER("wks");for(var rd=0,Qp=$w(au),PR=Qp.length;rd<PR;rd++)try{var Jp=Qp[rd];OR(au[Jp])&&TR(Jp)}catch{}_R({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(n){if(Yp&&Yp(n))return!0;try{for(var e=kR(n),t=0,i=$w(Xp),a=i.length;t<a;t++)if(Xp[i[t]]==e)return!0}catch{}return!1}});var IR=Oe;IR("matcher");var CR=Oe;CR("metadataKey");var AR=Oe;AR("observable");var xR=Oe;xR("metadata");var DR=Oe;DR("patternMatch");var RR=Oe;RR("replaceAll");var MR=pR,NR=MR,FR=NR,Of=FR,mn=X(Of),Tf=ge,BR=Mu,LR=Vi,jR=sf,zR=Tf("".charAt),Zp=Tf("".charCodeAt),HR=Tf("".slice),eg=function(r){return function(n,e){var t=LR(jR(n)),i=BR(e),a=t.length,o,s;return i<0||i>=a?r?"":void 0:(o=Zp(t,i),o<55296||o>56319||i+1===a||(s=Zp(t,i+1))<56320||s>57343?r?zR(t,i):o:r?HR(t,i,i+2):(o-55296<<10)+(s-56320)+65536)}},WR={codeAt:eg(!1),charAt:eg(!0)},VR=WR.charAt,UR=Vi,ww=Zn,GR=Ef,tg=Sf,_w="String Iterator",KR=ww.set,qR=ww.getterFor(_w);GR(String,"String",function(r){KR(this,{type:_w,string:UR(r),index:0})},function(){var n=qR(this),e=n.string,t=n.index,i;return t>=e.length?tg(void 0,!0):(i=VR(e,t),n.index+=i.length,tg(i,!1))});var YR=co,XR=YR.f("iterator"),QR=XR,Ew=QR,JR=Ew,ZR=JR,eM=ZR,tM=eM,rM=tM,Sw=rM,iM=X(Sw);function tt(r){"@babel/helpers - typeof";return tt=typeof mn=="function"&&typeof iM=="symbol"?function(n){return typeof n}:function(n){return n&&typeof mn=="function"&&n.constructor===mn&&n!==mn.prototype?"symbol":typeof n},tt(r)}var nM=co,aM=nM.f("toPrimitive"),oM=aM,sM=oM,uM=sM,lM=uM,dM=lM,hM=dM,cM=hM,fM=cM,vM=X(fM);function pM(r,n){if(tt(r)!=="object"||r===null)return r;var e=r[vM];if(e!==void 0){var t=e.call(r,n||"default");if(tt(t)!=="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}function Ow(r){var n=pM(r,"string");return tt(n)==="symbol"?n:String(n)}function rg(r,n){for(var e=0;e<n.length;e++){var t=n[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Ru(r,Ow(t.key),t)}}function qu(r,n,e){return n&&rg(r.prototype,n),e&&rg(r,e),Ru(r,"prototype",{writable:!1}),r}function Ae(r,n,e){return n=Ow(n),n in r?Ru(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r}var Tw=ge,gM=Tt,yM=it,mM=Be,ig=vo,bM=io,kw=Function,$M=Tw([].concat),wM=Tw([].join),id={},_M=function(r,n,e){if(!mM(id,n)){for(var t=[],i=0;i<n;i++)t[i]="a["+i+"]";id[n]=kw("C,a","return new C("+wM(t,",")+")")}return id[n](r,e)},Pw=bM?kw.bind:function(n){var e=gM(this),t=e.prototype,i=ig(arguments,1),a=function(){var s=$M(i,ig(arguments));return this instanceof a?_M(e,s.length,s):e.apply(n,s)};return yM(t)&&(a.prototype=t),a},EM=Y,ng=Pw;EM({target:"Function",proto:!0,forced:Function.bind!==ng},{bind:ng});var SM=me,vt=function(r){return SM[r+"Prototype"]},OM=vt,TM=OM("Function").bind,kM=je,PM=TM,nd=Function.prototype,IM=function(r){var n=r.bind;return r===nd||kM(nd,r)&&n===nd.bind?PM:n},CM=IM,Iw=CM,AM=Iw,Cw=X(AM),xM=Tt,DM=xt,RM=Au,MM=Wt,NM=TypeError,ag=function(r){return function(n,e,t,i){xM(e);var a=DM(n),o=RM(a),s=MM(a),u=r?s-1:0,l=r?-1:1;if(t<2)for(;;){if(u in o){i=o[u],u+=l;break}if(u+=l,r?u<0:s<=u)throw NM("Reduce of empty array with no initial value")}for(;r?u>=0:s>u;u+=l)u in o&&(i=e(i,o[u],u,a));return i}},FM={left:ag(!1),right:ag(!0)},BM=ue,Yu=function(r,n){var e=[][r];return!!e&&BM(function(){e.call(null,n||function(){return 1},1)})},LM=ni,go=typeof process<"u"&&LM(process)=="process",jM=Y,zM=FM.left,HM=Yu,og=Kn,WM=go,VM=!WM&&og>79&&og<83,UM=VM||!HM("reduce");jM({target:"Array",proto:!0,forced:UM},{reduce:function(n){var e=arguments.length;return zM(this,n,e,e>1?arguments[1]:void 0)}});var GM=vt,KM=GM("Array").reduce,qM=je,YM=KM,ad=Array.prototype,XM=function(r){var n=r.reduce;return r===ad||qM(ad,r)&&n===ad.reduce?YM:n},QM=XM,JM=QM,ZM=JM,e2=X(ZM),t2=Y,r2=ea.filter,i2=so,n2=i2("filter");t2({target:"Array",proto:!0,forced:!n2},{filter:function(n){return r2(this,n,arguments.length>1?arguments[1]:void 0)}});var a2=vt,o2=a2("Array").filter,s2=je,u2=o2,od=Array.prototype,l2=function(r){var n=r.filter;return r===od||s2(od,r)&&n===od.filter?u2:n},d2=l2,h2=d2,c2=h2,bn=X(c2),f2=Y,v2=ea.map,p2=so,g2=p2("map");f2({target:"Array",proto:!0,forced:!g2},{map:function(n){return v2(this,n,arguments.length>1?arguments[1]:void 0)}});var y2=vt,m2=y2("Array").map,b2=je,$2=m2,sd=Array.prototype,w2=function(r){var n=r.map;return r===sd||b2(sd,r)&&n===sd.map?$2:n},_2=w2,E2=_2,S2=E2,Xt=X(S2),O2=si,T2=Wt,k2=hf,P2=oi,Aw=function(r,n,e,t,i,a,o,s){for(var u=i,l=0,d=o?P2(o,s):!1,h,c;l<t;)l in e&&(h=d?d(e[l],l,n):e[l],a>0&&O2(h)?(c=T2(h),u=Aw(r,n,h,c,u,a-1)-1):(k2(u+1),r[u]=h),u++),l++;return u},I2=Aw,C2=Y,A2=I2,x2=Tt,D2=xt,R2=Wt,M2=Fu;C2({target:"Array",proto:!0},{flatMap:function(n){var e=D2(this),t=R2(e),i;return x2(n),i=M2(e,0),i.length=A2(i,e,e,t,0,1,n,arguments.length>1?arguments[1]:void 0),i}});var N2=vt;N2("Array").flatMap;var F2=Ue,sg=Rt,B2=uf,xw=function(r,n,e){var t,i;sg(r);try{if(t=B2(r,"return"),!t){if(n==="throw")throw e;return e}t=F2(t,r)}catch(a){i=!0,t=a}if(n==="throw")throw e;if(i)throw t;return sg(t),e},L2=Rt,j2=xw,z2=function(r,n,e,t){try{return t?n(L2(e)[0],e[1]):n(e)}catch(i){j2(r,"throw",i)}},H2=Se,W2=ta,V2=H2("iterator"),U2=Array.prototype,Dw=function(r){return r!==void 0&&(W2.Array===r||U2[V2]===r)},G2=Mr,ug=uf,K2=no,q2=ta,Y2=Se,X2=Y2("iterator"),Xu=function(r){if(!K2(r))return ug(r,X2)||ug(r,"@@iterator")||q2[G2(r)]},Q2=Ue,J2=Tt,Z2=Rt,eN=Yn,tN=Xu,rN=TypeError,kf=function(r,n){var e=arguments.length<2?tN(r):n;if(J2(e))return Z2(Q2(e,r));throw rN(eN(r)+" is not iterable")},iN=oi,nN=Ue,aN=xt,oN=z2,sN=Dw,uN=Nu,lN=Wt,lg=Qn,dN=kf,hN=Xu,dg=Array,cN=function(n){var e=aN(n),t=uN(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=iN(a,i>2?arguments[2]:void 0));var s=hN(e),u=0,l,d,h,c,f,v;if(s&&!(this===dg&&sN(s)))for(c=dN(e,s),f=c.next,d=t?new this:[];!(h=nN(f,c)).done;u++)v=o?oN(c,a,[h.value,u],!0):h.value,lg(d,u,v);else for(l=lN(e),d=t?new this(l):dg(l);l>u;u++)v=o?a(e[u],u):e[u],lg(d,u,v);return d.length=u,d},fN=Se,Rw=fN("iterator"),Mw=!1;try{var vN=0,hg={next:function(){return{done:!!vN++}},return:function(){Mw=!0}};hg[Rw]=function(){return this},Array.from(hg,function(){throw 2})}catch{}var Nw=function(r,n){if(!n&&!Mw)return!1;var e=!1;try{var t={};t[Rw]=function(){return{next:function(){return{done:e=!0}}}},r(t)}catch{}return e},pN=Y,gN=cN,yN=Nw,mN=!yN(function(r){Array.from(r)});pN({target:"Array",stat:!0,forced:mN},{from:gN});var bN=me,$N=bN.Array.from,wN=$N,Fw=wN,_N=Fw,Pf=X(_N),EN=Xu,SN=EN,ON=SN,TN=ON,kN=TN,PN=kN,IN=PN,CN=IN,AN=CN,xN=AN,yo=X(xN),DN=me,RN=DN.Object.getOwnPropertySymbols,MN=RN,NN=MN,FN=NN,cg=X(FN),Bw={exports:{}},BN=Y,LN=ue,jN=yr,Lw=Hi.f,jw=Ve,zN=!jw||LN(function(){Lw(1)});BN({target:"Object",stat:!0,forced:zN,sham:!jw},{getOwnPropertyDescriptor:function(n,e){return Lw(jN(n),e)}});var HN=me,zw=HN.Object,WN=Bw.exports=function(n,e){return zw.getOwnPropertyDescriptor(n,e)};zw.getOwnPropertyDescriptor.sham&&(WN.sham=!0);var VN=Bw.exports,UN=VN,GN=UN,KN=GN,Hw=X(KN),qN=ft,YN=ge,XN=lo,QN=ho,JN=Rt,ZN=YN([].concat),If=qN("Reflect","ownKeys")||function(n){var e=XN.f(JN(n)),t=QN.f;return t?ZN(e,t(n)):e},eF=Y,tF=Ve,rF=If,iF=yr,nF=Hi,aF=Qn;eF({target:"Object",stat:!0,sham:!tF},{getOwnPropertyDescriptors:function(n){for(var e=iF(n),t=nF.f,i=rF(e),a={},o=0,s,u;i.length>o;)u=t(e,s=i[o++]),u!==void 0&&aF(a,s,u);return a}});var oF=me,sF=oF.Object.getOwnPropertyDescriptors,uF=sF,lF=uF,dF=lF,fg=X(dF),Ww={exports:{}},hF=Y,cF=Ve,vg=Bu.f;hF({target:"Object",stat:!0,forced:Object.defineProperties!==vg,sham:!cF},{defineProperties:vg});var fF=me,Vw=fF.Object,vF=Ww.exports=function(n,e){return Vw.defineProperties(n,e)};Vw.defineProperties.sham&&(vF.sham=!0);var pF=Ww.exports,gF=pF,yF=gF,mF=yF,bF=X(mF),$F=O1,wF=X($F),_F=Y,EF=si;_F({target:"Array",stat:!0},{isArray:EF});var SF=me,OF=SF.Array.isArray,TF=OF,Uw=TF,kF=Uw,PF=kF,IF=PF,CF=IF,AF=CF,xF=AF,Gw=X(xF);function DF(r){if(Gw(r))return r}function RF(r,n){var e=r==null?null:typeof mn<"u"&&yo(r)||r["@@iterator"];if(e!=null){var t,i,a,o,s=[],u=!0,l=!1;try{if(a=(e=e.call(r)).next,n===0){if(Object(e)!==e)return;u=!1}else for(;!(u=(t=a.call(e)).done)&&(s.push(t.value),s.length!==n);u=!0);}catch(d){l=!0,i=d}finally{try{if(!u&&e.return!=null&&(o=e.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}var MF=Y,pg=si,NF=Nu,FF=it,gg=Lu,BF=Wt,LF=yr,jF=Qn,zF=Se,HF=so,WF=vo,VF=HF("slice"),UF=zF("species"),ud=Array,GF=Math.max;MF({target:"Array",proto:!0,forced:!VF},{slice:function(n,e){var t=LF(this),i=BF(t),a=gg(n,i),o=gg(e===void 0?i:e,i),s,u,l;if(pg(t)&&(s=t.constructor,NF(s)&&(s===ud||pg(s.prototype))?s=void 0:FF(s)&&(s=s[UF],s===null&&(s=void 0)),s===ud||s===void 0))return WF(t,a,o);for(u=new(s===void 0?ud:s)(GF(o-a,0)),l=0;a<o;a++,l++)a in t&&jF(u,l,t[a]);return u.length=l,u}});var KF=vt,qF=KF("Array").slice,YF=je,XF=qF,ld=Array.prototype,QF=function(r){var n=r.slice;return r===ld||YF(ld,r)&&n===ld.slice?XF:n},JF=QF,Kw=JF,ZF=Kw,eB=ZF,tB=eB,rB=tB,iB=rB,qw=iB,nB=X(qw),aB=Fw,oB=aB,sB=oB,uB=sB,lB=uB,dB=lB,Yw=X(dB);function ac(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}function Xw(r,n){var e;if(r){if(typeof r=="string")return ac(r,n);var t=nB(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Yw(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ac(r,n)}}function hB(){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 yt(r,n){return DF(r)||RF(r,n)||Xw(r,n)||hB()}function cB(r){if(Gw(r))return ac(r)}function fB(r){if(typeof mn<"u"&&yo(r)!=null||r["@@iterator"]!=null)return Yw(r)}function vB(){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 wt(r){return cB(r)||fB(r)||Xw(r)||vB()}var pB=yw,Qu=X(pB),gB=vt,yB=gB("Array").concat,mB=je,bB=yB,dd=Array.prototype,$B=function(r){var n=r.concat;return r===dd||mB(dd,r)&&n===dd.concat?bB:n},wB=$B,_B=wB,EB=_B,Ju=X(EB),SB=Kw,Zu=X(SB),OB=Y,TB=If;OB({target:"Reflect",stat:!0},{ownKeys:TB});var kB=me,PB=kB.Reflect.ownKeys,IB=PB,CB=IB,AB=CB,xB=X(AB),DB=Uw,Ct=X(DB),RB=Y,MB=xt,Qw=ju,NB=ue,FB=NB(function(){Qw(1)});RB({target:"Object",stat:!0,forced:FB},{keys:function(n){return Qw(MB(n))}});var BB=me,LB=BB.Object.keys,jB=LB,zB=jB,HB=zB,Cf=X(HB),WB=ea.forEach,VB=Yu,UB=VB("forEach"),GB=UB?[].forEach:function(n){return WB(this,n,arguments.length>1?arguments[1]:void 0)},KB=Y,yg=GB;KB({target:"Array",proto:!0,forced:[].forEach!=yg},{forEach:yg});var qB=vt,YB=qB("Array").forEach,XB=YB,QB=XB,JB=Mr,ZB=Be,eL=je,tL=QB,hd=Array.prototype,rL={DOMTokenList:!0,NodeList:!0},Jw=function(r){var n=r.forEach;return r===hd||eL(hd,r)&&n===hd.forEach||ZB(rL,JB(r))?tL:n},iL=Jw,Di=X(iL),nL=Y,aL=ge,oL=si,sL=aL([].reverse),mg=[1,2];nL({target:"Array",proto:!0,forced:String(mg)===String(mg.reverse())},{reverse:function(){return oL(this)&&(this.length=this.length),sL(this)}});var uL=vt,lL=uL("Array").reverse,dL=je,hL=lL,cd=Array.prototype,cL=function(r){var n=r.reverse;return r===cd||dL(cd,r)&&n===cd.reverse?hL:n},fL=cL,Zw=fL,vL=Zw,pL=X(vL),gL=Ve,yL=si,mL=TypeError,bL=Object.getOwnPropertyDescriptor,$L=gL&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(r){return r instanceof TypeError}}(),wL=$L?function(r,n){if(yL(r)&&!bL(r,"length").writable)throw mL("Cannot set read only .length");return r.length=n}:function(r,n){return r.length=n},bg=Yn,_L=TypeError,e_=function(r,n){if(!delete r[n])throw _L("Cannot delete property "+bg(n)+" of "+bg(r))},EL=Y,SL=xt,OL=Lu,TL=Mu,kL=Wt,PL=wL,IL=hf,CL=Fu,AL=Qn,fd=e_,xL=so,DL=xL("splice"),RL=Math.max,ML=Math.min;EL({target:"Array",proto:!0,forced:!DL},{splice:function(n,e){var t=SL(this),i=kL(t),a=OL(n,i),o=arguments.length,s,u,l,d,h,c;for(o===0?s=u=0:o===1?(s=0,u=i-a):(s=o-2,u=ML(RL(TL(e),0),i-a)),IL(i+s-u),l=CL(t,u),d=0;d<u;d++)h=a+d,h in t&&AL(l,d,t[h]);if(l.length=u,s<u){for(d=a;d<i-u;d++)h=d+u,c=d+s,h in t?t[c]=t[h]:fd(t,c);for(d=i;d>i-u+s;d--)fd(t,d-1)}else if(s>u)for(d=i-u;d>a;d--)h=d+u-1,c=d+s-1,h in t?t[c]=t[h]:fd(t,c);for(d=0;d<s;d++)t[d+a]=arguments[d+2];return PL(t,i-u+s),l}});var NL=vt,FL=NL("Array").splice,BL=je,LL=FL,vd=Array.prototype,jL=function(r){var n=r.splice;return r===vd||BL(vd,r)&&n===vd.splice?LL:n},zL=jL,HL=zL,WL=HL,t_=X(WL),$g=Ve,VL=ge,UL=Ue,GL=ue,pd=ju,KL=ho,qL=Cu,YL=xt,XL=Au,sn=Object.assign,wg=Object.defineProperty,QL=VL([].concat),JL=!sn||GL(function(){if($g&&sn({b:1},sn(wg({},"a",{enumerable:!0,get:function(){wg(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var r={},n={},e=Symbol(),t="abcdefghijklmnopqrst";return r[e]=7,t.split("").forEach(function(i){n[i]=i}),sn({},r)[e]!=7||pd(sn({},n)).join("")!=t})?function(n,e){for(var t=YL(n),i=arguments.length,a=1,o=KL.f,s=qL.f;i>a;)for(var u=XL(arguments[a++]),l=o?QL(pd(u),o(u)):pd(u),d=l.length,h=0,c;d>h;)c=l[h++],(!$g||UL(s,u,c))&&(t[c]=u[c]);return t}:sn,ZL=Y,_g=JL;ZL({target:"Object",stat:!0,arity:2,forced:Object.assign!==_g},{assign:_g});var ej=me,tj=ej.Object.assign,rj=tj,ij=rj,nj=ij,aj=X(nj),oj=Y,sj=ue,uj=xt,r_=Ku,lj=hw,dj=sj(function(){r_(1)});oj({target:"Object",stat:!0,forced:dj,sham:!lj},{getPrototypeOf:function(n){return r_(uj(n))}});var hj=me,cj=hj.Object.getPrototypeOf,fj=cj,vj=fj,pj=Y,gj=Ve,yj=Ui;pj({target:"Object",stat:!0,sham:!gj},{create:yj});var mj=me,bj=mj.Object,$j=function(n,e){return bj.create(n,e)},wj=$j,i_=wj,_j=i_,Ej=X(_j),oc=me,Sj=Gn;oc.JSON||(oc.JSON={stringify:JSON.stringify});var Oj=function(n,e,t){return Sj(oc.JSON.stringify,null,arguments)},Tj=Oj,kj=Tj,Pj=kj,Ij=X(Pj),Cj=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",Aj=TypeError,n_=function(r,n){if(r<n)throw Aj("Not enough arguments");return r},a_=De,xj=Gn,Dj=Ee,Rj=Cj,Mj=ai,Nj=vo,Fj=n_,Bj=a_.Function,Lj=/MSIE .\./.test(Mj)||Rj&&function(){var r=a_.Bun.version.split(".");return r.length<3||r[0]==0&&(r[1]<3||r[1]==3&&r[2]==0)}(),o_=function(r,n){var e=n?2:1;return Lj?function(t,i){var a=Fj(arguments.length,1)>e,o=Dj(t)?t:Bj(t),s=a?Nj(arguments,e):[],u=a?function(){xj(o,this,s)}:o;return n?r(u,i):r(u)}:r},jj=Y,s_=De,zj=o_,Eg=zj(s_.setInterval,!0);jj({global:!0,bind:!0,forced:s_.setInterval!==Eg},{setInterval:Eg});var Hj=Y,u_=De,Wj=o_,Sg=Wj(u_.setTimeout,!0);Hj({global:!0,bind:!0,forced:u_.setTimeout!==Sg},{setTimeout:Sg});var Vj=me,Uj=Vj.setTimeout,Gj=Uj,Kj=X(Gj),l_={exports:{}};(function(r){r.exports=n;function n(t){if(t)return e(t)}function e(t){for(var i in n.prototype)t[i]=n.prototype[i];return t}n.prototype.on=n.prototype.addEventListener=function(t,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(i),this},n.prototype.once=function(t,i){function a(){this.off(t,a),i.apply(this,arguments)}return a.fn=i,this.on(t,a),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,i){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===i||o.fn===i){a.splice(s,1);break}return a.length===0&&delete this._callbacks["$"+t],this},n.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),a=this._callbacks["$"+t],o=1;o<arguments.length;o++)i[o-1]=arguments[o];if(a){a=a.slice(0);for(var o=0,s=a.length;o<s;++o)a[o].apply(this,i)}return this},n.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},n.prototype.hasListeners=function(t){return!!this.listeners(t).length}})(l_);var qj=l_.exports,Yj=X(qj);/*! 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 rr(){return rr=Object.assign||function(r){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}return r},rr.apply(this,arguments)}function Vt(r,n){r.prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n}function ss(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}var sc;typeof Object.assign!="function"?sc=function(n){if(n==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(n),t=1;t<arguments.length;t++){var i=arguments[t];if(i!=null)for(var a in i)i.hasOwnProperty(a)&&(e[a]=i[a])}return e}:sc=Object.assign;var Ri=sc,Og=["","webkit","Moz","MS","ms","o"],Xj=typeof document>"u"?{style:{}}:document.createElement("div"),Qj="function",$n=Math.round,Mi=Math.abs,Af=Date.now;function el(r,n){for(var e,t,i=n[0].toUpperCase()+n.slice(1),a=0;a<Og.length;){if(e=Og[a],t=e?e+i:n,t in r)return t;a++}}var _r;typeof window>"u"?_r={}:_r=window;var d_=el(Xj.style,"touchAction"),h_=d_!==void 0;function Jj(){if(!h_)return!1;var r={},n=_r.CSS&&_r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return r[e]=n?_r.CSS.supports("touch-action",e):!0}),r}var c_="compute",f_="auto",uc="manipulation",Oi="none",Wa="pan-x",Va="pan-y",us=Jj(),Zj=/mobile|tablet|ip(ad|hone|od)|android/i,v_="ontouchstart"in _r,ez=el(_r,"PointerEvent")!==void 0,tz=v_&&Zj.test(navigator.userAgent),mo="touch",rz="pen",xf="mouse",iz="kinect",nz=25,ht=1,Ki=2,Me=4,St=8,ou=1,bo=2,$o=4,wo=8,Rn=16,fr=bo|$o,Ti=wo|Rn,p_=fr|Ti,g_=["x","y"],su=["clientX","clientY"];function Er(r,n,e){var t;if(r)if(r.forEach)r.forEach(n,e);else if(r.length!==void 0)for(t=0;t<r.length;)n.call(e,r[t],t,r),t++;else for(t in r)r.hasOwnProperty(t)&&n.call(e,r[t],t,r)}function tl(r,n){return typeof r===Qj?r.apply(n&&n[0]||void 0,n):r}function wi(r,n){return r.indexOf(n)>-1}function az(r){if(wi(r,Oi))return Oi;var n=wi(r,Wa),e=wi(r,Va);return n&&e?Oi:n||e?n?Wa:Va:wi(r,uc)?uc:f_}var y_=function(){function r(e,t){this.manager=e,this.set(t)}var n=r.prototype;return n.set=function(t){t===c_&&(t=this.compute()),h_&&this.manager.element.style&&us[t]&&(this.manager.element.style[d_]=t),this.actions=t.toLowerCase().trim()},n.update=function(){this.set(this.manager.options.touchAction)},n.compute=function(){var t=[];return Er(this.manager.recognizers,function(i){tl(i.options.enable,[i])&&(t=t.concat(i.getTouchAction()))}),az(t.join(" "))},n.preventDefaults=function(t){var i=t.srcEvent,a=t.offsetDirection;if(this.manager.session.prevented){i.preventDefault();return}var o=this.actions,s=wi(o,Oi)&&!us[Oi],u=wi(o,Va)&&!us[Va],l=wi(o,Wa)&&!us[Wa];if(s){var d=t.pointers.length===1,h=t.distance<2,c=t.deltaTime<250;if(d&&h&&c)return}if(!(l&&u)&&(s||u&&a&fr||l&&a&Ti))return this.preventSrc(i)},n.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},r}();function Df(r,n){for(;r;){if(r===n)return!0;r=r.parentNode}return!1}function m_(r){var n=r.length;if(n===1)return{x:$n(r[0].clientX),y:$n(r[0].clientY)};for(var e=0,t=0,i=0;i<n;)e+=r[i].clientX,t+=r[i].clientY,i++;return{x:$n(e/n),y:$n(t/n)}}function Tg(r){for(var n=[],e=0;e<r.pointers.length;)n[e]={clientX:$n(r.pointers[e].clientX),clientY:$n(r.pointers[e].clientY)},e++;return{timeStamp:Af(),pointers:n,center:m_(n),deltaX:r.deltaX,deltaY:r.deltaY}}function uu(r,n,e){e||(e=g_);var t=n[e[0]]-r[e[0]],i=n[e[1]]-r[e[1]];return Math.sqrt(t*t+i*i)}function lc(r,n,e){e||(e=g_);var t=n[e[0]]-r[e[0]],i=n[e[1]]-r[e[1]];return Math.atan2(i,t)*180/Math.PI}function b_(r,n){return r===n?ou:Mi(r)>=Mi(n)?r<0?bo:$o:n<0?wo:Rn}function oz(r,n){var e=n.center,t=r.offsetDelta||{},i=r.prevDelta||{},a=r.prevInput||{};(n.eventType===ht||a.eventType===Me)&&(i=r.prevDelta={x:a.deltaX||0,y:a.deltaY||0},t=r.offsetDelta={x:e.x,y:e.y}),n.deltaX=i.x+(e.x-t.x),n.deltaY=i.y+(e.y-t.y)}function $_(r,n,e){return{x:n/r||0,y:e/r||0}}function sz(r,n){return uu(n[0],n[1],su)/uu(r[0],r[1],su)}function uz(r,n){return lc(n[1],n[0],su)+lc(r[1],r[0],su)}function lz(r,n){var e=r.lastInterval||n,t=n.timeStamp-e.timeStamp,i,a,o,s;if(n.eventType!==St&&(t>nz||e.velocity===void 0)){var u=n.deltaX-e.deltaX,l=n.deltaY-e.deltaY,d=$_(t,u,l);a=d.x,o=d.y,i=Mi(d.x)>Mi(d.y)?d.x:d.y,s=b_(u,l),r.lastInterval=n}else i=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;n.velocity=i,n.velocityX=a,n.velocityY=o,n.direction=s}function dz(r,n){var e=r.session,t=n.pointers,i=t.length;e.firstInput||(e.firstInput=Tg(n)),i>1&&!e.firstMultiple?e.firstMultiple=Tg(n):i===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,u=n.center=m_(t);n.timeStamp=Af(),n.deltaTime=n.timeStamp-a.timeStamp,n.angle=lc(s,u),n.distance=uu(s,u),oz(e,n),n.offsetDirection=b_(n.deltaX,n.deltaY);var l=$_(n.deltaTime,n.deltaX,n.deltaY);n.overallVelocityX=l.x,n.overallVelocityY=l.y,n.overallVelocity=Mi(l.x)>Mi(l.y)?l.x:l.y,n.scale=o?sz(o.pointers,t):1,n.rotation=o?uz(o.pointers,t):0,n.maxPointers=e.prevInput?n.pointers.length>e.prevInput.maxPointers?n.pointers.length:e.prevInput.maxPointers:n.pointers.length,lz(e,n);var d=r.element,h=n.srcEvent,c;h.composedPath?c=h.composedPath()[0]:h.path?c=h.path[0]:c=h.target,Df(c,d)&&(d=c),n.target=d}function hz(r,n,e){var t=e.pointers.length,i=e.changedPointers.length,a=n&ht&&t-i===0,o=n&(Me|St)&&t-i===0;e.isFirst=!!a,e.isFinal=!!o,a&&(r.session={}),e.eventType=n,dz(r,e),r.emit("hammer.input",e),r.recognize(e),r.session.prevInput=e}function Ua(r){return r.trim().split(/\s+/g)}function Ia(r,n,e){Er(Ua(n),function(t){r.addEventListener(t,e,!1)})}function Ca(r,n,e){Er(Ua(n),function(t){r.removeEventListener(t,e,!1)})}function kg(r){var n=r.ownerDocument||r;return n.defaultView||n.parentWindow||window}var ra=function(){function r(e,t){var i=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){tl(e.options.enable,[e])&&i.handler(a)},this.init()}var n=r.prototype;return n.handler=function(){},n.init=function(){this.evEl&&Ia(this.element,this.evEl,this.domHandler),this.evTarget&&Ia(this.target,this.evTarget,this.domHandler),this.evWin&&Ia(kg(this.element),this.evWin,this.domHandler)},n.destroy=function(){this.evEl&&Ca(this.element,this.evEl,this.domHandler),this.evTarget&&Ca(this.target,this.evTarget,this.domHandler),this.evWin&&Ca(kg(this.element),this.evWin,this.domHandler)},r}();function Ni(r,n,e){if(r.indexOf&&!e)return r.indexOf(n);for(var t=0;t<r.length;){if(e&&r[t][e]==n||!e&&r[t]===n)return t;t++}return-1}var cz={pointerdown:ht,pointermove:Ki,pointerup:Me,pointercancel:St,pointerout:St},fz={2:mo,3:rz,4:xf,5:iz},w_="pointerdown",__="pointermove pointerup pointercancel";_r.MSPointerEvent&&!_r.PointerEvent&&(w_="MSPointerDown",__="MSPointerMove MSPointerUp MSPointerCancel");var E_=function(r){Vt(n,r);function n(){var t,i=n.prototype;return i.evEl=w_,i.evWin=__,t=r.apply(this,arguments)||this,t.store=t.manager.session.pointerEvents=[],t}var e=n.prototype;return e.handler=function(i){var a=this.store,o=!1,s=i.type.toLowerCase().replace("ms",""),u=cz[s],l=fz[i.pointerType]||i.pointerType,d=l===mo,h=Ni(a,i.pointerId,"pointerId");u&ht&&(i.button===0||d)?h<0&&(a.push(i),h=a.length-1):u&(Me|St)&&(o=!0),!(h<0)&&(a[h]=i,this.callback(this.manager,u,{pointers:a,changedPointers:[i],pointerType:l,srcEvent:i}),o&&a.splice(h,1))},n}(ra);function Ga(r){return Array.prototype.slice.call(r,0)}function Rf(r,n,e){for(var t=[],i=[],a=0;a<r.length;){var o=n?r[a][n]:r[a];Ni(i,o)<0&&t.push(r[a]),i[a]=o,a++}return e&&(n?t=t.sort(function(s,u){return s[n]>u[n]}):t=t.sort()),t}var vz={touchstart:ht,touchmove:Ki,touchend:Me,touchcancel:St},pz="touchstart touchmove touchend touchcancel",Mf=function(r){Vt(n,r);function n(){var t;return n.prototype.evTarget=pz,t=r.apply(this,arguments)||this,t.targetIds={},t}var e=n.prototype;return e.handler=function(i){var a=vz[i.type],o=gz.call(this,i,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:mo,srcEvent:i})},n}(ra);function gz(r,n){var e=Ga(r.touches),t=this.targetIds;if(n&(ht|Ki)&&e.length===1)return t[e[0].identifier]=!0,[e,e];var i,a,o=Ga(r.changedTouches),s=[],u=this.target;if(a=e.filter(function(l){return Df(l.target,u)}),n===ht)for(i=0;i<a.length;)t[a[i].identifier]=!0,i++;for(i=0;i<o.length;)t[o[i].identifier]&&s.push(o[i]),n&(Me|St)&&delete t[o[i].identifier],i++;if(s.length)return[Rf(a.concat(s),"identifier",!0),s]}var yz={mousedown:ht,mousemove:Ki,mouseup:Me},mz="mousedown",bz="mousemove mouseup",Nf=function(r){Vt(n,r);function n(){var t,i=n.prototype;return i.evEl=mz,i.evWin=bz,t=r.apply(this,arguments)||this,t.pressed=!1,t}var e=n.prototype;return e.handler=function(i){var a=yz[i.type];a&ht&&i.button===0&&(this.pressed=!0),a&Ki&&i.which!==1&&(a=Me),this.pressed&&(a&Me&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[i],changedPointers:[i],pointerType:xf,srcEvent:i}))},n}(ra),$z=2500,Pg=25;function Ig(r){var n=r.changedPointers,e=n[0];if(e.identifier===this.primaryTouch){var t={x:e.clientX,y:e.clientY},i=this.lastTouches;this.lastTouches.push(t);var a=function(){var s=i.indexOf(t);s>-1&&i.splice(s,1)};setTimeout(a,$z)}}function wz(r,n){r&ht?(this.primaryTouch=n.changedPointers[0].identifier,Ig.call(this,n)):r&(Me|St)&&Ig.call(this,n)}function _z(r){for(var n=r.srcEvent.clientX,e=r.srcEvent.clientY,t=0;t<this.lastTouches.length;t++){var i=this.lastTouches[t],a=Math.abs(n-i.x),o=Math.abs(e-i.y);if(a<=Pg&&o<=Pg)return!0}return!1}var S_=function(){var r=function(n){Vt(e,n);function e(i,a){var o;return o=n.call(this,i,a)||this,o.handler=function(s,u,l){var d=l.pointerType===mo,h=l.pointerType===xf;if(!(h&&l.sourceCapabilities&&l.sourceCapabilities.firesTouchEvents)){if(d)wz.call(ss(ss(o)),u,l);else if(h&&_z.call(ss(ss(o)),l))return;o.callback(s,u,l)}},o.touch=new Mf(o.manager,o.handler),o.mouse=new Nf(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}(ra);return r}();function Ez(r){var n,e=r.options.inputClass;return e?n=e:ez?n=E_:tz?n=Mf:v_?n=S_:n=Nf,new n(r,hz)}function wn(r,n,e){return Array.isArray(r)?(Er(r,e[n],e),!0):!1}var Ls=1,zt=2,Mn=4,Xr=8,Sr=Xr,Ka=16,dr=32,Sz=1;function Oz(){return Sz++}function ls(r,n){var e=n.manager;return e?e.get(r):r}function Cg(r){return r&Ka?"cancel":r&Xr?"end":r&Mn?"move":r&zt?"start":""}var _o=function(){function r(e){e===void 0&&(e={}),this.options=rr({enable:!0},e),this.id=Oz(),this.manager=null,this.state=Ls,this.simultaneous={},this.requireFail=[]}var n=r.prototype;return n.set=function(t){return Ri(this.options,t),this.manager&&this.manager.touchAction.update(),this},n.recognizeWith=function(t){if(wn(t,"recognizeWith",this))return this;var i=this.simultaneous;return t=ls(t,this),i[t.id]||(i[t.id]=t,t.recognizeWith(this)),this},n.dropRecognizeWith=function(t){return wn(t,"dropRecognizeWith",this)?this:(t=ls(t,this),delete this.simultaneous[t.id],this)},n.requireFailure=function(t){if(wn(t,"requireFailure",this))return this;var i=this.requireFail;return t=ls(t,this),Ni(i,t)===-1&&(i.push(t),t.requireFailure(this)),this},n.dropRequireFailure=function(t){if(wn(t,"dropRequireFailure",this))return this;t=ls(t,this);var i=Ni(this.requireFail,t);return i>-1&&this.requireFail.splice(i,1),this},n.hasRequireFailures=function(){return this.requireFail.length>0},n.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},n.emit=function(t){var i=this,a=this.state;function o(s){i.manager.emit(s,t)}a<Xr&&o(i.options.event+Cg(a)),o(i.options.event),t.additionalEvent&&o(t.additionalEvent),a>=Xr&&o(i.options.event+Cg(a))},n.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=dr},n.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(dr|Ls)))return!1;t++}return!0},n.recognize=function(t){var i=Ri({},t);if(!tl(this.options.enable,[this,i])){this.reset(),this.state=dr;return}this.state&(Sr|Ka|dr)&&(this.state=Ls),this.state=this.process(i),this.state&(zt|Mn|Xr|Ka)&&this.tryEmit(i)},n.process=function(t){},n.getTouchAction=function(){},n.reset=function(){},r}(),dc=function(r){Vt(n,r);function n(t){var i;return t===void 0&&(t={}),i=r.call(this,rr({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,i.pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}var e=n.prototype;return e.getTouchAction=function(){return[uc]},e.process=function(i){var a=this,o=this.options,s=i.pointers.length===o.pointers,u=i.distance<o.threshold,l=i.deltaTime<o.time;if(this.reset(),i.eventType&ht&&this.count===0)return this.failTimeout();if(u&&l&&s){if(i.eventType!==Me)return this.failTimeout();var d=this.pTime?i.timeStamp-this.pTime<o.interval:!0,h=!this.pCenter||uu(this.pCenter,i.center)<o.posThreshold;this.pTime=i.timeStamp,this.pCenter=i.center,!h||!d?this.count=1:this.count+=1,this._input=i;var c=this.count%o.taps;if(c===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){a.state=Sr,a.tryEmit()},o.interval),zt):Sr}return dr},e.failTimeout=function(){var i=this;return this._timer=setTimeout(function(){i.state=dr},this.options.interval),dr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(){this.state===Sr&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},n}(_o),Nn=function(r){Vt(n,r);function n(t){return t===void 0&&(t={}),r.call(this,rr({pointers:1},t))||this}var e=n.prototype;return e.attrTest=function(i){var a=this.options.pointers;return a===0||i.pointers.length===a},e.process=function(i){var a=this.state,o=i.eventType,s=a&(zt|Mn),u=this.attrTest(i);return s&&(o&St||!u)?a|Ka:s||u?o&Me?a|Xr:a&zt?a|Mn:zt:dr},n}(_o);function O_(r){return r===Rn?"down":r===wo?"up":r===bo?"left":r===$o?"right":""}var Ff=function(r){Vt(n,r);function n(t){var i;return t===void 0&&(t={}),i=r.call(this,rr({event:"pan",threshold:10,pointers:1,direction:p_},t))||this,i.pX=null,i.pY=null,i}var e=n.prototype;return e.getTouchAction=function(){var i=this.options.direction,a=[];return i&fr&&a.push(Va),i&Ti&&a.push(Wa),a},e.directionTest=function(i){var a=this.options,o=!0,s=i.distance,u=i.direction,l=i.deltaX,d=i.deltaY;return u&a.direction||(a.direction&fr?(u=l===0?ou:l<0?bo:$o,o=l!==this.pX,s=Math.abs(i.deltaX)):(u=d===0?ou:d<0?wo:Rn,o=d!==this.pY,s=Math.abs(i.deltaY))),i.direction=u,o&&s>a.threshold&&u&a.direction},e.attrTest=function(i){return Nn.prototype.attrTest.call(this,i)&&(this.state&zt||!(this.state&zt)&&this.directionTest(i))},e.emit=function(i){this.pX=i.deltaX,this.pY=i.deltaY;var a=O_(i.direction);a&&(i.additionalEvent=this.options.event+a),r.prototype.emit.call(this,i)},n}(Nn),T_=function(r){Vt(n,r);function n(t){return t===void 0&&(t={}),r.call(this,rr({event:"swipe",threshold:10,velocity:.3,direction:fr|Ti,pointers:1},t))||this}var e=n.prototype;return e.getTouchAction=function(){return Ff.prototype.getTouchAction.call(this)},e.attrTest=function(i){var a=this.options.direction,o;return a&(fr|Ti)?o=i.overallVelocity:a&fr?o=i.overallVelocityX:a&Ti&&(o=i.overallVelocityY),r.prototype.attrTest.call(this,i)&&a&i.offsetDirection&&i.distance>this.options.threshold&&i.maxPointers===this.options.pointers&&Mi(o)>this.options.velocity&&i.eventType&Me},e.emit=function(i){var a=O_(i.offsetDirection);a&&this.manager.emit(this.options.event+a,i),this.manager.emit(this.options.event,i)},n}(Nn),k_=function(r){Vt(n,r);function n(t){return t===void 0&&(t={}),r.call(this,rr({event:"pinch",threshold:0,pointers:2},t))||this}var e=n.prototype;return e.getTouchAction=function(){return[Oi]},e.attrTest=function(i){return r.prototype.attrTest.call(this,i)&&(Math.abs(i.scale-1)>this.options.threshold||this.state&zt)},e.emit=function(i){if(i.scale!==1){var a=i.scale<1?"in":"out";i.additionalEvent=this.options.event+a}r.prototype.emit.call(this,i)},n}(Nn),P_=function(r){Vt(n,r);function n(t){return t===void 0&&(t={}),r.call(this,rr({event:"rotate",threshold:0,pointers:2},t))||this}var e=n.prototype;return e.getTouchAction=function(){return[Oi]},e.attrTest=function(i){return r.prototype.attrTest.call(this,i)&&(Math.abs(i.rotation)>this.options.threshold||this.state&zt)},n}(Nn),I_=function(r){Vt(n,r);function n(t){var i;return t===void 0&&(t={}),i=r.call(this,rr({event:"press",pointers:1,time:251,threshold:9},t))||this,i._timer=null,i._input=null,i}var e=n.prototype;return e.getTouchAction=function(){return[f_]},e.process=function(i){var a=this,o=this.options,s=i.pointers.length===o.pointers,u=i.distance<o.threshold,l=i.deltaTime>o.time;if(this._input=i,!u||!s||i.eventType&(Me|St)&&!l)this.reset();else if(i.eventType&ht)this.reset(),this._timer=setTimeout(function(){a.state=Sr,a.tryEmit()},o.time);else if(i.eventType&Me)return Sr;return dr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(i){this.state===Sr&&(i&&i.eventType&Me?this.manager.emit(this.options.event+"up",i):(this._input.timeStamp=Af(),this.manager.emit(this.options.event,this._input)))},n}(_o),C_={domEvents:!1,touchAction:c_,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Ag=[[P_,{enable:!1}],[k_,{enable:!1},["rotate"]],[T_,{direction:fr}],[Ff,{direction:fr},["swipe"]],[dc],[dc,{event:"doubletap",taps:2},["tap"]],[I_]],Tz=1,xg=2;function Dg(r,n){var e=r.element;if(e.style){var t;Er(r.options.cssProps,function(i,a){t=el(e.style,a),n?(r.oldCssProps[t]=e.style[t],e.style[t]=i):e.style[t]=r.oldCssProps[t]||""}),n||(r.oldCssProps={})}}function kz(r,n){var e=document.createEvent("Event");e.initEvent(r,!0,!0),e.gesture=n,n.target.dispatchEvent(e)}var Rg=function(){function r(e,t){var i=this;this.options=Ri({},C_,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=Ez(this),this.touchAction=new y_(this,this.options.touchAction),Dg(this,!0),Er(this.options.recognizers,function(a){var o=i.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var n=r.prototype;return n.set=function(t){return Ri(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},n.stop=function(t){this.session.stopped=t?xg:Tz},n.recognize=function(t){var i=this.session;if(!i.stopped){this.touchAction.preventDefaults(t);var a,o=this.recognizers,s=i.curRecognizer;(!s||s&&s.state&Sr)&&(i.curRecognizer=null,s=null);for(var u=0;u<o.length;)a=o[u],i.stopped!==xg&&(!s||a===s||a.canRecognizeWith(s))?a.recognize(t):a.reset(),!s&&a.state&(zt|Mn|Xr)&&(i.curRecognizer=a,s=a),u++}},n.get=function(t){if(t instanceof _o)return t;for(var i=this.recognizers,a=0;a<i.length;a++)if(i[a].options.event===t)return i[a];return null},n.add=function(t){if(wn(t,"add",this))return this;var i=this.get(t.options.event);return i&&this.remove(i),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},n.remove=function(t){if(wn(t,"remove",this))return this;var i=this.get(t);if(t){var a=this.recognizers,o=Ni(a,i);o!==-1&&(a.splice(o,1),this.touchAction.update())}return this},n.on=function(t,i){if(t===void 0||i===void 0)return this;var a=this.handlers;return Er(Ua(t),function(o){a[o]=a[o]||[],a[o].push(i)}),this},n.off=function(t,i){if(t===void 0)return this;var a=this.handlers;return Er(Ua(t),function(o){i?a[o]&&a[o].splice(Ni(a[o],i),1):delete a[o]}),this},n.emit=function(t,i){this.options.domEvents&&kz(t,i);var a=this.handlers[t]&&this.handlers[t].slice();if(!(!a||!a.length)){i.type=t,i.preventDefault=function(){i.srcEvent.preventDefault()};for(var o=0;o<a.length;)a[o](i),o++}},n.destroy=function(){this.element&&Dg(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},r}(),Pz={touchstart:ht,touchmove:Ki,touchend:Me,touchcancel:St},Iz="touchstart",Cz="touchstart touchmove touchend touchcancel",Az=function(r){Vt(n,r);function n(){var t,i=n.prototype;return i.evTarget=Iz,i.evWin=Cz,t=r.apply(this,arguments)||this,t.started=!1,t}var e=n.prototype;return e.handler=function(i){var a=Pz[i.type];if(a===ht&&(this.started=!0),!!this.started){var o=xz.call(this,i,a);a&(Me|St)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:mo,srcEvent:i})}},n}(ra);function xz(r,n){var e=Ga(r.touches),t=Ga(r.changedTouches);return n&(Me|St)&&(e=Rf(e.concat(t),"identifier",!0)),[e,t]}function A_(r,n,e){var t="DEPRECATED METHOD: "+n+`
33
+ `+e+` AT
34
+ `;return function(){var i=new Error("get-stack-trace"),a=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,t,a),r.apply(this,arguments)}}var x_=A_(function(r,n,e){for(var t=Object.keys(n),i=0;i<t.length;)(!e||e&&r[t[i]]===void 0)&&(r[t[i]]=n[t[i]]),i++;return r},"extend","Use `assign`."),Dz=A_(function(r,n){return x_(r,n,!0)},"merge","Use `assign`.");function Rz(r,n,e){var t=n.prototype,i;i=r.prototype=Object.create(t),i.constructor=r,i._super=t,e&&Ri(i,e)}function Mg(r,n){return function(){return r.apply(n,arguments)}}var Mz=function(){var r=function(e,t){return t===void 0&&(t={}),new Rg(e,rr({recognizers:Ag.concat()},t))};return r.VERSION="2.0.17-rc",r.DIRECTION_ALL=p_,r.DIRECTION_DOWN=Rn,r.DIRECTION_LEFT=bo,r.DIRECTION_RIGHT=$o,r.DIRECTION_UP=wo,r.DIRECTION_HORIZONTAL=fr,r.DIRECTION_VERTICAL=Ti,r.DIRECTION_NONE=ou,r.DIRECTION_DOWN=Rn,r.INPUT_START=ht,r.INPUT_MOVE=Ki,r.INPUT_END=Me,r.INPUT_CANCEL=St,r.STATE_POSSIBLE=Ls,r.STATE_BEGAN=zt,r.STATE_CHANGED=Mn,r.STATE_ENDED=Xr,r.STATE_RECOGNIZED=Sr,r.STATE_CANCELLED=Ka,r.STATE_FAILED=dr,r.Manager=Rg,r.Input=ra,r.TouchAction=y_,r.TouchInput=Mf,r.MouseInput=Nf,r.PointerEventInput=E_,r.TouchMouseInput=S_,r.SingleTouchInput=Az,r.Recognizer=_o,r.AttrRecognizer=Nn,r.Tap=dc,r.Pan=Ff,r.Swipe=T_,r.Pinch=k_,r.Rotate=P_,r.Press=I_,r.on=Ia,r.off=Ca,r.each=Er,r.merge=Dz,r.extend=x_,r.bindFn=Mg,r.assign=Ri,r.inherit=Rz,r.bindFn=Mg,r.prefixed=el,r.toArray=Ga,r.inArray=Ni,r.uniqueArray=Rf,r.splitStr=Ua,r.boolOrFn=tl,r.hasParent=Df,r.addEventListeners=Ia,r.removeEventListeners=Ca,r.defaults=Ri({},C_,{preset:Ag}),r}(),Nz=Mz;function D_(r,n){var e=typeof Qu<"u"&&yo(r)||r["@@iterator"];if(!e){if(Ct(r)||(e=Fz(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
35
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Fz(r,n){var e;if(r){if(typeof r=="string")return Ng(r,n);var t=Zu(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Pf(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ng(r,n)}}function Ng(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}var R_=Qu("DELETE");function Bz(r){for(var n,e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];return M_.apply(void 0,Ju(n=[{},r]).call(n,t))}function M_(){var r=lu.apply(void 0,arguments);return F_(r),r}function lu(){for(var r=arguments.length,n=new Array(r),e=0;e<r;e++)n[e]=arguments[e];if(n.length<2)return n[0];if(n.length>2){var t;return lu.apply(void 0,Ju(t=[M_(n[0],n[1])]).call(t,wt(Zu(n).call(n,2))))}var i=n[0],a=n[1],o=D_(xB(a)),s;try{for(o.s();!(s=o.n()).done;){var u=s.value;Object.prototype.propertyIsEnumerable.call(a,u)&&(a[u]===R_?delete i[u]:i[u]!==null&&a[u]!==null&&tt(i[u])==="object"&&tt(a[u])==="object"&&!Ct(i[u])&&!Ct(a[u])?i[u]=lu(i[u],a[u]):i[u]=N_(a[u]))}}catch(l){o.e(l)}finally{o.f()}return i}function N_(r){return Ct(r)?Xt(r).call(r,function(n){return N_(n)}):tt(r)==="object"&&r!==null?lu({},r):r}function F_(r){for(var n=0,e=Cf(r);n<e.length;n++){var t=e[n];r[t]===R_?delete r[t]:tt(r[t])==="object"&&r[t]!==null&&F_(r[t])}}function Lz(){var r=function(){};return{on:r,off:r,destroy:r,emit:r,get:function(){return{set:r}}}}var jz=typeof window<"u"?window.Hammer||Nz:function(){return Lz()};function $r(r){var n=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(){n._dom.overlay.parentNode.removeChild(n._dom.overlay)});var t=jz(this._dom.overlay);t.on("tap",Cw(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){t.destroy()});var i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Di(i).call(i,function(a){t.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){zz(a.target,r)||n.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",n._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&n.deactivate()}}Yj($r.prototype);$r.current=null;$r.prototype.destroy=function(){var r,n;this.deactivate();var e=D_(pL(r=t_(n=this._cleanupQueue).call(n,0)).call(r)),t;try{for(e.s();!(t=e.n()).done;){var i=t.value;i()}}catch(a){e.e(a)}finally{e.f()}};$r.prototype.activate=function(){$r.current&&$r.current.deactivate(),$r.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};$r.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};$r.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function zz(r,n){for(;r;){if(r===n)return!0;r=r.parentNode}return!1}var Hz=Nu,Wz=Yn,Vz=TypeError,B_=function(r){if(Hz(r))return r;throw Vz(Wz(r)+" is not a constructor")},Uz=Y,Gz=ft,gd=Gn,Kz=Pw,Fg=B_,qz=Rt,Bg=it,Yz=Ui,L_=ue,Bf=Gz("Reflect","construct"),Xz=Object.prototype,Qz=[].push,j_=L_(function(){function r(){}return!(Bf(function(){},[],r)instanceof r)}),z_=!L_(function(){Bf(function(){})}),Lg=j_||z_;Uz({target:"Reflect",stat:!0,forced:Lg,sham:Lg},{construct:function(n,e){Fg(n),qz(e);var t=arguments.length<3?n:Fg(arguments[2]);if(z_&&!j_)return Bf(n,e,t);if(n==t){switch(e.length){case 0:return new n;case 1:return new n(e[0]);case 2:return new n(e[0],e[1]);case 3:return new n(e[0],e[1],e[2]);case 4:return new n(e[0],e[1],e[2],e[3])}var i=[null];return gd(Qz,i,e),new(gd(Kz,n,i))}var a=t.prototype,o=Yz(Bg(a)?a:Xz),s=gd(n,o,e);return Bg(s)?s:o}});var Jz=me,Zz=Jz.Reflect.construct,e3=Zz,t3=e3,r3=t3,js=X(r3);function pi(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}var i3=i_,n3=i3,a3=n3,o3=a3,s3=o3,H_=s3,u3=X(H_),l3=Y,d3=vw;l3({target:"Object",stat:!0},{setPrototypeOf:d3});var h3=me,c3=h3.Object.setPrototypeOf,f3=c3,v3=f3,p3=v3,g3=p3,y3=g3,m3=y3,b3=m3,W_=b3,hc=X(W_),$3=Iw,w3=$3,_3=w3,E3=_3,S3=E3,O3=S3,V_=X(O3);function cc(r,n){var e;return cc=hc?V_(e=hc).call(e):function(i,a){return i.__proto__=a,i},cc(r,n)}function T3(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=u3(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Ru(r,"prototype",{writable:!1}),n&&cc(r,n)}function k3(r,n){if(n&&(tt(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pi(r)}var P3=vj,I3=P3,C3=I3,A3=C3,x3=A3,U_=x3,jg=X(U_);function du(r){var n;return du=hc?V_(n=jg).call(n):function(t){return t.__proto__||jg(t)},du(r)}var G_={exports:{}},K_={exports:{}};(function(r){var n=Of,e=Sw;function t(i){"@babel/helpers - typeof";return r.exports=t=typeof n=="function"&&typeof e=="symbol"?function(a){return typeof a}:function(a){return a&&typeof n=="function"&&a.constructor===n&&a!==n.prototype?"symbol":typeof a},r.exports.__esModule=!0,r.exports.default=r.exports,t(i)}r.exports=t,r.exports.__esModule=!0,r.exports.default=r.exports})(K_);var D3=K_.exports,R3=Jw,M3=R3,N3=M3,F3=N3,B3=F3,L3=B3,zg=Be,j3=If,z3=Hi,H3=Dt,W3=function(r,n,e){for(var t=j3(n),i=H3.f,a=z3.f,o=0;o<t.length;o++){var s=t[o];!zg(r,s)&&!(e&&zg(e,s))&&i(r,s,a(n,s))}},V3=it,U3=Rr,G3=function(r,n){V3(n)&&"cause"in n&&U3(r,"cause",n.cause)},K3=ge,q_=Error,q3=K3("".replace),Y3=function(r){return String(q_(r).stack)}("zxcasd"),Y_=/\n\s*at [^:]*:[^\n]*/,X3=Y_.test(Y3),Q3=function(r,n){if(X3&&typeof r=="string"&&!q_.prepareStackTrace)for(;n--;)r=q3(r,Y_,"");return r},J3=ue,Z3=Wi,e5=!J3(function(){var r=Error("a");return"stack"in r?(Object.defineProperty(r,"stack",Z3(1,7)),r.stack!==7):!0}),t5=Rr,r5=Q3,i5=e5,Hg=Error.captureStackTrace,n5=function(r,n,e,t){i5&&(Hg?Hg(r,n):t5(r,"stack",r5(e,t)))},a5=oi,o5=Ue,s5=Rt,u5=Yn,l5=Dw,d5=Wt,Wg=je,h5=kf,c5=Xu,Vg=xw,f5=TypeError,zs=function(r,n){this.stopped=r,this.result=n},Ug=zs.prototype,qi=function(r,n,e){var t=e&&e.that,i=!!(e&&e.AS_ENTRIES),a=!!(e&&e.IS_RECORD),o=!!(e&&e.IS_ITERATOR),s=!!(e&&e.INTERRUPTED),u=a5(n,t),l,d,h,c,f,v,p,g=function(m){return l&&Vg(l,"normal",m),new zs(!0,m)},y=function(m){return i?(s5(m),s?u(m[0],m[1],g):u(m[0],m[1])):s?u(m,g):u(m)};if(a)l=r.iterator;else if(o)l=r;else{if(d=c5(r),!d)throw f5(u5(r)+" is not iterable");if(l5(d)){for(h=0,c=d5(r);c>h;h++)if(f=y(r[h]),f&&Wg(Ug,f))return f;return new zs(!1)}l=h5(r,d)}for(v=a?r.next:l.next;!(p=o5(v,l)).done;){try{f=y(p.value)}catch(m){Vg(l,"throw",m)}if(typeof f=="object"&&f&&Wg(Ug,f))return f}return new zs(!1)},v5=Vi,p5=function(r,n){return r===void 0?arguments.length<2?"":n:v5(r)},g5=Y,y5=je,m5=Ku,hu=vw,b5=W3,X_=Ui,yd=Rr,md=Wi,$5=G3,w5=n5,_5=qi,E5=p5,S5=Se,O5=S5("toStringTag"),cu=Error,T5=[].push,Fn=function(n,e){var t=y5(bd,this),i;hu?i=hu(cu(),t?m5(this):bd):(i=t?this:X_(bd),yd(i,O5,"Error")),e!==void 0&&yd(i,"message",E5(e)),w5(i,Fn,i.stack,1),arguments.length>2&&$5(i,arguments[2]);var a=[];return _5(n,T5,{that:a}),yd(i,"errors",a),i};hu?hu(Fn,cu):b5(Fn,cu,{name:!0});var bd=Fn.prototype=X_(cu.prototype,{constructor:md(1,Fn),message:md(1,""),name:md(1,"AggregateError")});g5({global:!0,constructor:!0,arity:2},{AggregateError:Fn});var k5=ft,P5=gf,I5=Se,C5=Ve,Gg=I5("species"),Q_=function(r){var n=k5(r);C5&&n&&!n[Gg]&&P5(n,Gg,{configurable:!0,get:function(){return this}})},A5=je,x5=TypeError,Lf=function(r,n){if(A5(n,r))return r;throw x5("Incorrect invocation")},Kg=Rt,D5=B_,R5=no,M5=Se,N5=M5("species"),J_=function(r,n){var e=Kg(r).constructor,t;return e===void 0||R5(t=Kg(e)[N5])?n:D5(t)},F5=ai,Z_=/(?:ipad|iphone|ipod).*applewebkit/i.test(F5),At=De,B5=Gn,L5=oi,qg=Ee,j5=Be,e0=ue,Yg=M1,z5=vo,Xg=df,H5=n_,W5=Z_,V5=go,fc=At.setImmediate,vc=At.clearImmediate,U5=At.process,$d=At.Dispatch,G5=At.Function,Qg=At.MessageChannel,K5=At.String,wd=0,Aa={},Jg="onreadystatechange",qa,vi,_d,Ed;e0(function(){qa=At.location});var jf=function(r){if(j5(Aa,r)){var n=Aa[r];delete Aa[r],n()}},Sd=function(r){return function(){jf(r)}},Zg=function(r){jf(r.data)},ey=function(r){At.postMessage(K5(r),qa.protocol+"//"+qa.host)};(!fc||!vc)&&(fc=function(n){H5(arguments.length,1);var e=qg(n)?n:G5(n),t=z5(arguments,1);return Aa[++wd]=function(){B5(e,void 0,t)},vi(wd),wd},vc=function(n){delete Aa[n]},V5?vi=function(r){U5.nextTick(Sd(r))}:$d&&$d.now?vi=function(r){$d.now(Sd(r))}:Qg&&!W5?(_d=new Qg,Ed=_d.port2,_d.port1.onmessage=Zg,vi=L5(Ed.postMessage,Ed)):At.addEventListener&&qg(At.postMessage)&&!At.importScripts&&qa&&qa.protocol!=="file:"&&!e0(ey)?(vi=ey,At.addEventListener("message",Zg,!1)):Jg in Xg("script")?vi=function(r){Yg.appendChild(Xg("script"))[Jg]=function(){Yg.removeChild(this),jf(r)}}:vi=function(r){setTimeout(Sd(r),0)});var t0={set:fc,clear:vc},r0=function(){this.head=null,this.tail=null};r0.prototype={add:function(r){var n={item:r,next:null},e=this.tail;e?e.next=n:this.head=n,this.tail=n},get:function(){var r=this.head;if(r){var n=this.head=r.next;return n===null&&(this.tail=null),r.item}}};var i0=r0,q5=ai,Y5=/ipad|iphone|ipod/i.test(q5)&&typeof Pebble<"u",X5=ai,Q5=/web0s(?!.*chrome)/i.test(X5),Fi=De,ty=oi,J5=Hi.f,Od=t0.set,Z5=i0,eH=Z_,tH=Y5,rH=Q5,Td=go,ry=Fi.MutationObserver||Fi.WebKitMutationObserver,iy=Fi.document,ny=Fi.process,ds=Fi.Promise,ay=J5(Fi,"queueMicrotask"),pc=ay&&ay.value,un,kd,Pd,hs,oy;if(!pc){var cs=new Z5,fs=function(){var r,n;for(Td&&(r=ny.domain)&&r.exit();n=cs.get();)try{n()}catch(e){throw cs.head&&un(),e}r&&r.enter()};!eH&&!Td&&!rH&&ry&&iy?(kd=!0,Pd=iy.createTextNode(""),new ry(fs).observe(Pd,{characterData:!0}),un=function(){Pd.data=kd=!kd}):!tH&&ds&&ds.resolve?(hs=ds.resolve(void 0),hs.constructor=ds,oy=ty(hs.then,hs),un=function(){oy(fs)}):Td?un=function(){ny.nextTick(fs)}:(Od=ty(Od,Fi),un=function(){Od(fs)}),pc=function(r){cs.head||un(),cs.add(r)}}var iH=pc,nH=function(r,n){try{arguments.length==1?console.error(r):console.error(r,n)}catch{}},ia=function(r){try{return{error:!1,value:r()}}catch(n){return{error:!0,value:n}}},aH=De,na=aH.Promise,n0=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",oH=n0,sH=go,uH=!oH&&!sH&&typeof window=="object"&&typeof document=="object",lH=De,xa=na,dH=Ee,hH=_1,cH=P1,fH=Se,vH=uH,pH=n0,Id=Kn,sy=xa&&xa.prototype,gH=fH("species"),gc=!1,a0=dH(lH.PromiseRejectionEvent),yH=hH("Promise",function(){var r=cH(xa),n=r!==String(xa);if(!n&&Id===66||!(sy.catch&&sy.finally))return!0;if(!Id||Id<51||!/native code/.test(r)){var e=new xa(function(a){a(1)}),t=function(a){a(function(){},function(){})},i=e.constructor={};if(i[gH]=t,gc=e.then(function(){})instanceof t,!gc)return!0}return!n&&(vH||pH)&&!a0}),Eo={CONSTRUCTOR:yH,REJECTION_EVENT:a0,SUBCLASSING:gc},Nr={},uy=Tt,mH=TypeError,bH=function(r){var n,e;this.promise=new r(function(t,i){if(n!==void 0||e!==void 0)throw mH("Bad Promise constructor");n=t,e=i}),this.resolve=uy(n),this.reject=uy(e)};Nr.f=function(r){return new bH(r)};var $H=Y,fu=go,ei=De,So=Ue,wH=Jn,_H=Gi,EH=Q_,SH=Tt,yc=Ee,OH=it,TH=Lf,kH=J_,o0=t0.set,zf=iH,PH=nH,IH=ia,CH=i0,s0=Zn,mc=na,u0=Eo,l0=Nr,rl="Promise",d0=u0.CONSTRUCTOR,AH=u0.REJECTION_EVENT,Cd=s0.getterFor(rl),xH=s0.set,DH=mc&&mc.prototype,_n=mc,Ad=DH,h0=ei.TypeError,bc=ei.document,Hf=ei.process,$c=l0.f,RH=$c,MH=!!(bc&&bc.createEvent&&ei.dispatchEvent),c0="unhandledrejection",NH="rejectionhandled",ly=0,f0=1,FH=2,Wf=1,v0=2,vs,dy,BH,p0=function(r){var n;return OH(r)&&yc(n=r.then)?n:!1},g0=function(r,n){var e=n.value,t=n.state==f0,i=t?r.ok:r.fail,a=r.resolve,o=r.reject,s=r.domain,u,l,d;try{i?(t||(n.rejection===v0&&jH(n),n.rejection=Wf),i===!0?u=e:(s&&s.enter(),u=i(e),s&&(s.exit(),d=!0)),u===r.promise?o(h0("Promise-chain cycle")):(l=p0(u))?So(l,u,a,o):a(u)):o(e)}catch(h){s&&!d&&s.exit(),o(h)}},y0=function(r,n){r.notified||(r.notified=!0,zf(function(){for(var e=r.reactions,t;t=e.get();)g0(t,r);r.notified=!1,n&&!r.rejection&&LH(r)}))},m0=function(r,n,e){var t,i;MH?(t=bc.createEvent("Event"),t.promise=n,t.reason=e,t.initEvent(r,!1,!0),ei.dispatchEvent(t)):t={promise:n,reason:e},!AH&&(i=ei["on"+r])?i(t):r===c0&&PH("Unhandled promise rejection",e)},LH=function(r){So(o0,ei,function(){var n=r.facade,e=r.value,t=hy(r),i;if(t&&(i=IH(function(){fu?Hf.emit("unhandledRejection",e,n):m0(c0,n,e)}),r.rejection=fu||hy(r)?v0:Wf,i.error))throw i.value})},hy=function(r){return r.rejection!==Wf&&!r.parent},jH=function(r){So(o0,ei,function(){var n=r.facade;fu?Hf.emit("rejectionHandled",n):m0(NH,n,r.value)})},En=function(r,n,e){return function(t){r(n,t,e)}},Pn=function(r,n,e){r.done||(r.done=!0,e&&(r=e),r.value=n,r.state=FH,y0(r,!0))},wc=function(r,n,e){if(!r.done){r.done=!0,e&&(r=e);try{if(r.facade===n)throw h0("Promise can't be resolved itself");var t=p0(n);t?zf(function(){var i={done:!1};try{So(t,n,En(wc,i,r),En(Pn,i,r))}catch(a){Pn(i,a,r)}}):(r.value=n,r.state=f0,y0(r,!1))}catch(i){Pn({done:!1},i,r)}}};d0&&(_n=function(n){TH(this,Ad),SH(n),So(vs,this);var e=Cd(this);try{n(En(wc,e),En(Pn,e))}catch(t){Pn(e,t)}},Ad=_n.prototype,vs=function(n){xH(this,{type:rl,done:!1,notified:!1,parent:!1,reactions:new CH,rejection:!1,state:ly,value:void 0})},vs.prototype=wH(Ad,"then",function(n,e){var t=Cd(this),i=$c(kH(this,_n));return t.parent=!0,i.ok=yc(n)?n:!0,i.fail=yc(e)&&e,i.domain=fu?Hf.domain:void 0,t.state==ly?t.reactions.add(i):zf(function(){g0(i,t)}),i.promise}),dy=function(){var r=new vs,n=Cd(r);this.promise=r,this.resolve=En(wc,n),this.reject=En(Pn,n)},l0.f=$c=function(r){return r===_n||r===BH?new dy(r):RH(r)});$H({global:!0,constructor:!0,wrap:!0,forced:d0},{Promise:_n});_H(_n,rl,!1,!0);EH(rl);var zH=na,HH=Nw,WH=Eo.CONSTRUCTOR,il=WH||!HH(function(r){zH.all(r).then(void 0,function(){})}),VH=Y,UH=Ue,GH=Tt,KH=Nr,qH=ia,YH=qi,XH=il;VH({target:"Promise",stat:!0,forced:XH},{all:function(n){var e=this,t=KH.f(e),i=t.resolve,a=t.reject,o=qH(function(){var s=GH(e.resolve),u=[],l=0,d=1;YH(n,function(h){var c=l++,f=!1;d++,UH(s,e,h).then(function(v){f||(f=!0,u[c]=v,--d||i(u))},a)}),--d||i(u)});return o.error&&a(o.value),t.promise}});var QH=Y,JH=Eo.CONSTRUCTOR,cy=na;cy&&cy.prototype;QH({target:"Promise",proto:!0,forced:JH,real:!0},{catch:function(r){return this.then(void 0,r)}});var ZH=Y,e4=Ue,t4=Tt,r4=Nr,i4=ia,n4=qi,a4=il;ZH({target:"Promise",stat:!0,forced:a4},{race:function(n){var e=this,t=r4.f(e),i=t.reject,a=i4(function(){var o=t4(e.resolve);n4(n,function(s){e4(o,e,s).then(t.resolve,i)})});return a.error&&i(a.value),t.promise}});var o4=Y,s4=Ue,u4=Nr,l4=Eo.CONSTRUCTOR;o4({target:"Promise",stat:!0,forced:l4},{reject:function(n){var e=u4.f(this);return s4(e.reject,void 0,n),e.promise}});var d4=Rt,h4=it,c4=Nr,b0=function(r,n){if(d4(r),h4(n)&&n.constructor===r)return n;var e=c4.f(r),t=e.resolve;return t(n),e.promise},f4=Y,v4=ft,p4=Hk,g4=na,y4=Eo.CONSTRUCTOR,m4=b0,b4=v4("Promise"),$4=!y4;f4({target:"Promise",stat:!0,forced:p4},{resolve:function(n){return m4($4&&this===b4?g4:this,n)}});var w4=Y,_4=Ue,E4=Tt,S4=Nr,O4=ia,T4=qi,k4=il;w4({target:"Promise",stat:!0,forced:k4},{allSettled:function(n){var e=this,t=S4.f(e),i=t.resolve,a=t.reject,o=O4(function(){var s=E4(e.resolve),u=[],l=0,d=1;T4(n,function(h){var c=l++,f=!1;d++,_4(s,e,h).then(function(v){f||(f=!0,u[c]={status:"fulfilled",value:v},--d||i(u))},function(v){f||(f=!0,u[c]={status:"rejected",reason:v},--d||i(u))})}),--d||i(u)});return o.error&&a(o.value),t.promise}});var P4=Y,I4=Ue,C4=Tt,A4=ft,x4=Nr,D4=ia,R4=qi,M4=il,fy="No one promise resolved";P4({target:"Promise",stat:!0,forced:M4},{any:function(n){var e=this,t=A4("AggregateError"),i=x4.f(e),a=i.resolve,o=i.reject,s=D4(function(){var u=C4(e.resolve),l=[],d=0,h=1,c=!1;R4(n,function(f){var v=d++,p=!1;h++,I4(u,e,f).then(function(g){p||c||(c=!0,a(g))},function(g){p||c||(p=!0,l[v]=g,--h||o(new t(l,fy)))})}),--h||o(new t(l,fy))});return s.error&&o(s.value),i.promise}});var N4=Y,_c=na,F4=ue,B4=ft,L4=Ee,j4=J_,vy=b0,z4=_c&&_c.prototype,H4=!!_c&&F4(function(){z4.finally.call({then:function(){}},function(){})});N4({target:"Promise",proto:!0,real:!0,forced:H4},{finally:function(r){var n=j4(this,B4("Promise")),e=L4(r);return this.then(e?function(t){return vy(n,r()).then(function(){return t})}:r,e?function(t){return vy(n,r()).then(function(){throw t})}:r)}});var W4=me,V4=W4.Promise,U4=V4,G4=U4,K4=G4,q4=K4,Y4=Y,X4=Nr,Q4=ia;Y4({target:"Promise",stat:!0,forced:!0},{try:function(r){var n=X4.f(this),e=Q4(r);return(e.error?n.reject:n.resolve)(e.value),n.promise}});var J4=q4,Z4=J4,eW=Z4,tW=eW,rW=Zw,iW=rW,nW=iW,aW=nW,oW=aW,sW=oW;(function(r){var n=D3.default,e=T1,t=Of,i=H_,a=U_,o=L3,s=W_,u=tW,l=sW,d=qw;function h(){r.exports=h=function(){return c},r.exports.__esModule=!0,r.exports.default=r.exports;var c={},f=Object.prototype,v=f.hasOwnProperty,p=e||function(P,O,C){P[O]=C.value},g=typeof t=="function"?t:{},y=g.iterator||"@@iterator",m=g.asyncIterator||"@@asyncIterator",w=g.toStringTag||"@@toStringTag";function b(P,O,C){return e(P,O,{value:C,enumerable:!0,configurable:!0,writable:!0}),P[O]}try{b({},"")}catch{b=function(C,F,W){return C[F]=W}}function _(P,O,C,F){var W=O&&O.prototype instanceof N?O:N,K=i(W.prototype),Ce=new Je(F||[]);return p(K,"_invoke",{value:qt(P,C,Ce)}),K}function S(P,O,C){try{return{type:"normal",arg:P.call(O,C)}}catch(F){return{type:"throw",arg:F}}}c.wrap=_;var I={};function N(){}function R(){}function M(){}var B={};b(B,y,function(){return this});var V=a,J=V&&V(V(ye([])));J&&J!==f&&v.call(J,y)&&(B=J);var ce=M.prototype=N.prototype=i(B);function ot(P){var O;o(O=["next","throw","return"]).call(O,function(C){b(P,C,function(F){return this._invoke(C,F)})})}function Qe(P,O){function C(W,K,Ce,st){var gt=S(P[W],P,K);if(gt.type!=="throw"){var ci=gt.arg,Br=ci.value;return Br&&n(Br)=="object"&&v.call(Br,"__await")?O.resolve(Br.__await).then(function(fi){C("next",fi,Ce,st)},function(fi){C("throw",fi,Ce,st)}):O.resolve(Br).then(function(fi){ci.value=fi,Ce(ci)},function(fi){return C("throw",fi,Ce,st)})}st(gt.arg)}var F;p(this,"_invoke",{value:function(K,Ce){function st(){return new O(function(gt,ci){C(K,Ce,gt,ci)})}return F=F?F.then(st,st):st()}})}function qt(P,O,C){var F="suspendedStart";return function(W,K){if(F==="executing")throw new Error("Generator is already running");if(F==="completed"){if(W==="throw")throw K;return Ie()}for(C.method=W,C.arg=K;;){var Ce=C.delegate;if(Ce){var st=pt(Ce,C);if(st){if(st===I)continue;return st}}if(C.method==="next")C.sent=C._sent=C.arg;else if(C.method==="throw"){if(F==="suspendedStart")throw F="completed",C.arg;C.dispatchException(C.arg)}else C.method==="return"&&C.abrupt("return",C.arg);F="executing";var gt=S(P,O,C);if(gt.type==="normal"){if(F=C.done?"completed":"suspendedYield",gt.arg===I)continue;return{value:gt.arg,done:C.done}}gt.type==="throw"&&(F="completed",C.method="throw",C.arg=gt.arg)}}}function pt(P,O){var C=O.method,F=P.iterator[C];if(F===void 0)return O.delegate=null,C==="throw"&&P.iterator.return&&(O.method="return",O.arg=void 0,pt(P,O),O.method==="throw")||C!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+C+"' method")),I;var W=S(F,P.iterator,O.arg);if(W.type==="throw")return O.method="throw",O.arg=W.arg,O.delegate=null,I;var K=W.arg;return K?K.done?(O[P.resultName]=K.value,O.next=P.nextLoc,O.method!=="return"&&(O.method="next",O.arg=void 0),O.delegate=null,I):K:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,I)}function Pt(P){var O={tryLoc:P[0]};1 in P&&(O.catchLoc=P[1]),2 in P&&(O.finallyLoc=P[2],O.afterLoc=P[3]),this.tryEntries.push(O)}function nr(P){var O=P.completion||{};O.type="normal",delete O.arg,P.completion=O}function Je(P){this.tryEntries=[{tryLoc:"root"}],o(P).call(P,Pt,this),this.reset(!0)}function ye(P){if(P){var O=P[y];if(O)return O.call(P);if(typeof P.next=="function")return P;if(!isNaN(P.length)){var C=-1,F=function W(){for(;++C<P.length;)if(v.call(P,C))return W.value=P[C],W.done=!1,W;return W.value=void 0,W.done=!0,W};return F.next=F}}return{next:Ie}}function Ie(){return{value:void 0,done:!0}}return R.prototype=M,p(ce,"constructor",{value:M,configurable:!0}),p(M,"constructor",{value:R,configurable:!0}),R.displayName=b(M,w,"GeneratorFunction"),c.isGeneratorFunction=function(P){var O=typeof P=="function"&&P.constructor;return!!O&&(O===R||(O.displayName||O.name)==="GeneratorFunction")},c.mark=function(P){return s?s(P,M):(P.__proto__=M,b(P,w,"GeneratorFunction")),P.prototype=i(ce),P},c.awrap=function(P){return{__await:P}},ot(Qe.prototype),b(Qe.prototype,m,function(){return this}),c.AsyncIterator=Qe,c.async=function(P,O,C,F,W){W===void 0&&(W=u);var K=new Qe(_(P,O,C,F),W);return c.isGeneratorFunction(O)?K:K.next().then(function(Ce){return Ce.done?Ce.value:K.next()})},ot(ce),b(ce,w,"Generator"),b(ce,y,function(){return this}),b(ce,"toString",function(){return"[object Generator]"}),c.keys=function(P){var O=Object(P),C=[];for(var F in O)C.push(F);return l(C).call(C),function W(){for(;C.length;){var K=C.pop();if(K in O)return W.value=K,W.done=!1,W}return W.done=!0,W}},c.values=ye,Je.prototype={constructor:Je,reset:function(O){var C;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,o(C=this.tryEntries).call(C,nr),!O)for(var F in this)F.charAt(0)==="t"&&v.call(this,F)&&!isNaN(+d(F).call(F,1))&&(this[F]=void 0)},stop:function(){this.done=!0;var O=this.tryEntries[0].completion;if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var C=this;function F(ci,Br){return Ce.type="throw",Ce.arg=O,C.next=ci,Br&&(C.method="next",C.arg=void 0),!!Br}for(var W=this.tryEntries.length-1;W>=0;--W){var K=this.tryEntries[W],Ce=K.completion;if(K.tryLoc==="root")return F("end");if(K.tryLoc<=this.prev){var st=v.call(K,"catchLoc"),gt=v.call(K,"finallyLoc");if(st&&gt){if(this.prev<K.catchLoc)return F(K.catchLoc,!0);if(this.prev<K.finallyLoc)return F(K.finallyLoc)}else if(st){if(this.prev<K.catchLoc)return F(K.catchLoc,!0)}else{if(!gt)throw new Error("try statement without catch or finally");if(this.prev<K.finallyLoc)return F(K.finallyLoc)}}}},abrupt:function(O,C){for(var F=this.tryEntries.length-1;F>=0;--F){var W=this.tryEntries[F];if(W.tryLoc<=this.prev&&v.call(W,"finallyLoc")&&this.prev<W.finallyLoc){var K=W;break}}K&&(O==="break"||O==="continue")&&K.tryLoc<=C&&C<=K.finallyLoc&&(K=null);var Ce=K?K.completion:{};return Ce.type=O,Ce.arg=C,K?(this.method="next",this.next=K.finallyLoc,I):this.complete(Ce)},complete:function(O,C){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&C&&(this.next=C),I},finish:function(O){for(var C=this.tryEntries.length-1;C>=0;--C){var F=this.tryEntries[C];if(F.finallyLoc===O)return this.complete(F.completion,F.afterLoc),nr(F),I}},catch:function(O){for(var C=this.tryEntries.length-1;C>=0;--C){var F=this.tryEntries[C];if(F.tryLoc===O){var W=F.completion;if(W.type==="throw"){var K=W.arg;nr(F)}return K}}throw new Error("illegal catch attempt")},delegateYield:function(O,C,F){return this.delegate={iterator:ye(O),resultName:C,nextLoc:F},this.method==="next"&&(this.arg=void 0),I}},c}r.exports=h,r.exports.__esModule=!0,r.exports.default=r.exports})(G_);var uW=G_.exports,Hs=uW(),lW=Hs;try{regeneratorRuntime=Hs}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Hs:Function("r","regeneratorRuntime = r")(Hs)}var mt=X(lW),$0={exports:{}},dW=ue,hW=dW(function(){if(typeof ArrayBuffer=="function"){var r=new ArrayBuffer(8);Object.isExtensible(r)&&Object.defineProperty(r,"a",{value:8})}}),cW=ue,fW=it,vW=ni,py=hW,Ws=Object.isExtensible,pW=cW(function(){Ws(1)}),gW=pW||py?function(n){return!fW(n)||py&&vW(n)=="ArrayBuffer"?!1:Ws?Ws(n):!0}:Ws,yW=ue,mW=!yW(function(){return Object.isExtensible(Object.preventExtensions({}))}),bW=Y,$W=ge,wW=uo,_W=it,Vf=Be,EW=Dt.f,gy=lo,SW=pf,Uf=gW,OW=xu,TW=mW,w0=!1,Ar=OW("meta"),kW=0,Gf=function(r){EW(r,Ar,{value:{objectID:"O"+kW++,weakData:{}}})},PW=function(r,n){if(!_W(r))return typeof r=="symbol"?r:(typeof r=="string"?"S":"P")+r;if(!Vf(r,Ar)){if(!Uf(r))return"F";if(!n)return"E";Gf(r)}return r[Ar].objectID},IW=function(r,n){if(!Vf(r,Ar)){if(!Uf(r))return!0;if(!n)return!1;Gf(r)}return r[Ar].weakData},CW=function(r){return TW&&w0&&Uf(r)&&!Vf(r,Ar)&&Gf(r),r},AW=function(){xW.enable=function(){},w0=!0;var r=gy.f,n=$W([].splice),e={};e[Ar]=1,r(e).length&&(gy.f=function(t){for(var i=r(t),a=0,o=i.length;a<o;a++)if(i[a]===Ar){n(i,a,1);break}return i},bW({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:SW.f}))},xW=$0.exports={enable:AW,fastKey:PW,getWeakData:IW,onFreeze:CW};wW[Ar]=!0;var _0=$0.exports,DW=Y,RW=De,MW=_0,NW=ue,FW=Rr,BW=qi,LW=Lf,jW=Ee,zW=it,HW=Gi,WW=Dt.f,VW=ea.forEach,UW=Ve,E0=Zn,GW=E0.set,KW=E0.getterFor,S0=function(r,n,e){var t=r.indexOf("Map")!==-1,i=r.indexOf("Weak")!==-1,a=t?"set":"add",o=RW[r],s=o&&o.prototype,u={},l;if(!UW||!jW(o)||!(i||s.forEach&&!NW(function(){new o().entries().next()})))l=e.getConstructor(n,r,t,a),MW.enable();else{l=n(function(c,f){GW(LW(c,d),{type:r,collection:new o}),f!=null&&BW(f,c[a],{that:c,AS_ENTRIES:t})});var d=l.prototype,h=KW(r);VW(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(c){var f=c=="add"||c=="set";c in s&&!(i&&c=="clear")&&FW(d,c,function(v,p){var g=h(this).collection;if(!f&&i&&!zW(v))return c=="get"?void 0:!1;var y=g[c](v===0?0:v,p);return f?this:y})}),i||WW(d,"size",{configurable:!0,get:function(){return h(this).collection.size}})}return HW(l,r,!1,!0),u[r]=l,DW({global:!0,forced:!0},u),i||e.setStrong(l,r,t),l},qW=Jn,YW=function(r,n,e){for(var t in n)e&&e.unsafe&&r[t]?r[t]=n[t]:qW(r,t,n[t],e);return r},XW=Ui,QW=gf,yy=YW,JW=oi,ZW=Lf,eV=no,tV=qi,rV=Ef,ps=Sf,iV=Q_,ba=Ve,my=_0.fastKey,O0=Zn,by=O0.set,xd=O0.getterFor,T0={getConstructor:function(r,n,e,t){var i=r(function(l,d){ZW(l,a),by(l,{type:n,index:XW(null),first:void 0,last:void 0,size:0}),ba||(l.size=0),eV(d)||tV(d,l[t],{that:l,AS_ENTRIES:e})}),a=i.prototype,o=xd(n),s=function(l,d,h){var c=o(l),f=u(l,d),v,p;return f?f.value=h:(c.last=f={index:p=my(d,!0),key:d,value:h,previous:v=c.last,next:void 0,removed:!1},c.first||(c.first=f),v&&(v.next=f),ba?c.size++:l.size++,p!=="F"&&(c.index[p]=f)),l},u=function(l,d){var h=o(l),c=my(d),f;if(c!=="F")return h.index[c];for(f=h.first;f;f=f.next)if(f.key==d)return f};return yy(a,{clear:function(){for(var d=this,h=o(d),c=h.index,f=h.first;f;)f.removed=!0,f.previous&&(f.previous=f.previous.next=void 0),delete c[f.index],f=f.next;h.first=h.last=void 0,ba?h.size=0:d.size=0},delete:function(l){var d=this,h=o(d),c=u(d,l);if(c){var f=c.next,v=c.previous;delete h.index[c.index],c.removed=!0,v&&(v.next=f),f&&(f.previous=v),h.first==c&&(h.first=f),h.last==c&&(h.last=v),ba?h.size--:d.size--}return!!c},forEach:function(d){for(var h=o(this),c=JW(d,arguments.length>1?arguments[1]:void 0),f;f=f?f.next:h.first;)for(c(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(d){return!!u(this,d)}}),yy(a,e?{get:function(d){var h=u(this,d);return h&&h.value},set:function(d,h){return s(this,d===0?0:d,h)}}:{add:function(d){return s(this,d=d===0?0:d,d)}}),ba&&QW(a,"size",{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(r,n,e){var t=n+" Iterator",i=xd(n),a=xd(t);rV(r,n,function(o,s){by(this,{type:t,target:o,state:i(o),kind:s,last:void 0})},function(){for(var o=a(this),s=o.kind,u=o.last;u&&u.removed;)u=u.previous;return!o.target||!(o.last=u=u?u.next:o.state.first)?(o.target=void 0,ps(void 0,!0)):s=="keys"?ps(u.key,!1):s=="values"?ps(u.value,!1):ps([u.key,u.value],!1)},e?"entries":"values",!e,!0),iV(n)}},nV=S0,aV=T0;nV("Map",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},aV);var oV=me,sV=oV.Map,uV=sV,lV=uV,dV=lV,k0=X(dV),hV=Y,cV=ea.some,fV=Yu,vV=fV("some");hV({target:"Array",proto:!0,forced:!vV},{some:function(n){return cV(this,n,arguments.length>1?arguments[1]:void 0)}});var pV=vt,gV=pV("Array").some,yV=je,mV=gV,Dd=Array.prototype,bV=function(r){var n=r.some;return r===Dd||yV(Dd,r)&&n===Dd.some?mV:n},$V=bV,wV=$V,_V=wV,EV=X(_V),SV=vt,OV=SV("Array").keys,TV=OV,kV=TV,PV=Mr,IV=Be,CV=je,AV=kV,Rd=Array.prototype,xV={DOMTokenList:!0,NodeList:!0},DV=function(r){var n=r.keys;return r===Rd||CV(Rd,r)&&n===Rd.keys||IV(xV,PV(r))?AV:n},RV=DV,ln=X(RV),$y=B1,MV=Math.floor,Ec=function(r,n){var e=r.length,t=MV(e/2);return e<8?NV(r,n):FV(r,Ec($y(r,0,t),n),Ec($y(r,t),n),n)},NV=function(r,n){for(var e=r.length,t=1,i,a;t<e;){for(a=t,i=r[t];a&&n(r[a-1],i)>0;)r[a]=r[--a];a!==t++&&(r[a]=i)}return r},FV=function(r,n,e,t){for(var i=n.length,a=e.length,o=0,s=0;o<i||s<a;)r[o+s]=o<i&&s<a?t(n[o],e[s])<=0?n[o++]:e[s++]:o<i?n[o++]:e[s++];return r},BV=Ec,LV=ai,wy=LV.match(/firefox\/(\d+)/i),jV=!!wy&&+wy[1],zV=ai,HV=/MSIE|Trident/.test(zV),WV=ai,_y=WV.match(/AppleWebKit\/(\d+)\./),VV=!!_y&&+_y[1],UV=Y,P0=ge,GV=Tt,KV=xt,Ey=Wt,qV=e_,Sy=Vi,Kf=ue,YV=BV,XV=Yu,Oy=jV,QV=HV,Ty=Kn,ky=VV,Gr=[],Py=P0(Gr.sort),JV=P0(Gr.push),ZV=Kf(function(){Gr.sort(void 0)}),e6=Kf(function(){Gr.sort(null)}),t6=XV("sort"),I0=!Kf(function(){if(Ty)return Ty<70;if(!(Oy&&Oy>3)){if(QV)return!0;if(ky)return ky<603;var r="",n,e,t,i;for(n=65;n<76;n++){switch(e=String.fromCharCode(n),n){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(i=0;i<47;i++)Gr.push({k:e+i,v:t})}for(Gr.sort(function(a,o){return o.v-a.v}),i=0;i<Gr.length;i++)e=Gr[i].k.charAt(0),r.charAt(r.length-1)!==e&&(r+=e);return r!=="DGBEFHACIJK"}}),r6=ZV||!e6||!t6||!I0,i6=function(r){return function(n,e){return e===void 0?-1:n===void 0?1:r!==void 0?+r(n,e)||0:Sy(n)>Sy(e)?1:-1}};UV({target:"Array",proto:!0,forced:r6},{sort:function(n){n!==void 0&&GV(n);var e=KV(this);if(I0)return n===void 0?Py(e):Py(e,n);var t=[],i=Ey(e),a,o;for(o=0;o<i;o++)o in e&&JV(t,e[o]);for(YV(t,i6(n)),a=Ey(t),o=0;o<a;)e[o]=t[o++];for(;o<i;)qV(e,o++);return e}});var n6=vt,a6=n6("Array").sort,o6=je,s6=a6,Md=Array.prototype,u6=function(r){var n=r.sort;return r===Md||o6(Md,r)&&n===Md.sort?s6:n},l6=u6,d6=l6,h6=d6,Sc=X(h6),c6=vt,f6=c6("Array").values,v6=f6,p6=v6,g6=Mr,y6=Be,m6=je,b6=p6,Nd=Array.prototype,$6={DOMTokenList:!0,NodeList:!0},w6=function(r){var n=r.values;return r===Nd||m6(Nd,r)&&n===Nd.values||y6($6,g6(r))?b6:n},_6=w6,Iy=X(_6),E6=Ew,In=X(E6),S6=vt,O6=S6("Array").entries,T6=O6,k6=T6,P6=Mr,I6=Be,C6=je,A6=k6,Fd=Array.prototype,x6={DOMTokenList:!0,NodeList:!0},D6=function(r){var n=r.entries;return r===Fd||C6(Fd,r)&&n===Fd.entries||I6(x6,P6(r))?A6:n},R6=D6,M6=X(R6);let gs;const N6=new Uint8Array(16);function F6(){if(!gs&&(gs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!gs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gs(N6)}const Ze=[];for(let r=0;r<256;++r)Ze.push((r+256).toString(16).slice(1));function B6(r,n=0){return Ze[r[n+0]]+Ze[r[n+1]]+Ze[r[n+2]]+Ze[r[n+3]]+"-"+Ze[r[n+4]]+Ze[r[n+5]]+"-"+Ze[r[n+6]]+Ze[r[n+7]]+"-"+Ze[r[n+8]]+Ze[r[n+9]]+"-"+Ze[r[n+10]]+Ze[r[n+11]]+Ze[r[n+12]]+Ze[r[n+13]]+Ze[r[n+14]]+Ze[r[n+15]]}const L6=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Cy={randomUUID:L6};function j6(r,n,e){if(Cy.randomUUID&&!n&&!r)return Cy.randomUUID();r=r||{};const t=r.random||(r.rng||F6)();if(t[6]=t[6]&15|64,t[8]=t[8]&63|128,n){e=e||0;for(let i=0;i<16;++i)n[e+i]=t[i];return n}return B6(t)}function Ay(r){return typeof r=="string"||typeof r=="number"}var z6=function(){function r(n){Iu(this,r),Ae(this,"delay",void 0),Ae(this,"max",void 0),Ae(this,"_queue",[]),Ae(this,"_timeout",null),Ae(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(n)}return qu(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,i=0;i<t.length;i++){var a=t[i];a.original?e[a.name]=a.original:delete e[a.name]}this._extended=null}}},{key:"replace",value:function(e,t){var i=this,a=e[t];if(!a)throw new Error("Method "+t+" undefined");e[t]=function(){for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];i.queue({args:s,fn:a,context:this})}}},{key:"queue",value:function(e){typeof e=="function"?this._queue.push({fn:e}):this._queue.push(e),this._flushIfNeeded()}},{key:"_flushIfNeeded",value:function(){var e=this;this._queue.length>this.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=Kj(function(){e.flush()},this.delay))}},{key:"flush",value:function(){var e,t;Di(e=t_(t=this._queue).call(t,0)).call(e,function(i){i.fn.apply(i.context||i.fn,i.args||[])})}}],[{key:"extend",value:function(e,t){var i=new r(t);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=function(){i.flush()};var a=[{name:"flush",original:void 0}];if(t&&t.replace)for(var o=0;o<t.replace.length;o++){var s=t.replace[o];a.push({name:s,original:e[s]}),i.replace(e,s)}return i._extended={object:e,methods:a},i}}]),r}(),H6=function(){function r(){Iu(this,r),Ae(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),Ae(this,"subscribe",r.prototype.on),Ae(this,"unsubscribe",r.prototype.off)}return qu(r,[{key:"_trigger",value:function(e,t,i){var a,o;if(e==="*")throw new Error("Cannot trigger event *");Di(a=Ju(o=[]).call(o,wt(this._subscribers[e]),wt(this._subscribers["*"]))).call(a,function(s){s(e,t,i??null)})}},{key:"on",value:function(e,t){typeof t=="function"&&this._subscribers[e].push(t)}},{key:"off",value:function(e,t){var i;this._subscribers[e]=bn(i=this._subscribers[e]).call(i,function(a){return a!==t})}}]),r}(),W6=S0,V6=T0;W6("Set",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},V6);var U6=me,G6=U6.Set,K6=G6,q6=K6,Y6=q6,Bd=X(Y6),X6=kf,Q6=X6,J6=Q6,Z6=J6,e8=Z6,t8=e8,r8=t8,i8=r8,n8=i8,a8=n8,Ld=X(a8),C0;function or(r,n){var e=typeof Qu<"u"&&yo(r)||r["@@iterator"];if(!e){if(Ct(r)||(e=o8(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
36
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function o8(r,n){var e;if(r){if(typeof r=="string")return xy(r,n);var t=Zu(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Pf(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return xy(r,n)}}function xy(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}C0=In;var Dy=function(){function r(n){Iu(this,r),Ae(this,"_pairs",void 0),this._pairs=n}return qu(r,[{key:C0,value:mt.mark(function n(){var e,t,i,a,o;return mt.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:e=or(this._pairs),u.prev=1,e.s();case 3:if((t=e.n()).done){u.next=9;break}return i=yt(t.value,2),a=i[0],o=i[1],u.next=7,[a,o];case 7:u.next=3;break;case 9:u.next=14;break;case 11:u.prev=11,u.t0=u.catch(1),e.e(u.t0);case 14:return u.prev=14,e.f(),u.finish(14);case 17:case"end":return u.stop()}},n,this,[[1,11,14,17]])})},{key:"entries",value:mt.mark(function n(){var e,t,i,a,o;return mt.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:e=or(this._pairs),u.prev=1,e.s();case 3:if((t=e.n()).done){u.next=9;break}return i=yt(t.value,2),a=i[0],o=i[1],u.next=7,[a,o];case 7:u.next=3;break;case 9:u.next=14;break;case 11:u.prev=11,u.t0=u.catch(1),e.e(u.t0);case 14:return u.prev=14,e.f(),u.finish(14);case 17:case"end":return u.stop()}},n,this,[[1,11,14,17]])})},{key:"keys",value:mt.mark(function n(){var e,t,i,a;return mt.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=or(this._pairs),s.prev=1,e.s();case 3:if((t=e.n()).done){s.next=9;break}return i=yt(t.value,1),a=i[0],s.next=7,a;case 7:s.next=3;break;case 9:s.next=14;break;case 11:s.prev=11,s.t0=s.catch(1),e.e(s.t0);case 14:return s.prev=14,e.f(),s.finish(14);case 17:case"end":return s.stop()}},n,this,[[1,11,14,17]])})},{key:"values",value:mt.mark(function n(){var e,t,i,a;return mt.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=or(this._pairs),s.prev=1,e.s();case 3:if((t=e.n()).done){s.next=9;break}return i=yt(t.value,2),a=i[1],s.next=7,a;case 7:s.next=3;break;case 9:s.next=14;break;case 11:s.prev=11,s.t0=s.catch(1),e.e(s.t0);case 14:return s.prev=14,e.f(),s.finish(14);case 17:case"end":return s.stop()}},n,this,[[1,11,14,17]])})},{key:"toIdArray",value:function(){var e;return Xt(e=wt(this._pairs)).call(e,function(t){return t[0]})}},{key:"toItemArray",value:function(){var e;return Xt(e=wt(this._pairs)).call(e,function(t){return t[1]})}},{key:"toEntryArray",value:function(){return wt(this._pairs)}},{key:"toObjectMap",value:function(){var e=Ej(null),t=or(this._pairs),i;try{for(t.s();!(i=t.n()).done;){var a=yt(i.value,2),o=a[0],s=a[1];e[o]=s}}catch(u){t.e(u)}finally{t.f()}return e}},{key:"toMap",value:function(){return new k0(this._pairs)}},{key:"toIdSet",value:function(){return new Bd(this.toIdArray())}},{key:"toItemSet",value:function(){return new Bd(this.toItemArray())}},{key:"cache",value:function(){return new r(wt(this._pairs))}},{key:"distinct",value:function(e){var t=new Bd,i=or(this._pairs),a;try{for(i.s();!(a=i.n()).done;){var o=yt(a.value,2),s=o[0],u=o[1];t.add(e(u,s))}}catch(l){i.e(l)}finally{i.f()}return t}},{key:"filter",value:function(e){var t=this._pairs;return new r(Ae({},In,mt.mark(function i(){var a,o,s,u,l;return mt.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:a=or(t),h.prev=1,a.s();case 3:if((o=a.n()).done){h.next=10;break}if(s=yt(o.value,2),u=s[0],l=s[1],!e(l,u)){h.next=8;break}return h.next=8,[u,l];case 8:h.next=3;break;case 10:h.next=15;break;case 12:h.prev=12,h.t0=h.catch(1),a.e(h.t0);case 15:return h.prev=15,a.f(),h.finish(15);case 18:case"end":return h.stop()}},i,null,[[1,12,15,18]])})))}},{key:"forEach",value:function(e){var t=or(this._pairs),i;try{for(t.s();!(i=t.n()).done;){var a=yt(i.value,2),o=a[0],s=a[1];e(s,o)}}catch(u){t.e(u)}finally{t.f()}}},{key:"map",value:function(e){var t=this._pairs;return new r(Ae({},In,mt.mark(function i(){var a,o,s,u,l;return mt.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:a=or(t),h.prev=1,a.s();case 3:if((o=a.n()).done){h.next=9;break}return s=yt(o.value,2),u=s[0],l=s[1],h.next=7,[u,e(l,u)];case 7:h.next=3;break;case 9:h.next=14;break;case 11:h.prev=11,h.t0=h.catch(1),a.e(h.t0);case 14:return h.prev=14,a.f(),h.finish(14);case 17:case"end":return h.stop()}},i,null,[[1,11,14,17]])})))}},{key:"max",value:function(e){var t=Ld(this._pairs),i=t.next();if(i.done)return null;for(var a=i.value[1],o=e(i.value[1],i.value[0]);!(i=t.next()).done;){var s=yt(i.value,2),u=s[0],l=s[1],d=e(l,u);d>o&&(o=d,a=l)}return a}},{key:"min",value:function(e){var t=Ld(this._pairs),i=t.next();if(i.done)return null;for(var a=i.value[1],o=e(i.value[1],i.value[0]);!(i=t.next()).done;){var s=yt(i.value,2),u=s[0],l=s[1],d=e(l,u);d<o&&(o=d,a=l)}return a}},{key:"reduce",value:function(e,t){var i=or(this._pairs),a;try{for(i.s();!(a=i.n()).done;){var o=yt(a.value,2),s=o[0],u=o[1];t=e(t,u,s)}}catch(l){i.e(l)}finally{i.f()}return t}},{key:"sort",value:function(e){var t=this;return new r(Ae({},In,function(){var i;return Ld(Sc(i=wt(t._pairs)).call(i,function(a,o){var s=yt(a,2),u=s[0],l=s[1],d=yt(o,2),h=d[0],c=d[1];return e(l,c,u,h)}))}))}}]),r}();function Ry(r,n){var e=Cf(r);if(cg){var t=cg(r);n&&(t=bn(t).call(t,function(i){return Hw(r,i).enumerable})),e.push.apply(e,t)}return e}function My(r){for(var n=1;n<arguments.length;n++){var e,t,i=arguments[n]!=null?arguments[n]:{};n%2?Di(e=Ry(Object(i),!0)).call(e,function(a){Ae(r,a,i[a])}):fg?bF(r,fg(i)):Di(t=Ry(Object(i))).call(t,function(a){wF(r,a,Hw(i,a))})}return r}function jd(r,n){var e=typeof Qu<"u"&&yo(r)||r["@@iterator"];if(!e){if(Ct(r)||(e=s8(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
37
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function s8(r,n){var e;if(r){if(typeof r=="string")return Ny(r,n);var t=Zu(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Pf(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ny(r,n)}}function Ny(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}function u8(r){var n=l8();return function(){var t=du(r),i;if(n){var a=du(this).constructor;i=js(t,arguments,a)}else i=t.apply(this,arguments);return k3(this,i)}}function l8(){if(typeof Reflect>"u"||!js||js.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(js(Boolean,[],function(){})),!0}catch{return!1}}function d8(r,n){return r[n]==null&&(r[n]=j6()),r}var vu=function(r){T3(e,r);var n=u8(e);function e(t,i){var a;return Iu(this,e),a=n.call(this),Ae(pi(a),"flush",void 0),Ae(pi(a),"length",void 0),Ae(pi(a),"_options",void 0),Ae(pi(a),"_data",void 0),Ae(pi(a),"_idProp",void 0),Ae(pi(a),"_queue",null),t&&!Ct(t)&&(i=t,t=[]),a._options=i||{},a._data=new k0,a.length=0,a._idProp=a._options.fieldId||"id",t&&t.length&&a.add(t),a.setOptions(i),a}return qu(e,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(i){i&&i.queue!==void 0&&(i.queue===!1?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=z6.extend(this,{replace:["add","update","remove"]})),i.queue&&tt(i.queue)==="object"&&this._queue.setOptions(i.queue)))}},{key:"add",value:function(i,a){var o=this,s=[],u;if(Ct(i)){var l=Xt(i).call(i,function(c){return c[o._idProp]});if(EV(l).call(l,function(c){return o._data.has(c)}))throw new Error("A duplicate id was found in the parameter array.");for(var d=0,h=i.length;d<h;d++)u=this._addItem(i[d]),s.push(u)}else if(i&&tt(i)==="object")u=this._addItem(i),s.push(u);else throw new Error("Unknown dataType");return s.length&&this._trigger("add",{items:s},a),s}},{key:"update",value:function(i,a){var o=this,s=[],u=[],l=[],d=[],h=this._idProp,c=function(y){var m=y[h];if(m!=null&&o._data.has(m)){var w=y,b=aj({},o._data.get(m)),_=o._updateItem(w);u.push(_),d.push(w),l.push(b)}else{var S=o._addItem(y);s.push(S)}};if(Ct(i))for(var f=0,v=i.length;f<v;f++)i[f]&&tt(i[f])==="object"?c(i[f]):console.warn("Ignoring input item, which is not an object at index "+f);else if(i&&tt(i)==="object")c(i);else throw new Error("Unknown dataType");if(s.length&&this._trigger("add",{items:s},a),u.length){var p={items:u,oldData:l,data:d};this._trigger("update",p,a)}return Ju(s).call(s,u)}},{key:"updateOnly",value:function(i,a){var o,s=this;Ct(i)||(i=[i]);var u=Xt(o=Xt(i).call(i,function(d){var h=s._data.get(d[s._idProp]);if(h==null)throw new Error("Updating non-existent items is not allowed.");return{oldData:h,update:d}})).call(o,function(d){var h=d.oldData,c=d.update,f=h[s._idProp],v=Bz(h,c);return s._data.set(f,v),{id:f,oldData:h,updatedData:v}});if(u.length){var l={items:Xt(u).call(u,function(d){return d.id}),oldData:Xt(u).call(u,function(d){return d.oldData}),data:Xt(u).call(u,function(d){return d.updatedData})};return this._trigger("update",l,a),l.items}else return[]}},{key:"get",value:function(i,a){var o=void 0,s=void 0,u=void 0;Ay(i)?(o=i,u=a):Ct(i)?(s=i,u=a):u=i;var l=u&&u.returnType==="Object"?"Object":"Array",d=u&&bn(u),h=[],c=void 0,f=void 0,v=void 0;if(o!=null)c=this._data.get(o),c&&d&&!d(c)&&(c=void 0);else if(s!=null)for(var p=0,g=s.length;p<g;p++)c=this._data.get(s[p]),c!=null&&(!d||d(c))&&h.push(c);else{var y;f=wt(ln(y=this._data).call(y));for(var m=0,w=f.length;m<w;m++)v=f[m],c=this._data.get(v),c!=null&&(!d||d(c))&&h.push(c)}if(u&&u.order&&o==null&&this._sort(h,u.order),u&&u.fields){var b=u.fields;if(o!=null&&c!=null)c=this._filterFields(c,b);else for(var _=0,S=h.length;_<S;_++)h[_]=this._filterFields(h[_],b)}if(l=="Object"){for(var I={},N=0,R=h.length;N<R;N++){var M=h[N],B=M[this._idProp];I[B]=M}return I}else if(o!=null){var V;return(V=c)!==null&&V!==void 0?V:null}else return h}},{key:"getIds",value:function(i){var a=this._data,o=i&&bn(i),s=i&&i.order,u=wt(ln(a).call(a)),l=[];if(o)if(s){for(var d=[],h=0,c=u.length;h<c;h++){var f=u[h],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++)l.push(d[p][this._idProp])}else for(var y=0,m=u.length;y<m;y++){var w=u[y],b=this._data.get(w);b!=null&&o(b)&&l.push(b[this._idProp])}else if(s){for(var _=[],S=0,I=u.length;S<I;S++){var N=u[S];_.push(a.get(N))}this._sort(_,s);for(var R=0,M=_.length;R<M;R++)l.push(_[R][this._idProp])}else for(var B=0,V=u.length;B<V;B++){var J=u[B],ce=a.get(J);ce!=null&&l.push(ce[this._idProp])}return l}},{key:"getDataSet",value:function(){return this}},{key:"forEach",value:function(i,a){var o=a&&bn(a),s=this._data,u=wt(ln(s).call(s));if(a&&a.order)for(var l=this.get(a),d=0,h=l.length;d<h;d++){var c=l[d],f=c[this._idProp];i(c,f)}else for(var v=0,p=u.length;v<p;v++){var g=u[v],y=this._data.get(g);y!=null&&(!o||o(y))&&i(y,g)}}},{key:"map",value:function(i,a){for(var o=a&&bn(a),s=[],u=this._data,l=wt(ln(u).call(u)),d=0,h=l.length;d<h;d++){var c=l[d],f=this._data.get(c);f!=null&&(!o||o(f))&&s.push(i(f,c))}return a&&a.order&&this._sort(s,a.order),s}},{key:"_filterFields",value:function(i,a){var o;return i&&e2(o=Ct(a)?a:Cf(a)).call(o,function(s,u){return s[u]=i[u],s},{})}},{key:"_sort",value:function(i,a){if(typeof a=="string"){var o=a;Sc(i).call(i,function(s,u){var l=s[o],d=u[o];return l>d?1:l<d?-1:0})}else if(typeof a=="function")Sc(i).call(i,a);else throw new TypeError("Order must be a function or a string")}},{key:"remove",value:function(i,a){for(var o=[],s=[],u=Ct(i)?i:[i],l=0,d=u.length;l<d;l++){var h=this._remove(u[l]);if(h){var c=h[this._idProp];c!=null&&(o.push(c),s.push(h))}}return o.length&&this._trigger("remove",{items:o,oldData:s},a),o}},{key:"_remove",value:function(i){var a;if(Ay(i)?a=i:i&&tt(i)==="object"&&(a=i[this._idProp]),a!=null&&this._data.has(a)){var o=this._data.get(a)||null;return this._data.delete(a),--this.length,o}return null}},{key:"clear",value:function(i){for(var a,o=wt(ln(a=this._data).call(a)),s=[],u=0,l=o.length;u<l;u++)s.push(this._data.get(o[u]));return this._data.clear(),this.length=0,this._trigger("remove",{items:o,oldData:s},i),o}},{key:"max",value:function(i){var a,o=null,s=null,u=jd(Iy(a=this._data).call(a)),l;try{for(u.s();!(l=u.n()).done;){var d=l.value,h=d[i];typeof h=="number"&&(s==null||h>s)&&(o=d,s=h)}}catch(c){u.e(c)}finally{u.f()}return o||null}},{key:"min",value:function(i){var a,o=null,s=null,u=jd(Iy(a=this._data).call(a)),l;try{for(u.s();!(l=u.n()).done;){var d=l.value,h=d[i];typeof h=="number"&&(s==null||h<s)&&(o=d,s=h)}}catch(c){u.e(c)}finally{u.f()}return o||null}},{key:"distinct",value:function(i){for(var a=this._data,o=wt(ln(a).call(a)),s=[],u=0,l=0,d=o.length;l<d;l++){for(var h=o[l],c=a.get(h),f=c[i],v=!1,p=0;p<u;p++)if(s[p]==f){v=!0;break}!v&&f!==void 0&&(s[u]=f,u++)}return s}},{key:"_addItem",value:function(i){var a=d8(i,this._idProp),o=a[this._idProp];if(this._data.has(o))throw new Error("Cannot add item: item with id "+o+" already exists");return this._data.set(o,a),++this.length,o}},{key:"_updateItem",value:function(i){var a=i[this._idProp];if(a==null)throw new Error("Cannot update item: item has no id (item: "+Ij(i)+")");var o=this._data.get(a);if(!o)throw new Error("Cannot update item: no item with id "+a+" found");return this._data.set(a,My(My({},o),i)),a}},{key:"stream",value:function(i){if(i){var a=this._data;return new Dy(Ae({},In,mt.mark(function s(){var u,l,d,h;return mt.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:u=jd(i),f.prev=1,u.s();case 3:if((l=u.n()).done){f.next=11;break}if(d=l.value,h=a.get(d),h==null){f.next=9;break}return f.next=9,[d,h];case 9:f.next=3;break;case 11:f.next=16;break;case 13:f.prev=13,f.t0=f.catch(1),u.e(f.t0);case 16:return f.prev=16,u.f(),f.finish(16);case 19:case"end":return f.stop()}},s,null,[[1,13,16,19]])})))}else{var o;return new Dy(Ae({},In,Cw(o=M6(this._data)).call(o,this._data)))}}}]),e}(H6);function h8(r,n){return tt(n)==="object"&&n!==null&&r===n.idProp&&typeof n.add=="function"&&typeof n.clear=="function"&&typeof n.distinct=="function"&&typeof Di(n)=="function"&&typeof n.get=="function"&&typeof n.getDataSet=="function"&&typeof n.getIds=="function"&&typeof n.length=="number"&&typeof Xt(n)=="function"&&typeof n.max=="function"&&typeof n.min=="function"&&typeof n.off=="function"&&typeof n.on=="function"&&typeof n.remove=="function"&&typeof n.setOptions=="function"&&typeof n.stream=="function"&&typeof n.update=="function"&&typeof n.updateOnly=="function"}function A0(r,n){return tt(n)==="object"&&n!==null&&r===n.idProp&&typeof Di(n)=="function"&&typeof n.get=="function"&&typeof n.getDataSet=="function"&&typeof n.getIds=="function"&&typeof n.length=="number"&&typeof Xt(n)=="function"&&typeof n.off=="function"&&typeof n.on=="function"&&typeof n.stream=="function"&&h8(r,n.getDataSet())}/**
38
+ * vis-network
39
+ * https://visjs.github.io/vis-network/
40
+ *
41
+ * A dynamic, browser-based visualization library.
42
+ *
43
+ * @version 9.1.8
44
+ * @date 2023-10-15T18:19:22.998Z
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 zd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function H(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ys=function(r){return r&&r.Math===Math&&r},Te=ys(typeof globalThis=="object"&&globalThis)||ys(typeof window=="object"&&window)||ys(typeof self=="object"&&self)||ys(typeof zd=="object"&&zd)||function(){return this}()||zd||Function("return this")(),ie=function(r){try{return!!r()}catch{return!0}},c8=ie,Oo=!c8(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),f8=Oo,x0=Function.prototype,Fy=x0.apply,By=x0.call,To=typeof Reflect=="object"&&Reflect.apply||(f8?By.bind(Fy):function(){return By.apply(Fy,arguments)}),D0=Oo,R0=Function.prototype,Oc=R0.call,v8=D0&&R0.bind.bind(Oc,Oc),ae=D0?v8:function(r){return function(){return Oc.apply(r,arguments)}},M0=ae,p8=M0({}.toString),g8=M0("".slice),Fr=function(r){return g8(p8(r),8,-1)},y8=Fr,m8=ae,qf=function(r){if(y8(r)==="Function")return m8(r)},Tc=typeof document=="object"&&document.all,b8=typeof Tc>"u"&&Tc!==void 0,N0={all:Tc,IS_HTMLDDA:b8},F0=N0,$8=F0.all,Ge=F0.IS_HTMLDDA?function(r){return typeof r=="function"||r===$8}:function(r){return typeof r=="function"},aa={},w8=ie,Ke=!w8(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),_8=Oo,ms=Function.prototype.call,Mt=_8?ms.bind(ms):function(){return ms.apply(ms,arguments)},nl={},B0={}.propertyIsEnumerable,L0=Object.getOwnPropertyDescriptor,E8=L0&&!B0.call({1:2},1);nl.f=E8?function(n){var e=L0(this,n);return!!e&&e.enumerable}:B0;var ko=function(r,n){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:n}},S8=ae,O8=ie,T8=Fr,Hd=Object,k8=S8("".split),al=O8(function(){return!Hd("z").propertyIsEnumerable(0)})?function(r){return T8(r)==="String"?k8(r,""):Hd(r)}:Hd,oa=function(r){return r==null},P8=oa,I8=TypeError,Po=function(r){if(P8(r))throw new I8("Can't call method on "+r);return r},C8=al,A8=Po,mr=function(r){return C8(A8(r))},Ly=Ge,j0=N0,x8=j0.all,qe=j0.IS_HTMLDDA?function(r){return typeof r=="object"?r!==null:Ly(r)||r===x8}:function(r){return typeof r=="object"?r!==null:Ly(r)},ne={},Wd=ne,Vd=Te,D8=Ge,jy=function(r){return D8(r)?r:void 0},Ut=function(r,n){return arguments.length<2?jy(Wd[r])||jy(Vd[r]):Wd[r]&&Wd[r][n]||Vd[r]&&Vd[r][n]},R8=ae,Re=R8({}.isPrototypeOf),Io=typeof navigator<"u"&&String(navigator.userAgent)||"",z0=Te,Ud=Io,zy=z0.process,Hy=z0.Deno,Wy=zy&&zy.versions||Hy&&Hy.version,Vy=Wy&&Wy.v8,Qt,pu;Vy&&(Qt=Vy.split("."),pu=Qt[0]>0&&Qt[0]<4?1:+(Qt[0]+Qt[1]));!pu&&Ud&&(Qt=Ud.match(/Edge\/(\d+)/),(!Qt||Qt[1]>=74)&&(Qt=Ud.match(/Chrome\/(\d+)/),Qt&&(pu=+Qt[1])));var Co=pu,Uy=Co,M8=ie,N8=Te,F8=N8.String,sa=!!Object.getOwnPropertySymbols&&!M8(function(){var r=Symbol("symbol detection");return!F8(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&Uy&&Uy<41}),B8=sa,H0=B8&&!Symbol.sham&&typeof Symbol.iterator=="symbol",L8=Ut,j8=Ge,z8=Re,H8=H0,W8=Object,Ao=H8?function(r){return typeof r=="symbol"}:function(r){var n=L8("Symbol");return j8(n)&&z8(n.prototype,W8(r))},V8=String,ua=function(r){try{return V8(r)}catch{return"Object"}},U8=Ge,G8=ua,K8=TypeError,Yi=function(r){if(U8(r))return r;throw new K8(G8(r)+" is not a function")},q8=Yi,Y8=oa,Yf=function(r,n){var e=r[n];return Y8(e)?void 0:q8(e)},Gd=Mt,Kd=Ge,qd=qe,X8=TypeError,Q8=function(r,n){var e,t;if(n==="string"&&Kd(e=r.toString)&&!qd(t=Gd(e,r))||Kd(e=r.valueOf)&&!qd(t=Gd(e,r))||n!=="string"&&Kd(e=r.toString)&&!qd(t=Gd(e,r)))return t;throw new X8("Can't convert object to primitive value")},W0={exports:{}},Gy=Te,J8=Object.defineProperty,Z8=function(r,n){try{J8(Gy,r,{value:n,configurable:!0,writable:!0})}catch{Gy[r]=n}return n},eU=Te,tU=Z8,Ky="__core-js_shared__",rU=eU[Ky]||tU(Ky,{}),Xf=rU,qy=Xf;(W0.exports=function(r,n){return qy[r]||(qy[r]=n!==void 0?n:{})})("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 la=W0.exports,iU=Po,nU=Object,kt=function(r){return nU(iU(r))},aU=ae,oU=kt,sU=aU({}.hasOwnProperty),Ye=Object.hasOwn||function(n,e){return sU(oU(n),e)},uU=ae,lU=0,dU=Math.random(),hU=uU(1 .toString),ol=function(r){return"Symbol("+(r===void 0?"":r)+")_"+hU(++lU+dU,36)},cU=Te,fU=la,Yy=Ye,vU=ol,pU=sa,gU=H0,Sn=cU.Symbol,Yd=fU("wks"),yU=gU?Sn.for||Sn:Sn&&Sn.withoutSetter||vU,ke=function(r){return Yy(Yd,r)||(Yd[r]=pU&&Yy(Sn,r)?Sn[r]:yU("Symbol."+r)),Yd[r]},mU=Mt,Xy=qe,Qy=Ao,bU=Yf,$U=Q8,wU=ke,_U=TypeError,EU=wU("toPrimitive"),SU=function(r,n){if(!Xy(r)||Qy(r))return r;var e=bU(r,EU),t;if(e){if(n===void 0&&(n="default"),t=mU(e,r,n),!Xy(t)||Qy(t))return t;throw new _U("Can't convert object to primitive value")}return n===void 0&&(n="number"),$U(r,n)},OU=SU,TU=Ao,sl=function(r){var n=OU(r,"string");return TU(n)?n:n+""},kU=Te,Jy=qe,kc=kU.document,PU=Jy(kc)&&Jy(kc.createElement),V0=function(r){return PU?kc.createElement(r):{}},IU=Ke,CU=ie,AU=V0,U0=!IU&&!CU(function(){return Object.defineProperty(AU("div"),"a",{get:function(){return 7}}).a!==7}),xU=Ke,DU=Mt,RU=nl,MU=ko,NU=mr,FU=sl,BU=Ye,LU=U0,Zy=Object.getOwnPropertyDescriptor;aa.f=xU?Zy:function(n,e){if(n=NU(n),e=FU(e),LU)try{return Zy(n,e)}catch{}if(BU(n,e))return MU(!DU(RU.f,n,e),n[e])};var jU=ie,zU=Ge,HU=/#|\.prototype\./,xo=function(r,n){var e=VU[WU(r)];return e===GU?!0:e===UU?!1:zU(n)?jU(n):!!n},WU=xo.normalize=function(r){return String(r).replace(HU,".").toLowerCase()},VU=xo.data={},UU=xo.NATIVE="N",GU=xo.POLYFILL="P",KU=xo,em=qf,qU=Yi,YU=Oo,XU=em(em.bind),Do=function(r,n){return qU(r),n===void 0?r:YU?XU(r,n):function(){return r.apply(n,arguments)}},Nt={},QU=Ke,JU=ie,G0=QU&&JU(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),ZU=qe,eG=String,tG=TypeError,Ft=function(r){if(ZU(r))return r;throw new tG(eG(r)+" is not an object")},rG=Ke,iG=U0,nG=G0,bs=Ft,tm=sl,aG=TypeError,Xd=Object.defineProperty,oG=Object.getOwnPropertyDescriptor,Qd="enumerable",Jd="configurable",Zd="writable";Nt.f=rG?nG?function(n,e,t){if(bs(n),e=tm(e),bs(t),typeof n=="function"&&e==="prototype"&&"value"in t&&Zd in t&&!t[Zd]){var i=oG(n,e);i&&i[Zd]&&(n[e]=t.value,t={configurable:Jd in t?t[Jd]:i[Jd],enumerable:Qd in t?t[Qd]:i[Qd],writable:!1})}return Xd(n,e,t)}:Xd:function(n,e,t){if(bs(n),e=tm(e),bs(t),iG)try{return Xd(n,e,t)}catch{}if("get"in t||"set"in t)throw new aG("Accessors not supported");return"value"in t&&(n[e]=t.value),n};var sG=Ke,uG=Nt,lG=ko,da=sG?function(r,n,e){return uG.f(r,n,lG(1,e))}:function(r,n,e){return r[n]=e,r},$s=Te,dG=To,hG=qf,cG=Ge,fG=aa.f,vG=KU,dn=ne,pG=Do,hn=da,rm=Ye,gG=function(r){var n=function(e,t,i){if(this instanceof n){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,i)}return dG(r,this,arguments)};return n.prototype=r.prototype,n},G=function(r,n){var e=r.target,t=r.global,i=r.stat,a=r.proto,o=t?$s:i?$s[e]:($s[e]||{}).prototype,s=t?dn:dn[e]||hn(dn,e,{})[e],u=s.prototype,l,d,h,c,f,v,p,g,y;for(c in n)l=vG(t?c:e+(i?".":"#")+c,r.forced),d=!l&&o&&rm(o,c),v=s[c],d&&(r.dontCallGetSet?(y=fG(o,c),p=y&&y.value):p=o[c]),f=d&&p?p:n[c],!(d&&typeof v==typeof f)&&(r.bind&&d?g=pG(f,$s):r.wrap&&d?g=gG(f):a&&cG(f)?g=hG(f):g=f,(r.sham||f&&f.sham||v&&v.sham)&&hn(g,"sham",!0),hn(s,c,g),a&&(h=e+"Prototype",rm(dn,h)||hn(dn,h,{}),hn(dn[h],c,f),r.real&&u&&(l||!u[c])&&hn(u,c,f)))},yG=Math.ceil,mG=Math.floor,bG=Math.trunc||function(n){var e=+n;return(e>0?mG:yG)(e)},$G=bG,ul=function(r){var n=+r;return n!==n||n===0?0:$G(n)},wG=ul,_G=Math.max,EG=Math.min,Ro=function(r,n){var e=wG(r);return e<0?_G(e+n,0):EG(e,n)},SG=ul,OG=Math.min,TG=function(r){return r>0?OG(SG(r),9007199254740991):0},kG=TG,Gt=function(r){return kG(r.length)},PG=mr,IG=Ro,CG=Gt,im=function(r){return function(n,e,t){var i=PG(n),a=CG(i),o=IG(t,a),s;if(r&&e!==e){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((r||o in i)&&i[o]===e)return r||o||0;return!r&&-1}},Qf={includes:im(!0),indexOf:im(!1)},Mo={},AG=ae,eh=Ye,xG=mr,DG=Qf.indexOf,RG=Mo,nm=AG([].push),K0=function(r,n){var e=xG(r),t=0,i=[],a;for(a in e)!eh(RG,a)&&eh(e,a)&&nm(i,a);for(;n.length>t;)eh(e,a=n[t++])&&(~DG(i,a)||nm(i,a));return i},Jf=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],MG=K0,NG=Jf,ll=Object.keys||function(n){return MG(n,NG)},No={};No.f=Object.getOwnPropertySymbols;var am=Ke,FG=ae,BG=Mt,LG=ie,th=ll,jG=No,zG=nl,HG=kt,WG=al,cn=Object.assign,om=Object.defineProperty,VG=FG([].concat),UG=!cn||LG(function(){if(am&&cn({b:1},cn(om({},"a",{enumerable:!0,get:function(){om(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var r={},n={},e=Symbol("assign detection"),t="abcdefghijklmnopqrst";return r[e]=7,t.split("").forEach(function(i){n[i]=i}),cn({},r)[e]!==7||th(cn({},n)).join("")!==t})?function(n,e){for(var t=HG(n),i=arguments.length,a=1,o=jG.f,s=zG.f;i>a;)for(var u=WG(arguments[a++]),l=o?VG(th(u),o(u)):th(u),d=l.length,h=0,c;d>h;)c=l[h++],(!am||BG(s,u,c))&&(t[c]=u[c]);return t}:cn,GG=G,sm=UG;GG({target:"Object",stat:!0,arity:2,forced:Object.assign!==sm},{assign:sm});var KG=ne,qG=KG.Object.assign,YG=qG,XG=YG,QG=XG,Ne=H(QG),JG=ae,dl=JG([].slice),q0=ae,ZG=Yi,e9=qe,t9=Ye,um=dl,r9=Oo,Y0=Function,i9=q0([].concat),n9=q0([].join),rh={},a9=function(r,n,e){if(!t9(rh,n)){for(var t=[],i=0;i<n;i++)t[i]="a["+i+"]";rh[n]=Y0("C,a","return new C("+n9(t,",")+")")}return rh[n](r,e)},X0=r9?Y0.bind:function(n){var e=ZG(this),t=e.prototype,i=um(arguments,1),a=function(){var s=i9(i,um(arguments));return this instanceof a?a9(e,s.length,s):e.apply(n,s)};return e9(t)&&(a.prototype=t),a},o9=G,lm=X0;o9({target:"Function",proto:!0,forced:Function.bind!==lm},{bind:lm});var s9=ne,Xe=function(r){return s9[r+"Prototype"]},u9=Xe,l9=u9("Function").bind,d9=Re,h9=l9,ih=Function.prototype,c9=function(r){var n=r.bind;return r===ih||d9(ih,r)&&n===ih.bind?h9:n},f9=c9,Q0=f9,v9=Q0,k=H(v9);function Zf(r,n,e,t){r.beginPath(),r.arc(n,e,t,0,2*Math.PI,!1),r.closePath()}function p9(r,n,e,t){r.beginPath(),r.rect(n-t,e-t,t*2,t*2),r.closePath()}function g9(r,n,e,t){r.beginPath(),t*=1.15,e+=.275*t;var i=t*2,a=i/2,o=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-a*a);r.moveTo(n,e-(s-o)),r.lineTo(n+a,e+o),r.lineTo(n-a,e+o),r.lineTo(n,e-(s-o)),r.closePath()}function y9(r,n,e,t){r.beginPath(),t*=1.15,e-=.275*t;var i=t*2,a=i/2,o=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-a*a);r.moveTo(n,e+(s-o)),r.lineTo(n+a,e-o),r.lineTo(n-a,e-o),r.lineTo(n,e+(s-o)),r.closePath()}function m9(r,n,e,t){r.beginPath(),t*=.82,e+=.1*t;for(var i=0;i<10;i++){var a=i%2===0?t*1.3:t*.5;r.lineTo(n+a*Math.sin(i*2*Math.PI/10),e-a*Math.cos(i*2*Math.PI/10))}r.closePath()}function b9(r,n,e,t){r.beginPath(),r.lineTo(n,e+t),r.lineTo(n+t,e),r.lineTo(n,e-t),r.lineTo(n-t,e),r.closePath()}function J0(r,n,e,t,i,a){var o=Math.PI/180;t-2*a<0&&(a=t/2),i-2*a<0&&(a=i/2),r.beginPath(),r.moveTo(n+a,e),r.lineTo(n+t-a,e),r.arc(n+t-a,e+a,a,o*270,o*360,!1),r.lineTo(n+t,e+i-a),r.arc(n+t-a,e+i-a,a,0,o*90,!1),r.lineTo(n+a,e+i),r.arc(n+a,e+i-a,a,o*90,o*180,!1),r.lineTo(n,e+a),r.arc(n+a,e+a,a,o*180,o*270,!1),r.closePath()}function Pc(r,n,e,t,i){var a=.5522848,o=t/2*a,s=i/2*a,u=n+t,l=e+i,d=n+t/2,h=e+i/2;r.beginPath(),r.moveTo(n,h),r.bezierCurveTo(n,h-s,d-o,e,d,e),r.bezierCurveTo(d+o,e,u,h-s,u,h),r.bezierCurveTo(u,h+s,d+o,l,d,l),r.bezierCurveTo(d-o,l,n,h+s,n,h),r.closePath()}function Z0(r,n,e,t,i){var a=.3333333333333333,o=t,s=i*a,u=.5522848,l=o/2*u,d=s/2*u,h=n+o,c=e+s,f=n+o/2,v=e+s/2,p=e+(i-s/2),g=e+i;r.beginPath(),r.moveTo(h,v),r.bezierCurveTo(h,v+d,f+l,c,f,c),r.bezierCurveTo(f-l,c,n,v+d,n,v),r.bezierCurveTo(n,v-d,f-l,e,f,e),r.bezierCurveTo(f+l,e,h,v-d,h,v),r.lineTo(h,p),r.bezierCurveTo(h,p+d,f+l,g,f,g),r.bezierCurveTo(f-l,g,n,p+d,n,p),r.lineTo(n,v)}function eE(r,n,e,t,i,a){r.beginPath(),r.moveTo(n,e);for(var o=a.length,s=t-n,u=i-e,l=u/s,d=Math.sqrt(s*s+u*u),h=0,c=!0,f=0,v=+a[0];d>=.1;)v=+a[h++%o],v>d&&(v=d),f=Math.sqrt(v*v/(1+l*l)),f=s<0?-f:f,n+=f,e+=l*f,c===!0?r.lineTo(n,e):r.moveTo(n,e),d-=v,c=!c}function $9(r,n,e,t){r.beginPath();var i=6,a=Math.PI*2/i;r.moveTo(n+t,e);for(var o=1;o<i;o++)r.lineTo(n+t*Math.cos(a*o),e+t*Math.sin(a*o));r.closePath()}var dm={circle:Zf,dashedLine:eE,database:Z0,diamond:b9,ellipse:Pc,ellipse_vis:Pc,hexagon:$9,roundRect:J0,square:p9,star:m9,triangle:g9,triangleDown:y9};function w9(r){return Object.prototype.hasOwnProperty.call(dm,r)?dm[r]:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];CanvasRenderingContext2D.prototype[r].call(n,t)}}var tE={exports:{}};(function(r){r.exports=n;function n(t){if(t)return e(t)}function e(t){for(var i in n.prototype)t[i]=n.prototype[i];return t}n.prototype.on=n.prototype.addEventListener=function(t,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(i),this},n.prototype.once=function(t,i){function a(){this.off(t,a),i.apply(this,arguments)}return a.fn=i,this.on(t,a),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,i){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===i||o.fn===i){a.splice(s,1);break}return a.length===0&&delete this._callbacks["$"+t],this},n.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),a=this._callbacks["$"+t],o=1;o<arguments.length;o++)i[o-1]=arguments[o];if(a){a=a.slice(0);for(var o=0,s=a.length;o<s;++o)a[o].apply(this,i)}return this},n.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},n.prototype.hasListeners=function(t){return!!this.listeners(t).length}})(tE);var _9=tE.exports,rE=H(_9),E9=ke,S9=E9("toStringTag"),iE={};iE[S9]="z";var ev=String(iE)==="[object z]",O9=ev,T9=Ge,Vs=Fr,k9=ke,P9=k9("toStringTag"),I9=Object,C9=Vs(function(){return arguments}())==="Arguments",A9=function(r,n){try{return r[n]}catch{}},Xi=O9?Vs:function(r){var n,e,t;return r===void 0?"Undefined":r===null?"Null":typeof(e=A9(n=I9(r),P9))=="string"?e:C9?Vs(n):(t=Vs(n))==="Object"&&T9(n.callee)?"Arguments":t},x9=Xi,D9=String,br=function(r){if(x9(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return D9(r)},tv=ae,R9=ul,M9=br,N9=Po,F9=tv("".charAt),hm=tv("".charCodeAt),B9=tv("".slice),cm=function(r){return function(n,e){var t=M9(N9(n)),i=R9(e),a=t.length,o,s;return i<0||i>=a?r?"":void 0:(o=hm(t,i),o<55296||o>56319||i+1===a||(s=hm(t,i+1))<56320||s>57343?r?F9(t,i):o:r?B9(t,i,i+2):(o-55296<<10)+(s-56320)+65536)}},L9={codeAt:cm(!1),charAt:cm(!0)},j9=Te,z9=Ge,fm=j9.WeakMap,nE=z9(fm)&&/native code/.test(String(fm)),H9=la,W9=ol,vm=H9("keys"),hl=function(r){return vm[r]||(vm[r]=W9(r))},V9=nE,aE=Te,U9=qe,G9=da,nh=Ye,ah=Xf,K9=hl,q9=Mo,pm="Object already initialized",Ic=aE.TypeError,Y9=aE.WeakMap,gu,Ya,yu,X9=function(r){return yu(r)?Ya(r):gu(r,{})},Q9=function(r){return function(n){var e;if(!U9(n)||(e=Ya(n)).type!==r)throw new Ic("Incompatible receiver, "+r+" required");return e}};if(V9||ah.state){var sr=ah.state||(ah.state=new Y9);sr.get=sr.get,sr.has=sr.has,sr.set=sr.set,gu=function(r,n){if(sr.has(r))throw new Ic(pm);return n.facade=r,sr.set(r,n),n},Ya=function(r){return sr.get(r)||{}},yu=function(r){return sr.has(r)}}else{var fn=K9("state");q9[fn]=!0,gu=function(r,n){if(nh(r,fn))throw new Ic(pm);return n.facade=r,G9(r,fn,n),n},Ya=function(r){return nh(r,fn)?r[fn]:{}},yu=function(r){return nh(r,fn)}}var Qi={set:gu,get:Ya,has:yu,enforce:X9,getterFor:Q9},Cc=Ke,J9=Ye,oE=Function.prototype,Z9=Cc&&Object.getOwnPropertyDescriptor,rv=J9(oE,"name"),e7=rv&&function(){}.name==="something",t7=rv&&(!Cc||Cc&&Z9(oE,"name").configurable),r7={EXISTS:rv,PROPER:e7,CONFIGURABLE:t7},cl={},i7=Ke,n7=G0,a7=Nt,o7=Ft,s7=mr,u7=ll;cl.f=i7&&!n7?Object.defineProperties:function(n,e){o7(n);for(var t=s7(e),i=u7(e),a=i.length,o=0,s;a>o;)a7.f(n,s=i[o++],t[s]);return n};var l7=Ut,d7=l7("document","documentElement"),h7=Ft,c7=cl,gm=Jf,f7=Mo,v7=d7,p7=V0,g7=hl,ym=">",mm="<",Ac="prototype",xc="script",sE=g7("IE_PROTO"),oh=function(){},uE=function(r){return mm+xc+ym+r+mm+"/"+xc+ym},bm=function(r){r.write(uE("")),r.close();var n=r.parentWindow.Object;return r=null,n},y7=function(){var r=p7("iframe"),n="java"+xc+":",e;return r.style.display="none",v7.appendChild(r),r.src=String(n),e=r.contentWindow.document,e.open(),e.write(uE("document.F=Object")),e.close(),e.F},ws,Us=function(){try{ws=new ActiveXObject("htmlfile")}catch{}Us=typeof document<"u"?document.domain&&ws?bm(ws):y7():bm(ws);for(var r=gm.length;r--;)delete Us[Ac][gm[r]];return Us()};f7[sE]=!0;var ha=Object.create||function(n,e){var t;return n!==null?(oh[Ac]=h7(n),t=new oh,oh[Ac]=null,t[sE]=n):t=Us(),e===void 0?t:c7.f(t,e)},m7=ie,lE=!m7(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),b7=Ye,$7=Ge,w7=kt,_7=hl,E7=lE,$m=_7("IE_PROTO"),Dc=Object,S7=Dc.prototype,fl=E7?Dc.getPrototypeOf:function(r){var n=w7(r);if(b7(n,$m))return n[$m];var e=n.constructor;return $7(e)&&n instanceof e?e.prototype:n instanceof Dc?S7:null},O7=da,Fo=function(r,n,e,t){return t&&t.enumerable?r[n]=e:O7(r,n,e),r},T7=ie,k7=Ge,P7=qe,I7=ha,wm=fl,C7=Fo,A7=ke,Rc=A7("iterator"),dE=!1,Or,sh,uh;[].keys&&(uh=[].keys(),"next"in uh?(sh=wm(wm(uh)),sh!==Object.prototype&&(Or=sh)):dE=!0);var x7=!P7(Or)||T7(function(){var r={};return Or[Rc].call(r)!==r});x7?Or={}:Or=I7(Or);k7(Or[Rc])||C7(Or,Rc,function(){return this});var hE={IteratorPrototype:Or,BUGGY_SAFARI_ITERATORS:dE},D7=ev,R7=Xi,M7=D7?{}.toString:function(){return"[object "+R7(this)+"]"},N7=ev,F7=Nt.f,B7=da,L7=Ye,j7=M7,z7=ke,_m=z7("toStringTag"),ca=function(r,n,e,t){if(r){var i=e?r:r.prototype;L7(i,_m)||F7(i,_m,{configurable:!0,value:n}),t&&!N7&&B7(i,"toString",j7)}},fa={},H7=hE.IteratorPrototype,W7=ha,V7=ko,U7=ca,G7=fa,K7=function(){return this},q7=function(r,n,e,t){var i=n+" Iterator";return r.prototype=W7(H7,{next:V7(+!t,e)}),U7(r,i,!1,!0),G7[i]=K7,r},Y7=ae,X7=Yi,Q7=function(r,n,e){try{return Y7(X7(Object.getOwnPropertyDescriptor(r,n)[e]))}catch{}},J7=Ge,Z7=String,eK=TypeError,tK=function(r){if(typeof r=="object"||J7(r))return r;throw new eK("Can't set "+Z7(r)+" as a prototype")},rK=Q7,iK=Ft,nK=tK,aK=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,n={},e;try{e=rK(Object.prototype,"__proto__","set"),e(n,[]),r=n instanceof Array}catch{}return function(i,a){return iK(i),nK(a),r?e(i,a):i.__proto__=a,i}}():void 0),oK=G,sK=Mt,uK=r7,lK=q7,dK=fl,hK=ca,Em=Fo,cK=ke,Sm=fa,fK=hE,vK=uK.PROPER,_s=fK.BUGGY_SAFARI_ITERATORS,lh=cK("iterator"),Om="keys",Es="values",Tm="entries",pK=function(){return this},iv=function(r,n,e,t,i,a,o){lK(e,n,t);var s=function(y){if(y===i&&c)return c;if(!_s&&y&&y in d)return d[y];switch(y){case Om:return function(){return new e(this,y)};case Es:return function(){return new e(this,y)};case Tm:return function(){return new e(this,y)}}return function(){return new e(this)}},u=n+" Iterator",l=!1,d=r.prototype,h=d[lh]||d["@@iterator"]||i&&d[i],c=!_s&&h||s(i),f=n==="Array"&&d.entries||h,v,p,g;if(f&&(v=dK(f.call(new r)),v!==Object.prototype&&v.next&&(hK(v,u,!0,!0),Sm[u]=pK)),vK&&i===Es&&h&&h.name!==Es&&(l=!0,c=function(){return sK(h,this)}),i)if(p={values:s(Es),keys:a?c:s(Om),entries:s(Tm)},o)for(g in p)(_s||l||!(g in d))&&Em(d,g,p[g]);else oK({target:n,proto:!0,forced:_s||l},p);return o&&d[lh]!==c&&Em(d,lh,c,{name:i}),Sm[n]=c,p},nv=function(r,n){return{value:r,done:n}},gK=L9.charAt,yK=br,cE=Qi,mK=iv,km=nv,fE="String Iterator",bK=cE.set,$K=cE.getterFor(fE);mK(String,"String",function(r){bK(this,{type:fE,string:yK(r),index:0})},function(){var n=$K(this),e=n.string,t=n.index,i;return t>=e.length?km(void 0,!0):(i=gK(e,t),n.index+=i.length,km(i,!1))});var wK=Mt,Pm=Ft,_K=Yf,vE=function(r,n,e){var t,i;Pm(r);try{if(t=_K(r,"return"),!t){if(n==="throw")throw e;return e}t=wK(t,r)}catch(a){i=!0,t=a}if(n==="throw")throw e;if(i)throw t;return Pm(t),e},EK=Ft,SK=vE,OK=function(r,n,e,t){try{return t?n(EK(e)[0],e[1]):n(e)}catch(i){SK(r,"throw",i)}},TK=ke,kK=fa,PK=TK("iterator"),IK=Array.prototype,pE=function(r){return r!==void 0&&(kK.Array===r||IK[PK]===r)},CK=ae,AK=Ge,Mc=Xf,xK=CK(Function.toString);AK(Mc.inspectSource)||(Mc.inspectSource=function(r){return xK(r)});var DK=Mc.inspectSource,RK=ae,MK=ie,gE=Ge,NK=Xi,FK=Ut,BK=DK,yE=function(){},LK=[],mE=FK("Reflect","construct"),av=/^\s*(?:class|function)\b/,jK=RK(av.exec),zK=!av.test(yE),$a=function(n){if(!gE(n))return!1;try{return mE(yE,LK,n),!0}catch{return!1}},bE=function(n){if(!gE(n))return!1;switch(NK(n)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return zK||!!jK(av,BK(n))}catch{return!0}};bE.sham=!0;var vl=!mE||MK(function(){var r;return $a($a.call)||!$a(Object)||!$a(function(){r=!0})||r})?bE:$a,HK=sl,WK=Nt,VK=ko,va=function(r,n,e){var t=HK(n);t in r?WK.f(r,t,VK(0,e)):r[t]=e},UK=Xi,Im=Yf,GK=oa,KK=fa,qK=ke,YK=qK("iterator"),pl=function(r){if(!GK(r))return Im(r,YK)||Im(r,"@@iterator")||KK[UK(r)]},XK=Mt,QK=Yi,JK=Ft,ZK=ua,eq=pl,tq=TypeError,$E=function(r,n){var e=arguments.length<2?eq(r):n;if(QK(e))return JK(XK(e,r));throw new tq(ZK(r)+" is not iterable")},rq=Do,iq=Mt,nq=kt,aq=OK,oq=pE,sq=vl,uq=Gt,Cm=va,lq=$E,dq=pl,Am=Array,hq=function(n){var e=nq(n),t=sq(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=rq(a,i>2?arguments[2]:void 0));var s=dq(e),u=0,l,d,h,c,f,v;if(s&&!(this===Am&&oq(s)))for(c=lq(e,s),f=c.next,d=t?new this:[];!(h=iq(f,c)).done;u++)v=o?aq(c,a,[h.value,u],!0):h.value,Cm(d,u,v);else for(l=uq(e),d=t?new this(l):Am(l);l>u;u++)v=o?a(e[u],u):e[u],Cm(d,u,v);return d.length=u,d},cq=ke,wE=cq("iterator"),_E=!1;try{var fq=0,xm={next:function(){return{done:!!fq++}},return:function(){_E=!0}};xm[wE]=function(){return this},Array.from(xm,function(){throw 2})}catch{}var vq=function(r,n){try{if(!n&&!_E)return!1}catch{return!1}var e=!1;try{var t={};t[wE]=function(){return{next:function(){return{done:e=!0}}}},r(t)}catch{}return e},pq=G,gq=hq,yq=vq,mq=!yq(function(r){Array.from(r)});pq({target:"Array",stat:!0,forced:mq},{from:gq});var bq=ne,$q=bq.Array.from,wq=$q,EE=wq,_q=EE,Ji=H(_q),Eq=mr,Dm=fa,SE=Qi;Nt.f;var Sq=iv,Ss=nv,OE="Array Iterator",Oq=SE.set,Tq=SE.getterFor(OE);Sq(Array,"Array",function(r,n){Oq(this,{type:OE,target:Eq(r),index:0,kind:n})},function(){var r=Tq(this),n=r.target,e=r.kind,t=r.index++;if(!n||t>=n.length)return r.target=void 0,Ss(void 0,!0);switch(e){case"keys":return Ss(t,!1);case"values":return Ss(n[t],!1)}return Ss([t,n[t]],!1)},"values");Dm.Arguments=Dm.Array;var kq=pl,Pq=kq,Iq={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},Cq=Iq,Aq=Te,xq=Xi,Dq=da,Rm=fa,Rq=ke,Mm=Rq("toStringTag");for(var dh in Cq){var Nm=Aq[dh],hh=Nm&&Nm.prototype;hh&&xq(hh)!==Mm&&Dq(hh,Mm,dh),Rm[dh]=Rm.Array}var Mq=Pq,Nq=Mq,Fq=Nq,Bq=Fq,Lq=Bq,jq=Lq,TE=jq,kE=H(TE),zq=TE,Zi=H(zq);function x(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}var PE={exports:{}},Hq=G,Wq=Ke,Fm=Nt.f;Hq({target:"Object",stat:!0,forced:Object.defineProperty!==Fm,sham:!Wq},{defineProperty:Fm});var Vq=ne,IE=Vq.Object,Uq=PE.exports=function(n,e,t){return IE.defineProperty(n,e,t)};IE.defineProperty.sham&&(Uq.sham=!0);var Gq=PE.exports,Kq=Gq,CE=Kq,qq=CE,Yq=qq,Xq=Yq,Qq=Xq,Jq=Qq,gl=H(Jq),Zq=Fr,en=Array.isArray||function(n){return Zq(n)==="Array"},eY=TypeError,tY=9007199254740991,ov=function(r){if(r>tY)throw eY("Maximum allowed index exceeded");return r},Bm=en,rY=vl,iY=qe,nY=ke,aY=nY("species"),Lm=Array,oY=function(r){var n;return Bm(r)&&(n=r.constructor,rY(n)&&(n===Lm||Bm(n.prototype))?n=void 0:iY(n)&&(n=n[aY],n===null&&(n=void 0))),n===void 0?Lm:n},sY=oY,sv=function(r,n){return new(sY(r))(n===0?0:n)},uY=ie,lY=ke,dY=Co,hY=lY("species"),Bo=function(r){return dY>=51||!uY(function(){var n=[],e=n.constructor={};return e[hY]=function(){return{foo:1}},n[r](Boolean).foo!==1})},cY=G,fY=ie,vY=en,pY=qe,gY=kt,yY=Gt,jm=ov,zm=va,mY=sv,bY=Bo,$Y=ke,wY=Co,AE=$Y("isConcatSpreadable"),_Y=wY>=51||!fY(function(){var r=[];return r[AE]=!1,r.concat()[0]!==r}),EY=function(r){if(!pY(r))return!1;var n=r[AE];return n!==void 0?!!n:vY(r)},SY=!_Y||!bY("concat");cY({target:"Array",proto:!0,arity:1,forced:SY},{concat:function(n){var e=gY(this),t=mY(e,0),i=0,a,o,s,u,l;for(a=-1,s=arguments.length;a<s;a++)if(l=a===-1?e:arguments[a],EY(l))for(u=yY(l),jm(i+u),o=0;o<u;o++,i++)o in l&&zm(t,i,l[o]);else jm(i+1),zm(t,i++,l);return t.length=i,t}});var Lo={},OY=K0,TY=Jf,kY=TY.concat("length","prototype");Lo.f=Object.getOwnPropertyNames||function(n){return OY(n,kY)};var yl={},Hm=Ro,PY=Gt,IY=va,CY=Array,AY=Math.max,xE=function(r,n,e){for(var t=PY(r),i=Hm(n,t),a=Hm(e===void 0?t:e,t),o=CY(AY(a-i,0)),s=0;i<a;i++,s++)IY(o,s,r[i]);return o.length=s,o},xY=Fr,DY=mr,DE=Lo.f,RY=xE,RE=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],MY=function(r){try{return DE(r)}catch{return RY(RE)}};yl.f=function(n){return RE&&xY(n)==="Window"?MY(n):DE(DY(n))};var NY=Nt,uv=function(r,n,e){return NY.f(r,n,e)},jo={},FY=ke;jo.f=FY;var Wm=ne,BY=Ye,LY=jo,jY=Nt.f,Pe=function(r){var n=Wm.Symbol||(Wm.Symbol={});BY(n,r)||jY(n,r,{value:LY.f(r)})},zY=Mt,HY=Ut,WY=ke,VY=Fo,ME=function(){var r=HY("Symbol"),n=r&&r.prototype,e=n&&n.valueOf,t=WY("toPrimitive");n&&!n[t]&&VY(n,t,function(i){return zY(e,this)},{arity:1})},UY=Do,GY=ae,KY=al,qY=kt,YY=Gt,XY=sv,Vm=GY([].push),jr=function(r){var n=r===1,e=r===2,t=r===3,i=r===4,a=r===6,o=r===7,s=r===5||a;return function(u,l,d,h){for(var c=qY(u),f=KY(c),v=UY(l,d),p=YY(f),g=0,y=h||XY,m=n?y(u,p):e||o?y(u,0):void 0,w,b;p>g;g++)if((s||g in f)&&(w=f[g],b=v(w,g,c),r))if(n)m[g]=b;else if(b)switch(r){case 3:return!0;case 5:return w;case 6:return g;case 2:Vm(m,w)}else switch(r){case 4:return!1;case 7:Vm(m,w)}return a?-1:t||i?i:m}},ui={forEach:jr(0),map:jr(1),filter:jr(2),some:jr(3),every:jr(4),find:jr(5),findIndex:jr(6),filterReject:jr(7)},ml=G,bl=Te,lv=Mt,QY=ae,Bn=Ke,Ln=sa,JY=ie,We=Ye,ZY=Re,Nc=Ft,$l=mr,dv=sl,eX=br,Fc=ko,Xa=ha,NE=ll,tX=Lo,FE=yl,rX=No,BE=aa,LE=Nt,iX=cl,jE=nl,Um=Fo,nX=uv,hv=la,aX=hl,zE=Mo,Gm=ol,oX=ke,sX=jo,uX=Pe,lX=ME,dX=ca,HE=Qi,wl=ui.forEach,_t=aX("hidden"),_l="Symbol",Qa="prototype",hX=HE.set,Km=HE.getterFor(_l),tr=Object[Qa],ki=bl.Symbol,Ta=ki&&ki[Qa],cX=bl.RangeError,fX=bl.TypeError,ch=bl.QObject,WE=BE.f,Pi=LE.f,VE=FE.f,vX=jE.f,UE=QY([].push),xr=hv("symbols"),zo=hv("op-symbols"),pX=hv("wks"),Bc=!ch||!ch[Qa]||!ch[Qa].findChild,GE=function(r,n,e){var t=WE(tr,n);t&&delete tr[n],Pi(r,n,e),t&&r!==tr&&Pi(tr,n,t)},Lc=Bn&&JY(function(){return Xa(Pi({},"a",{get:function(){return Pi(this,"a",{value:7}).a}})).a!==7})?GE:Pi,fh=function(r,n){var e=xr[r]=Xa(Ta);return hX(e,{type:_l,tag:r,description:n}),Bn||(e.description=n),e},El=function(n,e,t){n===tr&&El(zo,e,t),Nc(n);var i=dv(e);return Nc(t),We(xr,i)?(t.enumerable?(We(n,_t)&&n[_t][i]&&(n[_t][i]=!1),t=Xa(t,{enumerable:Fc(0,!1)})):(We(n,_t)||Pi(n,_t,Fc(1,{})),n[_t][i]=!0),Lc(n,i,t)):Pi(n,i,t)},cv=function(n,e){Nc(n);var t=$l(e),i=NE(t).concat(XE(t));return wl(i,function(a){(!Bn||lv(KE,t,a))&&El(n,a,t[a])}),n},gX=function(n,e){return e===void 0?Xa(n):cv(Xa(n),e)},KE=function(n){var e=dv(n),t=lv(vX,this,e);return this===tr&&We(xr,e)&&!We(zo,e)?!1:t||!We(this,e)||!We(xr,e)||We(this,_t)&&this[_t][e]?t:!0},qE=function(n,e){var t=$l(n),i=dv(e);if(!(t===tr&&We(xr,i)&&!We(zo,i))){var a=WE(t,i);return a&&We(xr,i)&&!(We(t,_t)&&t[_t][i])&&(a.enumerable=!0),a}},YE=function(n){var e=VE($l(n)),t=[];return wl(e,function(i){!We(xr,i)&&!We(zE,i)&&UE(t,i)}),t},XE=function(r){var n=r===tr,e=VE(n?zo:$l(r)),t=[];return wl(e,function(i){We(xr,i)&&(!n||We(tr,i))&&UE(t,xr[i])}),t};Ln||(ki=function(){if(ZY(Ta,this))throw new fX("Symbol is not a constructor");var n=!arguments.length||arguments[0]===void 0?void 0:eX(arguments[0]),e=Gm(n),t=function(i){this===tr&&lv(t,zo,i),We(this,_t)&&We(this[_t],e)&&(this[_t][e]=!1);var a=Fc(1,i);try{Lc(this,e,a)}catch(o){if(!(o instanceof cX))throw o;GE(this,e,a)}};return Bn&&Bc&&Lc(tr,e,{configurable:!0,set:t}),fh(e,n)},Ta=ki[Qa],Um(Ta,"toString",function(){return Km(this).tag}),Um(ki,"withoutSetter",function(r){return fh(Gm(r),r)}),jE.f=KE,LE.f=El,iX.f=cv,BE.f=qE,tX.f=FE.f=YE,rX.f=XE,sX.f=function(r){return fh(oX(r),r)},Bn&&nX(Ta,"description",{configurable:!0,get:function(){return Km(this).description}}));ml({global:!0,constructor:!0,wrap:!0,forced:!Ln,sham:!Ln},{Symbol:ki});wl(NE(pX),function(r){uX(r)});ml({target:_l,stat:!0,forced:!Ln},{useSetter:function(){Bc=!0},useSimple:function(){Bc=!1}});ml({target:"Object",stat:!0,forced:!Ln,sham:!Bn},{create:gX,defineProperty:El,defineProperties:cv,getOwnPropertyDescriptor:qE});ml({target:"Object",stat:!0,forced:!Ln},{getOwnPropertyNames:YE});lX();dX(ki,_l);zE[_t]=!0;var yX=sa,QE=yX&&!!Symbol.for&&!!Symbol.keyFor,mX=G,bX=Ut,$X=Ye,wX=br,JE=la,_X=QE,vh=JE("string-to-symbol-registry"),EX=JE("symbol-to-string-registry");mX({target:"Symbol",stat:!0,forced:!_X},{for:function(r){var n=wX(r);if($X(vh,n))return vh[n];var e=bX("Symbol")(n);return vh[n]=e,EX[e]=n,e}});var SX=G,OX=Ye,TX=Ao,kX=ua,PX=la,IX=QE,qm=PX("symbol-to-string-registry");SX({target:"Symbol",stat:!0,forced:!IX},{keyFor:function(n){if(!TX(n))throw new TypeError(kX(n)+" is not a symbol");if(OX(qm,n))return qm[n]}});var CX=ae,Ym=en,AX=Ge,Xm=Fr,xX=br,Qm=CX([].push),DX=function(r){if(AX(r))return r;if(Ym(r)){for(var n=r.length,e=[],t=0;t<n;t++){var i=r[t];typeof i=="string"?Qm(e,i):(typeof i=="number"||Xm(i)==="Number"||Xm(i)==="String")&&Qm(e,xX(i))}var a=e.length,o=!0;return function(s,u){if(o)return o=!1,u;if(Ym(this))return u;for(var l=0;l<a;l++)if(e[l]===s)return u}}},RX=G,ZE=Ut,eS=To,MX=Mt,Ho=ae,tS=ie,Jm=Ge,Zm=Ao,rS=dl,NX=DX,FX=sa,BX=String,Qr=ZE("JSON","stringify"),Os=Ho(/./.exec),eb=Ho("".charAt),LX=Ho("".charCodeAt),jX=Ho("".replace),zX=Ho(1 .toString),HX=/[\uD800-\uDFFF]/g,tb=/^[\uD800-\uDBFF]$/,rb=/^[\uDC00-\uDFFF]$/,ib=!FX||tS(function(){var r=ZE("Symbol")("stringify detection");return Qr([r])!=="[null]"||Qr({a:r})!=="{}"||Qr(Object(r))!=="{}"}),nb=tS(function(){return Qr("\uDF06\uD834")!=='"\\udf06\\ud834"'||Qr("\uDEAD")!=='"\\udead"'}),WX=function(r,n){var e=rS(arguments),t=NX(n);if(!(!Jm(t)&&(r===void 0||Zm(r))))return e[1]=function(i,a){if(Jm(t)&&(a=MX(t,this,BX(i),a)),!Zm(a))return a},eS(Qr,null,e)},VX=function(r,n,e){var t=eb(e,n-1),i=eb(e,n+1);return Os(tb,r)&&!Os(rb,i)||Os(rb,r)&&!Os(tb,t)?"\\u"+zX(LX(r,0),16):r};Qr&&RX({target:"JSON",stat:!0,arity:3,forced:ib||nb},{stringify:function(n,e,t){var i=rS(arguments),a=eS(ib?WX:Qr,null,i);return nb&&typeof a=="string"?jX(a,HX,VX):a}});var UX=G,GX=sa,KX=ie,iS=No,qX=kt,YX=!GX||KX(function(){iS.f(1)});UX({target:"Object",stat:!0,forced:YX},{getOwnPropertySymbols:function(n){var e=iS.f;return e?e(qX(n)):[]}});var XX=Pe;XX("asyncIterator");var QX=Pe;QX("hasInstance");var JX=Pe;JX("isConcatSpreadable");var ZX=Pe;ZX("iterator");var eQ=Pe;eQ("match");var tQ=Pe;tQ("matchAll");var rQ=Pe;rQ("replace");var iQ=Pe;iQ("search");var nQ=Pe;nQ("species");var aQ=Pe;aQ("split");var oQ=Pe,sQ=ME;oQ("toPrimitive");sQ();var uQ=Ut,lQ=Pe,dQ=ca;lQ("toStringTag");dQ(uQ("Symbol"),"Symbol");var hQ=Pe;hQ("unscopables");var cQ=Te,fQ=ca;fQ(cQ.JSON,"JSON",!0);var vQ=ne,pQ=vQ.Symbol,gQ=pQ,nS=gQ,yQ=ke,mQ=Nt.f,ab=yQ("metadata"),ob=Function.prototype;ob[ab]===void 0&&mQ(ob,ab,{value:null});var bQ=Pe;bQ("asyncDispose");var $Q=Pe;$Q("dispose");var wQ=Pe;wQ("metadata");var _Q=nS,EQ=_Q,SQ=Ut,OQ=ae,fv=SQ("Symbol"),TQ=fv.keyFor,kQ=OQ(fv.prototype.valueOf),aS=fv.isRegisteredSymbol||function(n){try{return TQ(kQ(n))!==void 0}catch{return!1}},PQ=G,IQ=aS;PQ({target:"Symbol",stat:!0},{isRegisteredSymbol:IQ});var CQ=la,oS=Ut,AQ=ae,xQ=Ao,DQ=ke,mu=oS("Symbol"),sb=mu.isWellKnownSymbol,sS=oS("Object","getOwnPropertyNames"),RQ=AQ(mu.prototype.valueOf),ub=CQ("wks");for(var ph=0,lb=sS(mu),MQ=lb.length;ph<MQ;ph++)try{var db=lb[ph];xQ(mu[db])&&DQ(db)}catch{}var uS=function(n){if(sb&&sb(n))return!0;try{for(var e=RQ(n),t=0,i=sS(ub),a=i.length;t<a;t++)if(ub[i[t]]==e)return!0}catch{}return!1},NQ=G,FQ=uS;NQ({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:FQ});var BQ=Pe;BQ("matcher");var LQ=Pe;LQ("observable");var jQ=G,zQ=aS;jQ({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:zQ});var HQ=G,WQ=uS;HQ({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:WQ});var VQ=Pe;VQ("metadataKey");var UQ=Pe;UQ("patternMatch");var GQ=Pe;GQ("replaceAll");var KQ=EQ,qQ=KQ,YQ=qQ,On=H(YQ),XQ=jo,QQ=XQ.f("iterator"),JQ=QQ,ZQ=JQ,eJ=ZQ,tJ=eJ,rJ=tJ,iJ=rJ,nJ=iJ,aJ=H(nJ);function de(r){"@babel/helpers - typeof";return de=typeof On=="function"&&typeof aJ=="symbol"?function(n){return typeof n}:function(n){return n&&typeof On=="function"&&n.constructor===On&&n!==On.prototype?"symbol":typeof n},de(r)}var oJ=jo,sJ=oJ.f("toPrimitive"),uJ=sJ,lJ=uJ,dJ=lJ,hJ=dJ,cJ=hJ,fJ=cJ,vJ=fJ,pJ=H(vJ);function gJ(r,n){if(de(r)!=="object"||r===null)return r;var e=r[pJ];if(e!==void 0){var t=e.call(r,n||"default");if(de(t)!=="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}function lS(r){var n=gJ(r,"string");return de(n)==="symbol"?n:String(n)}function hb(r,n){for(var e=0;e<n.length;e++){var t=n[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),gl(r,lS(t.key),t)}}function D(r,n,e){return n&&hb(r.prototype,n),e&&hb(r,e),gl(r,"prototype",{writable:!1}),r}var yJ=G,mJ=en;yJ({target:"Array",stat:!0},{isArray:mJ});var bJ=ne,$J=bJ.Array.isArray,wJ=$J,dS=wJ,_J=dS,EJ=_J,SJ=EJ,OJ=SJ,TJ=OJ,hS=H(TJ);function kJ(r){if(hS(r))return r}var PJ=Ke,IJ=en,CJ=TypeError,AJ=Object.getOwnPropertyDescriptor,xJ=PJ&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(r){return r instanceof TypeError}}(),cS=xJ?function(r,n){if(IJ(r)&&!AJ(r,"length").writable)throw new CJ("Cannot set read only .length");return r.length=n}:function(r,n){return r.length=n},DJ=G,RJ=kt,MJ=Gt,NJ=cS,FJ=ov,BJ=ie,LJ=BJ(function(){return[].push.call({length:4294967296},1)!==4294967297}),jJ=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(r){return r instanceof TypeError}},zJ=LJ||!jJ();DJ({target:"Array",proto:!0,arity:1,forced:zJ},{push:function(n){var e=RJ(this),t=MJ(e),i=arguments.length;FJ(t+i);for(var a=0;a<i;a++)e[t]=arguments[a],t++;return NJ(e,t),t}});var HJ=Xe,WJ=HJ("Array").push,VJ=Re,UJ=WJ,gh=Array.prototype,GJ=function(r){var n=r.push;return r===gh||VJ(gh,r)&&n===gh.push?UJ:n},KJ=GJ,qJ=KJ,YJ=qJ,XJ=YJ,QJ=XJ,JJ=QJ,ZJ=JJ,eZ=H(ZJ);function tZ(r,n){var e=r==null?null:typeof On<"u"&&kE(r)||r["@@iterator"];if(e!=null){var t,i,a,o,s=[],u=!0,l=!1;try{if(a=(e=e.call(r)).next,n===0){if(Object(e)!==e)return;u=!1}else for(;!(u=(t=a.call(e)).done)&&(eZ(s).call(s,t.value),s.length!==n);u=!0);}catch(d){l=!0,i=d}finally{try{if(!u&&e.return!=null&&(o=e.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}var rZ=G,cb=en,iZ=vl,nZ=qe,fb=Ro,aZ=Gt,oZ=mr,sZ=va,uZ=ke,lZ=Bo,dZ=dl,hZ=lZ("slice"),cZ=uZ("species"),yh=Array,fZ=Math.max;rZ({target:"Array",proto:!0,forced:!hZ},{slice:function(n,e){var t=oZ(this),i=aZ(t),a=fb(n,i),o=fb(e===void 0?i:e,i),s,u,l;if(cb(t)&&(s=t.constructor,iZ(s)&&(s===yh||cb(s.prototype))?s=void 0:nZ(s)&&(s=s[cZ],s===null&&(s=void 0)),s===yh||s===void 0))return dZ(t,a,o);for(u=new(s===void 0?yh:s)(fZ(o-a,0)),l=0;a<o;a++,l++)a in t&&sZ(u,l,t[a]);return u.length=l,u}});var vZ=Xe,pZ=vZ("Array").slice,gZ=Re,yZ=pZ,mh=Array.prototype,mZ=function(r){var n=r.slice;return r===mh||gZ(mh,r)&&n===mh.slice?yZ:n},bZ=mZ,fS=bZ,$Z=fS,wZ=$Z,_Z=wZ,EZ=_Z,SZ=EZ,OZ=H(SZ),TZ=EE,kZ=TZ,PZ=kZ,IZ=PZ,CZ=IZ,vS=H(CZ);function jc(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}function pS(r,n){var e;if(r){if(typeof r=="string")return jc(r,n);var t=OZ(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return vS(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return jc(r,n)}}function AZ(){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 _e(r,n){return kJ(r)||tZ(r,n)||pS(r,n)||AZ()}function xZ(r){if(hS(r))return jc(r)}function DZ(r){if(typeof On<"u"&&kE(r)!=null||r["@@iterator"]!=null)return vS(r)}function RZ(){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 lr(r){return xZ(r)||DZ(r)||pS(r)||RZ()}var MZ=nS,li=H(MZ),NZ=Xe,FZ=NZ("Array").concat,BZ=Re,LZ=FZ,bh=Array.prototype,jZ=function(r){var n=r.concat;return r===bh||BZ(bh,r)&&n===bh.concat?LZ:n},zZ=jZ,HZ=zZ,WZ=HZ,vv=H(WZ),VZ=fS,rt=H(VZ),UZ=Ut,GZ=ae,KZ=Lo,qZ=No,YZ=Ft,XZ=GZ([].concat),QZ=UZ("Reflect","ownKeys")||function(n){var e=KZ.f(YZ(n)),t=qZ.f;return t?XZ(e,t(n)):e},JZ=dS,se=H(JZ),ZZ=G,eee=ui.map,tee=Bo,ree=tee("map");ZZ({target:"Array",proto:!0,forced:!ree},{map:function(n){return eee(this,n,arguments.length>1?arguments[1]:void 0)}});var iee=Xe,nee=iee("Array").map,aee=Re,oee=nee,$h=Array.prototype,see=function(r){var n=r.map;return r===$h||aee($h,r)&&n===$h.map?oee:n},uee=see,lee=uee,dee=lee,jn=H(dee),hee=G,cee=kt,gS=ll,fee=ie,vee=fee(function(){gS(1)});hee({target:"Object",stat:!0,forced:vee},{keys:function(n){return gS(cee(n))}});var pee=ne,gee=pee.Object.keys,yee=gee,mee=yee,bee=mee,$e=H(bee),$ee=G,wee=ae,yS=Date,_ee=wee(yS.prototype.getTime);$ee({target:"Date",stat:!0},{now:function(){return _ee(new yS)}});var Eee=ne,See=Eee.Date.now,Oee=See,Tee=Oee,kee=Tee,bu=H(kee),Pee=ie,pa=function(r,n){var e=[][r];return!!e&&Pee(function(){e.call(null,n||function(){return 1},1)})},Iee=ui.forEach,Cee=pa,Aee=Cee("forEach"),xee=Aee?[].forEach:function(n){return Iee(this,n,arguments.length>1?arguments[1]:void 0)},Dee=G,vb=xee;Dee({target:"Array",proto:!0,forced:[].forEach!==vb},{forEach:vb});var Ree=Xe,Mee=Ree("Array").forEach,Nee=Mee,Fee=Nee,Bee=Xi,Lee=Ye,jee=Re,zee=Fee,wh=Array.prototype,Hee={DOMTokenList:!0,NodeList:!0},Wee=function(r){var n=r.forEach;return r===wh||jee(wh,r)&&n===wh.forEach||Lee(Hee,Bee(r))?zee:n},Vee=Wee,he=H(Vee),Uee=G,Gee=ae,Kee=en,qee=Gee([].reverse),pb=[1,2];Uee({target:"Array",proto:!0,forced:String(pb)===String(pb.reverse())},{reverse:function(){return Kee(this)&&(this.length=this.length),qee(this)}});var Yee=Xe,Xee=Yee("Array").reverse,Qee=Re,Jee=Xee,_h=Array.prototype,Zee=function(r){var n=r.reverse;return r===_h||Qee(_h,r)&&n===_h.reverse?Jee:n},ete=Zee,tte=ete,rte=tte,Ii=H(rte),gb=ua,ite=TypeError,mS=function(r,n){if(!delete r[n])throw new ite("Cannot delete property "+gb(n)+" of "+gb(r))},nte=G,ate=kt,ote=Ro,ste=ul,ute=Gt,lte=cS,dte=ov,hte=sv,cte=va,Eh=mS,fte=Bo,vte=fte("splice"),pte=Math.max,gte=Math.min;nte({target:"Array",proto:!0,forced:!vte},{splice:function(n,e){var t=ate(this),i=ute(t),a=ote(n,i),o=arguments.length,s,u,l,d,h,c;for(o===0?s=u=0:o===1?(s=0,u=i-a):(s=o-2,u=gte(pte(ste(e),0),i-a)),dte(i+s-u),l=hte(t,u),d=0;d<u;d++)h=a+d,h in t&&cte(l,d,t[h]);if(l.length=u,s<u){for(d=a;d<i-u;d++)h=d+u,c=d+s,h in t?t[c]=t[h]:Eh(t,c);for(d=i;d>i-u+s;d--)Eh(t,d-1)}else if(s>u)for(d=i-u;d>a;d--)h=d+u-1,c=d+s-1,h in t?t[c]=t[h]:Eh(t,c);for(d=0;d<s;d++)t[d+a]=arguments[d+2];return lte(t,i-u+s),l}});var yte=Xe,mte=yte("Array").splice,bte=Re,$te=mte,Sh=Array.prototype,wte=function(r){var n=r.splice;return r===Sh||bte(Sh,r)&&n===Sh.splice?$te:n},_te=wte,Ete=_te,Ste=Ete,Tr=H(Ste),Ote=G,Tte=Qf.includes,kte=ie,Pte=kte(function(){return!Array(1).includes()});Ote({target:"Array",proto:!0,forced:Pte},{includes:function(n){return Tte(this,n,arguments.length>1?arguments[1]:void 0)}});var Ite=Xe,Cte=Ite("Array").includes,Ate=qe,xte=Fr,Dte=ke,Rte=Dte("match"),Mte=function(r){var n;return Ate(r)&&((n=r[Rte])!==void 0?!!n:xte(r)==="RegExp")},Nte=Mte,Fte=TypeError,Bte=function(r){if(Nte(r))throw new Fte("The method doesn't accept regular expressions");return r},Lte=ke,jte=Lte("match"),zte=function(r){var n=/./;try{"/./"[r](n)}catch{try{return n[jte]=!1,"/./"[r](n)}catch{}}return!1},Hte=G,Wte=ae,Vte=Bte,Ute=Po,yb=br,Gte=zte,Kte=Wte("".indexOf);Hte({target:"String",proto:!0,forced:!Gte("includes")},{includes:function(n){return!!~Kte(yb(Ute(this)),yb(Vte(n)),arguments.length>1?arguments[1]:void 0)}});var qte=Xe,Yte=qte("String").includes,mb=Re,Xte=Cte,Qte=Yte,Oh=Array.prototype,Th=String.prototype,Jte=function(r){var n=r.includes;return r===Oh||mb(Oh,r)&&n===Oh.includes?Xte:typeof r=="string"||r===Th||mb(Th,r)&&n===Th.includes?Qte:n},Zte=Jte,ere=Zte,tre=ere,vr=H(tre),rre=G,ire=ie,nre=kt,bS=fl,are=lE,ore=ire(function(){bS(1)});rre({target:"Object",stat:!0,forced:ore,sham:!are},{getPrototypeOf:function(n){return bS(nre(n))}});var sre=ne,ure=sre.Object.getPrototypeOf,lre=ure,$S=lre,dre=$S,bb=H(dre),hre=G,cre=ui.filter,fre=Bo,vre=fre("filter");hre({target:"Array",proto:!0,forced:!vre},{filter:function(n){return cre(this,n,arguments.length>1?arguments[1]:void 0)}});var pre=Xe,gre=pre("Array").filter,yre=Re,mre=gre,kh=Array.prototype,bre=function(r){var n=r.filter;return r===kh||yre(kh,r)&&n===kh.filter?mre:n},$re=bre,wre=$re,_re=wre,Et=H(_re),pv=`
64
+ \v\f\r                 \u2028\u2029\uFEFF`,Ere=ae,Sre=Po,Ore=br,zc=pv,$b=Ere("".replace),Tre=RegExp("^["+zc+"]+"),kre=RegExp("(^|[^"+zc+"])["+zc+"]+$"),Ph=function(r){return function(n){var e=Ore(Sre(n));return r&1&&(e=$b(e,Tre,"")),r&2&&(e=$b(e,kre,"$1")),e}},wS={start:Ph(1),end:Ph(2),trim:Ph(3)},_S=Te,Pre=ie,Ire=ae,Cre=br,Are=wS.trim,wb=pv,Da=_S.parseInt,_b=_S.Symbol,Eb=_b&&_b.iterator,ES=/^[+-]?0x/i,xre=Ire(ES.exec),Dre=Da(wb+"08")!==8||Da(wb+"0x16")!==22||Eb&&!Pre(function(){Da(Object(Eb))}),Rre=Dre?function(n,e){var t=Are(Cre(n));return Da(t,e>>>0||(xre(ES,t)?16:10))}:Da,Mre=G,Sb=Rre;Mre({global:!0,forced:parseInt!==Sb},{parseInt:Sb});var Nre=ne,Fre=Nre.parseInt,Bre=Fre,Lre=Bre,jre=Lre,Jt=H(jre),zre=G,Hre=qf,Wre=Qf.indexOf,Vre=pa,Hc=Hre([].indexOf),SS=!!Hc&&1/Hc([1],1,-0)<0,Ure=SS||!Vre("indexOf");zre({target:"Array",proto:!0,forced:Ure},{indexOf:function(n){var e=arguments.length>1?arguments[1]:void 0;return SS?Hc(this,n,e)||0:Wre(this,n,e)}});var Gre=Xe,Kre=Gre("Array").indexOf,qre=Re,Yre=Kre,Ih=Array.prototype,Xre=function(r){var n=r.indexOf;return r===Ih||qre(Ih,r)&&n===Ih.indexOf?Yre:n},Qre=Xre,Jre=Qre,Zre=Jre,re=H(Zre),eie=G,tie=Ke,rie=ha;eie({target:"Object",stat:!0,sham:!tie},{create:rie});var iie=ne,nie=iie.Object,aie=function(n,e){return nie.create(n,e)},oie=aie,OS=oie,sie=OS,Ci=H(sie),Wc=ne,uie=To;Wc.JSON||(Wc.JSON={stringify:JSON.stringify});var lie=function(n,e,t){return uie(Wc.JSON.stringify,null,arguments)},die=lie,hie=die,cie=hie,Wo=H(cie),fie=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",vie=TypeError,pie=function(r,n){if(r<n)throw new vie("Not enough arguments");return r},TS=Te,gie=To,yie=Ge,mie=fie,bie=Io,$ie=dl,wie=pie,_ie=TS.Function,Eie=/MSIE .\./.test(bie)||mie&&function(){var r=TS.Bun.version.split(".");return r.length<3||r[0]==="0"&&(r[1]<3||r[1]==="3"&&r[2]==="0")}(),kS=function(r,n){var e=n?2:1;return Eie?function(t,i){var a=wie(arguments.length,1)>e,o=yie(t)?t:_ie(t),s=a?$ie(arguments,e):[],u=a?function(){gie(o,this,s)}:o;return n?r(u,i):r(u)}:r},Sie=G,PS=Te,Oie=kS,Ob=Oie(PS.setInterval,!0);Sie({global:!0,bind:!0,forced:PS.setInterval!==Ob},{setInterval:Ob});var Tie=G,IS=Te,kie=kS,Tb=kie(IS.setTimeout,!0);Tie({global:!0,bind:!0,forced:IS.setTimeout!==Tb},{setTimeout:Tb});var Pie=ne,Iie=Pie.setTimeout,Cie=Iie,pr=H(Cie),Aie=kt,kb=Ro,xie=Gt,Die=function(n){for(var e=Aie(this),t=xie(e),i=arguments.length,a=kb(i>1?arguments[1]:void 0,t),o=i>2?arguments[2]:void 0,s=o===void 0?t:kb(o,t);s>a;)e[a++]=n;return e},Rie=G,Mie=Die;Rie({target:"Array",proto:!0},{fill:Mie});var Nie=Xe,Fie=Nie("Array").fill,Bie=Re,Lie=Fie,Ch=Array.prototype,jie=function(r){var n=r.fill;return r===Ch||Bie(Ch,r)&&n===Ch.fill?Lie:n},zie=jie,Hie=zie,Wie=Hie,Vo=H(Wie);/*! 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 ir(){return ir=Object.assign||function(r){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}return r},ir.apply(this,arguments)}function Kt(r,n){r.prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n}function Ts(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}var Vc;typeof Object.assign!="function"?Vc=function(n){if(n==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(n),t=1;t<arguments.length;t++){var i=arguments[t];if(i!=null)for(var a in i)i.hasOwnProperty(a)&&(e[a]=i[a])}return e}:Vc=Object.assign;var Bi=Vc,Pb=["","webkit","Moz","MS","ms","o"],Vie=typeof document>"u"?{style:{}}:document.createElement("div"),Uie="function",Tn=Math.round,Li=Math.abs,gv=Date.now;function Sl(r,n){for(var e,t,i=n[0].toUpperCase()+n.slice(1),a=0;a<Pb.length;){if(e=Pb[a],t=e?e+i:n,t in r)return t;a++}}var kr;typeof window>"u"?kr={}:kr=window;var CS=Sl(Vie.style,"touchAction"),AS=CS!==void 0;function Gie(){if(!AS)return!1;var r={},n=kr.CSS&&kr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return r[e]=n?kr.CSS.supports("touch-action",e):!0}),r}var xS="compute",DS="auto",Uc="manipulation",Ai="none",Ja="pan-x",Za="pan-y",ks=Gie(),Kie=/mobile|tablet|ip(ad|hone|od)|android/i,RS="ontouchstart"in kr,qie=Sl(kr,"PointerEvent")!==void 0,Yie=RS&&Kie.test(navigator.userAgent),Uo="touch",Xie="pen",yv="mouse",Qie="kinect",Jie=25,ct=1,tn=2,Fe=4,Ot=8,$u=1,Go=2,Ko=4,qo=8,zn=16,gr=Go|Ko,xi=qo|zn,MS=gr|xi,NS=["x","y"],wu=["clientX","clientY"];function Pr(r,n,e){var t;if(r)if(r.forEach)r.forEach(n,e);else if(r.length!==void 0)for(t=0;t<r.length;)n.call(e,r[t],t,r),t++;else for(t in r)r.hasOwnProperty(t)&&n.call(e,r[t],t,r)}function Ol(r,n){return typeof r===Uie?r.apply(n&&n[0]||void 0,n):r}function _i(r,n){return r.indexOf(n)>-1}function Zie(r){if(_i(r,Ai))return Ai;var n=_i(r,Ja),e=_i(r,Za);return n&&e?Ai:n||e?n?Ja:Za:_i(r,Uc)?Uc:DS}var FS=function(){function r(e,t){this.manager=e,this.set(t)}var n=r.prototype;return n.set=function(t){t===xS&&(t=this.compute()),AS&&this.manager.element.style&&ks[t]&&(this.manager.element.style[CS]=t),this.actions=t.toLowerCase().trim()},n.update=function(){this.set(this.manager.options.touchAction)},n.compute=function(){var t=[];return Pr(this.manager.recognizers,function(i){Ol(i.options.enable,[i])&&(t=t.concat(i.getTouchAction()))}),Zie(t.join(" "))},n.preventDefaults=function(t){var i=t.srcEvent,a=t.offsetDirection;if(this.manager.session.prevented){i.preventDefault();return}var o=this.actions,s=_i(o,Ai)&&!ks[Ai],u=_i(o,Za)&&!ks[Za],l=_i(o,Ja)&&!ks[Ja];if(s){var d=t.pointers.length===1,h=t.distance<2,c=t.deltaTime<250;if(d&&h&&c)return}if(!(l&&u)&&(s||u&&a&gr||l&&a&xi))return this.preventSrc(i)},n.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},r}();function mv(r,n){for(;r;){if(r===n)return!0;r=r.parentNode}return!1}function BS(r){var n=r.length;if(n===1)return{x:Tn(r[0].clientX),y:Tn(r[0].clientY)};for(var e=0,t=0,i=0;i<n;)e+=r[i].clientX,t+=r[i].clientY,i++;return{x:Tn(e/n),y:Tn(t/n)}}function Ib(r){for(var n=[],e=0;e<r.pointers.length;)n[e]={clientX:Tn(r.pointers[e].clientX),clientY:Tn(r.pointers[e].clientY)},e++;return{timeStamp:gv(),pointers:n,center:BS(n),deltaX:r.deltaX,deltaY:r.deltaY}}function _u(r,n,e){e||(e=NS);var t=n[e[0]]-r[e[0]],i=n[e[1]]-r[e[1]];return Math.sqrt(t*t+i*i)}function Gc(r,n,e){e||(e=NS);var t=n[e[0]]-r[e[0]],i=n[e[1]]-r[e[1]];return Math.atan2(i,t)*180/Math.PI}function LS(r,n){return r===n?$u:Li(r)>=Li(n)?r<0?Go:Ko:n<0?qo:zn}function ene(r,n){var e=n.center,t=r.offsetDelta||{},i=r.prevDelta||{},a=r.prevInput||{};(n.eventType===ct||a.eventType===Fe)&&(i=r.prevDelta={x:a.deltaX||0,y:a.deltaY||0},t=r.offsetDelta={x:e.x,y:e.y}),n.deltaX=i.x+(e.x-t.x),n.deltaY=i.y+(e.y-t.y)}function jS(r,n,e){return{x:n/r||0,y:e/r||0}}function tne(r,n){return _u(n[0],n[1],wu)/_u(r[0],r[1],wu)}function rne(r,n){return Gc(n[1],n[0],wu)+Gc(r[1],r[0],wu)}function ine(r,n){var e=r.lastInterval||n,t=n.timeStamp-e.timeStamp,i,a,o,s;if(n.eventType!==Ot&&(t>Jie||e.velocity===void 0)){var u=n.deltaX-e.deltaX,l=n.deltaY-e.deltaY,d=jS(t,u,l);a=d.x,o=d.y,i=Li(d.x)>Li(d.y)?d.x:d.y,s=LS(u,l),r.lastInterval=n}else i=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;n.velocity=i,n.velocityX=a,n.velocityY=o,n.direction=s}function nne(r,n){var e=r.session,t=n.pointers,i=t.length;e.firstInput||(e.firstInput=Ib(n)),i>1&&!e.firstMultiple?e.firstMultiple=Ib(n):i===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,u=n.center=BS(t);n.timeStamp=gv(),n.deltaTime=n.timeStamp-a.timeStamp,n.angle=Gc(s,u),n.distance=_u(s,u),ene(e,n),n.offsetDirection=LS(n.deltaX,n.deltaY);var l=jS(n.deltaTime,n.deltaX,n.deltaY);n.overallVelocityX=l.x,n.overallVelocityY=l.y,n.overallVelocity=Li(l.x)>Li(l.y)?l.x:l.y,n.scale=o?tne(o.pointers,t):1,n.rotation=o?rne(o.pointers,t):0,n.maxPointers=e.prevInput?n.pointers.length>e.prevInput.maxPointers?n.pointers.length:e.prevInput.maxPointers:n.pointers.length,ine(e,n);var d=r.element,h=n.srcEvent,c;h.composedPath?c=h.composedPath()[0]:h.path?c=h.path[0]:c=h.target,mv(c,d)&&(d=c),n.target=d}function ane(r,n,e){var t=e.pointers.length,i=e.changedPointers.length,a=n&ct&&t-i===0,o=n&(Fe|Ot)&&t-i===0;e.isFirst=!!a,e.isFinal=!!o,a&&(r.session={}),e.eventType=n,nne(r,e),r.emit("hammer.input",e),r.recognize(e),r.session.prevInput=e}function eo(r){return r.trim().split(/\s+/g)}function Ra(r,n,e){Pr(eo(n),function(t){r.addEventListener(t,e,!1)})}function Ma(r,n,e){Pr(eo(n),function(t){r.removeEventListener(t,e,!1)})}function Cb(r){var n=r.ownerDocument||r;return n.defaultView||n.parentWindow||window}var ga=function(){function r(e,t){var i=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){Ol(e.options.enable,[e])&&i.handler(a)},this.init()}var n=r.prototype;return n.handler=function(){},n.init=function(){this.evEl&&Ra(this.element,this.evEl,this.domHandler),this.evTarget&&Ra(this.target,this.evTarget,this.domHandler),this.evWin&&Ra(Cb(this.element),this.evWin,this.domHandler)},n.destroy=function(){this.evEl&&Ma(this.element,this.evEl,this.domHandler),this.evTarget&&Ma(this.target,this.evTarget,this.domHandler),this.evWin&&Ma(Cb(this.element),this.evWin,this.domHandler)},r}();function ji(r,n,e){if(r.indexOf&&!e)return r.indexOf(n);for(var t=0;t<r.length;){if(e&&r[t][e]==n||!e&&r[t]===n)return t;t++}return-1}var one={pointerdown:ct,pointermove:tn,pointerup:Fe,pointercancel:Ot,pointerout:Ot},sne={2:Uo,3:Xie,4:yv,5:Qie},zS="pointerdown",HS="pointermove pointerup pointercancel";kr.MSPointerEvent&&!kr.PointerEvent&&(zS="MSPointerDown",HS="MSPointerMove MSPointerUp MSPointerCancel");var WS=function(r){Kt(n,r);function n(){var t,i=n.prototype;return i.evEl=zS,i.evWin=HS,t=r.apply(this,arguments)||this,t.store=t.manager.session.pointerEvents=[],t}var e=n.prototype;return e.handler=function(i){var a=this.store,o=!1,s=i.type.toLowerCase().replace("ms",""),u=one[s],l=sne[i.pointerType]||i.pointerType,d=l===Uo,h=ji(a,i.pointerId,"pointerId");u&ct&&(i.button===0||d)?h<0&&(a.push(i),h=a.length-1):u&(Fe|Ot)&&(o=!0),!(h<0)&&(a[h]=i,this.callback(this.manager,u,{pointers:a,changedPointers:[i],pointerType:l,srcEvent:i}),o&&a.splice(h,1))},n}(ga);function to(r){return Array.prototype.slice.call(r,0)}function bv(r,n,e){for(var t=[],i=[],a=0;a<r.length;){var o=n?r[a][n]:r[a];ji(i,o)<0&&t.push(r[a]),i[a]=o,a++}return e&&(n?t=t.sort(function(s,u){return s[n]>u[n]}):t=t.sort()),t}var une={touchstart:ct,touchmove:tn,touchend:Fe,touchcancel:Ot},lne="touchstart touchmove touchend touchcancel",$v=function(r){Kt(n,r);function n(){var t;return n.prototype.evTarget=lne,t=r.apply(this,arguments)||this,t.targetIds={},t}var e=n.prototype;return e.handler=function(i){var a=une[i.type],o=dne.call(this,i,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:Uo,srcEvent:i})},n}(ga);function dne(r,n){var e=to(r.touches),t=this.targetIds;if(n&(ct|tn)&&e.length===1)return t[e[0].identifier]=!0,[e,e];var i,a,o=to(r.changedTouches),s=[],u=this.target;if(a=e.filter(function(l){return mv(l.target,u)}),n===ct)for(i=0;i<a.length;)t[a[i].identifier]=!0,i++;for(i=0;i<o.length;)t[o[i].identifier]&&s.push(o[i]),n&(Fe|Ot)&&delete t[o[i].identifier],i++;if(s.length)return[bv(a.concat(s),"identifier",!0),s]}var hne={mousedown:ct,mousemove:tn,mouseup:Fe},cne="mousedown",fne="mousemove mouseup",wv=function(r){Kt(n,r);function n(){var t,i=n.prototype;return i.evEl=cne,i.evWin=fne,t=r.apply(this,arguments)||this,t.pressed=!1,t}var e=n.prototype;return e.handler=function(i){var a=hne[i.type];a&ct&&i.button===0&&(this.pressed=!0),a&tn&&i.which!==1&&(a=Fe),this.pressed&&(a&Fe&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[i],changedPointers:[i],pointerType:yv,srcEvent:i}))},n}(ga),vne=2500,Ab=25;function xb(r){var n=r.changedPointers,e=n[0];if(e.identifier===this.primaryTouch){var t={x:e.clientX,y:e.clientY},i=this.lastTouches;this.lastTouches.push(t);var a=function(){var s=i.indexOf(t);s>-1&&i.splice(s,1)};setTimeout(a,vne)}}function pne(r,n){r&ct?(this.primaryTouch=n.changedPointers[0].identifier,xb.call(this,n)):r&(Fe|Ot)&&xb.call(this,n)}function gne(r){for(var n=r.srcEvent.clientX,e=r.srcEvent.clientY,t=0;t<this.lastTouches.length;t++){var i=this.lastTouches[t],a=Math.abs(n-i.x),o=Math.abs(e-i.y);if(a<=Ab&&o<=Ab)return!0}return!1}var VS=function(){var r=function(n){Kt(e,n);function e(i,a){var o;return o=n.call(this,i,a)||this,o.handler=function(s,u,l){var d=l.pointerType===Uo,h=l.pointerType===yv;if(!(h&&l.sourceCapabilities&&l.sourceCapabilities.firesTouchEvents)){if(d)pne.call(Ts(Ts(o)),u,l);else if(h&&gne.call(Ts(Ts(o)),l))return;o.callback(s,u,l)}},o.touch=new $v(o.manager,o.handler),o.mouse=new wv(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}(ga);return r}();function yne(r){var n,e=r.options.inputClass;return e?n=e:qie?n=WS:Yie?n=$v:RS?n=VS:n=wv,new n(r,ane)}function kn(r,n,e){return Array.isArray(r)?(Pr(r,e[n],e),!0):!1}var Gs=1,Ht=2,Hn=4,Jr=8,Ir=Jr,ro=16,hr=32,mne=1;function bne(){return mne++}function Ps(r,n){var e=n.manager;return e?e.get(r):r}function Db(r){return r&ro?"cancel":r&Jr?"end":r&Hn?"move":r&Ht?"start":""}var Yo=function(){function r(e){e===void 0&&(e={}),this.options=ir({enable:!0},e),this.id=bne(),this.manager=null,this.state=Gs,this.simultaneous={},this.requireFail=[]}var n=r.prototype;return n.set=function(t){return Bi(this.options,t),this.manager&&this.manager.touchAction.update(),this},n.recognizeWith=function(t){if(kn(t,"recognizeWith",this))return this;var i=this.simultaneous;return t=Ps(t,this),i[t.id]||(i[t.id]=t,t.recognizeWith(this)),this},n.dropRecognizeWith=function(t){return kn(t,"dropRecognizeWith",this)?this:(t=Ps(t,this),delete this.simultaneous[t.id],this)},n.requireFailure=function(t){if(kn(t,"requireFailure",this))return this;var i=this.requireFail;return t=Ps(t,this),ji(i,t)===-1&&(i.push(t),t.requireFailure(this)),this},n.dropRequireFailure=function(t){if(kn(t,"dropRequireFailure",this))return this;t=Ps(t,this);var i=ji(this.requireFail,t);return i>-1&&this.requireFail.splice(i,1),this},n.hasRequireFailures=function(){return this.requireFail.length>0},n.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},n.emit=function(t){var i=this,a=this.state;function o(s){i.manager.emit(s,t)}a<Jr&&o(i.options.event+Db(a)),o(i.options.event),t.additionalEvent&&o(t.additionalEvent),a>=Jr&&o(i.options.event+Db(a))},n.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=hr},n.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(hr|Gs)))return!1;t++}return!0},n.recognize=function(t){var i=Bi({},t);if(!Ol(this.options.enable,[this,i])){this.reset(),this.state=hr;return}this.state&(Ir|ro|hr)&&(this.state=Gs),this.state=this.process(i),this.state&(Ht|Hn|Jr|ro)&&this.tryEmit(i)},n.process=function(t){},n.getTouchAction=function(){},n.reset=function(){},r}(),Kc=function(r){Kt(n,r);function n(t){var i;return t===void 0&&(t={}),i=r.call(this,ir({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,i.pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}var e=n.prototype;return e.getTouchAction=function(){return[Uc]},e.process=function(i){var a=this,o=this.options,s=i.pointers.length===o.pointers,u=i.distance<o.threshold,l=i.deltaTime<o.time;if(this.reset(),i.eventType&ct&&this.count===0)return this.failTimeout();if(u&&l&&s){if(i.eventType!==Fe)return this.failTimeout();var d=this.pTime?i.timeStamp-this.pTime<o.interval:!0,h=!this.pCenter||_u(this.pCenter,i.center)<o.posThreshold;this.pTime=i.timeStamp,this.pCenter=i.center,!h||!d?this.count=1:this.count+=1,this._input=i;var c=this.count%o.taps;if(c===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){a.state=Ir,a.tryEmit()},o.interval),Ht):Ir}return hr},e.failTimeout=function(){var i=this;return this._timer=setTimeout(function(){i.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))},n}(Yo),Wn=function(r){Kt(n,r);function n(t){return t===void 0&&(t={}),r.call(this,ir({pointers:1},t))||this}var e=n.prototype;return e.attrTest=function(i){var a=this.options.pointers;return a===0||i.pointers.length===a},e.process=function(i){var a=this.state,o=i.eventType,s=a&(Ht|Hn),u=this.attrTest(i);return s&&(o&Ot||!u)?a|ro:s||u?o&Fe?a|Jr:a&Ht?a|Hn:Ht:hr},n}(Yo);function US(r){return r===zn?"down":r===qo?"up":r===Go?"left":r===Ko?"right":""}var _v=function(r){Kt(n,r);function n(t){var i;return t===void 0&&(t={}),i=r.call(this,ir({event:"pan",threshold:10,pointers:1,direction:MS},t))||this,i.pX=null,i.pY=null,i}var e=n.prototype;return e.getTouchAction=function(){var i=this.options.direction,a=[];return i&gr&&a.push(Za),i&xi&&a.push(Ja),a},e.directionTest=function(i){var a=this.options,o=!0,s=i.distance,u=i.direction,l=i.deltaX,d=i.deltaY;return u&a.direction||(a.direction&gr?(u=l===0?$u:l<0?Go:Ko,o=l!==this.pX,s=Math.abs(i.deltaX)):(u=d===0?$u:d<0?qo:zn,o=d!==this.pY,s=Math.abs(i.deltaY))),i.direction=u,o&&s>a.threshold&&u&a.direction},e.attrTest=function(i){return Wn.prototype.attrTest.call(this,i)&&(this.state&Ht||!(this.state&Ht)&&this.directionTest(i))},e.emit=function(i){this.pX=i.deltaX,this.pY=i.deltaY;var a=US(i.direction);a&&(i.additionalEvent=this.options.event+a),r.prototype.emit.call(this,i)},n}(Wn),GS=function(r){Kt(n,r);function n(t){return t===void 0&&(t={}),r.call(this,ir({event:"swipe",threshold:10,velocity:.3,direction:gr|xi,pointers:1},t))||this}var e=n.prototype;return e.getTouchAction=function(){return _v.prototype.getTouchAction.call(this)},e.attrTest=function(i){var a=this.options.direction,o;return a&(gr|xi)?o=i.overallVelocity:a&gr?o=i.overallVelocityX:a&xi&&(o=i.overallVelocityY),r.prototype.attrTest.call(this,i)&&a&i.offsetDirection&&i.distance>this.options.threshold&&i.maxPointers===this.options.pointers&&Li(o)>this.options.velocity&&i.eventType&Fe},e.emit=function(i){var a=US(i.offsetDirection);a&&this.manager.emit(this.options.event+a,i),this.manager.emit(this.options.event,i)},n}(Wn),KS=function(r){Kt(n,r);function n(t){return t===void 0&&(t={}),r.call(this,ir({event:"pinch",threshold:0,pointers:2},t))||this}var e=n.prototype;return e.getTouchAction=function(){return[Ai]},e.attrTest=function(i){return r.prototype.attrTest.call(this,i)&&(Math.abs(i.scale-1)>this.options.threshold||this.state&Ht)},e.emit=function(i){if(i.scale!==1){var a=i.scale<1?"in":"out";i.additionalEvent=this.options.event+a}r.prototype.emit.call(this,i)},n}(Wn),qS=function(r){Kt(n,r);function n(t){return t===void 0&&(t={}),r.call(this,ir({event:"rotate",threshold:0,pointers:2},t))||this}var e=n.prototype;return e.getTouchAction=function(){return[Ai]},e.attrTest=function(i){return r.prototype.attrTest.call(this,i)&&(Math.abs(i.rotation)>this.options.threshold||this.state&Ht)},n}(Wn),YS=function(r){Kt(n,r);function n(t){var i;return t===void 0&&(t={}),i=r.call(this,ir({event:"press",pointers:1,time:251,threshold:9},t))||this,i._timer=null,i._input=null,i}var e=n.prototype;return e.getTouchAction=function(){return[DS]},e.process=function(i){var a=this,o=this.options,s=i.pointers.length===o.pointers,u=i.distance<o.threshold,l=i.deltaTime>o.time;if(this._input=i,!u||!s||i.eventType&(Fe|Ot)&&!l)this.reset();else if(i.eventType&ct)this.reset(),this._timer=setTimeout(function(){a.state=Ir,a.tryEmit()},o.time);else if(i.eventType&Fe)return Ir;return hr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(i){this.state===Ir&&(i&&i.eventType&Fe?this.manager.emit(this.options.event+"up",i):(this._input.timeStamp=gv(),this.manager.emit(this.options.event,this._input)))},n}(Yo),XS={domEvents:!1,touchAction:xS,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Rb=[[qS,{enable:!1}],[KS,{enable:!1},["rotate"]],[GS,{direction:gr}],[_v,{direction:gr},["swipe"]],[Kc],[Kc,{event:"doubletap",taps:2},["tap"]],[YS]],$ne=1,Mb=2;function Nb(r,n){var e=r.element;if(e.style){var t;Pr(r.options.cssProps,function(i,a){t=Sl(e.style,a),n?(r.oldCssProps[t]=e.style[t],e.style[t]=i):e.style[t]=r.oldCssProps[t]||""}),n||(r.oldCssProps={})}}function wne(r,n){var e=document.createEvent("Event");e.initEvent(r,!0,!0),e.gesture=n,n.target.dispatchEvent(e)}var Fb=function(){function r(e,t){var i=this;this.options=Bi({},XS,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=yne(this),this.touchAction=new FS(this,this.options.touchAction),Nb(this,!0),Pr(this.options.recognizers,function(a){var o=i.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var n=r.prototype;return n.set=function(t){return Bi(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},n.stop=function(t){this.session.stopped=t?Mb:$ne},n.recognize=function(t){var i=this.session;if(!i.stopped){this.touchAction.preventDefaults(t);var a,o=this.recognizers,s=i.curRecognizer;(!s||s&&s.state&Ir)&&(i.curRecognizer=null,s=null);for(var u=0;u<o.length;)a=o[u],i.stopped!==Mb&&(!s||a===s||a.canRecognizeWith(s))?a.recognize(t):a.reset(),!s&&a.state&(Ht|Hn|Jr)&&(i.curRecognizer=a,s=a),u++}},n.get=function(t){if(t instanceof Yo)return t;for(var i=this.recognizers,a=0;a<i.length;a++)if(i[a].options.event===t)return i[a];return null},n.add=function(t){if(kn(t,"add",this))return this;var i=this.get(t.options.event);return i&&this.remove(i),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},n.remove=function(t){if(kn(t,"remove",this))return this;var i=this.get(t);if(t){var a=this.recognizers,o=ji(a,i);o!==-1&&(a.splice(o,1),this.touchAction.update())}return this},n.on=function(t,i){if(t===void 0||i===void 0)return this;var a=this.handlers;return Pr(eo(t),function(o){a[o]=a[o]||[],a[o].push(i)}),this},n.off=function(t,i){if(t===void 0)return this;var a=this.handlers;return Pr(eo(t),function(o){i?a[o]&&a[o].splice(ji(a[o],i),1):delete a[o]}),this},n.emit=function(t,i){this.options.domEvents&&wne(t,i);var a=this.handlers[t]&&this.handlers[t].slice();if(!(!a||!a.length)){i.type=t,i.preventDefault=function(){i.srcEvent.preventDefault()};for(var o=0;o<a.length;)a[o](i),o++}},n.destroy=function(){this.element&&Nb(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},r}(),_ne={touchstart:ct,touchmove:tn,touchend:Fe,touchcancel:Ot},Ene="touchstart",Sne="touchstart touchmove touchend touchcancel",One=function(r){Kt(n,r);function n(){var t,i=n.prototype;return i.evTarget=Ene,i.evWin=Sne,t=r.apply(this,arguments)||this,t.started=!1,t}var e=n.prototype;return e.handler=function(i){var a=_ne[i.type];if(a===ct&&(this.started=!0),!!this.started){var o=Tne.call(this,i,a);a&(Fe|Ot)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:Uo,srcEvent:i})}},n}(ga);function Tne(r,n){var e=to(r.touches),t=to(r.changedTouches);return n&(Fe|Ot)&&(e=bv(e.concat(t),"identifier",!0)),[e,t]}function QS(r,n,e){var t="DEPRECATED METHOD: "+n+`
70
+ `+e+` AT
71
+ `;return function(){var i=new Error("get-stack-trace"),a=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,t,a),r.apply(this,arguments)}}var JS=QS(function(r,n,e){for(var t=Object.keys(n),i=0;i<t.length;)(!e||e&&r[t[i]]===void 0)&&(r[t[i]]=n[t[i]]),i++;return r},"extend","Use `assign`."),kne=QS(function(r,n){return JS(r,n,!0)},"merge","Use `assign`.");function Pne(r,n,e){var t=n.prototype,i;i=r.prototype=Object.create(t),i.constructor=r,i._super=t,e&&Bi(i,e)}function Bb(r,n){return function(){return r.apply(n,arguments)}}var ZS=function(){var r=function(e,t){return t===void 0&&(t={}),new Fb(e,ir({recognizers:Rb.concat()},t))};return r.VERSION="2.0.17-rc",r.DIRECTION_ALL=MS,r.DIRECTION_DOWN=zn,r.DIRECTION_LEFT=Go,r.DIRECTION_RIGHT=Ko,r.DIRECTION_UP=qo,r.DIRECTION_HORIZONTAL=gr,r.DIRECTION_VERTICAL=xi,r.DIRECTION_NONE=$u,r.DIRECTION_DOWN=zn,r.INPUT_START=ct,r.INPUT_MOVE=tn,r.INPUT_END=Fe,r.INPUT_CANCEL=Ot,r.STATE_POSSIBLE=Gs,r.STATE_BEGAN=Ht,r.STATE_CHANGED=Hn,r.STATE_ENDED=Jr,r.STATE_RECOGNIZED=Ir,r.STATE_CANCELLED=ro,r.STATE_FAILED=hr,r.Manager=Fb,r.Input=ga,r.TouchAction=FS,r.TouchInput=$v,r.MouseInput=wv,r.PointerEventInput=WS,r.TouchMouseInput=VS,r.SingleTouchInput=One,r.Recognizer=Yo,r.AttrRecognizer=Wn,r.Tap=Kc,r.Pan=_v,r.Swipe=GS,r.Pinch=KS,r.Rotate=qS,r.Press=YS,r.on=Ra,r.off=Ma,r.each=Pr,r.merge=kne,r.extend=JS,r.bindFn=Bb,r.assign=Bi,r.inherit=Pne,r.bindFn=Bb,r.prefixed=Sl,r.toArray=to,r.inArray=ji,r.uniqueArray=bv,r.splitStr=eo,r.boolOrFn=Ol,r.hasParent=mv,r.addEventListeners=Ra,r.removeEventListeners=Ma,r.defaults=Bi({},XS,{preset:Rb}),r}();ZS.defaults;var Ine=ZS;function eO(r,n){var e=typeof li<"u"&&Zi(r)||r["@@iterator"];if(!e){if(se(r)||(e=Cne(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
72
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Cne(r,n){var e;if(r){if(typeof r=="string")return Lb(r,n);var t=rt(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Ji(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Lb(r,n)}}function Lb(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}li("DELETE");function Tl(){for(var r=arguments.length,n=new Array(r),e=0;e<r;e++)n[e]=arguments[e];return Ane(n.length?n:[bu()])}function Ane(r){var n=xne(r),e=_e(n,3),t=e[0],i=e[1],a=e[2],o=1,s=function(){var l=2091639*t+o*23283064365386963e-26;return t=i,i=a,a=l-(o=l|0)};return s.uint32=function(){return s()*4294967296},s.fract53=function(){return s()+(s()*2097152|0)*11102230246251565e-32},s.algorithm="Alea",s.seed=r,s.version="0.9",s}function xne(){for(var r=Dne(),n=r(" "),e=r(" "),t=r(" "),i=0;i<arguments.length;i++)n-=r(i<0||arguments.length<=i?void 0:arguments[i]),n<0&&(n+=1),e-=r(i<0||arguments.length<=i?void 0:arguments[i]),e<0&&(e+=1),t-=r(i<0||arguments.length<=i?void 0:arguments[i]),t<0&&(t+=1);return[n,e,t]}function Dne(){var r=4022871197;return function(n){for(var e=n.toString(),t=0;t<e.length;t++){r+=e.charCodeAt(t);var i=.02519603282416938*r;r=i>>>0,i-=r,i*=r,r=i>>>0,i-=r,r+=i*4294967296}return(r>>>0)*23283064365386963e-26}}function Rne(){var r=function(){};return{on:r,off:r,destroy:r,emit:r,get:function(){return{set:r}}}}var Ev=typeof window<"u"?window.Hammer||Ine:function(){return Rne()};function cr(r){var n=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(){n._dom.overlay.parentNode.removeChild(n._dom.overlay)});var t=Ev(this._dom.overlay);t.on("tap",k(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){t.destroy()});var i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];he(i).call(i,function(a){t.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){Mne(a.target,r)||n.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",n._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&n.deactivate()}}rE(cr.prototype);cr.current=null;cr.prototype.destroy=function(){var r,n;this.deactivate();var e=eO(Ii(r=Tr(n=this._cleanupQueue).call(n,0)).call(r)),t;try{for(e.s();!(t=e.n()).done;){var i=t.value;i()}}catch(a){e.e(a)}finally{e.f()}};cr.prototype.activate=function(){cr.current&&cr.current.deactivate(),cr.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)};cr.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")};cr.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function Mne(r,n){for(;r;){if(r===n)return!0;r=r.parentNode}return!1}var Nne=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Fne=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Bne=/^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,Lne=/^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 Wr(r){if(r)for(;r.hasChildNodes()===!0;){var n=r.firstChild;n&&(Wr(n),r.removeChild(n))}}function Ur(r){return r instanceof String||typeof r=="string"}function jb(r){return de(r)==="object"&&r!==null}function zi(r,n,e,t){var i=!1;t===!0&&(i=n[e]===null&&r[e]!==void 0),i?delete r[e]:r[e]=n[e]}function tO(r,n){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(var t in r)if(n[t]!==void 0)if(n[t]===null||de(n[t])!=="object")zi(r,n,t,e);else{var i=r[t],a=n[t];jb(i)&&jb(a)&&tO(i,a,e)}}function ya(r,n,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(se(e))throw new TypeError("Arrays are not supported by deepExtend");for(var i=0;i<r.length;i++){var a=r[i];if(Object.prototype.hasOwnProperty.call(e,a))if(e[a]&&e[a].constructor===Object)n[a]===void 0&&(n[a]={}),n[a].constructor===Object?ve(n[a],e[a],!1,t):zi(n,e,a,t);else{if(se(e[a]))throw new TypeError("Arrays are not supported by deepExtend");zi(n,e,a,t)}}return n}function Eu(r,n,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(se(e))throw new TypeError("Arrays are not supported by deepExtend");for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&!vr(r).call(r,i))if(e[i]&&e[i].constructor===Object)n[i]===void 0&&(n[i]={}),n[i].constructor===Object?ve(n[i],e[i]):zi(n,e,i,t);else if(se(e[i])){n[i]=[];for(var a=0;a<e[i].length;a++)n[i].push(e[i][a])}else zi(n,e,i,t);return n}function ve(r,n){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 i in n)if(Object.prototype.hasOwnProperty.call(n,i)||e===!0)if(de(n[i])==="object"&&n[i]!==null&&bb(n[i])===Object.prototype)r[i]===void 0?r[i]=ve({},n[i],e):de(r[i])==="object"&&r[i]!==null&&bb(r[i])===Object.prototype?ve(r[i],n[i],e):zi(r,n,i,t);else if(se(n[i])){var a;r[i]=rt(a=n[i]).call(a)}else zi(r,n,i,t);return r}function Su(r,n){var e;return vv(e=[]).call(e,lr(r),[n])}function jne(r){return rt(r).call(r)}function zne(r){return r.getBoundingClientRect().left}function Hne(r){return r.getBoundingClientRect().top}function te(r,n){if(se(r))for(var e=r.length,t=0;t<e;t++)n(r[t],t,r);else for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&n(r[i],i,r)}function Wne(r,n,e,t){if(r.addEventListener){var i;t===void 0&&(t=!1),n==="mousewheel"&&vr(i=navigator.userAgent).call(i,"Firefox")&&(n="DOMMouseScroll"),r.addEventListener(n,e,t)}else r.attachEvent("on"+n,e)}function Vne(r,n,e,t){if(r.removeEventListener){var i;t===void 0&&(t=!1),n==="mousewheel"&&vr(i=navigator.userAgent).call(i,"Firefox")&&(n="DOMMouseScroll"),r.removeEventListener(n,e,t)}else r.detachEvent("on"+n,e)}function Sv(r){var n;switch(r.length){case 3:case 4:return n=Fne.exec(r),n?{r:Jt(n[1]+n[1],16),g:Jt(n[2]+n[2],16),b:Jt(n[3]+n[3],16)}:null;case 6:case 7:return n=Nne.exec(r),n?{r:Jt(n[1],16),g:Jt(n[2],16),b:Jt(n[3],16)}:null;default:return null}}function jt(r,n){if(vr(r).call(r,"rgba"))return r;if(vr(r).call(r,"rgb")){var e=r.substr(re(r).call(r,"(")+1).replace(")","").split(",");return"rgba("+e[0]+","+e[1]+","+e[2]+","+n+")"}else{var t=Sv(r);return t==null?r:"rgba("+t.r+","+t.g+","+t.b+","+n+")"}}function rO(r,n,e){var t;return"#"+rt(t=((1<<24)+(r<<16)+(n<<8)+e).toString(16)).call(t,1)}function qc(r,n){if(Ur(r)){var e=r;if(nO(e)){var t,i=jn(t=e.substr(4).substr(0,e.length-5).split(",")).call(t,function(c){return Jt(c)});e=rO(i[0],i[1],i[2])}if(iO(e)===!0){var a=Une(e),o={h:a.h,s:a.s*.8,v:Math.min(1,a.v*1.02)},s={h:a.h,s:Math.min(1,a.s*1.25),v:a.v*.8},u=Yc(s.h,s.s,s.v),l=Yc(o.h,o.s,o.v);return{background:e,border:u,highlight:{background:l,border:u},hover:{background:l,border:u}}}else return{background:e,border:e,highlight:{background:e,border:e},hover:{background:e,border:e}}}else if(n){var d={background:r.background||n.background,border:r.border||n.border,highlight:Ur(r.highlight)?{border:r.highlight,background:r.highlight}:{background:r.highlight&&r.highlight.background||n.highlight.background,border:r.highlight&&r.highlight.border||n.highlight.border},hover:Ur(r.hover)?{border:r.hover,background:r.hover}:{border:r.hover&&r.hover.border||n.hover.border,background:r.hover&&r.hover.background||n.hover.background}};return d}else{var h={background:r.background||void 0,border:r.border||void 0,highlight:Ur(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:Ur(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 h}}function ka(r,n,e){r=r/255,n=n/255,e=e/255;var t=Math.min(r,Math.min(n,e)),i=Math.max(r,Math.max(n,e));if(t===i)return{h:0,s:0,v:t};var a=r===t?n-e:e===t?r-n:e-r,o=r===t?3:e===t?1:5,s=60*(o-a/(i-t))/360,u=(i-t)/i,l=i;return{h:s,s:u,v:l}}function Ks(r,n,e){var t,i,a,o=Math.floor(r*6),s=r*6-o,u=e*(1-n),l=e*(1-s*n),d=e*(1-(1-s)*n);switch(o%6){case 0:t=e,i=d,a=u;break;case 1:t=l,i=e,a=u;break;case 2:t=u,i=e,a=d;break;case 3:t=u,i=l,a=e;break;case 4:t=d,i=u,a=e;break;case 5:t=e,i=u,a=l;break}return{r:Math.floor(t*255),g:Math.floor(i*255),b:Math.floor(a*255)}}function Yc(r,n,e){var t=Ks(r,n,e);return rO(t.r,t.g,t.b)}function Une(r){var n=Sv(r);if(!n)throw new TypeError("'".concat(r,"' is not a valid color."));return ka(n.r,n.g,n.b)}function iO(r){var n=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(r);return n}function nO(r){return Bne.test(r)}function Gne(r){return Lne.test(r)}function Zr(r){if(r===null||de(r)!=="object")return null;if(r instanceof Element)return r;var n=Ci(r);for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&de(r[e])=="object"&&(n[e]=Zr(r[e]));return n}function Lt(r,n,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=function(v){return v!=null},a=function(v){return v!==null&&de(v)==="object"},o=function(v){for(var p in v)if(Object.prototype.hasOwnProperty.call(v,p))return!1;return!0};if(!a(r))throw new Error("Parameter mergeTarget must be an object");if(!a(n))throw new Error("Parameter options must be an object");if(!i(e))throw new Error("Parameter option must have a value");if(!a(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])},u=n[e],l=a(t)&&!o(t),d=l?t[e]:void 0,h=d?d.enabled:void 0;if(u!==void 0){if(typeof u=="boolean"){a(r[e])||(r[e]={}),r[e].enabled=u;return}if(u===null&&!a(r[e]))if(i(d))r[e]=Ci(d);else return;if(a(u)){var c=!0;u.enabled!==void 0?c=u.enabled:h!==void 0&&(c=d.enabled),s(r,n,e),r[e].enabled=c}}}var Kne={linear:function(n){return n},easeInQuad:function(n){return n*n},easeOutQuad:function(n){return n*(2-n)},easeInOutQuad:function(n){return n<.5?2*n*n:-1+(4-2*n)*n},easeInCubic:function(n){return n*n*n},easeOutCubic:function(n){return--n*n*n+1},easeInOutCubic:function(n){return n<.5?4*n*n*n:(n-1)*(2*n-2)*(2*n-2)+1},easeInQuart:function(n){return n*n*n*n},easeOutQuart:function(n){return 1- --n*n*n*n},easeInOutQuart:function(n){return n<.5?8*n*n*n*n:1-8*--n*n*n*n},easeInQuint:function(n){return n*n*n*n*n},easeOutQuint:function(n){return 1+--n*n*n*n*n},easeInOutQuint:function(n){return n<.5?16*n*n*n*n*n:1+16*--n*n*n*n*n}};function Vr(r,n){var e;se(n)||(n=[n]);var t=eO(r),i;try{for(t.s();!(i=t.n()).done;){var a=i.value;if(a){e=a[n[0]];for(var o=1;o<n.length;o++)e&&(e=e[n[o]]);if(typeof e<"u")break}}}catch(s){t.e(s)}finally{t.f()}return e}var qne={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"},Yne=function(){function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;x(this,r),this.pixelRatio=n,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return 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 qne[e]}},{key:"setColor",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e!=="none"){var i,a=this._isColorString(e);if(a!==void 0&&(e=a),Ur(e)===!0){if(nO(e)===!0){var o=e.substr(4).substr(0,e.length-5).split(",");i={r:o[0],g:o[1],b:o[2],a:1}}else if(Gne(e)===!0){var s=e.substr(5).substr(0,e.length-6).split(",");i={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(iO(e)===!0){var u=Sv(e);i={r:u.r,g:u.g,b:u.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){var l=e.a!==void 0?e.a:"1.0";i={r:e.r,g:e.g,b:e.b,a:l}}if(i===void 0)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+Wo(e));this._setColor(i,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=Ne({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",pr(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=Ne({},e)),this.color=e;var i=ka(e.r,e.g,e.b),a=2*Math.PI,o=this.r*i.s,s=this.centerCoordinates.x+o*Math.sin(a*i.h),u=this.centerCoordinates.y+o*Math.cos(a*i.h);this.colorPickerSelector.style.left=s-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=u-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(e)}},{key:"_setOpacity",value:function(e){this.color.a=e/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(e){var t=ka(this.color.r,this.color.g,this.color.b);t.v=e/100;var i=Ks(t.h,t.s,t.v);i.a=this.color.a,this.color=i,this._updatePicker()}},{key:"_updatePicker",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,t=ka(e.r,e.g,e.b),i=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var a=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,a,o),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-t.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),Vo(i).call(i),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{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,i,a;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var s=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var o=document.createElement("DIV");o.style.color="red",o.style.fontWeight="bold",o.style.padding="10px",o.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(o)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch{}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch{}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var u=this;this.opacityRange.onchange=function(){u._setOpacity(this.value)},this.opacityRange.oninput=function(){u._setOpacity(this.value)},this.brightnessRange.onchange=function(){u._setBrightness(this.value)},this.brightnessRange.oninput=function(){u._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=k(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=k(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=k(i=this._save).call(i,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=k(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 Ev(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,i=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,i);var a,o,s,u;this.centerCoordinates={x:t*.5,y:i*.5},this.r=.49*t;var l=2*Math.PI/360,d=1/360,h=1/this.r,c;for(s=0;s<360;s++)for(u=0;u<this.r;u++)a=this.centerCoordinates.x+u*Math.sin(l*s),o=this.centerCoordinates.y+u*Math.cos(l*s),c=Ks(s*d,u*h,1),e.fillStyle="rgb("+c.r+","+c.g+","+c.b+")",e.fillRect(a-.5,o-.5,2,2);e.strokeStyle="rgba(0,0,0,1)",e.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),e.stroke(),this.hueCircle=e.getImageData(0,0,t,i)}this.generated=!0}},{key:"_moveSelector",value:function(e){var t=this.colorPickerDiv.getBoundingClientRect(),i=e.center.x-t.left,a=e.center.y-t.top,o=.5*this.colorPickerDiv.clientHeight,s=.5*this.colorPickerDiv.clientWidth,u=i-s,l=a-o,d=Math.atan2(u,l),h=.98*Math.min(Math.sqrt(u*u+l*l),s),c=Math.cos(d)*h+o,f=Math.sin(d)*h+s;this.colorPickerSelector.style.top=c-.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=h/this.r,g=ka(this.color.r,this.color.g,this.color.b);g.h=v,g.s=p;var y=Ks(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 Xc(){for(var r=arguments.length,n=new Array(r),e=0;e<r;e++)n[e]=arguments[e];if(n.length<1)throw new TypeError("Invalid arguments.");if(n.length===1)return document.createTextNode(n[0]);var t=document.createElement(n[0]);return t.appendChild(Xc.apply(void 0,lr(rt(n).call(n,1)))),t}var Xne=function(){function r(n,e,t){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){return!1};x(this,r),this.parent=n,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.hideOption=a,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},Ne(this.options,this.defaultOptions),this.configureOptions=t,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new Yne(i),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(se(e))this.options.filter=e.join();else if(de(e)==="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),Et(e)!==void 0&&(this.options.filter=Et(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);Et(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=Et(this.options),t=0,i=!1;for(var a in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,a)&&(this.allowCreation=!1,i=!1,typeof e=="function"?(i=e(a,[]),i=i||this._handleObject(this.configureOptions[a],[a],!0)):(e===!0||re(e).call(e,a)!==-1)&&(i=!0),i!==!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,i=0;i<e.length;i++)if(t[e[i]]!==void 0)t=t[e[i]];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 i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;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 i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=document.createElement("div");if(a.className="vis-configuration vis-config-label vis-config-s"+t.length,i===!0){for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(Xc("i","b",e))}else a.innerText=e+":";return a}},{key:"_makeDropdown",value:function(e,t,i){var a=document.createElement("select");a.className="vis-configuration vis-config-select";var o=0;t!==void 0&&re(e).call(e,t)!==-1&&(o=re(e).call(e,t));for(var s=0;s<e.length;s++){var u=document.createElement("option");u.value=e[s],s===o&&(u.selected="selected"),u.innerText=e[s],a.appendChild(u)}var l=this;a.onchange=function(){l._update(this.value,i)};var d=this._makeLabel(i[i.length-1],i);this._makeItem(i,d,a)}},{key:"_makeRange",value:function(e,t,i){var a=e[0],o=e[1],s=e[2],u=e[3],l=document.createElement("input");l.className="vis-configuration vis-config-range";try{l.type="range",l.min=o,l.max=s}catch{}l.step=u;var d="",h=0;if(t!==void 0){var c=1.2;t<0&&t*c<o?(l.min=Math.ceil(t*c),h=l.min,d="range increased"):t/c<o&&(l.min=Math.ceil(t/c),h=l.min,d="range increased"),t*c>s&&s!==1&&(l.max=Math.ceil(t*c),h=l.max,d="range increased"),l.value=t}else l.value=a;var f=document.createElement("input");f.className="vis-configuration vis-config-rangeinput",f.value=l.value;var v=this;l.onchange=function(){f.value=this.value,v._update(Number(this.value),i)},l.oninput=function(){f.value=this.value};var p=this._makeLabel(i[i.length-1],i),g=this._makeItem(i,p,l,f);d!==""&&this.popupHistory[g]!==h&&(this.popupHistory[g]=h,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 i=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){var a=document.createElement("div");a.id="vis-configuration-popup",a.className="vis-configuration-popup",a.innerText=e,a.onclick=function(){i._removePopup()},this.popupCounter+=1,this.popupDiv={html:a,index: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],i=t.getBoundingClientRect();this.popupDiv.html.style.left=i.left+"px",this.popupDiv.html.style.top=i.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=pr(function(){e.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=pr(function(){e._removePopup()},1800)}}},{key:"_makeCheckbox",value:function(e,t,i){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&&(de(e)==="object"?t!==e.enabled&&this.changedOptions.push({path:i,value:t}):this.changedOptions.push({path:i,value:t})));var o=this;a.onchange=function(){o._update(this.checked,i)};var s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,a)}},{key:"_makeTextInput",value:function(e,t,i){var a=document.createElement("input");a.type="text",a.className="vis-configuration vis-config-text",a.value=t,t!==e&&this.changedOptions.push({path:i,value:t});var o=this;a.onchange=function(){o._update(this.value,i)};var s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,a)}},{key:"_makeColorField",value:function(e,t,i){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,i)};var u=this._makeLabel(i[i.length-1],i);this._makeItem(i,u,s)}},{key:"_showColorPicker",value:function(e,t,i){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,i)}),this.colorPicker.setCloseCallback(function(){t.onclick=function(){a._showColorPicker(e,t,i)}})}},{key:"_handleObject",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=!1,o=Et(this.options),s=!1;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){a=!0;var l=e[u],d=Su(t,u);if(typeof o=="function"&&(a=o(u,t),a===!1&&!se(l)&&typeof l!="string"&&typeof l!="boolean"&&l instanceof Object&&(this.allowCreation=!1,a=this._handleObject(l,d,!0),this.allowCreation=i===!1)),a!==!1){s=!0;var h=this._getValue(d);if(se(l))this._handleArray(l,h,d);else if(typeof l=="string")this._makeTextInput(l,h,d);else if(typeof l=="boolean")this._makeCheckbox(l,h,d);else if(l instanceof Object){if(!this.hideOption(t,u,this.moduleOptions))if(l.enabled!==void 0){var c=Su(d,"enabled"),f=this._getValue(c);if(f===!0){var v=this._makeLabel(u,d,!0);this._makeItem(d,v),s=this._handleObject(l,d)||s}else this._makeCheckbox(l,f,d)}else{var p=this._makeLabel(u,d,!0);this._makeItem(d,p),s=this._handleObject(l,d)||s}}else console.error("dont know how to handle",l,u,d)}}return s}},{key:"_handleArray",value:function(e,t,i){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,t,i),e[1]!==t&&this.changedOptions.push({path:i,value:t})):typeof e[0]=="string"?(this._makeDropdown(e,t,i),e[0]!==t&&this.changedOptions.push({path:i,value:t})):typeof e[0]=="number"&&(this._makeRange(e,t,i),e[0]!==t&&this.changedOptions.push({path:i,value:Number(t)}))}},{key:"_update",value:function(e,t){var i=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}},{key:"_constructOptions",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=i;e=e==="true"?!0:e,e=e==="false"?!1:e;for(var o=0;o<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 i}},{key:"_printOptions",value:function(){for(var e=this.getOptions();this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(Xc("pre","const options = "+Wo(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}(),Qne=function(){function r(n,e){x(this,r),this.container=n,this.overflowMethod=e||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}return D(r,[{key:"setPosition",value:function(e,t){this.x=Jt(e),this.y=Jt(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,i=this.frame.clientWidth,a=this.frame.parentNode.clientHeight,o=this.frame.parentNode.clientWidth,s=0,u=0;if(this.overflowMethod=="flip"){var l=!1,d=!0;this.y-t<this.padding&&(d=!1),this.x+i>o-this.padding&&(l=!0),l?s=this.x-i:s=this.x,d?u=this.y-t:u=this.y}else u=this.y-t,u+t+this.padding>a&&(u=a-t-this.padding),u<this.padding&&(u=this.padding),s=this.x,s+i+this.padding>o&&(s=o-i-this.padding),s<this.padding&&(s=this.padding);this.frame.style.left=s+"px",this.frame.style.top=u+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}},{key:"hide",value:function(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}},{key:"destroy",value:function(){this.frame.parentNode.removeChild(this.frame)}}]),r}(),wa=!1,zb,Qc="background: #FFeeee; color: #dd0000",Jne=function(){function r(){x(this,r)}return D(r,null,[{key:"validate",value:function(e,t,i){wa=!1,zb=t;var a=t;return i!==void 0&&(a=t[i]),r.parse(e,a,[]),wa}},{key:"parse",value:function(e,t,i){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.check(a,e,t,i)}},{key:"check",value:function(e,t,i,a){if(i[e]===void 0&&i.__any__===void 0){r.getSuggestion(e,i,a);return}var o=e,s=!0;i[e]===void 0&&i.__any__!==void 0&&(o="__any__",s=r.getType(t[e])==="object");var u=i[o];s&&u.__type__!==void 0&&(u=u.__type__),r.checkFields(e,t,i,o,u,a)}},{key:"checkFields",value:function(e,t,i,a,o,s){var u=function(c){console.error("%c"+c+r.printLocation(s,e),Qc)},l=r.getType(t[e]),d=o[l];d!==void 0?r.getType(d)==="array"&&re(d).call(d,t[e])===-1?(u('Invalid option detected in "'+e+'". Allowed values are:'+r.print(d)+' not "'+t[e]+'". '),wa=!0):l==="object"&&a!=="__any__"&&(s=Su(s,e),r.parse(t[e],i[a],s)):o.any===void 0&&(u('Invalid type received for "'+e+'". Expected: '+r.print($e(o))+". Received ["+l+'] "'+t[e]+'"'),wa=!0)}},{key:"getType",value:function(e){var t=de(e);return t==="object"?e===null?"null":e instanceof Boolean?"boolean":e instanceof Number?"number":e instanceof String?"string":se(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,i){var a=r.findInOptions(e,t,i,!1),o=r.findInOptions(e,zb,[],!0),s=8,u=4,l;a.indexMatch!==void 0?l=" in "+r.printLocation(a.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+a.indexMatch+`"?
73
+
74
+ `:o.distance<=u&&a.distance>o.distance?l=" in "+r.printLocation(a.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+r.printLocation(o.path,o.closestMatch,""):a.distance<=s?l='. Did you mean "'+a.closestMatch+'"?'+r.printLocation(a.path,e):l=". Did you mean one of these: "+r.print($e(t))+r.printLocation(i,e),console.error('%cUnknown option detected: "'+e+'"'+l,Qc),wa=!0}},{key:"findInOptions",value:function(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=1e9,s="",u=[],l=e.toLowerCase(),d=void 0;for(var h in t){var c=void 0;if(t[h].__type__!==void 0&&a===!0){var f=r.findInOptions(e,t[h],Su(i,h));o>f.distance&&(s=f.closestMatch,u=f.path,o=f.distance,d=f.indexMatch)}else{var v;re(v=h.toLowerCase()).call(v,l)!==-1&&(d=h),c=r.levenshteinDistance(e,h),o>c&&(s=h,u=jne(i),o=c)}}return{closestMatch:s,path:u,distance:o,indexMatch:d}}},{key:"printLocation",value:function(e,t){for(var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at:
75
+ `,a=`
76
+
77
+ `+i+`options = {
78
+ `,o=0;o<e.length;o++){for(var s=0;s<o+1;s++)a+=" ";a+=e[o]+`: {
79
+ `}for(var u=0;u<e.length+1;u++)a+=" ";a+=t+`
80
+ `;for(var l=0;l<e.length+1;l++){for(var d=0;d<e.length-l;d++)a+=" ";a+=`}
81
+ `}return a+`
82
+
83
+ `}},{key:"print",value:function(e){return Wo(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 i=[],a;for(a=0;a<=t.length;a++)i[a]=[a];var o;for(o=0;o<=e.length;o++)i[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)?i[a][o]=i[a-1][o-1]:i[a][o]=Math.min(i[a-1][o-1]+1,Math.min(i[a][o-1]+1,i[a-1][o]+1));return i[t.length][e.length]}}]),r}(),Zne=cr,eae=Xne,Cn=Ev,tae=Qne,aO=Qc,rae=Jne;function iae(r){return Kr=r,sae()}var oO={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},Ov=Ci(oO);Ov.color="color.color";Ov.style="dashes";var ut={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},Hb={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},Kr="",Vn=0,Z="",U="",bt=ut.NULL;function nae(){Vn=0,Z=Kr.charAt(0)}function ze(){Vn++,Z=Kr.charAt(Vn)}function vn(){return Kr.charAt(Vn+1)}function Wb(r){var n=r.charCodeAt(0);return n<47?n===35||n===46:n<59?n>47:n<91?n>64:n<96?n===95:n<123?n>96:!1}function ti(r,n){if(r||(r={}),n)for(var e in n)n.hasOwnProperty(e)&&(r[e]=n[e]);return r}function aae(r,n,e){for(var t=n.split("."),i=r;t.length;){var a=t.shift();t.length?(i[a]||(i[a]={}),i=i[a]):i[a]=e}}function sO(r,n){for(var e,t,i=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(n.id===o.nodes[e].id){i=o.nodes[e];break}}for(i||(i={id:n.id},r.node&&(i.attr=ti(i.attr,r.node))),e=a.length-1;e>=0;e--){var s,u=a[e];u.nodes||(u.nodes=[]),re(s=u.nodes).call(s,i)===-1&&u.nodes.push(i)}n.attr&&(i.attr=ti(i.attr,n.attr))}function oae(r,n){if(r.edges||(r.edges=[]),r.edges.push(n),r.edge){var e=ti({},r.edge);n.attr=ti(e,n.attr)}}function uO(r,n,e,t,i){var a={from:n,to:e,type:t};return r.edge&&(a.attr=ti({},r.edge)),a.attr=ti(a.attr||{},i),i!=null&&i.hasOwnProperty("arrows")&&i.arrows!=null&&(a.arrows={to:{enabled:!0,type:i.arrows.type}},i.arrows=null),a}function pe(){for(bt=ut.NULL,U="";Z===" "||Z===" "||Z===`
84
+ `||Z==="\r";)ze();do{var r=!1;if(Z==="#"){for(var n=Vn-1;Kr.charAt(n)===" "||Kr.charAt(n)===" ";)n--;if(Kr.charAt(n)===`
85
+ `||Kr.charAt(n)===""){for(;Z!=""&&Z!=`
86
+ `;)ze();r=!0}}if(Z==="/"&&vn()==="/"){for(;Z!=""&&Z!=`
87
+ `;)ze();r=!0}if(Z==="/"&&vn()==="*"){for(;Z!="";)if(Z==="*"&&vn()==="/"){ze(),ze();break}else ze();r=!0}for(;Z===" "||Z===" "||Z===`
88
+ `||Z==="\r";)ze()}while(r);if(Z===""){bt=ut.DELIMITER;return}var e=Z+vn();if(Hb[e]){bt=ut.DELIMITER,U=e,ze(),ze();return}if(Hb[Z]){bt=ut.DELIMITER,U=Z,ze();return}if(Wb(Z)||Z==="-"){for(U+=Z,ze();Wb(Z);)U+=Z,ze();U==="false"?U=!1:U==="true"?U=!0:isNaN(Number(U))||(U=Number(U)),bt=ut.IDENTIFIER;return}if(Z==='"'){for(ze();Z!=""&&(Z!='"'||Z==='"'&&vn()==='"');)Z==='"'?(U+=Z,ze()):Z==="\\"&&vn()==="n"?(U+=`
89
+ `,ze()):U+=Z,ze();if(Z!='"')throw lt('End of string " expected');ze(),bt=ut.IDENTIFIER;return}for(bt=ut.UNKNOWN;Z!="";)U+=Z,ze();throw new SyntaxError('Syntax error in part "'+cO(U,30)+'"')}function sae(){var r={};if(nae(),pe(),U==="strict"&&(r.strict=!0,pe()),(U==="graph"||U==="digraph")&&(r.type=U,pe()),bt===ut.IDENTIFIER&&(r.id=U,pe()),U!="{")throw lt("Angle bracket { expected");if(pe(),lO(r),U!="}")throw lt("Angle bracket } expected");if(pe(),U!=="")throw lt("End of file expected");return pe(),delete r.node,delete r.edge,delete r.graph,r}function lO(r){for(;U!==""&&U!="}";)uae(r),U===";"&&pe()}function uae(r){var n=dO(r);if(n){hO(r,n);return}var e=lae(r);if(!e){if(bt!=ut.IDENTIFIER)throw lt("Identifier expected");var t=U;if(pe(),U==="="){if(pe(),bt!=ut.IDENTIFIER)throw lt("Identifier expected");r[t]=U,pe()}else dae(r,t)}}function dO(r){var n=null;if(U==="subgraph"&&(n={},n.type="subgraph",pe(),bt===ut.IDENTIFIER&&(n.id=U,pe())),U==="{"){if(pe(),n||(n={}),n.parent=r,n.node=r.node,n.edge=r.edge,n.graph=r.graph,lO(n),U!="}")throw lt("Angle bracket } expected");pe(),delete n.node,delete n.edge,delete n.graph,delete n.parent,r.subgraphs||(r.subgraphs=[]),r.subgraphs.push(n)}return n}function lae(r){return U==="node"?(pe(),r.node=Na(),"node"):U==="edge"?(pe(),r.edge=Na(),"edge"):U==="graph"?(pe(),r.graph=Na(),"graph"):null}function dae(r,n){var e={id:n},t=Na();t&&(e.attr=t),sO(r,e),hO(r,n)}function hO(r,n){for(;U==="->"||U==="--";){var e,t=U;pe();var i=dO(r);if(i)e=i;else{if(bt!=ut.IDENTIFIER)throw lt("Identifier or subgraph expected");e=U,sO(r,{id:e}),pe()}var a=Na(),o=uO(r,n,e,t,a);oae(r,o),n=e}}function Na(){for(var r,n=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"},i=new Array,a=new Array;U==="[";){for(pe(),n={};U!==""&&U!="]";){if(bt!=ut.IDENTIFIER)throw lt("Attribute name expected");var o=U;if(pe(),U!="=")throw lt("Equal sign = expected");if(pe(),bt!=ut.IDENTIFIER)throw lt("Attribute value expected");var s=U;o==="style"&&(s=e[s]);var u;o==="arrowhead"&&(u=t[s],o="arrows",s={to:{enabled:!0,type:u}}),o==="arrowtail"&&(u=t[s],o="arrows",s={from:{enabled:!0,type:u}}),i.push({attr:n,name:o,value:s}),a.push(o),pe(),U==","&&pe()}if(U!="]")throw lt("Bracket ] expected");pe()}if(vr(a).call(a,"dir")){var l={};for(l.arrows={},r=0;r<i.length;r++)if(i[r].name==="arrows")if(i[r].value.to!=null)l.arrows.to=r;else if(i[r].value.from!=null)l.arrows.from=r;else throw lt("Invalid value of arrows");else i[r].name==="dir"&&(l.dir=r);var d=i[l.dir].value;if(!vr(a).call(a,"arrows"))if(d==="both")i.push({attr:i[l.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),l.arrows.to=i.length-1,i.push({attr:i[l.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),l.arrows.from=i.length-1;else if(d==="forward")i.push({attr:i[l.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),l.arrows.to=i.length-1;else if(d==="back")i.push({attr:i[l.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),l.arrows.from=i.length-1;else if(d==="none")i.push({attr:i[l.dir].attr,name:"arrows",value:""}),l.arrows.to=i.length-1;else throw lt('Invalid dir type "'+d+'"');var h,c;if(d==="both")l.arrows.to&&l.arrows.from?(c=i[l.arrows.to].value.to.type,h=i[l.arrows.from].value.from.type,i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:h}}},Tr(i).call(i,l.arrows.from,1)):l.arrows.to?(c=i[l.arrows.to].value.to.type,h="arrow",i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:h}}}):l.arrows.from&&(c="arrow",h=i[l.arrows.from].value.from.type,i[l.arrows.from]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:h}}});else if(d==="back")l.arrows.to&&l.arrows.from?(c="",h=i[l.arrows.from].value.from.type,i[l.arrows.from]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:h}}}):l.arrows.to?(c="",h="arrow",l.arrows.from=l.arrows.to,i[l.arrows.from]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:h}}}):l.arrows.from&&(c="",h=i[l.arrows.from].value.from.type,i[l.arrows.to]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:h}}}),i[l.arrows.from]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{from:{enabled:!0,type:i[l.arrows.from].value.from.type}}};else if(d==="none"){var f;l.arrows.to?f=l.arrows.to:f=l.arrows.from,i[f]={attr:i[f].attr,name:i[f].name,value:""}}else if(d==="forward")l.arrows.to&&l.arrows.from?(c=i[l.arrows.to].value.to.type,h="",i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:h}}}):l.arrows.to?(c=i[l.arrows.to].value.to.type,h="",i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:h}}}):l.arrows.from&&(c="arrow",h="",l.arrows.to=l.arrows.from,i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:h}}}),i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:i[l.arrows.to].value.to.type}}};else throw lt('Invalid dir type "'+d+'"');Tr(i).call(i,l.dir,1)}var v;if(vr(a).call(a,"penwidth")){var p=[];for(v=i.length,r=0;r<v;r++)i[r].name!=="width"&&(i[r].name==="penwidth"&&(i[r].name="width"),p.push(i[r]));i=p}for(v=i.length,r=0;r<v;r++)aae(i[r].attr,i[r].name,i[r].value);return n}function lt(r){return new SyntaxError(r+', got "'+cO(U,30)+'" (char '+Vn+")")}function cO(r,n){return r.length<=n?r:r.substr(0,27)+"..."}function hae(r,n,e){se(r)?he(r).call(r,function(t){se(n)?he(n).call(n,function(i){e(t,i)}):e(t,n)}):se(n)?he(n).call(n,function(t){e(r,t)}):e(r,n)}function Ah(r,n,e){for(var t=n.split("."),i=t.pop(),a=r,o=0;o<t.length;o++){var s=t[o];s in a||(a[s]={}),a=a[s]}return a[i]=e,r}function Vb(r,n){var e={};for(var t in r)if(r.hasOwnProperty(t)){var i=n[t];se(i)?he(i).call(i,function(a){Ah(e,a,r[t])}):typeof i=="string"?Ah(e,i,r[t]):Ah(e,t,r[t])}return e}function cae(r){var n=iae(r),e={nodes:[],edges:[],options:{}};if(n.nodes){var t;he(t=n.nodes).call(t,function(o){var s={id:o.id,label:String(o.label||o.id)};ti(s,Vb(o.attr,oO)),s.image&&(s.shape="image"),e.nodes.push(s)})}if(n.edges){var i,a=function(s){var u={from:s.from,to:s.to};return ti(u,Vb(s.attr,Ov)),u.arrows==null&&s.type==="->"&&(u.arrows="to"),u};he(i=n.edges).call(i,function(o){var s,u;if(o.from instanceof Object?s=o.from.nodes:s={id:o.from},o.to instanceof Object?u=o.to.nodes:u={id:o.to},o.from instanceof Object&&o.from.edges){var l;he(l=o.from.edges).call(l,function(h){var c=a(h);e.edges.push(c)})}if(hae(s,u,function(h,c){var f=uO(e,h.id,c.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(h){var c=a(h);e.edges.push(c)})}})}return n.attr&&(e.options=n.attr),e}function fae(r,n){var e,t={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};n!=null&&(n.fixed!=null&&(t.nodes.fixed=n.fixed),n.parseColor!=null&&(t.nodes.parseColor=n.parseColor),n.inheritColor!=null&&(t.edges.inheritColor=n.inheritColor));var i=r.edges,a=jn(i).call(i,function(s){var u={from:s.source,id:s.id,to:s.target};return s.attributes!=null&&(u.attributes=s.attributes),s.label!=null&&(u.label=s.label),s.attributes!=null&&s.attributes.title!=null&&(u.title=s.attributes.title),s.type==="Directed"&&(u.arrows="to"),s.color&&t.edges.inheritColor===!1&&(u.color=s.color),u}),o=jn(e=r.nodes).call(e,function(s){var u={id:s.id,fixed:t.nodes.fixed&&s.x!=null&&s.y!=null};return s.attributes!=null&&(u.attributes=s.attributes),s.label!=null&&(u.label=s.label),s.size!=null&&(u.size=s.size),s.attributes!=null&&s.attributes.title!=null&&(u.title=s.attributes.title),s.title!=null&&(u.title=s.title),s.x!=null&&(u.x=s.x),s.y!=null&&(u.y=s.y),s.color!=null&&(t.nodes.parseColor===!0?u.color=s.color:u.color={background:s.color,border:s.color,highlight:{background:s.color,border:s.color},hover:{background:s.color,border:s.color}}),u});return{nodes:o,edges:a}}var vae={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"},pae={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"},gae={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"},yae={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"},mae={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"},bae={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ó"},$ae={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},wae={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},_ae={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},Eae={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"},Sae={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"},Oae=Object.freeze({__proto__:null,cn:wae,cs:Sae,de:pae,en:vae,es:gae,fr:Eae,it:yae,nl:mae,pt:bae,ru:$ae,uk:_ae});function Tae(r,n){try{var e=n.split(/[-_ /]/,2),t=_e(e,2),i=t[0],a=t[1],o=i!=null?i.toLowerCase():null,s=a!=null?a.toUpperCase():null;if(o&&s){var u=o+"-"+s;if(Object.prototype.hasOwnProperty.call(r,u))return u;var l;console.warn(vv(l="Unknown variant ".concat(s," of language ")).call(l,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(n,", falling back to English.")),"en"}catch(h){return console.error(h),console.warn("Unexpected error while normalizing locale ".concat(n,", falling back to English.")),"en"}}var kae=function(){function r(){x(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 i=Math.floor(t/2),a=Math.floor(t/4),o=Math.floor(t/8),s=Math.floor(t/16),u=Math.floor(e/2),l=Math.floor(e/4),d=Math.floor(e/8),h=Math.floor(e/16);this.canvas.width=3*l,this.canvas.height=i,this.coordinates=[[0,0,u,i],[u,0,l,a],[u,a,d,o],[5*d,a,h,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 i=1;i<this.NUM_ITERATIONS;i++){var a=this.coordinates[i-1],o=this.coordinates[i];e.drawImage(this.canvas,a[0],a[1],a[2],a[3],o[0],o[1],o[2],o[3])}}},{key:"drawImageAtPosition",value:function(e,t,i,a,o,s){if(this.initialized())if(t>2){t*=.5;for(var u=0;t>2&&u<this.NUM_ITERATIONS;)t*=.5,u+=1;u>=this.NUM_ITERATIONS&&(u=this.NUM_ITERATIONS-1);var l=this.coordinates[u];e.drawImage(this.canvas,l[0],l[1],l[2],l[3],i,a,o,s)}else e.drawImage(this.image,i,a,o,s)}}]),r}(),Pae=function(){function r(n){x(this,r),this.images={},this.imageBroken={},this.callback=n}return D(r,[{key:"_tryloadBrokenUrl",value:function(e,t,i){if(!(e===void 0||i===void 0)){if(t===void 0){console.warn("No broken url image defined");return}i.image.onerror=function(){console.error("Could not load brokenImage:",t)},i.image.src=t}}},{key:"_redrawWithImage",value:function(e){this.callback&&this.callback(e)}},{key:"load",value:function(e,t){var i=this,a=this.images[e];if(a)return a;var o=new kae;return this.images[e]=o,o.image.onload=function(){i._fixImageCoordinates(o.image),o.init(),i._redrawWithImage(o)},o.image.onerror=function(){console.error("Could not load image:",e),i._tryloadBrokenUrl(e,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}(),fO={exports:{}},Iae=ie,Cae=Iae(function(){if(typeof ArrayBuffer=="function"){var r=new ArrayBuffer(8);Object.isExtensible(r)&&Object.defineProperty(r,"a",{value:8})}}),Aae=ie,xae=qe,Dae=Fr,Ub=Cae,qs=Object.isExtensible,Rae=Aae(function(){qs(1)}),Mae=Rae||Ub?function(n){return!xae(n)||Ub&&Dae(n)==="ArrayBuffer"?!1:qs?qs(n):!0}:qs,Nae=ie,vO=!Nae(function(){return Object.isExtensible(Object.preventExtensions({}))}),Fae=G,Bae=ae,Lae=Mo,jae=qe,Tv=Ye,zae=Nt.f,Gb=Lo,Hae=yl,kv=Mae,Wae=ol,Vae=vO,pO=!1,Dr=Wae("meta"),Uae=0,Pv=function(r){zae(r,Dr,{value:{objectID:"O"+Uae++,weakData:{}}})},Gae=function(r,n){if(!jae(r))return typeof r=="symbol"?r:(typeof r=="string"?"S":"P")+r;if(!Tv(r,Dr)){if(!kv(r))return"F";if(!n)return"E";Pv(r)}return r[Dr].objectID},Kae=function(r,n){if(!Tv(r,Dr)){if(!kv(r))return!0;if(!n)return!1;Pv(r)}return r[Dr].weakData},qae=function(r){return Vae&&pO&&kv(r)&&!Tv(r,Dr)&&Pv(r),r},Yae=function(){Xae.enable=function(){},pO=!0;var r=Gb.f,n=Bae([].splice),e={};e[Dr]=1,r(e).length&&(Gb.f=function(t){for(var i=r(t),a=0,o=i.length;a<o;a++)if(i[a]===Dr){n(i,a,1);break}return i},Fae({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Hae.f}))},Xae=fO.exports={enable:Yae,fastKey:Gae,getWeakData:Kae,onFreeze:qae};Lae[Dr]=!0;var kl=fO.exports,Qae=Do,Jae=Mt,Zae=Ft,eoe=ua,toe=pE,roe=Gt,Kb=Re,ioe=$E,noe=pl,qb=vE,aoe=TypeError,Ys=function(r,n){this.stopped=r,this.result=n},Yb=Ys.prototype,Iv=function(r,n,e){var t=e&&e.that,i=!!(e&&e.AS_ENTRIES),a=!!(e&&e.IS_RECORD),o=!!(e&&e.IS_ITERATOR),s=!!(e&&e.INTERRUPTED),u=Qae(n,t),l,d,h,c,f,v,p,g=function(m){return l&&qb(l,"normal",m),new Ys(!0,m)},y=function(m){return i?(Zae(m),s?u(m[0],m[1],g):u(m[0],m[1])):s?u(m,g):u(m)};if(a)l=r.iterator;else if(o)l=r;else{if(d=noe(r),!d)throw new aoe(eoe(r)+" is not iterable");if(toe(d)){for(h=0,c=roe(r);c>h;h++)if(f=y(r[h]),f&&Kb(Yb,f))return f;return new Ys(!1)}l=ioe(r,d)}for(v=a?r.next:l.next;!(p=Jae(v,l)).done;){try{f=y(p.value)}catch(m){qb(l,"throw",m)}if(typeof f=="object"&&f&&Kb(Yb,f))return f}return new Ys(!1)},ooe=Re,soe=TypeError,Cv=function(r,n){if(ooe(n,r))return r;throw new soe("Incorrect invocation")},uoe=G,loe=Te,doe=kl,hoe=ie,coe=da,foe=Iv,voe=Cv,poe=Ge,goe=qe,yoe=oa,moe=ca,boe=Nt.f,$oe=ui.forEach,woe=Ke,gO=Qi,_oe=gO.set,Eoe=gO.getterFor,Av=function(r,n,e){var t=r.indexOf("Map")!==-1,i=r.indexOf("Weak")!==-1,a=t?"set":"add",o=loe[r],s=o&&o.prototype,u={},l;if(!woe||!poe(o)||!(i||s.forEach&&!hoe(function(){new o().entries().next()})))l=e.getConstructor(n,r,t,a),doe.enable();else{l=n(function(c,f){_oe(voe(c,d),{type:r,collection:new o}),yoe(f)||foe(f,c[a],{that:c,AS_ENTRIES:t})});var d=l.prototype,h=Eoe(r);$oe(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(c){var f=c==="add"||c==="set";c in s&&!(i&&c==="clear")&&coe(d,c,function(v,p){var g=h(this).collection;if(!f&&i&&!goe(v))return c==="get"?void 0:!1;var y=g[c](v===0?0:v,p);return f?this:y})}),i||boe(d,"size",{configurable:!0,get:function(){return h(this).collection.size}})}return moe(l,r,!1,!0),u[r]=l,uoe({global:!0,forced:!0},u),i||e.setStrong(l,r,t),l},Soe=Fo,xv=function(r,n,e){for(var t in n)e&&e.unsafe&&r[t]?r[t]=n[t]:Soe(r,t,n[t],e);return r},Ooe=Ut,Toe=uv,koe=ke,Poe=Ke,Xb=koe("species"),Ioe=function(r){var n=Ooe(r);Poe&&n&&!n[Xb]&&Toe(n,Xb,{configurable:!0,get:function(){return this}})},Coe=ha,Aoe=uv,Qb=xv,xoe=Do,Doe=Cv,Roe=oa,Moe=Iv,Noe=iv,Is=nv,Foe=Ioe,_a=Ke,Jb=kl.fastKey,yO=Qi,Zb=yO.set,xh=yO.getterFor,mO={getConstructor:function(r,n,e,t){var i=r(function(l,d){Doe(l,a),Zb(l,{type:n,index:Coe(null),first:void 0,last:void 0,size:0}),_a||(l.size=0),Roe(d)||Moe(d,l[t],{that:l,AS_ENTRIES:e})}),a=i.prototype,o=xh(n),s=function(l,d,h){var c=o(l),f=u(l,d),v,p;return f?f.value=h:(c.last=f={index:p=Jb(d,!0),key:d,value:h,previous:v=c.last,next:void 0,removed:!1},c.first||(c.first=f),v&&(v.next=f),_a?c.size++:l.size++,p!=="F"&&(c.index[p]=f)),l},u=function(l,d){var h=o(l),c=Jb(d),f;if(c!=="F")return h.index[c];for(f=h.first;f;f=f.next)if(f.key===d)return f};return Qb(a,{clear:function(){for(var d=this,h=o(d),c=h.index,f=h.first;f;)f.removed=!0,f.previous&&(f.previous=f.previous.next=void 0),delete c[f.index],f=f.next;h.first=h.last=void 0,_a?h.size=0:d.size=0},delete:function(l){var d=this,h=o(d),c=u(d,l);if(c){var f=c.next,v=c.previous;delete h.index[c.index],c.removed=!0,v&&(v.next=f),f&&(f.previous=v),h.first===c&&(h.first=f),h.last===c&&(h.last=v),_a?h.size--:d.size--}return!!c},forEach:function(d){for(var h=o(this),c=xoe(d,arguments.length>1?arguments[1]:void 0),f;f=f?f.next:h.first;)for(c(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(d){return!!u(this,d)}}),Qb(a,e?{get:function(d){var h=u(this,d);return h&&h.value},set:function(d,h){return s(this,d===0?0:d,h)}}:{add:function(d){return s(this,d=d===0?0:d,d)}}),_a&&Aoe(a,"size",{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(r,n,e){var t=n+" Iterator",i=xh(n),a=xh(t);Noe(r,n,function(o,s){Zb(this,{type:t,target:o,state:i(o),kind:s,last:void 0})},function(){for(var o=a(this),s=o.kind,u=o.last;u&&u.removed;)u=u.previous;return!o.target||!(o.last=u=u?u.next:o.state.first)?(o.target=void 0,Is(void 0,!0)):Is(s==="keys"?u.key:s==="values"?u.value:[u.key,u.value],!1)},e?"entries":"values",!e,!0),Foe(n)}},Boe=Av,Loe=mO;Boe("Map",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},Loe);var joe=ne,zoe=joe.Map,Hoe=zoe,Woe=Hoe,Voe=Woe,bO=H(Voe),Uoe=function(){function r(){x(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},Ne(this.options,this.defaultOptions)}return D(r,[{key:"setOptions",value:function(e){var t=["useDefaultGroups"];if(e!==void 0){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&re(t).call(t,i)===-1){var a=e[i];this.add(i,a)}}}},{key:"clear",value:function(){this._groups=new bO,this._groupNames=[]}},{key:"get",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this._groups.get(e);if(i===void 0&&t)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){var a=this._groupIndex%this._groupNames.length;++this._groupIndex,i={},i.color=this._groups.get(this._groupNames[a]),this._groups.set(e,i)}else{var o=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,i={},i.color=this._defaultGroups[o],this._groups.set(e,i)}return i}},{key:"add",value:function(e,t){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,t),t}}]),r}(),Goe=G;Goe({target:"Number",stat:!0},{isNaN:function(n){return n!==n}});var Koe=ne,qoe=Koe.Number.isNaN,Yoe=qoe,Xoe=Yoe,Qoe=Xoe,Jc=H(Qoe),Joe=Te,Zoe=Joe.isFinite,ese=Number.isFinite||function(n){return typeof n=="number"&&Zoe(n)},tse=G,rse=ese;tse({target:"Number",stat:!0},{isFinite:rse});var ise=ne,nse=ise.Number.isFinite,ase=nse,ose=ase,sse=ose,Ei=H(sse),use=G,lse=ui.some,dse=pa,hse=dse("some");use({target:"Array",proto:!0,forced:!hse},{some:function(n){return lse(this,n,arguments.length>1?arguments[1]:void 0)}});var cse=Xe,fse=cse("Array").some,vse=Re,pse=fse,Dh=Array.prototype,gse=function(r){var n=r.some;return r===Dh||vse(Dh,r)&&n===Dh.some?pse:n},yse=gse,mse=yse,bse=mse,$se=H(bse),wse=ne,_se=wse.Object.getOwnPropertySymbols,Ese=_se,Sse=Ese,Ose=Sse,ri=H(Ose),$O={exports:{}},Tse=G,kse=ie,Pse=mr,wO=aa.f,_O=Ke,Ise=!_O||kse(function(){wO(1)});Tse({target:"Object",stat:!0,forced:Ise,sham:!_O},{getOwnPropertyDescriptor:function(n,e){return wO(Pse(n),e)}});var Cse=ne,EO=Cse.Object,Ase=$O.exports=function(n,e){return EO.getOwnPropertyDescriptor(n,e)};EO.getOwnPropertyDescriptor.sham&&(Ase.sham=!0);var xse=$O.exports,Dse=xse,SO=Dse,Rse=SO,di=H(Rse),Mse=G,Nse=Ke,Fse=QZ,Bse=mr,Lse=aa,jse=va;Mse({target:"Object",stat:!0,sham:!Nse},{getOwnPropertyDescriptors:function(n){for(var e=Bse(n),t=Lse.f,i=Fse(e),a={},o=0,s,u;i.length>o;)u=t(e,s=i[o++]),u!==void 0&&jse(a,s,u);return a}});var zse=ne,Hse=zse.Object.getOwnPropertyDescriptors,Wse=Hse,Vse=Wse,Use=Vse,ii=H(Use),OO={exports:{}},Gse=G,Kse=Ke,e$=cl.f;Gse({target:"Object",stat:!0,forced:Object.defineProperties!==e$,sham:!Kse},{defineProperties:e$});var qse=ne,TO=qse.Object,Yse=OO.exports=function(n,e){return TO.defineProperties(n,e)};TO.defineProperties.sham&&(Yse.sham=!0);var Xse=OO.exports,Qse=Xse,Jse=Qse,Zse=Jse,Pl=H(Zse),eue=CE,Il=H(eue);function Cl(r,n,e){return n=lS(n),n in r?gl(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r}var kO=Te,tue=ie,rue=ae,iue=br,nue=wS.trim,aue=pv,oue=rue("".charAt),Ou=kO.parseFloat,t$=kO.Symbol,r$=t$&&t$.iterator,sue=1/Ou(aue+"-0")!==-1/0||r$&&!tue(function(){Ou(Object(r$))}),uue=sue?function(n){var e=nue(iue(n)),t=Ou(e);return t===0&&oue(e,0)==="-"?-0:t}:Ou,lue=G,i$=uue;lue({global:!0,forced:parseFloat!==i$},{parseFloat:i$});var due=ne,hue=due.parseFloat,cue=hue,fue=cue,vue=fue,PO=H(vue),pue=G,gue=ie,yue=yl.f,mue=gue(function(){return!Object.getOwnPropertyNames(1)});pue({target:"Object",stat:!0,forced:mue},{getOwnPropertyNames:yue});var bue=ne,$ue=bue.Object,wue=function(n){return $ue.getOwnPropertyNames(n)},_ue=wue,Eue=_ue,Sue=Eue,Oue=H(Sue);function Dv(r,n){var e=["node","edge","label"],t=!0,i=Vr(n,"chosen");if(typeof i=="boolean")t=i;else if(de(i)==="object"){if(re(e).call(e,r)===-1)throw new Error("choosify: subOption '"+r+"' should be one of '"+e.join("', '")+"'");var a=Vr(n,["chosen",r]);(typeof a=="boolean"||typeof a=="function")&&(t=a)}return t}function Zc(r,n,e){if(r.width<=0||r.height<=0)return!1;if(e!==void 0){var t={x:n.x-e.x,y:n.y-e.y};if(e.angle!==0){var i=-e.angle,a={x:Math.cos(i)*t.x-Math.sin(i)*t.y,y:Math.sin(i)*t.x+Math.cos(i)*t.y};n=a}else n=t}var o=r.x+r.width,s=r.y+r.width;return r.left<n.x&&o>n.x&&r.top<n.y&&s>n.y}function Tu(r){return typeof r=="string"&&r!==""}function IO(r,n,e,t){var i=t.x,a=t.y;if(typeof t.distanceToBorder=="function"){var o=t.distanceToBorder(r,n),s=Math.sin(n)*o,u=Math.cos(n)*o;u===o?(i+=o,a=t.y):s===o?(i=t.x,a-=o):(i+=u,a-=s)}else t.shape.width>t.shape.height?(i=t.x+t.shape.width*.5,a=t.y-e):(i=t.x+e,a=t.y-t.shape.height*.5);return{x:i,y:a}}var Tue=Xe,kue=Tue("Array").values,Pue=kue,Iue=Pue,Cue=Xi,Aue=Ye,xue=Re,Due=Iue,Rh=Array.prototype,Rue={DOMTokenList:!0,NodeList:!0},Mue=function(r){var n=r.values;return r===Rh||xue(Rh,r)&&n===Rh.values||Aue(Rue,Cue(r))?Due:n},Nue=Mue,CO=H(Nue),Fue=function(){function r(n){x(this,r),this.measureText=n,this.current=0,this.width=0,this.height=0,this.lines=[]}return D(r,[{key:"_add",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"normal";this.lines[e]===void 0&&(this.lines[e]={width:0,height:0,blocks:[]});var a=t;(t===void 0||t==="")&&(a=" ");var o=this.measureText(a,i),s=Ne({},CO(o));s.text=t,s.width=o.width,s.mod=i,(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],i=0;if(t.blocks!==void 0)for(var a=0;a<t.blocks.length;a++){var o=t.blocks[a];i<o.height&&(i=o.height)}t.height=i}}},{key:"determineLabelSize",value:function(){for(var e=0,t=0,i=0;i<this.lines.length;i++){var a=this.lines[i];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 i=this.lines[t];if(i.blocks.length!==0&&!(t===this.lines.length-1&&i.width===0)){var a={};Ne(a,i),a.blocks=[];for(var o=void 0,s=[],u=0;u<i.blocks.length;u++){var l=i.blocks[u];l.width!==0?s.push(l):o===void 0&&(o=l)}s.length===0&&o!==void 0&&s.push(o),a.blocks=s,e.push(a)}}return e}},{key:"finalize",value:function(){this.determineLineHeights(),this.determineLabelSize();var e=this.removeEmptyBlocks();return{width:this.width,height:this.height,lines:e}}}]),r}(),Bue={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/},n$=function(){function r(n){x(this,r),this.text=n,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}return 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,i=this.prepareRegExp(e),a=_e(i,2),o=a[0],s=a[1],u=o.test(this.text.substr(this.position,s));return u&&t&&(this.position+=s-1),u}},{key:"parseEndTag",value:function(e,t,i){var a=this.mod()===e;return e==="mono"?a=a&&this.mono:a=a&&!this.mono,a&&this.match(t)?(i!==void 0?(this.position===this.text.length-1||this.match(i,!1))&&this.unsetTag(e):this.unsetTag(e),!0):!1}},{key:"replace",value:function(e,t){return this.match(e)?(this.add(t),this.position+=length-1,!0):!1}},{key:"prepareRegExp",value:function(e){var t,i;if(e instanceof RegExp)i=e,t=1;else{var a=Bue[e];a!==void 0?i=a:i=new RegExp(e),t=e.length}return[i,t]}}]),r}(),Lue=function(){function r(n,e,t,i){var a=this;x(this,r),this.ctx=n,this.parent=e,this.selected=t,this.hover=i;var o=function(u,l){if(u===void 0)return 0;var d=a.parent.getFormattingValues(n,t,i,l),h=0;if(u!==""){var c=a.ctx.measureText(u);h=c.width}return{width:h,values:d}};this.lines=new Fue(o)}return D(r,[{key:"process",value:function(e){if(!Tu(e))return this.lines.finalize();var t=this.parent.fontOptions;e=e.replace(/\r\n/g,`
90
+ `),e=e.replace(/\r/g,`
91
+ `);var i=String(e).split(`
92
+ `),a=i.length;if(t.multi)for(var o=0;o<a;o++){var s=this.splitBlocks(i[o],t.multi);if(s!==void 0){if(s.length===0){this.lines.newLine("");continue}if(t.maxWdt>0)for(var u=0;u<s.length;u++){var l=s[u].mod,d=s[u].text;this.splitStringIntoLines(d,l,!0)}else for(var h=0;h<s.length;h++){var c=s[h].mod,f=s[h].text;this.lines.append(f,c)}this.lines.newLine()}}else if(t.maxWdt>0)for(var v=0;v<a;v++)this.splitStringIntoLines(i[v]);else for(var p=0;p<a;p++)this.lines.newLine(i[p]);return this.lines.finalize()}},{key:"decodeMarkupSystem",value:function(e){var 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 n$(e),i=function(u){if(/&/.test(u)){var l=t.replace(t.text,"&lt;","<")||t.replace(t.text,"&amp;","&");return l||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>"))||i(a);o||t.add(a),t.position++}return t.emitBlock(),t.blocks}},{key:"splitMarkdownBlocks",value:function(e){for(var t=this,i=new n$(e),a=!0,o=function(d){return/\\/.test(d)?(i.position<t.text.length+1&&(i.position++,d=t.text.charAt(i.position),/ \t/.test(d)?i.spacing=!0:(i.add(d),a=!1)),!0):!1};i.position<i.text.length;){var s=i.text.charAt(i.position),u=i.parseWS(s)||o(s)||(a||i.spacing)&&(i.parseStartTag("bold","*")||i.parseStartTag("ital","_")||i.parseStartTag("mono","`"))||i.parseEndTag("bold","*","afterBold")||i.parseEndTag("ital","_","afterItal")||i.parseEndTag("mono","`","afterMono");u||(i.add(s),a=!1),i.position++}return i.emitBlock(),i.blocks}},{key:"splitBlocks",value:function(e,t){var i=this.decodeMarkupSystem(t);if(i==="none")return[{text:e,mod:"normal"}];if(i==="markdown")return this.splitMarkdownBlocks(e);if(i==="html")return this.splitHtmlBlocks(e)}},{key:"overMaxWidth",value:function(e){var t=this.ctx.measureText(e).width;return this.lines.curWidth()+t>this.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(e){for(var t="",i=0;i<e.length;){var a=t===""?"":" ",o=t+a+e[i];if(this.overMaxWidth(o))break;t=o,i++}return i}},{key:"getLongestFitWord",value:function(e){for(var t=0;t<e.length&&!this.overMaxWidth(rt(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",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");for(var a=e.split("\r");a.length>0;){var o=this.getLongestFit(a);if(o===0){var s=a[0],u=this.getLongestFitWord(s);this.lines.newLine(rt(s).call(s,0,u),t),a[0]=rt(s).call(s,u)}else{var l=o;a[o-1]===" "?o--:a[l]===" "&&l++;var d=rt(a).call(a,0,o).join("");o==a.length&&i?this.lines.append(d,t):this.lines.newLine(d,t),a=rt(a).call(a,l)}}}}]),r}(),Ea=["bold","ital","boldital","mono"],AO=function(){function r(n,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;x(this,r),this.body=n,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(e),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=t}return D(r,[{key:"setOptions",value:function(e){if(this.elementOptions=e,this.initFontOptions(e.font),Tu(e.label)?this.labelDirty=!0:e.label=void 0,e.font!==void 0&&e.font!==null){if(typeof e.font=="string")this.baseSize=this.fontOptions.size;else if(de(e.font)==="object"){var t=e.font.size;t!==void 0&&(this.baseSize=t)}}}},{key:"initFontOptions",value:function(e){var t=this;if(te(Ea,function(i){t.fontOptions[i]={}}),r.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}te(e,function(i,a){i!=null&&de(i)!=="object"&&(t.fontOptions[a]=i)})}},{key:"constrain",value:function(e){var t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},i=Vr(e,"widthConstraint");if(typeof i=="number")t.maxWdt=Number(i),t.minWdt=Number(i);else if(de(i)==="object"){var a=Vr(e,["widthConstraint","maximum"]);typeof a=="number"&&(t.maxWdt=Number(a));var o=Vr(e,["widthConstraint","minimum"]);typeof o=="number"&&(t.minWdt=Number(o))}var s=Vr(e,"heightConstraint");if(typeof s=="number")t.minHgt=Number(s);else if(de(s)==="object"){var u=Vr(e,["heightConstraint","minimum"]);typeof u=="number"&&(t.minHgt=Number(u));var l=Vr(e,["heightConstraint","valign"]);typeof l=="string"&&(l==="top"||l==="bottom")&&(t.valign=l)}return t}},{key:"update",value:function(e,t){this.setOptions(e,!0),this.propagateFonts(t),ve(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=Dv("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 i=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=i)}},{key:"addFontOptionsToPile",value:function(e,t){for(var i=0;i<t.length;++i)this.addFontToPile(e,t[i])}},{key:"addFontToPile",value:function(e,t){if(t!==void 0&&!(t.font===void 0||t.font===null)){var i=t.font;e.push(i)}}},{key:"getBasicOptions",value:function(e){for(var t={},i=0;i<e.length;++i){var a=e[i],o={};r.parseFontString(o,a)&&(a=o),te(a,function(s,u){s!==void 0&&(Object.prototype.hasOwnProperty.call(t,u)||(re(Ea).call(Ea,u)!==-1?t[u]={}:t[u]=s))})}return t}},{key:"getFontOption",value:function(e,t,i){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 u={};if(r.parseFontString(u,a)&&(a=u),Object.prototype.hasOwnProperty.call(a,i))return a[i]}}if(Object.prototype.hasOwnProperty.call(this.fontOptions,i))return this.fontOptions[i];throw new Error("Did not find value for multi-font for property: '"+i+"'")}},{key:"getFontOptions",value:function(e,t){for(var i={},a=["color","size","face","mod","vadjust"],o=0;o<a.length;++o){var s=a[o];i[s]=this.getFontOption(e,t,s)}return i}},{key:"propagateFonts",value:function(e){var t=this,i=[];this.addFontOptionsToPile(i,e),this.fontOptions=this.getBasicOptions(i);for(var a=function(){var u=Ea[o],l=t.fontOptions[u],d=t.getFontOptions(i,u);te(d,function(h,c){l[c]=h}),l.size=Number(l.size),l.vadjust=Number(l.vadjust)},o=0;o<Ea.length;++o)a()}},{key:"draw",value:function(e,t,i,a,o){var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label!==void 0){var u=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&u<this.elementOptions.scaling.label.drawThreshold-1||(u>=this.elementOptions.scaling.label.maxVisible&&(u=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,a,o,t,i,s),this._drawBackground(e),this._drawText(e,t,this.size.yLine,s,u))}}},{key:"_drawBackground",value:function(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){e.fillStyle=this.fontOptions.background;var t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}},{key:"_drawText",value:function(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",o=arguments.length>4?arguments[4]:void 0,s=this._setAlignment(e,t,i,a),u=_e(s,2);t=u[0],i=u[1],e.textAlign="left",t=t-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(i-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(i+=(this.size.height-this.size.labelHeight)/2));for(var l=0;l<this.lineCount;l++){var d=this.lines[l];if(d&&d.blocks){var h=0;this.isEdgeLabel||this.fontOptions.align==="center"?h+=(this.size.width-d.width)/2:this.fontOptions.align==="right"&&(h+=this.size.width-d.width);for(var c=0;c<d.blocks.length;c++){var f=d.blocks[c];e.font=f.font;var v=this._getColor(f.color,o,f.strokeColor),p=_e(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+h,i+f.vadjust),e.fillText(f.text,t+h,i+f.vadjust),h+=f.width}i+=d.height}}}},{key:"_setAlignment",value:function(e,t,i,a){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){t=0,i=0;var o=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",i-=2*o):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",i+=2*o):e.textBaseline="middle"}else e.textBaseline=a;return[t,i]}},{key:"_getColor",value:function(e,t,i){var a=e||"#000000",o=i||"#ffffff";if(t<=this.elementOptions.scaling.label.drawThreshold){var s=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)));a=jt(a,s),o=jt(o,s)}return[a,o]}},{key:"getTextSize",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,t,i),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:"getSize",value:function(){var e=2,t=this.size.left,i=this.size.top-.5*e;if(this.isEdgeLabel){var a=-this.size.width*.5;switch(this.fontOptions.align){case"middle":t=a,i=-this.size.height*.5;break;case"top":t=a,i=-(this.size.height+e);break;case"bottom":t=a,i=e;break}}var o={left:t,top:i,width:this.size.width,height:this.size.height};return o}},{key:"calculateLabelSize",value:function(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(e,t,i),this.size.left=a-this.size.width*.5,this.size.top=o-this.size.height*.5,this.size.yLine=o+(1-this.lineCount)*.5*this.fontOptions.size,s==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}},{key:"getFormattingValues",value:function(e,t,i,a){var o=function(d,h,c){return h==="normal"?c==="mod"?"":d[c]:d[h][c]!==void 0?d[h][c]:d[c]},s={color:o(this.fontOptions,a,"color"),size:o(this.fontOptions,a,"size"),face:o(this.fontOptions,a,"face"),mod:o(this.fontOptions,a,"mod"),vadjust:o(this.fontOptions,a,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(t||i)&&(a==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?s.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(s,this.elementOptions.id,t,i));var u="";return s.mod!==void 0&&s.mod!==""&&(u+=s.mod+" "),u+=s.size+"px "+s.face,e.font=u.replace(/"/g,""),s.font=e.font,s.height=s.size,s}},{key:"differentState",value:function(e,t){return e!==this.selectedState||t!==this.hoverState}},{key:"_processLabelText",value:function(e,t,i,a){var o=new Lue(e,this,t,i);return o.process(a)}},{key:"_processLabel",value:function(e,t,i){if(!(this.labelDirty===!1&&!this.differentState(t,i))){var a=this._processLabelText(e,t,i,this.elementOptions.label);this.fontOptions.minWdt>0&&a.width<this.fontOptions.minWdt&&(a.width=this.fontOptions.minWdt),this.size.labelHeight=a.height,this.fontOptions.minHgt>0&&a.height<this.fontOptions.minHgt&&(a.height=this.fontOptions.minHgt),this.lines=a.lines,this.lineCount=a.lines.length,this.size.width=a.width,this.size.height=a.height,this.selectedState=t,this.hoverState=i,this.labelDirty=!1}}},{key:"visible",value:function(){if(this.size.width===0||this.size.height===0||this.elementOptions.label===void 0)return!1;var e=this.fontOptions.size*this.body.view.scale;return!(e<this.elementOptions.scaling.label.drawThreshold-1)}}],[{key:"parseFontString",value:function(e,t){if(!t||typeof t!="string")return!1;var i=t.split(" ");return e.size=+i[0].replace("px",""),e.face=i[1],e.color=i[2],!0}}]),r}(),jue=vl,zue=ua,Hue=TypeError,Wue=function(r){if(jue(r))return r;throw new Hue(zue(r)+" is not a constructor")},Vue=G,Uue=Ut,Mh=To,Gue=X0,a$=Wue,Kue=Ft,o$=qe,que=ha,xO=ie,Rv=Uue("Reflect","construct"),Yue=Object.prototype,Xue=[].push,DO=xO(function(){function r(){}return!(Rv(function(){},[],r)instanceof r)}),RO=!xO(function(){Rv(function(){})}),s$=DO||RO;Vue({target:"Reflect",stat:!0,forced:s$,sham:s$},{construct:function(n,e){a$(n),Kue(e);var t=arguments.length<3?n:a$(arguments[2]);if(RO&&!DO)return Rv(n,e,t);if(n===t){switch(e.length){case 0:return new n;case 1:return new n(e[0]);case 2:return new n(e[0],e[1]);case 3:return new n(e[0],e[1],e[2]);case 4:return new n(e[0],e[1],e[2],e[3])}var i=[null];return Mh(Xue,i,e),new(Mh(Gue,n,i))}var a=t.prototype,o=que(o$(a)?a:Yue),s=Mh(n,o,e);return o$(s)?s:o}});var Que=ne,Jue=Que.Reflect.construct,Zue=Jue,ele=Zue,tle=ele,E=H(tle),rle=OS,ile=rle,nle=ile,ale=nle,ole=ale,sle=H(ole),ule=G,lle=aK;ule({target:"Object",stat:!0},{setPrototypeOf:lle});var dle=ne,hle=dle.Object.setPrototypeOf,cle=hle,fle=cle,vle=fle,ple=vle,gle=ple,yle=gle,mle=yle,ef=H(mle),ble=Q0,$le=ble,wle=$le,_le=wle,Ele=_le,Mv=H(Ele);function tf(r,n){var e;return tf=ef?Mv(e=ef).call(e):function(i,a){return i.__proto__=a,i},tf(r,n)}function oe(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=sle(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),gl(r,"prototype",{writable:!1}),n&&tf(r,n)}function Sle(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function le(r,n){if(n&&(de(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Sle(r)}var Ole=$S,Tle=Ole,kle=Tle,Ple=kle,Ile=Ple,u$=H(Ile);function L(r){var n;return L=ef?Mv(n=u$).call(n):function(t){return t.__proto__||u$(t)},L(r)}var rn=function(){function r(n,e,t){x(this,r),this.body=e,this.labelModule=t,this.setOptions(n),this.top=void 0,this.left=void 0,this.height=void 0,this.width=void 0,this.radius=void 0,this.margin=void 0,this.refreshNeeded=!0,this.boundingBox={top:0,left:0,right:0,bottom:0}}return D(r,[{key:"setOptions",value:function(e){this.options=e}},{key:"_setMargins",value:function(e){this.margin={},this.options.margin&&(de(this.options.margin)=="object"?(this.margin.top=this.options.margin.top,this.margin.right=this.options.margin.right,this.margin.bottom=this.options.margin.bottom,this.margin.left=this.options.margin.left):(this.margin.top=this.options.margin,this.margin.right=this.options.margin,this.margin.bottom=this.options.margin,this.margin.left=this.options.margin)),e.adjustSizes(this.margin)}},{key:"_distanceToBorder",value:function(e,t){var i=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)))+i}},{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 i=t.borderDashes;i===!0&&(i=[5,15]),e.setLineDash(i)}else console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,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 i=t.borderWidth/this.body.view.scale;e.lineWidth=Math.min(this.width,i),e.strokeStyle=t.borderColor,e.fillStyle=t.color}},{key:"performStroke",value:function(e,t){var i=t.borderWidth/this.body.view.scale;e.save(),i>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),Vo(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,i,a,o){i!==void 0&&this.resize(i,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,i,a,o){this._updateBoundingBox(e,t,i,a,o)}},{key:"getDimensionsFromLabel",value:function(e,t,i){this.textSize=this.labelModule.getTextSize(e,t,i);var a=this.textSize.width,o=this.textSize.height,s=14;return a===0&&(a=s,o=s),{width:a,height:o}}}]),r}();function Cle(r){var n=Ale();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function Ale(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var xle=function(r){oe(e,r);var n=Cle(e);function e(t,i,a){var o;return x(this,e),o=n.call(this,t,i,a),o._setMargins(a),o}return D(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(i,a,o);this.width=s.width+this.margin.right+this.margin.left,this.height=s.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}},{key:"draw",value:function(i,a,o,s,u,l){this.resize(i,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(i,l),J0(i,this.left,this.top,this.width,this.height,l.borderRadius),this.performFill(i,l),this.updateBoundingBox(a,o,i,s,u),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,u)}},{key:"updateBoundingBox",value:function(i,a,o,s,u){this._updateBoundingBox(i,a,o,s,u);var l=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(l)}},{key:"distanceToBorder",value:function(i,a){i&&this.resize(i);var o=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(a)),Math.abs(this.height/2/Math.sin(a)))+o}}]),e}(rn);function Dle(r){var n=Rle();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function Rle(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Nv=function(r){oe(e,r);var n=Dle(e);function e(t,i,a){var o;return x(this,e),o=n.call(this,t,i,a),o.labelOffset=0,o.selected=!1,o}return D(e,[{key:"setOptions",value:function(i,a,o){this.options=i,a===void 0&&o===void 0||this.setImages(a,o)}},{key:"setImages",value:function(i,a){a&&this.selected?(this.imageObj=a,this.imageObjAlt=i):(this.imageObj=i,this.imageObjAlt=a)}},{key:"switchImages",value:function(i){var a=i&&!this.selected||!i&&this.selected;if(this.selected=i,this.imageObjAlt!==void 0&&a){var o=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=o}}},{key:"_getImagePadding",value:function(){var i={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){var a=this.options.imagePadding;de(a)=="object"?(i.top=a.top,i.right=a.right,i.bottom=a.bottom,i.left=a.left):(i.top=a,i.right=a,i.bottom=a,i.left=a)}return i}},{key:"_resizeImage",value:function(){var i,a;if(this.options.shapeProperties.useImageSize===!1){var o=1,s=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?o=this.imageObj.width/this.imageObj.height:s=this.imageObj.height/this.imageObj.width),i=this.options.size*2*o,a=this.options.size*2*s}else{var u=this._getImagePadding();i=this.imageObj.width+u.left+u.right,a=this.imageObj.height+u.top+u.bottom}this.width=i,this.height=a,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(i,a,o,s){this.initContextForDraw(i,s),Zf(i,a,o,s.size),this.performFill(i,s)}},{key:"_drawImageAtPosition",value:function(i,a){if(this.imageObj.width!=0){i.globalAlpha=a.opacity!==void 0?a.opacity:1,this.enableShadow(i,a);var o=1;this.options.shapeProperties.interpolation===!0&&(o=this.imageObj.width/this.width/this.body.view.scale);var s=this._getImagePadding(),u=this.left+s.left,l=this.top+s.top,d=this.width-s.left-s.right,h=this.height-s.top-s.bottom;this.imageObj.drawImageAtPosition(i,o,u,l,d,h),this.disableShadow(i,a)}}},{key:"_drawImageLabel",value:function(i,a,o,s,u){var l=0;if(this.height!==void 0){l=this.height*.5;var d=this.labelModule.getTextSize(i,s,u);d.lineCount>=1&&(l+=d.height/2)}var h=o+l;this.options.label&&(this.labelOffset=l),this.labelModule.draw(i,a,h,s,u,"hanging")}}]),e}(rn);function Mle(r){var n=Nle();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function Nle(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Fle=function(r){oe(e,r);var n=Mle(e);function e(t,i,a){var o;return x(this,e),o=n.call(this,t,i,a),o._setMargins(a),o}return D(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(i,a,o),u=Math.max(s.width+this.margin.right+this.margin.left,s.height+this.margin.top+this.margin.bottom);this.options.size=u/2,this.width=u,this.height=u,this.radius=this.width/2}}},{key:"draw",value:function(i,a,o,s,u,l){this.resize(i,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this._drawRawCircle(i,a,o,l),this.updateBoundingBox(a,o),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,o,s,u)}},{key:"updateBoundingBox",value:function(i,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=i-this.options.size,this.boundingBox.right=i+this.options.size,this.boundingBox.bottom=a+this.options.size}},{key:"distanceToBorder",value:function(i){return i&&this.resize(i),this.width*.5}}]),e}(Nv);function Ble(r){var n=Lle();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function Lle(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var jle=function(r){oe(e,r);var n=Ble(e);function e(t,i,a,o,s){var u;return x(this,e),u=n.call(this,t,i,a),u.setImages(o,s),u}return D(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0;if(s){var u=this.options.size*2;this.width=u,this.height=u,this.radius=.5*this.width;return}this.needsRefresh(a,o)&&this._resizeImage()}},{key:"draw",value:function(i,a,o,s,u,l){this.switchImages(s),this.resize();var d=a,h=o;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,d+=this.width/2,h+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this._drawRawCircle(i,d,h,l),i.save(),i.clip(),this._drawImageAtPosition(i,l),i.restore(),this._drawImageLabel(i,d,h,s,u),this.updateBoundingBox(a,o)}},{key:"updateBoundingBox",value:function(i,a){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=a,this.boundingBox.left=i,this.boundingBox.right=i+this.options.size*2,this.boundingBox.bottom=a+this.options.size*2):(this.boundingBox.top=a-this.options.size,this.boundingBox.left=i-this.options.size,this.boundingBox.right=i+this.options.size,this.boundingBox.bottom=a+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}},{key:"distanceToBorder",value:function(i){return i&&this.resize(i),this.width*.5}}]),e}(Nv);function zle(r){var n=Hle();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function Hle(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var hi=function(r){oe(e,r);var n=zle(e);function e(t,i,a){return x(this,e),n.call(this,t,i,a)}return D(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(a,o)){var u,l;this.labelModule.getTextSize(i,a,o);var d=2*s.size;this.width=(u=this.customSizeWidth)!==null&&u!==void 0?u:d,this.height=(l=this.customSizeHeight)!==null&&l!==void 0?l:d,this.radius=.5*this.width}}},{key:"_drawShape",value:function(i,a,o,s,u,l,d,h){var c=this;return this.resize(i,l,d,h),this.left=s-this.width/2,this.top=u-this.height/2,this.initContextForDraw(i,h),w9(a)(i,s,u,h.size),this.performFill(i,h),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(i.font=(l?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),i.fillStyle=this.options.icon.color||"black",i.textAlign="center",i.textBaseline="middle",i.fillText(this.options.icon.code,s,u)),{drawExternalLabel:function(){if(c.options.label!==void 0){c.labelModule.calculateLabelSize(i,l,d,s,u,"hanging");var v=u+.5*c.height+.5*c.labelModule.size.height;c.labelModule.draw(i,s,v,l,d,"hanging")}c.updateBoundingBox(s,u)}}}},{key:"updateBoundingBox",value:function(i,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=i-this.options.size,this.boundingBox.right=i+this.options.size,this.boundingBox.bottom=a+this.options.size,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}]),e}(rn);function l$(r,n){var e=$e(r);if(ri){var t=ri(r);n&&(t=Et(t).call(t,function(i){return di(r,i).enumerable})),e.push.apply(e,t)}return e}function Wle(r){for(var n=1;n<arguments.length;n++){var e,t,i=arguments[n]!=null?arguments[n]:{};n%2?he(e=l$(Object(i),!0)).call(e,function(a){Cl(r,a,i[a])}):ii?Pl(r,ii(i)):he(t=l$(Object(i))).call(t,function(a){Il(r,a,di(i,a))})}return r}function Vle(r){var n=Ule();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function Ule(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Gle=function(r){oe(e,r);var n=Vle(e);function e(t,i,a,o){var s;return x(this,e),s=n.call(this,t,i,a,o),s.ctxRenderer=o,s}return D(e,[{key:"draw",value:function(i,a,o,s,u,l){this.resize(i,s,u,l),this.left=a-this.width/2,this.top=o-this.height/2,i.save();var d=this.ctxRenderer({ctx:i,id:this.options.id,x:a,y:o,state:{selected:s,hover:u},style:Wle({},l),label:this.options.label});if(d.drawNode!=null&&d.drawNode(),i.restore(),d.drawExternalLabel){var h=d.drawExternalLabel;d.drawExternalLabel=function(){i.save(),h(),i.restore()}}return d.nodeDimensions&&(this.customSizeWidth=d.nodeDimensions.width,this.customSizeHeight=d.nodeDimensions.height),d}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(hi);function Kle(r){var n=qle();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function qle(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Yle=function(r){oe(e,r);var n=Kle(e);function e(t,i,a){var o;return x(this,e),o=n.call(this,t,i,a),o._setMargins(a),o}return D(e,[{key:"resize",value:function(i,a,o){if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(i,a,o),u=s.width+this.margin.right+this.margin.left;this.width=u,this.height=u,this.radius=this.width/2}}},{key:"draw",value:function(i,a,o,s,u,l){this.resize(i,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(i,l),Z0(i,a-this.width/2,o-this.height/2,this.width,this.height),this.performFill(i,l),this.updateBoundingBox(a,o,i,s,u),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,u)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(rn);function Xle(r){var n=Qle();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function Qle(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Jle=function(r){oe(e,r);var n=Xle(e);function e(t,i,a){return x(this,e),n.call(this,t,i,a)}return D(e,[{key:"draw",value:function(i,a,o,s,u,l){return this._drawShape(i,"diamond",4,a,o,s,u,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(hi);function Zle(r){var n=ede();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function ede(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var tde=function(r){oe(e,r);var n=Zle(e);function e(t,i,a){return x(this,e),n.call(this,t,i,a)}return D(e,[{key:"draw",value:function(i,a,o,s,u,l){return this._drawShape(i,"circle",2,a,o,s,u,l)}},{key:"distanceToBorder",value:function(i){return i&&this.resize(i),this.options.size}}]),e}(hi);function rde(r){var n=ide();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function ide(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var d$=function(r){oe(e,r);var n=rde(e);function e(t,i,a){return x(this,e),n.call(this,t,i,a)}return D(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(i,a,o);this.height=s.height*2,this.width=s.width+s.height,this.radius=.5*this.width}}},{key:"draw",value:function(i,a,o,s,u,l){this.resize(i,s,u),this.left=a-this.width*.5,this.top=o-this.height*.5,this.initContextForDraw(i,l),Pc(i,this.left,this.top,this.width,this.height),this.performFill(i,l),this.updateBoundingBox(a,o,i,s,u),this.labelModule.draw(i,a,o,s,u)}},{key:"distanceToBorder",value:function(i,a){i&&this.resize(i);var o=this.width*.5,s=this.height*.5,u=Math.sin(a)*o,l=Math.cos(a)*s;return o*s/Math.sqrt(u*u+l*l)}}]),e}(rn);function nde(r){var n=ade();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function ade(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var ode=function(r){oe(e,r);var n=nde(e);function e(t,i,a){var o;return x(this,e),o=n.call(this,t,i,a),o._setMargins(a),o}return D(e,[{key:"resize",value:function(i,a,o){this.needsRefresh(a,o)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(i,a,o,s,u,l){var d=this;return this.resize(i,s,u),this.options.icon.size=this.options.icon.size||50,this.left=a-this.width/2,this.top=o-this.height/2,this._icon(i,a,o,s,u,l),{drawExternalLabel:function(){if(d.options.label!==void 0){var c=5;d.labelModule.draw(i,d.left+d.iconSize.width/2+d.margin.left,o+d.height/2+c,s)}d.updateBoundingBox(a,o)}}}},{key:"updateBoundingBox",value:function(i,a){if(this.boundingBox.top=a-this.options.icon.size*.5,this.boundingBox.left=i-this.options.icon.size*.5,this.boundingBox.right=i+this.options.icon.size*.5,this.boundingBox.bottom=a+this.options.icon.size*.5,this.options.label!==void 0&&this.labelModule.size.width>0){var o=5;this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+o)}}},{key:"_icon",value:function(i,a,o,s,u,l){var d=Number(this.options.icon.size);this.options.icon.code!==void 0?(i.font=[this.options.icon.weight!=null?this.options.icon.weight:s?"bold":"",(this.options.icon.weight!=null&&s?5:0)+d+"px",this.options.icon.face].join(" "),i.fillStyle=this.options.icon.color||"black",i.textAlign="center",i.textBaseline="middle",this.enableShadow(i,l),i.fillText(this.options.icon.code,a,o),this.disableShadow(i,l)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(rn);function sde(r){var n=ude();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function ude(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var lde=function(r){oe(e,r);var n=sde(e);function e(t,i,a,o,s){var u;return x(this,e),u=n.call(this,t,i,a),u.setImages(o,s),u}return D(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0;if(s){var u=this.options.size*2;this.width=u,this.height=u;return}this.needsRefresh(a,o)&&this._resizeImage()}},{key:"draw",value:function(i,a,o,s,u,l){i.save(),this.switchImages(s),this.resize();var d=a,h=o;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,d+=this.width/2,h+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){var c=this.options.borderWidth,f=this.options.borderWidthSelected||2*this.options.borderWidth,v=(s?f:c)/this.body.view.scale;i.lineWidth=Math.min(this.width,v),i.beginPath();var p=s?this.options.color.highlight.border:u?this.options.color.hover.border:this.options.color.border,g=s?this.options.color.highlight.background:u?this.options.color.hover.background:this.options.color.background;l.opacity!==void 0&&(p=jt(p,l.opacity),g=jt(g,l.opacity)),i.strokeStyle=p,i.fillStyle=g,i.rect(this.left-.5*i.lineWidth,this.top-.5*i.lineWidth,this.width+i.lineWidth,this.height+i.lineWidth),Vo(i).call(i),this.performStroke(i,l),i.closePath()}this._drawImageAtPosition(i,l),this._drawImageLabel(i,d,h,s,u),this.updateBoundingBox(a,o),i.restore()}},{key:"updateBoundingBox",value:function(i,a){this.resize(),this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=i,this.top=a):(this.left=i-this.width/2,this.top=a-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Nv);function dde(r){var n=hde();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function hde(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var cde=function(r){oe(e,r);var n=dde(e);function e(t,i,a){return x(this,e),n.call(this,t,i,a)}return D(e,[{key:"draw",value:function(i,a,o,s,u,l){return this._drawShape(i,"square",2,a,o,s,u,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(hi);function fde(r){var n=vde();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function vde(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var pde=function(r){oe(e,r);var n=fde(e);function e(t,i,a){return x(this,e),n.call(this,t,i,a)}return D(e,[{key:"draw",value:function(i,a,o,s,u,l){return this._drawShape(i,"hexagon",4,a,o,s,u,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(hi);function gde(r){var n=yde();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function yde(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var mde=function(r){oe(e,r);var n=gde(e);function e(t,i,a){return x(this,e),n.call(this,t,i,a)}return D(e,[{key:"draw",value:function(i,a,o,s,u,l){return this._drawShape(i,"star",4,a,o,s,u,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(hi);function bde(r){var n=$de();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function $de(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var wde=function(r){oe(e,r);var n=bde(e);function e(t,i,a){var o;return x(this,e),o=n.call(this,t,i,a),o._setMargins(a),o}return D(e,[{key:"resize",value:function(i,a,o){this.needsRefresh(a,o)&&(this.textSize=this.labelModule.getTextSize(i,a,o),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(i,a,o,s,u,l){this.resize(i,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this.enableShadow(i,l),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,u),this.disableShadow(i,l),this.updateBoundingBox(a,o,i,s,u)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(rn);function _de(r){var n=Ede();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function Ede(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Sde=function(r){oe(e,r);var n=_de(e);function e(t,i,a){return x(this,e),n.call(this,t,i,a)}return D(e,[{key:"draw",value:function(i,a,o,s,u,l){return this._drawShape(i,"triangle",3,a,o,s,u,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(hi);function Ode(r){var n=Tde();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function Tde(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var kde=function(r){oe(e,r);var n=Ode(e);function e(t,i,a){return x(this,e),n.call(this,t,i,a)}return D(e,[{key:"draw",value:function(i,a,o,s,u,l){return this._drawShape(i,"triangleDown",3,a,o,s,u,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(hi);function h$(r,n){var e=$e(r);if(ri){var t=ri(r);n&&(t=Et(t).call(t,function(i){return di(r,i).enumerable})),e.push.apply(e,t)}return e}function c$(r){for(var n=1;n<arguments.length;n++){var e,t,i=arguments[n]!=null?arguments[n]:{};n%2?he(e=h$(Object(i),!0)).call(e,function(a){Cl(r,a,i[a])}):ii?Pl(r,ii(i)):he(t=h$(Object(i))).call(t,function(a){Il(r,a,di(i,a))})}return r}var It=function(){function r(n,e,t,i,a,o){x(this,r),this.options=Zr(a),this.globalOptions=a,this.defaultOptions=o,this.body=e,this.edges=[],this.id=void 0,this.imagelist=t,this.grouplist=i,this.x=void 0,this.y=void 0,this.baseSize=this.options.size,this.baseFontSize=this.options.font.size,this.predefinedPosition=!1,this.selected=!1,this.hover=!1,this.labelModule=new AO(this.body,this.options,!1),this.setOptions(n)}return D(r,[{key:"attachEdge",value:function(e){var t;re(t=this.edges).call(t,e)===-1&&this.edges.push(e)}},{key:"detachEdge",value:function(e){var t,i=re(t=this.edges).call(t,e);if(i!=-1){var a;Tr(a=this.edges).call(a,i,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=Jt(e.x),this.predefinedPosition=!0)),e.y!==void 0&&(e.y===null?(this.y=void 0,this.predefinedPosition=!1):(this.y=Jt(e.y),this.predefinedPosition=!0)),e.size!==void 0&&(this.baseSize=e.size),e.value!==void 0&&(e.value=PO(e.value)),r.parseOptions(this.options,e,!0,this.globalOptions,this.grouplist);var i=[e,this.options,this.defaultOptions];return this.chooser=Dv("node",i),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=jt(e.borderColor,t),e.color=jt(e.color,t),e.shadowColor=jt(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,c$(c$({},e),{},{color:e&&e.color||this._localColor||void 0}),this.grouplist);var t=this.grouplist.get(this.options.group,!1),i=[e,this.options,t,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,i),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}},{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 xle(this.options,this.body,this.labelModule);break;case"circle":this.shape=new Fle(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new jle(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new Gle(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new Yle(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new Jle(this.options,this.body,this.labelModule);break;case"dot":this.shape=new tde(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new d$(this.options,this.body,this.labelModule);break;case"icon":this.shape=new ode(this.options,this.body,this.labelModule);break;case"image":this.shape=new lde(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new cde(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new pde(this.options,this.body,this.labelModule);break;case"star":this.shape=new mde(this.options,this.body,this.labelModule);break;case"text":this.shape=new wde(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new Sde(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new kde(this.options,this.body,this.labelModule);break;default:this.shape=new d$(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,i){if(this.options.value!==void 0){var a=this.options.scaling.customScalingFunction(e,t,i,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){var s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+a*s}this.options.size=this.options.scaling.min+a*o}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}},{key:"draw",value:function(e){var 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()&&Zc(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),Zc(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,i){var a;if(i!==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 u=i.get(o);u.opacity!==void 0&&t.opacity===void 0&&(r.checkOpacity(u.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+u.opacity),u.opacity=void 0));var l=Et(a=Oue(t)).call(a,function(d){return t[d]!=null});l.push("font"),Eu(l,e,u),e.color=qc(e.color)}}}},{key:"parseOptions",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0,s=["color","fixed","shadow"];if(Eu(s,e,t,i),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),Lt(e,t,"shadow",a),t.color!==void 0&&t.color!==null){var u=qc(t.color);tO(e.color,u)}else i===!0&&t.color===null&&(e.color=Zr(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))),i===!0&&t.font===null&&(e.font=Zr(a.font)),r.updateGroupOptions(e,t,o),t.scaling!==void 0&&Lt(e.scaling,t.scaling,"label",a.scaling)}},{key:"checkMass",value:function(e,t){if(e.mass!==void 0&&e.mass<=0){var i="";t!==void 0&&(i=" in node id: "+t),console.error("%cNegative or zero mass disallowed"+i+", setting mass to 1.",aO),e.mass=1}}}]),r}();function Pde(r,n){var e=typeof li<"u"&&Zi(r)||r["@@iterator"];if(!e){if(se(r)||(e=Ide(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
93
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Ide(r,n){var e;if(r){if(typeof r=="string")return f$(r,n);var t=rt(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Ji(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f$(r,n)}}function f$(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}var Cde=function(){function r(n,e,t,i){var a,o=this;if(x(this,r),this.body=n,this.images=e,this.groups=t,this.layoutEngine=i,this.body.functions.createNode=k(a=this.create).call(a,this),this.nodesListeners={add:function(u,l){o.add(l.items)},update:function(u,l){o.update(l.items,l.data,l.oldData)},remove:function(u,l){o.remove(l.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:void 0,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},opacity:void 0,fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,imagePadding:{top:0,right:0,bottom:0,left:0},label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(u,l,d,h){if(l===u)return .5;var c=1/(l-u);return Math.max(0,(h-u)*c)}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1,coordinateOrigin:"center"},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=Zr(this.defaultOptions),this.bindEventListeners()}return D(r,[{key:"bindEventListeners",value:function(){var e,t,i=this;this.body.emitter.on("refreshNodes",k(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",k(t=this.refresh).call(t,this)),this.body.emitter.on("destroy",function(){te(i.nodesListeners,function(a,o){i.body.data.nodes&&i.body.data.nodes.off(o,a)}),delete i.body.functions.createNode,delete i.nodesListeners.add,delete i.nodesListeners.update,delete i.nodesListeners.remove,delete i.nodesListeners})}},{key:"setOptions",value:function(e){if(e!==void 0){if(It.parseOptions(this.options,e),e.opacity!==void 0&&(Jc(e.opacity)||!Ei(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 i=0,a=$e(this.body.nodes);i<a.length;i++){var o=a[i];this.body.nodes[o].updateLabelModule(),this.body.nodes[o].needsRefresh()}if(e.size!==void 0)for(var s in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,s)&&this.body.nodes[s].needsRefresh();(e.hidden!==void 0||e.physics!==void 0)&&this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=this.body.data.nodes;if(A0("id",e))this.body.data.nodes=e;else if(se(e))this.body.data.nodes=new vu,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new vu;else throw new TypeError("Array or DataSet expected");if(i&&te(this.nodesListeners,function(s,u){i.off(u,s)}),this.body.nodes={},this.body.data.nodes){var a=this;te(this.nodesListeners,function(s,u){a.body.data.nodes.on(u,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,i,a=[],o=0;o<e.length;o++){i=e[o];var s=this.body.data.nodes.get(i),u=this.create(s);a.push(u),this.body.nodes[i]=u}this.layoutEngine.positionInitially(a),t===!1&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(e,t,i){for(var a=this.body.nodes,o=!1,s=0;s<e.length;s++){var u=e[s],l=a[u],d=t[s];l!==void 0?l.setOptions(d)&&(o=!0):(o=!0,l=this.create(d),a[u]=l)}!o&&i!==void 0&&(o=$se(t).call(t,function(h,c){var f=i[c];return f&&f.level!==h.level})),o===!0?this.body.emitter.emit("_dataChanged"):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(e){for(var t=this.body.nodes,i=0;i<e.length;i++){var a=e[i];delete t[a]}this.body.emitter.emit("_dataChanged")}},{key:"create",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:It;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;te(this.body.nodes,function(i,a){var o=e.body.data.nodes.get(a);o!==void 0&&(t===!0&&i.setOptions({x:null,y:null}),i.setOptions({fixed:!1}),i.setOptions(o))})}},{key:"getPositions",value:function(e){var t={};if(e!==void 0){if(se(e)===!0){for(var i=0;i<e.length;i++)if(this.body.nodes[e[i]]!==void 0){var a=this.body.nodes[e[i]];t[e[i]]={x:Math.round(a.x),y:Math.round(a.y)}}}else if(this.body.nodes[e]!==void 0){var o=this.body.nodes[e];t[e]={x:Math.round(o.x),y:Math.round(o.y)}}}else for(var s=0;s<this.body.nodeIndices.length;s++){var u=this.body.nodes[this.body.nodeIndices[s]];t[this.body.nodeIndices[s]]={x:Math.round(u.x),y:Math.round(u.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(),i=Pde(t.get()),a;try{for(i.s();!(a=i.n()).done;){var o=a.value,s=o.id,u=this.body.nodes[s],l=Math.round(u.x),d=Math.round(u.y);(o.x!==l||o.y!==d)&&e.push({id:s,x:l,y:d})}}catch(h){i.e(h)}finally{i.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 i=[];if(this.body.nodes[e]!==void 0)for(var a=this.body.nodes[e],o={},s=0;s<a.edges.length;s++){var u=a.edges[s];t!=="to"&&u.toId==a.id?o[u.fromId]===void 0&&(i.push(u.fromId),o[u.fromId]=!0):t!=="from"&&u.fromId==a.id&&o[u.toId]===void 0&&(i.push(u.toId),o[u.toId]=!0)}return i}},{key:"getConnectedEdges",value:function(e){var t=[];if(this.body.nodes[e]!==void 0)for(var i=this.body.nodes[e],a=0;a<i.edges.length;a++)t.push(i.edges[a].id);else console.error("NodeId provided for getConnectedEdges does not exist. Provided: ",e);return t}},{key:"moveNode",value:function(e,t,i){var a=this;this.body.nodes[e]!==void 0?(this.body.nodes[e].x=Number(t),this.body.nodes[e].y=Number(i),pr(function(){a.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}}]),r}(),v$=Ye,Ade=function(r){return r!==void 0&&(v$(r,"value")||v$(r,"writable"))},xde=G,Dde=Mt,Rde=qe,Mde=Ft,Nde=Ade,Fde=aa,Bde=fl;function MO(r,n){var e=arguments.length<3?r:arguments[2],t,i;if(Mde(r)===e)return r[n];if(t=Fde.f(r,n),t)return Nde(t)?t.value:t.get===void 0?void 0:Dde(t.get,e);if(Rde(i=Bde(r)))return MO(i,n,e)}xde({target:"Reflect",stat:!0},{get:MO});var Lde=ne,jde=Lde.Reflect.get,zde=jde,Hde=zde,Wde=Hde,Vde=Wde,Ude=Vde,Gde=Ude,Kde=Gde,p$=H(Kde),qde=SO,Yde=qde,Xde=Yde,Qde=Xde,Jde=Qde,Zde=H(Jde);function ehe(r,n){for(;!Object.prototype.hasOwnProperty.call(r,n)&&(r=L(r),r!==null););return r}function Xs(){if(typeof Reflect<"u"&&p$){var r;Xs=Mv(r=p$).call(r)}else Xs=function(e,t,i){var a=ehe(e,t);if(a){var o=Zde(a,t);return o.get?o.get.call(arguments.length<3?e:i):o.value}};return Xs.apply(this,arguments)}var the=G,g$=Math.hypot,rhe=Math.abs,ihe=Math.sqrt,nhe=!!g$&&g$(1/0,NaN)!==1/0;the({target:"Math",stat:!0,arity:2,forced:nhe},{hypot:function(n,e){for(var t=0,i=0,a=arguments.length,o=0,s,u;i<a;)s=rhe(arguments[i++]),o<s?(u=o/s,t=t*u*u+1,o=s):s>0?(u=s/o,t+=u*u):t+=s;return o===1/0?1/0:o*ihe(t)}});var ahe=ne,ohe=ahe.Math.hypot,she=ohe,uhe=she,lhe=uhe,dhe=H(lhe);function NO(r){var n=hhe();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function hhe(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var xe=function(){function r(){x(this,r)}return D(r,null,[{key:"transform",value:function(e,t){se(e)||(e=[e]);for(var i=t.point.x,a=t.point.y,o=t.angle,s=t.length,u=0;u<e.length;++u){var l=e[u],d=l.x*Math.cos(o)-l.y*Math.sin(o),h=l.x*Math.sin(o)+l.y*Math.cos(o);l.x=i+s*d,l.y=a+s*h}}},{key:"drawPath",value:function(e,t){e.beginPath(),e.moveTo(t[0].x,t[0].y);for(var i=1;i<t.length;++i)e.lineTo(t[i].x,t[i].y);e.closePath()}}]),r}(),che=function(r){oe(e,r);var n=NO(e);function e(){return x(this,e),n.apply(this,arguments)}return D(e,null,[{key:"draw",value:function(i,a){if(a.image){i.save(),i.translate(a.point.x,a.point.y),i.rotate(Math.PI/2+a.angle);var o=a.imageWidth!=null?a.imageWidth:a.image.width,s=a.imageHeight!=null?a.imageHeight:a.image.height;a.image.drawImageAtPosition(i,1,-o/2,0,o,s),i.restore()}return!1}}]),e}(xe),fhe=function(r){oe(e,r);var n=NO(e);function e(){return x(this,e),n.apply(this,arguments)}return D(e,null,[{key:"draw",value:function(i,a){var o=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];return xe.transform(o,a),xe.drawPath(i,o),!0}}]),e}(xe),vhe=function(){function r(){x(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var i=[{x:-1,y:0},{x:0,y:.3},{x:-.4,y:0},{x:0,y:-.3}];return xe.transform(i,t),xe.drawPath(e,i),!0}}]),r}(),phe=function(){function r(){x(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var i={x:-.4,y:0};xe.transform(i,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(i.x,i.y,t.length*.4,o,s,!1),e.stroke(),!0}}]),r}(),ghe=function(){function r(){x(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var i={x:-.3,y:0};xe.transform(i,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(i.x,i.y,t.length*.4,o,s,!1),e.stroke(),!0}}]),r}(),yhe=function(){function r(){x(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var i=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];return xe.transform(i,t),xe.drawPath(e,i),!0}}]),r}(),mhe=function(){function r(){x(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var i=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];return xe.transform(i,t),xe.drawPath(e,i),!0}}]),r}(),bhe=function(){function r(){x(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var i={x:-.4,y:0};return xe.transform(i,t),Zf(e,i.x,i.y,t.length*.4),!0}}]),r}(),$he=function(){function r(){x(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var i=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];return xe.transform(i,t),xe.drawPath(e,i),!0}}]),r}(),whe=function(){function r(){x(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var i=[{x:0,y:.3},{x:0,y:-.3},{x:-.6,y:-.3},{x:-.6,y:.3}];return xe.transform(i,t),xe.drawPath(e,i),!0}}]),r}(),_he=function(){function r(){x(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var i=[{x:0,y:0},{x:-.5,y:-.3},{x:-1,y:0},{x:-.5,y:.3}];return xe.transform(i,t),xe.drawPath(e,i),!0}}]),r}(),Ehe=function(){function r(){x(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var i=[{x:-1,y:.3},{x:-.5,y:0},{x:-1,y:-.3},{x:0,y:0}];return xe.transform(i,t),xe.drawPath(e,i),!0}}]),r}(),FO=function(){function r(){x(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var i;switch(t.type&&(i=t.type.toLowerCase()),i){case"image":return che.draw(e,t);case"circle":return bhe.draw(e,t);case"box":return whe.draw(e,t);case"crow":return vhe.draw(e,t);case"curve":return phe.draw(e,t);case"diamond":return _he.draw(e,t);case"inv_curve":return ghe.draw(e,t);case"triangle":return yhe.draw(e,t);case"inv_triangle":return mhe.draw(e,t);case"bar":return $he.draw(e,t);case"vee":return Ehe.draw(e,t);case"arrow":default:return fhe.draw(e,t)}}}]),r}();function y$(r,n){var e=$e(r);if(ri){var t=ri(r);n&&(t=Et(t).call(t,function(i){return di(r,i).enumerable})),e.push.apply(e,t)}return e}function m$(r){for(var n=1;n<arguments.length;n++){var e,t,i=arguments[n]!=null?arguments[n]:{};n%2?he(e=y$(Object(i),!0)).call(e,function(a){Cl(r,a,i[a])}):ii?Pl(r,ii(i)):he(t=y$(Object(i))).call(t,function(a){Il(r,a,di(i,a))})}return r}var BO=function(){function r(n,e,t){x(this,r),this._body=e,this._labelModule=t,this.color={},this.colorDirty=!0,this.hoverWidth=1.5,this.selectionWidth=2,this.setOptions(n),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,i,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,i,a,o){if(this.from!=this.to)this._line(e,t,i,a,o);else{var s=this._getCircleData(e),u=_e(s,3),l=u[0],d=u[1],h=u[2];this._circle(e,t,l,d,h)}}},{key:"_drawDashedLine",value:function(e,t,i,a,o){e.lineCap="round";var s=se(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,i);else{var u=this._getCircleData(e),l=_e(u,3),d=l[0],h=l[1],c=l[2];this._circle(e,t,d,h,c)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)eE(e,this.from.x,this.from.y,this.to.x,this.to.y,s);else{var f=this._getCircleData(e),v=_e(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,i){return this.from!=this.to?this._findBorderPosition(e,t,i):this._findBorderPositionCircle(e,t,i)}},{key:"findBorderPositions",value:function(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};var t,i=rt(t=this._getCircleData(e)).call(t,0,2),a=_e(i,2),o=a[0],s=a[1];return{from:this._findBorderPositionCircle(this.from,e,{x:o,y:s,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:o,y:s,low:.6,high:.8,direction:1})}}},{key:"_getCircleData",value:function(e){var t=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);var i=IO(e,this.options.selfReference.angle,t,this.from);return[i.x,i.y,t]}},{key:"_pointOnCircle",value:function(e,t,i,a){var o=a*2*Math.PI;return{x:e+i*Math.cos(o),y:t-i*Math.sin(o)}}},{key:"_findBorderPositionCircle",value:function(e,t,i){var a=i.x,o=i.y,s=i.low,u=i.high,l=i.direction,d=10,h=this.options.selfReference.size,c=.05,f,v=(s+u)*.5,p=0;this.options.arrowStrikethrough===!0&&(l===-1?p=this.options.endPointOffset.from:l===1&&(p=this.options.endPointOffset.to));var g=0;do{v=(s+u)*.5,f=this._pointOnCircle(a,o,h,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)<c)break;b>0?l>0?s=v:u=v:l>0?u=v:s=v,++g}while(s<=u&&g<d);return m$(m$({},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 i=e.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),a=this.from.options.color.highlight.border,o=this.to.options.color.highlight.border;return this.from.selected===!1&&this.to.selected===!1?(a=jt(this.from.options.color.border,t.opacity),o=jt(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),i.addColorStop(0,a),i.addColorStop(1,o),i}return t.inheritsColor==="to"?jt(this.to.options.color.border,t.opacity):jt(this.from.options.color.border,t.opacity)}else return jt(t.color,t.opacity)}},{key:"_circle",value:function(e,t,i,a,o){this.enableShadow(e,t);var s=0,u=Math.PI*2;if(!this.options.selfReference.renderBehindTheNode){var l=this.options.selfReference.angle,d=this.options.selfReference.angle+Math.PI,h=this._findBorderPositionCircle(this.from,e,{x:i,y:a,low:l,high:d,direction:-1}),c=this._findBorderPositionCircle(this.from,e,{x:i,y:a,low:l,high:d,direction:1});s=Math.atan2(h.y-a,h.x-i),u=Math.atan2(c.y-a,c.x-i)}e.beginPath(),e.arc(i,a,o,s,u,!1),e.stroke(),this.disableShadow(e,t)}},{key:"getDistanceToEdge",value:function(e,t,i,a,o,s){if(this.from!=this.to)return this._getDistanceToEdge(e,t,i,a,o,s);var u=this._getCircleData(void 0),l=_e(u,3),d=l[0],h=l[1],c=l[2],f=d-o,v=h-s;return Math.abs(Math.sqrt(f*f+v*v)-c)}},{key:"_getDistanceToLine",value:function(e,t,i,a,o,s){var u=i-e,l=a-t,d=u*u+l*l,h=((o-e)*u+(s-t)*l)/d;h>1?h=1:h<0&&(h=0);var c=e+h*u,f=t+h*l,v=c-o,p=f-s;return Math.sqrt(v*v+p*p)}},{key:"getArrowData",value:function(e,t,i,a,o,s){var u,l,d,h,c,f,v,p=s.width;t==="from"?(d=this.from,h=this.to,c=s.fromArrowScale<0,f=Math.abs(s.fromArrowScale),v=s.fromArrowType):t==="to"?(d=this.to,h=this.from,c=s.toArrowScale<0,f=Math.abs(s.toArrowScale),v=s.toArrowType):(d=this.to,h=this.from,c=s.middleArrowScale<0,f=Math.abs(s.middleArrowScale),v=s.middleArrowType);var g=15*f+3*p;if(d!=h){var y=dhe(d.x-h.x,d.y-h.y),m=g/y;if(t!=="middle")if(this.options.smooth.enabled===!0){var w=this._findBorderPosition(d,e,{via:i}),b=this.getPoint(w.t+m*(t==="from"?1:-1),i);u=Math.atan2(w.y-b.y,w.x-b.x),l=w}else u=Math.atan2(d.y-h.y,d.x-h.x),l=this._findBorderPosition(d,e);else{var _=(c?-m:m)/2,S=this.getPoint(.5+_,i),I=this.getPoint(.5-_,i);u=Math.atan2(S.y-I.y,S.x-I.x),l=this.getPoint(.5,i)}}else{var N=this._getCircleData(e),R=_e(N,3),M=R[0],B=R[1],V=R[2];if(t==="from"){var J=this.options.selfReference.angle,ce=this.options.selfReference.angle+Math.PI,ot=this._findBorderPositionCircle(this.from,e,{x:M,y:B,low:J,high:ce,direction:-1});u=ot.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,l=ot}else if(t==="to"){var Qe=this.options.selfReference.angle,qt=this.options.selfReference.angle+Math.PI,pt=this._findBorderPositionCircle(this.from,e,{x:M,y:B,low:Qe,high:qt,direction:1});u=pt.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,l=pt}else{var Pt=this.options.selfReference.angle/(2*Math.PI);l=this._pointOnCircle(M,B,V,Pt),u=Pt*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}var nr=l.x-g*.9*Math.cos(u),Je=l.y-g*.9*Math.sin(u),ye={x:nr,y:Je};return{point:l,core:ye,angle:u,length:g,type:v}}},{key:"drawArrowHead",value:function(e,t,i,a,o){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width;var s=FO.draw(e,o);s&&(this.enableShadow(e,t),Vo(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 i={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=t.backgroundColor,e.lineWidth=t.backgroundSize,this.setStrokeDashed(e,t.backgroundDashes),e.stroke(),e.strokeStyle=i.strokeStyle,e.lineWidth=i.lineWidth,e.dashes=i.dashes,this.setStrokeDashed(e,t.dashes)}}},{key:"setStrokeDashed",value:function(e,t){if(t!==!1)if(e.setLineDash!==void 0){var i=se(t)?t:[5,5];e.setLineDash(i)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else e.setLineDash!==void 0?e.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}]),r}();function b$(r,n){var e=$e(r);if(ri){var t=ri(r);n&&(t=Et(t).call(t,function(i){return di(r,i).enumerable})),e.push.apply(e,t)}return e}function $$(r){for(var n=1;n<arguments.length;n++){var e,t,i=arguments[n]!=null?arguments[n]:{};n%2?he(e=b$(Object(i),!0)).call(e,function(a){Cl(r,a,i[a])}):ii?Pl(r,ii(i)):he(t=b$(Object(i))).call(t,function(a){Il(r,a,di(i,a))})}return r}function She(r){var n=Ohe();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function Ohe(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Fv=function(r){oe(e,r);var n=She(e);function e(t,i,a){return x(this,e),n.call(this,t,i,a)}return D(e,[{key:"_findBorderPositionBezier",value:function(i,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates(),s=10,u=.2,l=!1,d=1,h=0,c=this.to,f,v,p=this.options.endPointOffset?this.options.endPointOffset.to:0;i.id===this.from.id&&(c=this.from,l=!0,p=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(p=0);var g=0;do{v=(h+d)*.5,f=this.getPoint(v,o);var y=Math.atan2(c.y-f.y,c.x-f.x),m=c.distanceToBorder(a,y)+p,w=Math.sqrt(Math.pow(f.x-c.x,2)+Math.pow(f.y-c.y,2)),b=m-w;if(Math.abs(b)<u)break;b<0?l===!1?h=v:d=v:l===!1?d=v:h=v,++g}while(h<=d&&g<s);return $$($$({},f),{},{t:v})}},{key:"_getDistanceToBezierEdge",value:function(i,a,o,s,u,l,d){var h=1e9,c,f,v,p,g,y=i,m=a;for(f=1;f<10;f++)v=.1*f,p=Math.pow(1-v,2)*i+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&&(c=this._getDistanceToLine(y,m,p,g,u,l),h=c<h?c:h),y=p,m=g;return h}},{key:"_bezierCurve",value:function(i,a,o,s){i.beginPath(),i.moveTo(this.fromPoint.x,this.fromPoint.y),o!=null&&o.x!=null?s!=null&&s.x!=null?i.bezierCurveTo(o.x,o.y,s.x,s.y,this.toPoint.x,this.toPoint.y):i.quadraticCurveTo(o.x,o.y,this.toPoint.x,this.toPoint.y):i.lineTo(this.toPoint.x,this.toPoint.y),this.drawBackground(i,a),this.enableShadow(i,a),i.stroke(),this.disableShadow(i,a)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}}]),e}(BO);function The(r){var n=khe();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function khe(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var w$=function(r){oe(e,r);var n=The(e);function e(t,i,a){var o;return x(this,e),o=n.call(this,t,i,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(i){Xs(L(e.prototype),"setOptions",this).call(this,i);var a=!1;this.options.physics!==i.physics&&(a=!0),this.options=i,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),a===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}},{key:"connect",value:function(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}},{key:"cleanup",value:function(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),this.via!==void 0?(delete this._body.nodes[this.via.id],this.via=void 0,!0):!1}},{key:"setupSupportNode",value:function(){if(this.via===void 0){var i="edgeId:"+this.id,a=this._body.functions.createNode({id:i,shape:"circle",physics:!0,hidden:!0});this._body.nodes[i]=a,this.via=a,this.via.parentEdgeId=this.id,this.positionBezierNode()}}},{key:"positionBezierNode",value:function(){this.via!==void 0&&this.from!==void 0&&this.to!==void 0?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):this.via!==void 0&&(this.via.x=0,this.via.y=0)}},{key:"_line",value:function(i,a,o){this._bezierCurve(i,a,o)}},{key:"_getViaCoordinates",value:function(){return this.via}},{key:"getViaNode",value:function(){return this.via}},{key:"getPoint",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){var o=this._getCircleData(),s=_e(o,3),u=s[0],l=s[1],d=s[2],h=2*Math.PI*(1-i);return{x:u+d*Math.sin(h),y:l+d-d*(1-Math.cos(h))}}else return{x:Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*a.x+Math.pow(i,2)*this.toPoint.x,y:Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*a.y+Math.pow(i,2)*this.toPoint.y}}},{key:"_findBorderPosition",value:function(i,a){return this._findBorderPositionBezier(i,a,this.via)}},{key:"_getDistanceToEdge",value:function(i,a,o,s,u,l){return this._getDistanceToBezierEdge(i,a,o,s,u,l,this.via)}}]),e}(Fv);function Phe(r){var n=Ihe();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function Ihe(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var _$=function(r){oe(e,r);var n=Phe(e);function e(t,i,a){return x(this,e),n.call(this,t,i,a)}return D(e,[{key:"_line",value:function(i,a,o){this._bezierCurve(i,a,o)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var i=this.options.smooth.roundness,a=this.options.smooth.type,o=Math.abs(this.from.x-this.to.x),s=Math.abs(this.from.y-this.to.y);if(a==="discrete"||a==="diagonalCross"){var u,l;o<=s?u=l=i*s:u=l=i*o,this.from.x>this.to.x&&(u=-u),this.from.y>=this.to.y&&(l=-l);var d=this.from.x+u,h=this.from.y+l;return a==="discrete"&&(o<=s?d=o<i*s?this.from.x:d:h=s<i*o?this.from.y:h),{x:d,y:h}}else if(a==="straightCross"){var c=(1-i)*o,f=(1-i)*s;return o<=s?(c=0,this.from.y<this.to.y&&(f=-f)):(this.from.x<this.to.x&&(c=-c),f=0),{x:this.to.x+c,y:this.to.y+f}}else if(a==="horizontal"){var v=(1-i)*o;return this.from.x<this.to.x&&(v=-v),{x:this.to.x+v,y:this.from.y}}else if(a==="vertical"){var p=(1-i)*s;return this.from.y<this.to.y&&(p=-p),{x:this.from.x,y:this.to.y+p}}else if(a==="curvedCW"){o=this.to.x-this.from.x,s=this.from.y-this.to.y;var g=Math.sqrt(o*o+s*s),y=Math.PI,m=Math.atan2(s,o),w=(m+(i*.5+.5)*y)%(2*y);return{x:this.from.x+(i*.5+.5)*g*Math.sin(w),y:this.from.y+(i*.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),_=Math.PI,S=Math.atan2(s,o),I=(S+(-i*.5+.5)*_)%(2*_);return{x:this.from.x+(i*.5+.5)*b*Math.sin(I),y:this.from.y+(i*.5+.5)*b*Math.cos(I)}}else{var N,R;o<=s?N=R=i*s:N=R=i*o,this.from.x>this.to.x&&(N=-N),this.from.y>=this.to.y&&(R=-R);var M=this.from.x+N,B=this.from.y+R;return o<=s?this.from.x<=this.to.x?M=this.to.x<M?this.to.x:M:M=this.to.x>M?this.to.x:M:this.from.y>=this.to.y?B=this.to.y>B?this.to.y:B:B=this.to.y<B?this.to.y:B,{x:M,y:B}}}},{key:"_findBorderPosition",value:function(i,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(i,a,o.via)}},{key:"_getDistanceToEdge",value:function(i,a,o,s,u,l){var d=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(i,a,o,s,u,l,d)}},{key:"getPoint",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=i,s=Math.pow(1-o,2)*this.fromPoint.x+2*o*(1-o)*a.x+Math.pow(o,2)*this.toPoint.x,u=Math.pow(1-o,2)*this.fromPoint.y+2*o*(1-o)*a.y+Math.pow(o,2)*this.toPoint.y;return{x:s,y:u}}}]),e}(Fv);function Che(r){var n=Ahe();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function Ahe(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var xhe=function(r){oe(e,r);var n=Che(e);function e(t,i,a){return x(this,e),n.call(this,t,i,a)}return D(e,[{key:"_getDistanceToBezierEdge2",value:function(i,a,o,s,u,l,d,h){for(var c=1e9,f=i,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]*i+p[1]*d.x+p[2]*h.x+p[3]*o,w=p[0]*a+p[1]*d.y+p[2]*h.y+p[3]*s;if(g>0){var b=this._getDistanceToLine(f,v,m,w,u,l);c=b<c?b:c}f=m,v=w}return c}}]),e}(Fv);function Dhe(r){var n=Rhe();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function Rhe(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var E$=function(r){oe(e,r);var n=Dhe(e);function e(t,i,a){return x(this,e),n.call(this,t,i,a)}return D(e,[{key:"_line",value:function(i,a,o){var s=o[0],u=o[1];this._bezierCurve(i,a,s,u)}},{key:"_getViaCoordinates",value:function(){var i=this.from.x-this.to.x,a=this.from.y-this.to.y,o,s,u,l,d=this.options.smooth.roundness;return(Math.abs(i)>Math.abs(a)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(s=this.from.y,l=this.to.y,o=this.from.x-d*i,u=this.to.x+d*i):(s=this.from.y-d*a,l=this.to.y+d*a,o=this.from.x,u=this.to.x),[{x:o,y:s},{x:u,y:l}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(i,a){return this._findBorderPositionBezier(i,a)}},{key:"_getDistanceToEdge",value:function(i,a,o,s,u,l){var d=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates(),h=_e(d,2),c=h[0],f=h[1];return this._getDistanceToBezierEdge2(i,a,o,s,u,l,c,f)}},{key:"getPoint",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=_e(a,2),s=o[0],u=o[1],l=i,d=[Math.pow(1-l,3),3*l*Math.pow(1-l,2),3*Math.pow(l,2)*(1-l),Math.pow(l,3)],h=d[0]*this.fromPoint.x+d[1]*s.x+d[2]*u.x+d[3]*this.toPoint.x,c=d[0]*this.fromPoint.y+d[1]*s.y+d[2]*u.y+d[3]*this.toPoint.y;return{x:h,y:c}}}]),e}(xhe);function Mhe(r){var n=Nhe();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function Nhe(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var S$=function(r){oe(e,r);var n=Mhe(e);function e(t,i,a){return x(this,e),n.call(this,t,i,a)}return D(e,[{key:"_line",value:function(i,a){i.beginPath(),i.moveTo(this.fromPoint.x,this.fromPoint.y),i.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(i,a),i.stroke(),this.disableShadow(i,a)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(i){return{x:(1-i)*this.fromPoint.x+i*this.toPoint.x,y:(1-i)*this.fromPoint.y+i*this.toPoint.y}}},{key:"_findBorderPosition",value:function(i,a){var o=this.to,s=this.from;i.id===this.from.id&&(o=this.from,s=this.to);var u=Math.atan2(o.y-s.y,o.x-s.x),l=o.x-s.x,d=o.y-s.y,h=Math.sqrt(l*l+d*d),c=i.distanceToBorder(a,u),f=(h-c)/h;return{x:(1-f)*s.x+f*o.x,y:(1-f)*s.y+f*o.y,t:0}}},{key:"_getDistanceToEdge",value:function(i,a,o,s,u,l){return this._getDistanceToLine(i,a,o,s,u,l)}}]),e}(BO),An=function(){function r(n,e,t,i,a){if(x(this,r),e===void 0)throw new Error("No body provided");this.options=Zr(i),this.globalOptions=i,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 AO(this.body,this.options,!0),this.setOptions(n)}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=PO(e.value));var i=[e,this.options,this.defaultOptions];return this.chooser=Dv("edge",i),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,i=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,a=this.options.color.inherit,o={toArrow:e,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:i,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow: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 u=this.options.hoverWidth;typeof u=="function"?o.width=u(o.width):typeof u=="number"&&(o.width+=u),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.hover,o.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(o,this.options.id,this.selected,this.hover),o.color!==void 0&&(o.inheritsColor=!1),o.shadow===!1&&(o.shadowColor!==this.options.shadow.color||o.shadowSize!==this.options.shadow.size||o.shadowX!==this.options.shadow.x||o.shadowY!==this.options.shadow.y)&&(o.shadow=!0));else o.shadow=this.options.shadow.enabled,o.width=Math.max(o.width,.3/this.body.view.scale);return o}},{key:"updateLabelModule",value:function(e){var 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,i=!0;return this.edgeType!==void 0&&((this.edgeType instanceof w$&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof E$&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof _$&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof S$&&e.type.enabled===!1)&&(i=!1),i===!0&&(t=this.cleanup())),i===!0?e.enabled===!0?e.type==="dynamic"?(t=!0,this.edgeType=new w$(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new E$(this.options,this.body,this.labelModule):this.edgeType=new _$(this.options,this.body,this.labelModule):this.edgeType=new S$(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,i){if(this.options.value!==void 0){var a=this.options.scaling.customScalingFunction(e,t,i,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){var s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+a*s}this.options.width=this.options.scaling.min+a*o}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}},{key:"_setInteractionWidths",value:function(){typeof this.options.hoverWidth=="function"?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,typeof this.options.selectionWidth=="function"?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}},{key:"draw",value:function(e){var t=this.getFormattingValues();if(!t.hidden){var i=this.edgeType.getViaNode();this.edgeType.drawLine(e,t,this.selected,this.hover,i),this.drawLabel(e,i)}}},{key:"drawArrows",value:function(e){var t=this.getFormattingValues();if(!t.hidden){var i=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",i,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",i,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",i,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 i=this.from,a=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);var o;if(i.id!=a.id){this.labelModule.pointToSelf=!1,o=this.edgeType.getPoint(.5,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 u=IO(e,this.options.selfReference.angle,this.options.selfReference.size,i);o=this._pointOnCircle(u.x,u.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(e){var t=[];if(this.labelModule.visible()){var i=this._getRotation();Zc(this.labelModule.getSize(),e,i)&&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,i=this.from.x,a=this.from.y,o=this.to.x,s=this.to.y,u=e.left,l=e.top,d=this.edgeType.getDistanceToEdge(i,a,o,s,u,l);return d<t}else return!1}},{key:"_getRotation",value:function(e){var t=this.edgeType.getViaNode(),i=this.edgeType.getPoint(.5,t);e!==void 0&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,i.x,i.y);var a={x:i.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible()||this.options.font.align==="horizontal")return a;var o=this.from.y-this.to.y,s=this.from.x-this.to.x,u=Math.atan2(o,s);return(u<-1&&s<0||u>0&&s<0)&&(u+=Math.PI),a.angle=u,a}},{key:"_pointOnCircle",value:function(e,t,i,a){return{x:e+i*Math.cos(a),y:t-i*Math.sin(a)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}},{key:"remove",value:function(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}},{key:"endPointsValid",value:function(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}}],[{key:"parseOptions",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s=["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"];if(ya(s,e,t,i),t.endPointOffset!==void 0&&t.endPointOffset.from!==void 0&&(Ei(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&&(Ei(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"))),Tu(t.label)?e.label=t.label:Tu(e.label)||(e.label=void 0),Lt(e,t,"smooth",a),Lt(e,t,"shadow",a),Lt(e,t,"background",a),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:i===!0&&t.dashes===null&&(e.dashes=Ci(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),Lt(e.scaling,t.scaling,"label",a.scaling)):i===!0&&t.scaling===null&&(e.scaling=Ci(a.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows=="string"){var u=t.arrows.toLowerCase();e.arrows.to.enabled=re(u).call(u,"to")!=-1,e.arrows.middle.enabled=re(u).call(u,"middle")!=-1,e.arrows.from.enabled=re(u).call(u,"from")!=-1}else if(de(t.arrows)==="object")Lt(e.arrows,t.arrows,"to",a.arrows),Lt(e.arrows,t.arrows,"middle",a.arrows),Lt(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:"+Wo(t.arrows));else i===!0&&t.arrows===null&&(e.arrows=Ci(a.arrows));if(t.color!==void 0&&t.color!==null){var l=Ur(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,d=e.color;if(o)ve(d,a.color,!1,i);else for(var h in d)Object.prototype.hasOwnProperty.call(d,h)&&delete d[h];if(Ur(d))d.color=d,d.highlight=d,d.hover=d,d.inherit=!1,l.opacity===void 0&&(d.opacity=1);else{var c=!1;l.color!==void 0&&(d.color=l.color,c=!0),l.highlight!==void 0&&(d.highlight=l.highlight,c=!0),l.hover!==void 0&&(d.hover=l.hover,c=!0),l.inherit!==void 0&&(d.inherit=l.inherit),l.opacity!==void 0&&(d.opacity=Math.min(1,Math.max(0,l.opacity))),c===!0?d.inherit=!1:d.inherit===void 0&&(d.inherit="from")}}else i===!0&&t.color===null&&(e.color=Zr(a.color));i===!0&&t.font===null&&(e.font=Zr(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}(),Fhe=function(){function r(n,e,t){var i,a=this;x(this,r),this.body=n,this.images=e,this.groups=t,this.body.functions.createEdge=k(i=this.create).call(i,this),this.edgesListeners={add:function(s,u){a.add(u.items)},update:function(s,u){a.update(u.items)},remove:function(s,u){a.remove(u.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(s,u,l,d){if(u===s)return .5;var h=1/(u-s);return Math.max(0,(d-s)*h)}},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},ve(this.options,this.defaultOptions),this.bindEventListeners()}return D(r,[{key:"bindEventListeners",value:function(){var e=this,t,i;this.body.emitter.on("_forceDisableDynamicCurves",function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;a==="dynamic"&&(a="continuous");var s=!1;for(var u in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,u)){var l=e.body.edges[u],d=e.body.data.edges.get(u);if(d!=null){var h=d.smooth;h!==void 0&&h.enabled===!0&&h.type==="dynamic"&&(a===void 0?l.setOptions({smooth:!1}):l.setOptions({smooth:{type:a}}),s=!0)}}o===!0&&s===!0&&e.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",function(){e.reconnectEdges()}),this.body.emitter.on("refreshEdges",k(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",k(i=this.refresh).call(i,this)),this.body.emitter.on("destroy",function(){te(e.edgesListeners,function(a,o){e.body.data.edges&&e.body.data.edges.off(o,a)}),delete e.body.functions.createEdge,delete e.edgesListeners.add,delete e.edgesListeners.update,delete e.edgesListeners.remove,delete e.edgesListeners})}},{key:"setOptions",value:function(e){if(e!==void 0){An.parseOptions(this.options,e,!0,this.defaultOptions,!0);var t=!1;if(e.smooth!==void 0)for(var i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&(t=this.body.edges[i].updateEdgeType()||t);if(e.font!==void 0)for(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,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.body.data.edges;if(A0("id",e))this.body.data.edges=e;else if(se(e))this.body.data.edges=new vu,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new vu;else throw new TypeError("Array or DataSet expected");if(a&&te(this.edgesListeners,function(s,u){a.off(u,s)}),this.body.edges={},this.body.data.edges){te(this.edgesListeners,function(s,u){t.body.data.edges.on(u,s)});var o=this.body.data.edges.getIds();this.add(o,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),i===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=this.body.edges,a=this.body.data.edges,o=0;o<e.length;o++){var s=e[o],u=i[s];u&&u.disconnect();var l=a.get(s,{showInternalIds:!0});i[s]=this.create(l)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),t===!1&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(e){for(var t=this.body.edges,i=this.body.data.edges,a=!1,o=0;o<e.length;o++){var s=e[o],u=i.get(s),l=t[s];l!==void 0?(l.disconnect(),a=l.setOptions(u)||a,l.connect()):(this.body.edges[s]=this.create(u),a=!0)}a===!0?(this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),this.body.emitter.emit("_dataChanged")):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length!==0){var i=this.body.edges;te(e,function(a){var o=i[a];o!==void 0&&o.remove()}),t&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var e=this;te(this.body.edges,function(t,i){var a=e.body.data.edges.get(i);a!==void 0&&t.setOptions(a)})}},{key:"create",value:function(e){return new An(e,this.body,this.images,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var e,t=this.body.nodes,i=this.body.edges;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].edges=[]);for(e in i)if(Object.prototype.hasOwnProperty.call(i,e)){var a=i[e];a.from=null,a.to=null,a.connect()}}},{key:"getConnectedNodes",value:function(e){var t=[];if(this.body.edges[e]!==void 0){var i=this.body.edges[e];i.fromId!==void 0&&t.push(i.fromId),i.toId!==void 0&&t.push(i.toId)}return t}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var e=this,t=[];te(this.body.edges,function(i,a){var o=e.body.nodes[i.toId],s=e.body.nodes[i.fromId];o!==void 0&&o.isCluster===!0||s!==void 0&&s.isCluster===!0||(o===void 0||s===void 0)&&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,i=[];he(e).call(e,function(a,o){var s=t[o];s===void 0&&i.push(o)}),this.add(i,!0)}}}]),r}(),LO=function(){function r(n,e,t){x(this,r),this.body=n,this.physicsBody=e,this.barnesHutTree,this.setOptions(t),this._rng=Tl("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,i=this.physicsBody.physicsNodeIndices,a=i.length,o=this._formBarnesHutTree(t,i);this.barnesHutTree=o;for(var s=0;s<a;s++)e=t[i[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 i=e.centerOfMass.x-t.x,a=e.centerOfMass.y-t.y,o=Math.sqrt(i*i+a*a);o*e.calcSize>this.thetaInversed?this._calculateForces(o,i,a,t,e):e.childrenCount===4?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(o,i,a,t,e)}}},{key:"_calculateForces",value:function(e,t,i,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),u=t*s,l=i*s;this.physicsBody.forces[a.id].x+=u,this.physicsBody.forces[a.id].y+=l}},{key:"_formBarnesHutTree",value:function(e,t){for(var i,a=t.length,o=e[t[0]].x,s=e[t[0]].y,u=e[t[0]].x,l=e[t[0]].y,d=1;d<a;d++){var h=e[t[d]],c=h.x,f=h.y;h.options.mass>0&&(c<o&&(o=c),c>u&&(u=c),f<s&&(s=f),f>l&&(l=f))}var v=Math.abs(u-o)-Math.abs(l-s);v>0?(s-=.5*v,l+=.5*v):(o+=.5*v,u-=.5*v);var p=1e-5,g=Math.max(p,Math.abs(u-o)),y=.5*g,m=.5*(o+u),w=.5*(s+l),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 _=0;_<a;_++)i=e[t[_]],i.options.mass>0&&this._placeInTree(b.root,i);return b}},{key:"_updateBranchMass",value:function(e,t){var i=e.centerOfMass,a=e.mass+t.options.mass,o=1/a;i.x=i.x*e.mass+t.x*t.options.mass,i.x*=o,i.y=i.y*e.mass+t.y*t.options.mass,i.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,i){(i!=!0||i===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,i){var a=e.children[i];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 i,a,o,s,u=.5*e.size;switch(t){case"NW":i=e.range.minX,a=e.range.minX+u,o=e.range.minY,s=e.range.minY+u;break;case"NE":i=e.range.minX+u,a=e.range.maxX,o=e.range.minY,s=e.range.minY+u;break;case"SW":i=e.range.minX,a=e.range.minX+u,o=e.range.minY+u,s=e.range.maxY;break;case"SE":i=e.range.minX+u,a=e.range.maxX,o=e.range.minY+u,s=e.range.maxY;break}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:a,minY:o,maxY:s},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}},{key:"_debug",value:function(e,t){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}},{key:"_drawBranch",value:function(e,t,i){i===void 0&&(i="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=i,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}}]),r}(),Bhe=function(){function r(n,e,t){x(this,r),this._rng=Tl("REPULSION SOLVER"),this.body=n,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,i,a,o,s,u,l,d=this.body.nodes,h=this.physicsBody.physicsNodeIndices,c=this.physicsBody.forces,f=this.options.nodeDistance,v=-2/3/f,p=4/3,g=0;g<h.length-1;g++){u=d[h[g]];for(var y=g+1;y<h.length;y++)l=d[h[y]],e=l.x-u.x,t=l.y-u.y,i=Math.sqrt(e*e+t*t),i===0&&(i=.1*this._rng(),e=i),i<2*f&&(i<.5*f?s=1:s=v*i+p,s=s/i,a=e*s,o=t*s,c[u.id].x-=a,c[u.id].y-=o,c[l.id].x+=a,c[l.id].y+=o)}}}]),r}(),Lhe=function(){function r(n,e,t){x(this,r),this.body=n,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,i=this.physicsBody.forces,a=this.options.nodeDistance,o=0;o<t.length-1;o++)for(var s=e[t[o]],u=o+1;u<t.length;u++){var l=e[t[u]];if(s.level===l.level){var d=a+this.overlapAvoidanceFactor*((s.shape.radius||0)/2+(l.shape.radius||0)/2),h=l.x-s.x,c=l.y-s.y,f=Math.sqrt(h*h+c*c),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=h*p,y=c*p;i[s.id].x-=g,i[s.id].y-=y,i[l.id].x+=g,i[l.id].y+=y}}}}]),r}(),Nh=function(){function r(n,e,t){x(this,r),this.body=n,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,i=this.physicsBody.physicsEdgeIndices,a=this.body.edges,o,s,u,l=0;l<i.length;l++)t=a[i[l]],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,u=t.from,this._calculateSpringForce(o,s,.5*e),this._calculateSpringForce(s,u,.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,i){var a=e.x-t.x,o=e.y-t.y,s=Math.max(Math.sqrt(a*a+o*o),.01),u=this.options.springConstant*(i-s)/s,l=a*u,d=o*u;this.physicsBody.forces[e.id]!==void 0&&(this.physicsBody.forces[e.id].x+=l,this.physicsBody.forces[e.id].y+=d),this.physicsBody.forces[t.id]!==void 0&&(this.physicsBody.forces[t.id].x-=l,this.physicsBody.forces[t.id].y-=d)}}]),r}(),jhe=function(){function r(n,e,t){x(this,r),this.body=n,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,i,a,o,s,u,l,d=this.body.edges,h=.5,c=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<c.length;y++)t=d[c[y]],t.connected===!0&&(e=t.options.length===void 0?this.options.springLength:t.options.length,i=t.from.x-t.to.x,a=t.from.y-t.to.y,l=Math.sqrt(i*i+a*a),l=l===0?.01:l,u=this.options.springConstant*(e-l)/l,o=i*u,s=a*u,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-=h*o,v[t.toId].y-=h*s),v[t.fromId]!==void 0&&(v[t.fromId].x+=h*o,v[t.fromId].y+=h*s)));u=1;for(var m,w,b=0;b<f.length;b++){var _=f[b];m=Math.min(u,Math.max(-u,v[_].springFx)),w=Math.min(u,Math.max(-u,v[_].springFy)),v[_].x+=m,v[_].y+=w}for(var S=0,I=0,N=0;N<f.length;N++){var R=f[N];S+=v[R].x,I+=v[R].y}for(var M=S/f.length,B=I/f.length,V=0;V<f.length;V++){var J=f[V];v[J].x-=M,v[J].y-=B}}}]),r}(),Qs=function(){function r(n,e,t){x(this,r),this.body=n,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,i,a,o=this.body.nodes,s=this.physicsBody.physicsNodeIndices,u=this.physicsBody.forces,l=0;l<s.length;l++){var d=s[l];a=o[d],e=-a.x,t=-a.y,i=Math.sqrt(e*e+t*t),this._calculateForces(i,e,t,u,a)}}},{key:"_calculateForces",value:function(e,t,i,a,o){var s=e===0?0:this.options.centralGravity/e;a[o.id].x=t*s,a[o.id].y=i*s}}]),r}();function zhe(r){var n=Hhe();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function Hhe(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Whe=function(r){oe(e,r);var n=zhe(e);function e(t,i,a){var o;return x(this,e),o=n.call(this,t,i,a),o._rng=Tl("FORCE ATLAS 2 BASED REPULSION SOLVER"),o}return D(e,[{key:"_calculateForces",value:function(i,a,o,s,u){i===0&&(i=.1*this._rng(),a=i),this.overlapAvoidanceFactor<1&&s.shape.radius&&(i=Math.max(.1+this.overlapAvoidanceFactor*s.shape.radius,i-s.shape.radius));var l=s.edges.length+1,d=this.options.gravitationalConstant*u.mass*s.options.mass*l/Math.pow(i,2),h=a*d,c=o*d;this.physicsBody.forces[s.id].x+=h,this.physicsBody.forces[s.id].y+=c}}]),e}(LO);function Vhe(r){var n=Uhe();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function Uhe(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Ghe=function(r){oe(e,r);var n=Vhe(e);function e(t,i,a){return x(this,e),n.call(this,t,i,a)}return D(e,[{key:"_calculateForces",value:function(i,a,o,s,u){if(i>0){var l=u.edges.length+1,d=this.options.centralGravity*l*u.options.mass;s[u.id].x=a*d,s[u.id].y=o*d}}}]),e}(Qs),Khe=function(){function r(n){x(this,r),this.body=n,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},Ne(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,Eu(["stabilization"],this.options,e),Lt(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());var t=this.options.wind;t&&((typeof t.x!="number"||Jc(t.x))&&(t.x=0),(typeof t.y!="number"||Jc(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 Whe(this.body,this.physicsBody,e),this.edgesSolver=new Nh(this.body,this.physicsBody,e),this.gravitySolver=new Ghe(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 Nh(this.body,this.physicsBody,e),this.gravitySolver=new Qs(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new Lhe(this.body,this.physicsBody,e),this.edgesSolver=new jhe(this.body,this.physicsBody,e),this.gravitySolver=new Qs(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new LO(this.body,this.physicsBody,e),this.edgesSolver=new Nh(this.body,this.physicsBody,e),this.gravitySolver=new Qs(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=k(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=bu();this.physicsTick();var t=bu()-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)&&pr(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 i in e)Object.prototype.hasOwnProperty.call(e,i)&&e[i].options.physics===!0&&this.physicsBody.physicsNodeIndices.push(e[i].id);for(var a in 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 u in this.physicsBody.velocities)e[u]===void 0&&delete this.physicsBody.velocities[u]}},{key:"revert",value:function(){var e=$e(this.previousStates),t=this.body.nodes,i=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}},i[o].x=this.previousStates[o].vx,i[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,i,a=this.body.nodes,o=this.referenceState,s=.3;for(var u in this.referenceState)if(Object.prototype.hasOwnProperty.call(this.referenceState,u)&&a[u]!==void 0&&(e=a[u].x-o[u].positions.x,t=a[u].y-o[u].positions.y,i=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),i>s))return!1;return!0}},{key:"moveNodes",value:function(){for(var e=this.physicsBody.physicsNodeIndices,t=0,i=0,a=5,o=0;o<e.length;o++){var s=e[o],u=this._performStep(s);t=Math.max(t,u),i+=u}this.adaptiveTimestepEnabled=i/e.length<a,this.stabilized=t<this.options.minVelocity}},{key:"calculateComponentVelocity",value:function(e,t,i){var a=this.modelOptions.damping*e,o=(t-a)/i;e+=o*this.timestep;var s=this.options.maxVelocity||1e9;return Math.abs(e)>s&&(e=e>0?s:-s),e}},{key:"_performStep",value:function(e){var t=this.body.nodes[e],i=this.physicsBody.forces[e];this.options.wind&&(i.x+=this.options.wind.x,i.y+=this.options.wind.y);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,i.x,t.options.mass),t.x+=a.x*this.timestep):(i.x=0,a.x=0),t.options.fixed.y===!1?(a.y=this.calculateComponentVelocity(a.y,i.y,t.options.mass),t.y+=a.y*this.timestep):(i.y=0,a.y=0);var o=Math.sqrt(Math.pow(a.x,2)+Math.pow(a.y,2));return o}},{key:"_freezeNodes",value:function(){var e=this.body.nodes;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].x&&e[t].y){var i=e[t].options.fixed;this.freezeCache[t]={x:i.x,y:i.y},i.x=!0,i.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,pr(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},i=function(){e.body.emitter.emit("stabilizationProgress",{iterations:e.stabilizationIterations,total:e.targetIterations})};this._startStabilizing()&&i();for(var a=0;t()&&a<this.options.stabilization.updateInterval;)this.physicsTick(),a++;if(i(),t()){var o;pr(k(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 i=this.physicsBody.physicsNodeIndices[t],a=this.body.nodes[i],o=this.physicsBody.forces[i],s=20,u=.03,l=Math.sqrt(Math.pow(o.x,2)+Math.pow(o.x,2)),d=Math.min(Math.max(5,l),15),h=3*d,c=Yc((180-Math.min(1,Math.max(0,u*l))*180)/360,1,1),f={x:a.x+s*o.x,y:a.y+s*o.y};e.lineWidth=d,e.strokeStyle=c,e.beginPath(),e.moveTo(a.x,a.y),e.lineTo(f.x,f.y),e.stroke();var v=Math.atan2(o.y,o.x);e.fillStyle=c,FO.draw(e,{type:"arrow",point:f,angle:v,length:h}),Vo(e).call(e)}}}]),r}();let Cs;const qhe=new Uint8Array(16);function Yhe(){if(!Cs&&(Cs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Cs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Cs(qhe)}const et=[];for(let r=0;r<256;++r)et.push((r+256).toString(16).slice(1));function Xhe(r,n=0){return et[r[n+0]]+et[r[n+1]]+et[r[n+2]]+et[r[n+3]]+"-"+et[r[n+4]]+et[r[n+5]]+"-"+et[r[n+6]]+et[r[n+7]]+"-"+et[r[n+8]]+et[r[n+9]]+"-"+et[r[n+10]]+et[r[n+11]]+et[r[n+12]]+et[r[n+13]]+et[r[n+14]]+et[r[n+15]]}const Qhe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var O$={randomUUID:Qhe};function Fa(r,n,e){if(O$.randomUUID&&!n&&!r)return O$.randomUUID();r=r||{};const t=r.random||(r.rng||Yhe)();if(t[6]=t[6]&15|64,t[8]=t[8]&63|128,n){e=e||0;for(let i=0;i<16;++i)n[e+i]=t[i];return n}return Xhe(t)}var dt=function(){function r(){x(this,r)}return D(r,null,[{key:"getRange",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,a=-1e9,o=1e9,s=-1e9,u;if(t.length>0)for(var l=0;l<t.length;l++)u=e[t[l]],o>u.shape.boundingBox.left&&(o=u.shape.boundingBox.left),s<u.shape.boundingBox.right&&(s=u.shape.boundingBox.right),i>u.shape.boundingBox.top&&(i=u.shape.boundingBox.top),a<u.shape.boundingBox.bottom&&(a=u.shape.boundingBox.bottom);return o===1e9&&s===-1e9&&i===1e9&&a===-1e9&&(i=0,a=0,o=0,s=0),{minX:o,maxX:s,minY:i,maxY:a}}},{key:"getRangeCore",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,a=-1e9,o=1e9,s=-1e9,u;if(t.length>0)for(var l=0;l<t.length;l++)u=e[t[l]],o>u.x&&(o=u.x),s<u.x&&(s=u.x),i>u.y&&(i=u.y),a<u.y&&(a=u.y);return o===1e9&&s===-1e9&&i===1e9&&a===-1e9&&(i=0,a=0,o=0,s=0),{minX:o,maxX:s,minY:i,maxY:a}}},{key:"findCenter",value:function(e){return{x:.5*(e.maxX+e.minX),y:.5*(e.maxY+e.minY)}}},{key:"cloneOptions",value:function(e,t){var i={};return t===void 0||t==="node"?(ve(i,e.options,!0),i.x=e.x,i.y=e.y,i.amountOfConnections=e.edges.length):ve(i,e.options,!0),i}}]),r}();function Jhe(r){var n=Zhe();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function Zhe(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var ece=function(r){oe(e,r);var n=Jhe(e);function e(t,i,a,o,s,u){var l;return x(this,e),l=n.call(this,t,i,a,o,s,u),l.isCluster=!0,l.containedNodes={},l.containedEdges={},l}return D(e,[{key:"_openChildCluster",value:function(i){var a=this,o=this.body.nodes[i];if(this.containedNodes[i]===void 0)throw new Error("node with id: "+i+" not in current cluster");if(!o.isCluster)throw new Error("node with id: "+i+" is not a cluster");delete this.containedNodes[i],te(o.edges,function(s){delete a.containedEdges[s.id]}),te(o.containedNodes,function(s,u){a.containedNodes[u]=s}),o.containedNodes={},te(o.containedEdges,function(s,u){a.containedEdges[u]=s}),o.containedEdges={},te(o.edges,function(s){te(a.edges,function(u){var l,d,h=re(l=u.clusteringEdgeReplacingIds).call(l,s.id);h!==-1&&(te(s.clusteringEdgeReplacingIds,function(c){u.clusteringEdgeReplacingIds.push(c),a.body.edges[c].edgeReplacedById=u.id}),Tr(d=u.clusteringEdgeReplacingIds).call(d,h,1))})}),o.edges=[]}}]),e}(It),tce=function(){function r(n){var e=this;x(this,r),this.body=n,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},Ne(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():de(e)==="object"&&(t=this._checkOptions(e),e=this._getHubSize());for(var i=[],a=0;a<this.body.nodeIndices.length;a++){var o=this.body.nodes[this.body.nodeIndices[a]];o.edges.length>=e&&i.push(o.id)}for(var s=0;s<i.length;s++)this.clusterByConnection(i[s],t,!0);this.body.emitter.emit("_dataChanged")}},{key:"cluster",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=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={};te(this.body.nodes,function(s,u){s.options&&t.joinCondition(s.options)===!0&&(a[u]=s,te(s.edges,function(l){e.clusteredEdges[l.id]===void 0&&(o[l.id]=l)}))}),this._cluster(a,o,t,i)}},{key:"clusterByEdgeCount",value:function(e,t){var i=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;t=this._checkOptions(t);for(var o=[],s={},u,l,d,h=function(){var p={},g={},y=i.body.nodeIndices[c],m=i.body.nodes[y];if(s[y]===void 0){d=0,l=[];for(var w=0;w<m.edges.length;w++)u=m.edges[w],i.clusteredEdges[u.id]===void 0&&(u.toId!==u.fromId&&d++,l.push(u));if(d===e){for(var b=function(J){if(t.joinCondition===void 0||t.joinCondition===null)return!0;var ce=dt.cloneOptions(J);return t.joinCondition(ce)},_=!0,S=0;S<l.length;S++){u=l[S];var I=i._getConnectedId(u,y);if(b(m))g[u.id]=u,p[y]=m,p[I]=i.body.nodes[I],s[y]=!0;else{_=!1;break}}if($e(p).length>0&&$e(g).length>0&&_===!0){var N=function(){for(var J=0;J<o.length;++J)for(var ce in p)if(o[J].nodes[ce]!==void 0)return o[J]},R=N();if(R!==void 0){for(var M in p)R.nodes[M]===void 0&&(R.nodes[M]=p[M]);for(var B in g)R.edges[B]===void 0&&(R.edges[B]=g[B])}else o.push({nodes:p,edges:g})}}}},c=0;c<this.body.nodeIndices.length;c++)h();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 i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[e]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");var o=this.body.nodes[e];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={},u={},l=o.id,d=dt.cloneOptions(o);s[l]=o;for(var h=0;h<o.edges.length;h++){var c=o.edges[h];if(this.clusteredEdges[c.id]===void 0){var f=this._getConnectedId(c,l);if(this.clusteredNodes[f]===void 0)if(f!==l)if(t.joinCondition===void 0)u[c.id]=c,s[f]=this.body.nodes[f];else{var v=dt.cloneOptions(this.body.nodes[f]);t.joinCondition(d,v)===!0&&(u[c.id]=c,s[f]=this.body.nodes[f])}else u[c.id]=c}}var p=jn(i=$e(s)).call(i,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];re(p).call(p,this._getConnectedId(w,y.id))>-1&&(u[w.id]=w)}this._cluster(s,u,t,a)}},{key:"_createClusterEdges",value:function(e,t,i,a){for(var o,s,u,l,d,h,c=$e(e),f=[],v=0;v<c.length;v++){s=c[v],u=e[s];for(var p=0;p<u.edges.length;p++)o=u.edges[p],this.clusteredEdges[o.id]===void 0&&(o.toId==o.fromId?t[o.id]=o:o.toId==s?(l=i.id,d=o.fromId,h=d):(l=o.toId,d=i.id,h=l),e[h]===void 0&&f.push({edge:o,fromId:d,toId:l}))}for(var g=[],y=function(I){for(var N=0;N<g.length;N++){var R=g[N],M=I.fromId===R.fromId&&I.toId===R.toId,B=I.fromId===R.toId&&I.toId===R.fromId;if(M||B)return R}return null},m=0;m<f.length;m++){var w=f[m],b=w.edge,_=y(w);_===null?(_=this._createClusteredEdge(w.fromId,w.toId,b,a),g.push(_)):_.clusteringEdgeReplacingIds.push(b.id),this.body.edges[b.id].edgeReplacedById=_.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,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,o=[];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&this.clusteredNodes[s]!==void 0&&o.push(s);for(var u=0;u<o.length;++u)delete e[o[u]];if($e(e).length!=0&&!($e(e).length==1&&i.clusterNodeProperties.allowSingleNodeCluster!=!0)){var l=ve({},i.clusterNodeProperties);if(i.processProperties!==void 0){var d=[];for(var h in e)if(Object.prototype.hasOwnProperty.call(e,h)){var c=dt.cloneOptions(e[h]);d.push(c)}var f=[];for(var v in t)if(Object.prototype.hasOwnProperty.call(t,v)&&v.substr(0,12)!=="clusterEdge:"){var p=dt.cloneOptions(t[v],"edge");f.push(p)}if(l=i.processProperties(l,d,f),!l)throw new Error("The processProperties function does not return properties!")}l.id===void 0&&(l.id="cluster:"+Fa());var g=l.id;l.label===void 0&&(l.label="cluster");var y=void 0;l.x===void 0&&(y=this._getClusterPosition(e),l.x=y.x),l.y===void 0&&(y===void 0&&(y=this._getClusterPosition(e)),l.y=y.y),l.id=g;var m=this.body.functions.createNode(l,ece);m.containedNodes=e,m.containedEdges=t,m.clusterEdgeProperties=i.clusterEdgeProperties,this.body.nodes[l.id]=m,this._clusterEdges(e,t,l,i.clusterEdgeProperties),l.id=void 0,a===!0&&this.body.emitter.emit("_dataChanged")}}},{key:"_backupEdgeOptions",value:function(e){this.clusteredEdges[e.id]===void 0&&(this.clusteredEdges[e.id]={physics:e.options.physics})}},{key:"_restoreEdge",value:function(e){var 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=$e(e),i=e[t[0]].x,a=e[t[0]].x,o=e[t[0]].y,s=e[t[0]].y,u,l=1;l<t.length;l++)u=e[t[l]],i=u.x<i?u.x:i,a=u.x>a?u.x:a,o=u.y<o?u.y:o,s=u.y>s?u.y:s;return{x:.5*(i+a),y:.5*(o+s)}}},{key:"openCluster",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No clusterNodeId supplied to openCluster.");var a=this.body.nodes[e];if(a===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(a.isCluster!==!0||a.containedNodes===void 0||a.containedEdges===void 0)throw new Error("The node:"+e+" is not a valid cluster.");var o=this.findNode(e),s=re(o).call(o,e)-1;if(s>=0){var u=o[s],l=this.body.nodes[u];l._openChildCluster(e),delete this.body.nodes[e],i===!0&&this.body.emitter.emit("_dataChanged");return}var d=a.containedNodes,h=a.containedEdges;if(t!==void 0&&t.releaseFunction!==void 0&&typeof t.releaseFunction=="function"){var c={},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];c[v]={x:p.x,y:p.y}}var g=t.releaseFunction(f,c);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 te(d,function(pt){pt.options.fixed.x===!1&&(pt.x=a.x),pt.options.fixed.y===!1&&(pt.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 _=[],S=0;S<a.edges.length;S++)_.push(a.edges[S]);for(var I=0;I<_.length;I++){for(var N=_[I],R=this._getConnectedId(N,e),M=this.clusteredNodes[R],B=0;B<N.clusteringEdgeReplacingIds.length;B++){var V=N.clusteringEdgeReplacingIds[B],J=this.body.edges[V];if(J!==void 0)if(M!==void 0){var ce=this.body.nodes[M.clusterId];ce.containedEdges[J.id]=J,delete h[J.id];var ot=J.fromId,Qe=J.toId;J.toId==R?Qe=M.clusterId:ot=M.clusterId,this._createClusteredEdge(ot,Qe,J,ce.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(J)}N.remove()}for(var qt in h)Object.prototype.hasOwnProperty.call(h,qt)&&this._restoreEdge(h[qt]);delete this.body.nodes[e],i===!0&&this.body.emitter.emit("_dataChanged")}},{key:"getNodesInCluster",value:function(e){var t=[];if(this.isCluster(e)===!0){var i=this.body.nodes[e].containedNodes;for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&t.push(this.body.nodes[a].id)}return t}},{key:"findNode",value:function(e){for(var t=[],i=100,a=0,o;this.clusteredNodes[e]!==void 0&&a<i;){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),Ii(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 i=this.getClusteredEdges(e),a=0;a<i.length;a++){var o=this.body.edges[i[a]];o.setOptions(t)}this.body.emitter.emit("_dataChanged")}},{key:"getClusteredEdges",value:function(e){for(var t=[],i=100,a=0;e!==void 0&&this.body.edges[e]!==void 0&&a<i;)t.push(this.body.edges[e].id),e=this.body.edges[e].edgeReplacedById,a++;return Ii(t).call(t),t}},{key:"getBaseEdge",value:function(e){return this.getBaseEdges(e)[0]}},{key:"getBaseEdges",value:function(e){for(var t=[e],i=[],a=[],o=100,s=0;t.length>0&&s<o;){var u=t.pop();if(u!==void 0){var l=this.body.edges[u];if(l!==void 0){s++;var d=l.clusteringEdgeReplacingIds;if(d===void 0)a.push(u);else for(var h=0;h<d.length;++h){var c=d[h];re(t).call(t,d)!==-1||re(i).call(i,d)!==-1||t.push(c)}i.push(u)}}}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,i=0,a=0,o=0;o<this.body.nodeIndices.length;o++){var s=this.body.nodes[this.body.nodeIndices[o]];s.edges.length>a&&(a=s.edges.length),e+=s.edges.length,t+=Math.pow(s.edges.length,2),i+=1}e=e/i,t=t/i;var u=t-Math.pow(e,2),l=Math.sqrt(u),d=Math.floor(e+2*l);return d>a&&(d=a),d}},{key:"_createClusteredEdge",value:function(e,t,i,a,o){var s=dt.cloneOptions(i,"edge");ve(s,a),s.from=e,s.to=t,s.id="clusterEdge:"+Fa(),o!==void 0&&ve(s,o);var u=this.body.functions.createEdge(s);return u.clusteringEdgeReplacingIds=[i.id],u.connect(),this.body.edges[u.id]=u,u}},{key:"_clusterEdges",value:function(e,t,i,a){if(t instanceof An){var o=t,s={};s[o.id]=o,t=s}if(e instanceof It){var u=e,l={};l[u.id]=u,e=l}if(i==null)throw new Error("_clusterEdges: parameter clusterNode required");a===void 0&&(a=i.clusterEdgeProperties),this._createClusterEdges(e,t,i,a);for(var d in t)if(Object.prototype.hasOwnProperty.call(t,d)&&this.body.edges[d]!==void 0){var h=this.body.edges[d];this._backupEdgeOptions(h),h.setOptions({physics:!1})}for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&(this.clusteredNodes[c]={clusterId:i.id,node:this.body.nodes[c]},this.body.nodes[c].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(e){if(e!==void 0){var t=this.clusteredNodes[e];if(t!==void 0){var i=t.clusterId;if(i!==void 0)return this.body.nodes[i]}}}},{key:"_filter",value:function(e,t){var i=[];return te(e,function(a){t(a)&&i.push(a)}),i}},{key:"_updateState",value:function(){var e=this,t,i=[],a={},o=function(v){te(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&&i.push(t)}o(function(f){for(var v=0;v<i.length;v++)delete f.containedNodes[i[v]]});for(var u=0;u<i.length;u++)delete this.clusteredNodes[i[u]];te(this.clusteredEdges,function(f){var v=e.body.edges[f];(v===void 0||!v.endPointsValid())&&(a[f]=f)}),o(function(f){te(f.containedEdges,function(v,p){!v.endPointsValid()&&!a[p]&&(a[p]=p)})}),te(this.body.edges,function(f,v){var p=!0,g=f.clusteringEdgeReplacingIds;if(g!==void 0){var y=0;te(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){te(a,function(v){delete f.containedEdges[v],te(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})})}),te(a,function(f){delete e.clusteredEdges[f]}),te(a,function(f){delete e.body.edges[f]});var l=$e(this.body.edges);te(l,function(f){var v=e.body.edges[f],p=e._isClusteredNode(v.fromId)||e._isClusteredNode(v.toId);if(p!==e._isClusteredEdge(v.id))if(p){var 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,h=!0,c=function(){var v=[];o(function(g){var y=$e(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);h=v.length>0,d=d||h};h;)c();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 rce(){var r;window!==void 0&&(r=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),r===void 0?window.requestAnimationFrame=function(n){n()}:window.requestAnimationFrame=r}var ice=function(){function r(n,e){x(this,r),rce(),this.body=n,this.canvas=e,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},Ne(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=pr(function(){var i;e.zooming=!1,k(i=e._requestRedraw).call(i,e)()},250)}),this.body.emitter.on("_resizeNodes",function(){e._resizeNodes()}),this.body.emitter.on("_redraw",function(){e.renderingActive===!1&&e._redraw()}),this.body.emitter.on("_blockRedraw",function(){e.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",function(){e.allowRedraw=!0,e.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",k(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"];ya(t,this.options,e)}}},{key:"_requestNextFrame",value:function(e,t){if(!(typeof window>"u")){var i,a=window;return this.requiresTimeout===!0?i=pr(e,t):a.requestAnimationFrame&&(i=a.requestAnimationFrame(e)),i}}},{key:"_startRendering",value:function(){if(this.renderingActive===!0&&this.renderTimer===void 0){var e;this.renderTimer=this._requestNextFrame(k(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 i=this.canvas.getContext(),a=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(i.clearRect(0,0,a,o),this.canvas.frame.clientWidth===0)return;if(i.save(),i.translate(this.body.view.translation.x,this.body.view.translation.y),i.scale(this.body.view.scale,this.body.view.scale),i.beginPath(),this.body.emitter.emit("beforeDrawing",i),i.closePath(),e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(i),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){var s=this._drawNodes(i,e),u=s.drawExternalLabels;t.drawExternalLabels=u}e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(i),t.drawExternalLabels!=null&&t.drawExternalLabels(),e===!1&&this._drawSelectionBox(i),i.beginPath(),this.body.emitter.emit("afterDrawing",i),i.closePath(),i.restore(),e===!0&&i.clearRect(0,0,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,i;for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(i=t[a],i.resize(e),i.updateBoundingBox(e,i.selected));e.restore()}},{key:"_drawNodes",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=this.body.nodes,a=this.body.nodeIndices,o,s=[],u=[],l=20,d=this.canvas.DOMtoCanvas({x:-l,y:-l}),h=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+l,y:this.canvas.frame.canvas.clientHeight+l}),c={top:d.y,left:d.x,bottom:h.y,right:h.x},f=[],v=0;v<a.length;v++)if(o=i[a[v]],o.hover)u.push(a[v]);else if(o.isSelected())s.push(a[v]);else if(t===!0){var p=o.draw(e);p.drawExternalLabel!=null&&f.push(p.drawExternalLabel)}else if(o.isBoundingBoxOverlappingWith(c)===!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=u.length;for(y=0;y<m;y++){o=i[s[y]];var b=o.draw(e);b.drawExternalLabel!=null&&f.push(b.drawExternalLabel)}for(y=0;y<w;y++){o=i[u[y]];var _=o.draw(e);_.drawExternalLabel!=null&&f.push(_.drawExternalLabel)}return{drawExternalLabels:function(){for(var I=0,N=f;I<N.length;I++){var R=N[I];R()}}}}},{key:"_drawEdges",value:function(e){for(var t=this.body.edges,i=this.body.edgeIndices,a=0;a<i.length;a++){var o=t[i[a]];o.connected===!0&&o.draw(e)}}},{key:"_drawArrows",value:function(e){for(var t=this.body.edges,i=this.body.edgeIndices,a=0;a<i.length;a++){var o=t[i[a]];o.connected===!0&&o.drawArrows(e)}}},{key:"_determineBrowserMethod",value:function(){if(typeof window<"u"){var e=navigator.userAgent.toLowerCase();this.requiresTimeout=!1,re(e).call(e,"msie 9.0")!=-1?this.requiresTimeout=!0:re(e).call(e,"safari")!=-1&&re(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,i=this.body.selectionBox.position.end.y-this.body.selectionBox.position.start.y;e.rect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,t,i),e.fillStyle="rgba(151, 194, 252, 0.2)",e.fillRect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,t,i),e.strokeStyle="rgba(151, 194, 252, 1)",e.stroke()}else e.closePath()}}]),r}(),nce=ne,ace=nce.setInterval,oce=ace,sce=H(oce);function ku(r,n){n.inputHandler=function(e){e.isFirst&&n(e)},r.on("hammer.input",n.inputHandler)}function jO(r,n){return n.inputHandler=function(e){e.isFinal&&n(e)},r.on("hammer.input",n.inputHandler)}var uce=function(){function r(n){x(this,r),this.body=n,this.pixelRatio=1,this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this._cleanupCallbacks=[],this.options={},this.defaultOptions={autoResize:!0,height:"100%",width:"100%"},Ne(this.options,this.defaultOptions),this.bindEventListeners()}return D(r,[{key:"bindEventListeners",value:function(){var e=this,t;this.body.emitter.once("resize",function(i){i.width!==0&&(e.body.view.translation.x=i.width*.5),i.height!==0&&(e.body.view.translation.y=i.height*.5)}),this.body.emitter.on("setSize",k(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 i=["width","height","autoResize"];ya(i,this.options,e)}if(this._cleanUp(),this.options.autoResize===!0){var a;if(window.ResizeObserver){var o=new ResizeObserver(function(){var 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 u=sce(function(){var d=t.setSize();d===!0&&t.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(function(){clearInterval(u)})}var l=k(a=this._onResize).call(a,this);Wne(window,"resize",l),this._cleanupCallbacks.push(function(){Vne(window,"resize",l)})}}},{key:"_cleanUp",value:function(){var e,t,i;he(e=Ii(t=Tr(i=this._cleanupCallbacks).call(i,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,i=this.cameraState.scale;e!=1&&t!=1?i=this.cameraState.scale*.5*(e+t):e!=1?i=this.cameraState.scale*e:t!=1&&(i=this.cameraState.scale*t),this.body.view.scale=i;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(re(e).call(e,"%")!==-1||re(e).call(e,"px")!==-1)return e;if(re(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 Cn(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:Cn.DIRECTION_ALL}),ku(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 Cn(this.frame),jO(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 i=!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},i=!0;else{var u=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),l=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==u||this.frame.canvas.height!==l)&&this._getCameraState(s),this.frame.canvas.width!==u&&(this.frame.canvas.width=u,i=!0),this.frame.canvas.height!==l&&(this.frame.canvas.height=l,i=!0)}return i===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(a/this.pixelRatio),oldHeight:Math.round(o/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}},{key:"getContext",value:function(){return this.frame.canvas.getContext("2d")}},{key:"_determinePixelRatio",value:function(){var e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");var t=1;typeof window<"u"&&(t=window.devicePixelRatio||1);var i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/i}},{key:"_setPixelRatio",value:function(){this.pixelRatio=this._determinePixelRatio()}},{key:"setTransform",value:function(){var e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}},{key:"_XconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}},{key:"DOMtoCanvas",value:function(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}}]),r}();function lce(r,n){var e=Ne({nodes:n,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},r??{});if(!se(e.nodes))throw new TypeError("Nodes has to be an array of ids.");if(e.nodes.length===0&&(e.nodes=n),!(typeof e.minZoomLevel=="number"&&e.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof e.maxZoomLevel=="number"&&e.minZoomLevel<=e.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return e}var dce=function(){function r(n,e){var t,i=this,a;x(this,r),this.body=n,this.canvas=e,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",k(t=this.fit).call(t,this)),this.body.emitter.on("animationFinished",function(){i.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",k(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=lce(e,this.body.nodeIndices);var i=this.canvas.frame.canvas.clientWidth,a=this.canvas.frame.canvas.clientHeight,o,s;if(i===0||a===0)s=1,o=dt.getRange(this.body.nodes,e.nodes);else if(t===!0){var u=0;for(var l in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,l)){var d=this.body.nodes[l];d.predefinedPosition===!0&&(u+=1)}if(u>.5*this.body.nodeIndices.length){this.fit(e,!1);return}o=dt.getRange(this.body.nodes,e.nodes);var h=this.body.nodeIndices.length;s=12.662/(h+7.4147)+.0964822;var c=Math.min(i/600,a/600);s*=c}else{this.body.emitter.emit("_resizeNodes"),o=dt.getRange(this.body.nodes,e.nodes);var f=Math.abs(o.maxX-o.minX)*1.1,v=Math.abs(o.maxY-o.minY)*1.1,p=i/f,g=a/v;s=p<=g?p:g}s>e.maxZoomLevel?s=e.maxZoomLevel:s<e.minZoomLevel&&(s=e.minZoomLevel);var y=dt.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 i={x:this.body.nodes[e].x,y:this.body.nodes[e].y};t.position=i,t.lockedOnNode=e,this.moveTo(t)}else console.error("Node: "+e+" cannot be found.")}},{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,!Ei(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,!Ei(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,!Ei(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,!Ei(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}),i={x:t.x-e.position.x,y:t.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var a;this.viewFunction=k(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=k(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}),i={x:t.x-e.x,y:t.y-e.y},a=this.body.view.translation,o={x:a.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:a.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=o}},{key:"releaseNode",value:function(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;var t=Kne[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*t,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*t,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*t},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var i;this.viewFunction=k(i=this._lockedRedraw).call(i,this),this.body.emitter.on("initRedraw",this.viewFunction)}this.body.emitter.emit("animationFinished")}}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),r}();function T$(r){var n=r&&r.preventDefault||!1,e=r&&r.container||window,t={},i={keydown:{},keyup:{}},a={},o;for(o=97;o<=122;o++)a[String.fromCharCode(o)]={code:65+(o-97),shift:!1};for(o=65;o<=90;o++)a[String.fromCharCode(o)]={code:o,shift:!0};for(o=0;o<=9;o++)a[""+o]={code:48+o,shift:!1};for(o=1;o<=12;o++)a["F"+o]={code:111+o,shift:!1};for(o=0;o<=9;o++)a["num"+o]={code:96+o,shift:!1};a["num*"]={code:106,shift:!1},a["num+"]={code:107,shift:!1},a["num-"]={code:109,shift:!1},a["num/"]={code:111,shift:!1},a["num."]={code:110,shift:!1},a.left={code:37,shift:!1},a.up={code:38,shift:!1},a.right={code:39,shift:!1},a.down={code:40,shift:!1},a.space={code:32,shift:!1},a.enter={code:13,shift:!1},a.shift={code:16,shift:void 0},a.esc={code:27,shift:!1},a.backspace={code:8,shift:!1},a.tab={code:9,shift:!1},a.ctrl={code:17,shift:!1},a.alt={code:18,shift:!1},a.delete={code:46,shift:!1},a.pageup={code:33,shift:!1},a.pagedown={code:34,shift:!1},a["="]={code:187,shift:!1},a["-"]={code:189,shift:!1},a["]"]={code:221,shift:!1},a["["]={code:219,shift:!1};var s=function(d){l(d,"keydown")},u=function(d){l(d,"keyup")},l=function(d,h){if(i[h][d.keyCode]!==void 0){for(var c=i[h][d.keyCode],f=0;f<c.length;f++)(c[f].shift===void 0||c[f].shift==!0&&d.shiftKey==!0||c[f].shift==!1&&d.shiftKey==!1)&&c[f].fn(d);n==!0&&d.preventDefault()}};return t.bind=function(d,h,c){if(c===void 0&&(c="keydown"),a[d]===void 0)throw new Error("unsupported key: "+d);i[c][a[d].code]===void 0&&(i[c][a[d].code]=[]),i[c][a[d].code].push({fn:h,shift:a[d].shift})},t.bindAll=function(d,h){h===void 0&&(h="keydown");for(var c in a)a.hasOwnProperty(c)&&t.bind(c,d,h)},t.getKey=function(d){for(var h in a)if(a.hasOwnProperty(h)){if(d.shiftKey==!0&&a[h].shift==!0&&d.keyCode==a[h].code)return h;if(d.shiftKey==!1&&a[h].shift==!1&&d.keyCode==a[h].code)return h;if(d.keyCode==a[h].code&&h=="shift")return h}return"unknown key, currently not supported"},t.unbind=function(d,h,c){if(c===void 0&&(c="keydown"),a[d]===void 0)throw new Error("unsupported key: "+d);if(h!==void 0){var f=[],v=i[c][a[d].code];if(v!==void 0)for(var p=0;p<v.length;p++)v[p].fn==h&&v[p].shift==a[d].shift||f.push(i[c][a[d].code][p]);i[c][a[d].code]=f}else i[c][a[d].code]=[]},t.reset=function(){i={keydown:{},keyup:{}}},t.destroy=function(){i={keydown:{},keyup:{}},e.removeEventListener("keydown",s,!0),e.removeEventListener("keyup",u,!0)},e.addEventListener("keydown",s,!0),e.addEventListener("keyup",u,!0),t}var hce=function(){function r(n,e){var t=this;x(this,r),this.body=n,this.canvas=e,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on("activate",function(){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"],i=["_moveUp","_moveDown","_moveLeft","_moveRight","_zoomIn","_zoomOut","_fit"];this.navigationDOM.wrapper=document.createElement("div"),this.navigationDOM.wrapper.className="vis-navigation",this.canvas.frame.appendChild(this.navigationDOM.wrapper);for(var a=0;a<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 Cn(this.navigationDOM[t[a]]);if(i[a]==="_fit"){var s;ku(o,k(s=this._fit).call(s,this))}else{var u;ku(o,k(u=this.bindToRedraw).call(u,this,i[a]))}this.navigationHammers.push(o)}var l=new Cn(this.canvas.frame);jO(l,function(){e._stopMovement()}),this.navigationHammers.push(l),this.iconsCreated=!0}},{key:"bindToRedraw",value:function(e){if(this.boundFunctions[e]===void 0){var t;this.boundFunctions[e]=k(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),i=this.body.view.translation,a=t/e,o=(1-a)*this.canvas.canvasViewCenter.x+i.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+i.y*a;this.body.view.scale=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),i=this.body.view.translation,a=t/e,o=(1-a)*this.canvas.canvasViewCenter.x+i.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+i.y*a;this.body.view.scale=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=T$({container:window,preventDefault:!0}):this.keycharm=T$({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var t,i,a,o,s,u,l,d,h,c,f,v,p,g,y,m,w,b,_,S,I,N,R,M;k(t=this.keycharm).call(t,"up",function(){e.bindToRedraw("_moveUp")},"keydown"),k(i=this.keycharm).call(i,"down",function(){e.bindToRedraw("_moveDown")},"keydown"),k(a=this.keycharm).call(a,"left",function(){e.bindToRedraw("_moveLeft")},"keydown"),k(o=this.keycharm).call(o,"right",function(){e.bindToRedraw("_moveRight")},"keydown"),k(s=this.keycharm).call(s,"=",function(){e.bindToRedraw("_zoomIn")},"keydown"),k(u=this.keycharm).call(u,"num+",function(){e.bindToRedraw("_zoomIn")},"keydown"),k(l=this.keycharm).call(l,"num-",function(){e.bindToRedraw("_zoomOut")},"keydown"),k(d=this.keycharm).call(d,"-",function(){e.bindToRedraw("_zoomOut")},"keydown"),k(h=this.keycharm).call(h,"[",function(){e.bindToRedraw("_zoomOut")},"keydown"),k(c=this.keycharm).call(c,"]",function(){e.bindToRedraw("_zoomIn")},"keydown"),k(f=this.keycharm).call(f,"pageup",function(){e.bindToRedraw("_zoomIn")},"keydown"),k(v=this.keycharm).call(v,"pagedown",function(){e.bindToRedraw("_zoomOut")},"keydown"),k(p=this.keycharm).call(p,"up",function(){e.unbindFromRedraw("_moveUp")},"keyup"),k(g=this.keycharm).call(g,"down",function(){e.unbindFromRedraw("_moveDown")},"keyup"),k(y=this.keycharm).call(y,"left",function(){e.unbindFromRedraw("_moveLeft")},"keyup"),k(m=this.keycharm).call(m,"right",function(){e.unbindFromRedraw("_moveRight")},"keyup"),k(w=this.keycharm).call(w,"=",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),k(b=this.keycharm).call(b,"num+",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),k(_=this.keycharm).call(_,"num-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),k(S=this.keycharm).call(S,"-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),k(I=this.keycharm).call(I,"[",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),k(N=this.keycharm).call(N,"]",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),k(R=this.keycharm).call(R,"pageup",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),k(M=this.keycharm).call(M,"pagedown",function(){e.unbindFromRedraw("_zoomOut")},"keyup")}}}]),r}();function cce(r,n){var e=typeof li<"u"&&Zi(r)||r["@@iterator"];if(!e){if(se(r)||(e=fce(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
94
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function fce(r,n){var e;if(r){if(typeof r=="string")return k$(r,n);var t=rt(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Ji(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return k$(r,n)}}function k$(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}var vce=function(){function r(n,e,t){var i,a,o,s,u,l,d,h,c,f,v,p,g;x(this,r),this.body=n,this.canvas=e,this.selectionHandler=t,this.navigationHandler=new hce(n,e),this.body.eventListeners.onTap=k(i=this.onTap).call(i,this),this.body.eventListeners.onTouch=k(a=this.onTouch).call(a,this),this.body.eventListeners.onDoubleTap=k(o=this.onDoubleTap).call(o,this),this.body.eventListeners.onHold=k(s=this.onHold).call(s,this),this.body.eventListeners.onDragStart=k(u=this.onDragStart).call(u,this),this.body.eventListeners.onDrag=k(l=this.onDrag).call(l,this),this.body.eventListeners.onDragEnd=k(d=this.onDragEnd).call(d,this),this.body.eventListeners.onMouseWheel=k(h=this.onMouseWheel).call(h,this),this.body.eventListeners.onPinch=k(c=this.onPinch).call(c,this),this.body.eventListeners.onMouseMove=k(f=this.onMouseMove).call(f,this),this.body.eventListeners.onRelease=k(v=this.onRelease).call(v,this),this.body.eventListeners.onContext=k(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=k(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},Ne(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"];Eu(t,this.options,e),Lt(this.options,e,"keyboard"),e.tooltip&&(Ne(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=qc(e.tooltip.color)))}this.navigationHandler.setOptions(this.options)}},{key:"getPointer",value:function(e){return{x:e.x-zne(this.canvas.frame.canvas),y:e.y-Hne(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),i=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,i),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t)}},{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),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,i),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t),this.selectionHandler.generateClickEvent("hold",e,t)}},{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 i=function(o,s){for(var u=[],l=0;l<o.length;l++){var d=o[l];re(s).call(s,d)===-1&&u.push(d)}return u};return{nodes:i(e.nodes,t.nodes),edges:i(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=Ne({},this.body.view.translation),this.drag.nodeId=void 0,e.srcEvent.shiftKey){this.body.selectionBox.show=!0;var i=this.getPointer(e.center);this.body.selectionBox.position.start={x:this.canvas._XconvertDOMtoCanvas(i.x),y:this.canvas._YconvertDOMtoCanvas(i.y)},this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(i.x),y:this.canvas._YconvertDOMtoCanvas(i.y)}}else if(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=cce(this.selectionHandler.getSelectedNodes()),o;try{for(a.s();!(o=a.n()).done;){var s=o.value,u={id:s.id,node:s,x:s.x,y:s.y,xFixed:s.options.fixed.x,yFixed:s.options.fixed.y};s.options.fixed.x=!0,s.options.fixed.y=!0,this.drag.selection.push(u)}}catch(l){a.e(l)}finally{a.f()}}else this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer,void 0,!0)}}},{key:"onDrag",value:function(e){var t=this;if(this.drag.pinched!==!0){this.body.emitter.emit("unlockNode");var i=this.getPointer(e.center),a=this.drag.selection;if(a&&a.length&&this.options.dragNodes===!0){this.selectionHandler.generateClickEvent("dragging",e,i);var o=i.x-this.drag.pointer.x,s=i.y-this.drag.pointer.y;he(a).call(a,function(d){var h=d.node;d.xFixed===!1&&(h.x=t.canvas._XconvertDOMtoCanvas(t.canvas._XconvertCanvasToDOM(d.x)+o)),d.yFixed===!1&&(h.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,i,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(i.x),y:this.canvas._YconvertDOMtoCanvas(i.y)},this.body.emitter.emit("_requestRedraw")}if(this.options.dragView===!0&&!e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,i,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}var u=i.x-this.drag.pointer.x,l=i.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+u,y:this.drag.translation.y+l},this.body.emitter.emit("_requestRedraw")}}}}},{key:"onDragEnd",value:function(e){var t=this;if(this.drag.dragging=!1,this.body.selectionBox.show){var i;this.body.selectionBox.show=!1;var a=this.body.selectionBox.position,o={minX:Math.min(a.start.x,a.end.x),minY:Math.min(a.start.y,a.end.y),maxX:Math.max(a.start.x,a.end.x),maxY:Math.max(a.start.y,a.end.y)},s=Et(i=this.body.nodeIndices).call(i,function(d){var h=t.body.nodes[d];return h.x>=o.minX&&h.x<=o.maxX&&h.y>=o.minY&&h.y<=o.maxY});he(s).call(s,function(d){return t.selectionHandler.selectObject(t.body.nodes[d])});var u=this.getPointer(e.center);this.selectionHandler.commitAndEmit(u,e),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{var l=this.drag.selection;l&&l.length?(he(l).call(l,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 i=this.pinch.scale*e.scale;this.zoom(i,t)}},{key:"zoom",value:function(e,t){if(this.options.zoomView===!0){var i=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);var a=void 0;this.drag!==void 0&&this.drag.dragging===!0&&(a=this.canvas.DOMtoCanvas(this.drag.pointer));var o=this.body.view.translation,s=e/i,u=(1-s)*t.x+o.x*s,l=(1-s)*t.y+o.y*s;if(this.body.view.scale=e,this.body.view.translation={x:u,y:l},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"),i<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 i=this.getPointer({x:e.clientX,y:e.clientY});this.zoom(t,i)}e.preventDefault()}}},{key:"onMouseMove",value:function(e){var t=this,i=this.getPointer({x:e.clientX,y:e.clientY}),a=!1;this.popup!==void 0&&(this.popup.hidden===!1&&this._checkHidePopup(i),this.popup.hidden===!1&&(a=!0,this.popup.setPosition(i.x+3,i.y-5),this.popup.show())),this.options.keyboard.autoFocus&&this.options.keyboard.bindToWindow===!1&&this.options.keyboard.enabled===!0&&this.canvas.frame.focus(),a===!1&&(this.popupTimer!==void 0&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=pr(function(){return t._checkShowPopup(i)},this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(e,i)}},{key:"_checkShowPopup",value:function(e){var t=this.canvas._XconvertDOMtoCanvas(e.x),i=this.canvas._YconvertDOMtoCanvas(e.y),a={left:t,top:i,right:t,bottom:i},o=this.popupObj===void 0?void 0:this.popupObj.id,s=!1,u="node";if(this.popupObj===void 0){for(var l=this.body.nodeIndices,d=this.body.nodes,h,c=[],f=0;f<l.length;f++)h=d[l[f]],h.isOverlappingWith(a)===!0&&(s=!0,h.getTitle()!==void 0&&c.push(l[f]));c.length>0&&(this.popupObj=d[c[c.length-1]],s=!0)}if(this.popupObj===void 0&&s===!1){for(var v=this.body.edgeIndices,p=this.body.edges,g,y=[],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]],u="edge")}this.popupObj!==void 0?this.popupObj.id!==o&&(this.popup===void 0&&(this.popup=new tae(this.canvas.frame)),this.popup.popupTargetType=u,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(e){var t=this.selectionHandler._pointerToPositionObject(e),i=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t),i===!0)){var a=this.selectionHandler.getNodeAt(e);i=a===void 0?!1:a.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));i===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),r}(),pce=Av,gce=mO;pce("Set",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},gce);var yce=ne,mce=yce.Set,bce=mce,$ce=bce,wce=$ce,$i=H(wce),_ce=ae,P$=xv,As=kl.getWeakData,Ece=Cv,Sce=Ft,Oce=oa,Fh=qe,Tce=Iv,zO=ui,I$=Ye,HO=Qi,kce=HO.set,Pce=HO.getterFor,Ice=zO.find,Cce=zO.findIndex,Ace=_ce([].splice),xce=0,xs=function(r){return r.frozen||(r.frozen=new WO)},WO=function(){this.entries=[]},Bh=function(r,n){return Ice(r.entries,function(e){return e[0]===n})};WO.prototype={get:function(r){var n=Bh(this,r);if(n)return n[1]},has:function(r){return!!Bh(this,r)},set:function(r,n){var e=Bh(this,r);e?e[1]=n:this.entries.push([r,n])},delete:function(r){var n=Cce(this.entries,function(e){return e[0]===r});return~n&&Ace(this.entries,n,1),!!~n}};var Dce={getConstructor:function(r,n,e,t){var i=r(function(u,l){Ece(u,a),kce(u,{type:n,id:xce++,frozen:void 0}),Oce(l)||Tce(l,u[t],{that:u,AS_ENTRIES:e})}),a=i.prototype,o=Pce(n),s=function(u,l,d){var h=o(u),c=As(Sce(l),!0);return c===!0?xs(h).set(l,d):c[h.id]=d,u};return P$(a,{delete:function(u){var l=o(this);if(!Fh(u))return!1;var d=As(u);return d===!0?xs(l).delete(u):d&&I$(d,l.id)&&delete d[l.id]},has:function(l){var d=o(this);if(!Fh(l))return!1;var h=As(l);return h===!0?xs(d).has(l):h&&I$(h,d.id)}}),P$(a,e?{get:function(l){var d=o(this);if(Fh(l)){var h=As(l);return h===!0?xs(d).get(l):h?h[d.id]:void 0}},set:function(l,d){return s(this,l,d)}}:{add:function(l){return s(this,l,!0)}}),i}},Rce=vO,C$=Te,Js=ae,A$=xv,Mce=kl,Nce=Av,VO=Dce,Ds=qe,Rs=Qi.enforce,Fce=ie,Bce=nE,Xo=Object,Lce=Array.isArray,Ms=Xo.isExtensible,UO=Xo.isFrozen,jce=Xo.isSealed,GO=Xo.freeze,zce=Xo.seal,x$={},D$={},Hce=!C$.ActiveXObject&&"ActiveXObject"in C$,Sa,KO=function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},qO=Nce("WeakMap",KO,VO),pn=qO.prototype,Zs=Js(pn.set),Wce=function(){return Rce&&Fce(function(){var r=GO([]);return Zs(new qO,r,1),!UO(r)})};if(Bce)if(Hce){Sa=VO.getConstructor(KO,"WeakMap",!0),Mce.enable();var R$=Js(pn.delete),Ns=Js(pn.has),M$=Js(pn.get);A$(pn,{delete:function(r){if(Ds(r)&&!Ms(r)){var n=Rs(this);return n.frozen||(n.frozen=new Sa),R$(this,r)||n.frozen.delete(r)}return R$(this,r)},has:function(n){if(Ds(n)&&!Ms(n)){var e=Rs(this);return e.frozen||(e.frozen=new Sa),Ns(this,n)||e.frozen.has(n)}return Ns(this,n)},get:function(n){if(Ds(n)&&!Ms(n)){var e=Rs(this);return e.frozen||(e.frozen=new Sa),Ns(this,n)?M$(this,n):e.frozen.get(n)}return M$(this,n)},set:function(n,e){if(Ds(n)&&!Ms(n)){var t=Rs(this);t.frozen||(t.frozen=new Sa),Ns(this,n)?Zs(this,n,e):t.frozen.set(n,e)}else Zs(this,n,e);return this}})}else Wce()&&A$(pn,{set:function(n,e){var t;return Lce(n)&&(UO(n)?t=x$:jce(n)&&(t=D$)),Zs(this,n,e),t===x$&&GO(n),t===D$&&zce(n),this}});var Vce=ne,Uce=Vce.WeakMap,Gce=Uce,Kce=Gce,qce=Kce,Ba=H(qce);function fe(r,n,e,t){if(e==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?r!==n||!t:!n.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:n.get(r)}function rf(r,n,e,t,i){if(t==="m")throw new TypeError("Private method is not writable");if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof n=="function"?r!==n||!i:!n.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?i.call(r,e):i?i.value=e:n.set(r,e),e}function nf(r,n){var e=typeof li<"u"&&Zi(r)||r["@@iterator"];if(!e){if(se(r)||(e=Yce(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
95
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Yce(r,n){var e;if(r){if(typeof r=="string")return N$(r,n);var t=rt(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Ji(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return N$(r,n)}}function N$(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}var gi,Bt,zr,Hr,eu;function F$(r,n){var e=new $i,t=nf(n),i;try{for(t.s();!(i=t.n()).done;){var a=i.value;r.has(a)||e.add(a)}}catch(o){t.e(o)}finally{t.f()}return e}var B$=function(){function r(){x(this,r),gi.set(this,new $i),Bt.set(this,new $i)}return D(r,[{key:"size",get:function(){return fe(this,Bt,"f").size}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];for(var a=0,o=t;a<o.length;a++){var s=o[a];fe(this,Bt,"f").add(s)}}},{key:"delete",value:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];for(var a=0,o=t;a<o.length;a++){var s=o[a];fe(this,Bt,"f").delete(s)}}},{key:"clear",value:function(){fe(this,Bt,"f").clear()}},{key:"getSelection",value:function(){return lr(fe(this,Bt,"f"))}},{key:"getChanges",value:function(){return{added:lr(F$(fe(this,gi,"f"),fe(this,Bt,"f"))),deleted:lr(F$(fe(this,Bt,"f"),fe(this,gi,"f"))),previous:lr(new $i(fe(this,gi,"f"))),current:lr(new $i(fe(this,Bt,"f")))}}},{key:"commit",value:function(){var e=this.getChanges();rf(this,gi,fe(this,Bt,"f"),"f"),rf(this,Bt,new $i(fe(this,gi,"f")),"f");var t=nf(e.added),i;try{for(t.s();!(i=t.n()).done;){var a=i.value;a.select()}}catch(l){t.e(l)}finally{t.f()}var o=nf(e.deleted),s;try{for(o.s();!(s=o.n()).done;){var u=s.value;u.unselect()}}catch(l){o.e(l)}finally{o.f()}return e}}]),r}();gi=new Ba,Bt=new Ba;var Xce=function(){function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};x(this,r),zr.set(this,new B$),Hr.set(this,new B$),eu.set(this,void 0),rf(this,eu,n,"f")}return D(r,[{key:"sizeNodes",get:function(){return fe(this,zr,"f").size}},{key:"sizeEdges",get:function(){return fe(this,Hr,"f").size}},{key:"getNodes",value:function(){return fe(this,zr,"f").getSelection()}},{key:"getEdges",value:function(){return fe(this,Hr,"f").getSelection()}},{key:"addNodes",value:function(){var e;(e=fe(this,zr,"f")).add.apply(e,arguments)}},{key:"addEdges",value:function(){var e;(e=fe(this,Hr,"f")).add.apply(e,arguments)}},{key:"deleteNodes",value:function(e){fe(this,zr,"f").delete(e)}},{key:"deleteEdges",value:function(e){fe(this,Hr,"f").delete(e)}},{key:"clear",value:function(){fe(this,zr,"f").clear(),fe(this,Hr,"f").clear()}},{key:"commit",value:function(){for(var e,t,i={nodes:fe(this,zr,"f").commit(),edges:fe(this,Hr,"f").commit()},a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return(e=fe(this,eu,"f")).call.apply(e,vv(t=[this,i]).call(t,o)),i}}]),r}();zr=new Ba,Hr=new Ba,eu=new Ba;function L$(r,n){var e=typeof li<"u"&&Zi(r)||r["@@iterator"];if(!e){if(se(r)||(e=Qce(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
96
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Qce(r,n){var e;if(r){if(typeof r=="string")return j$(r,n);var t=rt(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Ji(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return j$(r,n)}}function j$(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}var Jce=function(){function r(n,e){var t=this;x(this,r),this.body=n,this.canvas=e,this._selectionAccumulator=new Xce,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},Ne(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"];ya(t,this.options,e)}}},{key:"selectOnPoint",value:function(e){var t=!1;if(this.options.selectable===!0){var i=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),i!==void 0&&(t=this.selectObject(i)),this.body.emitter.emit("_requestRedraw")}return t}},{key:"selectAdditionalOnPoint",value:function(e){var t=!1;if(this.options.selectable===!0){var i=this.getNodeAt(e)||this.getEdgeAt(e);i!==void 0&&(t=!0,i.isSelected()===!0?this.deselectObject(i):this.selectObject(i),this.body.emitter.emit("_requestRedraw"))}return t}},{key:"_initBaseEvent",value:function(e,t){var i={};return i.pointer={DOM:{x:t.x,y:t.y},canvas:this.canvas.DOMtoCanvas(t)},i.event=e,i}},{key:"generateClickEvent",value:function(e,t,i,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s=this._initBaseEvent(t,i);if(o===!0)s.nodes=[],s.edges=[];else{var u=this.getSelection();s.nodes=u.nodes,s.edges=u.edges}a!==void 0&&(s.previousSelection=a),e=="click"&&(s.items=this.getClickedItems(i)),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 It){if(t===!0){var i;(i=this._selectionAccumulator).addEdges.apply(i,lr(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=[],i=this.body.nodes,a=0;a<this.body.nodeIndices.length;a++){var o=this.body.nodeIndices[a];i[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,i=this._pointerToPositionObject(e),a=this._getAllNodesOverlappingWith(i);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 i=this.body.edges,a=0;a<this.body.edgeIndices.length;a++){var o=this.body.edgeIndices[a];i[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,i=this.canvas.DOMtoCanvas(e),a=10,o=null,s=this.body.edges,u=0;u<this.body.edgeIndices.length;u++){var l=this.body.edgeIndices[u],d=s[l];if(d.connected){var h=d.from.x,c=d.from.y,f=d.to.x,v=d.to.y,p=d.edgeType.getDistanceToEdge(h,c,f,v,i.x,i.y);p<a&&(o=l,a=p)}}if(o!==null)return t===!0?this.body.edges[o]:o}},{key:"_addToHover",value:function(e){e instanceof It?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}},{key:"_removeFromSelection",value:function(e){if(e instanceof It){var t;this._selectionAccumulator.deleteNodes(e),(t=this._selectionAccumulator).deleteEdges.apply(t,lr(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 i=e.edges[t];i.hover=!0,this._addToHover(i)}}},{key:"emitBlurEvent",value:function(e,t,i){var a=this._initBaseEvent(e,t);i.hover===!0&&(i.hover=!1,i instanceof It?(a.node=i.id,this.body.emitter.emit("blurNode",a)):(a.edge=i.id,this.body.emitter.emit("blurEdge",a)))}},{key:"emitHoverEvent",value:function(e,t,i){var a=this._initBaseEvent(e,t),o=!1;return i.hover===!1&&(i.hover=!0,this._addToHover(i),o=!0,i instanceof It?(a.node=i.id,this.body.emitter.emit("hoverNode",a)):(a.edge=i.id,this.body.emitter.emit("hoverEdge",a))),o}},{key:"hoverObject",value:function(e,t){var i=this.getNodeAt(t);i===void 0&&(i=this.getEdgeAt(t));var a=!1;for(var o in this.hoverObj.nodes)Object.prototype.hasOwnProperty.call(this.hoverObj.nodes,o)&&(i===void 0||i instanceof It&&i.id!=o||i instanceof An)&&(this.emitBlurEvent(e,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]):(i===void 0||i instanceof An&&i.id!=s||i instanceof It&&!i.hover)&&(this.emitBlurEvent(e,t,this.hoverObj.edges[s]),delete this.hoverObj.edges[s],a=!0));if(i!==void 0){var u=$e(this.hoverObj.edges).length,l=$e(this.hoverObj.nodes).length,d=i instanceof An&&u===0&&l===0,h=i instanceof It&&u===0&&l===0;(a||d||h)&&(a=this.emitHoverEvent(e,t,i)),i instanceof It&&this.options.hoverConnectedEdges===!0&&this._hoverConnectedEdges(i)}a===!0&&this.body.emitter.emit("_requestRedraw")}},{key:"commitWithoutEmitting",value:function(){this._selectionAccumulator.commit()}},{key:"commitAndEmit",value:function(e,t){var i=!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),i=!0),a.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",t,e,o),i=!0),a.nodes.added.length>0&&(this.generateClickEvent("selectNode",t,e),i=!0),a.edges.added.length>0&&(this.generateClickEvent("selectEdge",t,e),i=!0),i===!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 jn(e=this._selectionAccumulator.getNodes()).call(e,function(t){return t.id})}},{key:"getSelectedEdgeIds",value:function(){var e;return jn(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 i=L$(e.nodes),a;try{for(i.s();!(a=i.n()).done;){var o=a.value,s=this.body.nodes[o];if(!s)throw new RangeError('Node with id "'+o+'" not found');this.selectObject(s,t.highlightEdges)}}catch(c){i.e(c)}finally{i.f()}}if(e.edges){var u=L$(e.edges),l;try{for(u.s();!(l=u.n()).done;){var d=l.value,h=this.body.edges[d];if(!h)throw new RangeError('Edge with id "'+d+'" not found');this.selectObject(h)}}catch(c){u.e(c)}finally{u.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),i=[],a=this.body.nodeIndices,o=this.body.nodes,s=a.length-1;s>=0;s--){var u=o[a[s]],l=u.getItemsOnPoint(t);i.push.apply(i,l)}for(var d=this.body.edgeIndices,h=this.body.edges,c=d.length-1;c>=0;c--){var f=h[d[c]],v=f.getItemsOnPoint(t);i.push.apply(i,v)}return i}}]),r}(),z$=xE,Zce=Math.floor,af=function(r,n){var e=r.length,t=Zce(e/2);return e<8?efe(r,n):tfe(r,af(z$(r,0,t),n),af(z$(r,t),n),n)},efe=function(r,n){for(var e=r.length,t=1,i,a;t<e;){for(a=t,i=r[t];a&&n(r[a-1],i)>0;)r[a]=r[--a];a!==t++&&(r[a]=i)}return r},tfe=function(r,n,e,t){for(var i=n.length,a=e.length,o=0,s=0;o<i||s<a;)r[o+s]=o<i&&s<a?t(n[o],e[s])<=0?n[o++]:e[s++]:o<i?n[o++]:e[s++];return r},rfe=af,ife=Io,H$=ife.match(/firefox\/(\d+)/i),nfe=!!H$&&+H$[1],afe=Io,ofe=/MSIE|Trident/.test(afe),sfe=Io,W$=sfe.match(/AppleWebKit\/(\d+)\./),ufe=!!W$&&+W$[1],lfe=G,YO=ae,dfe=Yi,hfe=kt,V$=Gt,cfe=mS,U$=br,Bv=ie,ffe=rfe,vfe=pa,G$=nfe,pfe=ofe,K$=Co,q$=ufe,qr=[],Y$=YO(qr.sort),gfe=YO(qr.push),yfe=Bv(function(){qr.sort(void 0)}),mfe=Bv(function(){qr.sort(null)}),bfe=vfe("sort"),XO=!Bv(function(){if(K$)return K$<70;if(!(G$&&G$>3)){if(pfe)return!0;if(q$)return q$<603;var r="",n,e,t,i;for(n=65;n<76;n++){switch(e=String.fromCharCode(n),n){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(i=0;i<47;i++)qr.push({k:e+i,v:t})}for(qr.sort(function(a,o){return o.v-a.v}),i=0;i<qr.length;i++)e=qr[i].k.charAt(0),r.charAt(r.length-1)!==e&&(r+=e);return r!=="DGBEFHACIJK"}}),$fe=yfe||!mfe||!bfe||!XO,wfe=function(r){return function(n,e){return e===void 0?-1:n===void 0?1:r!==void 0?+r(n,e)||0:U$(n)>U$(e)?1:-1}};lfe({target:"Array",proto:!0,forced:$fe},{sort:function(n){n!==void 0&&dfe(n);var e=hfe(this);if(XO)return n===void 0?Y$(e):Y$(e,n);var t=[],i=V$(e),a,o;for(o=0;o<i;o++)o in e&&gfe(t,e[o]);for(ffe(t,wfe(n)),a=V$(t),o=0;o<a;)e[o]=t[o++];for(;o<i;)cfe(e,o++);return e}});var _fe=Xe,Efe=_fe("Array").sort,Sfe=Re,Ofe=Efe,Lh=Array.prototype,Tfe=function(r){var n=r.sort;return r===Lh||Sfe(Lh,r)&&n===Lh.sort?Ofe:n},kfe=Tfe,Pfe=kfe,Ife=Pfe,La=H(Ife),Cfe=Yi,Afe=kt,xfe=al,Dfe=Gt,Rfe=TypeError,X$=function(r){return function(n,e,t,i){Cfe(e);var a=Afe(n),o=xfe(a),s=Dfe(a),u=r?s-1:0,l=r?-1:1;if(t<2)for(;;){if(u in o){i=o[u],u+=l;break}if(u+=l,r?u<0:s<=u)throw new Rfe("Reduce of empty array with no initial value")}for(;r?u>=0:s>u;u+=l)u in o&&(i=e(i,o[u],u,a));return i}},Mfe={left:X$(!1),right:X$(!0)},Nfe=Te,Ffe=Fr,Bfe=Ffe(Nfe.process)==="process",Lfe=G,jfe=Mfe.left,zfe=pa,Q$=Co,Hfe=Bfe,Wfe=!Hfe&&Q$>79&&Q$<83,Vfe=Wfe||!zfe("reduce");Lfe({target:"Array",proto:!0,forced:Vfe},{reduce:function(n){var e=arguments.length;return jfe(this,n,e,e>1?arguments[1]:void 0)}});var Ufe=Xe,Gfe=Ufe("Array").reduce,Kfe=Re,qfe=Gfe,jh=Array.prototype,Yfe=function(r){var n=r.reduce;return r===jh||Kfe(jh,r)&&n===jh.reduce?qfe:n},Xfe=Yfe,Qfe=Xfe,Jfe=Qfe,QO=H(Jfe);function JO(r){var n=Zfe();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=E(t,arguments,a)}else i=t.apply(this,arguments);return le(this,i)}}function Zfe(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var ZO=function(){function r(){x(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 i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,t,i),this.abstract()}},{key:"getTreeSize",value:function(e){return this.fake_use(e),this.abstract()}},{key:"sort",value:function(e){this.fake_use(e),this.abstract()}},{key:"fix",value:function(e,t){this.fake_use(e,t),this.abstract()}},{key:"shift",value:function(e,t){this.fake_use(e,t),this.abstract()}}]),r}(),eve=function(r){oe(e,r);var n=JO(e);function e(t){var i;return x(this,e),i=n.call(this),i.layout=t,i}return D(e,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(i){return i.x}},{key:"setPosition",value:function(i,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(i,o),i.x=a}},{key:"getTreeSize",value:function(i){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,i);return{min:a.min_x,max:a.max_x}}},{key:"sort",value:function(i){La(i).call(i,function(a,o){return a.x-o.x})}},{key:"fix",value:function(i,a){i.y=this.layout.options.hierarchical.levelSeparation*a,i.options.fixed.y=!0}},{key:"shift",value:function(i,a){this.layout.body.nodes[i].x+=a}}]),e}(ZO),tve=function(r){oe(e,r);var n=JO(e);function e(t){var i;return x(this,e),i=n.call(this),i.layout=t,i}return D(e,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(i){return i.y}},{key:"setPosition",value:function(i,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(i,o),i.y=a}},{key:"getTreeSize",value:function(i){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,i);return{min:a.min_y,max:a.max_y}}},{key:"sort",value:function(i){La(i).call(i,function(a,o){return a.y-o.y})}},{key:"fix",value:function(i,a){i.x=this.layout.options.hierarchical.levelSeparation*a,i.options.fixed.x=!0}},{key:"shift",value:function(i,a){this.layout.body.nodes[i].y+=a}}]),e}(ZO),rve=G,ive=ui.every,nve=pa,ave=nve("every");rve({target:"Array",proto:!0,forced:!ave},{every:function(n){return ive(this,n,arguments.length>1?arguments[1]:void 0)}});var ove=Xe,sve=ove("Array").every,uve=Re,lve=sve,zh=Array.prototype,dve=function(r){var n=r.every;return r===zh||uve(zh,r)&&n===zh.every?lve:n},hve=dve,cve=hve,fve=cve,eT=H(fve);function vve(r,n){var e=typeof li<"u"&&Zi(r)||r["@@iterator"];if(!e){if(se(r)||(e=pve(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
97
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function pve(r,n){var e;if(r){if(typeof r=="string")return J$(r,n);var t=rt(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Ji(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return J$(r,n)}}function J$(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}function gve(r,n){var e=new $i;return he(r).call(r,function(t){var i;he(i=t.edges).call(i,function(a){a.connected&&e.add(a)})}),he(e).call(e,function(t){var i=t.from.id,a=t.to.id;n[i]==null&&(n[i]=0),(n[a]==null||n[i]>=n[a])&&(n[a]=n[i]+1)}),n}function yve(r){return tT(function(n){var e,t;return eT(e=Et(t=n.edges).call(t,function(i){return r.has(i.toId)})).call(e,function(i){return i.to===n})},function(n,e){return e>n},"from",r)}function mve(r){return tT(function(n){var e,t;return eT(e=Et(t=n.edges).call(t,function(i){return r.has(i.toId)})).call(e,function(i){return i.from===n})},function(n,e){return e<n},"to",r)}function tT(r,n,e,t){var i,a=Ci(null),o=QO(i=lr(CO(t).call(t))).call(i,function(f,v){return f+1+v.edges.length},0),s=e+"Id",u=e==="to"?1:-1,l=vve(t),d;try{var h=function(){var v=_e(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 I,N;if(!t.has(p))return 0;var R=a[w.id]+u;if(he(I=Et(N=w.edges).call(N,function(M){return M.connected&&M.to!==M.from&&M[e]!==w&&t.has(M.toId)&&t.has(M.fromId)})).call(I,function(M){var B=M[s],V=a[B];(V==null||n(R,V))&&(a[B]=R,y.push(M[e]))}),m>o)return{v:{v:gve(t,a)}};++m},_;w=y.pop();)if(_=b(),_!==0&&_)return _.v},c;for(l.s();!(d=l.n()).done;)if(c=h(),c!==0&&c)return c.v}catch(f){l.e(f)}finally{l.f()}return a}var bve=function(){function r(){x(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,i={},a=function o(s){if(i[s]!==void 0)return i[s];var u=t.levels[s];if(t.childrenReference[s]){var l=t.childrenReference[s];if(l.length>0)for(var d=0;d<l.length;d++)u=Math.max(u,o(l[d]))}return i[s]=u,u};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 i in e)Object.prototype.hasOwnProperty.call(e,i)&&this.levels[i]!==void 0&&(t=Math.min(this.levels[i],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 i=1e9,a=-1e9,o=1e9,s=-1e9;for(var u in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,u)&&this.trees[u]===t){var l=e[u];i=Math.min(l.x,i),a=Math.max(l.x,a),o=Math.min(l.y,o),s=Math.max(l.y,s)}return{min_x:i,max_x:a,min_y:o,max_y:s}}},{key:"hasSameParent",value:function(e,t){var i=this.parentReference[e.id],a=this.parentReference[t.id];if(i===void 0||a===void 0)return!1;for(var o=0;o<i.length;o++)for(var s=0;s<a.length;s++)if(i[o]==a[s])return!0;return!1}},{key:"inSameSubNetwork",value:function(e,t){return this.trees[e.id]===this.trees[t.id]}},{key:"getLevels",value:function(){return $e(this.distributionOrdering)}},{key:"addToOrdering",value:function(e,t){this.distributionOrdering[t]===void 0&&(this.distributionOrdering[t]=[]);var i=!1,a=this.distributionOrdering[t];for(var o in a)if(a[o]===e){i=!0;break}i||(this.distributionOrdering[t].push(e),this.distributionIndex[e.id]=this.distributionOrdering[t].length-1)}}]),r}(),$ve=function(){function r(n){x(this,r),this.body=n,this._resetRNG(Math.random()+":"+bu()),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"}},Ne(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 i=this.options.hierarchical,a=i.enabled;if(ya(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),Lt(this.options,e,"hierarchical"),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),i.enabled===!0)return a===!0&&this.body.emitter.emit("refresh",!0),i.direction==="RL"||i.direction==="DU"?i.levelSeparation>0&&(i.levelSeparation*=-1):i.levelSeparation<0&&(i.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(a===!0)return this.body.emitter.emit("refresh"),ve(t,this.optionsBackup)}return t}},{key:"_resetRNG",value:function(e){this.initialRandomSeed=e,this._rng=Tl(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"):de(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 i=this.direction.curveType();if(e.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1};else if(e.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1;else if(typeof e.edges.smooth=="boolean")this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:i};else{var a=e.edges.smooth;a.type!==void 0&&a.type!=="dynamic"&&(i=a.type),this.optionsBackup.edges={smooth:{enabled:a.enabled===void 0?!0:a.enabled,type:a.type===void 0?"dynamic":a.type,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}},e.edges.smooth={enabled:a.enabled===void 0?!0:a.enabled,type:i,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",i)}return e}},{key:"positionInitially",value:function(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);for(var t=e.length+50,i=0;i<e.length;i++){var a=e[i],o=2*Math.PI*this._rng();a.x===void 0&&(a.x=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,i=0;i<e.length;i++){var a=this.body.nodes[e[i]];a.predefinedPosition===!0&&(t+=1)}if(t<.5*e.length){var o=10,s=0,u=this.options.clusterThreshold,l={clusterNodeProperties:{shape:"ellipse",label:"",group:"",font:{multi:!1}},clusterEdgeProperties:{label:"",font:{multi:!1},smooth:{enabled:!1}}};if(e.length>u){for(var d=e.length;e.length>u&&s<=o;){s+=1;var h=e.length;s%3===0?this.body.modules.clustering.clusterBridges(l):this.body.modules.clustering.clusterOutliers(l);var c=e.length;if(h==c&&s%3!==0){this._declusterAll(),this.body.emitter.emit("_layoutFailed"),console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.");return}}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*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=dt.getRangeCore(this.body.nodes,this.body.nodeIndices),t=dt.findCenter(e),i=0;i<this.body.nodeIndices.length;i++){var a=this.body.nodes[this.body.nodeIndices[i]];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,i=!1,a=!1;this.lastNodeOnLevel={},this.hierarchical=new bve;for(t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&(e=this.body.nodes[t],e.options.level!==void 0?(i=!0,this.hierarchical.levels[t]=e.options.level):a=!0);if(a===!0&&i===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");if(a===!0){var o=this.options.hierarchical.sortMethod;o==="hubsize"?this._determineLevelsByHubsize():o==="directed"?this._determineLevelsDirected():o==="custom"&&this._determineLevelsCustomCallback()}for(var s in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,s)&&this.hierarchical.ensureLevel(s);var u=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(u),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var e=this,t=!1,i={},a=function(){for(var w=s(),b=0,_=0;_<w.length-1;_++){var S=w[_].max-w[_+1].min;b+=S+e.options.hierarchical.treeSpacing,o(_+1,b)}},o=function(w,b){var _=e.hierarchical.trees;for(var S in _)Object.prototype.hasOwnProperty.call(_,S)&&_[S]===w&&e.direction.shift(S,b)},s=function(){for(var w=[],b=0;b<e.hierarchical.numTrees();b++)w.push(e.direction.getTreeSize(b));return w},u=function m(w,b){if(!b[w.id]&&(b[w.id]=!0,e.hierarchical.childrenReference[w.id])){var _=e.hierarchical.childrenReference[w.id];if(_.length>0)for(var S=0;S<_.length;S++)m(e.body.nodes[_[S]],b)}},l=function(w){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,_=1e9,S=1e9,I=1e9,N=-1e9;for(var R in w)if(Object.prototype.hasOwnProperty.call(w,R)){var M=e.body.nodes[R],B=e.hierarchical.levels[M.id],V=e.direction.getPosition(M),J=e._getSpaceAroundNode(M,w),ce=_e(J,2),ot=ce[0],Qe=ce[1];_=Math.min(ot,_),S=Math.min(Qe,S),B<=b&&(I=Math.min(V,I),N=Math.max(V,N))}return[I,N,_,S]},d=function(w,b){var _=e.hierarchical.getMaxLevel(w.id),S=e.hierarchical.getMaxLevel(b.id);return Math.min(_,S)},h=function(w,b,_){for(var S=e.hierarchical,I=0;I<b.length;I++){var N=b[I],R=S.distributionOrdering[N];if(R.length>1)for(var M=0;M<R.length-1;M++){var B=R[M],V=R[M+1];S.hasSameParent(B,V)&&S.inSameSubNetwork(B,V)&&w(B,V,_)}}},c=function(w,b){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,S=e.direction.getPosition(w),I=e.direction.getPosition(b),N=Math.abs(I-S),R=e.options.hierarchical.nodeSpacing;if(N>R){var M={},B={};u(w,M),u(b,B);var V=d(w,b),J=l(M,V),ce=l(B,V),ot=J[1],Qe=ce[0],qt=ce[2],pt=Math.abs(ot-Qe);if(pt>R){var Pt=ot-Qe+R;Pt<-qt+R&&(Pt=-qt+R),Pt<0&&(e._shiftBlock(b.id,Pt),t=!0,_===!0&&e._centerParent(b))}}},f=function(w,b){for(var _=b.id,S=b.edges,I=e.hierarchical.levels[b.id],N=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,R={},M=[],B=0;B<S.length;B++){var V=S[B];if(V.toId!=V.fromId){var J=V.toId==_?V.from:V.to;R[S[B].id]=J,e.hierarchical.levels[J.id]<I&&M.push(V)}}var ce=function(Je,ye){for(var Ie=0,P=0;P<ye.length;P++)if(R[ye[P].id]!==void 0){var O=e.direction.getPosition(R[ye[P].id])-Je;Ie+=O/Math.sqrt(O*O+N)}return Ie},ot=function(Je,ye){for(var Ie=0,P=0;P<ye.length;P++)if(R[ye[P].id]!==void 0){var O=e.direction.getPosition(R[ye[P].id])-Je;Ie-=N*Math.pow(O*O+N,-1.5)}return Ie},Qe=function(Je,ye){for(var Ie=e.direction.getPosition(b),P={},O=0;O<Je;O++){var C=ce(Ie,ye),F=ot(Ie,ye),W=40,K=Math.max(-W,Math.min(W,Math.round(C/F)));if(Ie=Ie-K,P[Ie]!==void 0)break;P[Ie]=O}return Ie},qt=function(Je){var ye=e.direction.getPosition(b);if(i[b.id]===void 0){var Ie={};u(b,Ie),i[b.id]=Ie}var P=l(i[b.id]),O=P[2],C=P[3],F=Je-ye,W=0;F>0?W=Math.min(F,C-e.options.hierarchical.nodeSpacing):F<0&&(W=-Math.min(-F,O-e.options.hierarchical.nodeSpacing)),W!=0&&(e._shiftBlock(b.id,W),t=!0)},pt=function(Je){var ye=e.direction.getPosition(b),Ie=e._getSpaceAroundNode(b),P=_e(Ie,2),O=P[0],C=P[1],F=Je-ye,W=ye;F>0?W=Math.min(ye+(C-e.options.hierarchical.nodeSpacing),Je):F<0&&(W=Math.max(ye-(O-e.options.hierarchical.nodeSpacing),Je)),W!==ye&&(e.direction.setPosition(b,W),t=!0)},Pt=Qe(w,M);qt(Pt),Pt=Qe(w,S),pt(Pt)},v=function(w){var b=e.hierarchical.getLevels();b=Ii(b).call(b);for(var _=0;_<w;_++){t=!1;for(var S=0;S<b.length;S++)for(var I=b[S],N=e.hierarchical.distributionOrdering[I],R=0;R<N.length;R++)f(1e3,N[R]);if(t!==!0)break}},p=function(w){var b=e.hierarchical.getLevels();b=Ii(b).call(b);for(var _=0;_<w&&(t=!1,h(c,b,!0),t===!0);_++);},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=Ii(w).call(w);for(var b=0;b<w.length;b++)for(var _=w[b],S=e.hierarchical.distributionOrdering[_],I=0;I<S.length;I++)e._centerParent(S[I])};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 i=!0;t===void 0&&(i=!1);var a=this.hierarchical.levels[e.id];if(a!==void 0){var o=this.hierarchical.distributionIndex[e.id],s=this.direction.getPosition(e),u=this.hierarchical.distributionOrdering[a],l=1e9,d=1e9;if(o!==0){var h=u[o-1];if(i===!0&&t[h.id]===void 0||i===!1){var c=this.direction.getPosition(h);l=s-c}}if(o!=u.length-1){var f=u[o+1];if(i===!0&&t[f.id]===void 0||i===!1){var v=this.direction.getPosition(f);d=Math.min(d,v-s)}}return[l,d]}else return[0,0]}},{key:"_centerParent",value:function(e){if(this.hierarchical.parentReference[e.id])for(var t=this.hierarchical.parentReference[e.id],i=0;i<t.length;i++){var a=t[i],o=this.body.nodes[a],s=this.hierarchical.childrenReference[a];if(s!==void 0){var u=this._getCenterPosition(s),l=this.direction.getPosition(o),d=this._getSpaceAroundNode(o),h=_e(d,2),c=h[0],f=h[1],v=l-u;(v<0&&Math.abs(v)<f-this.options.hierarchical.nodeSpacing||v>0&&Math.abs(v)<c-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(o,u)}}}},{key:"_placeNodesByHierarchy",value:function(e){this.positionedNodes={};for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var i,a=$e(e[t]);a=this._indexArrayToNodes(a),La(i=this.direction).call(i,a);for(var o=0,s=0;s<a.length;s++){var u=a[s];if(this.positionedNodes[u.id]===void 0){var l=this.options.hierarchical.nodeSpacing,d=l*o;o>0&&(d=this.direction.getPosition(a[s-1])+l),this.direction.setPosition(u,d,t),this._validatePositionAndContinue(u,t,d),o++}}}}},{key:"_placeBranchNodes",value:function(e,t){var i,a=this.hierarchical.childrenReference[e];if(a!==void 0){for(var o=[],s=0;s<a.length;s++)o.push(this.body.nodes[a[s]]);La(i=this.direction).call(i,o);for(var u=0;u<o.length;u++){var l=o[u],d=this.hierarchical.levels[l.id];if(d>t&&this.positionedNodes[l.id]===void 0){var h=this.options.hierarchical.nodeSpacing,c=void 0;u===0?c=this.direction.getPosition(this.body.nodes[e]):c=this.direction.getPosition(o[u-1])+h,this.direction.setPosition(l,c,d),this._validatePositionAndContinue(l,d,c)}else return}var f=this._getCenterPosition(o);this.direction.setPosition(this.body.nodes[e],f,t)}}},{key:"_validatePositionAndContinue",value:function(e,t,i){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[t]!==void 0){var a=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(i-a<this.options.hierarchical.nodeSpacing){var o=a+this.options.hierarchical.nodeSpacing-i,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=[],i=0;i<e.length;i++)t.push(this.body.nodes[e[i]]);return t}},{key:"_getDistribution",value:function(){var e={},t,i;for(t in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,t)){i=this.body.nodes[t];var a=this.hierarchical.levels[t]===void 0?0:this.hierarchical.levels[t];this.direction.fix(i,a),e[a]===void 0&&(e[a]={}),e[a][t]=i}return e}},{key:"_getActiveEdges",value:function(e){var t=this,i=[];return te(e.edges,function(a){var o;re(o=t.body.edgeIndices).call(o,a.id)!==-1&&i.push(a)}),i}},{key:"_getHubSizes",value:function(){var e=this,t={},i=this.body.nodeIndices;te(i,function(o){var s=e.body.nodes[o],u=e._getActiveEdges(s).length;t[u]=!0});var a=[];return te(t,function(o){a.push(Number(o))}),La(a).call(a,function(o,s){return s-o}),a}},{key:"_determineLevelsByHubsize",value:function(){for(var e=this,t=function(u,l){e.hierarchical.levelDownstream(u,l)},i=this._getHubSizes(),a=function(){var u=i[o];if(u===0)return 1;te(e.body.nodeIndices,function(l){var d=e.body.nodes[l];u===e._getActiveEdges(d).length&&e._crawlNetwork(t,l)})},o=0;o<i.length&&!a();++o);}},{key:"_determineLevelsCustomCallback",value:function(){var e=this,t=1e5,i=function(s,u,l){},a=function(s,u,l){var d=e.hierarchical.levels[s.id];d===void 0&&(d=e.hierarchical.levels[s.id]=t);var h=i(dt.cloneOptions(s,"node"),dt.cloneOptions(u,"node"),dt.cloneOptions(l,"edge"));e.hierarchical.levels[u.id]=d+h};this._crawlNetwork(a),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_determineLevelsDirected",value:function(){var e,t=this,i=QO(e=this.body.nodeIndices).call(e,function(a,o){return a.set(o,t.body.nodes[o]),a},new bO);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=mve(i):this.hierarchical.levels=yve(i),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(){},i=arguments.length>1?arguments[1]:void 0,a={},o=function c(f,v){if(a[f.id]===void 0){e.hierarchical.setTreeIndex(f,v),a[f.id]=!0;for(var p,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),c(p,v)))}}};if(i===void 0)for(var s=0,u=0;u<this.body.nodeIndices.length;u++){var l=this.body.nodeIndices[u];if(a[l]===void 0){var d=this.body.nodes[l];o(d,s),s+=1}}else{var h=this.body.nodes[i];if(h===void 0){console.error("Node not found:",i);return}o(h)}}},{key:"_shiftBlock",value:function(e,t){var i=this,a={},o=function s(u){if(!a[u]){a[u]=!0,i.direction.shift(u,t);var l=i.hierarchical.childrenReference[u];if(l!==void 0)for(var d=0;d<l.length;d++)s(l[d])}};o(e)}},{key:"_findCommonParent",value:function(e,t){var i=this,a={},o=function u(l,d){var h=i.hierarchical.parentReference[d];if(h!==void 0)for(var c=0;c<h.length;c++){var f=h[c];l[f]=!0,u(l,f)}},s=function u(l,d){var h=i.hierarchical.parentReference[d];if(h!==void 0)for(var c=0;c<h.length;c++){var f=h[c];if(l[f]!==void 0)return{foundParent:f,withChild:d};var v=u(l,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 eve(this):this.direction=new tve(this)}},{key:"_getCenterPosition",value:function(e){for(var t=1e9,i=-1e9,a=0;a<e.length;a++){var o=void 0;if(e[a].id!==void 0)o=e[a];else{var s=e[a];o=this.body.nodes[s]}var u=this.direction.getPosition(o);t=Math.min(t,u),i=Math.max(i,u)}return .5*(t+i)}}]),r}();function wve(r,n){var e=typeof li<"u"&&Zi(r)||r["@@iterator"];if(!e){if(se(r)||(e=_ve(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
98
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function _ve(r,n){var e;if(r){if(typeof r=="string")return Z$(r,n);var t=rt(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Ji(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Z$(r,n)}}function Z$(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}var Eve=function(){function r(n,e,t,i){var a=this,o,s;x(this,r),this.body=n,this.canvas=e,this.selectionHandler=t,this.interactionHandler=i,this.editMode=!1,this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0,this._domEventListenerCleanupQueue=[],this.temporaryUIFunctions={},this.temporaryEventFunctions=[],this.touchTime=0,this.temporaryIds={nodes:[],edges:[]},this.guiEnabled=!1,this.inMode=!1,this.selectedControlNode=void 0,this.options={},this.defaultOptions={enabled:!1,initiallyActive:!1,addNode:!0,addEdge:!0,editNode:void 0,editEdge:!0,deleteNode:!0,deleteEdge:!0,controlNodeStyle:{shape:"dot",size:6,color:{background:"#ff0000",border:"#3c3c3c",highlight:{background:"#07f968",border:"#3c3c3c"}},borderWidth:2,borderWidthSelected:2}},Ne(this.options,this.defaultOptions),this.body.emitter.on("destroy",function(){a._clean()}),this.body.emitter.on("_dataChanged",k(o=this._restore).call(o,this)),this.body.emitter.on("_resetData",k(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,i){t!==void 0&&(t.locale!==void 0?this.options.locale=t.locale:this.options.locale=i.locale,t.locales!==void 0?this.options.locales=t.locales:this.options.locales=i.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,ve(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 i=this.selectionHandler.getSelectedNodeCount(),a=this.selectionHandler.getSelectedEdgeCount(),o=i+a,s=this.options.locales[this.options.locale],u=!1;this.options.addNode!==!1&&(this._createAddNodeButton(s),u=!0),this.options.addEdge!==!1&&(u===!0?this._createSeperator(1):u=!0,this._createAddEdgeButton(s)),i===1&&typeof this.options.editNode=="function"?(u===!0?this._createSeperator(2):u=!0,this._createEditNodeButton(s)):a===1&&i===0&&this.options.editEdge!==!1&&(u===!0?this._createSeperator(3):u=!0,this._createEditEdgeButton(s)),o!==0&&(i>0&&this.options.deleteNode!==!1?(u===!0&&this._createSeperator(4),this._createDeleteButton(s)):i===0&&this.options.deleteEdge!==!1&&(u===!0&&this._createSeperator(4),this._createDeleteButton(s))),this._bindElementEvents(this.closeDiv,k(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",k(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,i=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(i),this._createSeperator(),this._createDescription(i.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,k(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent("click",k(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 i=ve({},t.options,!1);if(i.x=t.x,i.y=t.y,this.options.editNode.length===2)this.options.editNode(i,function(a){a!=null&&e.inMode==="editNode"&&e.body.data.nodes.getDataSet().update(a),e.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){var e,t,i,a,o;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var s,u=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(u),this._createSeperator(),this._createDescription(u.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,k(s=this.toggleEditMode).call(s,this))}this._temporaryBindUI("onTouch",k(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",k(t=this._finishConnect).call(t,this)),this._temporaryBindUI("onDrag",k(i=this._dragControlNode).call(i,this)),this._temporaryBindUI("onRelease",k(a=this._finishConnect).call(a,this)),this._temporaryBindUI("onDragStart",k(o=this._dragStartEdge).call(o,this)),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",de(this.options.editEdge)==="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){var e=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(e.from.id,e.to.id);return}if(this.guiEnabled===!0){var t,i=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(i),this._createSeperator(),this._createDescription(i.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,k(t=this.toggleEditMode).call(t,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var a,o,s,u,l=this.body.edges[this.edgeBeingEditedId],d=this._getNewTargetNode(l.from.x,l.from.y),h=this._getNewTargetNode(l.to.x,l.to.y);this.temporaryIds.nodes.push(d.id),this.temporaryIds.nodes.push(h.id),this.body.nodes[d.id]=d,this.body.nodeIndices.push(d.id),this.body.nodes[h.id]=h,this.body.nodeIndices.push(h.id),this._temporaryBindUI("onTouch",k(a=this._controlNodeTouch).call(a,this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",k(o=this._controlNodeDragStart).call(o,this)),this._temporaryBindUI("onDrag",k(s=this._controlNodeDrag).call(s,this)),this._temporaryBindUI("onDragEnd",k(u=this._controlNodeDragEnd).call(u,this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(c){var f=l.edgeType.findBorderPositions(c);d.selected===!1&&(d.x=f.from.x,d.y=f.from.y),h.selected===!1&&(h.x=f.to.x,h.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(),i=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 i.length>0&&typeof this.options.deleteEdge=="function"&&(a=this.options.deleteEdge);if(typeof a=="function"){var s={nodes:t,edges:i};if(a.length===2)a(s,function(u){u!=null&&e.inMode==="delete"?(e.body.data.edges.getDataSet().remove(u.edges),e.body.data.nodes.getDataSet().remove(u.nodes),e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar()):(e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(i),this.body.data.nodes.getDataSet().remove(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 i=ve({},this.options.controlNodeStyle);i.id="targetNode"+Fa(),i.hidden=!1,i.physics=!1,i.x=e,i.y=t;var a=this.body.functions.createNode(i);return a.shape.boundingBox={left:e,right:e,top:t,bottom:t},a}},{key:"_createEditButton",value:function(){var e;this._clean(),this.manipulationDOM={},Wr(this.editModeDiv);var t=this.options.locales[this.options.locale],i=this._createButton("editMode","vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(i),this._bindElementEvents(i,k(e=this.toggleEditMode).call(e,this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(Wr(this.editModeDiv),Wr(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanupDOMEventListeners",value:function(){var e,t=wve(Tr(e=this._domEventListenerCleanupQueue).call(e,0)),i;try{for(t.s();!(i=t.n()).done;){var a=i.value;a()}}catch(o){t.e(o)}finally{t.f()}}},{key:"_removeManipulationDOM",value:function(){this._clean(),Wr(this.manipulationDiv),Wr(this.editModeDiv),Wr(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,i=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,k(t=this.addNodeMode).call(t,this))}},{key:"_createAddEdgeButton",value:function(e){var t,i=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,k(t=this.addEdgeMode).call(t,this))}},{key:"_createEditNodeButton",value:function(e){var t,i=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,k(t=this.editNode).call(t,this))}},{key:"_createEditEdgeButton",value:function(e){var t,i=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,k(t=this.editEdgeMode).call(t,this))}},{key:"_createDeleteButton",value:function(e){var t,i;this.options.rtl?i="vis-delete-rtl":i="vis-delete";var a=this._createButton("delete",i,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(a),this._bindElementEvents(a,k(t=this.deleteSelected).call(t,this))}},{key:"_createBackButton",value:function(e){var t,i=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,k(t=this.showManipulatorToolbar).call(t,this))}},{key:"_createButton",value:function(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"vis-label";return this.manipulationDOM[e+"Div"]=document.createElement("button"),this.manipulationDOM[e+"Div"].className="vis-button "+t,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=a,this.manipulationDOM[e+"Label"].innerText=i,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}},{key:"_createDescription",value:function(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}},{key:"_temporaryBindEvent",value:function(e,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: "+Wo($e(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,i=this.temporaryEventFunctions[e].boundFunction;this.body.emitter.off(t,i)}this.temporaryEventFunctions=[]}},{key:"_bindElementEvents",value:function(e,t){var i=new Cn(e,{});ku(i,t),this._domEventListenerCleanupQueue.push(function(){i.destroy()});var a=function(s){var u=s.keyCode,l=s.key;(l==="Enter"||l===" "||u===13||u===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 i=re(t=this.body.edgeIndices).call(t,this.temporaryIds.edges[e]);if(i!==-1){var a;Tr(a=this.body.edgeIndices).call(a,i,1)}}for(var o=0;o<this.temporaryIds.nodes.length;o++){var s;delete this.body.nodes[this.temporaryIds.nodes[o]];var u=re(s=this.body.nodeIndices).call(s,this.temporaryIds.nodes[o]);if(u!==-1){var l;Tr(l=this.body.nodeIndices).call(l,u,1)}}this.temporaryIds={nodes:[],edges:[]}}},{key:"_controlNodeTouch",value:function(e){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Ne({},this.body.view.translation)}},{key:"_controlNodeDragStart",value:function(){var e=this.lastTouch,t=this.selectionHandler._pointerToPositionObject(e),i=this.body.nodes[this.temporaryIds.nodes[0]],a=this.body.nodes[this.temporaryIds.nodes[1]],o=this.body.edges[this.edgeBeingEditedId];this.selectedControlNode=void 0;var s=i.isOverlappingWith(t),u=a.isOverlappingWith(t);s===!0?(this.selectedControlNode=i,o.edgeType.from=i):u===!0&&(this.selectedControlNode=a,o.edgeType.to=a),this.selectedControlNode!==void 0&&this.selectionHandler.selectObject(this.selectedControlNode),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDrag",value:function(e){this.body.emitter.emit("disablePhysics");var t=this.body.functions.getPointer(e.center),i=this.canvas.DOMtoCanvas(t);this.selectedControlNode!==void 0?(this.selectedControlNode.x=i.x,this.selectedControlNode.y=i.y):this.interactionHandler.onDrag(e),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDragEnd",value:function(e){var t=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(t),a=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode!==void 0){this.selectionHandler.unselectAll();for(var o=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,u=o.length-1;u>=0;u--)if(o[u]!==this.selectedControlNode.id){s=this.body.nodes[o[u]];break}if(s!==void 0&&this.selectedControlNode!==void 0)if(s.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var l=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===l.id?this._performEditEdge(s.id,a.to.id):this._performEditEdge(a.from.id,s.id)}else a.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Ne({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;var t=this.lastTouch,i=this.selectionHandler.getNodeAt(t);if(i!==void 0)if(i.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this._getNewTargetNode(i.x,i.y);this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id);var o=this.body.functions.createEdge({id:"connectionEdge"+Fa(),from:i.id,to:a.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[o.id]=o,this.body.edgeIndices.push(o.id),this.temporaryIds.nodes.push(a.id),this.temporaryIds.edges.push(o.id)}this.touchTime=new Date().valueOf()}}},{key:"_dragControlNode",value:function(e){var t=this.body.functions.getPointer(e.center),i=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(i),s=void 0,u=o.length-1;u>=0;u--){var l;if(re(l=this.temporaryIds.nodes).call(l,o[u])===-1){s=this.body.nodes[o[u]];break}}if(e.controlEdge={from:a,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,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),i=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(i),s=void 0,u=o.length-1;u>=0;u--){var l;if(re(l=this.temporaryIds.nodes).call(l,o[u])===-1){s=this.body.nodes[o[u]];break}}this._cleanupTemporaryNodesAndEdges(),s!==void 0&&(s.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[a]!==void 0&&this.body.nodes[s.id]!==void 0&&this._performAddEdge(a,s.id)),e.controlEdge={from:a,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,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,i={id:Fa(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(i,function(a){a!=null&&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(i),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(e,t){var i=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&&i.inMode==="addEdge"&&(i.body.data.edges.getDataSet().add(o),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(a),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(e,t){var i=this,a={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label},o=this.options.editEdge;if(de(o)==="object"&&(o=o.editWithoutDrag),typeof o=="function")if(o.length===2)o(a,function(s){s==null||i.inMode!=="editEdge"?(i.body.edges[a.id].updateEdgeType(),i.body.emitter.emit("_redraw"),i.showManipulatorToolbar()):(i.body.data.edges.getDataSet().update(s),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(a),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),r}(),A="string",T="boolean",$="number",Pa="array",z="object",rT="dom",Sve="any",Hh=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],Wh={borderWidth:{number:$},borderWidthSelected:{number:$,undefined:"undefined"},brokenImage:{string:A,undefined:"undefined"},chosen:{label:{boolean:T,function:"function"},node:{boolean:T,function:"function"},__type__:{object:z,boolean:T}},color:{border:{string:A},background:{string:A},highlight:{border:{string:A},background:{string:A},__type__:{object:z,string:A}},hover:{border:{string:A},background:{string:A},__type__:{object:z,string:A}},__type__:{object:z,string:A}},opacity:{number:$,undefined:"undefined"},fixed:{x:{boolean:T},y:{boolean:T},__type__:{object:z,boolean:T}},font:{align:{string:A},color:{string:A},size:{number:$},face:{string:A},background:{string:A},strokeWidth:{number:$},strokeColor:{string:A},vadjust:{number:$},multi:{boolean:T,string:A},bold:{color:{string:A},size:{number:$},face:{string:A},mod:{string:A},vadjust:{number:$},__type__:{object:z,string:A}},boldital:{color:{string:A},size:{number:$},face:{string:A},mod:{string:A},vadjust:{number:$},__type__:{object:z,string:A}},ital:{color:{string:A},size:{number:$},face:{string:A},mod:{string:A},vadjust:{number:$},__type__:{object:z,string:A}},mono:{color:{string:A},size:{number:$},face:{string:A},mod:{string:A},vadjust:{number:$},__type__:{object:z,string:A}},__type__:{object:z,string:A}},group:{string:A,number:$,undefined:"undefined"},heightConstraint:{minimum:{number:$},valign:{string:A},__type__:{object:z,boolean:T,number:$}},hidden:{boolean:T},icon:{face:{string:A},code:{string:A},size:{number:$},color:{string:A},weight:{string:A,number:$},__type__:{object:z}},id:{string:A,number:$},image:{selected:{string:A,undefined:"undefined"},unselected:{string:A,undefined:"undefined"},__type__:{object:z,string:A}},imagePadding:{top:{number:$},right:{number:$},bottom:{number:$},left:{number:$},__type__:{object:z,number:$}},label:{string:A,undefined:"undefined"},labelHighlightBold:{boolean:T},level:{number:$,undefined:"undefined"},margin:{top:{number:$},right:{number:$},bottom:{number:$},left:{number:$},__type__:{object:z,number:$}},mass:{number:$},physics:{boolean:T},scaling:{min:{number:$},max:{number:$},label:{enabled:{boolean:T},min:{number:$},max:{number:$},maxVisible:{number:$},drawThreshold:{number:$},__type__:{object:z,boolean:T}},customScalingFunction:{function:"function"},__type__:{object:z}},shadow:{enabled:{boolean:T},color:{string:A},size:{number:$},x:{number:$},y:{number:$},__type__:{object:z,boolean:T}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:T,array:Pa},borderRadius:{number:$},interpolation:{boolean:T},useImageSize:{boolean:T},useBorderWithImage:{boolean:T},coordinateOrigin:{string:["center","top-left"]},__type__:{object:z}},size:{number:$},title:{string:A,dom:rT,undefined:"undefined"},value:{number:$,undefined:"undefined"},widthConstraint:{minimum:{number:$},maximum:{number:$},__type__:{object:z,boolean:T,number:$}},x:{number:$},y:{number:$},__type__:{object:z}},Ove={configure:{enabled:{boolean:T},filter:{boolean:T,string:A,array:Pa,function:"function"},container:{dom:rT},showButton:{boolean:T},__type__:{object:z,boolean:T,string:A,array:Pa,function:"function"}},edges:{arrows:{to:{enabled:{boolean:T},scaleFactor:{number:$},type:{string:Hh},imageHeight:{number:$},imageWidth:{number:$},src:{string:A},__type__:{object:z,boolean:T}},middle:{enabled:{boolean:T},scaleFactor:{number:$},type:{string:Hh},imageWidth:{number:$},imageHeight:{number:$},src:{string:A},__type__:{object:z,boolean:T}},from:{enabled:{boolean:T},scaleFactor:{number:$},type:{string:Hh},imageWidth:{number:$},imageHeight:{number:$},src:{string:A},__type__:{object:z,boolean:T}},__type__:{string:["from","to","middle"],object:z}},endPointOffset:{from:{number:$},to:{number:$},__type__:{object:z,number:$}},arrowStrikethrough:{boolean:T},background:{enabled:{boolean:T},color:{string:A},size:{number:$},dashes:{boolean:T,array:Pa},__type__:{object:z,boolean:T}},chosen:{label:{boolean:T,function:"function"},edge:{boolean:T,function:"function"},__type__:{object:z,boolean:T}},color:{color:{string:A},highlight:{string:A},hover:{string:A},inherit:{string:["from","to","both"],boolean:T},opacity:{number:$},__type__:{object:z,string:A}},dashes:{boolean:T,array:Pa},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:T,string:A},bold:{color:{string:A},size:{number:$},face:{string:A},mod:{string:A},vadjust:{number:$},__type__:{object:z,string:A}},boldital:{color:{string:A},size:{number:$},face:{string:A},mod:{string:A},vadjust:{number:$},__type__:{object:z,string:A}},ital:{color:{string:A},size:{number:$},face:{string:A},mod:{string:A},vadjust:{number:$},__type__:{object:z,string:A}},mono:{color:{string:A},size:{number:$},face:{string:A},mod:{string:A},vadjust:{number:$},__type__:{object:z,string:A}},__type__:{object:z,string:A}},hidden:{boolean:T},hoverWidth:{function:"function",number:$},label:{string:A,undefined:"undefined"},labelHighlightBold:{boolean:T},length:{number:$,undefined:"undefined"},physics:{boolean:T},scaling:{min:{number:$},max:{number:$},label:{enabled:{boolean:T},min:{number:$},max:{number:$},maxVisible:{number:$},drawThreshold:{number:$},__type__:{object:z,boolean:T}},customScalingFunction:{function:"function"},__type__:{object:z}},selectionWidth:{function:"function",number:$},selfReferenceSize:{number:$},selfReference:{size:{number:$},angle:{number:$},renderBehindTheNode:{boolean:T},__type__:{object:z}},shadow:{enabled:{boolean:T},color:{string:A},size:{number:$},x:{number:$},y:{number:$},__type__:{object:z,boolean:T}},smooth:{enabled:{boolean:T},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:$},forceDirection:{string:["horizontal","vertical","none"],boolean:T},__type__:{object:z,boolean:T}},title:{string:A,undefined:"undefined"},width:{number:$},widthConstraint:{maximum:{number:$},__type__:{object:z,boolean:T,number:$}},value:{number:$,undefined:"undefined"},__type__:{object:z}},groups:{useDefaultGroups:{boolean:T},__any__:Wh,__type__:{object:z}},interaction:{dragNodes:{boolean:T},dragView:{boolean:T},hideEdgesOnDrag:{boolean:T},hideEdgesOnZoom:{boolean:T},hideNodesOnDrag:{boolean:T},hover:{boolean:T},keyboard:{enabled:{boolean:T},speed:{x:{number:$},y:{number:$},zoom:{number:$},__type__:{object:z}},bindToWindow:{boolean:T},autoFocus:{boolean:T},__type__:{object:z,boolean:T}},multiselect:{boolean:T},navigationButtons:{boolean:T},selectable:{boolean:T},selectConnectedEdges:{boolean:T},hoverConnectedEdges:{boolean:T},tooltipDelay:{number:$},zoomView:{boolean:T},zoomSpeed:{number:$},__type__:{object:z}},layout:{randomSeed:{undefined:"undefined",number:$,string:A},improvedLayout:{boolean:T},clusterThreshold:{number:$},hierarchical:{enabled:{boolean:T},levelSeparation:{number:$},nodeSpacing:{number:$},treeSpacing:{number:$},blockShifting:{boolean:T},edgeMinimization:{boolean:T},parentCentralization:{boolean:T},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:z,boolean:T}},__type__:{object:z}},manipulation:{enabled:{boolean:T},initiallyActive:{boolean:T},addNode:{boolean:T,function:"function"},addEdge:{boolean:T,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:z,boolean:T,function:"function"}},deleteNode:{boolean:T,function:"function"},deleteEdge:{boolean:T,function:"function"},controlNodeStyle:Wh,__type__:{object:z,boolean:T}},nodes:Wh,physics:{enabled:{boolean:T},barnesHut:{theta:{number:$},gravitationalConstant:{number:$},centralGravity:{number:$},springLength:{number:$},springConstant:{number:$},damping:{number:$},avoidOverlap:{number:$},__type__:{object:z}},forceAtlas2Based:{theta:{number:$},gravitationalConstant:{number:$},centralGravity:{number:$},springLength:{number:$},springConstant:{number:$},damping:{number:$},avoidOverlap:{number:$},__type__:{object:z}},repulsion:{centralGravity:{number:$},springLength:{number:$},springConstant:{number:$},nodeDistance:{number:$},damping:{number:$},__type__:{object:z}},hierarchicalRepulsion:{centralGravity:{number:$},springLength:{number:$},springConstant:{number:$},nodeDistance:{number:$},damping:{number:$},avoidOverlap:{number:$},__type__:{object:z}},maxVelocity:{number:$},minVelocity:{number:$},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:T},iterations:{number:$},updateInterval:{number:$},onlyDynamicEdges:{boolean:T},fit:{boolean:T},__type__:{object:z,boolean:T}},timestep:{number:$},adaptiveTimestep:{boolean:T},wind:{x:{number:$},y:{number:$},__type__:{object:z}},__type__:{object:z,boolean:T}},autoResize:{boolean:T},clickToUse:{boolean:T},locale:{string:A},locales:{__any__:{any:Sve},__type__:{object:z}},height:{string:A},width:{string:A},__type__:{object:z}},iT={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]}}},Tve=function(n,e,t){var i;return!!(vr(n).call(n,"physics")&&vr(i=iT.physics.solver).call(i,e)&&t.physics.solver!==e&&e!=="wind")},kve=function(){function r(){x(this,r)}return D(r,[{key:"getDistances",value:function(e,t,i){for(var a={},o=e.edges,s=0;s<t.length;s++){var u=t[s],l={};a[u]=l;for(var d=0;d<t.length;d++)l[t[d]]=s==d?0:1e9}for(var h=0;h<i.length;h++){var c=o[i[h]];c.connected===!0&&a[c.fromId]!==void 0&&a[c.toId]!==void 0&&(a[c.fromId][c.toId]=1,a[c.toId][c.fromId]=1)}for(var f=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 _=t[b],S=a[_],I=Math.min(w[_],w[p]+g[_]);w[_]=I,S[m]=I}return a}}]),r}(),Pve=function(){function r(n,e,t){x(this,r),this.body=n,this.springLength=e,this.springConstant=t,this.distanceSolver=new kve}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 i=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,u=0,l=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),d=5,h=1e9,c=0,f=0,v=0,p=0,g=0;h>o&&u<l;){u+=1;var y=this._getHighestEnergyNode(i),m=_e(y,4);for(c=m[0],h=m[1],f=m[2],v=m[3],p=h,g=0;p>s&&g<d;){g+=1,this._moveNode(c,f,v);var w=this._getEnergy(c),b=_e(w,3);p=b[0],f=b[1],v=b[2]}}}},{key:"_getHighestEnergyNode",value:function(e){for(var t=this.body.nodeIndices,i=this.body.nodes,a=0,o=t[0],s=0,u=0,l=0;l<t.length;l++){var d=t[l];if(i[d].predefinedPosition!==!0||i[d].isCluster===!0&&e===!0||i[d].options.fixed.x!==!0||i[d].options.fixed.y!==!0){var h=this._getEnergy(d),c=_e(h,3),f=c[0],v=c[1],p=c[2];a<f&&(a=f,o=d,s=v,u=p)}}return[o,a,s,u]}},{key:"_getEnergy",value:function(e){var t=_e(this.E_sums[e],2),i=t[0],a=t[1],o=Math.sqrt(Math.pow(i,2)+Math.pow(a,2));return[o,i,a]}},{key:"_moveNode",value:function(e,t,i){for(var a=this.body.nodeIndices,o=this.body.nodes,s=0,u=0,l=0,d=o[e].x,h=o[e].y,c=this.K_matrix[e],f=this.L_matrix[e],v=0;v<a.length;v++){var p=a[v];if(p!==e){var g=o[p].x,y=o[p].y,m=c[p],w=f[p],b=1/Math.pow(Math.pow(d-g,2)+Math.pow(h-y,2),1.5);s+=m*(1-w*Math.pow(h-y,2)*b),u+=m*(w*(d-g)*(h-y)*b),l+=m*(1-w*Math.pow(d-g,2)*b)}}var _=s,S=u,I=t,N=l,R=i,M=(I/_+R/S)/(S/_-N/S),B=-(S*M+I)/_;o[e].x+=B,o[e].y+=M,this._updateE_matrix(e)}},{key:"_createL_matrix",value:function(e){var t=this.body.nodeIndices,i=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]]=i*e[t[a]][t[o]]}}},{key:"_createK_matrix",value:function(e){var t=this.body.nodeIndices,i=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]]=i*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 i=0;i<e.length;i++)this.E_matrix[e[i]]=[];for(var a=0;a<e.length;a++){for(var o=e[a],s=t[o].x,u=t[o].y,l=0,d=0,h=a;h<e.length;h++){var c=e[h];if(c!==o){var f=t[c].x,v=t[c].y,p=1/Math.sqrt(Math.pow(s-f,2)+Math.pow(u-v,2));this.E_matrix[o][h]=[this.K_matrix[o][c]*(s-f-this.L_matrix[o][c]*(s-f)*p),this.K_matrix[o][c]*(u-v-this.L_matrix[o][c]*(u-v)*p)],this.E_matrix[c][a]=this.E_matrix[o][h],l+=this.E_matrix[o][h][0],d+=this.E_matrix[o][h][1]}}this.E_sums[o]=[l,d]}}},{key:"_updateE_matrix",value:function(e){for(var t=this.body.nodeIndices,i=this.body.nodes,a=this.E_matrix[e],o=this.K_matrix[e],s=this.L_matrix[e],u=i[e].x,l=i[e].y,d=0,h=0,c=0;c<t.length;c++){var f=t[c];if(f!==e){var v=a[c],p=v[0],g=v[1],y=i[f].x,m=i[f].y,w=1/Math.sqrt(Math.pow(u-y,2)+Math.pow(l-m,2)),b=o[f]*(u-y-s[f]*(u-y)*w),_=o[f]*(l-m-s[f]*(l-m)*w);a[c]=[b,_],d+=b,h+=_;var S=this.E_sums[f];S[0]+=b-p,S[1]+=_-g}}this.E_sums[e]=[d,h]}}]),r}();function j(r,n,e){var t,i,a,o,s=this;if(!(this instanceof j))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:Oae,clickToUse:!1},Ne(this.options,this.defaultOptions),this.body={container:r,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:k(t=this.on).call(t,this),off:k(i=this.off).call(i,this),emit:k(a=this.emit).call(a,this),once:k(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 Pae(function(){return s.body.emitter.emit("_requestRedraw")}),this.groups=new Uoe,this.canvas=new uce(this.body),this.selectionHandler=new Jce(this.body,this.canvas),this.interactionHandler=new vce(this.body,this.canvas,this.selectionHandler),this.view=new dce(this.body,this.canvas),this.renderer=new ice(this.body,this.canvas),this.physics=new Khe(this.body),this.layoutEngine=new $ve(this.body),this.clustering=new tce(this.body),this.manipulation=new Eve(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new Cde(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new Fhe(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new Pve(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(e),this.setData(n)}rE(j.prototype);j.prototype.setOptions=function(r){var n=this;if(r===null&&(r=void 0),r!==void 0){var e=rae.validate(r,Ove);e===!0&&console.error("%cErrors have been found in the supplied options object.",aO);var t=["locale","locales","clickToUse"];if(ya(t,this.options,r),r.locale!==void 0&&(r.locale=Tae(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 eae(this,this.body.container,iT,this.canvas.pixelRatio,Tve)),this.configurator.setOptions(r.configure)),this.configurator&&this.configurator.options.enabled===!0){var i={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};ve(i.nodes,this.nodesHandler.options),ve(i.edges,this.edgesHandler.options),ve(i.layout,this.layoutEngine.options),ve(i.interaction,this.selectionHandler.options),ve(i.interaction,this.renderer.options),ve(i.interaction,this.interactionHandler.options),ve(i.manipulation,this.manipulation.options),ve(i.physics,this.physics.options),ve(i.global,this.canvas.options),ve(i.global,this.options),this.configurator.setModuleOptions(i)}r.clickToUse!==void 0?r.clickToUse===!0?this.activator===void 0&&(this.activator=new Zne(this.canvas.frame),this.activator.on("change",function(){n.body.emitter.emit("activate")})):(this.activator!==void 0&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}};j.prototype._updateVisibleIndices=function(){var r=this.body.nodes,n=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 n)if(Object.prototype.hasOwnProperty.call(n,t)){var i=n[t],a=r[i.fromId],o=r[i.toId],s=a!==void 0&&o!==void 0,u=!this.clustering._isClusteredEdge(t)&&i.options.hidden===!1&&s&&a.options.hidden===!1&&o.options.hidden===!1;u&&this.body.edgeIndices.push(i.id)}};j.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")})};j.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 n=cae(r.dot);this.setData(n);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=fae(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")};j.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 n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&delete this.body.edges[n];Wr(this.body.container)};j.prototype._updateValueRange=function(r){var n,e=void 0,t=void 0,i=0;for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)){var a=r[n].getValue();a!==void 0&&(e=e===void 0?a:Math.min(a,e),t=t===void 0?a:Math.max(a,t),i+=a)}if(e!==void 0&&t!==void 0)for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&r[n].setValueRange(e,t,i)};j.prototype.isActive=function(){return!this.activator||this.activator.active};j.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};j.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};j.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};j.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};j.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};j.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};j.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};j.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};j.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};j.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};j.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};j.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};j.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};j.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};j.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};j.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};j.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};j.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};j.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};j.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};j.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};j.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};j.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};j.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};j.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};j.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};j.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};j.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};j.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};j.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};j.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)};j.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};j.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};j.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};j.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};j.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};j.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};j.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};j.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};j.prototype.getNodeAt=function(){var r=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};j.prototype.getEdgeAt=function(){var r=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};j.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};j.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};j.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};j.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};j.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};j.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};j.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};j.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};j.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};j.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};j.prototype.getOptionsFromConfigurator=function(){var r={};return this.configurator&&(r=this.configurator.getOptions.apply(this.configurator)),r};const Ive={flex:"~ gap-4 wrap","w-full":""},Cve=Q("span",{op75:""},"Show pages",-1),Ave=Q("span",{op75:""},"Show layouts",-1),xve=Q("span",{op75:""},"Show workspace",-1),Dve=Q("span",{op75:""},"Show node_modules",-1),Rve=Q("span",{op75:""},"Show global components",-1),Mve=Q("div",{"i-carbon-close":""},null,-1),Nve=Q("div",{"flex-auto":""},null,-1),Fve={relative:"","h-full":"","w-full":""},Bve=Q("div",{grid:"~ cols-[20px_1fr] items-center gap-y-1"},[Q("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-42b883":""}),Q("div",{op50:""}," Component "),Q("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-97c2fc":""}),Q("div",{op50:""}," Global Component "),Q("div",{"h-3":"","w-3":"","bg-hex-42b2b8":""}),Q("div",{op50:""}," Page "),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 726 628","ml--1px":"","h-3":""},[Q("path",{fill:"#4256b8","stroke-width":"4",d:"M723 314 543 625.8H183L3 314 183 2.2h360L723 314z"})]),Q("div",{op50:""}," Layout "),Q("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b4b842":""}),Q("div",{op50:""}," Library Component "),Q("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b86542":""}),Q("div",{op50:""}," Unknown ")],-1),Lve={key:0,py4:"",pt4:"",flex:"~ col"},jve={border:"t base",p4:""},zve=Un({__name:"ComponentsGraph",props:{components:{},relationships:{}},setup(r){const n=r,e=gn(),t=gn(),i=aT(),a=gn(),o=oT(),s=sT(),u=uT(),{componentsGraphShowNodeModules:l,componentsGraphShowGlobalComponents:d,componentsGraphShowPages:h,componentsGraphShowLayouts:c,componentsGraphShowWorkspace:f}=e1(),v=gn(),p=Zt(()=>{const b=n.relationships||[];if(v.value){let _=function(I){!I||S.has(I)||(S.add(I),I.deps.forEach(N=>{_(b.find(R=>R.id===N))}))};const S=new Set;return _(v.value),Array.from(S)}return b}),g=Zt(()=>{const b=p.value.map(S=>{const I=n.components.find(J=>J.filePath===S.id),N=o.value?.find(J=>J.file===S.id),R=u.value?.find(J=>J.file===S.id),M=S.id.replace(/\?.*$/,"").replace(/\#.*$/,""),B=S.id.includes("/node_modules/")?"lib":I?I.global?"global":"user":R?"layout":N?"page":"unknown";if(!l.value&&B==="lib"||!h.value&&B==="page"||!c.value&&B==="layout"||!f.value&&B==="user"&&s.value&&!S.id.startsWith(s.value.rootDir)||!d.value&&B==="global")return null;const V=B==="layout"?"hexagon":B==="page"?"square":"dot";return{id:S.id,label:M.split("/").splice(-1)[0].replace(/\.\w+$/,""),group:B,shape:V,size:15+Math.min(S.deps.length/2,8),font:{color:i.value==="dark"?"white":"black"},color:v.value?.id===S.id?"#82c742":void 0,extra:{id:S.id,component:I,page:N,layout:R,relationship:S}}}).filter(S=>!!S),_=p.value.flatMap(S=>S.deps.map(I=>({from:S.id,to:I,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:b,edges:_}}),y=Zt(()=>a.value?.component?n.relationships?.find(_=>_.id===a.value?.component?.filePath)?.deps?.map(_=>n.relationships?.find(S=>S.id===_)?.id).filter(Boolean):[]),m=Zt(()=>a.value?.component?n.relationships?.filter(_=>_.deps.includes(a.value.component.filePath))?.map(_=>n.relationships?.find(S=>S.id===_.id)?.id).filter(Boolean):[]);lT(()=>{const b={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"}}},_=new j(e.value,g.value,b);_.on("click",S=>{const I=S.nodes?.[0],N=g.value.nodes?.find(R=>R.id===I)?.extra;N&&(a.value=N)}),dT(g,()=>{_.setData(g.value)})});function w(){v.value=a.value?.relationship,a.value=void 0}return(b,_)=>{const S=OT,I=t1,N=hT,R=o1,M=of,B=TT;return ee(),we(ur,null,[be(I,{ref_key:"navbar",ref:t,absolute:"","left-0":"","right-0":"","top-0":""},{search:Le(()=>[Q("div",Ive,[be(S,{modelValue:q(h),"onUpdate:modelValue":_[0]||(_[0]=V=>mi(h)?h.value=V:null),n:"primary sm"},{default:Le(()=>[Cve]),_:1},8,["modelValue"]),be(S,{modelValue:q(c),"onUpdate:modelValue":_[1]||(_[1]=V=>mi(c)?c.value=V:null),n:"primary sm"},{default:Le(()=>[Ave]),_:1},8,["modelValue"]),be(S,{modelValue:q(f),"onUpdate:modelValue":_[2]||(_[2]=V=>mi(f)?f.value=V:null),n:"primary sm"},{default:Le(()=>[xve]),_:1},8,["modelValue"]),be(S,{modelValue:q(l),"onUpdate:modelValue":_[3]||(_[3]=V=>mi(l)?l.value=V:null),n:"primary sm"},{default:Le(()=>[Dve]),_:1},8,["modelValue"]),be(S,{modelValue:q(d),"onUpdate:modelValue":_[4]||(_[4]=V=>mi(d)?d.value=V:null),n:"primary sm"},{default:Le(()=>[Rve]),_:1},8,["modelValue"])]),q(v)?(ee(),we("button",{key:0,flex:"~ gap-1","flex-none":"","items-center":"","rounded-full":"","bg-gray:20":"",py1:"",pl3:"",pr2:"","text-xs":"",op50:"","hover:op100":"",onClick:_[5]||(_[5]=V=>v.value=void 0)},[Vh(" Clear filter "),Mve])):at("",!0),Nve,Pu(b.$slots,"default")]),_:3},512),Q("div",Fve,[Q("div",{ref_key:"container",ref:e,"h-full":"","w-full":""},null,512),be(N,{absolute:"","bottom-3":"","left-3":"","border-0":"",p2:"",px3:"","text-sm":"","n-glass-effect":""},{default:Le(()=>[Bve]),_:1}),be(B,{"model-value":!!(q(a)&&q(a).component),top:q(t),border:"t l base","w-80":"",onClose:_[7]||(_[7]=V=>a.value=void 0)},{default:Le(()=>[q(a)&&q(a).component?(ee(),we("div",Lve,[be(R,{component:q(a).component,dependencies:q(y),dependents:q(m)},null,8,["component","dependencies","dependents"]),Q("div",jve,[be(M,{n:"primary solid",onClick:_[6]||(_[6]=V=>w())},{default:Le(()=>[Vh(" Filter to this component ")]),_:1})])])):at("",!0)]),_:1},8,["model-value","top"])])],64)}}}),Hve={hover:"bg-active",class:"group",flex:"~ gap2","w-full":"","items-center":"",rounded:"",px2:"",py1:""},Wve={key:0,"ml--1":"","text-primary":""},Vve=Un({__name:"ComponentItem",props:{component:{},dependencies:{},dependents:{}},setup(r){const n=r,e=Zt(()=>n.component.filePath||n.component.file||n.component.__file||"");return(t,i)=>{const a=a1,o=o1,s=cT("VDropdown"),u=r1,l=i1;return ee(),we("div",Hve,[be(s,null,{popper:Le(()=>[be(o,{component:t.component,dependencies:t.dependencies,dependents:t.dependents,"w-100":"",pt4:""},null,8,["component","dependencies","dependents"])]),default:Le(()=>[Q("button",{"hover:text-primary":"",class:fT(t.dependents&&t.dependents.length===0?"op50":"")},[be(a,{component:t.component},null,8,["component"])],2)]),_:1}),t.dependents?.length?(ee(),we("sup",Wve," x"+tu(t.dependents?.length),1)):at("",!0),t.component.global?(ee(),nt(u,{key:1,n:"green",title:"Registered at runtime as a global component",textContent:"runtime"})):at("",!0),Pu(t.$slots,"default"),q(e)?(ee(),nt(l,{key:2,filepath:q(e),"text-sm":"",op25:"","group-hover:op75":""},null,8,["filepath"])):at("",!0)])}}}),Uve={flex:"~ gap-2 items-center"},Gve={pl4:""},Kve=Un({__name:"ComponentsList",props:{components:{},relationships:{}},setup(r){const n=r,e=gn(""),t=gn("all"),i=Zt(()=>{const s=n.components.map(u=>vT(u,n.relationships));return t.value==="using"?s.filter(u=>u.dependents?.length):t.value==="not-used"?s.filter(u=>!u.dependents?.length):s}),a=Zt(()=>new pT(i.value,{keys:["component.pascalName","component.filePath","component.kebabName"]})),o=Zt(()=>{const s=[],u=new Map,l=[],d=[],h={user:0,lib:0,builtin:0,runtime:0};return(e.value?a.value.search(e.value).map(f=>f.item):i.value).forEach(f=>{const v=f.component;if(v.filePath&&gT(v.filePath)){const p=yT(v.filePath);if(!p)return;p==="nuxt"?(l.push(f),h.builtin++):(u.has(p)||u.set(p,[]),u.get(p).push(f),h.lib++)}else v.global&&!v.filePath?(d.push(f),h.runtime++):(s.push(f),h.user++)}),{count:h,user:s,builtin:l,lib:u,runtime:d}});return(s,u)=>{const l=mT,d=kT,h=t1,c=Vve,f=PT,v=IT;return ee(),we(ur,null,[be(h,{search:q(e),"onUpdate:search":u[1]||(u[1]=p=>mi(e)?e.value=p:null),pb3:""},{actions:Le(()=>[Pu(s.$slots,"default")]),default:Le(()=>[Q("div",Uve,[be(l,{icon:"carbon-filter",op50:""}),be(d,{modelValue:q(t),"onUpdate:modelValue":u[0]||(u[0]=p=>mi(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"]),q(o).user.length?(ee(),nt(f,{key:0,icon:"carbon-nominal",text:"User components",open:q(o).user.length<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:q(Al)),description:`Total components: ${q(o).count.user}`},{default:Le(()=>[(ee(!0),we(ur,null,yi(q(o).user,p=>(ee(),nt(c,Qo({key:p.component.filePath},p),null,16))),128))]),_:1},8,["open","description"])):at("",!0),q(o).runtime.length?(ee(),nt(f,{key:1,icon:"carbon-load-balancer-global",open:q(o).runtime.length<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:q(Al)),text:"Runtime components",description:`Total components: ${q(o).count.runtime}`},{default:Le(()=>[(ee(!0),we(ur,null,yi(q(o).runtime,p=>(ee(),nt(c,Qo({key:p.component.filePath},p),null,16))),128))]),_:1},8,["open","description"])):at("",!0),q(o).builtin.length?(ee(),nt(f,{key:2,icon:"simple-icons-nuxtdotjs",text:"Built-in components",description:`Total components: ${q(o).count.builtin}`},{default:Le(()=>[(ee(!0),we(ur,null,yi(q(o).builtin,p=>(ee(),nt(c,Qo({key:p.component.filePath},p),null,16))),128))]),_:1},8,["description"])):at("",!0),q(o).lib.size?(ee(),nt(f,{key:3,open:q(o).count.lib<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:q(Al)),icon:"carbon-3d-mpr-toggle",text:"Components from libraries",description:`${q(o).count.lib} components from ${q(o).lib.size} packages`},{default:Le(()=>[(ee(!0),we(ur,null,yi(q(o).lib.entries(),([p,g])=>(ee(),we("div",{key:p,"ml-2":""},[be(v,{text:`${p} (${g.length})`,py1:"",op50:""},null,8,["text"]),Q("div",Gve,[(ee(!0),we(ur,null,yi(g,y=>(ee(),nt(c,Qo({key:y.component.filePath},y),null,16))),128))])]))),128))]),_:1},8,["open","description"])):at("",!0)],64)}}}),qve={relative:"","h-full":"","of-auto":""},Yve={"flex-none":"",flex:"~ gap3"},upe=Un({__name:"components",setup(r){const n=bT(),e=ET(),t=ST(),{componentsView:i}=e1();function a(){n.value?.inspector?.instance&&n.value.inspector.enable()}function o(){i.value=i.value==="list"?"graph":"list"}return(s,u)=>{const l=of,d=NT,h=_T,c=$T("tooltip");return ee(),we(ur,null,[Q("div",qve,[(ee(),nt(wT(q(i)==="list"?Kve:zve),{components:q(e),relationships:q(t)},{default:Le(()=>[Q("div",Yve,[Lv(be(l,{"text-lg":"",border:!1,icon:q(i)==="graph"?"i-carbon-list":"i-carbon-network-4",title:"Toggle view",onClick:o},null,8,["icon"]),[[c,"Toggle View",void 0,{"bottom-end":!0}]]),q(n)?.inspector?.instance?Lv((ee(),nt(l,{key:0,"text-lg":"",border:!1,icon:"i-tabler-focus-2",title:"Inspect Vue components",onClick:a},null,512)),[[c,"Inspect Vue components",void 0,{"bottom-end":!0}]]):at("",!0)])]),_:1},8,["components","relationships"]))]),be(h,null,{default:Le(()=>[be(d)]),_:1})],64)}}});export{upe as default};