@nuxt/devtools 1.0.0-beta.3 → 1.0.1

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 (112) hide show
  1. package/README.md +6 -28
  2. package/dist/chunks/module-main.mjs +12 -13
  3. package/dist/client/200.html +17 -17
  4. package/dist/client/404.html +17 -17
  5. package/dist/client/__blank/index.html +17 -17
  6. package/dist/client/_nuxt/{CodeDiff.vue.4fcef1e4.js → CodeDiff.vue.72250861.js} +1 -1
  7. package/dist/client/_nuxt/{ComposableItem.vue.b4d03c6d.js → ComposableItem.vue.5fcac467.js} +1 -1
  8. package/dist/client/_nuxt/{DataSchemaButton.vue.18fef0d4.js → DataSchemaButton.vue.b4fc42f9.js} +1 -1
  9. package/dist/client/_nuxt/{DataSchemaDrawer.714650a4.js → DataSchemaDrawer.ecd92b92.js} +5 -4
  10. package/dist/client/_nuxt/{DurationDisplay.vue.dd0f91f1.js → DurationDisplay.vue.7b02ae9f.js} +1 -1
  11. package/dist/client/_nuxt/{FilepathItem.vue.a1b71b8d.js → FilepathItem.vue.6cdabcd4.js} +1 -1
  12. package/dist/client/_nuxt/{HelpFab.vue.f0924b60.js → HelpFab.vue.31b87f2a.js} +1 -1
  13. package/dist/client/_nuxt/LaunchPage.vue.06fcb257.js +1 -0
  14. package/dist/client/_nuxt/{NBadge.ff27dca2.js → NBadge.681f2fb6.js} +1 -1
  15. package/dist/client/_nuxt/NCheckbox.vue.23790c32.js +1 -0
  16. package/dist/client/_nuxt/NCodeBlock.vue.7cb5f01d.js +2 -0
  17. package/dist/client/_nuxt/NDrawer.vue.15b4d748.js +1 -0
  18. package/dist/client/_nuxt/NDropdown.vue.54157271.js +1 -0
  19. package/dist/client/_nuxt/{NIconTitle.vue.7b846ffe.js → NIconTitle.vue.2d1e44fb.js} +1 -1
  20. package/dist/client/_nuxt/{NLink.vue.9859bf11.js → NLink.vue.e913f358.js} +1 -1
  21. package/dist/client/_nuxt/{NMarkdown.vue.79860402.js → NMarkdown.vue.20899182.js} +1 -1
  22. package/dist/client/_nuxt/NNavbar.vue.c506a970.js +1 -0
  23. package/dist/client/_nuxt/{NSectionBlock.acf7c6ed.js → NSectionBlock.d66bb8c4.js} +1 -1
  24. package/dist/client/_nuxt/{NSelect.vue.04805728.js → NSelect.vue.9e5ebac9.js} +1 -1
  25. package/dist/client/_nuxt/NSelectTabs.vue.9bf6517b.js +1 -0
  26. package/dist/client/_nuxt/NSwitch.vue.2e265fe1.js +1 -0
  27. package/dist/client/_nuxt/{NTip.vue.c98a31a2.js → NTip.vue.51a4b91d.js} +1 -1
  28. package/dist/client/_nuxt/StateEditor.vue.420289e1.js +1 -0
  29. package/dist/client/_nuxt/{__blank.eaeade3a.js → __blank.95ba7574.js} +1 -1
  30. package/dist/client/_nuxt/{analyze-build.92ac65df.js → analyze-build.5b09c13b.js} +1 -1
  31. package/dist/client/_nuxt/assets.f0ad2218.js +16 -0
  32. package/dist/client/_nuxt/builds/latest.json +1 -0
  33. package/dist/client/_nuxt/builds/meta/10bb1edc-fde3-4c52-91c9-404c411ae86d.json +1 -0
  34. package/dist/client/_nuxt/client.b2473ec3.js +1 -0
  35. package/dist/client/_nuxt/components.dcc368d1.js +98 -0
  36. package/dist/client/_nuxt/{custom-_name_.b17c1362.js → custom-_name_.129bf0b8.js} +1 -1
  37. package/dist/client/_nuxt/{default.201686e7.js → default.b857d80c.js} +1 -1
  38. package/dist/client/_nuxt/entry.7cb87d02.js +27 -0
  39. package/dist/client/_nuxt/{entry.aac067b6.css → entry.aa8c94e8.css} +1 -1
  40. package/dist/client/_nuxt/{error-404.18967c67.js → error-404.6518563d.js} +1 -1
  41. package/dist/client/_nuxt/{error-500.dcd91098.js → error-500.94c551da.js} +1 -1
  42. package/dist/client/_nuxt/{full.a9db422e.js → full.169e4977.js} +1 -1
  43. package/dist/client/_nuxt/{hooks.ad5f725f.js → hooks.f1018405.js} +1 -1
  44. package/dist/client/_nuxt/{imports.468b0281.js → imports.dda10442.js} +1 -1
  45. package/dist/client/_nuxt/{index.dacd63c3.js → index.02ce2a44.js} +1 -1
  46. package/dist/client/_nuxt/{index.86b321d0.js → index.05d4e5a2.js} +1 -1
  47. package/dist/client/_nuxt/json-editor-vue.b5b3ad21.js +129 -0
  48. package/dist/client/_nuxt/modules.25c79d85.js +2 -0
  49. package/dist/client/_nuxt/{none.37b64ac4.js → none.cebdb11e.js} +1 -1
  50. package/dist/client/_nuxt/{open-graph.03011848.js → open-graph.4871f819.js} +1 -1
  51. package/dist/client/_nuxt/overview.a8b5c91e.js +1 -0
  52. package/dist/client/_nuxt/pages.b6c85de5.js +1 -0
  53. package/dist/client/_nuxt/{payload.b7f38f74.js → payload.5d97df2d.js} +1 -1
  54. package/dist/client/_nuxt/{plugins.59bd86e7.js → plugins.f3bd0c25.js} +1 -1
  55. package/dist/client/_nuxt/{runtime-configs.aaa20729.js → runtime-configs.92408de9.js} +1 -1
  56. package/dist/client/_nuxt/server-routes.90d653e7.js +9 -0
  57. package/dist/client/_nuxt/{settings.12ae4ad7.js → settings.9790bb1a.js} +1 -1
  58. package/dist/client/_nuxt/{state-components.a78445e5.js → state-components.ca15f9b7.js} +1 -1
  59. package/dist/client/_nuxt/{state-modules.199ca5da.js → state-modules.c1654bb7.js} +1 -1
  60. package/dist/client/_nuxt/{storage-options.aeaf572e.js → storage-options.035e7403.js} +1 -1
  61. package/dist/client/_nuxt/{storage.f2e2d671.js → storage.c7339fe7.js} +1 -1
  62. package/dist/client/_nuxt/{terminals.091a556d.js → terminals.41bf8c60.js} +1 -1
  63. package/dist/client/_nuxt/timeline.ed636d87.js +29 -0
  64. package/dist/client/_nuxt/unocss-runtime.16c4cc56.js +2 -0
  65. package/dist/client/_nuxt/virtual-files.7d0bcad0.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/runtime/plugins/devtools.server.mjs +1 -2
  87. package/dist/runtime/plugins/view/FrameBox.vue +3 -0
  88. package/dist/runtime/plugins/view/Main.vue +21 -17
  89. package/dist/runtime/plugins/view/utils.d.ts +14 -0
  90. package/dist/runtime/plugins/view/utils.mjs +71 -1
  91. package/package.json +43 -39
  92. package/dist/client/_nuxt/LaunchPage.vue.c617b6d5.js +0 -1
  93. package/dist/client/_nuxt/NCheckbox.vue.b56304c9.js +0 -1
  94. package/dist/client/_nuxt/NCodeBlock.vue.9ce69690.js +0 -2
  95. package/dist/client/_nuxt/NDrawer.vue.2b176b54.js +0 -1
  96. package/dist/client/_nuxt/NDropdown.vue.e90fcd0b.js +0 -1
  97. package/dist/client/_nuxt/NNavbar.vue.737ef1b1.js +0 -1
  98. package/dist/client/_nuxt/NSelectTabs.vue.626ecbdd.js +0 -1
  99. package/dist/client/_nuxt/NSwitch.vue.ff927669.js +0 -1
  100. package/dist/client/_nuxt/StateEditor.vue.1c34496c.js +0 -1
  101. package/dist/client/_nuxt/assets.c6f47fab.js +0 -16
  102. package/dist/client/_nuxt/client.17f79a3c.js +0 -1
  103. package/dist/client/_nuxt/components.80a04311.js +0 -98
  104. package/dist/client/_nuxt/entry.909ad6c7.js +0 -27
  105. package/dist/client/_nuxt/json-editor-vue.8a771ed0.js +0 -129
  106. package/dist/client/_nuxt/modules.dc1dbdef.js +0 -2
  107. package/dist/client/_nuxt/overview.acf4105d.js +0 -1
  108. package/dist/client/_nuxt/pages.061895e9.js +0 -1
  109. package/dist/client/_nuxt/server-routes.c8d34f99.js +0 -9
  110. package/dist/client/_nuxt/timeline.1210bb98.js +0 -29
  111. package/dist/client/_nuxt/unocss-runtime.c55f86fd.js +0 -2
  112. package/dist/client/_nuxt/virtual-files.7767a81f.js +0 -1
@@ -0,0 +1,98 @@
1
+ import{o as ee,m as Ee,k as Q,d as Yi,a as rr,v as Qd,t as al,f as q,e as mT,i as we,h as st,p as lt,F as hr,n as wn,a8 as Al,_ as ff,r as bi,ai as bT,aj as $T,aa as wT,ak as _T,al as ET,w as ST,j as ze,B as l1,am as OT,l as _n,an as TT,G as PT,ao as IT,af as kT,ap as CT,aq as xT,ar as ts,a4 as AT,as as RT,a0 as DT,at as MT,I as Gv}from"./entry.7cb87d02.js";import{_ as NT}from"./HelpFab.vue.31b87f2a.js";import{u as FT,a as BT}from"./state-components.ca15f9b7.js";import{_ as LT}from"./NCheckbox.vue.23790c32.js";import{_ as u1}from"./NNavbar.vue.c506a970.js";import{_ as h1}from"./NBadge.681f2fb6.js";import{_ as d1}from"./FilepathItem.vue.6cdabcd4.js";import{_ as jT}from"./NDrawer.vue.15b4d748.js";import{_ as zT}from"./NSelectTabs.vue.9bf6517b.js";import{_ as HT}from"./NSectionBlock.d66bb8c4.js";import{_ as WT}from"./NIconTitle.vue.2d1e44fb.js";import{D as Nu}from"./constants.2cc6e981.js";const VT={class:"markdown-body"},UT=Q("h1",null,"Components",-1),GT=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),KT=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),qT=Q("p",null,[Q("a",{href:"https://nuxt.com/docs/guide/directory-structure/components",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),YT=[UT,GT,KT,qT],XT={__name:"components",setup(r,{expose:i}){return i({frontmatter:{}}),(t,n)=>(ee(),Ee("div",VT,YT))}},QT=/\d/,JT=["-","_","/","."];function ZT(r=""){if(!QT.test(r))return r.toUpperCase()===r}function eP(r,i){const e=i??JT,t=[];if(!r||typeof r!="string")return t;let n="",a,o;for(const s of r){const l=e.includes(s);if(l===!0){t.push(n),n="",a=void 0;continue}const u=ZT(s);if(o===!1){if(a===!1&&u===!0){t.push(n),n=s,a=u;continue}if(a===!0&&u===!1&&n.length>1){const h=n[n.length-1];t.push(n.slice(0,Math.max(0,n.length-1))),n=h+s,a=u;continue}}n+=s,a=u,o=l}return t.push(n),t}function tP(r){return r?r[0].toUpperCase()+r.slice(1):""}function c1(r){return r?(Array.isArray(r)?r:eP(r)).map(i=>tP(i)).join(""):""}const rP={"text-sm":"","font-mono":""},nP=Q("span",{mr1:"",op20:""},"<",-1),iP=Q("span",{ml1:"",op20:""},"/>",-1),f1=Yi({__name:"ComponentName",props:{component:{}},setup(r){const i=r,e=rr(()=>i.component.pascalName||c1(i.component.name||i.component.__name||i.component.kebabName||""));return(t,n)=>(ee(),Ee("code",rP,[nP,Qd(al(q(e)),1),iP]))}}),aP={flex:"~ col gap1","items-start":"","of-hidden":""},oP={flex:"~ gap2",px3:""},sP={px3:"",pb2:""},lP={key:0,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},uP={"text-sm":""},hP={"text-primary":""},dP=Q("span",{op50:""}," references",-1),cP={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},fP={key:1,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},vP={"text-sm":""},pP={"text-primary":""},gP=Q("span",{op50:""}," dependencies",-1),yP={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},v1=Yi({__name:"ComponentDetails",props:{component:{},dependencies:{},dependents:{}},setup(r){const i=r,e=rr(()=>i.component.pascalName||c1(i.component.name||i.component.__name||i.component.kebabName||"")),t=rr(()=>i.component.filePath||i.component.file||i.component.__file||""),n=mT();return(a,o)=>{const s=f1,l=ff,u=h1,h=d1;return ee(),Ee("div",aP,[Q("div",oP,[we(s,{component:a.component},null,8,["component"]),we(l,{title:"Copy name","flex-none":"",icon:"carbon-copy",border:!1,onClick:o[0]||(o[0]=d=>q(n)(`<${q(e)}></${q(e)}>`,"component-name"))}),a.component.global?(ee(),st(u,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"runtime"})):lt("",!0)]),Q("div",sP,[q(t)?(ee(),st(h,{key:0,filepath:q(t),"w-full":"","text-sm":"",op40:"","group-hover:op75":""},null,8,["filepath"])):lt("",!0)]),a.dependents?(ee(),Ee("div",lP,[Q("div",uP,[Q("strong",hP,al(a.dependents.length),1),dP]),a.dependents.length?(ee(),Ee("div",cP,[(ee(!0),Ee(hr,null,wn(a.dependents,d=>(ee(),st(h,{key:d,filepath:d},null,8,["filepath"]))),128))])):lt("",!0)])):lt("",!0),a.dependencies?(ee(),Ee("div",fP,[Q("div",vP,[Q("strong",pP,al(a.dependencies.length),1),gP]),a.dependencies.length?(ee(),Ee("div",yP,[(ee(!0),Ee(hr,null,wn(a.dependencies,d=>(ee(),st(h,{key:d,filepath:d},null,8,["filepath"]))),128))])):lt("",!0)])):lt("",!0),Al(a.$slots,"default")])}}});/**
2
+ * vis-data
3
+ * http://visjs.org/
4
+ *
5
+ * Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data.
6
+ *
7
+ * @version 7.1.8
8
+ * @date 2023-11-08T02:09:51.691Z
9
+ *
10
+ * @copyright (c) 2011-2017 Almende B.V, http://almende.com
11
+ * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
12
+ *
13
+ * @license
14
+ * vis.js is dual licensed under both
15
+ *
16
+ * 1. The Apache 2.0 License
17
+ * http://www.apache.org/licenses/LICENSE-2.0
18
+ *
19
+ * and
20
+ *
21
+ * 2. The MIT License
22
+ * http://opensource.org/licenses/MIT
23
+ *
24
+ * vis.js may be distributed under either license.
25
+ */function Rl(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}var Fu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function K(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var p1={exports:{}},rs=function(r){return r&&r.Math===Math&&r},ye=rs(typeof globalThis=="object"&&globalThis)||rs(typeof window=="object"&&window)||rs(typeof self=="object"&&self)||rs(typeof Fu=="object"&&Fu)||function(){return this}()||Fu||Function("return this")(),se=function(r){try{return!!r()}catch{return!0}},mP=se,lo=!mP(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),bP=lo,g1=Function.prototype,Kv=g1.apply,qv=g1.call,Xi=typeof Reflect=="object"&&Reflect.apply||(bP?qv.bind(Kv):function(){return qv.apply(Kv,arguments)}),y1=lo,m1=Function.prototype,Jd=m1.call,$P=y1&&m1.bind.bind(Jd,Jd),ge=y1?$P:function(r){return function(){return Jd.apply(r,arguments)}},b1=ge,wP=b1({}.toString),_P=b1("".slice),un=function(r){return _P(wP(r),8,-1)},EP=un,SP=ge,$1=function(r){if(EP(r)==="Function")return SP(r)},Zd=typeof document=="object"&&document.all,OP=typeof Zd>"u"&&Zd!==void 0,w1={all:Zd,IS_HTMLDDA:OP},_1=w1,TP=_1.all,Oe=_1.IS_HTMLDDA?function(r){return typeof r=="function"||r===TP}:function(r){return typeof r=="function"},Gn={},PP=se,Ue=!PP(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),IP=lo,ns=Function.prototype.call,Ge=IP?ns.bind(ns):function(){return ns.apply(ns,arguments)},Dl={},E1={}.propertyIsEnumerable,S1=Object.getOwnPropertyDescriptor,kP=S1&&!E1.call({1:2},1);Dl.f=kP?function(i){var e=S1(this,i);return!!e&&e.enumerable}:E1;var Kn=function(r,i){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:i}},CP=ge,xP=se,AP=un,Bu=Object,RP=CP("".split),Ml=xP(function(){return!Bu("z").propertyIsEnumerable(0)})?function(r){return AP(r)==="String"?RP(r,""):Bu(r)}:Bu,Qi=function(r){return r==null},DP=Qi,MP=TypeError,vf=function(r){if(DP(r))throw new MP("Can't call method on "+r);return r},NP=Ml,FP=vf,mr=function(r){return NP(FP(r))},Yv=Oe,O1=w1,BP=O1.all,rt=O1.IS_HTMLDDA?function(r){return typeof r=="object"?r!==null:Yv(r)||r===BP}:function(r){return typeof r=="object"?r!==null:Yv(r)},me={},Lu=me,ju=ye,LP=Oe,Xv=function(r){return LP(r)?r:void 0},yt=function(r,i){return arguments.length<2?Xv(Lu[r])||Xv(ju[r]):Lu[r]&&Lu[r][i]||ju[r]&&ju[r][i]},jP=ge,Le=jP({}.isPrototypeOf),hn=typeof navigator<"u"&&String(navigator.userAgent)||"",T1=ye,zu=hn,Qv=T1.process,Jv=T1.Deno,Zv=Qv&&Qv.versions||Jv&&Jv.version,ep=Zv&&Zv.v8,Jt,ol;ep&&(Jt=ep.split("."),ol=Jt[0]>0&&Jt[0]<4?1:+(Jt[0]+Jt[1]));!ol&&zu&&(Jt=zu.match(/Edge\/(\d+)/),(!Jt||Jt[1]>=74)&&(Jt=zu.match(/Chrome\/(\d+)/),Jt&&(ol=+Jt[1])));var Ji=ol,tp=Ji,zP=se,HP=ye,WP=HP.String,Zi=!!Object.getOwnPropertySymbols&&!zP(function(){var r=Symbol("symbol detection");return!WP(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&tp&&tp<41}),VP=Zi,P1=VP&&!Symbol.sham&&typeof Symbol.iterator=="symbol",UP=yt,GP=Oe,KP=Le,qP=P1,YP=Object,uo=qP?function(r){return typeof r=="symbol"}:function(r){var i=UP("Symbol");return GP(i)&&KP(i.prototype,YP(r))},XP=String,ea=function(r){try{return XP(r)}catch{return"Object"}},QP=Oe,JP=ea,ZP=TypeError,It=function(r){if(QP(r))return r;throw new ZP(JP(r)+" is not a function")},eI=It,tI=Qi,pf=function(r,i){var e=r[i];return tI(e)?void 0:eI(e)},Hu=Ge,Wu=Oe,Vu=rt,rI=TypeError,nI=function(r,i){var e,t;if(i==="string"&&Wu(e=r.toString)&&!Vu(t=Hu(e,r))||Wu(e=r.valueOf)&&!Vu(t=Hu(e,r))||i!=="string"&&Wu(e=r.toString)&&!Vu(t=Hu(e,r)))return t;throw new rI("Can't convert object to primitive value")},I1={exports:{}},iI=!0,rp=ye,aI=Object.defineProperty,oI=function(r,i){try{aI(rp,r,{value:i,configurable:!0,writable:!0})}catch{rp[r]=i}return i},sI=ye,lI=oI,np="__core-js_shared__",uI=sI[np]||lI(np,{}),gf=uI,ip=gf;(I1.exports=function(r,i){return ip[r]||(ip[r]=i!==void 0?i:{})})("versions",[]).push({version:"3.33.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE",source:"https://github.com/zloirock/core-js"});var ta=I1.exports,hI=vf,dI=Object,kt=function(r){return dI(hI(r))},cI=ge,fI=kt,vI=cI({}.hasOwnProperty),je=Object.hasOwn||function(i,e){return vI(fI(i),e)},pI=ge,gI=0,yI=Math.random(),mI=pI(1 .toString),Nl=function(r){return"Symbol("+(r===void 0?"":r)+")_"+mI(++gI+yI,36)},bI=ye,$I=ta,ap=je,wI=Nl,_I=Zi,EI=P1,$i=bI.Symbol,Uu=$I("wks"),SI=EI?$i.for||$i:$i&&$i.withoutSetter||wI,$e=function(r){return ap(Uu,r)||(Uu[r]=_I&&ap($i,r)?$i[r]:SI("Symbol."+r)),Uu[r]},OI=Ge,op=rt,sp=uo,TI=pf,PI=nI,II=$e,kI=TypeError,CI=II("toPrimitive"),xI=function(r,i){if(!op(r)||sp(r))return r;var e=TI(r,CI),t;if(e){if(i===void 0&&(i="default"),t=OI(e,r,i),!op(t)||sp(t))return t;throw new kI("Can't convert object to primitive value")}return i===void 0&&(i="number"),PI(r,i)},AI=xI,RI=uo,Fl=function(r){var i=AI(r,"string");return RI(i)?i:i+""},DI=ye,lp=rt,ec=DI.document,MI=lp(ec)&&lp(ec.createElement),yf=function(r){return MI?ec.createElement(r):{}},NI=Ue,FI=se,BI=yf,k1=!NI&&!FI(function(){return Object.defineProperty(BI("div"),"a",{get:function(){return 7}}).a!==7}),LI=Ue,jI=Ge,zI=Dl,HI=Kn,WI=mr,VI=Fl,UI=je,GI=k1,up=Object.getOwnPropertyDescriptor;Gn.f=LI?up:function(i,e){if(i=WI(i),e=VI(e),GI)try{return up(i,e)}catch{}if(UI(i,e))return HI(!jI(zI.f,i,e),i[e])};var KI=se,qI=Oe,YI=/#|\.prototype\./,ho=function(r,i){var e=QI[XI(r)];return e===ZI?!0:e===JI?!1:qI(i)?KI(i):!!i},XI=ho.normalize=function(r){return String(r).replace(YI,".").toLowerCase()},QI=ho.data={},JI=ho.NATIVE="N",ZI=ho.POLYFILL="P",C1=ho,hp=$1,ek=It,tk=lo,rk=hp(hp.bind),dn=function(r,i){return ek(r),i===void 0?r:tk?rk(r,i):function(){return r.apply(i,arguments)}},Ct={},nk=Ue,ik=se,x1=nk&&ik(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),ak=rt,ok=String,sk=TypeError,Bt=function(r){if(ak(r))return r;throw new sk(ok(r)+" is not an object")},lk=Ue,uk=k1,hk=x1,is=Bt,dp=Fl,dk=TypeError,Gu=Object.defineProperty,ck=Object.getOwnPropertyDescriptor,Ku="enumerable",qu="configurable",Yu="writable";Ct.f=lk?hk?function(i,e,t){if(is(i),e=dp(e),is(t),typeof i=="function"&&e==="prototype"&&"value"in t&&Yu in t&&!t[Yu]){var n=ck(i,e);n&&n[Yu]&&(i[e]=t.value,t={configurable:qu in t?t[qu]:n[qu],enumerable:Ku in t?t[Ku]:n[Ku],writable:!1})}return Gu(i,e,t)}:Gu:function(i,e,t){if(is(i),e=dp(e),is(t),uk)try{return Gu(i,e,t)}catch{}if("get"in t||"set"in t)throw new dk("Accessors not supported");return"value"in t&&(i[e]=t.value),i};var fk=Ue,vk=Ct,pk=Kn,Fr=fk?function(r,i,e){return vk.f(r,i,pk(1,e))}:function(r,i,e){return r[i]=e,r},as=ye,gk=Xi,yk=$1,mk=Oe,bk=Gn.f,$k=C1,si=me,wk=dn,li=Fr,cp=je,_k=function(r){var i=function(e,t,n){if(this instanceof i){switch(arguments.length){case 0:return new r;case 1:return new r(e);case 2:return new r(e,t)}return new r(e,t,n)}return gk(r,this,arguments)};return i.prototype=r.prototype,i},V=function(r,i){var e=r.target,t=r.global,n=r.stat,a=r.proto,o=t?as:n?as[e]:(as[e]||{}).prototype,s=t?si:si[e]||li(si,e,{})[e],l=s.prototype,u,h,d,c,f,v,p,g,y;for(c in i)u=$k(t?c:e+(n?".":"#")+c,r.forced),h=!u&&o&&cp(o,c),v=s[c],h&&(r.dontCallGetSet?(y=bk(o,c),p=y&&y.value):p=o[c]),f=h&&p?p:i[c],!(h&&typeof v==typeof f)&&(r.bind&&h?g=wk(f,as):r.wrap&&h?g=_k(f):a&&mk(f)?g=yk(f):g=f,(r.sham||f&&f.sham||v&&v.sham)&&li(g,"sham",!0),li(s,c,g),a&&(d=e+"Prototype",cp(si,d)||li(si,d,{}),li(si[d],c,f),r.real&&l&&(u||!l[c])&&li(l,c,f)))},Ek=V,Sk=Ue,fp=Ct.f;Ek({target:"Object",stat:!0,forced:Object.defineProperty!==fp,sham:!Sk},{defineProperty:fp});var Ok=me,A1=Ok.Object,Tk=p1.exports=function(i,e,t){return A1.defineProperty(i,e,t)};A1.defineProperty.sham&&(Tk.sham=!0);var Pk=p1.exports,Ik=Pk,R1=Ik,kk=R1,Ck=kk,xk=Ck,Ak=xk,D1=Ak,Bl=K(D1),Rk=un,cn=Array.isArray||function(i){return Rk(i)==="Array"},Dk=Math.ceil,Mk=Math.floor,Nk=Math.trunc||function(i){var e=+i;return(e>0?Mk:Dk)(e)},Fk=Nk,Ll=function(r){var i=+r;return i!==i||i===0?0:Fk(i)},Bk=Ll,Lk=Math.min,jk=function(r){return r>0?Lk(Bk(r),9007199254740991):0},zk=jk,Lt=function(r){return zk(r.length)},Hk=TypeError,Wk=9007199254740991,jl=function(r){if(r>Wk)throw Hk("Maximum allowed index exceeded");return r},Vk=Fl,Uk=Ct,Gk=Kn,ra=function(r,i,e){var t=Vk(i);t in r?Uk.f(r,t,Gk(0,e)):r[t]=e},Kk=$e,qk=Kk("toStringTag"),M1={};M1[qk]="z";var mf=String(M1)==="[object z]",Yk=mf,Xk=Oe,zs=un,Qk=$e,Jk=Qk("toStringTag"),Zk=Object,eC=zs(function(){return arguments}())==="Arguments",tC=function(r,i){try{return r[i]}catch{}},Br=Yk?zs:function(r){var i,e,t;return r===void 0?"Undefined":r===null?"Null":typeof(e=tC(i=Zk(r),Jk))=="string"?e:eC?zs(i):(t=zs(i))==="Object"&&Xk(i.callee)?"Arguments":t},rC=ge,nC=Oe,tc=gf,iC=rC(Function.toString);nC(tc.inspectSource)||(tc.inspectSource=function(r){return iC(r)});var N1=tc.inspectSource,aC=ge,oC=se,F1=Oe,sC=Br,lC=yt,uC=N1,B1=function(){},hC=[],L1=lC("Reflect","construct"),bf=/^\s*(?:class|function)\b/,dC=aC(bf.exec),cC=!bf.test(B1),Ea=function(i){if(!F1(i))return!1;try{return L1(B1,hC,i),!0}catch{return!1}},j1=function(i){if(!F1(i))return!1;switch(sC(i)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return cC||!!dC(bf,uC(i))}catch{return!0}};j1.sham=!0;var zl=!L1||oC(function(){var r;return Ea(Ea.call)||!Ea(Object)||!Ea(function(){r=!0})||r})?j1:Ea,vp=cn,fC=zl,vC=rt,pC=$e,gC=pC("species"),pp=Array,yC=function(r){var i;return vp(r)&&(i=r.constructor,fC(i)&&(i===pp||vp(i.prototype))?i=void 0:vC(i)&&(i=i[gC],i===null&&(i=void 0))),i===void 0?pp:i},mC=yC,Hl=function(r,i){return new(mC(r))(i===0?0:i)},bC=se,$C=$e,wC=Ji,_C=$C("species"),co=function(r){return wC>=51||!bC(function(){var i=[],e=i.constructor={};return e[_C]=function(){return{foo:1}},i[r](Boolean).foo!==1})},EC=V,SC=se,OC=cn,TC=rt,PC=kt,IC=Lt,gp=jl,yp=ra,kC=Hl,CC=co,xC=$e,AC=Ji,z1=xC("isConcatSpreadable"),RC=AC>=51||!SC(function(){var r=[];return r[z1]=!1,r.concat()[0]!==r}),DC=function(r){if(!TC(r))return!1;var i=r[z1];return i!==void 0?!!i:OC(r)},MC=!RC||!CC("concat");EC({target:"Array",proto:!0,arity:1,forced:MC},{concat:function(i){var e=PC(this),t=kC(e,0),n=0,a,o,s,l,u;for(a=-1,s=arguments.length;a<s;a++)if(u=a===-1?e:arguments[a],DC(u))for(l=IC(u),gp(n+l),o=0;o<l;o++,n++)o in u&&yp(t,n,u[o]);else gp(n+1),yp(t,n++,u);return t.length=n,t}});var NC=Br,FC=String,qn=function(r){if(NC(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return FC(r)},Wl={},BC=Ll,LC=Math.max,jC=Math.min,Vl=function(r,i){var e=BC(r);return e<0?LC(e+i,0):jC(e,i)},zC=mr,HC=Vl,WC=Lt,mp=function(r){return function(i,e,t){var n=zC(i),a=WC(n),o=HC(t,a),s;if(r&&e!==e){for(;a>o;)if(s=n[o++],s!==s)return!0}else for(;a>o;o++)if((r||o in n)&&n[o]===e)return r||o||0;return!r&&-1}},VC={includes:mp(!0),indexOf:mp(!1)},fo={},UC=ge,Xu=je,GC=mr,KC=VC.indexOf,qC=fo,bp=UC([].push),H1=function(r,i){var e=GC(r),t=0,n=[],a;for(a in e)!Xu(qC,a)&&Xu(e,a)&&bp(n,a);for(;i.length>t;)Xu(e,a=i[t++])&&(~KC(n,a)||bp(n,a));return n},$f=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],YC=H1,XC=$f,Ul=Object.keys||function(i){return YC(i,XC)},QC=Ue,JC=x1,ZC=Ct,ex=Bt,tx=mr,rx=Ul;Wl.f=QC&&!JC?Object.defineProperties:function(i,e){ex(i);for(var t=tx(e),n=rx(e),a=n.length,o=0,s;a>o;)ZC.f(i,s=n[o++],t[s]);return i};var nx=yt,W1=nx("document","documentElement"),ix=ta,ax=Nl,$p=ix("keys"),Gl=function(r){return $p[r]||($p[r]=ax(r))},ox=Bt,sx=Wl,wp=$f,lx=fo,ux=W1,hx=yf,dx=Gl,_p=">",Ep="<",rc="prototype",nc="script",V1=dx("IE_PROTO"),Qu=function(){},U1=function(r){return Ep+nc+_p+r+Ep+"/"+nc+_p},Sp=function(r){r.write(U1("")),r.close();var i=r.parentWindow.Object;return r=null,i},cx=function(){var r=hx("iframe"),i="java"+nc+":",e;return r.style.display="none",ux.appendChild(r),r.src=String(i),e=r.contentWindow.document,e.open(),e.write(U1("document.F=Object")),e.close(),e.F},os,Hs=function(){try{os=new ActiveXObject("htmlfile")}catch{}Hs=typeof document<"u"?document.domain&&os?Sp(os):cx():Sp(os);for(var r=wp.length;r--;)delete Hs[rc][wp[r]];return Hs()};lx[V1]=!0;var Yn=Object.create||function(i,e){var t;return i!==null?(Qu[rc]=ox(i),t=new Qu,Qu[rc]=null,t[V1]=i):t=Hs(),e===void 0?t:sx.f(t,e)},vo={},fx=H1,vx=$f,px=vx.concat("length","prototype");vo.f=Object.getOwnPropertyNames||function(i){return fx(i,px)};var wf={},Op=Vl,gx=Lt,yx=ra,mx=Array,bx=Math.max,G1=function(r,i,e){for(var t=gx(r),n=Op(i,t),a=Op(e===void 0?t:e,t),o=mx(bx(a-n,0)),s=0;n<a;n++,s++)yx(o,s,r[n]);return o.length=s,o},$x=un,wx=mr,K1=vo.f,_x=G1,q1=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Ex=function(r){try{return K1(r)}catch{return _x(q1)}};wf.f=function(i){return q1&&$x(i)==="Window"?Ex(i):K1(wx(i))};var po={};po.f=Object.getOwnPropertySymbols;var Sx=Fr,na=function(r,i,e,t){return t&&t.enumerable?r[i]=e:Sx(r,i,e),r},Ox=Ct,_f=function(r,i,e){return Ox.f(r,i,e)},go={},Tx=$e;go.f=Tx;var Tp=me,Px=je,Ix=go,kx=Ct.f,Te=function(r){var i=Tp.Symbol||(Tp.Symbol={});Px(i,r)||kx(i,r,{value:Ix.f(r)})},Cx=Ge,xx=yt,Ax=$e,Rx=na,Y1=function(){var r=xx("Symbol"),i=r&&r.prototype,e=i&&i.valueOf,t=Ax("toPrimitive");i&&!i[t]&&Rx(i,t,function(n){return Cx(e,this)},{arity:1})},Dx=mf,Mx=Br,Nx=Dx?{}.toString:function(){return"[object "+Mx(this)+"]"},Fx=mf,Bx=Ct.f,Lx=Fr,jx=je,zx=Nx,Hx=$e,Pp=Hx("toStringTag"),Xn=function(r,i,e,t){if(r){var n=e?r:r.prototype;jx(n,Pp)||Bx(n,Pp,{configurable:!0,value:i}),t&&!Fx&&Lx(n,"toString",zx)}},Wx=ye,Vx=Oe,Ip=Wx.WeakMap,Ux=Vx(Ip)&&/native code/.test(String(Ip)),Gx=Ux,X1=ye,Kx=rt,qx=Fr,Ju=je,Zu=gf,Yx=Gl,Xx=fo,kp="Object already initialized",ic=X1.TypeError,Qx=X1.WeakMap,sl,Ua,ll,Jx=function(r){return ll(r)?Ua(r):sl(r,{})},Zx=function(r){return function(i){var e;if(!Kx(i)||(e=Ua(i)).type!==r)throw new ic("Incompatible receiver, "+r+" required");return e}};if(Gx||Zu.state){var sr=Zu.state||(Zu.state=new Qx);sr.get=sr.get,sr.has=sr.has,sr.set=sr.set,sl=function(r,i){if(sr.has(r))throw new ic(kp);return i.facade=r,sr.set(r,i),i},Ua=function(r){return sr.get(r)||{}},ll=function(r){return sr.has(r)}}else{var ui=Yx("state");Xx[ui]=!0,sl=function(r,i){if(Ju(r,ui))throw new ic(kp);return i.facade=r,qx(r,ui,i),i},Ua=function(r){return Ju(r,ui)?r[ui]:{}},ll=function(r){return Ju(r,ui)}}var ia={set:sl,get:Ua,has:ll,enforce:Jx,getterFor:Zx},eA=dn,tA=ge,rA=Ml,nA=kt,iA=Lt,aA=Hl,Cp=tA([].push),zr=function(r){var i=r===1,e=r===2,t=r===3,n=r===4,a=r===6,o=r===7,s=r===5||a;return function(l,u,h,d){for(var c=nA(l),f=rA(c),v=eA(u,h),p=iA(f),g=0,y=d||aA,m=i?y(l,p):e||o?y(l,0):void 0,w,b;p>g;g++)if((s||g in f)&&(w=f[g],b=v(w,g,c),r))if(i)m[g]=b;else if(b)switch(r){case 3:return!0;case 5:return w;case 6:return g;case 2:Cp(m,w)}else switch(r){case 4:return!1;case 7:Cp(m,w)}return a?-1:t||n?n:m}},aa={forEach:zr(0),map:zr(1),filter:zr(2),some:zr(3),every:zr(4),find:zr(5),findIndex:zr(6),filterReject:zr(7)},Kl=V,yo=ye,Ef=Ge,oA=ge,Mi=Ue,Ni=Zi,sA=se,We=je,lA=Le,ac=Bt,ql=mr,Sf=Fl,uA=qn,oc=Kn,Ga=Yn,Q1=Ul,hA=vo,J1=wf,dA=po,Z1=Gn,ew=Ct,cA=Wl,tw=Dl,xp=na,fA=_f,Of=ta,vA=Gl,rw=fo,Ap=Nl,pA=$e,gA=go,yA=Te,mA=Y1,bA=Xn,nw=ia,Yl=aa.forEach,_t=vA("hidden"),Xl="Symbol",Ka="prototype",$A=nw.set,Rp=nw.getterFor(Xl),nr=Object[Ka],Pn=yo.Symbol,Ca=Pn&&Pn[Ka],wA=yo.RangeError,_A=yo.TypeError,eh=yo.QObject,iw=Z1.f,In=ew.f,aw=J1.f,EA=tw.f,ow=oA([].push),Rr=Of("symbols"),mo=Of("op-symbols"),SA=Of("wks"),sc=!eh||!eh[Ka]||!eh[Ka].findChild,sw=function(r,i,e){var t=iw(nr,i);t&&delete nr[i],In(r,i,e),t&&r!==nr&&In(nr,i,t)},lc=Mi&&sA(function(){return Ga(In({},"a",{get:function(){return In(this,"a",{value:7}).a}})).a!==7})?sw:In,th=function(r,i){var e=Rr[r]=Ga(Ca);return $A(e,{type:Xl,tag:r,description:i}),Mi||(e.description=i),e},Ql=function(i,e,t){i===nr&&Ql(mo,e,t),ac(i);var n=Sf(e);return ac(t),We(Rr,n)?(t.enumerable?(We(i,_t)&&i[_t][n]&&(i[_t][n]=!1),t=Ga(t,{enumerable:oc(0,!1)})):(We(i,_t)||In(i,_t,oc(1,{})),i[_t][n]=!0),lc(i,n,t)):In(i,n,t)},Tf=function(i,e){ac(i);var t=ql(e),n=Q1(t).concat(dw(t));return Yl(n,function(a){(!Mi||Ef(lw,t,a))&&Ql(i,a,t[a])}),i},OA=function(i,e){return e===void 0?Ga(i):Tf(Ga(i),e)},lw=function(i){var e=Sf(i),t=Ef(EA,this,e);return this===nr&&We(Rr,e)&&!We(mo,e)?!1:t||!We(this,e)||!We(Rr,e)||We(this,_t)&&this[_t][e]?t:!0},uw=function(i,e){var t=ql(i),n=Sf(e);if(!(t===nr&&We(Rr,n)&&!We(mo,n))){var a=iw(t,n);return a&&We(Rr,n)&&!(We(t,_t)&&t[_t][n])&&(a.enumerable=!0),a}},hw=function(i){var e=aw(ql(i)),t=[];return Yl(e,function(n){!We(Rr,n)&&!We(rw,n)&&ow(t,n)}),t},dw=function(r){var i=r===nr,e=aw(i?mo:ql(r)),t=[];return Yl(e,function(n){We(Rr,n)&&(!i||We(nr,n))&&ow(t,Rr[n])}),t};Ni||(Pn=function(){if(lA(Ca,this))throw new _A("Symbol is not a constructor");var i=!arguments.length||arguments[0]===void 0?void 0:uA(arguments[0]),e=Ap(i),t=function(n){var a=this===void 0?yo:this;a===nr&&Ef(t,mo,n),We(a,_t)&&We(a[_t],e)&&(a[_t][e]=!1);var o=oc(1,n);try{lc(a,e,o)}catch(s){if(!(s instanceof wA))throw s;sw(a,e,o)}};return Mi&&sc&&lc(nr,e,{configurable:!0,set:t}),th(e,i)},Ca=Pn[Ka],xp(Ca,"toString",function(){return Rp(this).tag}),xp(Pn,"withoutSetter",function(r){return th(Ap(r),r)}),tw.f=lw,ew.f=Ql,cA.f=Tf,Z1.f=uw,hA.f=J1.f=hw,dA.f=dw,gA.f=function(r){return th(pA(r),r)},Mi&&fA(Ca,"description",{configurable:!0,get:function(){return Rp(this).description}}));Kl({global:!0,constructor:!0,wrap:!0,forced:!Ni,sham:!Ni},{Symbol:Pn});Yl(Q1(SA),function(r){yA(r)});Kl({target:Xl,stat:!0,forced:!Ni},{useSetter:function(){sc=!0},useSimple:function(){sc=!1}});Kl({target:"Object",stat:!0,forced:!Ni,sham:!Mi},{create:OA,defineProperty:Ql,defineProperties:Tf,getOwnPropertyDescriptor:uw});Kl({target:"Object",stat:!0,forced:!Ni},{getOwnPropertyNames:hw});mA();bA(Pn,Xl);rw[_t]=!0;var TA=Zi,cw=TA&&!!Symbol.for&&!!Symbol.keyFor,PA=V,IA=yt,kA=je,CA=qn,fw=ta,xA=cw,rh=fw("string-to-symbol-registry"),AA=fw("symbol-to-string-registry");PA({target:"Symbol",stat:!0,forced:!xA},{for:function(r){var i=CA(r);if(kA(rh,i))return rh[i];var e=IA("Symbol")(i);return rh[i]=e,AA[e]=i,e}});var RA=V,DA=je,MA=uo,NA=ea,FA=ta,BA=cw,Dp=FA("symbol-to-string-registry");RA({target:"Symbol",stat:!0,forced:!BA},{keyFor:function(i){if(!MA(i))throw new TypeError(NA(i)+" is not a symbol");if(DA(Dp,i))return Dp[i]}});var LA=ge,bo=LA([].slice),jA=ge,Mp=cn,zA=Oe,Np=un,HA=qn,Fp=jA([].push),WA=function(r){if(zA(r))return r;if(Mp(r)){for(var i=r.length,e=[],t=0;t<i;t++){var n=r[t];typeof n=="string"?Fp(e,n):(typeof n=="number"||Np(n)==="Number"||Np(n)==="String")&&Fp(e,HA(n))}var a=e.length,o=!0;return function(s,l){if(o)return o=!1,l;if(Mp(this))return l;for(var u=0;u<a;u++)if(e[u]===s)return l}}},VA=V,vw=yt,pw=Xi,UA=Ge,$o=ge,gw=se,Bp=Oe,Lp=uo,yw=bo,GA=WA,KA=Zi,qA=String,Qr=vw("JSON","stringify"),ss=$o(/./.exec),jp=$o("".charAt),YA=$o("".charCodeAt),XA=$o("".replace),QA=$o(1 .toString),JA=/[\uD800-\uDFFF]/g,zp=/^[\uD800-\uDBFF]$/,Hp=/^[\uDC00-\uDFFF]$/,Wp=!KA||gw(function(){var r=vw("Symbol")("stringify detection");return Qr([r])!=="[null]"||Qr({a:r})!=="{}"||Qr(Object(r))!=="{}"}),Vp=gw(function(){return Qr("\uDF06\uD834")!=='"\\udf06\\ud834"'||Qr("\uDEAD")!=='"\\udead"'}),ZA=function(r,i){var e=yw(arguments),t=GA(i);if(!(!Bp(t)&&(r===void 0||Lp(r))))return e[1]=function(n,a){if(Bp(t)&&(a=UA(t,this,qA(n),a)),!Lp(a))return a},pw(Qr,null,e)},eR=function(r,i,e){var t=jp(e,i-1),n=jp(e,i+1);return ss(zp,r)&&!ss(Hp,n)||ss(Hp,r)&&!ss(zp,t)?"\\u"+QA(YA(r,0),16):r};Qr&&VA({target:"JSON",stat:!0,arity:3,forced:Wp||Vp},{stringify:function(i,e,t){var n=yw(arguments),a=pw(Wp?ZA:Qr,null,n);return Vp&&typeof a=="string"?XA(a,JA,eR):a}});var tR=V,rR=Zi,nR=se,mw=po,iR=kt,aR=!rR||nR(function(){mw.f(1)});tR({target:"Object",stat:!0,forced:aR},{getOwnPropertySymbols:function(i){var e=mw.f;return e?e(iR(i)):[]}});var oR=Te;oR("asyncIterator");var sR=Te;sR("hasInstance");var lR=Te;lR("isConcatSpreadable");var uR=Te;uR("iterator");var hR=Te;hR("match");var dR=Te;dR("matchAll");var cR=Te;cR("replace");var fR=Te;fR("search");var vR=Te;vR("species");var pR=Te;pR("split");var gR=Te,yR=Y1;gR("toPrimitive");yR();var mR=yt,bR=Te,$R=Xn;bR("toStringTag");$R(mR("Symbol"),"Symbol");var wR=Te;wR("unscopables");var _R=ye,ER=Xn;ER(_R.JSON,"JSON",!0);var SR=me,OR=SR.Symbol,oa={},uc=Ue,TR=je,bw=Function.prototype,PR=uc&&Object.getOwnPropertyDescriptor,Pf=TR(bw,"name"),IR=Pf&&function(){}.name==="something",kR=Pf&&(!uc||uc&&PR(bw,"name").configurable),CR={EXISTS:Pf,PROPER:IR,CONFIGURABLE:kR},xR=se,$w=!xR(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),AR=je,RR=Oe,DR=kt,MR=Gl,NR=$w,Up=MR("IE_PROTO"),hc=Object,FR=hc.prototype,Jl=NR?hc.getPrototypeOf:function(r){var i=DR(r);if(AR(i,Up))return i[Up];var e=i.constructor;return RR(e)&&i instanceof e?e.prototype:i instanceof hc?FR:null},BR=se,LR=Oe,jR=rt,zR=Yn,Gp=Jl,HR=na,WR=$e,dc=WR("iterator"),ww=!1,Sr,nh,ih;[].keys&&(ih=[].keys(),"next"in ih?(nh=Gp(Gp(ih)),nh!==Object.prototype&&(Sr=nh)):ww=!0);var VR=!jR(Sr)||BR(function(){var r={};return Sr[dc].call(r)!==r});VR?Sr={}:Sr=zR(Sr);LR(Sr[dc])||HR(Sr,dc,function(){return this});var _w={IteratorPrototype:Sr,BUGGY_SAFARI_ITERATORS:ww},UR=_w.IteratorPrototype,GR=Yn,KR=Kn,qR=Xn,YR=oa,XR=function(){return this},QR=function(r,i,e,t){var n=i+" Iterator";return r.prototype=GR(UR,{next:KR(+!t,e)}),qR(r,n,!1,!0),YR[n]=XR,r},JR=ge,ZR=It,eD=function(r,i,e){try{return JR(ZR(Object.getOwnPropertyDescriptor(r,i)[e]))}catch{}},tD=Oe,rD=String,nD=TypeError,iD=function(r){if(typeof r=="object"||tD(r))return r;throw new nD("Can't set "+rD(r)+" as a prototype")},aD=eD,oD=Bt,sD=iD,Ew=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,i={},e;try{e=aD(Object.prototype,"__proto__","set"),e(i,[]),r=i instanceof Array}catch{}return function(n,a){return oD(n),sD(a),r?e(n,a):n.__proto__=a,n}}():void 0),lD=V,uD=Ge,hD=CR,dD=QR,cD=Jl,fD=Xn,Kp=na,vD=$e,qp=oa,pD=_w,gD=hD.PROPER,ls=pD.BUGGY_SAFARI_ITERATORS,ah=vD("iterator"),Yp="keys",us="values",Xp="entries",yD=function(){return this},If=function(r,i,e,t,n,a,o){dD(e,i,t);var s=function(y){if(y===n&&c)return c;if(!ls&&y&&y in h)return h[y];switch(y){case Yp:return function(){return new e(this,y)};case us:return function(){return new e(this,y)};case Xp:return function(){return new e(this,y)}}return function(){return new e(this)}},l=i+" Iterator",u=!1,h=r.prototype,d=h[ah]||h["@@iterator"]||n&&h[n],c=!ls&&d||s(n),f=i==="Array"&&h.entries||d,v,p,g;if(f&&(v=cD(f.call(new r)),v!==Object.prototype&&v.next&&(fD(v,l,!0,!0),qp[l]=yD)),gD&&n===us&&d&&d.name!==us&&(u=!0,c=function(){return uD(d,this)}),n)if(p={values:s(us),keys:a?c:s(Yp),entries:s(Xp)},o)for(g in p)(ls||u||!(g in h))&&Kp(h,g,p[g]);else lD({target:i,proto:!0,forced:ls||u},p);return o&&h[ah]!==c&&Kp(h,ah,c,{name:n}),qp[i]=c,p},kf=function(r,i){return{value:r,done:i}},mD=mr,Qp=oa,Sw=ia;Ct.f;var bD=If,hs=kf,Ow="Array Iterator",$D=Sw.set,wD=Sw.getterFor(Ow);bD(Array,"Array",function(r,i){$D(this,{type:Ow,target:mD(r),index:0,kind:i})},function(){var r=wD(this),i=r.target,e=r.index++;if(!i||e>=i.length)return r.target=void 0,hs(void 0,!0);switch(r.kind){case"keys":return hs(e,!1);case"values":return hs(i[e],!1)}return hs([e,i[e]],!1)},"values");Qp.Arguments=Qp.Array;var _D={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},ED=_D,SD=ye,OD=Br,TD=Fr,Jp=oa,PD=$e,Zp=PD("toStringTag");for(var oh in ED){var eg=SD[oh],sh=eg&&eg.prototype;sh&&OD(sh)!==Zp&&TD(sh,Zp,oh),Jp[oh]=Jp.Array}var ID=OR,Tw=ID,kD=$e,CD=Ct.f,tg=kD("metadata"),rg=Function.prototype;rg[tg]===void 0&&CD(rg,tg,{value:null});var xD=Te;xD("asyncDispose");var AD=Te;AD("dispose");var RD=Te;RD("metadata");var DD=Tw,MD=DD,ND=yt,FD=ge,Cf=ND("Symbol"),BD=Cf.keyFor,LD=FD(Cf.prototype.valueOf),Pw=Cf.isRegisteredSymbol||function(i){try{return BD(LD(i))!==void 0}catch{return!1}},jD=V,zD=Pw;jD({target:"Symbol",stat:!0},{isRegisteredSymbol:zD});var HD=ta,Iw=yt,WD=ge,VD=uo,UD=$e,ul=Iw("Symbol"),ng=ul.isWellKnownSymbol,kw=Iw("Object","getOwnPropertyNames"),GD=WD(ul.prototype.valueOf),ig=HD("wks");for(var lh=0,ag=kw(ul),KD=ag.length;lh<KD;lh++)try{var og=ag[lh];VD(ul[og])&&UD(og)}catch{}var Cw=function(i){if(ng&&ng(i))return!0;try{for(var e=GD(i),t=0,n=kw(ig),a=n.length;t<a;t++)if(ig[n[t]]==e)return!0}catch{}return!1},qD=V,YD=Cw;qD({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:YD});var XD=Te;XD("matcher");var QD=Te;QD("observable");var JD=V,ZD=Pw;JD({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:ZD});var eM=V,tM=Cw;eM({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:tM});var rM=Te;rM("metadataKey");var nM=Te;nM("patternMatch");var iM=Te;iM("replaceAll");var aM=MD,oM=aM,xf=oM,wi=K(xf),Af=ge,sM=Ll,lM=qn,uM=vf,hM=Af("".charAt),sg=Af("".charCodeAt),dM=Af("".slice),lg=function(r){return function(i,e){var t=lM(uM(i)),n=sM(e),a=t.length,o,s;return n<0||n>=a?r?"":void 0:(o=sg(t,n),o<55296||o>56319||n+1===a||(s=sg(t,n+1))<56320||s>57343?r?hM(t,n):o:r?dM(t,n,n+2):(o-55296<<10)+(s-56320)+65536)}},cM={codeAt:lg(!1),charAt:lg(!0)},fM=cM.charAt,vM=qn,xw=ia,pM=If,ug=kf,Aw="String Iterator",gM=xw.set,yM=xw.getterFor(Aw);pM(String,"String",function(r){gM(this,{type:Aw,string:vM(r),index:0})},function(){var i=yM(this),e=i.string,t=i.index,n;return t>=e.length?ug(void 0,!0):(n=fM(e,t),i.index+=n.length,ug(n,!1))});var mM=go,bM=mM.f("iterator"),$M=bM,Rw=$M,wM=Rw,_M=wM,EM=_M,SM=EM,Dw=SM,OM=K(Dw);function Fi(r){"@babel/helpers - typeof";return Fi=typeof wi=="function"&&typeof OM=="symbol"?function(i){return typeof i}:function(i){return i&&typeof wi=="function"&&i.constructor===wi&&i!==wi.prototype?"symbol":typeof i},Fi(r)}var TM=go,PM=TM.f("toPrimitive"),IM=PM,kM=IM,CM=kM,xM=CM,AM=xM,RM=AM,DM=RM,MM=K(DM);function NM(r,i){if(Fi(r)!=="object"||r===null)return r;var e=r[MM];if(e!==void 0){var t=e.call(r,i||"default");if(Fi(t)!=="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}function Mw(r){var i=NM(r,"string");return Fi(i)==="symbol"?i:String(i)}function hg(r,i){for(var e=0;e<i.length;e++){var t=i[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Bl(r,Mw(t.key),t)}}function Zl(r,i,e){return i&&hg(r.prototype,i),e&&hg(r,e),Bl(r,"prototype",{writable:!1}),r}function Jr(r,i,e){return i=Mw(i),i in r?Bl(r,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[i]=e,r}var Nw=ge,FM=It,BM=rt,LM=je,dg=bo,jM=lo,Fw=Function,zM=Nw([].concat),HM=Nw([].join),uh={},WM=function(r,i,e){if(!LM(uh,i)){for(var t=[],n=0;n<i;n++)t[n]="a["+n+"]";uh[i]=Fw("C,a","return new C("+HM(t,",")+")")}return uh[i](r,e)},Bw=jM?Fw.bind:function(i){var e=FM(this),t=e.prototype,n=dg(arguments,1),a=function(){var s=zM(n,dg(arguments));return this instanceof a?WM(e,s.length,s):e.apply(i,s)};return BM(t)&&(a.prototype=t),a},VM=V,cg=Bw;VM({target:"Function",proto:!0,forced:Function.bind!==cg},{bind:cg});var UM=ye,GM=me,ut=function(r,i){var e=GM[r+"Prototype"],t=e&&e[i];if(t)return t;var n=UM[r],a=n&&n.prototype;return a&&a[i]},KM=ut,qM=KM("Function","bind"),YM=Le,XM=qM,hh=Function.prototype,QM=function(r){var i=r.bind;return r===hh||YM(hh,r)&&i===hh.bind?XM:i},JM=QM,Lw=JM,ZM=Lw,jw=K(ZM),e2=It,t2=kt,r2=Ml,n2=Lt,i2=TypeError,fg=function(r){return function(i,e,t,n){e2(e);var a=t2(i),o=r2(a),s=n2(a),l=r?s-1:0,u=r?-1:1;if(t<2)for(;;){if(l in o){n=o[l],l+=u;break}if(l+=u,r?l<0:s<=l)throw new i2("Reduce of empty array with no initial value")}for(;r?l>=0:s>l;l+=u)l in o&&(n=e(n,o[l],l,a));return n}},a2={left:fg(!1),right:fg(!0)},o2=se,eu=function(r,i){var e=[][r];return!!e&&o2(function(){e.call(null,i||function(){return 1},1)})},s2=ye,l2=un,wo=l2(s2.process)==="process",u2=V,h2=a2.left,d2=eu,vg=Ji,c2=wo,f2=!c2&&vg>79&&vg<83,v2=f2||!d2("reduce");u2({target:"Array",proto:!0,forced:v2},{reduce:function(i){var e=arguments.length;return h2(this,i,e,e>1?arguments[1]:void 0)}});var p2=ut,g2=p2("Array","reduce"),y2=Le,m2=g2,dh=Array.prototype,b2=function(r){var i=r.reduce;return r===dh||y2(dh,r)&&i===dh.reduce?m2:i},$2=b2,w2=$2,_2=w2,E2=K(_2),S2=V,O2=aa.filter,T2=co,P2=T2("filter");S2({target:"Array",proto:!0,forced:!P2},{filter:function(i){return O2(this,i,arguments.length>1?arguments[1]:void 0)}});var I2=ut,k2=I2("Array","filter"),C2=Le,x2=k2,ch=Array.prototype,A2=function(r){var i=r.filter;return r===ch||C2(ch,r)&&i===ch.filter?x2:i},R2=A2,D2=R2,M2=D2,_i=K(M2),N2=V,F2=aa.map,B2=co,L2=B2("map");N2({target:"Array",proto:!0,forced:!L2},{map:function(i){return F2(this,i,arguments.length>1?arguments[1]:void 0)}});var j2=ut,z2=j2("Array","map"),H2=Le,W2=z2,fh=Array.prototype,V2=function(r){var i=r.map;return r===fh||H2(fh,r)&&i===fh.map?W2:i},U2=V2,G2=U2,K2=G2,Zt=K(K2),q2=cn,Y2=Lt,X2=jl,Q2=dn,zw=function(r,i,e,t,n,a,o,s){for(var l=n,u=0,h=o?Q2(o,s):!1,d,c;u<t;)u in e&&(d=h?h(e[u],u,i):e[u],a>0&&q2(d)?(c=Y2(d),l=zw(r,i,d,c,l,a-1)-1):(X2(l+1),r[l]=d),l++),u++;return l},J2=zw,Z2=V,eN=J2,tN=It,rN=kt,nN=Lt,iN=Hl;Z2({target:"Array",proto:!0},{flatMap:function(i){var e=rN(this),t=nN(e),n;return tN(i),n=iN(e,0),n.length=eN(n,e,e,t,0,1,i,arguments.length>1?arguments[1]:void 0),n}});var aN=ut;aN("Array","flatMap");var oN=Ge,pg=Bt,sN=pf,Hw=function(r,i,e){var t,n;pg(r);try{if(t=sN(r,"return"),!t){if(i==="throw")throw e;return e}t=oN(t,r)}catch(a){n=!0,t=a}if(i==="throw")throw e;if(n)throw t;return pg(t),e},lN=Bt,uN=Hw,hN=function(r,i,e,t){try{return t?i(lN(e)[0],e[1]):i(e)}catch(n){uN(r,"throw",n)}},dN=$e,cN=oa,fN=dN("iterator"),vN=Array.prototype,Ww=function(r){return r!==void 0&&(cN.Array===r||vN[fN]===r)},pN=Br,gg=pf,gN=Qi,yN=oa,mN=$e,bN=mN("iterator"),tu=function(r){if(!gN(r))return gg(r,bN)||gg(r,"@@iterator")||yN[pN(r)]},$N=Ge,wN=It,_N=Bt,EN=ea,SN=tu,ON=TypeError,Rf=function(r,i){var e=arguments.length<2?SN(r):i;if(wN(e))return _N($N(e,r));throw new ON(EN(r)+" is not iterable")},TN=dn,PN=Ge,IN=kt,kN=hN,CN=Ww,xN=zl,AN=Lt,yg=ra,RN=Rf,DN=tu,mg=Array,MN=function(i){var e=IN(i),t=xN(this),n=arguments.length,a=n>1?arguments[1]:void 0,o=a!==void 0;o&&(a=TN(a,n>2?arguments[2]:void 0));var s=DN(e),l=0,u,h,d,c,f,v;if(s&&!(this===mg&&CN(s)))for(c=RN(e,s),f=c.next,h=t?new this:[];!(d=PN(f,c)).done;l++)v=o?kN(c,a,[d.value,l],!0):d.value,yg(h,l,v);else for(u=AN(e),h=t?new this(u):mg(u);u>l;l++)v=o?a(e[l],l):e[l],yg(h,l,v);return h.length=l,h},NN=$e,Vw=NN("iterator"),Uw=!1;try{var FN=0,bg={next:function(){return{done:!!FN++}},return:function(){Uw=!0}};bg[Vw]=function(){return this},Array.from(bg,function(){throw 2})}catch{}var Gw=function(r,i){try{if(!i&&!Uw)return!1}catch{return!1}var e=!1;try{var t={};t[Vw]=function(){return{next:function(){return{done:e=!0}}}},r(t)}catch{}return e},BN=V,LN=MN,jN=Gw,zN=!jN(function(r){Array.from(r)});BN({target:"Array",stat:!0,forced:zN},{from:LN});var HN=me,WN=HN.Array.from,VN=WN,Kw=VN,UN=Kw,Df=K(UN),GN=tu,KN=GN,qN=KN,YN=qN,XN=YN,QN=XN,JN=QN,ZN=JN,qw=ZN,Yw=K(qw),eF=qw,Mf=K(eF),tF=V,rF=cn;tF({target:"Array",stat:!0},{isArray:rF});var nF=me,iF=nF.Array.isArray,aF=iF,Xw=aF,oF=Xw,sF=oF,lF=sF,uF=lF,hF=uF,Qw=K(hF);function dF(r){if(Qw(r))return r}var cF=Ue,fF=cn,vF=TypeError,pF=Object.getOwnPropertyDescriptor,gF=cF&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(r){return r instanceof TypeError}}(),Jw=gF?function(r,i){if(fF(r)&&!pF(r,"length").writable)throw new vF("Cannot set read only .length");return r.length=i}:function(r,i){return r.length=i},yF=V,mF=kt,bF=Lt,$F=Jw,wF=jl,_F=se,EF=_F(function(){return[].push.call({length:4294967296},1)!==4294967297}),SF=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(r){return r instanceof TypeError}},OF=EF||!SF();yF({target:"Array",proto:!0,arity:1,forced:OF},{push:function(i){var e=mF(this),t=bF(e),n=arguments.length;wF(t+n);for(var a=0;a<n;a++)e[t]=arguments[a],t++;return $F(e,t),t}});var TF=ut,PF=TF("Array","push"),IF=Le,kF=PF,vh=Array.prototype,CF=function(r){var i=r.push;return r===vh||IF(vh,r)&&i===vh.push?kF:i},xF=CF,AF=xF,RF=AF,DF=RF,MF=DF,NF=MF,Zw=NF,FF=K(Zw);function BF(r,i){var e=r==null?null:typeof wi<"u"&&Yw(r)||r["@@iterator"];if(e!=null){var t,n,a,o,s=[],l=!0,u=!1;try{if(a=(e=e.call(r)).next,i===0){if(Object(e)!==e)return;l=!1}else for(;!(l=(t=a.call(e)).done)&&(FF(s).call(s,t.value),s.length!==i);l=!0);}catch(h){u=!0,n=h}finally{try{if(!l&&e.return!=null&&(o=e.return(),Object(o)!==o))return}finally{if(u)throw n}}return s}}var LF=V,$g=cn,jF=zl,zF=rt,wg=Vl,HF=Lt,WF=mr,VF=ra,UF=$e,GF=co,KF=bo,qF=GF("slice"),YF=UF("species"),ph=Array,XF=Math.max;LF({target:"Array",proto:!0,forced:!qF},{slice:function(i,e){var t=WF(this),n=HF(t),a=wg(i,n),o=wg(e===void 0?n:e,n),s,l,u;if($g(t)&&(s=t.constructor,jF(s)&&(s===ph||$g(s.prototype))?s=void 0:zF(s)&&(s=s[YF],s===null&&(s=void 0)),s===ph||s===void 0))return KF(t,a,o);for(l=new(s===void 0?ph:s)(XF(o-a,0)),u=0;a<o;a++,u++)a in t&&VF(l,u,t[a]);return l.length=u,l}});var QF=ut,JF=QF("Array","slice"),ZF=Le,eB=JF,gh=Array.prototype,tB=function(r){var i=r.slice;return r===gh||ZF(gh,r)&&i===gh.slice?eB:i},rB=tB,e_=rB,nB=e_,iB=nB,aB=iB,oB=aB,t_=oB,sB=K(t_),lB=Kw,uB=lB,hB=uB,dB=hB,cB=dB,r_=K(cB);function cc(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}function n_(r,i){var e;if(r){if(typeof r=="string")return cc(r,i);var t=sB(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return r_(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return cc(r,i)}}function fB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
26
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bt(r,i){return dF(r)||BF(r,i)||n_(r,i)||fB()}function vB(r){if(Qw(r))return cc(r)}function pB(r){if(typeof wi<"u"&&Yw(r)!=null||r["@@iterator"]!=null)return r_(r)}function gB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
27
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Et(r){return vB(r)||pB(r)||n_(r)||gB()}var yB=Tw,ru=K(yB),mB=ut,bB=mB("Array","concat"),$B=Le,wB=bB,yh=Array.prototype,_B=function(r){var i=r.concat;return r===yh||$B(yh,r)&&i===yh.concat?wB:i},EB=_B,SB=EB,OB=SB,nu=K(OB),TB=e_,iu=K(TB),PB=yt,IB=ge,kB=vo,CB=po,xB=Bt,AB=IB([].concat),Nf=PB("Reflect","ownKeys")||function(i){var e=kB.f(xB(i)),t=CB.f;return t?AB(e,t(i)):e},RB=V,DB=Nf;RB({target:"Reflect",stat:!0},{ownKeys:DB});var MB=me,NB=MB.Reflect.ownKeys,FB=NB,BB=FB,LB=BB,jB=K(LB),zB=Xw,Nt=K(zB),HB=V,WB=kt,i_=Ul,VB=se,UB=VB(function(){i_(1)});HB({target:"Object",stat:!0,forced:UB},{keys:function(i){return i_(WB(i))}});var GB=me,KB=GB.Object.keys,qB=KB,YB=qB,XB=YB,Ff=K(XB),QB=aa.forEach,JB=eu,ZB=JB("forEach"),eL=ZB?[].forEach:function(i){return QB(this,i,arguments.length>1?arguments[1]:void 0)},tL=V,_g=eL;tL({target:"Array",proto:!0,forced:[].forEach!==_g},{forEach:_g});var rL=ut,nL=rL("Array","forEach"),iL=nL,aL=iL,oL=Br,sL=je,lL=Le,uL=aL,mh=Array.prototype,hL={DOMTokenList:!0,NodeList:!0},a_=function(r){var i=r.forEach;return r===mh||lL(mh,r)&&i===mh.forEach||sL(hL,oL(r))?uL:i},dL=a_,Fn=K(dL),cL=V,fL=ge,vL=cn,pL=fL([].reverse),Eg=[1,2];cL({target:"Array",proto:!0,forced:String(Eg)===String(Eg.reverse())},{reverse:function(){return vL(this)&&(this.length=this.length),pL(this)}});var gL=ut,yL=gL("Array","reverse"),mL=Le,bL=yL,bh=Array.prototype,$L=function(r){var i=r.reverse;return r===bh||mL(bh,r)&&i===bh.reverse?bL:i},wL=$L,o_=wL,_L=o_,EL=K(_L),Sg=ea,SL=TypeError,s_=function(r,i){if(!delete r[i])throw new SL("Cannot delete property "+Sg(i)+" of "+Sg(r))},OL=V,TL=kt,PL=Vl,IL=Ll,kL=Lt,CL=Jw,xL=jl,AL=Hl,RL=ra,$h=s_,DL=co,ML=DL("splice"),NL=Math.max,FL=Math.min;OL({target:"Array",proto:!0,forced:!ML},{splice:function(i,e){var t=TL(this),n=kL(t),a=PL(i,n),o=arguments.length,s,l,u,h,d,c;for(o===0?s=l=0:o===1?(s=0,l=n-a):(s=o-2,l=FL(NL(IL(e),0),n-a)),xL(n+s-l),u=AL(t,l),h=0;h<l;h++)d=a+h,d in t&&RL(u,h,t[d]);if(u.length=l,s<l){for(h=a;h<n-l;h++)d=h+l,c=h+s,d in t?t[c]=t[d]:$h(t,c);for(h=n;h>n-l+s;h--)$h(t,h-1)}else if(s>l)for(h=n-l;h>a;h--)d=h+l-1,c=h+s-1,d in t?t[c]=t[d]:$h(t,c);for(h=0;h<s;h++)t[h+a]=arguments[h+2];return CL(t,n-l+s),u}});var BL=ut,LL=BL("Array","splice"),jL=Le,zL=LL,wh=Array.prototype,HL=function(r){var i=r.splice;return r===wh||jL(wh,r)&&i===wh.splice?zL:i},WL=HL,VL=WL,UL=VL,l_=K(UL),Og=Ue,GL=ge,KL=Ge,qL=se,_h=Ul,YL=po,XL=Dl,QL=kt,JL=Ml,hi=Object.assign,Tg=Object.defineProperty,ZL=GL([].concat),ej=!hi||qL(function(){if(Og&&hi({b:1},hi(Tg({},"a",{enumerable:!0,get:function(){Tg(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var r={},i={},e=Symbol("assign detection"),t="abcdefghijklmnopqrst";return r[e]=7,t.split("").forEach(function(n){i[n]=n}),hi({},r)[e]!==7||_h(hi({},i)).join("")!==t})?function(i,e){for(var t=QL(i),n=arguments.length,a=1,o=YL.f,s=XL.f;n>a;)for(var l=JL(arguments[a++]),u=o?ZL(_h(l),o(l)):_h(l),h=u.length,d=0,c;h>d;)c=u[d++],(!Og||KL(s,l,c))&&(t[c]=l[c]);return t}:hi,tj=V,Pg=ej;tj({target:"Object",stat:!0,arity:2,forced:Object.assign!==Pg},{assign:Pg});var rj=me,nj=rj.Object.assign,ij=nj,aj=ij,oj=aj,sj=K(oj),lj=V,uj=se,hj=kt,u_=Jl,dj=$w,cj=uj(function(){u_(1)});lj({target:"Object",stat:!0,forced:cj,sham:!dj},{getPrototypeOf:function(i){return u_(hj(i))}});var fj=me,vj=fj.Object.getPrototypeOf,pj=vj,gj=pj,yj=V,mj=Ue,bj=Yn;yj({target:"Object",stat:!0,sham:!mj},{create:bj});var $j=me,wj=$j.Object,_j=function(i,e){return wj.create(i,e)},Ej=_j,h_=Ej,Sj=h_,Oj=K(Sj),fc=me,Tj=Xi;fc.JSON||(fc.JSON={stringify:JSON.stringify});var Pj=function(i,e,t){return Tj(fc.JSON.stringify,null,arguments)},Ij=Pj,kj=Ij,Cj=kj,xj=K(Cj),Aj=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",Rj=TypeError,d_=function(r,i){if(r<i)throw new Rj("Not enough arguments");return r},c_=ye,Dj=Xi,Mj=Oe,Nj=Aj,Fj=hn,Bj=bo,Lj=d_,jj=c_.Function,zj=/MSIE .\./.test(Fj)||Nj&&function(){var r=c_.Bun.version.split(".");return r.length<3||r[0]==="0"&&(r[1]<3||r[1]==="3"&&r[2]==="0")}(),f_=function(r,i){var e=i?2:1;return zj?function(t,n){var a=Lj(arguments.length,1)>e,o=Mj(t)?t:jj(t),s=a?Bj(arguments,e):[],l=a?function(){Dj(o,this,s)}:o;return i?r(l,n):r(l)}:r},Hj=V,v_=ye,Wj=f_,Ig=Wj(v_.setInterval,!0);Hj({global:!0,bind:!0,forced:v_.setInterval!==Ig},{setInterval:Ig});var Vj=V,p_=ye,Uj=f_,kg=Uj(p_.setTimeout,!0);Vj({global:!0,bind:!0,forced:p_.setTimeout!==kg},{setTimeout:kg});var Gj=me,Kj=Gj.setTimeout,qj=Kj,Yj=K(qj),g_={exports:{}};(function(r){r.exports=i;function i(t){if(t)return e(t)}function e(t){for(var n in i.prototype)t[n]=i.prototype[n];return t}i.prototype.on=i.prototype.addEventListener=function(t,n){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(n),this},i.prototype.once=function(t,n){function a(){this.off(t,a),n.apply(this,arguments)}return a.fn=n,this.on(t,a),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(t,n){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var a=this._callbacks["$"+t];if(!a)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,s=0;s<a.length;s++)if(o=a[s],o===n||o.fn===n){a.splice(s,1);break}return a.length===0&&delete this._callbacks["$"+t],this},i.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var n=new Array(arguments.length-1),a=this._callbacks["$"+t],o=1;o<arguments.length;o++)n[o-1]=arguments[o];if(a){a=a.slice(0);for(var o=0,s=a.length;o<s;++o)a[o].apply(this,n)}return this},i.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},i.prototype.hasListeners=function(t){return!!this.listeners(t).length}})(g_);var Xj=g_.exports,Qj=K(Xj);/*! Hammer.JS - v2.0.17-rc - 2019-12-16
28
+ * http://naver.github.io/egjs
29
+ *
30
+ * Forked By Naver egjs
31
+ * Copyright (c) hammerjs
32
+ * Licensed under the MIT license */function ar(){return ar=Object.assign||function(r){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}return r},ar.apply(this,arguments)}function qt(r,i){r.prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i}function ds(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(i){if(i==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(i),t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var a in n)n.hasOwnProperty(a)&&(e[a]=n[a])}return e}:vc=Object.assign;var Bn=vc,Cg=["","webkit","Moz","MS","ms","o"],Jj=typeof document>"u"?{style:{}}:document.createElement("div"),Zj="function",Ei=Math.round,Ln=Math.abs,Bf=Date.now;function au(r,i){for(var e,t,n=i[0].toUpperCase()+i.slice(1),a=0;a<Cg.length;){if(e=Cg[a],t=e?e+n:i,t in r)return t;a++}}var Or;typeof window>"u"?Or={}:Or=window;var y_=au(Jj.style,"touchAction"),m_=y_!==void 0;function ez(){if(!m_)return!1;var r={},i=Or.CSS&&Or.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return r[e]=i?Or.CSS.supports("touch-action",e):!0}),r}var b_="compute",$_="auto",pc="manipulation",kn="none",qa="pan-x",Ya="pan-y",cs=ez(),tz=/mobile|tablet|ip(ad|hone|od)|android/i,w_="ontouchstart"in Or,rz=au(Or,"PointerEvent")!==void 0,nz=w_&&tz.test(navigator.userAgent),_o="touch",iz="pen",Lf="mouse",az="kinect",oz=25,pt=1,Qn=2,Ne=4,Tt=8,hl=1,Eo=2,So=4,Oo=8,Bi=16,pr=Eo|So,Cn=Oo|Bi,__=pr|Cn,E_=["x","y"],dl=["clientX","clientY"];function Tr(r,i,e){var t;if(r)if(r.forEach)r.forEach(i,e);else if(r.length!==void 0)for(t=0;t<r.length;)i.call(e,r[t],t,r),t++;else for(t in r)r.hasOwnProperty(t)&&i.call(e,r[t],t,r)}function ou(r,i){return typeof r===Zj?r.apply(i&&i[0]||void 0,i):r}function Sn(r,i){return r.indexOf(i)>-1}function sz(r){if(Sn(r,kn))return kn;var i=Sn(r,qa),e=Sn(r,Ya);return i&&e?kn:i||e?i?qa:Ya:Sn(r,pc)?pc:$_}var S_=function(){function r(e,t){this.manager=e,this.set(t)}var i=r.prototype;return i.set=function(t){t===b_&&(t=this.compute()),m_&&this.manager.element.style&&cs[t]&&(this.manager.element.style[y_]=t),this.actions=t.toLowerCase().trim()},i.update=function(){this.set(this.manager.options.touchAction)},i.compute=function(){var t=[];return Tr(this.manager.recognizers,function(n){ou(n.options.enable,[n])&&(t=t.concat(n.getTouchAction()))}),sz(t.join(" "))},i.preventDefaults=function(t){var n=t.srcEvent,a=t.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,s=Sn(o,kn)&&!cs[kn],l=Sn(o,Ya)&&!cs[Ya],u=Sn(o,qa)&&!cs[qa];if(s){var h=t.pointers.length===1,d=t.distance<2,c=t.deltaTime<250;if(h&&d&&c)return}if(!(u&&l)&&(s||l&&a&pr||u&&a&Cn))return this.preventSrc(n)},i.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},r}();function jf(r,i){for(;r;){if(r===i)return!0;r=r.parentNode}return!1}function O_(r){var i=r.length;if(i===1)return{x:Ei(r[0].clientX),y:Ei(r[0].clientY)};for(var e=0,t=0,n=0;n<i;)e+=r[n].clientX,t+=r[n].clientY,n++;return{x:Ei(e/i),y:Ei(t/i)}}function xg(r){for(var i=[],e=0;e<r.pointers.length;)i[e]={clientX:Ei(r.pointers[e].clientX),clientY:Ei(r.pointers[e].clientY)},e++;return{timeStamp:Bf(),pointers:i,center:O_(i),deltaX:r.deltaX,deltaY:r.deltaY}}function cl(r,i,e){e||(e=E_);var t=i[e[0]]-r[e[0]],n=i[e[1]]-r[e[1]];return Math.sqrt(t*t+n*n)}function gc(r,i,e){e||(e=E_);var t=i[e[0]]-r[e[0]],n=i[e[1]]-r[e[1]];return Math.atan2(n,t)*180/Math.PI}function T_(r,i){return r===i?hl:Ln(r)>=Ln(i)?r<0?Eo:So:i<0?Oo:Bi}function lz(r,i){var e=i.center,t=r.offsetDelta||{},n=r.prevDelta||{},a=r.prevInput||{};(i.eventType===pt||a.eventType===Ne)&&(n=r.prevDelta={x:a.deltaX||0,y:a.deltaY||0},t=r.offsetDelta={x:e.x,y:e.y}),i.deltaX=n.x+(e.x-t.x),i.deltaY=n.y+(e.y-t.y)}function P_(r,i,e){return{x:i/r||0,y:e/r||0}}function uz(r,i){return cl(i[0],i[1],dl)/cl(r[0],r[1],dl)}function hz(r,i){return gc(i[1],i[0],dl)+gc(r[1],r[0],dl)}function dz(r,i){var e=r.lastInterval||i,t=i.timeStamp-e.timeStamp,n,a,o,s;if(i.eventType!==Tt&&(t>oz||e.velocity===void 0)){var l=i.deltaX-e.deltaX,u=i.deltaY-e.deltaY,h=P_(t,l,u);a=h.x,o=h.y,n=Ln(h.x)>Ln(h.y)?h.x:h.y,s=T_(l,u),r.lastInterval=i}else n=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;i.velocity=n,i.velocityX=a,i.velocityY=o,i.direction=s}function cz(r,i){var e=r.session,t=i.pointers,n=t.length;e.firstInput||(e.firstInput=xg(i)),n>1&&!e.firstMultiple?e.firstMultiple=xg(i):n===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,l=i.center=O_(t);i.timeStamp=Bf(),i.deltaTime=i.timeStamp-a.timeStamp,i.angle=gc(s,l),i.distance=cl(s,l),lz(e,i),i.offsetDirection=T_(i.deltaX,i.deltaY);var u=P_(i.deltaTime,i.deltaX,i.deltaY);i.overallVelocityX=u.x,i.overallVelocityY=u.y,i.overallVelocity=Ln(u.x)>Ln(u.y)?u.x:u.y,i.scale=o?uz(o.pointers,t):1,i.rotation=o?hz(o.pointers,t):0,i.maxPointers=e.prevInput?i.pointers.length>e.prevInput.maxPointers?i.pointers.length:e.prevInput.maxPointers:i.pointers.length,dz(e,i);var h=r.element,d=i.srcEvent,c;d.composedPath?c=d.composedPath()[0]:d.path?c=d.path[0]:c=d.target,jf(c,h)&&(h=c),i.target=h}function fz(r,i,e){var t=e.pointers.length,n=e.changedPointers.length,a=i&pt&&t-n===0,o=i&(Ne|Tt)&&t-n===0;e.isFirst=!!a,e.isFinal=!!o,a&&(r.session={}),e.eventType=i,cz(r,e),r.emit("hammer.input",e),r.recognize(e),r.session.prevInput=e}function Xa(r){return r.trim().split(/\s+/g)}function Da(r,i,e){Tr(Xa(i),function(t){r.addEventListener(t,e,!1)})}function Ma(r,i,e){Tr(Xa(i),function(t){r.removeEventListener(t,e,!1)})}function Ag(r){var i=r.ownerDocument||r;return i.defaultView||i.parentWindow||window}var sa=function(){function r(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){ou(e.options.enable,[e])&&n.handler(a)},this.init()}var i=r.prototype;return i.handler=function(){},i.init=function(){this.evEl&&Da(this.element,this.evEl,this.domHandler),this.evTarget&&Da(this.target,this.evTarget,this.domHandler),this.evWin&&Da(Ag(this.element),this.evWin,this.domHandler)},i.destroy=function(){this.evEl&&Ma(this.element,this.evEl,this.domHandler),this.evTarget&&Ma(this.target,this.evTarget,this.domHandler),this.evWin&&Ma(Ag(this.element),this.evWin,this.domHandler)},r}();function jn(r,i,e){if(r.indexOf&&!e)return r.indexOf(i);for(var t=0;t<r.length;){if(e&&r[t][e]==i||!e&&r[t]===i)return t;t++}return-1}var vz={pointerdown:pt,pointermove:Qn,pointerup:Ne,pointercancel:Tt,pointerout:Tt},pz={2:_o,3:iz,4:Lf,5:az},I_="pointerdown",k_="pointermove pointerup pointercancel";Or.MSPointerEvent&&!Or.PointerEvent&&(I_="MSPointerDown",k_="MSPointerMove MSPointerUp MSPointerCancel");var C_=function(r){qt(i,r);function i(){var t,n=i.prototype;return n.evEl=I_,n.evWin=k_,t=r.apply(this,arguments)||this,t.store=t.manager.session.pointerEvents=[],t}var e=i.prototype;return e.handler=function(n){var a=this.store,o=!1,s=n.type.toLowerCase().replace("ms",""),l=vz[s],u=pz[n.pointerType]||n.pointerType,h=u===_o,d=jn(a,n.pointerId,"pointerId");l&pt&&(n.button===0||h)?d<0&&(a.push(n),d=a.length-1):l&(Ne|Tt)&&(o=!0),!(d<0)&&(a[d]=n,this.callback(this.manager,l,{pointers:a,changedPointers:[n],pointerType:u,srcEvent:n}),o&&a.splice(d,1))},i}(sa);function Qa(r){return Array.prototype.slice.call(r,0)}function zf(r,i,e){for(var t=[],n=[],a=0;a<r.length;){var o=i?r[a][i]:r[a];jn(n,o)<0&&t.push(r[a]),n[a]=o,a++}return e&&(i?t=t.sort(function(s,l){return s[i]>l[i]}):t=t.sort()),t}var gz={touchstart:pt,touchmove:Qn,touchend:Ne,touchcancel:Tt},yz="touchstart touchmove touchend touchcancel",Hf=function(r){qt(i,r);function i(){var t;return i.prototype.evTarget=yz,t=r.apply(this,arguments)||this,t.targetIds={},t}var e=i.prototype;return e.handler=function(n){var a=gz[n.type],o=mz.call(this,n,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:_o,srcEvent:n})},i}(sa);function mz(r,i){var e=Qa(r.touches),t=this.targetIds;if(i&(pt|Qn)&&e.length===1)return t[e[0].identifier]=!0,[e,e];var n,a,o=Qa(r.changedTouches),s=[],l=this.target;if(a=e.filter(function(u){return jf(u.target,l)}),i===pt)for(n=0;n<a.length;)t[a[n].identifier]=!0,n++;for(n=0;n<o.length;)t[o[n].identifier]&&s.push(o[n]),i&(Ne|Tt)&&delete t[o[n].identifier],n++;if(s.length)return[zf(a.concat(s),"identifier",!0),s]}var bz={mousedown:pt,mousemove:Qn,mouseup:Ne},$z="mousedown",wz="mousemove mouseup",Wf=function(r){qt(i,r);function i(){var t,n=i.prototype;return n.evEl=$z,n.evWin=wz,t=r.apply(this,arguments)||this,t.pressed=!1,t}var e=i.prototype;return e.handler=function(n){var a=bz[n.type];a&pt&&n.button===0&&(this.pressed=!0),a&Qn&&n.which!==1&&(a=Ne),this.pressed&&(a&Ne&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[n],changedPointers:[n],pointerType:Lf,srcEvent:n}))},i}(sa),_z=2500,Rg=25;function Dg(r){var i=r.changedPointers,e=i[0];if(e.identifier===this.primaryTouch){var t={x:e.clientX,y:e.clientY},n=this.lastTouches;this.lastTouches.push(t);var a=function(){var s=n.indexOf(t);s>-1&&n.splice(s,1)};setTimeout(a,_z)}}function Ez(r,i){r&pt?(this.primaryTouch=i.changedPointers[0].identifier,Dg.call(this,i)):r&(Ne|Tt)&&Dg.call(this,i)}function Sz(r){for(var i=r.srcEvent.clientX,e=r.srcEvent.clientY,t=0;t<this.lastTouches.length;t++){var n=this.lastTouches[t],a=Math.abs(i-n.x),o=Math.abs(e-n.y);if(a<=Rg&&o<=Rg)return!0}return!1}var x_=function(){var r=function(i){qt(e,i);function e(n,a){var o;return o=i.call(this,n,a)||this,o.handler=function(s,l,u){var h=u.pointerType===_o,d=u.pointerType===Lf;if(!(d&&u.sourceCapabilities&&u.sourceCapabilities.firesTouchEvents)){if(h)Ez.call(ds(ds(o)),l,u);else if(d&&Sz.call(ds(ds(o)),u))return;o.callback(s,l,u)}},o.touch=new Hf(o.manager,o.handler),o.mouse=new Wf(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}var t=e.prototype;return t.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(sa);return r}();function Oz(r){var i,e=r.options.inputClass;return e?i=e:rz?i=C_:nz?i=Hf:w_?i=x_:i=Wf,new i(r,fz)}function Si(r,i,e){return Array.isArray(r)?(Tr(r,e[i],e),!0):!1}var Ws=1,Gt=2,Li=4,Zr=8,Pr=Zr,Ja=16,cr=32,Tz=1;function Pz(){return Tz++}function fs(r,i){var e=i.manager;return e?e.get(r):r}function Mg(r){return r&Ja?"cancel":r&Zr?"end":r&Li?"move":r&Gt?"start":""}var To=function(){function r(e){e===void 0&&(e={}),this.options=ar({enable:!0},e),this.id=Pz(),this.manager=null,this.state=Ws,this.simultaneous={},this.requireFail=[]}var i=r.prototype;return i.set=function(t){return Bn(this.options,t),this.manager&&this.manager.touchAction.update(),this},i.recognizeWith=function(t){if(Si(t,"recognizeWith",this))return this;var n=this.simultaneous;return t=fs(t,this),n[t.id]||(n[t.id]=t,t.recognizeWith(this)),this},i.dropRecognizeWith=function(t){return Si(t,"dropRecognizeWith",this)?this:(t=fs(t,this),delete this.simultaneous[t.id],this)},i.requireFailure=function(t){if(Si(t,"requireFailure",this))return this;var n=this.requireFail;return t=fs(t,this),jn(n,t)===-1&&(n.push(t),t.requireFailure(this)),this},i.dropRequireFailure=function(t){if(Si(t,"dropRequireFailure",this))return this;t=fs(t,this);var n=jn(this.requireFail,t);return n>-1&&this.requireFail.splice(n,1),this},i.hasRequireFailures=function(){return this.requireFail.length>0},i.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},i.emit=function(t){var n=this,a=this.state;function o(s){n.manager.emit(s,t)}a<Zr&&o(n.options.event+Mg(a)),o(n.options.event),t.additionalEvent&&o(t.additionalEvent),a>=Zr&&o(n.options.event+Mg(a))},i.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=cr},i.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(cr|Ws)))return!1;t++}return!0},i.recognize=function(t){var n=Bn({},t);if(!ou(this.options.enable,[this,n])){this.reset(),this.state=cr;return}this.state&(Pr|Ja|cr)&&(this.state=Ws),this.state=this.process(n),this.state&(Gt|Li|Zr|Ja)&&this.tryEmit(n)},i.process=function(t){},i.getTouchAction=function(){},i.reset=function(){},r}(),yc=function(r){qt(i,r);function i(t){var n;return t===void 0&&(t={}),n=r.call(this,ar({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,n.pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}var e=i.prototype;return e.getTouchAction=function(){return[pc]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,l=n.distance<o.threshold,u=n.deltaTime<o.time;if(this.reset(),n.eventType&pt&&this.count===0)return this.failTimeout();if(l&&u&&s){if(n.eventType!==Ne)return this.failTimeout();var h=this.pTime?n.timeStamp-this.pTime<o.interval:!0,d=!this.pCenter||cl(this.pCenter,n.center)<o.posThreshold;this.pTime=n.timeStamp,this.pCenter=n.center,!d||!h?this.count=1:this.count+=1,this._input=n;var c=this.count%o.taps;if(c===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){a.state=Pr,a.tryEmit()},o.interval),Gt):Pr}return cr},e.failTimeout=function(){var n=this;return this._timer=setTimeout(function(){n.state=cr},this.options.interval),cr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(){this.state===Pr&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},i}(To),ji=function(r){qt(i,r);function i(t){return t===void 0&&(t={}),r.call(this,ar({pointers:1},t))||this}var e=i.prototype;return e.attrTest=function(n){var a=this.options.pointers;return a===0||n.pointers.length===a},e.process=function(n){var a=this.state,o=n.eventType,s=a&(Gt|Li),l=this.attrTest(n);return s&&(o&Tt||!l)?a|Ja:s||l?o&Ne?a|Zr:a&Gt?a|Li:Gt:cr},i}(To);function A_(r){return r===Bi?"down":r===Oo?"up":r===Eo?"left":r===So?"right":""}var Vf=function(r){qt(i,r);function i(t){var n;return t===void 0&&(t={}),n=r.call(this,ar({event:"pan",threshold:10,pointers:1,direction:__},t))||this,n.pX=null,n.pY=null,n}var e=i.prototype;return e.getTouchAction=function(){var n=this.options.direction,a=[];return n&pr&&a.push(Ya),n&Cn&&a.push(qa),a},e.directionTest=function(n){var a=this.options,o=!0,s=n.distance,l=n.direction,u=n.deltaX,h=n.deltaY;return l&a.direction||(a.direction&pr?(l=u===0?hl:u<0?Eo:So,o=u!==this.pX,s=Math.abs(n.deltaX)):(l=h===0?hl:h<0?Oo:Bi,o=h!==this.pY,s=Math.abs(n.deltaY))),n.direction=l,o&&s>a.threshold&&l&a.direction},e.attrTest=function(n){return ji.prototype.attrTest.call(this,n)&&(this.state&Gt||!(this.state&Gt)&&this.directionTest(n))},e.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var a=A_(n.direction);a&&(n.additionalEvent=this.options.event+a),r.prototype.emit.call(this,n)},i}(ji),R_=function(r){qt(i,r);function i(t){return t===void 0&&(t={}),r.call(this,ar({event:"swipe",threshold:10,velocity:.3,direction:pr|Cn,pointers:1},t))||this}var e=i.prototype;return e.getTouchAction=function(){return Vf.prototype.getTouchAction.call(this)},e.attrTest=function(n){var a=this.options.direction,o;return a&(pr|Cn)?o=n.overallVelocity:a&pr?o=n.overallVelocityX:a&Cn&&(o=n.overallVelocityY),r.prototype.attrTest.call(this,n)&&a&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&Ln(o)>this.options.velocity&&n.eventType&Ne},e.emit=function(n){var a=A_(n.offsetDirection);a&&this.manager.emit(this.options.event+a,n),this.manager.emit(this.options.event,n)},i}(ji),D_=function(r){qt(i,r);function i(t){return t===void 0&&(t={}),r.call(this,ar({event:"pinch",threshold:0,pointers:2},t))||this}var e=i.prototype;return e.getTouchAction=function(){return[kn]},e.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&Gt)},e.emit=function(n){if(n.scale!==1){var a=n.scale<1?"in":"out";n.additionalEvent=this.options.event+a}r.prototype.emit.call(this,n)},i}(ji),M_=function(r){qt(i,r);function i(t){return t===void 0&&(t={}),r.call(this,ar({event:"rotate",threshold:0,pointers:2},t))||this}var e=i.prototype;return e.getTouchAction=function(){return[kn]},e.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&Gt)},i}(ji),N_=function(r){qt(i,r);function i(t){var n;return t===void 0&&(t={}),n=r.call(this,ar({event:"press",pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var e=i.prototype;return e.getTouchAction=function(){return[$_]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,l=n.distance<o.threshold,u=n.deltaTime>o.time;if(this._input=n,!l||!s||n.eventType&(Ne|Tt)&&!u)this.reset();else if(n.eventType&pt)this.reset(),this._timer=setTimeout(function(){a.state=Pr,a.tryEmit()},o.time);else if(n.eventType&Ne)return Pr;return cr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(n){this.state===Pr&&(n&&n.eventType&Ne?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=Bf(),this.manager.emit(this.options.event,this._input)))},i}(To),F_={domEvents:!1,touchAction:b_,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Ng=[[M_,{enable:!1}],[D_,{enable:!1},["rotate"]],[R_,{direction:pr}],[Vf,{direction:pr},["swipe"]],[yc],[yc,{event:"doubletap",taps:2},["tap"]],[N_]],Iz=1,Fg=2;function Bg(r,i){var e=r.element;if(e.style){var t;Tr(r.options.cssProps,function(n,a){t=au(e.style,a),i?(r.oldCssProps[t]=e.style[t],e.style[t]=n):e.style[t]=r.oldCssProps[t]||""}),i||(r.oldCssProps={})}}function kz(r,i){var e=document.createEvent("Event");e.initEvent(r,!0,!0),e.gesture=i,i.target.dispatchEvent(e)}var Lg=function(){function r(e,t){var n=this;this.options=Bn({},F_,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=Oz(this),this.touchAction=new S_(this,this.options.touchAction),Bg(this,!0),Tr(this.options.recognizers,function(a){var o=n.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var i=r.prototype;return i.set=function(t){return Bn(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},i.stop=function(t){this.session.stopped=t?Fg:Iz},i.recognize=function(t){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(t);var a,o=this.recognizers,s=n.curRecognizer;(!s||s&&s.state&Pr)&&(n.curRecognizer=null,s=null);for(var l=0;l<o.length;)a=o[l],n.stopped!==Fg&&(!s||a===s||a.canRecognizeWith(s))?a.recognize(t):a.reset(),!s&&a.state&(Gt|Li|Zr)&&(n.curRecognizer=a,s=a),l++}},i.get=function(t){if(t instanceof To)return t;for(var n=this.recognizers,a=0;a<n.length;a++)if(n[a].options.event===t)return n[a];return null},i.add=function(t){if(Si(t,"add",this))return this;var n=this.get(t.options.event);return n&&this.remove(n),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},i.remove=function(t){if(Si(t,"remove",this))return this;var n=this.get(t);if(t){var a=this.recognizers,o=jn(a,n);o!==-1&&(a.splice(o,1),this.touchAction.update())}return this},i.on=function(t,n){if(t===void 0||n===void 0)return this;var a=this.handlers;return Tr(Xa(t),function(o){a[o]=a[o]||[],a[o].push(n)}),this},i.off=function(t,n){if(t===void 0)return this;var a=this.handlers;return Tr(Xa(t),function(o){n?a[o]&&a[o].splice(jn(a[o],n),1):delete a[o]}),this},i.emit=function(t,n){this.options.domEvents&&kz(t,n);var a=this.handlers[t]&&this.handlers[t].slice();if(!(!a||!a.length)){n.type=t,n.preventDefault=function(){n.srcEvent.preventDefault()};for(var o=0;o<a.length;)a[o](n),o++}},i.destroy=function(){this.element&&Bg(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},r}(),Cz={touchstart:pt,touchmove:Qn,touchend:Ne,touchcancel:Tt},xz="touchstart",Az="touchstart touchmove touchend touchcancel",Rz=function(r){qt(i,r);function i(){var t,n=i.prototype;return n.evTarget=xz,n.evWin=Az,t=r.apply(this,arguments)||this,t.started=!1,t}var e=i.prototype;return e.handler=function(n){var a=Cz[n.type];if(a===pt&&(this.started=!0),!!this.started){var o=Dz.call(this,n,a);a&(Ne|Tt)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:_o,srcEvent:n})}},i}(sa);function Dz(r,i){var e=Qa(r.touches),t=Qa(r.changedTouches);return i&(Ne|Tt)&&(e=zf(e.concat(t),"identifier",!0)),[e,t]}function B_(r,i,e){var t="DEPRECATED METHOD: "+i+`
33
+ `+e+` AT
34
+ `;return function(){var n=new Error("get-stack-trace"),a=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,t,a),r.apply(this,arguments)}}var L_=B_(function(r,i,e){for(var t=Object.keys(i),n=0;n<t.length;)(!e||e&&r[t[n]]===void 0)&&(r[t[n]]=i[t[n]]),n++;return r},"extend","Use `assign`."),Mz=B_(function(r,i){return L_(r,i,!0)},"merge","Use `assign`.");function Nz(r,i,e){var t=i.prototype,n;n=r.prototype=Object.create(t),n.constructor=r,n._super=t,e&&Bn(n,e)}function jg(r,i){return function(){return r.apply(i,arguments)}}var Fz=function(){var r=function(e,t){return t===void 0&&(t={}),new Lg(e,ar({recognizers:Ng.concat()},t))};return r.VERSION="2.0.17-rc",r.DIRECTION_ALL=__,r.DIRECTION_DOWN=Bi,r.DIRECTION_LEFT=Eo,r.DIRECTION_RIGHT=So,r.DIRECTION_UP=Oo,r.DIRECTION_HORIZONTAL=pr,r.DIRECTION_VERTICAL=Cn,r.DIRECTION_NONE=hl,r.DIRECTION_DOWN=Bi,r.INPUT_START=pt,r.INPUT_MOVE=Qn,r.INPUT_END=Ne,r.INPUT_CANCEL=Tt,r.STATE_POSSIBLE=Ws,r.STATE_BEGAN=Gt,r.STATE_CHANGED=Li,r.STATE_ENDED=Zr,r.STATE_RECOGNIZED=Pr,r.STATE_CANCELLED=Ja,r.STATE_FAILED=cr,r.Manager=Lg,r.Input=sa,r.TouchAction=S_,r.TouchInput=Hf,r.MouseInput=Wf,r.PointerEventInput=C_,r.TouchMouseInput=x_,r.SingleTouchInput=Rz,r.Recognizer=To,r.AttrRecognizer=ji,r.Tap=yc,r.Pan=Vf,r.Swipe=R_,r.Pinch=D_,r.Rotate=M_,r.Press=N_,r.on=Da,r.off=Ma,r.each=Tr,r.merge=Mz,r.extend=L_,r.bindFn=jg,r.assign=Bn,r.inherit=Nz,r.bindFn=jg,r.prefixed=au,r.toArray=Qa,r.inArray=jn,r.uniqueArray=zf,r.splitStr=Xa,r.boolOrFn=ou,r.hasParent=jf,r.addEventListeners=Da,r.removeEventListeners=Ma,r.defaults=Bn({},F_,{preset:Ng}),r}(),Bz=Fz;function j_(r,i){var e=typeof ru<"u"&&Mf(r)||r["@@iterator"];if(!e){if(Nt(r)||(e=Lz(r))||i&&r&&typeof r.length=="number"){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
35
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Lz(r,i){var e;if(r){if(typeof r=="string")return zg(r,i);var t=iu(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Df(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return zg(r,i)}}function zg(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}var z_=ru("DELETE");function jz(r){for(var i,e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return H_.apply(void 0,nu(i=[{},r]).call(i,t))}function H_(){var r=fl.apply(void 0,arguments);return V_(r),r}function fl(){for(var r=arguments.length,i=new Array(r),e=0;e<r;e++)i[e]=arguments[e];if(i.length<2)return i[0];if(i.length>2){var t;return fl.apply(void 0,nu(t=[H_(i[0],i[1])]).call(t,Et(iu(i).call(i,2))))}var n=i[0],a=i[1];if(n instanceof Date&&a instanceof Date)return n.setTime(a.getTime()),n;var o=j_(jB(a)),s;try{for(o.s();!(s=o.n()).done;){var l=s.value;Object.prototype.propertyIsEnumerable.call(a,l)&&(a[l]===z_?delete n[l]:n[l]!==null&&a[l]!==null&&typeof n[l]=="object"&&typeof a[l]=="object"&&!Nt(n[l])&&!Nt(a[l])?n[l]=fl(n[l],a[l]):n[l]=W_(a[l]))}}catch(u){o.e(u)}finally{o.f()}return n}function W_(r){return Nt(r)?Zt(r).call(r,function(i){return W_(i)}):typeof r=="object"&&r!==null?r instanceof Date?new Date(r.getTime()):fl({},r):r}function V_(r){for(var i=0,e=Ff(r);i<e.length;i++){var t=e[i];r[t]===z_?delete r[t]:typeof r[t]=="object"&&r[t]!==null&&V_(r[t])}}function zz(){var r=function(){};return{on:r,off:r,destroy:r,emit:r,get(){return{set:r}}}}var Hz=typeof window<"u"?window.Hammer||Bz:function(){return zz()};function Er(r){var i=this,e;this._cleanupQueue=[],this.active=!1,this._dom={container:r,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){i._dom.overlay.parentNode.removeChild(i._dom.overlay)});var t=Hz(this._dom.overlay);t.on("tap",jw(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){t.destroy()});var n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Fn(n).call(n,function(a){t.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){Wz(a.target,r)||i.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",i._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&i.deactivate()}}Qj(Er.prototype);Er.current=null;Er.prototype.destroy=function(){var r,i;this.deactivate();var e=j_(EL(r=l_(i=this._cleanupQueue).call(i,0)).call(r)),t;try{for(e.s();!(t=e.n()).done;){var n=t.value;n()}}catch(a){e.e(a)}finally{e.f()}};Er.prototype.activate=function(){Er.current&&Er.current.deactivate(),Er.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};Er.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};Er.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function Wz(r,i){for(;r;){if(r===i)return!0;r=r.parentNode}return!1}var Vz=zl,Uz=ea,Gz=TypeError,U_=function(r){if(Vz(r))return r;throw new Gz(Uz(r)+" is not a constructor")},Kz=V,qz=yt,Eh=Xi,Yz=Bw,Hg=U_,Xz=Bt,Wg=rt,Qz=Yn,G_=se,Uf=qz("Reflect","construct"),Jz=Object.prototype,Zz=[].push,K_=G_(function(){function r(){}return!(Uf(function(){},[],r)instanceof r)}),q_=!G_(function(){Uf(function(){})}),Vg=K_||q_;Kz({target:"Reflect",stat:!0,forced:Vg,sham:Vg},{construct:function(i,e){Hg(i),Xz(e);var t=arguments.length<3?i:Hg(arguments[2]);if(q_&&!K_)return Uf(i,e,t);if(i===t){switch(e.length){case 0:return new i;case 1:return new i(e[0]);case 2:return new i(e[0],e[1]);case 3:return new i(e[0],e[1],e[2]);case 4:return new i(e[0],e[1],e[2],e[3])}var n=[null];return Eh(Zz,n,e),new(Eh(Yz,i,n))}var a=t.prototype,o=Qz(Wg(a)?a:Jz),s=Eh(i,o,e);return Wg(s)?s:o}});var e3=me,t3=e3.Reflect.construct,r3=t3,n3=r3,i3=n3,Vs=K(i3),a3=me,o3=a3.Object.getOwnPropertySymbols,s3=o3,l3=s3,u3=l3,Ug=K(u3),Y_={exports:{}},h3=V,d3=se,c3=mr,X_=Gn.f,Q_=Ue,f3=!Q_||d3(function(){X_(1)});h3({target:"Object",stat:!0,forced:f3,sham:!Q_},{getOwnPropertyDescriptor:function(i,e){return X_(c3(i),e)}});var v3=me,J_=v3.Object,p3=Y_.exports=function(i,e){return J_.getOwnPropertyDescriptor(i,e)};J_.getOwnPropertyDescriptor.sham&&(p3.sham=!0);var g3=Y_.exports,y3=g3,m3=y3,b3=m3,Z_=K(b3),$3=V,w3=Ue,_3=Nf,E3=mr,S3=Gn,O3=ra;$3({target:"Object",stat:!0,sham:!w3},{getOwnPropertyDescriptors:function(i){for(var e=E3(i),t=S3.f,n=_3(e),a={},o=0,s,l;n.length>o;)l=t(e,s=n[o++]),l!==void 0&&O3(a,s,l);return a}});var T3=me,P3=T3.Object.getOwnPropertyDescriptors,I3=P3,k3=I3,C3=k3,Gg=K(C3),e0={exports:{}},x3=V,A3=Ue,Kg=Wl.f;x3({target:"Object",stat:!0,forced:Object.defineProperties!==Kg,sham:!A3},{defineProperties:Kg});var R3=me,t0=R3.Object,D3=e0.exports=function(i,e){return t0.defineProperties(i,e)};t0.defineProperties.sham&&(D3.sham=!0);var M3=e0.exports,N3=M3,F3=N3,B3=F3,L3=K(B3),j3=R1,z3=K(j3);function r0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}var H3=h_,W3=H3,V3=W3,U3=V3,n0=U3,G3=K(n0),K3=V,q3=Ew;K3({target:"Object",stat:!0},{setPrototypeOf:q3});var Y3=me,X3=Y3.Object.setPrototypeOf,Q3=X3,J3=Q3,Z3=J3,e5=Z3,t5=e5,r5=t5,i0=r5,mc=K(i0),n5=Lw,i5=n5,a5=i5,o5=a5,s5=o5,a0=K(s5);function bc(r,i){var e;return bc=mc?a0(e=mc).call(e):function(n,a){return n.__proto__=a,n},bc(r,i)}function l5(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=G3(i&&i.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Bl(r,"prototype",{writable:!1}),i&&bc(r,i)}function u5(r,i){if(i&&(Fi(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return r0(r)}var h5=gj,d5=h5,c5=d5,f5=c5,o0=f5,qg=K(o0);function vl(r){var i;return vl=mc?a0(i=qg).call(i):function(t){return t.__proto__||qg(t)},vl(r)}var s0={exports:{}},l0={exports:{}};(function(r){var i=xf,e=Dw;function t(n){"@babel/helpers - typeof";return r.exports=t=typeof i=="function"&&typeof e=="symbol"?function(a){return typeof a}:function(a){return a&&typeof i=="function"&&a.constructor===i&&a!==i.prototype?"symbol":typeof a},r.exports.__esModule=!0,r.exports.default=r.exports,t(n)}r.exports=t,r.exports.__esModule=!0,r.exports.default=r.exports})(l0);var v5=l0.exports,p5=a_,g5=p5,y5=g5,m5=y5,b5=m5,Yg=je,$5=Nf,w5=Gn,_5=Ct,E5=function(r,i,e){for(var t=$5(i),n=_5.f,a=w5.f,o=0;o<t.length;o++){var s=t[o];!Yg(r,s)&&!(e&&Yg(e,s))&&n(r,s,a(i,s))}},S5=rt,O5=Fr,T5=function(r,i){S5(i)&&"cause"in i&&O5(r,"cause",i.cause)},P5=ge,u0=Error,I5=P5("".replace),k5=function(r){return String(new u0(r).stack)}("zxcasd"),h0=/\n\s*at [^:]*:[^\n]*/,C5=h0.test(k5),x5=function(r,i){if(C5&&typeof r=="string"&&!u0.prepareStackTrace)for(;i--;)r=I5(r,h0,"");return r},A5=se,R5=Kn,D5=!A5(function(){var r=new Error("a");return"stack"in r?(Object.defineProperty(r,"stack",R5(1,7)),r.stack!==7):!0}),M5=Fr,N5=x5,F5=D5,Xg=Error.captureStackTrace,B5=function(r,i,e,t){F5&&(Xg?Xg(r,i):M5(r,"stack",N5(e,t)))},L5=dn,j5=Ge,z5=Bt,H5=ea,W5=Ww,V5=Lt,Qg=Le,U5=Rf,G5=tu,Jg=Hw,K5=TypeError,Us=function(r,i){this.stopped=r,this.result=i},Zg=Us.prototype,Jn=function(r,i,e){var t=e&&e.that,n=!!(e&&e.AS_ENTRIES),a=!!(e&&e.IS_RECORD),o=!!(e&&e.IS_ITERATOR),s=!!(e&&e.INTERRUPTED),l=L5(i,t),u,h,d,c,f,v,p,g=function(m){return u&&Jg(u,"normal",m),new Us(!0,m)},y=function(m){return n?(z5(m),s?l(m[0],m[1],g):l(m[0],m[1])):s?l(m,g):l(m)};if(a)u=r.iterator;else if(o)u=r;else{if(h=G5(r),!h)throw new K5(H5(r)+" is not iterable");if(W5(h)){for(d=0,c=V5(r);c>d;d++)if(f=y(r[d]),f&&Qg(Zg,f))return f;return new Us(!1)}u=U5(r,h)}for(v=a?r.next:u.next;!(p=j5(v,u)).done;){try{f=y(p.value)}catch(m){Jg(u,"throw",m)}if(typeof f=="object"&&f&&Qg(Zg,f))return f}return new Us(!1)},q5=qn,Y5=function(r,i){return r===void 0?arguments.length<2?"":i:q5(r)},X5=V,Q5=Le,J5=Jl,pl=Ew,Z5=E5,d0=Yn,Sh=Fr,Oh=Kn,eH=T5,tH=B5,rH=Jn,nH=Y5,iH=$e,aH=iH("toStringTag"),gl=Error,oH=[].push,zi=function(i,e){var t=Q5(Th,this),n;pl?n=pl(new gl,t?J5(this):Th):(n=t?this:d0(Th),Sh(n,aH,"Error")),e!==void 0&&Sh(n,"message",nH(e)),tH(n,zi,n.stack,1),arguments.length>2&&eH(n,arguments[2]);var a=[];return rH(i,oH,{that:a}),Sh(n,"errors",a),n};pl?pl(zi,gl):Z5(zi,gl,{name:!0});var Th=zi.prototype=d0(gl.prototype,{constructor:Oh(1,zi),message:Oh(1,""),name:Oh(1,"AggregateError")});X5({global:!0,constructor:!0,arity:2},{AggregateError:zi});var sH=yt,lH=_f,uH=$e,hH=Ue,ey=uH("species"),c0=function(r){var i=sH(r);hH&&i&&!i[ey]&&lH(i,ey,{configurable:!0,get:function(){return this}})},dH=Le,cH=TypeError,Gf=function(r,i){if(dH(i,r))return r;throw new cH("Incorrect invocation")},ty=Bt,fH=U_,vH=Qi,pH=$e,gH=pH("species"),f0=function(r,i){var e=ty(r).constructor,t;return e===void 0||vH(t=ty(e)[gH])?i:fH(t)},yH=hn,v0=/(?:ipad|iphone|ipod).*applewebkit/i.test(yH),Ft=ye,mH=Xi,bH=dn,ry=Oe,$H=je,p0=se,ny=W1,wH=bo,iy=yf,_H=d_,EH=v0,SH=wo,$c=Ft.setImmediate,wc=Ft.clearImmediate,OH=Ft.process,Ph=Ft.Dispatch,TH=Ft.Function,ay=Ft.MessageChannel,PH=Ft.String,Ih=0,Na={},oy="onreadystatechange",Za,bn,kh,Ch;p0(function(){Za=Ft.location});var Kf=function(r){if($H(Na,r)){var i=Na[r];delete Na[r],i()}},xh=function(r){return function(){Kf(r)}},sy=function(r){Kf(r.data)},ly=function(r){Ft.postMessage(PH(r),Za.protocol+"//"+Za.host)};(!$c||!wc)&&($c=function(i){_H(arguments.length,1);var e=ry(i)?i:TH(i),t=wH(arguments,1);return Na[++Ih]=function(){mH(e,void 0,t)},bn(Ih),Ih},wc=function(i){delete Na[i]},SH?bn=function(r){OH.nextTick(xh(r))}:Ph&&Ph.now?bn=function(r){Ph.now(xh(r))}:ay&&!EH?(kh=new ay,Ch=kh.port2,kh.port1.onmessage=sy,bn=bH(Ch.postMessage,Ch)):Ft.addEventListener&&ry(Ft.postMessage)&&!Ft.importScripts&&Za&&Za.protocol!=="file:"&&!p0(ly)?(bn=ly,Ft.addEventListener("message",sy,!1)):oy in iy("script")?bn=function(r){ny.appendChild(iy("script"))[oy]=function(){ny.removeChild(this),Kf(r)}}:bn=function(r){setTimeout(xh(r),0)});var g0={set:$c,clear:wc},y0=function(){this.head=null,this.tail=null};y0.prototype={add:function(r){var i={item:r,next:null},e=this.tail;e?e.next=i:this.head=i,this.tail=i},get:function(){var r=this.head;if(r){var i=this.head=r.next;return i===null&&(this.tail=null),r.item}}};var m0=y0,IH=hn,kH=/ipad|iphone|ipod/i.test(IH)&&typeof Pebble<"u",CH=hn,xH=/web0s(?!.*chrome)/i.test(CH),zn=ye,uy=dn,AH=Gn.f,Ah=g0.set,RH=m0,DH=v0,MH=kH,NH=xH,Rh=wo,hy=zn.MutationObserver||zn.WebKitMutationObserver,dy=zn.document,cy=zn.process,vs=zn.Promise,fy=AH(zn,"queueMicrotask"),_c=fy&&fy.value,di,Dh,Mh,ps,vy;if(!_c){var gs=new RH,ys=function(){var r,i;for(Rh&&(r=cy.domain)&&r.exit();i=gs.get();)try{i()}catch(e){throw gs.head&&di(),e}r&&r.enter()};!DH&&!Rh&&!NH&&hy&&dy?(Dh=!0,Mh=dy.createTextNode(""),new hy(ys).observe(Mh,{characterData:!0}),di=function(){Mh.data=Dh=!Dh}):!MH&&vs&&vs.resolve?(ps=vs.resolve(void 0),ps.constructor=vs,vy=uy(ps.then,ps),di=function(){vy(ys)}):Rh?di=function(){cy.nextTick(ys)}:(Ah=uy(Ah,zn),di=function(){Ah(ys)}),_c=function(r){gs.head||di(),gs.add(r)}}var FH=_c,BH=function(r,i){try{arguments.length===1?console.error(r):console.error(r,i)}catch{}},la=function(r){try{return{error:!1,value:r()}}catch(i){return{error:!0,value:i}}},LH=ye,ua=LH.Promise,b0=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",jH=b0,zH=wo,HH=!jH&&!zH&&typeof window=="object"&&typeof document=="object",WH=ye,Fa=ua,VH=Oe,UH=C1,GH=N1,KH=$e,qH=HH,YH=b0,Nh=Ji,py=Fa&&Fa.prototype,XH=KH("species"),Ec=!1,$0=VH(WH.PromiseRejectionEvent),QH=UH("Promise",function(){var r=GH(Fa),i=r!==String(Fa);if(!i&&Nh===66||!(py.catch&&py.finally))return!0;if(!Nh||Nh<51||!/native code/.test(r)){var e=new Fa(function(a){a(1)}),t=function(a){a(function(){},function(){})},n=e.constructor={};if(n[XH]=t,Ec=e.then(function(){})instanceof t,!Ec)return!0}return!i&&(qH||YH)&&!$0}),Po={CONSTRUCTOR:QH,REJECTION_EVENT:$0,SUBCLASSING:Ec},br={},gy=It,JH=TypeError,ZH=function(r){var i,e;this.promise=new r(function(t,n){if(i!==void 0||e!==void 0)throw new JH("Bad Promise constructor");i=t,e=n}),this.resolve=gy(i),this.reject=gy(e)};br.f=function(r){return new ZH(r)};var e4=V,yl=wo,an=ye,Io=Ge,t4=na,r4=Xn,n4=c0,i4=It,Sc=Oe,a4=rt,o4=Gf,s4=f0,w0=g0.set,qf=FH,l4=BH,u4=la,h4=m0,_0=ia,Oc=ua,E0=Po,S0=br,su="Promise",O0=E0.CONSTRUCTOR,d4=E0.REJECTION_EVENT,Fh=_0.getterFor(su),c4=_0.set,f4=Oc&&Oc.prototype,Oi=Oc,Bh=f4,T0=an.TypeError,Tc=an.document,Yf=an.process,Pc=S0.f,v4=Pc,p4=!!(Tc&&Tc.createEvent&&an.dispatchEvent),P0="unhandledrejection",g4="rejectionhandled",yy=0,I0=1,y4=2,Xf=1,k0=2,ms,my,m4,C0=function(r){var i;return a4(r)&&Sc(i=r.then)?i:!1},x0=function(r,i){var e=i.value,t=i.state===I0,n=t?r.ok:r.fail,a=r.resolve,o=r.reject,s=r.domain,l,u,h;try{n?(t||(i.rejection===k0&&$4(i),i.rejection=Xf),n===!0?l=e:(s&&s.enter(),l=n(e),s&&(s.exit(),h=!0)),l===r.promise?o(new T0("Promise-chain cycle")):(u=C0(l))?Io(u,l,a,o):a(l)):o(e)}catch(d){s&&!h&&s.exit(),o(d)}},A0=function(r,i){r.notified||(r.notified=!0,qf(function(){for(var e=r.reactions,t;t=e.get();)x0(t,r);r.notified=!1,i&&!r.rejection&&b4(r)}))},R0=function(r,i,e){var t,n;p4?(t=Tc.createEvent("Event"),t.promise=i,t.reason=e,t.initEvent(r,!1,!0),an.dispatchEvent(t)):t={promise:i,reason:e},!d4&&(n=an["on"+r])?n(t):r===P0&&l4("Unhandled promise rejection",e)},b4=function(r){Io(w0,an,function(){var i=r.facade,e=r.value,t=by(r),n;if(t&&(n=u4(function(){yl?Yf.emit("unhandledRejection",e,i):R0(P0,i,e)}),r.rejection=yl||by(r)?k0:Xf,n.error))throw n.value})},by=function(r){return r.rejection!==Xf&&!r.parent},$4=function(r){Io(w0,an,function(){var i=r.facade;yl?Yf.emit("rejectionHandled",i):R0(g4,i,r.value)})},Ti=function(r,i,e){return function(t){r(i,t,e)}},Ai=function(r,i,e){r.done||(r.done=!0,e&&(r=e),r.value=i,r.state=y4,A0(r,!0))},Ic=function(r,i,e){if(!r.done){r.done=!0,e&&(r=e);try{if(r.facade===i)throw new T0("Promise can't be resolved itself");var t=C0(i);t?qf(function(){var n={done:!1};try{Io(t,i,Ti(Ic,n,r),Ti(Ai,n,r))}catch(a){Ai(n,a,r)}}):(r.value=i,r.state=I0,A0(r,!1))}catch(n){Ai({done:!1},n,r)}}};O0&&(Oi=function(i){o4(this,Bh),i4(i),Io(ms,this);var e=Fh(this);try{i(Ti(Ic,e),Ti(Ai,e))}catch(t){Ai(e,t)}},Bh=Oi.prototype,ms=function(i){c4(this,{type:su,done:!1,notified:!1,parent:!1,reactions:new h4,rejection:!1,state:yy,value:void 0})},ms.prototype=t4(Bh,"then",function(i,e){var t=Fh(this),n=Pc(s4(this,Oi));return t.parent=!0,n.ok=Sc(i)?i:!0,n.fail=Sc(e)&&e,n.domain=yl?Yf.domain:void 0,t.state===yy?t.reactions.add(n):qf(function(){x0(n,t)}),n.promise}),my=function(){var r=new ms,i=Fh(r);this.promise=r,this.resolve=Ti(Ic,i),this.reject=Ti(Ai,i)},S0.f=Pc=function(r){return r===Oi||r===m4?new my(r):v4(r)});e4({global:!0,constructor:!0,wrap:!0,forced:O0},{Promise:Oi});r4(Oi,su,!1,!0);n4(su);var w4=ua,_4=Gw,E4=Po.CONSTRUCTOR,lu=E4||!_4(function(r){w4.all(r).then(void 0,function(){})}),S4=V,O4=Ge,T4=It,P4=br,I4=la,k4=Jn,C4=lu;S4({target:"Promise",stat:!0,forced:C4},{all:function(i){var e=this,t=P4.f(e),n=t.resolve,a=t.reject,o=I4(function(){var s=T4(e.resolve),l=[],u=0,h=1;k4(i,function(d){var c=u++,f=!1;h++,O4(s,e,d).then(function(v){f||(f=!0,l[c]=v,--h||n(l))},a)}),--h||n(l)});return o.error&&a(o.value),t.promise}});var x4=V,A4=Po.CONSTRUCTOR,$y=ua;$y&&$y.prototype;x4({target:"Promise",proto:!0,forced:A4,real:!0},{catch:function(r){return this.then(void 0,r)}});var R4=V,D4=Ge,M4=It,N4=br,F4=la,B4=Jn,L4=lu;R4({target:"Promise",stat:!0,forced:L4},{race:function(i){var e=this,t=N4.f(e),n=t.reject,a=F4(function(){var o=M4(e.resolve);B4(i,function(s){D4(o,e,s).then(t.resolve,n)})});return a.error&&n(a.value),t.promise}});var j4=V,z4=Ge,H4=br,W4=Po.CONSTRUCTOR;j4({target:"Promise",stat:!0,forced:W4},{reject:function(i){var e=H4.f(this);return z4(e.reject,void 0,i),e.promise}});var V4=Bt,U4=rt,G4=br,D0=function(r,i){if(V4(r),U4(i)&&i.constructor===r)return i;var e=G4.f(r),t=e.resolve;return t(i),e.promise},K4=V,q4=yt,Y4=iI,X4=ua,Q4=Po.CONSTRUCTOR,J4=D0,Z4=q4("Promise"),eW=!Q4;K4({target:"Promise",stat:!0,forced:Y4},{resolve:function(i){return J4(eW&&this===Z4?X4:this,i)}});var tW=V,rW=Ge,nW=It,iW=br,aW=la,oW=Jn,sW=lu;tW({target:"Promise",stat:!0,forced:sW},{allSettled:function(i){var e=this,t=iW.f(e),n=t.resolve,a=t.reject,o=aW(function(){var s=nW(e.resolve),l=[],u=0,h=1;oW(i,function(d){var c=u++,f=!1;h++,rW(s,e,d).then(function(v){f||(f=!0,l[c]={status:"fulfilled",value:v},--h||n(l))},function(v){f||(f=!0,l[c]={status:"rejected",reason:v},--h||n(l))})}),--h||n(l)});return o.error&&a(o.value),t.promise}});var lW=V,uW=Ge,hW=It,dW=yt,cW=br,fW=la,vW=Jn,pW=lu,wy="No one promise resolved";lW({target:"Promise",stat:!0,forced:pW},{any:function(i){var e=this,t=dW("AggregateError"),n=cW.f(e),a=n.resolve,o=n.reject,s=fW(function(){var l=hW(e.resolve),u=[],h=0,d=1,c=!1;vW(i,function(f){var v=h++,p=!1;d++,uW(l,e,f).then(function(g){p||c||(c=!0,a(g))},function(g){p||c||(p=!0,u[v]=g,--d||o(new t(u,wy)))})}),--d||o(new t(u,wy))});return s.error&&o(s.value),n.promise}});var gW=V,kc=ua,yW=se,mW=yt,bW=Oe,$W=f0,_y=D0,wW=kc&&kc.prototype,_W=!!kc&&yW(function(){wW.finally.call({then:function(){}},function(){})});gW({target:"Promise",proto:!0,real:!0,forced:_W},{finally:function(r){var i=$W(this,mW("Promise")),e=bW(r);return this.then(e?function(t){return _y(i,r()).then(function(){return t})}:r,e?function(t){return _y(i,r()).then(function(){throw t})}:r)}});var EW=me,SW=EW.Promise,OW=SW,TW=OW,PW=V,IW=br;PW({target:"Promise",stat:!0},{withResolvers:function(){var i=IW.f(this);return{promise:i.promise,resolve:i.resolve,reject:i.reject}}});var kW=TW,CW=kW,xW=V,AW=br,RW=la;xW({target:"Promise",stat:!0,forced:!0},{try:function(r){var i=AW.f(this),e=RW(r);return(e.error?i.reject:i.resolve)(e.value),i.promise}});var DW=CW,MW=DW,NW=MW,FW=o_,BW=FW,LW=BW,jW=LW,zW=jW;(function(r){var i=v5.default,e=D1,t=xf,n=n0,a=o0,o=b5,s=Zw,l=i0,u=NW,h=zW,d=t_;function c(){r.exports=c=function(){return v},r.exports.__esModule=!0,r.exports.default=r.exports;var f,v={},p=Object.prototype,g=p.hasOwnProperty,y=e||function(D,P,I){D[P]=I.value},m=typeof t=="function"?t:{},w=m.iterator||"@@iterator",b=m.asyncIterator||"@@asyncIterator",_=m.toStringTag||"@@toStringTag";function E(D,P,I){return e(D,P,{value:I,enumerable:!0,configurable:!0,writable:!0}),D[P]}try{E({},"")}catch{E=function(I,H,J){return I[H]=J}}function R(D,P,I,H){var J=P&&P.prototype instanceof be?P:be,X=n(J.prototype),xe=new Dt(H||[]);return y(X,"_invoke",{value:Me(D,I,xe)}),X}function M(D,P,I){try{return{type:"normal",arg:D.call(P,I)}}catch(H){return{type:"throw",arg:H}}}v.wrap=R;var A="suspendedStart",N="suspendedYield",F="executing",W="completed",Y={};function be(){}function Je(){}function De(){}var At={};E(At,w,function(){return this});var ht=a,nt=ht&&ht(ht(ot([])));nt&&nt!==p&&g.call(nt,w)&&(At=nt);var Rt=De.prototype=be.prototype=n(At);function it(D){var P;o(P=["next","throw","return"]).call(P,function(I){E(D,I,function(H){return this._invoke(I,H)})})}function pe(D,P){function I(J,X,xe,dt){var mt=M(D[J],D,X);if(mt.type!=="throw"){var yn=mt.arg,jr=yn.value;return jr&&i(jr)=="object"&&g.call(jr,"__await")?P.resolve(jr.__await).then(function(mn){I("next",mn,xe,dt)},function(mn){I("throw",mn,xe,dt)}):P.resolve(jr).then(function(mn){yn.value=mn,xe(yn)},function(mn){return I("throw",mn,xe,dt)})}dt(mt.arg)}var H;y(this,"_invoke",{value:function(X,xe){function dt(){return new P(function(mt,yn){I(X,xe,mt,yn)})}return H=H?H.then(dt,dt):dt()}})}function Me(D,P,I){var H=A;return function(J,X){if(H===F)throw new Error("Generator is already running");if(H===W){if(J==="throw")throw X;return{value:f,done:!0}}for(I.method=J,I.arg=X;;){var xe=I.delegate;if(xe){var dt=Ce(xe,I);if(dt){if(dt===Y)continue;return dt}}if(I.method==="next")I.sent=I._sent=I.arg;else if(I.method==="throw"){if(H===A)throw H=W,I.arg;I.dispatchException(I.arg)}else I.method==="return"&&I.abrupt("return",I.arg);H=F;var mt=M(D,P,I);if(mt.type==="normal"){if(H=I.done?W:N,mt.arg===Y)continue;return{value:mt.arg,done:I.done}}mt.type==="throw"&&(H=W,I.method="throw",I.arg=mt.arg)}}}function Ce(D,P){var I=P.method,H=D.iterator[I];if(H===f)return P.delegate=null,I==="throw"&&D.iterator.return&&(P.method="return",P.arg=f,Ce(D,P),P.method==="throw")||I!=="return"&&(P.method="throw",P.arg=new TypeError("The iterator does not provide a '"+I+"' method")),Y;var J=M(H,D.iterator,P.arg);if(J.type==="throw")return P.method="throw",P.arg=J.arg,P.delegate=null,Y;var X=J.arg;return X?X.done?(P[D.resultName]=X.value,P.next=D.nextLoc,P.method!=="return"&&(P.method="next",P.arg=f),P.delegate=null,Y):X:(P.method="throw",P.arg=new TypeError("iterator result is not an object"),P.delegate=null,Y)}function at(D){var P,I={tryLoc:D[0]};1 in D&&(I.catchLoc=D[1]),2 in D&&(I.finallyLoc=D[2],I.afterLoc=D[3]),s(P=this.tryEntries).call(P,I)}function _r(D){var P=D.completion||{};P.type="normal",delete P.arg,D.completion=P}function Dt(D){this.tryEntries=[{tryLoc:"root"}],o(D).call(D,at,this),this.reset(!0)}function ot(D){if(D||D===""){var P=D[w];if(P)return P.call(D);if(typeof D.next=="function")return D;if(!isNaN(D.length)){var I=-1,H=function J(){for(;++I<D.length;)if(g.call(D,I))return J.value=D[I],J.done=!1,J;return J.value=f,J.done=!0,J};return H.next=H}}throw new TypeError(i(D)+" is not iterable")}return Je.prototype=De,y(Rt,"constructor",{value:De,configurable:!0}),y(De,"constructor",{value:Je,configurable:!0}),Je.displayName=E(De,_,"GeneratorFunction"),v.isGeneratorFunction=function(D){var P=typeof D=="function"&&D.constructor;return!!P&&(P===Je||(P.displayName||P.name)==="GeneratorFunction")},v.mark=function(D){return l?l(D,De):(D.__proto__=De,E(D,_,"GeneratorFunction")),D.prototype=n(Rt),D},v.awrap=function(D){return{__await:D}},it(pe.prototype),E(pe.prototype,b,function(){return this}),v.AsyncIterator=pe,v.async=function(D,P,I,H,J){J===void 0&&(J=u);var X=new pe(R(D,P,I,H),J);return v.isGeneratorFunction(P)?X:X.next().then(function(xe){return xe.done?xe.value:X.next()})},it(Rt),E(Rt,_,"Generator"),E(Rt,w,function(){return this}),E(Rt,"toString",function(){return"[object Generator]"}),v.keys=function(D){var P=Object(D),I=[];for(var H in P)s(I).call(I,H);return h(I).call(I),function J(){for(;I.length;){var X=I.pop();if(X in P)return J.value=X,J.done=!1,J}return J.done=!0,J}},v.values=ot,Dt.prototype={constructor:Dt,reset:function(P){var I;if(this.prev=0,this.next=0,this.sent=this._sent=f,this.done=!1,this.delegate=null,this.method="next",this.arg=f,o(I=this.tryEntries).call(I,_r),!P)for(var H in this)H.charAt(0)==="t"&&g.call(this,H)&&!isNaN(+d(H).call(H,1))&&(this[H]=f)},stop:function(){this.done=!0;var P=this.tryEntries[0].completion;if(P.type==="throw")throw P.arg;return this.rval},dispatchException:function(P){if(this.done)throw P;var I=this;function H(yn,jr){return xe.type="throw",xe.arg=P,I.next=yn,jr&&(I.method="next",I.arg=f),!!jr}for(var J=this.tryEntries.length-1;J>=0;--J){var X=this.tryEntries[J],xe=X.completion;if(X.tryLoc==="root")return H("end");if(X.tryLoc<=this.prev){var dt=g.call(X,"catchLoc"),mt=g.call(X,"finallyLoc");if(dt&&mt){if(this.prev<X.catchLoc)return H(X.catchLoc,!0);if(this.prev<X.finallyLoc)return H(X.finallyLoc)}else if(dt){if(this.prev<X.catchLoc)return H(X.catchLoc,!0)}else{if(!mt)throw new Error("try statement without catch or finally");if(this.prev<X.finallyLoc)return H(X.finallyLoc)}}}},abrupt:function(P,I){for(var H=this.tryEntries.length-1;H>=0;--H){var J=this.tryEntries[H];if(J.tryLoc<=this.prev&&g.call(J,"finallyLoc")&&this.prev<J.finallyLoc){var X=J;break}}X&&(P==="break"||P==="continue")&&X.tryLoc<=I&&I<=X.finallyLoc&&(X=null);var xe=X?X.completion:{};return xe.type=P,xe.arg=I,X?(this.method="next",this.next=X.finallyLoc,Y):this.complete(xe)},complete:function(P,I){if(P.type==="throw")throw P.arg;return P.type==="break"||P.type==="continue"?this.next=P.arg:P.type==="return"?(this.rval=this.arg=P.arg,this.method="return",this.next="end"):P.type==="normal"&&I&&(this.next=I),Y},finish:function(P){for(var I=this.tryEntries.length-1;I>=0;--I){var H=this.tryEntries[I];if(H.finallyLoc===P)return this.complete(H.completion,H.afterLoc),_r(H),Y}},catch:function(P){for(var I=this.tryEntries.length-1;I>=0;--I){var H=this.tryEntries[I];if(H.tryLoc===P){var J=H.completion;if(J.type==="throw"){var X=J.arg;_r(H)}return X}}throw new Error("illegal catch attempt")},delegateYield:function(P,I,H){return this.delegate={iterator:ot(P),resultName:I,nextLoc:H},this.method==="next"&&(this.arg=f),Y}},v}r.exports=c,r.exports.__esModule=!0,r.exports.default=r.exports})(s0);var HW=s0.exports,Gs=HW(),WW=Gs;try{regeneratorRuntime=Gs}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Gs:Function("r","regeneratorRuntime = r")(Gs)}var $t=K(WW),M0={exports:{}},VW=se,UW=VW(function(){if(typeof ArrayBuffer=="function"){var r=new ArrayBuffer(8);Object.isExtensible(r)&&Object.defineProperty(r,"a",{value:8})}}),GW=se,KW=rt,qW=un,Ey=UW,Ks=Object.isExtensible,YW=GW(function(){Ks(1)}),XW=YW||Ey?function(i){return!KW(i)||Ey&&qW(i)==="ArrayBuffer"?!1:Ks?Ks(i):!0}:Ks,QW=se,JW=!QW(function(){return Object.isExtensible(Object.preventExtensions({}))}),ZW=V,e6=ge,t6=fo,r6=rt,Qf=je,n6=Ct.f,Sy=vo,i6=wf,Jf=XW,a6=Nl,o6=JW,N0=!1,Dr=a6("meta"),s6=0,Zf=function(r){n6(r,Dr,{value:{objectID:"O"+s6++,weakData:{}}})},l6=function(r,i){if(!r6(r))return typeof r=="symbol"?r:(typeof r=="string"?"S":"P")+r;if(!Qf(r,Dr)){if(!Jf(r))return"F";if(!i)return"E";Zf(r)}return r[Dr].objectID},u6=function(r,i){if(!Qf(r,Dr)){if(!Jf(r))return!0;if(!i)return!1;Zf(r)}return r[Dr].weakData},h6=function(r){return o6&&N0&&Jf(r)&&!Qf(r,Dr)&&Zf(r),r},d6=function(){c6.enable=function(){},N0=!0;var r=Sy.f,i=e6([].splice),e={};e[Dr]=1,r(e).length&&(Sy.f=function(t){for(var n=r(t),a=0,o=n.length;a<o;a++)if(n[a]===Dr){i(n,a,1);break}return n},ZW({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:i6.f}))},c6=M0.exports={enable:d6,fastKey:l6,getWeakData:u6,onFreeze:h6};t6[Dr]=!0;var F0=M0.exports,f6=V,v6=ye,p6=F0,g6=se,y6=Fr,m6=Jn,b6=Gf,$6=Oe,w6=rt,_6=Qi,E6=Xn,S6=Ct.f,O6=aa.forEach,T6=Ue,B0=ia,P6=B0.set,I6=B0.getterFor,L0=function(r,i,e){var t=r.indexOf("Map")!==-1,n=r.indexOf("Weak")!==-1,a=t?"set":"add",o=v6[r],s=o&&o.prototype,l={},u;if(!T6||!$6(o)||!(n||s.forEach&&!g6(function(){new o().entries().next()})))u=e.getConstructor(i,r,t,a),p6.enable();else{u=i(function(c,f){P6(b6(c,h),{type:r,collection:new o}),_6(f)||m6(f,c[a],{that:c,AS_ENTRIES:t})});var h=u.prototype,d=I6(r);O6(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(c){var f=c==="add"||c==="set";c in s&&!(n&&c==="clear")&&y6(h,c,function(v,p){var g=d(this).collection;if(!f&&n&&!w6(v))return c==="get"?void 0:!1;var y=g[c](v===0?0:v,p);return f?this:y})}),n||S6(h,"size",{configurable:!0,get:function(){return d(this).collection.size}})}return E6(u,r,!1,!0),l[r]=u,f6({global:!0,forced:!0},l),n||e.setStrong(u,r,t),u},k6=na,C6=function(r,i,e){for(var t in i)e&&e.unsafe&&r[t]?r[t]=i[t]:k6(r,t,i[t],e);return r},x6=Yn,A6=_f,Oy=C6,R6=dn,D6=Gf,M6=Qi,N6=Jn,F6=If,bs=kf,B6=c0,Sa=Ue,Ty=F0.fastKey,j0=ia,Py=j0.set,Lh=j0.getterFor,z0={getConstructor:function(r,i,e,t){var n=r(function(u,h){D6(u,a),Py(u,{type:i,index:x6(null),first:void 0,last:void 0,size:0}),Sa||(u.size=0),M6(h)||N6(h,u[t],{that:u,AS_ENTRIES:e})}),a=n.prototype,o=Lh(i),s=function(u,h,d){var c=o(u),f=l(u,h),v,p;return f?f.value=d:(c.last=f={index:p=Ty(h,!0),key:h,value:d,previous:v=c.last,next:void 0,removed:!1},c.first||(c.first=f),v&&(v.next=f),Sa?c.size++:u.size++,p!=="F"&&(c.index[p]=f)),u},l=function(u,h){var d=o(u),c=Ty(h),f;if(c!=="F")return d.index[c];for(f=d.first;f;f=f.next)if(f.key===h)return f};return Oy(a,{clear:function(){for(var h=this,d=o(h),c=d.index,f=d.first;f;)f.removed=!0,f.previous&&(f.previous=f.previous.next=void 0),delete c[f.index],f=f.next;d.first=d.last=void 0,Sa?d.size=0:h.size=0},delete:function(u){var h=this,d=o(h),c=l(h,u);if(c){var f=c.next,v=c.previous;delete d.index[c.index],c.removed=!0,v&&(v.next=f),f&&(f.previous=v),d.first===c&&(d.first=f),d.last===c&&(d.last=v),Sa?d.size--:h.size--}return!!c},forEach:function(h){for(var d=o(this),c=R6(h,arguments.length>1?arguments[1]:void 0),f;f=f?f.next:d.first;)for(c(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(h){return!!l(this,h)}}),Oy(a,e?{get:function(h){var d=l(this,h);return d&&d.value},set:function(h,d){return s(this,h===0?0:h,d)}}:{add:function(h){return s(this,h=h===0?0:h,h)}}),Sa&&A6(a,"size",{configurable:!0,get:function(){return o(this).size}}),n},setStrong:function(r,i,e){var t=i+" Iterator",n=Lh(i),a=Lh(t);F6(r,i,function(o,s){Py(this,{type:t,target:o,state:n(o),kind:s,last:void 0})},function(){for(var o=a(this),s=o.kind,l=o.last;l&&l.removed;)l=l.previous;return!o.target||!(o.last=l=l?l.next:o.state.first)?(o.target=void 0,bs(void 0,!0)):bs(s==="keys"?l.key:s==="values"?l.value:[l.key,l.value],!1)},e?"entries":"values",!e,!0),B6(i)}},L6=L0,j6=z0;L6("Map",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},j6);var z6=me,H6=z6.Map,W6=H6,V6=W6,U6=V6,H0=K(U6),G6=V,K6=aa.some,q6=eu,Y6=q6("some");G6({target:"Array",proto:!0,forced:!Y6},{some:function(i){return K6(this,i,arguments.length>1?arguments[1]:void 0)}});var X6=ut,Q6=X6("Array","some"),J6=Le,Z6=Q6,jh=Array.prototype,e8=function(r){var i=r.some;return r===jh||J6(jh,r)&&i===jh.some?Z6:i},t8=e8,r8=t8,n8=r8,i8=K(n8),a8=ut,o8=a8("Array","keys"),s8=o8,l8=s8,u8=Br,h8=je,d8=Le,c8=l8,zh=Array.prototype,f8={DOMTokenList:!0,NodeList:!0},v8=function(r){var i=r.keys;return r===zh||d8(zh,r)&&i===zh.keys||h8(f8,u8(r))?c8:i},p8=v8,ci=K(p8),Iy=G1,g8=Math.floor,Cc=function(r,i){var e=r.length,t=g8(e/2);return e<8?y8(r,i):m8(r,Cc(Iy(r,0,t),i),Cc(Iy(r,t),i),i)},y8=function(r,i){for(var e=r.length,t=1,n,a;t<e;){for(a=t,n=r[t];a&&i(r[a-1],n)>0;)r[a]=r[--a];a!==t++&&(r[a]=n)}return r},m8=function(r,i,e,t){for(var n=i.length,a=e.length,o=0,s=0;o<n||s<a;)r[o+s]=o<n&&s<a?t(i[o],e[s])<=0?i[o++]:e[s++]:o<n?i[o++]:e[s++];return r},b8=Cc,$8=hn,ky=$8.match(/firefox\/(\d+)/i),w8=!!ky&&+ky[1],_8=hn,E8=/MSIE|Trident/.test(_8),S8=hn,Cy=S8.match(/AppleWebKit\/(\d+)\./),O8=!!Cy&&+Cy[1],T8=V,W0=ge,P8=It,I8=kt,xy=Lt,k8=s_,Ay=qn,ev=se,C8=b8,x8=eu,Ry=w8,A8=E8,Dy=Ji,My=O8,qr=[],Ny=W0(qr.sort),R8=W0(qr.push),D8=ev(function(){qr.sort(void 0)}),M8=ev(function(){qr.sort(null)}),N8=x8("sort"),V0=!ev(function(){if(Dy)return Dy<70;if(!(Ry&&Ry>3)){if(A8)return!0;if(My)return My<603;var r="",i,e,t,n;for(i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(n=0;n<47;n++)qr.push({k:e+n,v:t})}for(qr.sort(function(a,o){return o.v-a.v}),n=0;n<qr.length;n++)e=qr[n].k.charAt(0),r.charAt(r.length-1)!==e&&(r+=e);return r!=="DGBEFHACIJK"}}),F8=D8||!M8||!N8||!V0,B8=function(r){return function(i,e){return e===void 0?-1:i===void 0?1:r!==void 0?+r(i,e)||0:Ay(i)>Ay(e)?1:-1}};T8({target:"Array",proto:!0,forced:F8},{sort:function(i){i!==void 0&&P8(i);var e=I8(this);if(V0)return i===void 0?Ny(e):Ny(e,i);var t=[],n=xy(e),a,o;for(o=0;o<n;o++)o in e&&R8(t,e[o]);for(C8(t,B8(i)),a=xy(t),o=0;o<a;)e[o]=t[o++];for(;o<n;)k8(e,o++);return e}});var L8=ut,j8=L8("Array","sort"),z8=Le,H8=j8,Hh=Array.prototype,W8=function(r){var i=r.sort;return r===Hh||z8(Hh,r)&&i===Hh.sort?H8:i},V8=W8,U8=V8,G8=U8,xc=K(G8),K8=ut,q8=K8("Array","values"),Y8=q8,X8=Y8,Q8=Br,J8=je,Z8=Le,eV=X8,Wh=Array.prototype,tV={DOMTokenList:!0,NodeList:!0},rV=function(r){var i=r.values;return r===Wh||Z8(Wh,r)&&i===Wh.values||J8(tV,Q8(r))?eV:i},nV=rV,Fy=K(nV),iV=Rw,Pi=K(iV),aV=ut,oV=aV("Array","entries"),sV=oV,lV=sV,uV=Br,hV=je,dV=Le,cV=lV,Vh=Array.prototype,fV={DOMTokenList:!0,NodeList:!0},vV=function(r){var i=r.entries;return r===Vh||dV(Vh,r)&&i===Vh.entries||hV(fV,uV(r))?cV:i},pV=vV,gV=K(pV);let $s;const yV=new Uint8Array(16);function mV(){if(!$s&&($s=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!$s))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $s(yV)}const Ze=[];for(let r=0;r<256;++r)Ze.push((r+256).toString(16).slice(1));function bV(r,i=0){return Ze[r[i+0]]+Ze[r[i+1]]+Ze[r[i+2]]+Ze[r[i+3]]+"-"+Ze[r[i+4]]+Ze[r[i+5]]+"-"+Ze[r[i+6]]+Ze[r[i+7]]+"-"+Ze[r[i+8]]+Ze[r[i+9]]+"-"+Ze[r[i+10]]+Ze[r[i+11]]+Ze[r[i+12]]+Ze[r[i+13]]+Ze[r[i+14]]+Ze[r[i+15]]}const $V=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var By={randomUUID:$V};function wV(r,i,e){if(By.randomUUID&&!i&&!r)return By.randomUUID();r=r||{};const t=r.random||(r.rng||mV)();if(t[6]=t[6]&15|64,t[8]=t[8]&63|128,i){e=e||0;for(let n=0;n<16;++n)i[e+n]=t[n];return i}return bV(t)}function Ly(r){return typeof r=="string"||typeof r=="number"}var _V=function(){function r(i){Rl(this,r),Jr(this,"_queue",[]),Jr(this,"_timeout",null),Jr(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(i)}return Zl(r,[{key:"setOptions",value:function(e){e&&typeof e.delay<"u"&&(this.delay=e.delay),e&&typeof e.max<"u"&&(this.max=e.max),this._flushIfNeeded()}},{key:"destroy",value:function(){if(this.flush(),this._extended){for(var e=this._extended.object,t=this._extended.methods,n=0;n<t.length;n++){var a=t[n];a.original?e[a.name]=a.original:delete e[a.name]}this._extended=null}}},{key:"replace",value:function(e,t){var n=this,a=e[t];if(!a)throw new Error("Method "+t+" undefined");e[t]=function(){for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];n.queue({args:s,fn:a,context:this})}}},{key:"queue",value:function(e){typeof e=="function"?this._queue.push({fn:e}):this._queue.push(e),this._flushIfNeeded()}},{key:"_flushIfNeeded",value:function(){var e=this;this._queue.length>this.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=Yj(function(){e.flush()},this.delay))}},{key:"flush",value:function(){var e,t;Fn(e=l_(t=this._queue).call(t,0)).call(e,function(n){n.fn.apply(n.context||n.fn,n.args||[])})}}],[{key:"extend",value:function(e,t){var n=new r(t);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=function(){n.flush()};var a=[{name:"flush",original:void 0}];if(t&&t.replace)for(var o=0;o<t.replace.length;o++){var s=t.replace[o];a.push({name:s,original:e[s]}),n.replace(e,s)}return n._extended={object:e,methods:a},n}}]),r}(),EV=function(){function r(){Rl(this,r),Jr(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),Jr(this,"subscribe",r.prototype.on),Jr(this,"unsubscribe",r.prototype.off)}return Zl(r,[{key:"_trigger",value:function(e,t,n){var a,o;if(e==="*")throw new Error("Cannot trigger event *");Fn(a=nu(o=[]).call(o,Et(this._subscribers[e]),Et(this._subscribers["*"]))).call(a,function(s){s(e,t,n??null)})}},{key:"on",value:function(e,t){typeof t=="function"&&this._subscribers[e].push(t)}},{key:"off",value:function(e,t){var n;this._subscribers[e]=_i(n=this._subscribers[e]).call(n,function(a){return a!==t})}}]),r}(),SV=L0,OV=z0;SV("Set",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},OV);var TV=me,PV=TV.Set,IV=PV,kV=IV,CV=kV,Uh=K(CV),xV=Rf,AV=xV,RV=AV,DV=RV,MV=DV,NV=MV,FV=NV,BV=FV,LV=BV,jV=LV,Gh=K(jV);function lr(r,i){var e=typeof ru<"u"&&Mf(r)||r["@@iterator"];if(!e){if(Nt(r)||(e=zV(r))||i&&r&&typeof r.length=="number"){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
36
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function zV(r,i){var e;if(r){if(typeof r=="string")return jy(r,i);var t=iu(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Df(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return jy(r,i)}}function jy(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}var zy=function(r){function i(e){Rl(this,i),this._pairs=e}return Zl(i,[{key:r,value:$t.mark(function e(){var t,n,a,o,s;return $t.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:t=lr(this._pairs),u.prev=1,t.s();case 3:if((n=t.n()).done){u.next=9;break}return a=bt(n.value,2),o=a[0],s=a[1],u.next=7,[o,s];case 7:u.next=3;break;case 9:u.next=14;break;case 11:u.prev=11,u.t0=u.catch(1),t.e(u.t0);case 14:return u.prev=14,t.f(),u.finish(14);case 17:case"end":return u.stop()}},e,this,[[1,11,14,17]])})},{key:"entries",value:$t.mark(function e(){var t,n,a,o,s;return $t.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:t=lr(this._pairs),u.prev=1,t.s();case 3:if((n=t.n()).done){u.next=9;break}return a=bt(n.value,2),o=a[0],s=a[1],u.next=7,[o,s];case 7:u.next=3;break;case 9:u.next=14;break;case 11:u.prev=11,u.t0=u.catch(1),t.e(u.t0);case 14:return u.prev=14,t.f(),u.finish(14);case 17:case"end":return u.stop()}},e,this,[[1,11,14,17]])})},{key:"keys",value:$t.mark(function e(){var t,n,a,o;return $t.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:t=lr(this._pairs),l.prev=1,t.s();case 3:if((n=t.n()).done){l.next=9;break}return a=bt(n.value,1),o=a[0],l.next=7,o;case 7:l.next=3;break;case 9:l.next=14;break;case 11:l.prev=11,l.t0=l.catch(1),t.e(l.t0);case 14:return l.prev=14,t.f(),l.finish(14);case 17:case"end":return l.stop()}},e,this,[[1,11,14,17]])})},{key:"values",value:$t.mark(function e(){var t,n,a,o;return $t.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:t=lr(this._pairs),l.prev=1,t.s();case 3:if((n=t.n()).done){l.next=9;break}return a=bt(n.value,2),o=a[1],l.next=7,o;case 7:l.next=3;break;case 9:l.next=14;break;case 11:l.prev=11,l.t0=l.catch(1),t.e(l.t0);case 14:return l.prev=14,t.f(),l.finish(14);case 17:case"end":return l.stop()}},e,this,[[1,11,14,17]])})},{key:"toIdArray",value:function(){var t;return Zt(t=Et(this._pairs)).call(t,function(n){return n[0]})}},{key:"toItemArray",value:function(){var t;return Zt(t=Et(this._pairs)).call(t,function(n){return n[1]})}},{key:"toEntryArray",value:function(){return Et(this._pairs)}},{key:"toObjectMap",value:function(){var t=Oj(null),n=lr(this._pairs),a;try{for(n.s();!(a=n.n()).done;){var o=bt(a.value,2),s=o[0],l=o[1];t[s]=l}}catch(u){n.e(u)}finally{n.f()}return t}},{key:"toMap",value:function(){return new H0(this._pairs)}},{key:"toIdSet",value:function(){return new Uh(this.toIdArray())}},{key:"toItemSet",value:function(){return new Uh(this.toItemArray())}},{key:"cache",value:function(){return new i(Et(this._pairs))}},{key:"distinct",value:function(t){var n=new Uh,a=lr(this._pairs),o;try{for(a.s();!(o=a.n()).done;){var s=bt(o.value,2),l=s[0],u=s[1];n.add(t(u,l))}}catch(h){a.e(h)}finally{a.f()}return n}},{key:"filter",value:function(t){var n=this._pairs;return new i({[Pi](){return $t.mark(function a(){var o,s,l,u,h;return $t.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:o=lr(n),c.prev=1,o.s();case 3:if((s=o.n()).done){c.next=10;break}if(l=bt(s.value,2),u=l[0],h=l[1],!t(h,u)){c.next=8;break}return c.next=8,[u,h];case 8:c.next=3;break;case 10:c.next=15;break;case 12:c.prev=12,c.t0=c.catch(1),o.e(c.t0);case 15:return c.prev=15,o.f(),c.finish(15);case 18:case"end":return c.stop()}},a,null,[[1,12,15,18]])})()}})}},{key:"forEach",value:function(t){var n=lr(this._pairs),a;try{for(n.s();!(a=n.n()).done;){var o=bt(a.value,2),s=o[0],l=o[1];t(l,s)}}catch(u){n.e(u)}finally{n.f()}}},{key:"map",value:function(t){var n=this._pairs;return new i({[Pi](){return $t.mark(function a(){var o,s,l,u,h;return $t.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:o=lr(n),c.prev=1,o.s();case 3:if((s=o.n()).done){c.next=9;break}return l=bt(s.value,2),u=l[0],h=l[1],c.next=7,[u,t(h,u)];case 7:c.next=3;break;case 9:c.next=14;break;case 11:c.prev=11,c.t0=c.catch(1),o.e(c.t0);case 14:return c.prev=14,o.f(),c.finish(14);case 17:case"end":return c.stop()}},a,null,[[1,11,14,17]])})()}})}},{key:"max",value:function(t){var n=Gh(this._pairs),a=n.next();if(a.done)return null;for(var o=a.value[1],s=t(a.value[1],a.value[0]);!(a=n.next()).done;){var l=bt(a.value,2),u=l[0],h=l[1],d=t(h,u);d>s&&(s=d,o=h)}return o}},{key:"min",value:function(t){var n=Gh(this._pairs),a=n.next();if(a.done)return null;for(var o=a.value[1],s=t(a.value[1],a.value[0]);!(a=n.next()).done;){var l=bt(a.value,2),u=l[0],h=l[1],d=t(h,u);d<s&&(s=d,o=h)}return o}},{key:"reduce",value:function(t,n){var a=lr(this._pairs),o;try{for(a.s();!(o=a.n()).done;){var s=bt(o.value,2),l=s[0],u=s[1];n=t(n,u,l)}}catch(h){a.e(h)}finally{a.f()}return n}},{key:"sort",value:function(t){var n=this;return new i({[Pi]:function(){var a;return Gh(xc(a=Et(n._pairs)).call(a,function(o,s){var l=bt(o,2),u=l[0],h=l[1],d=bt(s,2),c=d[0],f=d[1];return t(h,f,u,c)}))}})}}]),i}(Pi);function Hy(r,i){var e=Ff(r);if(Ug){var t=Ug(r);i&&(t=_i(t).call(t,function(n){return Z_(r,n).enumerable})),e.push.apply(e,t)}return e}function Wy(r){for(var i=1;i<arguments.length;i++){var e,t,n=arguments[i]!=null?arguments[i]:{};i%2?Fn(e=Hy(Object(n),!0)).call(e,function(a){Jr(r,a,n[a])}):Gg?L3(r,Gg(n)):Fn(t=Hy(Object(n))).call(t,function(a){z3(r,a,Z_(n,a))})}return r}function Kh(r,i){var e=typeof ru<"u"&&Mf(r)||r["@@iterator"];if(!e){if(Nt(r)||(e=HV(r))||i&&r&&typeof r.length=="number"){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
37
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function HV(r,i){var e;if(r){if(typeof r=="string")return Vy(r,i);var t=iu(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Df(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Vy(r,i)}}function Vy(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}function WV(r){var i=VV();return function(){var t=vl(r),n;if(i){var a=vl(this).constructor;n=Vs(t,arguments,a)}else n=t.apply(this,arguments);return u5(this,n)}}function VV(){if(typeof Reflect>"u"||!Vs||Vs.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Vs(Boolean,[],function(){})),!0}catch{return!1}}function UV(r,i){return r[i]==null&&(r[i]=wV()),r}var ml=function(r){l5(e,r);var i=WV(e);function e(t,n){var a;return Rl(this,e),a=i.call(this),Jr(r0(a),"_queue",null),t&&!Nt(t)&&(n=t,t=[]),a._options=n||{},a._data=new H0,a.length=0,a._idProp=a._options.fieldId||"id",t&&t.length&&a.add(t),a.setOptions(n),a}return Zl(e,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(n){n&&n.queue!==void 0&&(n.queue===!1?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=_V.extend(this,{replace:["add","update","remove"]})),n.queue&&typeof n.queue=="object"&&this._queue.setOptions(n.queue)))}},{key:"add",value:function(n,a){var o=this,s=[],l;if(Nt(n)){var u=Zt(n).call(n,function(c){return c[o._idProp]});if(i8(u).call(u,function(c){return o._data.has(c)}))throw new Error("A duplicate id was found in the parameter array.");for(var h=0,d=n.length;h<d;h++)l=this._addItem(n[h]),s.push(l)}else if(n&&typeof n=="object")l=this._addItem(n),s.push(l);else throw new Error("Unknown dataType");return s.length&&this._trigger("add",{items:s},a),s}},{key:"update",value:function(n,a){var o=this,s=[],l=[],u=[],h=[],d=this._idProp,c=function(y){var m=y[d];if(m!=null&&o._data.has(m)){var w=y,b=sj({},o._data.get(m)),_=o._updateItem(w);l.push(_),h.push(w),u.push(b)}else{var E=o._addItem(y);s.push(E)}};if(Nt(n))for(var f=0,v=n.length;f<v;f++)n[f]&&typeof n[f]=="object"?c(n[f]):console.warn("Ignoring input item, which is not an object at index "+f);else if(n&&typeof n=="object")c(n);else throw new Error("Unknown dataType");if(s.length&&this._trigger("add",{items:s},a),l.length){var p={items:l,oldData:u,data:h};this._trigger("update",p,a)}return nu(s).call(s,l)}},{key:"updateOnly",value:function(n,a){var o,s=this;Nt(n)||(n=[n]);var l=Zt(o=Zt(n).call(n,function(h){var d=s._data.get(h[s._idProp]);if(d==null)throw new Error("Updating non-existent items is not allowed.");return{oldData:d,update:h}})).call(o,function(h){var d=h.oldData,c=h.update,f=d[s._idProp],v=jz(d,c);return s._data.set(f,v),{id:f,oldData:d,updatedData:v}});if(l.length){var u={items:Zt(l).call(l,function(h){return h.id}),oldData:Zt(l).call(l,function(h){return h.oldData}),data:Zt(l).call(l,function(h){return h.updatedData})};return this._trigger("update",u,a),u.items}else return[]}},{key:"get",value:function(n,a){var o=void 0,s=void 0,l=void 0;Ly(n)?(o=n,l=a):Nt(n)?(s=n,l=a):l=n;var u=l&&l.returnType==="Object"?"Object":"Array",h=l&&_i(l),d=[],c=void 0,f=void 0,v=void 0;if(o!=null)c=this._data.get(o),c&&h&&!h(c)&&(c=void 0);else if(s!=null)for(var p=0,g=s.length;p<g;p++)c=this._data.get(s[p]),c!=null&&(!h||h(c))&&d.push(c);else{var y;f=Et(ci(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&&(!h||h(c))&&d.push(c)}if(l&&l.order&&o==null&&this._sort(d,l.order),l&&l.fields){var b=l.fields;if(o!=null&&c!=null)c=this._filterFields(c,b);else for(var _=0,E=d.length;_<E;_++)d[_]=this._filterFields(d[_],b)}if(u=="Object"){for(var R={},M=0,A=d.length;M<A;M++){var N=d[M],F=N[this._idProp];R[F]=N}return R}else if(o!=null){var W;return(W=c)!==null&&W!==void 0?W:null}else return d}},{key:"getIds",value:function(n){var a=this._data,o=n&&_i(n),s=n&&n.order,l=Et(ci(a).call(a)),u=[];if(o)if(s){for(var h=[],d=0,c=l.length;d<c;d++){var f=l[d],v=this._data.get(f);v!=null&&o(v)&&h.push(v)}this._sort(h,s);for(var p=0,g=h.length;p<g;p++)u.push(h[p][this._idProp])}else for(var y=0,m=l.length;y<m;y++){var w=l[y],b=this._data.get(w);b!=null&&o(b)&&u.push(b[this._idProp])}else if(s){for(var _=[],E=0,R=l.length;E<R;E++){var M=l[E];_.push(a.get(M))}this._sort(_,s);for(var A=0,N=_.length;A<N;A++)u.push(_[A][this._idProp])}else for(var F=0,W=l.length;F<W;F++){var Y=l[F],be=a.get(Y);be!=null&&u.push(be[this._idProp])}return u}},{key:"getDataSet",value:function(){return this}},{key:"forEach",value:function(n,a){var o=a&&_i(a),s=this._data,l=Et(ci(s).call(s));if(a&&a.order)for(var u=this.get(a),h=0,d=u.length;h<d;h++){var c=u[h],f=c[this._idProp];n(c,f)}else for(var v=0,p=l.length;v<p;v++){var g=l[v],y=this._data.get(g);y!=null&&(!o||o(y))&&n(y,g)}}},{key:"map",value:function(n,a){for(var o=a&&_i(a),s=[],l=this._data,u=Et(ci(l).call(l)),h=0,d=u.length;h<d;h++){var c=u[h],f=this._data.get(c);f!=null&&(!o||o(f))&&s.push(n(f,c))}return a&&a.order&&this._sort(s,a.order),s}},{key:"_filterFields",value:function(n,a){var o;return n&&E2(o=Nt(a)?a:Ff(a)).call(o,function(s,l){return s[l]=n[l],s},{})}},{key:"_sort",value:function(n,a){if(typeof a=="string"){var o=a;xc(n).call(n,function(s,l){var u=s[o],h=l[o];return u>h?1:u<h?-1:0})}else if(typeof a=="function")xc(n).call(n,a);else throw new TypeError("Order must be a function or a string")}},{key:"remove",value:function(n,a){for(var o=[],s=[],l=Nt(n)?n:[n],u=0,h=l.length;u<h;u++){var d=this._remove(l[u]);if(d){var c=d[this._idProp];c!=null&&(o.push(c),s.push(d))}}return o.length&&this._trigger("remove",{items:o,oldData:s},a),o}},{key:"_remove",value:function(n){var a;if(Ly(n)?a=n:n&&typeof n=="object"&&(a=n[this._idProp]),a!=null&&this._data.has(a)){var o=this._data.get(a)||null;return this._data.delete(a),--this.length,o}return null}},{key:"clear",value:function(n){for(var a,o=Et(ci(a=this._data).call(a)),s=[],l=0,u=o.length;l<u;l++)s.push(this._data.get(o[l]));return this._data.clear(),this.length=0,this._trigger("remove",{items:o,oldData:s},n),o}},{key:"max",value:function(n){var a,o=null,s=null,l=Kh(Fy(a=this._data).call(a)),u;try{for(l.s();!(u=l.n()).done;){var h=u.value,d=h[n];typeof d=="number"&&(s==null||d>s)&&(o=h,s=d)}}catch(c){l.e(c)}finally{l.f()}return o||null}},{key:"min",value:function(n){var a,o=null,s=null,l=Kh(Fy(a=this._data).call(a)),u;try{for(l.s();!(u=l.n()).done;){var h=u.value,d=h[n];typeof d=="number"&&(s==null||d<s)&&(o=h,s=d)}}catch(c){l.e(c)}finally{l.f()}return o||null}},{key:"distinct",value:function(n){for(var a=this._data,o=Et(ci(a).call(a)),s=[],l=0,u=0,h=o.length;u<h;u++){for(var d=o[u],c=a.get(d),f=c[n],v=!1,p=0;p<l;p++)if(s[p]==f){v=!0;break}!v&&f!==void 0&&(s[l]=f,l++)}return s}},{key:"_addItem",value:function(n){var a=UV(n,this._idProp),o=a[this._idProp];if(this._data.has(o))throw new Error("Cannot add item: item with id "+o+" already exists");return this._data.set(o,a),++this.length,o}},{key:"_updateItem",value:function(n){var a=n[this._idProp];if(a==null)throw new Error("Cannot update item: item has no id (item: "+xj(n)+")");var o=this._data.get(a);if(!o)throw new Error("Cannot update item: no item with id "+a+" found");return this._data.set(a,Wy(Wy({},o),n)),a}},{key:"stream",value:function(n){if(n){var a=this._data;return new zy({[Pi](){return $t.mark(function s(){var l,u,h,d;return $t.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:l=Kh(n),f.prev=1,l.s();case 3:if((u=l.n()).done){f.next=11;break}if(h=u.value,d=a.get(h),d==null){f.next=9;break}return f.next=9,[h,d];case 9:f.next=3;break;case 11:f.next=16;break;case 13:f.prev=13,f.t0=f.catch(1),l.e(f.t0);case 16:return f.prev=16,l.f(),f.finish(16);case 19:case"end":return f.stop()}},s,null,[[1,13,16,19]])})()}})}else{var o;return new zy({[Pi]:jw(o=gV(this._data)).call(o,this._data)})}}}]),e}(EV);function GV(r,i){return typeof i=="object"&&i!==null&&r===i.idProp&&typeof i.add=="function"&&typeof i.clear=="function"&&typeof i.distinct=="function"&&typeof Fn(i)=="function"&&typeof i.get=="function"&&typeof i.getDataSet=="function"&&typeof i.getIds=="function"&&typeof i.length=="number"&&typeof Zt(i)=="function"&&typeof i.max=="function"&&typeof i.min=="function"&&typeof i.off=="function"&&typeof i.on=="function"&&typeof i.remove=="function"&&typeof i.setOptions=="function"&&typeof i.stream=="function"&&typeof i.update=="function"&&typeof i.updateOnly=="function"}function U0(r,i){return typeof i=="object"&&i!==null&&r===i.idProp&&typeof Fn(i)=="function"&&typeof i.get=="function"&&typeof i.getDataSet=="function"&&typeof i.getIds=="function"&&typeof i.length=="number"&&typeof Zt(i)=="function"&&typeof i.off=="function"&&typeof i.on=="function"&&typeof i.stream=="function"&&GV(r,i.getDataSet())}/**
38
+ * vis-network
39
+ * https://visjs.github.io/vis-network/
40
+ *
41
+ * A dynamic, browser-based visualization library.
42
+ *
43
+ * @version 9.1.9
44
+ * @date 2023-11-03T01:42:27.418Z
45
+ *
46
+ * @copyright (c) 2011-2017 Almende B.V, http://almende.com
47
+ * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
48
+ *
49
+ * @license
50
+ * vis.js is dual licensed under both
51
+ *
52
+ * 1. The Apache 2.0 License
53
+ * http://www.apache.org/licenses/LICENSE-2.0
54
+ *
55
+ * and
56
+ *
57
+ * 2. The MIT License
58
+ * http://opensource.org/licenses/MIT
59
+ *
60
+ * vis.js may be distributed under either license.
61
+ */var qh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function z(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ws=function(r){return r&&r.Math===Math&&r},Pe=ws(typeof globalThis=="object"&&globalThis)||ws(typeof window=="object"&&window)||ws(typeof self=="object"&&self)||ws(typeof qh=="object"&&qh)||function(){return this}()||qh||Function("return this")(),ne=function(r){try{return!!r()}catch{return!0}},KV=ne,ko=!KV(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),qV=ko,G0=Function.prototype,Uy=G0.apply,Gy=G0.call,Co=typeof Reflect=="object"&&Reflect.apply||(qV?Gy.bind(Uy):function(){return Gy.apply(Uy,arguments)}),K0=ko,q0=Function.prototype,Ac=q0.call,YV=K0&&q0.bind.bind(Ac,Ac),ae=K0?YV:function(r){return function(){return Ac.apply(r,arguments)}},Y0=ae,XV=Y0({}.toString),QV=Y0("".slice),Lr=function(r){return QV(XV(r),8,-1)},JV=Lr,ZV=ae,tv=function(r){if(JV(r)==="Function")return ZV(r)},Rc=typeof document=="object"&&document.all,eU=typeof Rc>"u"&&Rc!==void 0,X0={all:Rc,IS_HTMLDDA:eU},Q0=X0,tU=Q0.all,Ke=Q0.IS_HTMLDDA?function(r){return typeof r=="function"||r===tU}:function(r){return typeof r=="function"},ha={},rU=ne,qe=!rU(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),nU=ko,_s=Function.prototype.call,jt=nU?_s.bind(_s):function(){return _s.apply(_s,arguments)},uu={},J0={}.propertyIsEnumerable,Z0=Object.getOwnPropertyDescriptor,iU=Z0&&!J0.call({1:2},1);uu.f=iU?function(i){var e=Z0(this,i);return!!e&&e.enumerable}:J0;var xo=function(r,i){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:i}},aU=ae,oU=ne,sU=Lr,Yh=Object,lU=aU("".split),hu=oU(function(){return!Yh("z").propertyIsEnumerable(0)})?function(r){return sU(r)==="String"?lU(r,""):Yh(r)}:Yh,da=function(r){return r==null},uU=da,hU=TypeError,Ao=function(r){if(uU(r))throw new hU("Can't call method on "+r);return r},dU=hu,cU=Ao,$r=function(r){return dU(cU(r))},Ky=Ke,eE=X0,fU=eE.all,Ye=eE.IS_HTMLDDA?function(r){return typeof r=="object"?r!==null:Ky(r)||r===fU}:function(r){return typeof r=="object"?r!==null:Ky(r)},ie={},Xh=ie,Qh=Pe,vU=Ke,qy=function(r){return vU(r)?r:void 0},Yt=function(r,i){return arguments.length<2?qy(Xh[r])||qy(Qh[r]):Xh[r]&&Xh[r][i]||Qh[r]&&Qh[r][i]},pU=ae,Re=pU({}.isPrototypeOf),Ro=typeof navigator<"u"&&String(navigator.userAgent)||"",tE=Pe,Jh=Ro,Yy=tE.process,Xy=tE.Deno,Qy=Yy&&Yy.versions||Xy&&Xy.version,Jy=Qy&&Qy.v8,er,bl;Jy&&(er=Jy.split("."),bl=er[0]>0&&er[0]<4?1:+(er[0]+er[1]));!bl&&Jh&&(er=Jh.match(/Edge\/(\d+)/),(!er||er[1]>=74)&&(er=Jh.match(/Chrome\/(\d+)/),er&&(bl=+er[1])));var Do=bl,Zy=Do,gU=ne,yU=Pe,mU=yU.String,ca=!!Object.getOwnPropertySymbols&&!gU(function(){var r=Symbol("symbol detection");return!mU(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&Zy&&Zy<41}),bU=ca,rE=bU&&!Symbol.sham&&typeof Symbol.iterator=="symbol",$U=Yt,wU=Ke,_U=Re,EU=rE,SU=Object,Mo=EU?function(r){return typeof r=="symbol"}:function(r){var i=$U("Symbol");return wU(i)&&_U(i.prototype,SU(r))},OU=String,fa=function(r){try{return OU(r)}catch{return"Object"}},TU=Ke,PU=fa,IU=TypeError,Zn=function(r){if(TU(r))return r;throw new IU(PU(r)+" is not a function")},kU=Zn,CU=da,rv=function(r,i){var e=r[i];return CU(e)?void 0:kU(e)},Zh=jt,ed=Ke,td=Ye,xU=TypeError,AU=function(r,i){var e,t;if(i==="string"&&ed(e=r.toString)&&!td(t=Zh(e,r))||ed(e=r.valueOf)&&!td(t=Zh(e,r))||i!=="string"&&ed(e=r.toString)&&!td(t=Zh(e,r)))return t;throw new xU("Can't convert object to primitive value")},nE={exports:{}},em=Pe,RU=Object.defineProperty,DU=function(r,i){try{RU(em,r,{value:i,configurable:!0,writable:!0})}catch{em[r]=i}return i},MU=Pe,NU=DU,tm="__core-js_shared__",FU=MU[tm]||NU(tm,{}),nv=FU,rm=nv;(nE.exports=function(r,i){return rm[r]||(rm[r]=i!==void 0?i:{})})("versions",[]).push({version:"3.33.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"});var va=nE.exports,BU=Ao,LU=Object,xt=function(r){return LU(BU(r))},jU=ae,zU=xt,HU=jU({}.hasOwnProperty),Xe=Object.hasOwn||function(i,e){return HU(zU(i),e)},WU=ae,VU=0,UU=Math.random(),GU=WU(1 .toString),du=function(r){return"Symbol("+(r===void 0?"":r)+")_"+GU(++VU+UU,36)},KU=Pe,qU=va,nm=Xe,YU=du,XU=ca,QU=rE,Ii=KU.Symbol,rd=qU("wks"),JU=QU?Ii.for||Ii:Ii&&Ii.withoutSetter||YU,Ie=function(r){return nm(rd,r)||(rd[r]=XU&&nm(Ii,r)?Ii[r]:JU("Symbol."+r)),rd[r]},ZU=jt,im=Ye,am=Mo,e9=rv,t9=AU,r9=Ie,n9=TypeError,i9=r9("toPrimitive"),a9=function(r,i){if(!im(r)||am(r))return r;var e=e9(r,i9),t;if(e){if(i===void 0&&(i="default"),t=ZU(e,r,i),!im(t)||am(t))return t;throw new n9("Can't convert object to primitive value")}return i===void 0&&(i="number"),t9(r,i)},o9=a9,s9=Mo,cu=function(r){var i=o9(r,"string");return s9(i)?i:i+""},l9=Pe,om=Ye,Dc=l9.document,u9=om(Dc)&&om(Dc.createElement),iE=function(r){return u9?Dc.createElement(r):{}},h9=qe,d9=ne,c9=iE,aE=!h9&&!d9(function(){return Object.defineProperty(c9("div"),"a",{get:function(){return 7}}).a!==7}),f9=qe,v9=jt,p9=uu,g9=xo,y9=$r,m9=cu,b9=Xe,$9=aE,sm=Object.getOwnPropertyDescriptor;ha.f=f9?sm:function(i,e){if(i=y9(i),e=m9(e),$9)try{return sm(i,e)}catch{}if(b9(i,e))return g9(!v9(p9.f,i,e),i[e])};var w9=ne,_9=Ke,E9=/#|\.prototype\./,No=function(r,i){var e=O9[S9(r)];return e===P9?!0:e===T9?!1:_9(i)?w9(i):!!i},S9=No.normalize=function(r){return String(r).replace(E9,".").toLowerCase()},O9=No.data={},T9=No.NATIVE="N",P9=No.POLYFILL="P",I9=No,lm=tv,k9=Zn,C9=ko,x9=lm(lm.bind),Fo=function(r,i){return k9(r),i===void 0?r:C9?x9(r,i):function(){return r.apply(i,arguments)}},zt={},A9=qe,R9=ne,oE=A9&&R9(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),D9=Ye,M9=String,N9=TypeError,Ht=function(r){if(D9(r))return r;throw new N9(M9(r)+" is not an object")},F9=qe,B9=aE,L9=oE,Es=Ht,um=cu,j9=TypeError,nd=Object.defineProperty,z9=Object.getOwnPropertyDescriptor,id="enumerable",ad="configurable",od="writable";zt.f=F9?L9?function(i,e,t){if(Es(i),e=um(e),Es(t),typeof i=="function"&&e==="prototype"&&"value"in t&&od in t&&!t[od]){var n=z9(i,e);n&&n[od]&&(i[e]=t.value,t={configurable:ad in t?t[ad]:n[ad],enumerable:id in t?t[id]:n[id],writable:!1})}return nd(i,e,t)}:nd:function(i,e,t){if(Es(i),e=um(e),Es(t),B9)try{return nd(i,e,t)}catch{}if("get"in t||"set"in t)throw new j9("Accessors not supported");return"value"in t&&(i[e]=t.value),i};var H9=qe,W9=zt,V9=xo,pa=H9?function(r,i,e){return W9.f(r,i,V9(1,e))}:function(r,i,e){return r[i]=e,r},Ss=Pe,U9=Co,G9=tv,K9=Ke,q9=ha.f,Y9=I9,fi=ie,X9=Fo,vi=pa,hm=Xe,Q9=function(r){var i=function(e,t,n){if(this instanceof i){switch(arguments.length){case 0:return new r;case 1:return new r(e);case 2:return new r(e,t)}return new r(e,t,n)}return U9(r,this,arguments)};return i.prototype=r.prototype,i},G=function(r,i){var e=r.target,t=r.global,n=r.stat,a=r.proto,o=t?Ss:n?Ss[e]:(Ss[e]||{}).prototype,s=t?fi:fi[e]||vi(fi,e,{})[e],l=s.prototype,u,h,d,c,f,v,p,g,y;for(c in i)u=Y9(t?c:e+(n?".":"#")+c,r.forced),h=!u&&o&&hm(o,c),v=s[c],h&&(r.dontCallGetSet?(y=q9(o,c),p=y&&y.value):p=o[c]),f=h&&p?p:i[c],!(h&&typeof v==typeof f)&&(r.bind&&h?g=X9(f,Ss):r.wrap&&h?g=Q9(f):a&&K9(f)?g=G9(f):g=f,(r.sham||f&&f.sham||v&&v.sham)&&vi(g,"sham",!0),vi(s,c,g),a&&(d=e+"Prototype",hm(fi,d)||vi(fi,d,{}),vi(fi[d],c,f),r.real&&l&&(u||!l[c])&&vi(l,c,f)))},J9=Math.ceil,Z9=Math.floor,eG=Math.trunc||function(i){var e=+i;return(e>0?Z9:J9)(e)},tG=eG,fu=function(r){var i=+r;return i!==i||i===0?0:tG(i)},rG=fu,nG=Math.max,iG=Math.min,Bo=function(r,i){var e=rG(r);return e<0?nG(e+i,0):iG(e,i)},aG=fu,oG=Math.min,sG=function(r){return r>0?oG(aG(r),9007199254740991):0},lG=sG,Xt=function(r){return lG(r.length)},uG=$r,hG=Bo,dG=Xt,dm=function(r){return function(i,e,t){var n=uG(i),a=dG(n),o=hG(t,a),s;if(r&&e!==e){for(;a>o;)if(s=n[o++],s!==s)return!0}else for(;a>o;o++)if((r||o in n)&&n[o]===e)return r||o||0;return!r&&-1}},iv={includes:dm(!0),indexOf:dm(!1)},Lo={},cG=ae,sd=Xe,fG=$r,vG=iv.indexOf,pG=Lo,cm=cG([].push),sE=function(r,i){var e=fG(r),t=0,n=[],a;for(a in e)!sd(pG,a)&&sd(e,a)&&cm(n,a);for(;i.length>t;)sd(e,a=i[t++])&&(~vG(n,a)||cm(n,a));return n},av=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],gG=sE,yG=av,vu=Object.keys||function(i){return gG(i,yG)},jo={};jo.f=Object.getOwnPropertySymbols;var fm=qe,mG=ae,bG=jt,$G=ne,ld=vu,wG=jo,_G=uu,EG=xt,SG=hu,pi=Object.assign,vm=Object.defineProperty,OG=mG([].concat),TG=!pi||$G(function(){if(fm&&pi({b:1},pi(vm({},"a",{enumerable:!0,get:function(){vm(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var r={},i={},e=Symbol("assign detection"),t="abcdefghijklmnopqrst";return r[e]=7,t.split("").forEach(function(n){i[n]=n}),pi({},r)[e]!==7||ld(pi({},i)).join("")!==t})?function(i,e){for(var t=EG(i),n=arguments.length,a=1,o=wG.f,s=_G.f;n>a;)for(var l=SG(arguments[a++]),u=o?OG(ld(l),o(l)):ld(l),h=u.length,d=0,c;h>d;)c=u[d++],(!fm||bG(s,l,c))&&(t[c]=l[c]);return t}:pi,PG=G,pm=TG;PG({target:"Object",stat:!0,arity:2,forced:Object.assign!==pm},{assign:pm});var IG=ie,kG=IG.Object.assign,CG=kG,xG=CG,AG=xG,Fe=z(AG),RG=ae,pu=RG([].slice),lE=ae,DG=Zn,MG=Ye,NG=Xe,gm=pu,FG=ko,uE=Function,BG=lE([].concat),LG=lE([].join),ud={},jG=function(r,i,e){if(!NG(ud,i)){for(var t=[],n=0;n<i;n++)t[n]="a["+n+"]";ud[i]=uE("C,a","return new C("+LG(t,",")+")")}return ud[i](r,e)},hE=FG?uE.bind:function(i){var e=DG(this),t=e.prototype,n=gm(arguments,1),a=function(){var s=BG(n,gm(arguments));return this instanceof a?jG(e,s.length,s):e.apply(i,s)};return MG(t)&&(a.prototype=t),a},zG=G,ym=hE;zG({target:"Function",proto:!0,forced:Function.bind!==ym},{bind:ym});var HG=ie,Qe=function(r){return HG[r+"Prototype"]},WG=Qe,VG=WG("Function").bind,UG=Re,GG=VG,hd=Function.prototype,KG=function(r){var i=r.bind;return r===hd||UG(hd,r)&&i===hd.bind?GG:i},qG=KG,dE=qG,YG=dE,T=z(YG);function ov(r,i,e,t){r.beginPath(),r.arc(i,e,t,0,2*Math.PI,!1),r.closePath()}function XG(r,i,e,t){r.beginPath(),r.rect(i-t,e-t,t*2,t*2),r.closePath()}function QG(r,i,e,t){r.beginPath(),t*=1.15,e+=.275*t;var n=t*2,a=n/2,o=Math.sqrt(3)/6*n,s=Math.sqrt(n*n-a*a);r.moveTo(i,e-(s-o)),r.lineTo(i+a,e+o),r.lineTo(i-a,e+o),r.lineTo(i,e-(s-o)),r.closePath()}function JG(r,i,e,t){r.beginPath(),t*=1.15,e-=.275*t;var n=t*2,a=n/2,o=Math.sqrt(3)/6*n,s=Math.sqrt(n*n-a*a);r.moveTo(i,e+(s-o)),r.lineTo(i+a,e-o),r.lineTo(i-a,e-o),r.lineTo(i,e+(s-o)),r.closePath()}function ZG(r,i,e,t){r.beginPath(),t*=.82,e+=.1*t;for(var n=0;n<10;n++){var a=n%2===0?t*1.3:t*.5;r.lineTo(i+a*Math.sin(n*2*Math.PI/10),e-a*Math.cos(n*2*Math.PI/10))}r.closePath()}function e7(r,i,e,t){r.beginPath(),r.lineTo(i,e+t),r.lineTo(i+t,e),r.lineTo(i,e-t),r.lineTo(i-t,e),r.closePath()}function cE(r,i,e,t,n,a){var o=Math.PI/180;t-2*a<0&&(a=t/2),n-2*a<0&&(a=n/2),r.beginPath(),r.moveTo(i+a,e),r.lineTo(i+t-a,e),r.arc(i+t-a,e+a,a,o*270,o*360,!1),r.lineTo(i+t,e+n-a),r.arc(i+t-a,e+n-a,a,0,o*90,!1),r.lineTo(i+a,e+n),r.arc(i+a,e+n-a,a,o*90,o*180,!1),r.lineTo(i,e+a),r.arc(i+a,e+a,a,o*180,o*270,!1),r.closePath()}function Mc(r,i,e,t,n){var a=.5522848,o=t/2*a,s=n/2*a,l=i+t,u=e+n,h=i+t/2,d=e+n/2;r.beginPath(),r.moveTo(i,d),r.bezierCurveTo(i,d-s,h-o,e,h,e),r.bezierCurveTo(h+o,e,l,d-s,l,d),r.bezierCurveTo(l,d+s,h+o,u,h,u),r.bezierCurveTo(h-o,u,i,d+s,i,d),r.closePath()}function fE(r,i,e,t,n){var a=.3333333333333333,o=t,s=n*a,l=.5522848,u=o/2*l,h=s/2*l,d=i+o,c=e+s,f=i+o/2,v=e+s/2,p=e+(n-s/2),g=e+n;r.beginPath(),r.moveTo(d,v),r.bezierCurveTo(d,v+h,f+u,c,f,c),r.bezierCurveTo(f-u,c,i,v+h,i,v),r.bezierCurveTo(i,v-h,f-u,e,f,e),r.bezierCurveTo(f+u,e,d,v-h,d,v),r.lineTo(d,p),r.bezierCurveTo(d,p+h,f+u,g,f,g),r.bezierCurveTo(f-u,g,i,p+h,i,p),r.lineTo(i,v)}function vE(r,i,e,t,n,a){r.beginPath(),r.moveTo(i,e);for(var o=a.length,s=t-i,l=n-e,u=l/s,h=Math.sqrt(s*s+l*l),d=0,c=!0,f=0,v=+a[0];h>=.1;)v=+a[d++%o],v>h&&(v=h),f=Math.sqrt(v*v/(1+u*u)),f=s<0?-f:f,i+=f,e+=u*f,c===!0?r.lineTo(i,e):r.moveTo(i,e),h-=v,c=!c}function t7(r,i,e,t){r.beginPath();var n=6,a=Math.PI*2/n;r.moveTo(i+t,e);for(var o=1;o<n;o++)r.lineTo(i+t*Math.cos(a*o),e+t*Math.sin(a*o));r.closePath()}var mm={circle:ov,dashedLine:vE,database:fE,diamond:e7,ellipse:Mc,ellipse_vis:Mc,hexagon:t7,roundRect:cE,square:XG,star:ZG,triangle:QG,triangleDown:JG};function r7(r){return Object.prototype.hasOwnProperty.call(mm,r)?mm[r]:function(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];CanvasRenderingContext2D.prototype[r].call(i,t)}}var pE={exports:{}};(function(r){r.exports=i;function i(t){if(t)return e(t)}function e(t){for(var n in i.prototype)t[n]=i.prototype[n];return t}i.prototype.on=i.prototype.addEventListener=function(t,n){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(n),this},i.prototype.once=function(t,n){function a(){this.off(t,a),n.apply(this,arguments)}return a.fn=n,this.on(t,a),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(t,n){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var a=this._callbacks["$"+t];if(!a)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,s=0;s<a.length;s++)if(o=a[s],o===n||o.fn===n){a.splice(s,1);break}return a.length===0&&delete this._callbacks["$"+t],this},i.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var n=new Array(arguments.length-1),a=this._callbacks["$"+t],o=1;o<arguments.length;o++)n[o-1]=arguments[o];if(a){a=a.slice(0);for(var o=0,s=a.length;o<s;++o)a[o].apply(this,n)}return this},i.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},i.prototype.hasListeners=function(t){return!!this.listeners(t).length}})(pE);var n7=pE.exports,gE=z(n7),i7=Ie,a7=i7("toStringTag"),yE={};yE[a7]="z";var sv=String(yE)==="[object z]",o7=sv,s7=Ke,qs=Lr,l7=Ie,u7=l7("toStringTag"),h7=Object,d7=qs(function(){return arguments}())==="Arguments",c7=function(r,i){try{return r[i]}catch{}},ei=o7?qs:function(r){var i,e,t;return r===void 0?"Undefined":r===null?"Null":typeof(e=c7(i=h7(r),u7))=="string"?e:d7?qs(i):(t=qs(i))==="Object"&&s7(i.callee)?"Arguments":t},f7=ei,v7=String,wr=function(r){if(f7(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return v7(r)},lv=ae,p7=fu,g7=wr,y7=Ao,m7=lv("".charAt),bm=lv("".charCodeAt),b7=lv("".slice),$m=function(r){return function(i,e){var t=g7(y7(i)),n=p7(e),a=t.length,o,s;return n<0||n>=a?r?"":void 0:(o=bm(t,n),o<55296||o>56319||n+1===a||(s=bm(t,n+1))<56320||s>57343?r?m7(t,n):o:r?b7(t,n,n+2):(o-55296<<10)+(s-56320)+65536)}},$7={codeAt:$m(!1),charAt:$m(!0)},w7=Pe,_7=Ke,wm=w7.WeakMap,mE=_7(wm)&&/native code/.test(String(wm)),E7=va,S7=du,_m=E7("keys"),gu=function(r){return _m[r]||(_m[r]=S7(r))},O7=mE,bE=Pe,T7=Ye,P7=pa,dd=Xe,cd=nv,I7=gu,k7=Lo,Em="Object already initialized",Nc=bE.TypeError,C7=bE.WeakMap,$l,eo,wl,x7=function(r){return wl(r)?eo(r):$l(r,{})},A7=function(r){return function(i){var e;if(!T7(i)||(e=eo(i)).type!==r)throw new Nc("Incompatible receiver, "+r+" required");return e}};if(O7||cd.state){var ur=cd.state||(cd.state=new C7);ur.get=ur.get,ur.has=ur.has,ur.set=ur.set,$l=function(r,i){if(ur.has(r))throw new Nc(Em);return i.facade=r,ur.set(r,i),i},eo=function(r){return ur.get(r)||{}},wl=function(r){return ur.has(r)}}else{var gi=I7("state");k7[gi]=!0,$l=function(r,i){if(dd(r,gi))throw new Nc(Em);return i.facade=r,P7(r,gi,i),i},eo=function(r){return dd(r,gi)?r[gi]:{}},wl=function(r){return dd(r,gi)}}var ti={set:$l,get:eo,has:wl,enforce:x7,getterFor:A7},Fc=qe,R7=Xe,$E=Function.prototype,D7=Fc&&Object.getOwnPropertyDescriptor,uv=R7($E,"name"),M7=uv&&function(){}.name==="something",N7=uv&&(!Fc||Fc&&D7($E,"name").configurable),F7={EXISTS:uv,PROPER:M7,CONFIGURABLE:N7},yu={},B7=qe,L7=oE,j7=zt,z7=Ht,H7=$r,W7=vu;yu.f=B7&&!L7?Object.defineProperties:function(i,e){z7(i);for(var t=H7(e),n=W7(e),a=n.length,o=0,s;a>o;)j7.f(i,s=n[o++],t[s]);return i};var V7=Yt,U7=V7("document","documentElement"),G7=Ht,K7=yu,Sm=av,q7=Lo,Y7=U7,X7=iE,Q7=gu,Om=">",Tm="<",Bc="prototype",Lc="script",wE=Q7("IE_PROTO"),fd=function(){},_E=function(r){return Tm+Lc+Om+r+Tm+"/"+Lc+Om},Pm=function(r){r.write(_E("")),r.close();var i=r.parentWindow.Object;return r=null,i},J7=function(){var r=X7("iframe"),i="java"+Lc+":",e;return r.style.display="none",Y7.appendChild(r),r.src=String(i),e=r.contentWindow.document,e.open(),e.write(_E("document.F=Object")),e.close(),e.F},Os,Ys=function(){try{Os=new ActiveXObject("htmlfile")}catch{}Ys=typeof document<"u"?document.domain&&Os?Pm(Os):J7():Pm(Os);for(var r=Sm.length;r--;)delete Ys[Bc][Sm[r]];return Ys()};q7[wE]=!0;var ga=Object.create||function(i,e){var t;return i!==null?(fd[Bc]=G7(i),t=new fd,fd[Bc]=null,t[wE]=i):t=Ys(),e===void 0?t:K7.f(t,e)},Z7=ne,EE=!Z7(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),eK=Xe,tK=Ke,rK=xt,nK=gu,iK=EE,Im=nK("IE_PROTO"),jc=Object,aK=jc.prototype,mu=iK?jc.getPrototypeOf:function(r){var i=rK(r);if(eK(i,Im))return i[Im];var e=i.constructor;return tK(e)&&i instanceof e?e.prototype:i instanceof jc?aK:null},oK=pa,zo=function(r,i,e,t){return t&&t.enumerable?r[i]=e:oK(r,i,e),r},sK=ne,lK=Ke,uK=Ye,hK=ga,km=mu,dK=zo,cK=Ie,zc=cK("iterator"),SE=!1,Ir,vd,pd;[].keys&&(pd=[].keys(),"next"in pd?(vd=km(km(pd)),vd!==Object.prototype&&(Ir=vd)):SE=!0);var fK=!uK(Ir)||sK(function(){var r={};return Ir[zc].call(r)!==r});fK?Ir={}:Ir=hK(Ir);lK(Ir[zc])||dK(Ir,zc,function(){return this});var OE={IteratorPrototype:Ir,BUGGY_SAFARI_ITERATORS:SE},vK=sv,pK=ei,gK=vK?{}.toString:function(){return"[object "+pK(this)+"]"},yK=sv,mK=zt.f,bK=pa,$K=Xe,wK=gK,_K=Ie,Cm=_K("toStringTag"),ya=function(r,i,e,t){if(r){var n=e?r:r.prototype;$K(n,Cm)||mK(n,Cm,{configurable:!0,value:i}),t&&!yK&&bK(n,"toString",wK)}},ma={},EK=OE.IteratorPrototype,SK=ga,OK=xo,TK=ya,PK=ma,IK=function(){return this},kK=function(r,i,e,t){var n=i+" Iterator";return r.prototype=SK(EK,{next:OK(+!t,e)}),TK(r,n,!1,!0),PK[n]=IK,r},CK=ae,xK=Zn,AK=function(r,i,e){try{return CK(xK(Object.getOwnPropertyDescriptor(r,i)[e]))}catch{}},RK=Ke,DK=String,MK=TypeError,NK=function(r){if(typeof r=="object"||RK(r))return r;throw new MK("Can't set "+DK(r)+" as a prototype")},FK=AK,BK=Ht,LK=NK,jK=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,i={},e;try{e=FK(Object.prototype,"__proto__","set"),e(i,[]),r=i instanceof Array}catch{}return function(n,a){return BK(n),LK(a),r?e(n,a):n.__proto__=a,n}}():void 0),zK=G,HK=jt,WK=F7,VK=kK,UK=mu,GK=ya,xm=zo,KK=Ie,Am=ma,qK=OE,YK=WK.PROPER,Ts=qK.BUGGY_SAFARI_ITERATORS,gd=KK("iterator"),Rm="keys",Ps="values",Dm="entries",XK=function(){return this},hv=function(r,i,e,t,n,a,o){VK(e,i,t);var s=function(y){if(y===n&&c)return c;if(!Ts&&y&&y in h)return h[y];switch(y){case Rm:return function(){return new e(this,y)};case Ps:return function(){return new e(this,y)};case Dm:return function(){return new e(this,y)}}return function(){return new e(this)}},l=i+" Iterator",u=!1,h=r.prototype,d=h[gd]||h["@@iterator"]||n&&h[n],c=!Ts&&d||s(n),f=i==="Array"&&h.entries||d,v,p,g;if(f&&(v=UK(f.call(new r)),v!==Object.prototype&&v.next&&(GK(v,l,!0,!0),Am[l]=XK)),YK&&n===Ps&&d&&d.name!==Ps&&(u=!0,c=function(){return HK(d,this)}),n)if(p={values:s(Ps),keys:a?c:s(Rm),entries:s(Dm)},o)for(g in p)(Ts||u||!(g in h))&&xm(h,g,p[g]);else zK({target:i,proto:!0,forced:Ts||u},p);return o&&h[gd]!==c&&xm(h,gd,c,{name:n}),Am[i]=c,p},dv=function(r,i){return{value:r,done:i}},QK=$7.charAt,JK=wr,TE=ti,ZK=hv,Mm=dv,PE="String Iterator",eq=TE.set,tq=TE.getterFor(PE);ZK(String,"String",function(r){eq(this,{type:PE,string:JK(r),index:0})},function(){var i=tq(this),e=i.string,t=i.index,n;return t>=e.length?Mm(void 0,!0):(n=QK(e,t),i.index+=n.length,Mm(n,!1))});var rq=jt,Nm=Ht,nq=rv,IE=function(r,i,e){var t,n;Nm(r);try{if(t=nq(r,"return"),!t){if(i==="throw")throw e;return e}t=rq(t,r)}catch(a){n=!0,t=a}if(i==="throw")throw e;if(n)throw t;return Nm(t),e},iq=Ht,aq=IE,oq=function(r,i,e,t){try{return t?i(iq(e)[0],e[1]):i(e)}catch(n){aq(r,"throw",n)}},sq=Ie,lq=ma,uq=sq("iterator"),hq=Array.prototype,kE=function(r){return r!==void 0&&(lq.Array===r||hq[uq]===r)},dq=ae,cq=Ke,Hc=nv,fq=dq(Function.toString);cq(Hc.inspectSource)||(Hc.inspectSource=function(r){return fq(r)});var vq=Hc.inspectSource,pq=ae,gq=ne,CE=Ke,yq=ei,mq=Yt,bq=vq,xE=function(){},$q=[],AE=mq("Reflect","construct"),cv=/^\s*(?:class|function)\b/,wq=pq(cv.exec),_q=!cv.test(xE),Oa=function(i){if(!CE(i))return!1;try{return AE(xE,$q,i),!0}catch{return!1}},RE=function(i){if(!CE(i))return!1;switch(yq(i)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return _q||!!wq(cv,bq(i))}catch{return!0}};RE.sham=!0;var bu=!AE||gq(function(){var r;return Oa(Oa.call)||!Oa(Object)||!Oa(function(){r=!0})||r})?RE:Oa,Eq=cu,Sq=zt,Oq=xo,ba=function(r,i,e){var t=Eq(i);t in r?Sq.f(r,t,Oq(0,e)):r[t]=e},Tq=ei,Fm=rv,Pq=da,Iq=ma,kq=Ie,Cq=kq("iterator"),$u=function(r){if(!Pq(r))return Fm(r,Cq)||Fm(r,"@@iterator")||Iq[Tq(r)]},xq=jt,Aq=Zn,Rq=Ht,Dq=fa,Mq=$u,Nq=TypeError,DE=function(r,i){var e=arguments.length<2?Mq(r):i;if(Aq(e))return Rq(xq(e,r));throw new Nq(Dq(r)+" is not iterable")},Fq=Fo,Bq=jt,Lq=xt,jq=oq,zq=kE,Hq=bu,Wq=Xt,Bm=ba,Vq=DE,Uq=$u,Lm=Array,Gq=function(i){var e=Lq(i),t=Hq(this),n=arguments.length,a=n>1?arguments[1]:void 0,o=a!==void 0;o&&(a=Fq(a,n>2?arguments[2]:void 0));var s=Uq(e),l=0,u,h,d,c,f,v;if(s&&!(this===Lm&&zq(s)))for(c=Vq(e,s),f=c.next,h=t?new this:[];!(d=Bq(f,c)).done;l++)v=o?jq(c,a,[d.value,l],!0):d.value,Bm(h,l,v);else for(u=Wq(e),h=t?new this(u):Lm(u);u>l;l++)v=o?a(e[l],l):e[l],Bm(h,l,v);return h.length=l,h},Kq=Ie,ME=Kq("iterator"),NE=!1;try{var qq=0,jm={next:function(){return{done:!!qq++}},return:function(){NE=!0}};jm[ME]=function(){return this},Array.from(jm,function(){throw 2})}catch{}var Yq=function(r,i){try{if(!i&&!NE)return!1}catch{return!1}var e=!1;try{var t={};t[ME]=function(){return{next:function(){return{done:e=!0}}}},r(t)}catch{}return e},Xq=G,Qq=Gq,Jq=Yq,Zq=!Jq(function(r){Array.from(r)});Xq({target:"Array",stat:!0,forced:Zq},{from:Qq});var eY=ie,tY=eY.Array.from,rY=tY,FE=rY,nY=FE,ri=z(nY),iY=$r,zm=ma,BE=ti;zt.f;var aY=hv,Is=dv,LE="Array Iterator",oY=BE.set,sY=BE.getterFor(LE);aY(Array,"Array",function(r,i){oY(this,{type:LE,target:iY(r),index:0,kind:i})},function(){var r=sY(this),i=r.target,e=r.kind,t=r.index++;if(!i||t>=i.length)return r.target=void 0,Is(void 0,!0);switch(e){case"keys":return Is(t,!1);case"values":return Is(i[t],!1)}return Is([t,i[t]],!1)},"values");zm.Arguments=zm.Array;var lY=$u,uY=lY,hY={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},dY=hY,cY=Pe,fY=ei,vY=pa,Hm=ma,pY=Ie,Wm=pY("toStringTag");for(var yd in dY){var Vm=cY[yd],md=Vm&&Vm.prototype;md&&fY(md)!==Wm&&vY(md,Wm,yd),Hm[yd]=Hm.Array}var gY=uY,yY=gY,mY=yY,bY=mY,$Y=bY,wY=$Y,jE=wY,zE=z(jE),_Y=jE,ni=z(_Y);function C(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}var HE={exports:{}},EY=G,SY=qe,Um=zt.f;EY({target:"Object",stat:!0,forced:Object.defineProperty!==Um,sham:!SY},{defineProperty:Um});var OY=ie,WE=OY.Object,TY=HE.exports=function(i,e,t){return WE.defineProperty(i,e,t)};WE.defineProperty.sham&&(TY.sham=!0);var PY=HE.exports,IY=PY,VE=IY,kY=VE,CY=kY,xY=CY,AY=xY,RY=AY,wu=z(RY),DY=Lr,ii=Array.isArray||function(i){return DY(i)==="Array"},MY=TypeError,NY=9007199254740991,fv=function(r){if(r>NY)throw MY("Maximum allowed index exceeded");return r},Gm=ii,FY=bu,BY=Ye,LY=Ie,jY=LY("species"),Km=Array,zY=function(r){var i;return Gm(r)&&(i=r.constructor,FY(i)&&(i===Km||Gm(i.prototype))?i=void 0:BY(i)&&(i=i[jY],i===null&&(i=void 0))),i===void 0?Km:i},HY=zY,vv=function(r,i){return new(HY(r))(i===0?0:i)},WY=ne,VY=Ie,UY=Do,GY=VY("species"),Ho=function(r){return UY>=51||!WY(function(){var i=[],e=i.constructor={};return e[GY]=function(){return{foo:1}},i[r](Boolean).foo!==1})},KY=G,qY=ne,YY=ii,XY=Ye,QY=xt,JY=Xt,qm=fv,Ym=ba,ZY=vv,eX=Ho,tX=Ie,rX=Do,UE=tX("isConcatSpreadable"),nX=rX>=51||!qY(function(){var r=[];return r[UE]=!1,r.concat()[0]!==r}),iX=function(r){if(!XY(r))return!1;var i=r[UE];return i!==void 0?!!i:YY(r)},aX=!nX||!eX("concat");KY({target:"Array",proto:!0,arity:1,forced:aX},{concat:function(i){var e=QY(this),t=ZY(e,0),n=0,a,o,s,l,u;for(a=-1,s=arguments.length;a<s;a++)if(u=a===-1?e:arguments[a],iX(u))for(l=JY(u),qm(n+l),o=0;o<l;o++,n++)o in u&&Ym(t,n,u[o]);else qm(n+1),Ym(t,n++,u);return t.length=n,t}});var Wo={},oX=sE,sX=av,lX=sX.concat("length","prototype");Wo.f=Object.getOwnPropertyNames||function(i){return oX(i,lX)};var _u={},Xm=Bo,uX=Xt,hX=ba,dX=Array,cX=Math.max,GE=function(r,i,e){for(var t=uX(r),n=Xm(i,t),a=Xm(e===void 0?t:e,t),o=dX(cX(a-n,0)),s=0;n<a;n++,s++)hX(o,s,r[n]);return o.length=s,o},fX=Lr,vX=$r,KE=Wo.f,pX=GE,qE=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],gX=function(r){try{return KE(r)}catch{return pX(qE)}};_u.f=function(i){return qE&&fX(i)==="Window"?gX(i):KE(vX(i))};var yX=zt,pv=function(r,i,e){return yX.f(r,i,e)},Vo={},mX=Ie;Vo.f=mX;var Qm=ie,bX=Xe,$X=Vo,wX=zt.f,ke=function(r){var i=Qm.Symbol||(Qm.Symbol={});bX(i,r)||wX(i,r,{value:$X.f(r)})},_X=jt,EX=Yt,SX=Ie,OX=zo,YE=function(){var r=EX("Symbol"),i=r&&r.prototype,e=i&&i.valueOf,t=SX("toPrimitive");i&&!i[t]&&OX(i,t,function(n){return _X(e,this)},{arity:1})},TX=Fo,PX=ae,IX=hu,kX=xt,CX=Xt,xX=vv,Jm=PX([].push),Hr=function(r){var i=r===1,e=r===2,t=r===3,n=r===4,a=r===6,o=r===7,s=r===5||a;return function(l,u,h,d){for(var c=kX(l),f=IX(c),v=TX(u,h),p=CX(f),g=0,y=d||xX,m=i?y(l,p):e||o?y(l,0):void 0,w,b;p>g;g++)if((s||g in f)&&(w=f[g],b=v(w,g,c),r))if(i)m[g]=b;else if(b)switch(r){case 3:return!0;case 5:return w;case 6:return g;case 2:Jm(m,w)}else switch(r){case 4:return!1;case 7:Jm(m,w)}return a?-1:t||n?n:m}},fn={forEach:Hr(0),map:Hr(1),filter:Hr(2),some:Hr(3),every:Hr(4),find:Hr(5),findIndex:Hr(6),filterReject:Hr(7)},Eu=G,Su=Pe,gv=jt,AX=ae,Hi=qe,Wi=ca,RX=ne,Ve=Xe,DX=Re,Wc=Ht,Ou=$r,yv=cu,MX=wr,Vc=xo,to=ga,XE=vu,NX=Wo,QE=_u,FX=jo,JE=ha,ZE=zt,BX=yu,eS=uu,Zm=zo,LX=pv,mv=va,jX=gu,tS=Lo,eb=du,zX=Ie,HX=Vo,WX=ke,VX=YE,UX=ya,rS=ti,Tu=fn.forEach,St=jX("hidden"),Pu="Symbol",ro="prototype",GX=rS.set,tb=rS.getterFor(Pu),ir=Object[ro],xn=Su.Symbol,xa=xn&&xn[ro],KX=Su.RangeError,qX=Su.TypeError,bd=Su.QObject,nS=JE.f,An=ZE.f,iS=QE.f,YX=eS.f,aS=AX([].push),Mr=mv("symbols"),Uo=mv("op-symbols"),XX=mv("wks"),Uc=!bd||!bd[ro]||!bd[ro].findChild,oS=function(r,i,e){var t=nS(ir,i);t&&delete ir[i],An(r,i,e),t&&r!==ir&&An(ir,i,t)},Gc=Hi&&RX(function(){return to(An({},"a",{get:function(){return An(this,"a",{value:7}).a}})).a!==7})?oS:An,$d=function(r,i){var e=Mr[r]=to(xa);return GX(e,{type:Pu,tag:r,description:i}),Hi||(e.description=i),e},Iu=function(i,e,t){i===ir&&Iu(Uo,e,t),Wc(i);var n=yv(e);return Wc(t),Ve(Mr,n)?(t.enumerable?(Ve(i,St)&&i[St][n]&&(i[St][n]=!1),t=to(t,{enumerable:Vc(0,!1)})):(Ve(i,St)||An(i,St,Vc(1,{})),i[St][n]=!0),Gc(i,n,t)):An(i,n,t)},bv=function(i,e){Wc(i);var t=Ou(e),n=XE(t).concat(hS(t));return Tu(n,function(a){(!Hi||gv(sS,t,a))&&Iu(i,a,t[a])}),i},QX=function(i,e){return e===void 0?to(i):bv(to(i),e)},sS=function(i){var e=yv(i),t=gv(YX,this,e);return this===ir&&Ve(Mr,e)&&!Ve(Uo,e)?!1:t||!Ve(this,e)||!Ve(Mr,e)||Ve(this,St)&&this[St][e]?t:!0},lS=function(i,e){var t=Ou(i),n=yv(e);if(!(t===ir&&Ve(Mr,n)&&!Ve(Uo,n))){var a=nS(t,n);return a&&Ve(Mr,n)&&!(Ve(t,St)&&t[St][n])&&(a.enumerable=!0),a}},uS=function(i){var e=iS(Ou(i)),t=[];return Tu(e,function(n){!Ve(Mr,n)&&!Ve(tS,n)&&aS(t,n)}),t},hS=function(r){var i=r===ir,e=iS(i?Uo:Ou(r)),t=[];return Tu(e,function(n){Ve(Mr,n)&&(!i||Ve(ir,n))&&aS(t,Mr[n])}),t};Wi||(xn=function(){if(DX(xa,this))throw new qX("Symbol is not a constructor");var i=!arguments.length||arguments[0]===void 0?void 0:MX(arguments[0]),e=eb(i),t=function(n){this===ir&&gv(t,Uo,n),Ve(this,St)&&Ve(this[St],e)&&(this[St][e]=!1);var a=Vc(1,n);try{Gc(this,e,a)}catch(o){if(!(o instanceof KX))throw o;oS(this,e,a)}};return Hi&&Uc&&Gc(ir,e,{configurable:!0,set:t}),$d(e,i)},xa=xn[ro],Zm(xa,"toString",function(){return tb(this).tag}),Zm(xn,"withoutSetter",function(r){return $d(eb(r),r)}),eS.f=sS,ZE.f=Iu,BX.f=bv,JE.f=lS,NX.f=QE.f=uS,FX.f=hS,HX.f=function(r){return $d(zX(r),r)},Hi&&LX(xa,"description",{configurable:!0,get:function(){return tb(this).description}}));Eu({global:!0,constructor:!0,wrap:!0,forced:!Wi,sham:!Wi},{Symbol:xn});Tu(XE(XX),function(r){WX(r)});Eu({target:Pu,stat:!0,forced:!Wi},{useSetter:function(){Uc=!0},useSimple:function(){Uc=!1}});Eu({target:"Object",stat:!0,forced:!Wi,sham:!Hi},{create:QX,defineProperty:Iu,defineProperties:bv,getOwnPropertyDescriptor:lS});Eu({target:"Object",stat:!0,forced:!Wi},{getOwnPropertyNames:uS});VX();UX(xn,Pu);tS[St]=!0;var JX=ca,dS=JX&&!!Symbol.for&&!!Symbol.keyFor,ZX=G,eQ=Yt,tQ=Xe,rQ=wr,cS=va,nQ=dS,wd=cS("string-to-symbol-registry"),iQ=cS("symbol-to-string-registry");ZX({target:"Symbol",stat:!0,forced:!nQ},{for:function(r){var i=rQ(r);if(tQ(wd,i))return wd[i];var e=eQ("Symbol")(i);return wd[i]=e,iQ[e]=i,e}});var aQ=G,oQ=Xe,sQ=Mo,lQ=fa,uQ=va,hQ=dS,rb=uQ("symbol-to-string-registry");aQ({target:"Symbol",stat:!0,forced:!hQ},{keyFor:function(i){if(!sQ(i))throw new TypeError(lQ(i)+" is not a symbol");if(oQ(rb,i))return rb[i]}});var dQ=ae,nb=ii,cQ=Ke,ib=Lr,fQ=wr,ab=dQ([].push),vQ=function(r){if(cQ(r))return r;if(nb(r)){for(var i=r.length,e=[],t=0;t<i;t++){var n=r[t];typeof n=="string"?ab(e,n):(typeof n=="number"||ib(n)==="Number"||ib(n)==="String")&&ab(e,fQ(n))}var a=e.length,o=!0;return function(s,l){if(o)return o=!1,l;if(nb(this))return l;for(var u=0;u<a;u++)if(e[u]===s)return l}}},pQ=G,fS=Yt,vS=Co,gQ=jt,Go=ae,pS=ne,ob=Ke,sb=Mo,gS=pu,yQ=vQ,mQ=ca,bQ=String,en=fS("JSON","stringify"),ks=Go(/./.exec),lb=Go("".charAt),$Q=Go("".charCodeAt),wQ=Go("".replace),_Q=Go(1 .toString),EQ=/[\uD800-\uDFFF]/g,ub=/^[\uD800-\uDBFF]$/,hb=/^[\uDC00-\uDFFF]$/,db=!mQ||pS(function(){var r=fS("Symbol")("stringify detection");return en([r])!=="[null]"||en({a:r})!=="{}"||en(Object(r))!=="{}"}),cb=pS(function(){return en("\uDF06\uD834")!=='"\\udf06\\ud834"'||en("\uDEAD")!=='"\\udead"'}),SQ=function(r,i){var e=gS(arguments),t=yQ(i);if(!(!ob(t)&&(r===void 0||sb(r))))return e[1]=function(n,a){if(ob(t)&&(a=gQ(t,this,bQ(n),a)),!sb(a))return a},vS(en,null,e)},OQ=function(r,i,e){var t=lb(e,i-1),n=lb(e,i+1);return ks(ub,r)&&!ks(hb,n)||ks(hb,r)&&!ks(ub,t)?"\\u"+_Q($Q(r,0),16):r};en&&pQ({target:"JSON",stat:!0,arity:3,forced:db||cb},{stringify:function(i,e,t){var n=gS(arguments),a=vS(db?SQ:en,null,n);return cb&&typeof a=="string"?wQ(a,EQ,OQ):a}});var TQ=G,PQ=ca,IQ=ne,yS=jo,kQ=xt,CQ=!PQ||IQ(function(){yS.f(1)});TQ({target:"Object",stat:!0,forced:CQ},{getOwnPropertySymbols:function(i){var e=yS.f;return e?e(kQ(i)):[]}});var xQ=ke;xQ("asyncIterator");var AQ=ke;AQ("hasInstance");var RQ=ke;RQ("isConcatSpreadable");var DQ=ke;DQ("iterator");var MQ=ke;MQ("match");var NQ=ke;NQ("matchAll");var FQ=ke;FQ("replace");var BQ=ke;BQ("search");var LQ=ke;LQ("species");var jQ=ke;jQ("split");var zQ=ke,HQ=YE;zQ("toPrimitive");HQ();var WQ=Yt,VQ=ke,UQ=ya;VQ("toStringTag");UQ(WQ("Symbol"),"Symbol");var GQ=ke;GQ("unscopables");var KQ=Pe,qQ=ya;qQ(KQ.JSON,"JSON",!0);var YQ=ie,XQ=YQ.Symbol,QQ=XQ,mS=QQ,JQ=Ie,ZQ=zt.f,fb=JQ("metadata"),vb=Function.prototype;vb[fb]===void 0&&ZQ(vb,fb,{value:null});var eJ=ke;eJ("asyncDispose");var tJ=ke;tJ("dispose");var rJ=ke;rJ("metadata");var nJ=mS,iJ=nJ,aJ=Yt,oJ=ae,$v=aJ("Symbol"),sJ=$v.keyFor,lJ=oJ($v.prototype.valueOf),bS=$v.isRegisteredSymbol||function(i){try{return sJ(lJ(i))!==void 0}catch{return!1}},uJ=G,hJ=bS;uJ({target:"Symbol",stat:!0},{isRegisteredSymbol:hJ});var dJ=va,$S=Yt,cJ=ae,fJ=Mo,vJ=Ie,_l=$S("Symbol"),pb=_l.isWellKnownSymbol,wS=$S("Object","getOwnPropertyNames"),pJ=cJ(_l.prototype.valueOf),gb=dJ("wks");for(var _d=0,yb=wS(_l),gJ=yb.length;_d<gJ;_d++)try{var mb=yb[_d];fJ(_l[mb])&&vJ(mb)}catch{}var _S=function(i){if(pb&&pb(i))return!0;try{for(var e=pJ(i),t=0,n=wS(gb),a=n.length;t<a;t++)if(gb[n[t]]==e)return!0}catch{}return!1},yJ=G,mJ=_S;yJ({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:mJ});var bJ=ke;bJ("matcher");var $J=ke;$J("observable");var wJ=G,_J=bS;wJ({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:_J});var EJ=G,SJ=_S;EJ({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:SJ});var OJ=ke;OJ("metadataKey");var TJ=ke;TJ("patternMatch");var PJ=ke;PJ("replaceAll");var IJ=iJ,kJ=IJ,CJ=kJ,ki=z(CJ),xJ=Vo,AJ=xJ.f("iterator"),RJ=AJ,DJ=RJ,MJ=DJ,NJ=MJ,FJ=NJ,BJ=FJ,LJ=BJ,jJ=z(LJ);function he(r){"@babel/helpers - typeof";return he=typeof ki=="function"&&typeof jJ=="symbol"?function(i){return typeof i}:function(i){return i&&typeof ki=="function"&&i.constructor===ki&&i!==ki.prototype?"symbol":typeof i},he(r)}var zJ=Vo,HJ=zJ.f("toPrimitive"),WJ=HJ,VJ=WJ,UJ=VJ,GJ=UJ,KJ=GJ,qJ=KJ,YJ=qJ,XJ=z(YJ);function QJ(r,i){if(he(r)!=="object"||r===null)return r;var e=r[XJ];if(e!==void 0){var t=e.call(r,i||"default");if(he(t)!=="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}function ES(r){var i=QJ(r,"string");return he(i)==="symbol"?i:String(i)}function bb(r,i){for(var e=0;e<i.length;e++){var t=i[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),wu(r,ES(t.key),t)}}function x(r,i,e){return i&&bb(r.prototype,i),e&&bb(r,e),wu(r,"prototype",{writable:!1}),r}var JJ=G,ZJ=ii;JJ({target:"Array",stat:!0},{isArray:ZJ});var eZ=ie,tZ=eZ.Array.isArray,rZ=tZ,SS=rZ,nZ=SS,iZ=nZ,aZ=iZ,oZ=aZ,sZ=oZ,OS=z(sZ);function lZ(r){if(OS(r))return r}var uZ=qe,hZ=ii,dZ=TypeError,cZ=Object.getOwnPropertyDescriptor,fZ=uZ&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(r){return r instanceof TypeError}}(),TS=fZ?function(r,i){if(hZ(r)&&!cZ(r,"length").writable)throw new dZ("Cannot set read only .length");return r.length=i}:function(r,i){return r.length=i},vZ=G,pZ=xt,gZ=Xt,yZ=TS,mZ=fv,bZ=ne,$Z=bZ(function(){return[].push.call({length:4294967296},1)!==4294967297}),wZ=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(r){return r instanceof TypeError}},_Z=$Z||!wZ();vZ({target:"Array",proto:!0,arity:1,forced:_Z},{push:function(i){var e=pZ(this),t=gZ(e),n=arguments.length;mZ(t+n);for(var a=0;a<n;a++)e[t]=arguments[a],t++;return yZ(e,t),t}});var EZ=Qe,SZ=EZ("Array").push,OZ=Re,TZ=SZ,Ed=Array.prototype,PZ=function(r){var i=r.push;return r===Ed||OZ(Ed,r)&&i===Ed.push?TZ:i},IZ=PZ,kZ=IZ,CZ=kZ,xZ=CZ,AZ=xZ,RZ=AZ,DZ=RZ,MZ=z(DZ);function NZ(r,i){var e=r==null?null:typeof ki<"u"&&zE(r)||r["@@iterator"];if(e!=null){var t,n,a,o,s=[],l=!0,u=!1;try{if(a=(e=e.call(r)).next,i===0){if(Object(e)!==e)return;l=!1}else for(;!(l=(t=a.call(e)).done)&&(MZ(s).call(s,t.value),s.length!==i);l=!0);}catch(h){u=!0,n=h}finally{try{if(!l&&e.return!=null&&(o=e.return(),Object(o)!==o))return}finally{if(u)throw n}}return s}}var FZ=G,$b=ii,BZ=bu,LZ=Ye,wb=Bo,jZ=Xt,zZ=$r,HZ=ba,WZ=Ie,VZ=Ho,UZ=pu,GZ=VZ("slice"),KZ=WZ("species"),Sd=Array,qZ=Math.max;FZ({target:"Array",proto:!0,forced:!GZ},{slice:function(i,e){var t=zZ(this),n=jZ(t),a=wb(i,n),o=wb(e===void 0?n:e,n),s,l,u;if($b(t)&&(s=t.constructor,BZ(s)&&(s===Sd||$b(s.prototype))?s=void 0:LZ(s)&&(s=s[KZ],s===null&&(s=void 0)),s===Sd||s===void 0))return UZ(t,a,o);for(l=new(s===void 0?Sd:s)(qZ(o-a,0)),u=0;a<o;a++,u++)a in t&&HZ(l,u,t[a]);return l.length=u,l}});var YZ=Qe,XZ=YZ("Array").slice,QZ=Re,JZ=XZ,Od=Array.prototype,ZZ=function(r){var i=r.slice;return r===Od||QZ(Od,r)&&i===Od.slice?JZ:i},eee=ZZ,PS=eee,tee=PS,ree=tee,nee=ree,iee=nee,aee=iee,oee=z(aee),see=FE,lee=see,uee=lee,hee=uee,dee=hee,IS=z(dee);function Kc(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}function kS(r,i){var e;if(r){if(typeof r=="string")return Kc(r,i);var t=oee(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return IS(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Kc(r,i)}}function cee(){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 Se(r,i){return lZ(r)||NZ(r,i)||kS(r,i)||cee()}function fee(r){if(OS(r))return Kc(r)}function vee(r){if(typeof ki<"u"&&zE(r)!=null||r["@@iterator"]!=null)return IS(r)}function pee(){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 dr(r){return fee(r)||vee(r)||kS(r)||pee()}var gee=mS,vn=z(gee),yee=Qe,mee=yee("Array").concat,bee=Re,$ee=mee,Td=Array.prototype,wee=function(r){var i=r.concat;return r===Td||bee(Td,r)&&i===Td.concat?$ee:i},_ee=wee,Eee=_ee,See=Eee,wv=z(See),Oee=PS,tt=z(Oee),Tee=Yt,Pee=ae,Iee=Wo,kee=jo,Cee=Ht,xee=Pee([].concat),Aee=Tee("Reflect","ownKeys")||function(i){var e=Iee.f(Cee(i)),t=kee.f;return t?xee(e,t(i)):e},Ree=SS,le=z(Ree),Dee=G,Mee=fn.map,Nee=Ho,Fee=Nee("map");Dee({target:"Array",proto:!0,forced:!Fee},{map:function(i){return Mee(this,i,arguments.length>1?arguments[1]:void 0)}});var Bee=Qe,Lee=Bee("Array").map,jee=Re,zee=Lee,Pd=Array.prototype,Hee=function(r){var i=r.map;return r===Pd||jee(Pd,r)&&i===Pd.map?zee:i},Wee=Hee,Vee=Wee,Uee=Vee,Vi=z(Uee),Gee=G,Kee=xt,CS=vu,qee=ne,Yee=qee(function(){CS(1)});Gee({target:"Object",stat:!0,forced:Yee},{keys:function(i){return CS(Kee(i))}});var Xee=ie,Qee=Xee.Object.keys,Jee=Qee,Zee=Jee,ete=Zee,_e=z(ete),tte=G,rte=ae,xS=Date,nte=rte(xS.prototype.getTime);tte({target:"Date",stat:!0},{now:function(){return nte(new xS)}});var ite=ie,ate=ite.Date.now,ote=ate,ste=ote,lte=ste,El=z(lte),ute=ne,$a=function(r,i){var e=[][r];return!!e&&ute(function(){e.call(null,i||function(){return 1},1)})},hte=fn.forEach,dte=$a,cte=dte("forEach"),fte=cte?[].forEach:function(i){return hte(this,i,arguments.length>1?arguments[1]:void 0)},vte=G,_b=fte;vte({target:"Array",proto:!0,forced:[].forEach!==_b},{forEach:_b});var pte=Qe,gte=pte("Array").forEach,yte=gte,mte=yte,bte=ei,$te=Xe,wte=Re,_te=mte,Id=Array.prototype,Ete={DOMTokenList:!0,NodeList:!0},Ste=function(r){var i=r.forEach;return r===Id||wte(Id,r)&&i===Id.forEach||$te(Ete,bte(r))?_te:i},Ote=Ste,de=z(Ote),Tte=G,Pte=ae,Ite=ii,kte=Pte([].reverse),Eb=[1,2];Tte({target:"Array",proto:!0,forced:String(Eb)===String(Eb.reverse())},{reverse:function(){return Ite(this)&&(this.length=this.length),kte(this)}});var Cte=Qe,xte=Cte("Array").reverse,Ate=Re,Rte=xte,kd=Array.prototype,Dte=function(r){var i=r.reverse;return r===kd||Ate(kd,r)&&i===kd.reverse?Rte:i},Mte=Dte,Nte=Mte,Fte=Nte,Rn=z(Fte),Sb=fa,Bte=TypeError,AS=function(r,i){if(!delete r[i])throw new Bte("Cannot delete property "+Sb(i)+" of "+Sb(r))},Lte=G,jte=xt,zte=Bo,Hte=fu,Wte=Xt,Vte=TS,Ute=fv,Gte=vv,Kte=ba,Cd=AS,qte=Ho,Yte=qte("splice"),Xte=Math.max,Qte=Math.min;Lte({target:"Array",proto:!0,forced:!Yte},{splice:function(i,e){var t=jte(this),n=Wte(t),a=zte(i,n),o=arguments.length,s,l,u,h,d,c;for(o===0?s=l=0:o===1?(s=0,l=n-a):(s=o-2,l=Qte(Xte(Hte(e),0),n-a)),Ute(n+s-l),u=Gte(t,l),h=0;h<l;h++)d=a+h,d in t&&Kte(u,h,t[d]);if(u.length=l,s<l){for(h=a;h<n-l;h++)d=h+l,c=h+s,d in t?t[c]=t[d]:Cd(t,c);for(h=n;h>n-l+s;h--)Cd(t,h-1)}else if(s>l)for(h=n-l;h>a;h--)d=h+l-1,c=h+s-1,d in t?t[c]=t[d]:Cd(t,c);for(h=0;h<s;h++)t[h+a]=arguments[h+2];return Vte(t,n-l+s),u}});var Jte=Qe,Zte=Jte("Array").splice,ere=Re,tre=Zte,xd=Array.prototype,rre=function(r){var i=r.splice;return r===xd||ere(xd,r)&&i===xd.splice?tre:i},nre=rre,ire=nre,are=ire,kr=z(are),ore=G,sre=iv.includes,lre=ne,ure=lre(function(){return!Array(1).includes()});ore({target:"Array",proto:!0,forced:ure},{includes:function(i){return sre(this,i,arguments.length>1?arguments[1]:void 0)}});var hre=Qe,dre=hre("Array").includes,cre=Ye,fre=Lr,vre=Ie,pre=vre("match"),gre=function(r){var i;return cre(r)&&((i=r[pre])!==void 0?!!i:fre(r)==="RegExp")},yre=gre,mre=TypeError,bre=function(r){if(yre(r))throw new mre("The method doesn't accept regular expressions");return r},$re=Ie,wre=$re("match"),_re=function(r){var i=/./;try{"/./"[r](i)}catch{try{return i[wre]=!1,"/./"[r](i)}catch{}}return!1},Ere=G,Sre=ae,Ore=bre,Tre=Ao,Ob=wr,Pre=_re,Ire=Sre("".indexOf);Ere({target:"String",proto:!0,forced:!Pre("includes")},{includes:function(i){return!!~Ire(Ob(Tre(this)),Ob(Ore(i)),arguments.length>1?arguments[1]:void 0)}});var kre=Qe,Cre=kre("String").includes,Tb=Re,xre=dre,Are=Cre,Ad=Array.prototype,Rd=String.prototype,Rre=function(r){var i=r.includes;return r===Ad||Tb(Ad,r)&&i===Ad.includes?xre:typeof r=="string"||r===Rd||Tb(Rd,r)&&i===Rd.includes?Are:i},Dre=Rre,Mre=Dre,Nre=Mre,tn=z(Nre),Fre=G,Bre=ne,Lre=xt,RS=mu,jre=EE,zre=Bre(function(){RS(1)});Fre({target:"Object",stat:!0,forced:zre,sham:!jre},{getPrototypeOf:function(i){return RS(Lre(i))}});var Hre=ie,Wre=Hre.Object.getPrototypeOf,Vre=Wre,DS=Vre,Ure=DS,Pb=z(Ure),Gre=G,Kre=fn.filter,qre=Ho,Yre=qre("filter");Gre({target:"Array",proto:!0,forced:!Yre},{filter:function(i){return Kre(this,i,arguments.length>1?arguments[1]:void 0)}});var Xre=Qe,Qre=Xre("Array").filter,Jre=Re,Zre=Qre,Dd=Array.prototype,ene=function(r){var i=r.filter;return r===Dd||Jre(Dd,r)&&i===Dd.filter?Zre:i},tne=ene,rne=tne,nne=rne,Ot=z(nne),_v=`
64
+ \v\f\r                 \u2028\u2029\uFEFF`,ine=ae,ane=Ao,one=wr,qc=_v,Ib=ine("".replace),sne=RegExp("^["+qc+"]+"),lne=RegExp("(^|[^"+qc+"])["+qc+"]+$"),Md=function(r){return function(i){var e=one(ane(i));return r&1&&(e=Ib(e,sne,"")),r&2&&(e=Ib(e,lne,"$1")),e}},MS={start:Md(1),end:Md(2),trim:Md(3)},NS=Pe,une=ne,hne=ae,dne=wr,cne=MS.trim,kb=_v,Ba=NS.parseInt,Cb=NS.Symbol,xb=Cb&&Cb.iterator,FS=/^[+-]?0x/i,fne=hne(FS.exec),vne=Ba(kb+"08")!==8||Ba(kb+"0x16")!==22||xb&&!une(function(){Ba(Object(xb))}),pne=vne?function(i,e){var t=cne(dne(i));return Ba(t,e>>>0||(fne(FS,t)?16:10))}:Ba,gne=G,Ab=pne;gne({global:!0,forced:parseInt!==Ab},{parseInt:Ab});var yne=ie,mne=yne.parseInt,bne=mne,$ne=bne,wne=$ne,tr=z(wne),_ne=G,Ene=tv,Sne=iv.indexOf,One=$a,Yc=Ene([].indexOf),BS=!!Yc&&1/Yc([1],1,-0)<0,Tne=BS||!One("indexOf");_ne({target:"Array",proto:!0,forced:Tne},{indexOf:function(i){var e=arguments.length>1?arguments[1]:void 0;return BS?Yc(this,i,e)||0:Sne(this,i,e)}});var Pne=Qe,Ine=Pne("Array").indexOf,kne=Re,Cne=Ine,Nd=Array.prototype,xne=function(r){var i=r.indexOf;return r===Nd||kne(Nd,r)&&i===Nd.indexOf?Cne:i},Ane=xne,Rne=Ane,Dne=Rne,re=z(Dne),Mne=G,Nne=qe,Fne=ga;Mne({target:"Object",stat:!0,sham:!Nne},{create:Fne});var Bne=ie,Lne=Bne.Object,jne=function(i,e){return Lne.create(i,e)},zne=jne,LS=zne,Hne=LS,Dn=z(Hne),Xc=ie,Wne=Co;Xc.JSON||(Xc.JSON={stringify:JSON.stringify});var Vne=function(i,e,t){return Wne(Xc.JSON.stringify,null,arguments)},Une=Vne,Gne=Une,Kne=Gne,Ko=z(Kne),qne=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",Yne=TypeError,Xne=function(r,i){if(r<i)throw new Yne("Not enough arguments");return r},jS=Pe,Qne=Co,Jne=Ke,Zne=qne,eie=Ro,tie=pu,rie=Xne,nie=jS.Function,iie=/MSIE .\./.test(eie)||Zne&&function(){var r=jS.Bun.version.split(".");return r.length<3||r[0]==="0"&&(r[1]<3||r[1]==="3"&&r[2]==="0")}(),zS=function(r,i){var e=i?2:1;return iie?function(t,n){var a=rie(arguments.length,1)>e,o=Jne(t)?t:nie(t),s=a?tie(arguments,e):[],l=a?function(){Qne(o,this,s)}:o;return i?r(l,n):r(l)}:r},aie=G,HS=Pe,oie=zS,Rb=oie(HS.setInterval,!0);aie({global:!0,bind:!0,forced:HS.setInterval!==Rb},{setInterval:Rb});var sie=G,WS=Pe,lie=zS,Db=lie(WS.setTimeout,!0);sie({global:!0,bind:!0,forced:WS.setTimeout!==Db},{setTimeout:Db});var uie=ie,hie=uie.setTimeout,die=hie,gr=z(die),cie=xt,Mb=Bo,fie=Xt,vie=function(i){for(var e=cie(this),t=fie(e),n=arguments.length,a=Mb(n>1?arguments[1]:void 0,t),o=n>2?arguments[2]:void 0,s=o===void 0?t:Mb(o,t);s>a;)e[a++]=i;return e},pie=G,gie=vie;pie({target:"Array",proto:!0},{fill:gie});var yie=Qe,mie=yie("Array").fill,bie=Re,$ie=mie,Fd=Array.prototype,wie=function(r){var i=r.fill;return r===Fd||bie(Fd,r)&&i===Fd.fill?$ie:i},_ie=wie,Eie=_ie,Sie=Eie,qo=z(Sie);/*! Hammer.JS - v2.0.17-rc - 2019-12-16
65
+ * http://naver.github.io/egjs
66
+ *
67
+ * Forked By Naver egjs
68
+ * Copyright (c) hammerjs
69
+ * Licensed under the MIT license */function or(){return or=Object.assign||function(r){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}return r},or.apply(this,arguments)}function Qt(r,i){r.prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i}function Cs(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}var Qc;typeof Object.assign!="function"?Qc=function(i){if(i==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(i),t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var a in n)n.hasOwnProperty(a)&&(e[a]=n[a])}return e}:Qc=Object.assign;var Hn=Qc,Nb=["","webkit","Moz","MS","ms","o"],Oie=typeof document>"u"?{style:{}}:document.createElement("div"),Tie="function",Ci=Math.round,Wn=Math.abs,Ev=Date.now;function ku(r,i){for(var e,t,n=i[0].toUpperCase()+i.slice(1),a=0;a<Nb.length;){if(e=Nb[a],t=e?e+n:i,t in r)return t;a++}}var Cr;typeof window>"u"?Cr={}:Cr=window;var VS=ku(Oie.style,"touchAction"),US=VS!==void 0;function Pie(){if(!US)return!1;var r={},i=Cr.CSS&&Cr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return r[e]=i?Cr.CSS.supports("touch-action",e):!0}),r}var GS="compute",KS="auto",Jc="manipulation",Mn="none",no="pan-x",io="pan-y",xs=Pie(),Iie=/mobile|tablet|ip(ad|hone|od)|android/i,qS="ontouchstart"in Cr,kie=ku(Cr,"PointerEvent")!==void 0,Cie=qS&&Iie.test(navigator.userAgent),Yo="touch",xie="pen",Sv="mouse",Aie="kinect",Rie=25,gt=1,ai=2,Be=4,Pt=8,Sl=1,Xo=2,Qo=4,Jo=8,Ui=16,yr=Xo|Qo,Nn=Jo|Ui,YS=yr|Nn,XS=["x","y"],Ol=["clientX","clientY"];function xr(r,i,e){var t;if(r)if(r.forEach)r.forEach(i,e);else if(r.length!==void 0)for(t=0;t<r.length;)i.call(e,r[t],t,r),t++;else for(t in r)r.hasOwnProperty(t)&&i.call(e,r[t],t,r)}function Cu(r,i){return typeof r===Tie?r.apply(i&&i[0]||void 0,i):r}function On(r,i){return r.indexOf(i)>-1}function Die(r){if(On(r,Mn))return Mn;var i=On(r,no),e=On(r,io);return i&&e?Mn:i||e?i?no:io:On(r,Jc)?Jc:KS}var QS=function(){function r(e,t){this.manager=e,this.set(t)}var i=r.prototype;return i.set=function(t){t===GS&&(t=this.compute()),US&&this.manager.element.style&&xs[t]&&(this.manager.element.style[VS]=t),this.actions=t.toLowerCase().trim()},i.update=function(){this.set(this.manager.options.touchAction)},i.compute=function(){var t=[];return xr(this.manager.recognizers,function(n){Cu(n.options.enable,[n])&&(t=t.concat(n.getTouchAction()))}),Die(t.join(" "))},i.preventDefaults=function(t){var n=t.srcEvent,a=t.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,s=On(o,Mn)&&!xs[Mn],l=On(o,io)&&!xs[io],u=On(o,no)&&!xs[no];if(s){var h=t.pointers.length===1,d=t.distance<2,c=t.deltaTime<250;if(h&&d&&c)return}if(!(u&&l)&&(s||l&&a&yr||u&&a&Nn))return this.preventSrc(n)},i.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},r}();function Ov(r,i){for(;r;){if(r===i)return!0;r=r.parentNode}return!1}function JS(r){var i=r.length;if(i===1)return{x:Ci(r[0].clientX),y:Ci(r[0].clientY)};for(var e=0,t=0,n=0;n<i;)e+=r[n].clientX,t+=r[n].clientY,n++;return{x:Ci(e/i),y:Ci(t/i)}}function Fb(r){for(var i=[],e=0;e<r.pointers.length;)i[e]={clientX:Ci(r.pointers[e].clientX),clientY:Ci(r.pointers[e].clientY)},e++;return{timeStamp:Ev(),pointers:i,center:JS(i),deltaX:r.deltaX,deltaY:r.deltaY}}function Tl(r,i,e){e||(e=XS);var t=i[e[0]]-r[e[0]],n=i[e[1]]-r[e[1]];return Math.sqrt(t*t+n*n)}function Zc(r,i,e){e||(e=XS);var t=i[e[0]]-r[e[0]],n=i[e[1]]-r[e[1]];return Math.atan2(n,t)*180/Math.PI}function ZS(r,i){return r===i?Sl:Wn(r)>=Wn(i)?r<0?Xo:Qo:i<0?Jo:Ui}function Mie(r,i){var e=i.center,t=r.offsetDelta||{},n=r.prevDelta||{},a=r.prevInput||{};(i.eventType===gt||a.eventType===Be)&&(n=r.prevDelta={x:a.deltaX||0,y:a.deltaY||0},t=r.offsetDelta={x:e.x,y:e.y}),i.deltaX=n.x+(e.x-t.x),i.deltaY=n.y+(e.y-t.y)}function eO(r,i,e){return{x:i/r||0,y:e/r||0}}function Nie(r,i){return Tl(i[0],i[1],Ol)/Tl(r[0],r[1],Ol)}function Fie(r,i){return Zc(i[1],i[0],Ol)+Zc(r[1],r[0],Ol)}function Bie(r,i){var e=r.lastInterval||i,t=i.timeStamp-e.timeStamp,n,a,o,s;if(i.eventType!==Pt&&(t>Rie||e.velocity===void 0)){var l=i.deltaX-e.deltaX,u=i.deltaY-e.deltaY,h=eO(t,l,u);a=h.x,o=h.y,n=Wn(h.x)>Wn(h.y)?h.x:h.y,s=ZS(l,u),r.lastInterval=i}else n=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;i.velocity=n,i.velocityX=a,i.velocityY=o,i.direction=s}function Lie(r,i){var e=r.session,t=i.pointers,n=t.length;e.firstInput||(e.firstInput=Fb(i)),n>1&&!e.firstMultiple?e.firstMultiple=Fb(i):n===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,l=i.center=JS(t);i.timeStamp=Ev(),i.deltaTime=i.timeStamp-a.timeStamp,i.angle=Zc(s,l),i.distance=Tl(s,l),Mie(e,i),i.offsetDirection=ZS(i.deltaX,i.deltaY);var u=eO(i.deltaTime,i.deltaX,i.deltaY);i.overallVelocityX=u.x,i.overallVelocityY=u.y,i.overallVelocity=Wn(u.x)>Wn(u.y)?u.x:u.y,i.scale=o?Nie(o.pointers,t):1,i.rotation=o?Fie(o.pointers,t):0,i.maxPointers=e.prevInput?i.pointers.length>e.prevInput.maxPointers?i.pointers.length:e.prevInput.maxPointers:i.pointers.length,Bie(e,i);var h=r.element,d=i.srcEvent,c;d.composedPath?c=d.composedPath()[0]:d.path?c=d.path[0]:c=d.target,Ov(c,h)&&(h=c),i.target=h}function jie(r,i,e){var t=e.pointers.length,n=e.changedPointers.length,a=i&gt&&t-n===0,o=i&(Be|Pt)&&t-n===0;e.isFirst=!!a,e.isFinal=!!o,a&&(r.session={}),e.eventType=i,Lie(r,e),r.emit("hammer.input",e),r.recognize(e),r.session.prevInput=e}function ao(r){return r.trim().split(/\s+/g)}function La(r,i,e){xr(ao(i),function(t){r.addEventListener(t,e,!1)})}function ja(r,i,e){xr(ao(i),function(t){r.removeEventListener(t,e,!1)})}function Bb(r){var i=r.ownerDocument||r;return i.defaultView||i.parentWindow||window}var wa=function(){function r(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){Cu(e.options.enable,[e])&&n.handler(a)},this.init()}var i=r.prototype;return i.handler=function(){},i.init=function(){this.evEl&&La(this.element,this.evEl,this.domHandler),this.evTarget&&La(this.target,this.evTarget,this.domHandler),this.evWin&&La(Bb(this.element),this.evWin,this.domHandler)},i.destroy=function(){this.evEl&&ja(this.element,this.evEl,this.domHandler),this.evTarget&&ja(this.target,this.evTarget,this.domHandler),this.evWin&&ja(Bb(this.element),this.evWin,this.domHandler)},r}();function Vn(r,i,e){if(r.indexOf&&!e)return r.indexOf(i);for(var t=0;t<r.length;){if(e&&r[t][e]==i||!e&&r[t]===i)return t;t++}return-1}var zie={pointerdown:gt,pointermove:ai,pointerup:Be,pointercancel:Pt,pointerout:Pt},Hie={2:Yo,3:xie,4:Sv,5:Aie},tO="pointerdown",rO="pointermove pointerup pointercancel";Cr.MSPointerEvent&&!Cr.PointerEvent&&(tO="MSPointerDown",rO="MSPointerMove MSPointerUp MSPointerCancel");var nO=function(r){Qt(i,r);function i(){var t,n=i.prototype;return n.evEl=tO,n.evWin=rO,t=r.apply(this,arguments)||this,t.store=t.manager.session.pointerEvents=[],t}var e=i.prototype;return e.handler=function(n){var a=this.store,o=!1,s=n.type.toLowerCase().replace("ms",""),l=zie[s],u=Hie[n.pointerType]||n.pointerType,h=u===Yo,d=Vn(a,n.pointerId,"pointerId");l&gt&&(n.button===0||h)?d<0&&(a.push(n),d=a.length-1):l&(Be|Pt)&&(o=!0),!(d<0)&&(a[d]=n,this.callback(this.manager,l,{pointers:a,changedPointers:[n],pointerType:u,srcEvent:n}),o&&a.splice(d,1))},i}(wa);function oo(r){return Array.prototype.slice.call(r,0)}function Tv(r,i,e){for(var t=[],n=[],a=0;a<r.length;){var o=i?r[a][i]:r[a];Vn(n,o)<0&&t.push(r[a]),n[a]=o,a++}return e&&(i?t=t.sort(function(s,l){return s[i]>l[i]}):t=t.sort()),t}var Wie={touchstart:gt,touchmove:ai,touchend:Be,touchcancel:Pt},Vie="touchstart touchmove touchend touchcancel",Pv=function(r){Qt(i,r);function i(){var t;return i.prototype.evTarget=Vie,t=r.apply(this,arguments)||this,t.targetIds={},t}var e=i.prototype;return e.handler=function(n){var a=Wie[n.type],o=Uie.call(this,n,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:Yo,srcEvent:n})},i}(wa);function Uie(r,i){var e=oo(r.touches),t=this.targetIds;if(i&(gt|ai)&&e.length===1)return t[e[0].identifier]=!0,[e,e];var n,a,o=oo(r.changedTouches),s=[],l=this.target;if(a=e.filter(function(u){return Ov(u.target,l)}),i===gt)for(n=0;n<a.length;)t[a[n].identifier]=!0,n++;for(n=0;n<o.length;)t[o[n].identifier]&&s.push(o[n]),i&(Be|Pt)&&delete t[o[n].identifier],n++;if(s.length)return[Tv(a.concat(s),"identifier",!0),s]}var Gie={mousedown:gt,mousemove:ai,mouseup:Be},Kie="mousedown",qie="mousemove mouseup",Iv=function(r){Qt(i,r);function i(){var t,n=i.prototype;return n.evEl=Kie,n.evWin=qie,t=r.apply(this,arguments)||this,t.pressed=!1,t}var e=i.prototype;return e.handler=function(n){var a=Gie[n.type];a&gt&&n.button===0&&(this.pressed=!0),a&ai&&n.which!==1&&(a=Be),this.pressed&&(a&Be&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[n],changedPointers:[n],pointerType:Sv,srcEvent:n}))},i}(wa),Yie=2500,Lb=25;function jb(r){var i=r.changedPointers,e=i[0];if(e.identifier===this.primaryTouch){var t={x:e.clientX,y:e.clientY},n=this.lastTouches;this.lastTouches.push(t);var a=function(){var s=n.indexOf(t);s>-1&&n.splice(s,1)};setTimeout(a,Yie)}}function Xie(r,i){r&gt?(this.primaryTouch=i.changedPointers[0].identifier,jb.call(this,i)):r&(Be|Pt)&&jb.call(this,i)}function Qie(r){for(var i=r.srcEvent.clientX,e=r.srcEvent.clientY,t=0;t<this.lastTouches.length;t++){var n=this.lastTouches[t],a=Math.abs(i-n.x),o=Math.abs(e-n.y);if(a<=Lb&&o<=Lb)return!0}return!1}var iO=function(){var r=function(i){Qt(e,i);function e(n,a){var o;return o=i.call(this,n,a)||this,o.handler=function(s,l,u){var h=u.pointerType===Yo,d=u.pointerType===Sv;if(!(d&&u.sourceCapabilities&&u.sourceCapabilities.firesTouchEvents)){if(h)Xie.call(Cs(Cs(o)),l,u);else if(d&&Qie.call(Cs(Cs(o)),u))return;o.callback(s,l,u)}},o.touch=new Pv(o.manager,o.handler),o.mouse=new Iv(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}var t=e.prototype;return t.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(wa);return r}();function Jie(r){var i,e=r.options.inputClass;return e?i=e:kie?i=nO:Cie?i=Pv:qS?i=iO:i=Iv,new i(r,jie)}function xi(r,i,e){return Array.isArray(r)?(xr(r,e[i],e),!0):!1}var Xs=1,Kt=2,Gi=4,rn=8,Ar=rn,so=16,fr=32,Zie=1;function eae(){return Zie++}function As(r,i){var e=i.manager;return e?e.get(r):r}function zb(r){return r&so?"cancel":r&rn?"end":r&Gi?"move":r&Kt?"start":""}var Zo=function(){function r(e){e===void 0&&(e={}),this.options=or({enable:!0},e),this.id=eae(),this.manager=null,this.state=Xs,this.simultaneous={},this.requireFail=[]}var i=r.prototype;return i.set=function(t){return Hn(this.options,t),this.manager&&this.manager.touchAction.update(),this},i.recognizeWith=function(t){if(xi(t,"recognizeWith",this))return this;var n=this.simultaneous;return t=As(t,this),n[t.id]||(n[t.id]=t,t.recognizeWith(this)),this},i.dropRecognizeWith=function(t){return xi(t,"dropRecognizeWith",this)?this:(t=As(t,this),delete this.simultaneous[t.id],this)},i.requireFailure=function(t){if(xi(t,"requireFailure",this))return this;var n=this.requireFail;return t=As(t,this),Vn(n,t)===-1&&(n.push(t),t.requireFailure(this)),this},i.dropRequireFailure=function(t){if(xi(t,"dropRequireFailure",this))return this;t=As(t,this);var n=Vn(this.requireFail,t);return n>-1&&this.requireFail.splice(n,1),this},i.hasRequireFailures=function(){return this.requireFail.length>0},i.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},i.emit=function(t){var n=this,a=this.state;function o(s){n.manager.emit(s,t)}a<rn&&o(n.options.event+zb(a)),o(n.options.event),t.additionalEvent&&o(t.additionalEvent),a>=rn&&o(n.options.event+zb(a))},i.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=fr},i.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(fr|Xs)))return!1;t++}return!0},i.recognize=function(t){var n=Hn({},t);if(!Cu(this.options.enable,[this,n])){this.reset(),this.state=fr;return}this.state&(Ar|so|fr)&&(this.state=Xs),this.state=this.process(n),this.state&(Kt|Gi|rn|so)&&this.tryEmit(n)},i.process=function(t){},i.getTouchAction=function(){},i.reset=function(){},r}(),ef=function(r){Qt(i,r);function i(t){var n;return t===void 0&&(t={}),n=r.call(this,or({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,n.pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}var e=i.prototype;return e.getTouchAction=function(){return[Jc]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,l=n.distance<o.threshold,u=n.deltaTime<o.time;if(this.reset(),n.eventType&gt&&this.count===0)return this.failTimeout();if(l&&u&&s){if(n.eventType!==Be)return this.failTimeout();var h=this.pTime?n.timeStamp-this.pTime<o.interval:!0,d=!this.pCenter||Tl(this.pCenter,n.center)<o.posThreshold;this.pTime=n.timeStamp,this.pCenter=n.center,!d||!h?this.count=1:this.count+=1,this._input=n;var c=this.count%o.taps;if(c===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){a.state=Ar,a.tryEmit()},o.interval),Kt):Ar}return fr},e.failTimeout=function(){var n=this;return this._timer=setTimeout(function(){n.state=fr},this.options.interval),fr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(){this.state===Ar&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},i}(Zo),Ki=function(r){Qt(i,r);function i(t){return t===void 0&&(t={}),r.call(this,or({pointers:1},t))||this}var e=i.prototype;return e.attrTest=function(n){var a=this.options.pointers;return a===0||n.pointers.length===a},e.process=function(n){var a=this.state,o=n.eventType,s=a&(Kt|Gi),l=this.attrTest(n);return s&&(o&Pt||!l)?a|so:s||l?o&Be?a|rn:a&Kt?a|Gi:Kt:fr},i}(Zo);function aO(r){return r===Ui?"down":r===Jo?"up":r===Xo?"left":r===Qo?"right":""}var kv=function(r){Qt(i,r);function i(t){var n;return t===void 0&&(t={}),n=r.call(this,or({event:"pan",threshold:10,pointers:1,direction:YS},t))||this,n.pX=null,n.pY=null,n}var e=i.prototype;return e.getTouchAction=function(){var n=this.options.direction,a=[];return n&yr&&a.push(io),n&Nn&&a.push(no),a},e.directionTest=function(n){var a=this.options,o=!0,s=n.distance,l=n.direction,u=n.deltaX,h=n.deltaY;return l&a.direction||(a.direction&yr?(l=u===0?Sl:u<0?Xo:Qo,o=u!==this.pX,s=Math.abs(n.deltaX)):(l=h===0?Sl:h<0?Jo:Ui,o=h!==this.pY,s=Math.abs(n.deltaY))),n.direction=l,o&&s>a.threshold&&l&a.direction},e.attrTest=function(n){return Ki.prototype.attrTest.call(this,n)&&(this.state&Kt||!(this.state&Kt)&&this.directionTest(n))},e.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var a=aO(n.direction);a&&(n.additionalEvent=this.options.event+a),r.prototype.emit.call(this,n)},i}(Ki),oO=function(r){Qt(i,r);function i(t){return t===void 0&&(t={}),r.call(this,or({event:"swipe",threshold:10,velocity:.3,direction:yr|Nn,pointers:1},t))||this}var e=i.prototype;return e.getTouchAction=function(){return kv.prototype.getTouchAction.call(this)},e.attrTest=function(n){var a=this.options.direction,o;return a&(yr|Nn)?o=n.overallVelocity:a&yr?o=n.overallVelocityX:a&Nn&&(o=n.overallVelocityY),r.prototype.attrTest.call(this,n)&&a&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&Wn(o)>this.options.velocity&&n.eventType&Be},e.emit=function(n){var a=aO(n.offsetDirection);a&&this.manager.emit(this.options.event+a,n),this.manager.emit(this.options.event,n)},i}(Ki),sO=function(r){Qt(i,r);function i(t){return t===void 0&&(t={}),r.call(this,or({event:"pinch",threshold:0,pointers:2},t))||this}var e=i.prototype;return e.getTouchAction=function(){return[Mn]},e.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&Kt)},e.emit=function(n){if(n.scale!==1){var a=n.scale<1?"in":"out";n.additionalEvent=this.options.event+a}r.prototype.emit.call(this,n)},i}(Ki),lO=function(r){Qt(i,r);function i(t){return t===void 0&&(t={}),r.call(this,or({event:"rotate",threshold:0,pointers:2},t))||this}var e=i.prototype;return e.getTouchAction=function(){return[Mn]},e.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&Kt)},i}(Ki),uO=function(r){Qt(i,r);function i(t){var n;return t===void 0&&(t={}),n=r.call(this,or({event:"press",pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var e=i.prototype;return e.getTouchAction=function(){return[KS]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,l=n.distance<o.threshold,u=n.deltaTime>o.time;if(this._input=n,!l||!s||n.eventType&(Be|Pt)&&!u)this.reset();else if(n.eventType&gt)this.reset(),this._timer=setTimeout(function(){a.state=Ar,a.tryEmit()},o.time);else if(n.eventType&Be)return Ar;return fr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(n){this.state===Ar&&(n&&n.eventType&Be?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=Ev(),this.manager.emit(this.options.event,this._input)))},i}(Zo),hO={domEvents:!1,touchAction:GS,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Hb=[[lO,{enable:!1}],[sO,{enable:!1},["rotate"]],[oO,{direction:yr}],[kv,{direction:yr},["swipe"]],[ef],[ef,{event:"doubletap",taps:2},["tap"]],[uO]],tae=1,Wb=2;function Vb(r,i){var e=r.element;if(e.style){var t;xr(r.options.cssProps,function(n,a){t=ku(e.style,a),i?(r.oldCssProps[t]=e.style[t],e.style[t]=n):e.style[t]=r.oldCssProps[t]||""}),i||(r.oldCssProps={})}}function rae(r,i){var e=document.createEvent("Event");e.initEvent(r,!0,!0),e.gesture=i,i.target.dispatchEvent(e)}var Ub=function(){function r(e,t){var n=this;this.options=Hn({},hO,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=Jie(this),this.touchAction=new QS(this,this.options.touchAction),Vb(this,!0),xr(this.options.recognizers,function(a){var o=n.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var i=r.prototype;return i.set=function(t){return Hn(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},i.stop=function(t){this.session.stopped=t?Wb:tae},i.recognize=function(t){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(t);var a,o=this.recognizers,s=n.curRecognizer;(!s||s&&s.state&Ar)&&(n.curRecognizer=null,s=null);for(var l=0;l<o.length;)a=o[l],n.stopped!==Wb&&(!s||a===s||a.canRecognizeWith(s))?a.recognize(t):a.reset(),!s&&a.state&(Kt|Gi|rn)&&(n.curRecognizer=a,s=a),l++}},i.get=function(t){if(t instanceof Zo)return t;for(var n=this.recognizers,a=0;a<n.length;a++)if(n[a].options.event===t)return n[a];return null},i.add=function(t){if(xi(t,"add",this))return this;var n=this.get(t.options.event);return n&&this.remove(n),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},i.remove=function(t){if(xi(t,"remove",this))return this;var n=this.get(t);if(t){var a=this.recognizers,o=Vn(a,n);o!==-1&&(a.splice(o,1),this.touchAction.update())}return this},i.on=function(t,n){if(t===void 0||n===void 0)return this;var a=this.handlers;return xr(ao(t),function(o){a[o]=a[o]||[],a[o].push(n)}),this},i.off=function(t,n){if(t===void 0)return this;var a=this.handlers;return xr(ao(t),function(o){n?a[o]&&a[o].splice(Vn(a[o],n),1):delete a[o]}),this},i.emit=function(t,n){this.options.domEvents&&rae(t,n);var a=this.handlers[t]&&this.handlers[t].slice();if(!(!a||!a.length)){n.type=t,n.preventDefault=function(){n.srcEvent.preventDefault()};for(var o=0;o<a.length;)a[o](n),o++}},i.destroy=function(){this.element&&Vb(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},r}(),nae={touchstart:gt,touchmove:ai,touchend:Be,touchcancel:Pt},iae="touchstart",aae="touchstart touchmove touchend touchcancel",oae=function(r){Qt(i,r);function i(){var t,n=i.prototype;return n.evTarget=iae,n.evWin=aae,t=r.apply(this,arguments)||this,t.started=!1,t}var e=i.prototype;return e.handler=function(n){var a=nae[n.type];if(a===gt&&(this.started=!0),!!this.started){var o=sae.call(this,n,a);a&(Be|Pt)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:Yo,srcEvent:n})}},i}(wa);function sae(r,i){var e=oo(r.touches),t=oo(r.changedTouches);return i&(Be|Pt)&&(e=Tv(e.concat(t),"identifier",!0)),[e,t]}function dO(r,i,e){var t="DEPRECATED METHOD: "+i+`
70
+ `+e+` AT
71
+ `;return function(){var n=new Error("get-stack-trace"),a=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,t,a),r.apply(this,arguments)}}var cO=dO(function(r,i,e){for(var t=Object.keys(i),n=0;n<t.length;)(!e||e&&r[t[n]]===void 0)&&(r[t[n]]=i[t[n]]),n++;return r},"extend","Use `assign`."),lae=dO(function(r,i){return cO(r,i,!0)},"merge","Use `assign`.");function uae(r,i,e){var t=i.prototype,n;n=r.prototype=Object.create(t),n.constructor=r,n._super=t,e&&Hn(n,e)}function Gb(r,i){return function(){return r.apply(i,arguments)}}var fO=function(){var r=function(e,t){return t===void 0&&(t={}),new Ub(e,or({recognizers:Hb.concat()},t))};return r.VERSION="2.0.17-rc",r.DIRECTION_ALL=YS,r.DIRECTION_DOWN=Ui,r.DIRECTION_LEFT=Xo,r.DIRECTION_RIGHT=Qo,r.DIRECTION_UP=Jo,r.DIRECTION_HORIZONTAL=yr,r.DIRECTION_VERTICAL=Nn,r.DIRECTION_NONE=Sl,r.DIRECTION_DOWN=Ui,r.INPUT_START=gt,r.INPUT_MOVE=ai,r.INPUT_END=Be,r.INPUT_CANCEL=Pt,r.STATE_POSSIBLE=Xs,r.STATE_BEGAN=Kt,r.STATE_CHANGED=Gi,r.STATE_ENDED=rn,r.STATE_RECOGNIZED=Ar,r.STATE_CANCELLED=so,r.STATE_FAILED=fr,r.Manager=Ub,r.Input=wa,r.TouchAction=QS,r.TouchInput=Pv,r.MouseInput=Iv,r.PointerEventInput=nO,r.TouchMouseInput=iO,r.SingleTouchInput=oae,r.Recognizer=Zo,r.AttrRecognizer=Ki,r.Tap=ef,r.Pan=kv,r.Swipe=oO,r.Pinch=sO,r.Rotate=lO,r.Press=uO,r.on=La,r.off=ja,r.each=xr,r.merge=lae,r.extend=cO,r.bindFn=Gb,r.assign=Hn,r.inherit=uae,r.bindFn=Gb,r.prefixed=ku,r.toArray=oo,r.inArray=Vn,r.uniqueArray=Tv,r.splitStr=ao,r.boolOrFn=Cu,r.hasParent=Ov,r.addEventListeners=La,r.removeEventListeners=ja,r.defaults=Hn({},hO,{preset:Hb}),r}();fO.defaults;var hae=fO;function vO(r,i){var e=typeof vn<"u"&&ni(r)||r["@@iterator"];if(!e){if(le(r)||(e=dae(r))||i&&r&&typeof r.length=="number"){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
72
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function dae(r,i){var e;if(r){if(typeof r=="string")return Kb(r,i);var t=tt(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return ri(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Kb(r,i)}}function Kb(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}vn("DELETE");function xu(){for(var r=arguments.length,i=new Array(r),e=0;e<r;e++)i[e]=arguments[e];return cae(i.length?i:[El()])}function cae(r){var i=fae(r),e=Se(i,3),t=e[0],n=e[1],a=e[2],o=1,s=function(){var u=2091639*t+o*23283064365386963e-26;return t=n,n=a,a=u-(o=u|0)};return s.uint32=function(){return s()*4294967296},s.fract53=function(){return s()+(s()*2097152|0)*11102230246251565e-32},s.algorithm="Alea",s.seed=r,s.version="0.9",s}function fae(){for(var r=vae(),i=r(" "),e=r(" "),t=r(" "),n=0;n<arguments.length;n++)i-=r(n<0||arguments.length<=n?void 0:arguments[n]),i<0&&(i+=1),e-=r(n<0||arguments.length<=n?void 0:arguments[n]),e<0&&(e+=1),t-=r(n<0||arguments.length<=n?void 0:arguments[n]),t<0&&(t+=1);return[i,e,t]}function vae(){var r=4022871197;return function(i){for(var e=i.toString(),t=0;t<e.length;t++){r+=e.charCodeAt(t);var n=.02519603282416938*r;r=n>>>0,n-=r,n*=r,r=n>>>0,n-=r,r+=n*4294967296}return(r>>>0)*23283064365386963e-26}}function pae(){var r=function(){};return{on:r,off:r,destroy:r,emit:r,get:function(){return{set:r}}}}var Cv=typeof window<"u"?window.Hammer||hae:function(){return pae()};function vr(r){var i=this,e;this._cleanupQueue=[],this.active=!1,this._dom={container:r,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){i._dom.overlay.parentNode.removeChild(i._dom.overlay)});var t=Cv(this._dom.overlay);t.on("tap",T(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){t.destroy()});var n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];de(n).call(n,function(a){t.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){gae(a.target,r)||i.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",i._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&i.deactivate()}}gE(vr.prototype);vr.current=null;vr.prototype.destroy=function(){var r,i;this.deactivate();var e=vO(Rn(r=kr(i=this._cleanupQueue).call(i,0)).call(r)),t;try{for(e.s();!(t=e.n()).done;){var n=t.value;n()}}catch(a){e.e(a)}finally{e.f()}};vr.prototype.activate=function(){vr.current&&vr.current.deactivate(),vr.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};vr.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};vr.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function gae(r,i){for(;r;){if(r===i)return!0;r=r.parentNode}return!1}var yae=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,mae=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,bae=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,$ae=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function Ur(r){if(r)for(;r.hasChildNodes()===!0;){var i=r.firstChild;i&&(Ur(i),r.removeChild(i))}}function Kr(r){return r instanceof String||typeof r=="string"}function qb(r){return he(r)==="object"&&r!==null}function Un(r,i,e,t){var n=!1;t===!0&&(n=i[e]===null&&r[e]!==void 0),n?delete r[e]:r[e]=i[e]}function pO(r,i){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(var t in r)if(i[t]!==void 0)if(i[t]===null||he(i[t])!=="object")Un(r,i,t,e);else{var n=r[t],a=i[t];qb(n)&&qb(a)&&pO(n,a,e)}}function _a(r,i,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(le(e))throw new TypeError("Arrays are not supported by deepExtend");for(var n=0;n<r.length;n++){var a=r[n];if(Object.prototype.hasOwnProperty.call(e,a))if(e[a]&&e[a].constructor===Object)i[a]===void 0&&(i[a]={}),i[a].constructor===Object?fe(i[a],e[a],!1,t):Un(i,e,a,t);else{if(le(e[a]))throw new TypeError("Arrays are not supported by deepExtend");Un(i,e,a,t)}}return i}function Pl(r,i,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(le(e))throw new TypeError("Arrays are not supported by deepExtend");for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&!tn(r).call(r,n))if(e[n]&&e[n].constructor===Object)i[n]===void 0&&(i[n]={}),i[n].constructor===Object?fe(i[n],e[n]):Un(i,e,n,t);else if(le(e[n])){i[n]=[];for(var a=0;a<e[n].length;a++)i[n].push(e[n][a])}else Un(i,e,n,t);return i}function fe(r,i){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)||e===!0)if(he(i[n])==="object"&&i[n]!==null&&Pb(i[n])===Object.prototype)r[n]===void 0?r[n]=fe({},i[n],e):he(r[n])==="object"&&r[n]!==null&&Pb(r[n])===Object.prototype?fe(r[n],i[n],e):Un(r,i,n,t);else if(le(i[n])){var a;r[n]=tt(a=i[n]).call(a)}else Un(r,i,n,t);return r}function Il(r,i){var e;return wv(e=[]).call(e,dr(r),[i])}function wae(r){return tt(r).call(r)}function _ae(r){return r.getBoundingClientRect().left}function Eae(r){return r.getBoundingClientRect().top}function te(r,i){if(le(r))for(var e=r.length,t=0;t<e;t++)i(r[t],t,r);else for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&i(r[n],n,r)}function xv(r){var i;switch(r.length){case 3:case 4:return i=mae.exec(r),i?{r:tr(i[1]+i[1],16),g:tr(i[2]+i[2],16),b:tr(i[3]+i[3],16)}:null;case 6:case 7:return i=yae.exec(r),i?{r:tr(i[1],16),g:tr(i[2],16),b:tr(i[3],16)}:null;default:return null}}function Ut(r,i){if(tn(r).call(r,"rgba"))return r;if(tn(r).call(r,"rgb")){var e=r.substr(re(r).call(r,"(")+1).replace(")","").split(",");return"rgba("+e[0]+","+e[1]+","+e[2]+","+i+")"}else{var t=xv(r);return t==null?r:"rgba("+t.r+","+t.g+","+t.b+","+i+")"}}function gO(r,i,e){var t;return"#"+tt(t=((1<<24)+(r<<16)+(i<<8)+e).toString(16)).call(t,1)}function tf(r,i){if(Kr(r)){var e=r;if(mO(e)){var t,n=Vi(t=e.substr(4).substr(0,e.length-5).split(",")).call(t,function(c){return tr(c)});e=gO(n[0],n[1],n[2])}if(yO(e)===!0){var a=Sae(e),o={h:a.h,s:a.s*.8,v:Math.min(1,a.v*1.02)},s={h:a.h,s:Math.min(1,a.s*1.25),v:a.v*.8},l=rf(s.h,s.s,s.v),u=rf(o.h,o.s,o.v);return{background:e,border:l,highlight:{background:u,border:l},hover:{background:u,border:l}}}else return{background:e,border:e,highlight:{background:e,border:e},hover:{background:e,border:e}}}else if(i){var h={background:r.background||i.background,border:r.border||i.border,highlight:Kr(r.highlight)?{border:r.highlight,background:r.highlight}:{background:r.highlight&&r.highlight.background||i.highlight.background,border:r.highlight&&r.highlight.border||i.highlight.border},hover:Kr(r.hover)?{border:r.hover,background:r.hover}:{border:r.hover&&r.hover.border||i.hover.border,background:r.hover&&r.hover.background||i.hover.background}};return h}else{var d={background:r.background||void 0,border:r.border||void 0,highlight:Kr(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:Kr(r.hover)?{border:r.hover,background:r.hover}:{border:r.hover&&r.hover.border||void 0,background:r.hover&&r.hover.background||void 0}};return d}}function Aa(r,i,e){r=r/255,i=i/255,e=e/255;var t=Math.min(r,Math.min(i,e)),n=Math.max(r,Math.max(i,e));if(t===n)return{h:0,s:0,v:t};var a=r===t?i-e:e===t?r-i:e-r,o=r===t?3:e===t?1:5,s=60*(o-a/(n-t))/360,l=(n-t)/n,u=n;return{h:s,s:l,v:u}}function Qs(r,i,e){var t,n,a,o=Math.floor(r*6),s=r*6-o,l=e*(1-i),u=e*(1-s*i),h=e*(1-(1-s)*i);switch(o%6){case 0:t=e,n=h,a=l;break;case 1:t=u,n=e,a=l;break;case 2:t=l,n=e,a=h;break;case 3:t=l,n=u,a=e;break;case 4:t=h,n=l,a=e;break;case 5:t=e,n=l,a=u;break}return{r:Math.floor(t*255),g:Math.floor(n*255),b:Math.floor(a*255)}}function rf(r,i,e){var t=Qs(r,i,e);return gO(t.r,t.g,t.b)}function Sae(r){var i=xv(r);if(!i)throw new TypeError("'".concat(r,"' is not a valid color."));return Aa(i.r,i.g,i.b)}function yO(r){var i=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(r);return i}function mO(r){return bae.test(r)}function Oae(r){return $ae.test(r)}function nn(r){if(r===null||he(r)!=="object")return null;if(r instanceof Element)return r;var i=Dn(r);for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&he(r[e])=="object"&&(i[e]=nn(r[e]));return i}function Vt(r,i,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=function(v){return v!=null},a=function(v){return v!==null&&he(v)==="object"},o=function(v){for(var p in v)if(Object.prototype.hasOwnProperty.call(v,p))return!1;return!0};if(!a(r))throw new Error("Parameter mergeTarget must be an object");if(!a(i))throw new Error("Parameter options must be an object");if(!n(e))throw new Error("Parameter option must have a value");if(!a(t))throw new Error("Parameter globalOptions must be an object");var s=function(v,p,g){a(v[g])||(v[g]={});var y=p[g],m=v[g];for(var w in y)Object.prototype.hasOwnProperty.call(y,w)&&(m[w]=y[w])},l=i[e],u=a(t)&&!o(t),h=u?t[e]:void 0,d=h?h.enabled:void 0;if(l!==void 0){if(typeof l=="boolean"){a(r[e])||(r[e]={}),r[e].enabled=l;return}if(l===null&&!a(r[e]))if(n(h))r[e]=Dn(h);else return;if(a(l)){var c=!0;l.enabled!==void 0?c=l.enabled:d!==void 0&&(c=h.enabled),s(r,i,e),r[e].enabled=c}}}var Tae={linear:function(i){return i},easeInQuad:function(i){return i*i},easeOutQuad:function(i){return i*(2-i)},easeInOutQuad:function(i){return i<.5?2*i*i:-1+(4-2*i)*i},easeInCubic:function(i){return i*i*i},easeOutCubic:function(i){return--i*i*i+1},easeInOutCubic:function(i){return i<.5?4*i*i*i:(i-1)*(2*i-2)*(2*i-2)+1},easeInQuart:function(i){return i*i*i*i},easeOutQuart:function(i){return 1- --i*i*i*i},easeInOutQuart:function(i){return i<.5?8*i*i*i*i:1-8*--i*i*i*i},easeInQuint:function(i){return i*i*i*i*i},easeOutQuint:function(i){return 1+--i*i*i*i*i},easeInOutQuint:function(i){return i<.5?16*i*i*i*i*i:1+16*--i*i*i*i*i}};function Gr(r,i){var e;le(i)||(i=[i]);var t=vO(r),n;try{for(t.s();!(n=t.n()).done;){var a=n.value;if(a){e=a[i[0]];for(var o=1;o<i.length;o++)e&&(e=e[i[o]]);if(typeof e<"u")break}}}catch(s){t.e(s)}finally{t.f()}return e}var Pae={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"},Iae=function(){function r(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;C(this,r),this.pixelRatio=i,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return x(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 Pae[e]}},{key:"setColor",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e!=="none"){var n,a=this._isColorString(e);if(a!==void 0&&(e=a),Kr(e)===!0){if(mO(e)===!0){var o=e.substr(4).substr(0,e.length-5).split(",");n={r:o[0],g:o[1],b:o[2],a:1}}else if(Oae(e)===!0){var s=e.substr(5).substr(0,e.length-6).split(",");n={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(yO(e)===!0){var l=xv(e);n={r:l.r,g:l.g,b:l.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){var u=e.a!==void 0?e.a:"1.0";n={r:e.r,g:e.g,b:e.b,a:u}}if(n===void 0)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+Ko(e));this._setColor(n,t)}}},{key:"show",value:function(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;t===!0&&(this.previousColor=Fe({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",gr(function(){e.closeCallback!==void 0&&(e.closeCallback(),e.closeCallback=void 0)},0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){this.previousColor!==void 0?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;t===!0&&(this.initialColor=Fe({},e)),this.color=e;var n=Aa(e.r,e.g,e.b),a=2*Math.PI,o=this.r*n.s,s=this.centerCoordinates.x+o*Math.sin(a*n.h),l=this.centerCoordinates.y+o*Math.cos(a*n.h);this.colorPickerSelector.style.left=s-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=l-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(e)}},{key:"_setOpacity",value:function(e){this.color.a=e/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(e){var t=Aa(this.color.r,this.color.g,this.color.b);t.v=e/100;var n=Qs(t.h,t.s,t.v);n.a=this.color.a,this.color=n,this._updatePicker()}},{key:"_updatePicker",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,t=Aa(e.r,e.g,e.b),n=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var a=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,a,o),n.putImageData(this.hueCircle,0,0),n.fillStyle="rgba(0,0,0,"+(1-t.v)+")",n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),qo(n).call(n),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){var e,t,n,a;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var s=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var o=document.createElement("DIV");o.style.color="red",o.style.fontWeight="bold",o.style.padding="10px",o.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(o)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch{}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch{}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var l=this;this.opacityRange.onchange=function(){l._setOpacity(this.value)},this.opacityRange.oninput=function(){l._setOpacity(this.value)},this.brightnessRange.onchange=function(){l._setBrightness(this.value)},this.brightnessRange.oninput=function(){l._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=T(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=T(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=T(n=this._save).call(n,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=T(a=this._loadLast).call(a,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var e=this;this.drag={},this.pinch={},this.hammer=new Cv(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",function(t){t.isFirst&&e._moveSelector(t)}),this.hammer.on("tap",function(t){e._moveSelector(t)}),this.hammer.on("panstart",function(t){e._moveSelector(t)}),this.hammer.on("panmove",function(t){e._moveSelector(t)}),this.hammer.on("panend",function(t){e._moveSelector(t)})}},{key:"_generateHueCircle",value:function(){if(this.generated===!1){var e=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var t=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,n);var a,o,s,l;this.centerCoordinates={x:t*.5,y:n*.5},this.r=.49*t;var u=2*Math.PI/360,h=1/360,d=1/this.r,c;for(s=0;s<360;s++)for(l=0;l<this.r;l++)a=this.centerCoordinates.x+l*Math.sin(u*s),o=this.centerCoordinates.y+l*Math.cos(u*s),c=Qs(s*h,l*d,1),e.fillStyle="rgb("+c.r+","+c.g+","+c.b+")",e.fillRect(a-.5,o-.5,2,2);e.strokeStyle="rgba(0,0,0,1)",e.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),e.stroke(),this.hueCircle=e.getImageData(0,0,t,n)}this.generated=!0}},{key:"_moveSelector",value:function(e){var t=this.colorPickerDiv.getBoundingClientRect(),n=e.center.x-t.left,a=e.center.y-t.top,o=.5*this.colorPickerDiv.clientHeight,s=.5*this.colorPickerDiv.clientWidth,l=n-s,u=a-o,h=Math.atan2(l,u),d=.98*Math.min(Math.sqrt(l*l+u*u),s),c=Math.cos(h)*d+o,f=Math.sin(h)*d+s;this.colorPickerSelector.style.top=c-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=f-.5*this.colorPickerSelector.clientWidth+"px";var v=h/(2*Math.PI);v=v<0?v+1:v;var p=d/this.r,g=Aa(this.color.r,this.color.g,this.color.b);g.h=v,g.s=p;var y=Qs(g.h,g.s,g.v);y.a=this.color.a,this.color=y,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}}]),r}();function nf(){for(var r=arguments.length,i=new Array(r),e=0;e<r;e++)i[e]=arguments[e];if(i.length<1)throw new TypeError("Invalid arguments.");if(i.length===1)return document.createTextNode(i[0]);var t=document.createElement(i[0]);return t.appendChild(nf.apply(void 0,dr(tt(i).call(i,1)))),t}var kae=function(){function r(i,e,t){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){return!1};C(this,r),this.parent=i,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.hideOption=a,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},Fe(this.options,this.defaultOptions),this.configureOptions=t,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new Iae(n),this.wrapper=void 0}return x(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(le(e))this.options.filter=e.join();else if(he(e)==="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),Ot(e)!==void 0&&(this.options.filter=Ot(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e=="boolean"?(this.options.filter=!0,t=e):typeof e=="function"&&(this.options.filter=e,t=!0);Ot(this.options)===!1&&(t=!1),this.options.enabled=t}this._clean()}},{key:"setModuleOptions",value:function(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){this._clean(),this.changedOptions=[];var e=Ot(this.options),t=0,n=!1;for(var a in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,a)&&(this.allowCreation=!1,n=!1,typeof e=="function"?(n=e(a,[]),n=n||this._handleObject(this.configureOptions[a],[a],!0)):(e===!0||re(e).call(e,a)!==-1)&&(n=!0),n!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(a),this._handleObject(this.configureOptions[a],[a])),t++);this._makeButton(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var e=0;e<this.domElements.length;e++)this.wrapper.appendChild(this.domElements[e]);this._showPopupIfNeeded()}},{key:"_clean",value:function(){for(var e=0;e<this.domElements.length;e++)this.wrapper.removeChild(this.domElements[e]);this.wrapper!==void 0&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}},{key:"_getValue",value:function(e){for(var t=this.moduleOptions,n=0;n<e.length;n++)if(t[e[n]]!==void 0)t=t[e[n]];else{t=void 0;break}return t}},{key:"_makeItem",value:function(e){if(this.allowCreation===!0){var t=document.createElement("div");t.className="vis-configuration vis-config-item vis-config-s"+e.length;for(var n=arguments.length,a=new Array(n>1?n-1:0),o=1;o<n;o++)a[o-1]=arguments[o];return de(a).call(a,function(s){t.appendChild(s)}),this.domElements.push(t),this.domElements.length}return 0}},{key:"_makeHeader",value:function(e){var t=document.createElement("div");t.className="vis-configuration vis-config-header",t.innerText=e,this._makeItem([],t)}},{key:"_makeLabel",value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=document.createElement("div");if(a.className="vis-configuration vis-config-label vis-config-s"+t.length,n===!0){for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(nf("i","b",e))}else a.innerText=e+":";return a}},{key:"_makeDropdown",value:function(e,t,n){var a=document.createElement("select");a.className="vis-configuration vis-config-select";var o=0;t!==void 0&&re(e).call(e,t)!==-1&&(o=re(e).call(e,t));for(var s=0;s<e.length;s++){var l=document.createElement("option");l.value=e[s],s===o&&(l.selected="selected"),l.innerText=e[s],a.appendChild(l)}var u=this;a.onchange=function(){u._update(this.value,n)};var h=this._makeLabel(n[n.length-1],n);this._makeItem(n,h,a)}},{key:"_makeRange",value:function(e,t,n){var a=e[0],o=e[1],s=e[2],l=e[3],u=document.createElement("input");u.className="vis-configuration vis-config-range";try{u.type="range",u.min=o,u.max=s}catch{}u.step=l;var h="",d=0;if(t!==void 0){var c=1.2;t<0&&t*c<o?(u.min=Math.ceil(t*c),d=u.min,h="range increased"):t/c<o&&(u.min=Math.ceil(t/c),d=u.min,h="range increased"),t*c>s&&s!==1&&(u.max=Math.ceil(t*c),d=u.max,h="range increased"),u.value=t}else u.value=a;var f=document.createElement("input");f.className="vis-configuration vis-config-rangeinput",f.value=u.value;var v=this;u.onchange=function(){f.value=this.value,v._update(Number(this.value),n)},u.oninput=function(){f.value=this.value};var p=this._makeLabel(n[n.length-1],n),g=this._makeItem(n,p,u,f);h!==""&&this.popupHistory[g]!==d&&(this.popupHistory[g]=d,this._setupPopup(h,g))}},{key:"_makeButton",value:function(){var e=this;if(this.options.showButton===!0){var t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerText="generate options",t.onclick=function(){e._printOptions()},t.onmouseover=function(){t.className="vis-configuration vis-config-button hover"},t.onmouseout=function(){t.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(t)}}},{key:"_setupPopup",value:function(e,t){var n=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){var a=document.createElement("div");a.id="vis-configuration-popup",a.className="vis-configuration-popup",a.innerText=e,a.onclick=function(){n._removePopup()},this.popupCounter+=1,this.popupDiv={html:a,index:t}}}},{key:"_removePopup",value:function(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}},{key:"_showPopupIfNeeded",value:function(){var e=this;if(this.popupDiv.html!==void 0){var t=this.domElements[this.popupDiv.index],n=t.getBoundingClientRect();this.popupDiv.html.style.left=n.left+"px",this.popupDiv.html.style.top=n.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=gr(function(){e.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=gr(function(){e._removePopup()},1800)}}},{key:"_makeCheckbox",value:function(e,t,n){var a=document.createElement("input");a.type="checkbox",a.className="vis-configuration vis-config-checkbox",a.checked=e,t!==void 0&&(a.checked=t,t!==e&&(he(e)==="object"?t!==e.enabled&&this.changedOptions.push({path:n,value:t}):this.changedOptions.push({path:n,value:t})));var o=this;a.onchange=function(){o._update(this.checked,n)};var s=this._makeLabel(n[n.length-1],n);this._makeItem(n,s,a)}},{key:"_makeTextInput",value:function(e,t,n){var a=document.createElement("input");a.type="text",a.className="vis-configuration vis-config-text",a.value=t,t!==e&&this.changedOptions.push({path:n,value:t});var o=this;a.onchange=function(){o._update(this.value,n)};var s=this._makeLabel(n[n.length-1],n);this._makeItem(n,s,a)}},{key:"_makeColorField",value:function(e,t,n){var a=this,o=e[1],s=document.createElement("div");t=t===void 0?o:t,t!=="none"?(s.className="vis-configuration vis-config-colorBlock",s.style.backgroundColor=t):s.className="vis-configuration vis-config-colorBlock none",t=t===void 0?o:t,s.onclick=function(){a._showColorPicker(t,s,n)};var l=this._makeLabel(n[n.length-1],n);this._makeItem(n,l,s)}},{key:"_showColorPicker",value:function(e,t,n){var a=this;t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(function(o){var s="rgba("+o.r+","+o.g+","+o.b+","+o.a+")";t.style.backgroundColor=s,a._update(s,n)}),this.colorPicker.setCloseCallback(function(){t.onclick=function(){a._showColorPicker(e,t,n)}})}},{key:"_handleObject",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=!1,o=Ot(this.options),s=!1;for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){a=!0;var u=e[l],h=Il(t,l);if(typeof o=="function"&&(a=o(l,t),a===!1&&!le(u)&&typeof u!="string"&&typeof u!="boolean"&&u instanceof Object&&(this.allowCreation=!1,a=this._handleObject(u,h,!0),this.allowCreation=n===!1)),a!==!1){s=!0;var d=this._getValue(h);if(le(u))this._handleArray(u,d,h);else if(typeof u=="string")this._makeTextInput(u,d,h);else if(typeof u=="boolean")this._makeCheckbox(u,d,h);else if(u instanceof Object){if(!this.hideOption(t,l,this.moduleOptions))if(u.enabled!==void 0){var c=Il(h,"enabled"),f=this._getValue(c);if(f===!0){var v=this._makeLabel(l,h,!0);this._makeItem(h,v),s=this._handleObject(u,h)||s}else this._makeCheckbox(u,f,h)}else{var p=this._makeLabel(l,h,!0);this._makeItem(h,p),s=this._handleObject(u,h)||s}}else console.error("dont know how to handle",u,l,h)}}return s}},{key:"_handleArray",value:function(e,t,n){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,t,n),e[1]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]=="string"?(this._makeDropdown(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]=="number"&&(this._makeRange(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:Number(t)}))}},{key:"_update",value:function(e,t){var n=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",n),this.initialized=!0,this.parent.setOptions(n)}},{key:"_constructOptions",value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=n;e=e==="true"?!0:e,e=e==="false"?!1:e;for(var o=0;o<t.length;o++)t[o]!=="global"&&(a[t[o]]===void 0&&(a[t[o]]={}),o!==t.length-1?a=a[t[o]]:a[t[o]]=e);return n}},{key:"_printOptions",value:function(){for(var e=this.getOptions();this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(nf("pre","const options = "+Ko(e,null,2)))}},{key:"getOptions",value:function(){for(var e={},t=0;t<this.changedOptions.length;t++)this._constructOptions(this.changedOptions[t].value,this.changedOptions[t].path,e);return e}}]),r}(),Cae=function(){function r(i,e){C(this,r),this.container=i,this.overflowMethod=e||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}return x(r,[{key:"setPosition",value:function(e,t){this.x=tr(e),this.y=tr(t)}},{key:"setText",value:function(e){if(e instanceof Element){for(;this.frame.firstChild;)this.frame.removeChild(this.frame.firstChild);this.frame.appendChild(e)}else this.frame.innerText=e}},{key:"show",value:function(e){if(e===void 0&&(e=!0),e===!0){var t=this.frame.clientHeight,n=this.frame.clientWidth,a=this.frame.parentNode.clientHeight,o=this.frame.parentNode.clientWidth,s=0,l=0;if(this.overflowMethod=="flip"){var u=!1,h=!0;this.y-t<this.padding&&(h=!1),this.x+n>o-this.padding&&(u=!0),u?s=this.x-n:s=this.x,h?l=this.y-t:l=this.y}else l=this.y-t,l+t+this.padding>a&&(l=a-t-this.padding),l<this.padding&&(l=this.padding),s=this.x,s+n+this.padding>o&&(s=o-n-this.padding),s<this.padding&&(s=this.padding);this.frame.style.left=s+"px",this.frame.style.top=l+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}},{key:"hide",value:function(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}},{key:"destroy",value:function(){this.frame.parentNode.removeChild(this.frame)}}]),r}(),Ta=!1,Yb,af="background: #FFeeee; color: #dd0000",xae=function(){function r(){C(this,r)}return x(r,null,[{key:"validate",value:function(e,t,n){Ta=!1,Yb=t;var a=t;return n!==void 0&&(a=t[n]),r.parse(e,a,[]),Ta}},{key:"parse",value:function(e,t,n){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.check(a,e,t,n)}},{key:"check",value:function(e,t,n,a){if(n[e]===void 0&&n.__any__===void 0){r.getSuggestion(e,n,a);return}var o=e,s=!0;n[e]===void 0&&n.__any__!==void 0&&(o="__any__",s=r.getType(t[e])==="object");var l=n[o];s&&l.__type__!==void 0&&(l=l.__type__),r.checkFields(e,t,n,o,l,a)}},{key:"checkFields",value:function(e,t,n,a,o,s){var l=function(c){console.error("%c"+c+r.printLocation(s,e),af)},u=r.getType(t[e]),h=o[u];h!==void 0?r.getType(h)==="array"&&re(h).call(h,t[e])===-1?(l('Invalid option detected in "'+e+'". Allowed values are:'+r.print(h)+' not "'+t[e]+'". '),Ta=!0):u==="object"&&a!=="__any__"&&(s=Il(s,e),r.parse(t[e],n[a],s)):o.any===void 0&&(l('Invalid type received for "'+e+'". Expected: '+r.print(_e(o))+". Received ["+u+'] "'+t[e]+'"'),Ta=!0)}},{key:"getType",value:function(e){var t=he(e);return t==="object"?e===null?"null":e instanceof Boolean?"boolean":e instanceof Number?"number":e instanceof String?"string":le(e)?"array":e instanceof Date?"date":e.nodeType!==void 0?"dom":e._isAMomentObject===!0?"moment":"object":t==="number"?"number":t==="boolean"?"boolean":t==="string"?"string":t===void 0?"undefined":t}},{key:"getSuggestion",value:function(e,t,n){var a=r.findInOptions(e,t,n,!1),o=r.findInOptions(e,Yb,[],!0),s=8,l=4,u;a.indexMatch!==void 0?u=" in "+r.printLocation(a.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+a.indexMatch+`"?
73
+
74
+ `:o.distance<=l&&a.distance>o.distance?u=" in "+r.printLocation(a.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+r.printLocation(o.path,o.closestMatch,""):a.distance<=s?u='. Did you mean "'+a.closestMatch+'"?'+r.printLocation(a.path,e):u=". Did you mean one of these: "+r.print(_e(t))+r.printLocation(n,e),console.error('%cUnknown option detected: "'+e+'"'+u,af),Ta=!0}},{key:"findInOptions",value:function(e,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=1e9,s="",l=[],u=e.toLowerCase(),h=void 0;for(var d in t){var c=void 0;if(t[d].__type__!==void 0&&a===!0){var f=r.findInOptions(e,t[d],Il(n,d));o>f.distance&&(s=f.closestMatch,l=f.path,o=f.distance,h=f.indexMatch)}else{var v;re(v=d.toLowerCase()).call(v,u)!==-1&&(h=d),c=r.levenshteinDistance(e,d),o>c&&(s=d,l=wae(n),o=c)}}return{closestMatch:s,path:l,distance:o,indexMatch:h}}},{key:"printLocation",value:function(e,t){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at:
75
+ `,a=`
76
+
77
+ `+n+`options = {
78
+ `,o=0;o<e.length;o++){for(var s=0;s<o+1;s++)a+=" ";a+=e[o]+`: {
79
+ `}for(var l=0;l<e.length+1;l++)a+=" ";a+=t+`
80
+ `;for(var u=0;u<e.length+1;u++){for(var h=0;h<e.length-u;h++)a+=" ";a+=`}
81
+ `}return a+`
82
+
83
+ `}},{key:"print",value:function(e){return Ko(e).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}},{key:"levenshteinDistance",value:function(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;var n=[],a;for(a=0;a<=t.length;a++)n[a]=[a];var o;for(o=0;o<=e.length;o++)n[0][o]=o;for(a=1;a<=t.length;a++)for(o=1;o<=e.length;o++)t.charAt(a-1)==e.charAt(o-1)?n[a][o]=n[a-1][o-1]:n[a][o]=Math.min(n[a-1][o-1]+1,Math.min(n[a][o-1]+1,n[a-1][o]+1));return n[t.length][e.length]}}]),r}(),Aae=vr,Rae=kae,Ri=Cv,Dae=Cae,bO=af,Mae=xae;function Nae(r){return Yr=r,jae()}var $O={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},Av=Dn($O);Av.color="color.color";Av.style="dashes";var ct={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},Xb={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},Yr="",qi=0,Z="",U="",wt=ct.NULL;function Fae(){qi=0,Z=Yr.charAt(0)}function He(){qi++,Z=Yr.charAt(qi)}function yi(){return Yr.charAt(qi+1)}function Qb(r){var i=r.charCodeAt(0);return i<47?i===35||i===46:i<59?i>47:i<91?i>64:i<96?i===95:i<123?i>96:!1}function on(r,i){if(r||(r={}),i)for(var e in i)i.hasOwnProperty(e)&&(r[e]=i[e]);return r}function Bae(r,i,e){for(var t=i.split("."),n=r;t.length;){var a=t.shift();t.length?(n[a]||(n[a]={}),n=n[a]):n[a]=e}}function wO(r,i){for(var e,t,n=null,a=[r],o=r;o.parent;)a.push(o.parent),o=o.parent;if(o.nodes){for(e=0,t=o.nodes.length;e<t;e++)if(i.id===o.nodes[e].id){n=o.nodes[e];break}}for(n||(n={id:i.id},r.node&&(n.attr=on(n.attr,r.node))),e=a.length-1;e>=0;e--){var s,l=a[e];l.nodes||(l.nodes=[]),re(s=l.nodes).call(s,n)===-1&&l.nodes.push(n)}i.attr&&(n.attr=on(n.attr,i.attr))}function Lae(r,i){if(r.edges||(r.edges=[]),r.edges.push(i),r.edge){var e=on({},r.edge);i.attr=on(e,i.attr)}}function _O(r,i,e,t,n){var a={from:i,to:e,type:t};return r.edge&&(a.attr=on({},r.edge)),a.attr=on(a.attr||{},n),n!=null&&n.hasOwnProperty("arrows")&&n.arrows!=null&&(a.arrows={to:{enabled:!0,type:n.arrows.type}},n.arrows=null),a}function ve(){for(wt=ct.NULL,U="";Z===" "||Z===" "||Z===`
84
+ `||Z==="\r";)He();do{var r=!1;if(Z==="#"){for(var i=qi-1;Yr.charAt(i)===" "||Yr.charAt(i)===" ";)i--;if(Yr.charAt(i)===`
85
+ `||Yr.charAt(i)===""){for(;Z!=""&&Z!=`
86
+ `;)He();r=!0}}if(Z==="/"&&yi()==="/"){for(;Z!=""&&Z!=`
87
+ `;)He();r=!0}if(Z==="/"&&yi()==="*"){for(;Z!="";)if(Z==="*"&&yi()==="/"){He(),He();break}else He();r=!0}for(;Z===" "||Z===" "||Z===`
88
+ `||Z==="\r";)He()}while(r);if(Z===""){wt=ct.DELIMITER;return}var e=Z+yi();if(Xb[e]){wt=ct.DELIMITER,U=e,He(),He();return}if(Xb[Z]){wt=ct.DELIMITER,U=Z,He();return}if(Qb(Z)||Z==="-"){for(U+=Z,He();Qb(Z);)U+=Z,He();U==="false"?U=!1:U==="true"?U=!0:isNaN(Number(U))||(U=Number(U)),wt=ct.IDENTIFIER;return}if(Z==='"'){for(He();Z!=""&&(Z!='"'||Z==='"'&&yi()==='"');)Z==='"'?(U+=Z,He()):Z==="\\"&&yi()==="n"?(U+=`
89
+ `,He()):U+=Z,He();if(Z!='"')throw ft('End of string " expected');He(),wt=ct.IDENTIFIER;return}for(wt=ct.UNKNOWN;Z!="";)U+=Z,He();throw new SyntaxError('Syntax error in part "'+TO(U,30)+'"')}function jae(){var r={};if(Fae(),ve(),U==="strict"&&(r.strict=!0,ve()),(U==="graph"||U==="digraph")&&(r.type=U,ve()),wt===ct.IDENTIFIER&&(r.id=U,ve()),U!="{")throw ft("Angle bracket { expected");if(ve(),EO(r),U!="}")throw ft("Angle bracket } expected");if(ve(),U!=="")throw ft("End of file expected");return ve(),delete r.node,delete r.edge,delete r.graph,r}function EO(r){for(;U!==""&&U!="}";)zae(r),U===";"&&ve()}function zae(r){var i=SO(r);if(i){OO(r,i);return}var e=Hae(r);if(!e){if(wt!=ct.IDENTIFIER)throw ft("Identifier expected");var t=U;if(ve(),U==="="){if(ve(),wt!=ct.IDENTIFIER)throw ft("Identifier expected");r[t]=U,ve()}else Wae(r,t)}}function SO(r){var i=null;if(U==="subgraph"&&(i={},i.type="subgraph",ve(),wt===ct.IDENTIFIER&&(i.id=U,ve())),U==="{"){if(ve(),i||(i={}),i.parent=r,i.node=r.node,i.edge=r.edge,i.graph=r.graph,EO(i),U!="}")throw ft("Angle bracket } expected");ve(),delete i.node,delete i.edge,delete i.graph,delete i.parent,r.subgraphs||(r.subgraphs=[]),r.subgraphs.push(i)}return i}function Hae(r){return U==="node"?(ve(),r.node=za(),"node"):U==="edge"?(ve(),r.edge=za(),"edge"):U==="graph"?(ve(),r.graph=za(),"graph"):null}function Wae(r,i){var e={id:i},t=za();t&&(e.attr=t),wO(r,e),OO(r,i)}function OO(r,i){for(;U==="->"||U==="--";){var e,t=U;ve();var n=SO(r);if(n)e=n;else{if(wt!=ct.IDENTIFIER)throw ft("Identifier or subgraph expected");e=U,wO(r,{id:e}),ve()}var a=za(),o=_O(r,i,e,t,a);Lae(r,o),i=e}}function za(){for(var r,i=null,e={dashed:!0,solid:!1,dotted:[1,5]},t={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},n=new Array,a=new Array;U==="[";){for(ve(),i={};U!==""&&U!="]";){if(wt!=ct.IDENTIFIER)throw ft("Attribute name expected");var o=U;if(ve(),U!="=")throw ft("Equal sign = expected");if(ve(),wt!=ct.IDENTIFIER)throw ft("Attribute value expected");var s=U;o==="style"&&(s=e[s]);var l;o==="arrowhead"&&(l=t[s],o="arrows",s={to:{enabled:!0,type:l}}),o==="arrowtail"&&(l=t[s],o="arrows",s={from:{enabled:!0,type:l}}),n.push({attr:i,name:o,value:s}),a.push(o),ve(),U==","&&ve()}if(U!="]")throw ft("Bracket ] expected");ve()}if(tn(a).call(a,"dir")){var u={};for(u.arrows={},r=0;r<n.length;r++)if(n[r].name==="arrows")if(n[r].value.to!=null)u.arrows.to=r;else if(n[r].value.from!=null)u.arrows.from=r;else throw ft("Invalid value of arrows");else n[r].name==="dir"&&(u.dir=r);var h=n[u.dir].value;if(!tn(a).call(a,"arrows"))if(h==="both")n.push({attr:n[u.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),u.arrows.to=n.length-1,n.push({attr:n[u.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),u.arrows.from=n.length-1;else if(h==="forward")n.push({attr:n[u.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),u.arrows.to=n.length-1;else if(h==="back")n.push({attr:n[u.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),u.arrows.from=n.length-1;else if(h==="none")n.push({attr:n[u.dir].attr,name:"arrows",value:""}),u.arrows.to=n.length-1;else throw ft('Invalid dir type "'+h+'"');var d,c;if(h==="both")u.arrows.to&&u.arrows.from?(c=n[u.arrows.to].value.to.type,d=n[u.arrows.from].value.from.type,n[u.arrows.to]={attr:n[u.arrows.to].attr,name:n[u.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}},kr(n).call(n,u.arrows.from,1)):u.arrows.to?(c=n[u.arrows.to].value.to.type,d="arrow",n[u.arrows.to]={attr:n[u.arrows.to].attr,name:n[u.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}}):u.arrows.from&&(c="arrow",d=n[u.arrows.from].value.from.type,n[u.arrows.from]={attr:n[u.arrows.from].attr,name:n[u.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}});else if(h==="back")u.arrows.to&&u.arrows.from?(c="",d=n[u.arrows.from].value.from.type,n[u.arrows.from]={attr:n[u.arrows.from].attr,name:n[u.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}}):u.arrows.to?(c="",d="arrow",u.arrows.from=u.arrows.to,n[u.arrows.from]={attr:n[u.arrows.from].attr,name:n[u.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}}):u.arrows.from&&(c="",d=n[u.arrows.from].value.from.type,n[u.arrows.to]={attr:n[u.arrows.from].attr,name:n[u.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}}),n[u.arrows.from]={attr:n[u.arrows.from].attr,name:n[u.arrows.from].name,value:{from:{enabled:!0,type:n[u.arrows.from].value.from.type}}};else if(h==="none"){var f;u.arrows.to?f=u.arrows.to:f=u.arrows.from,n[f]={attr:n[f].attr,name:n[f].name,value:""}}else if(h==="forward")u.arrows.to&&u.arrows.from?(c=n[u.arrows.to].value.to.type,d="",n[u.arrows.to]={attr:n[u.arrows.to].attr,name:n[u.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}}):u.arrows.to?(c=n[u.arrows.to].value.to.type,d="",n[u.arrows.to]={attr:n[u.arrows.to].attr,name:n[u.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}}):u.arrows.from&&(c="arrow",d="",u.arrows.to=u.arrows.from,n[u.arrows.to]={attr:n[u.arrows.to].attr,name:n[u.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}}),n[u.arrows.to]={attr:n[u.arrows.to].attr,name:n[u.arrows.to].name,value:{to:{enabled:!0,type:n[u.arrows.to].value.to.type}}};else throw ft('Invalid dir type "'+h+'"');kr(n).call(n,u.dir,1)}var v;if(tn(a).call(a,"penwidth")){var p=[];for(v=n.length,r=0;r<v;r++)n[r].name!=="width"&&(n[r].name==="penwidth"&&(n[r].name="width"),p.push(n[r]));n=p}for(v=n.length,r=0;r<v;r++)Bae(n[r].attr,n[r].name,n[r].value);return i}function ft(r){return new SyntaxError(r+', got "'+TO(U,30)+'" (char '+qi+")")}function TO(r,i){return r.length<=i?r:r.substr(0,27)+"..."}function Vae(r,i,e){le(r)?de(r).call(r,function(t){le(i)?de(i).call(i,function(n){e(t,n)}):e(t,i)}):le(i)?de(i).call(i,function(t){e(r,t)}):e(r,i)}function Bd(r,i,e){for(var t=i.split("."),n=t.pop(),a=r,o=0;o<t.length;o++){var s=t[o];s in a||(a[s]={}),a=a[s]}return a[n]=e,r}function Jb(r,i){var e={};for(var t in r)if(r.hasOwnProperty(t)){var n=i[t];le(n)?de(n).call(n,function(a){Bd(e,a,r[t])}):typeof n=="string"?Bd(e,n,r[t]):Bd(e,t,r[t])}return e}function Uae(r){var i=Nae(r),e={nodes:[],edges:[],options:{}};if(i.nodes){var t;de(t=i.nodes).call(t,function(o){var s={id:o.id,label:String(o.label||o.id)};on(s,Jb(o.attr,$O)),s.image&&(s.shape="image"),e.nodes.push(s)})}if(i.edges){var n,a=function(s){var l={from:s.from,to:s.to};return on(l,Jb(s.attr,Av)),l.arrows==null&&s.type==="->"&&(l.arrows="to"),l};de(n=i.edges).call(n,function(o){var s,l;if(o.from instanceof Object?s=o.from.nodes:s={id:o.from},o.to instanceof Object?l=o.to.nodes:l={id:o.to},o.from instanceof Object&&o.from.edges){var u;de(u=o.from.edges).call(u,function(d){var c=a(d);e.edges.push(c)})}if(Vae(s,l,function(d,c){var f=_O(e,d.id,c.id,o.type,o.attr),v=a(f);e.edges.push(v)}),o.to instanceof Object&&o.to.edges){var h;de(h=o.to.edges).call(h,function(d){var c=a(d);e.edges.push(c)})}})}return i.attr&&(e.options=i.attr),e}function Gae(r,i){var e,t={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};i!=null&&(i.fixed!=null&&(t.nodes.fixed=i.fixed),i.parseColor!=null&&(t.nodes.parseColor=i.parseColor),i.inheritColor!=null&&(t.edges.inheritColor=i.inheritColor));var n=r.edges,a=Vi(n).call(n,function(s){var l={from:s.source,id:s.id,to:s.target};return s.attributes!=null&&(l.attributes=s.attributes),s.label!=null&&(l.label=s.label),s.attributes!=null&&s.attributes.title!=null&&(l.title=s.attributes.title),s.type==="Directed"&&(l.arrows="to"),s.color&&t.edges.inheritColor===!1&&(l.color=s.color),l}),o=Vi(e=r.nodes).call(e,function(s){var l={id:s.id,fixed:t.nodes.fixed&&s.x!=null&&s.y!=null};return s.attributes!=null&&(l.attributes=s.attributes),s.label!=null&&(l.label=s.label),s.size!=null&&(l.size=s.size),s.attributes!=null&&s.attributes.title!=null&&(l.title=s.attributes.title),s.title!=null&&(l.title=s.title),s.x!=null&&(l.x=s.x),s.y!=null&&(l.y=s.y),s.color!=null&&(t.nodes.parseColor===!0?l.color=s.color:l.color={background:s.color,border:s.color,highlight:{background:s.color,border:s.color},hover:{background:s.color,border:s.color}}),l});return{nodes:o,edges:a}}var Kae={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"},qae={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"},Yae={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"},Xae={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"},Qae={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"},Jae={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ó"},Zae={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},eoe={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},toe={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},roe={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"},noe={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"},ioe=Object.freeze({__proto__:null,cn:eoe,cs:noe,de:qae,en:Kae,es:Yae,fr:roe,it:Xae,nl:Qae,pt:Jae,ru:Zae,uk:toe});function aoe(r,i){try{var e=i.split(/[-_ /]/,2),t=Se(e,2),n=t[0],a=t[1],o=n!=null?n.toLowerCase():null,s=a!=null?a.toUpperCase():null;if(o&&s){var l=o+"-"+s;if(Object.prototype.hasOwnProperty.call(r,l))return l;var u;console.warn(wv(u="Unknown variant ".concat(s," of language ")).call(u,o,"."))}if(o){var h=o;if(Object.prototype.hasOwnProperty.call(r,h))return h;console.warn("Unknown language ".concat(o))}return console.warn("Unknown locale ".concat(i,", falling back to English.")),"en"}catch(d){return console.error(d),console.warn("Unexpected error while normalizing locale ".concat(i,", falling back to English.")),"en"}}var ooe=function(){function r(){C(this,r),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}return x(r,[{key:"init",value:function(){if(!this.initialized()){this.src=this.image.src;var e=this.image.width,t=this.image.height;this.width=e,this.height=t;var n=Math.floor(t/2),a=Math.floor(t/4),o=Math.floor(t/8),s=Math.floor(t/16),l=Math.floor(e/2),u=Math.floor(e/4),h=Math.floor(e/8),d=Math.floor(e/16);this.canvas.width=3*u,this.canvas.height=n,this.coordinates=[[0,0,l,n],[l,0,u,a],[l,a,h,o],[5*h,a,d,s]],this._fillMipMap()}}},{key:"initialized",value:function(){return this.coordinates!==void 0}},{key:"_fillMipMap",value:function(){var e=this.canvas.getContext("2d"),t=this.coordinates[0];e.drawImage(this.image,t[0],t[1],t[2],t[3]);for(var n=1;n<this.NUM_ITERATIONS;n++){var a=this.coordinates[n-1],o=this.coordinates[n];e.drawImage(this.canvas,a[0],a[1],a[2],a[3],o[0],o[1],o[2],o[3])}}},{key:"drawImageAtPosition",value:function(e,t,n,a,o,s){if(this.initialized())if(t>2){t*=.5;for(var l=0;t>2&&l<this.NUM_ITERATIONS;)t*=.5,l+=1;l>=this.NUM_ITERATIONS&&(l=this.NUM_ITERATIONS-1);var u=this.coordinates[l];e.drawImage(this.canvas,u[0],u[1],u[2],u[3],n,a,o,s)}else e.drawImage(this.image,n,a,o,s)}}]),r}(),soe=function(){function r(i){C(this,r),this.images={},this.imageBroken={},this.callback=i}return x(r,[{key:"_tryloadBrokenUrl",value:function(e,t,n){if(!(e===void 0||n===void 0)){if(t===void 0){console.warn("No broken url image defined");return}n.image.onerror=function(){console.error("Could not load brokenImage:",t)},n.image.src=t}}},{key:"_redrawWithImage",value:function(e){this.callback&&this.callback(e)}},{key:"load",value:function(e,t){var n=this,a=this.images[e];if(a)return a;var o=new ooe;return this.images[e]=o,o.image.onload=function(){n._fixImageCoordinates(o.image),o.init(),n._redrawWithImage(o)},o.image.onerror=function(){console.error("Could not load image:",e),n._tryloadBrokenUrl(e,t,o)},o.image.src=e,o}},{key:"_fixImageCoordinates",value:function(e){e.width===0&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}]),r}(),PO={exports:{}},loe=ne,uoe=loe(function(){if(typeof ArrayBuffer=="function"){var r=new ArrayBuffer(8);Object.isExtensible(r)&&Object.defineProperty(r,"a",{value:8})}}),hoe=ne,doe=Ye,coe=Lr,Zb=uoe,Js=Object.isExtensible,foe=hoe(function(){Js(1)}),voe=foe||Zb?function(i){return!doe(i)||Zb&&coe(i)==="ArrayBuffer"?!1:Js?Js(i):!0}:Js,poe=ne,IO=!poe(function(){return Object.isExtensible(Object.preventExtensions({}))}),goe=G,yoe=ae,moe=Lo,boe=Ye,Rv=Xe,$oe=zt.f,e$=Wo,woe=_u,Dv=voe,_oe=du,Eoe=IO,kO=!1,Nr=_oe("meta"),Soe=0,Mv=function(r){$oe(r,Nr,{value:{objectID:"O"+Soe++,weakData:{}}})},Ooe=function(r,i){if(!boe(r))return typeof r=="symbol"?r:(typeof r=="string"?"S":"P")+r;if(!Rv(r,Nr)){if(!Dv(r))return"F";if(!i)return"E";Mv(r)}return r[Nr].objectID},Toe=function(r,i){if(!Rv(r,Nr)){if(!Dv(r))return!0;if(!i)return!1;Mv(r)}return r[Nr].weakData},Poe=function(r){return Eoe&&kO&&Dv(r)&&!Rv(r,Nr)&&Mv(r),r},Ioe=function(){koe.enable=function(){},kO=!0;var r=e$.f,i=yoe([].splice),e={};e[Nr]=1,r(e).length&&(e$.f=function(t){for(var n=r(t),a=0,o=n.length;a<o;a++)if(n[a]===Nr){i(n,a,1);break}return n},goe({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:woe.f}))},koe=PO.exports={enable:Ioe,fastKey:Ooe,getWeakData:Toe,onFreeze:Poe};moe[Nr]=!0;var Au=PO.exports,Coe=Fo,xoe=jt,Aoe=Ht,Roe=fa,Doe=kE,Moe=Xt,t$=Re,Noe=DE,Foe=$u,r$=IE,Boe=TypeError,Zs=function(r,i){this.stopped=r,this.result=i},n$=Zs.prototype,Nv=function(r,i,e){var t=e&&e.that,n=!!(e&&e.AS_ENTRIES),a=!!(e&&e.IS_RECORD),o=!!(e&&e.IS_ITERATOR),s=!!(e&&e.INTERRUPTED),l=Coe(i,t),u,h,d,c,f,v,p,g=function(m){return u&&r$(u,"normal",m),new Zs(!0,m)},y=function(m){return n?(Aoe(m),s?l(m[0],m[1],g):l(m[0],m[1])):s?l(m,g):l(m)};if(a)u=r.iterator;else if(o)u=r;else{if(h=Foe(r),!h)throw new Boe(Roe(r)+" is not iterable");if(Doe(h)){for(d=0,c=Moe(r);c>d;d++)if(f=y(r[d]),f&&t$(n$,f))return f;return new Zs(!1)}u=Noe(r,h)}for(v=a?r.next:u.next;!(p=xoe(v,u)).done;){try{f=y(p.value)}catch(m){r$(u,"throw",m)}if(typeof f=="object"&&f&&t$(n$,f))return f}return new Zs(!1)},Loe=Re,joe=TypeError,Fv=function(r,i){if(Loe(i,r))return r;throw new joe("Incorrect invocation")},zoe=G,Hoe=Pe,Woe=Au,Voe=ne,Uoe=pa,Goe=Nv,Koe=Fv,qoe=Ke,Yoe=Ye,Xoe=da,Qoe=ya,Joe=zt.f,Zoe=fn.forEach,ese=qe,CO=ti,tse=CO.set,rse=CO.getterFor,Bv=function(r,i,e){var t=r.indexOf("Map")!==-1,n=r.indexOf("Weak")!==-1,a=t?"set":"add",o=Hoe[r],s=o&&o.prototype,l={},u;if(!ese||!qoe(o)||!(n||s.forEach&&!Voe(function(){new o().entries().next()})))u=e.getConstructor(i,r,t,a),Woe.enable();else{u=i(function(c,f){tse(Koe(c,h),{type:r,collection:new o}),Xoe(f)||Goe(f,c[a],{that:c,AS_ENTRIES:t})});var h=u.prototype,d=rse(r);Zoe(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(c){var f=c==="add"||c==="set";c in s&&!(n&&c==="clear")&&Uoe(h,c,function(v,p){var g=d(this).collection;if(!f&&n&&!Yoe(v))return c==="get"?void 0:!1;var y=g[c](v===0?0:v,p);return f?this:y})}),n||Joe(h,"size",{configurable:!0,get:function(){return d(this).collection.size}})}return Qoe(u,r,!1,!0),l[r]=u,zoe({global:!0,forced:!0},l),n||e.setStrong(u,r,t),u},nse=zo,Lv=function(r,i,e){for(var t in i)e&&e.unsafe&&r[t]?r[t]=i[t]:nse(r,t,i[t],e);return r},ise=Yt,ase=pv,ose=Ie,sse=qe,i$=ose("species"),lse=function(r){var i=ise(r);sse&&i&&!i[i$]&&ase(i,i$,{configurable:!0,get:function(){return this}})},use=ga,hse=pv,a$=Lv,dse=Fo,cse=Fv,fse=da,vse=Nv,pse=hv,Rs=dv,gse=lse,Pa=qe,o$=Au.fastKey,xO=ti,s$=xO.set,Ld=xO.getterFor,AO={getConstructor:function(r,i,e,t){var n=r(function(u,h){cse(u,a),s$(u,{type:i,index:use(null),first:void 0,last:void 0,size:0}),Pa||(u.size=0),fse(h)||vse(h,u[t],{that:u,AS_ENTRIES:e})}),a=n.prototype,o=Ld(i),s=function(u,h,d){var c=o(u),f=l(u,h),v,p;return f?f.value=d:(c.last=f={index:p=o$(h,!0),key:h,value:d,previous:v=c.last,next:void 0,removed:!1},c.first||(c.first=f),v&&(v.next=f),Pa?c.size++:u.size++,p!=="F"&&(c.index[p]=f)),u},l=function(u,h){var d=o(u),c=o$(h),f;if(c!=="F")return d.index[c];for(f=d.first;f;f=f.next)if(f.key===h)return f};return a$(a,{clear:function(){for(var h=this,d=o(h),c=d.index,f=d.first;f;)f.removed=!0,f.previous&&(f.previous=f.previous.next=void 0),delete c[f.index],f=f.next;d.first=d.last=void 0,Pa?d.size=0:h.size=0},delete:function(u){var h=this,d=o(h),c=l(h,u);if(c){var f=c.next,v=c.previous;delete d.index[c.index],c.removed=!0,v&&(v.next=f),f&&(f.previous=v),d.first===c&&(d.first=f),d.last===c&&(d.last=v),Pa?d.size--:h.size--}return!!c},forEach:function(h){for(var d=o(this),c=dse(h,arguments.length>1?arguments[1]:void 0),f;f=f?f.next:d.first;)for(c(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(h){return!!l(this,h)}}),a$(a,e?{get:function(h){var d=l(this,h);return d&&d.value},set:function(h,d){return s(this,h===0?0:h,d)}}:{add:function(h){return s(this,h=h===0?0:h,h)}}),Pa&&hse(a,"size",{configurable:!0,get:function(){return o(this).size}}),n},setStrong:function(r,i,e){var t=i+" Iterator",n=Ld(i),a=Ld(t);pse(r,i,function(o,s){s$(this,{type:t,target:o,state:n(o),kind:s,last:void 0})},function(){for(var o=a(this),s=o.kind,l=o.last;l&&l.removed;)l=l.previous;return!o.target||!(o.last=l=l?l.next:o.state.first)?(o.target=void 0,Rs(void 0,!0)):Rs(s==="keys"?l.key:s==="values"?l.value:[l.key,l.value],!1)},e?"entries":"values",!e,!0),gse(i)}},yse=Bv,mse=AO;yse("Map",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},mse);var bse=ie,$se=bse.Map,wse=$se,_se=wse,Ese=_se,RO=z(Ese),Sse=function(){function r(){C(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},Fe(this.options,this.defaultOptions)}return x(r,[{key:"setOptions",value:function(e){var t=["useDefaultGroups"];if(e!==void 0){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&re(t).call(t,n)===-1){var a=e[n];this.add(n,a)}}}},{key:"clear",value:function(){this._groups=new RO,this._groupNames=[]}},{key:"get",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this._groups.get(e);if(n===void 0&&t)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){var a=this._groupIndex%this._groupNames.length;++this._groupIndex,n={},n.color=this._groups.get(this._groupNames[a]),this._groups.set(e,n)}else{var o=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,n={},n.color=this._defaultGroups[o],this._groups.set(e,n)}return n}},{key:"add",value:function(e,t){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,t),t}}]),r}(),Ose=G;Ose({target:"Number",stat:!0},{isNaN:function(i){return i!==i}});var Tse=ie,Pse=Tse.Number.isNaN,Ise=Pse,kse=Ise,Cse=kse,of=z(Cse),xse=Pe,Ase=xse.isFinite,Rse=Number.isFinite||function(i){return typeof i=="number"&&Ase(i)},Dse=G,Mse=Rse;Dse({target:"Number",stat:!0},{isFinite:Mse});var Nse=ie,Fse=Nse.Number.isFinite,Bse=Fse,Lse=Bse,jse=Lse,Tn=z(jse),zse=G,Hse=fn.some,Wse=$a,Vse=Wse("some");zse({target:"Array",proto:!0,forced:!Vse},{some:function(i){return Hse(this,i,arguments.length>1?arguments[1]:void 0)}});var Use=Qe,Gse=Use("Array").some,Kse=Re,qse=Gse,jd=Array.prototype,Yse=function(r){var i=r.some;return r===jd||Kse(jd,r)&&i===jd.some?qse:i},Xse=Yse,Qse=Xse,Jse=Qse,Zse=z(Jse),ele=ie,tle=ele.Object.getOwnPropertySymbols,rle=tle,nle=rle,ile=nle,sn=z(ile),DO={exports:{}},ale=G,ole=ne,sle=$r,MO=ha.f,NO=qe,lle=!NO||ole(function(){MO(1)});ale({target:"Object",stat:!0,forced:lle,sham:!NO},{getOwnPropertyDescriptor:function(i,e){return MO(sle(i),e)}});var ule=ie,FO=ule.Object,hle=DO.exports=function(i,e){return FO.getOwnPropertyDescriptor(i,e)};FO.getOwnPropertyDescriptor.sham&&(hle.sham=!0);var dle=DO.exports,cle=dle,BO=cle,fle=BO,pn=z(fle),vle=G,ple=qe,gle=Aee,yle=$r,mle=ha,ble=ba;vle({target:"Object",stat:!0,sham:!ple},{getOwnPropertyDescriptors:function(i){for(var e=yle(i),t=mle.f,n=gle(e),a={},o=0,s,l;n.length>o;)l=t(e,s=n[o++]),l!==void 0&&ble(a,s,l);return a}});var $le=ie,wle=$le.Object.getOwnPropertyDescriptors,_le=wle,Ele=_le,Sle=Ele,ln=z(Sle),LO={exports:{}},Ole=G,Tle=qe,l$=yu.f;Ole({target:"Object",stat:!0,forced:Object.defineProperties!==l$,sham:!Tle},{defineProperties:l$});var Ple=ie,jO=Ple.Object,Ile=LO.exports=function(i,e){return jO.defineProperties(i,e)};jO.defineProperties.sham&&(Ile.sham=!0);var kle=LO.exports,Cle=kle,xle=Cle,Ale=xle,Ru=z(Ale),Rle=VE,Du=z(Rle);function Mu(r,i,e){return i=ES(i),i in r?wu(r,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[i]=e,r}var zO=Pe,Dle=ne,Mle=ae,Nle=wr,Fle=MS.trim,Ble=_v,Lle=Mle("".charAt),kl=zO.parseFloat,u$=zO.Symbol,h$=u$&&u$.iterator,jle=1/kl(Ble+"-0")!==-1/0||h$&&!Dle(function(){kl(Object(h$))}),zle=jle?function(i){var e=Fle(Nle(i)),t=kl(e);return t===0&&Lle(e,0)==="-"?-0:t}:kl,Hle=G,d$=zle;Hle({global:!0,forced:parseFloat!==d$},{parseFloat:d$});var Wle=ie,Vle=Wle.parseFloat,Ule=Vle,Gle=Ule,Kle=Gle,HO=z(Kle),qle=G,Yle=ne,Xle=_u.f,Qle=Yle(function(){return!Object.getOwnPropertyNames(1)});qle({target:"Object",stat:!0,forced:Qle},{getOwnPropertyNames:Xle});var Jle=ie,Zle=Jle.Object,eue=function(i){return Zle.getOwnPropertyNames(i)},tue=eue,rue=tue,nue=rue,iue=z(nue);function jv(r,i){var e=["node","edge","label"],t=!0,n=Gr(i,"chosen");if(typeof n=="boolean")t=n;else if(he(n)==="object"){if(re(e).call(e,r)===-1)throw new Error("choosify: subOption '"+r+"' should be one of '"+e.join("', '")+"'");var a=Gr(i,["chosen",r]);(typeof a=="boolean"||typeof a=="function")&&(t=a)}return t}function sf(r,i,e){if(r.width<=0||r.height<=0)return!1;if(e!==void 0){var t={x:i.x-e.x,y:i.y-e.y};if(e.angle!==0){var n=-e.angle,a={x:Math.cos(n)*t.x-Math.sin(n)*t.y,y:Math.sin(n)*t.x+Math.cos(n)*t.y};i=a}else i=t}var o=r.x+r.width,s=r.y+r.width;return r.left<i.x&&o>i.x&&r.top<i.y&&s>i.y}function Cl(r){return typeof r=="string"&&r!==""}function WO(r,i,e,t){var n=t.x,a=t.y;if(typeof t.distanceToBorder=="function"){var o=t.distanceToBorder(r,i),s=Math.sin(i)*o,l=Math.cos(i)*o;l===o?(n+=o,a=t.y):s===o?(n=t.x,a-=o):(n+=l,a-=s)}else t.shape.width>t.shape.height?(n=t.x+t.shape.width*.5,a=t.y-e):(n=t.x+e,a=t.y-t.shape.height*.5);return{x:n,y:a}}var aue=Qe,oue=aue("Array").values,sue=oue,lue=sue,uue=ei,hue=Xe,due=Re,cue=lue,zd=Array.prototype,fue={DOMTokenList:!0,NodeList:!0},vue=function(r){var i=r.values;return r===zd||due(zd,r)&&i===zd.values||hue(fue,uue(r))?cue:i},pue=vue,VO=z(pue),gue=function(){function r(i){C(this,r),this.measureText=i,this.current=0,this.width=0,this.height=0,this.lines=[]}return x(r,[{key:"_add",value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"normal";this.lines[e]===void 0&&(this.lines[e]={width:0,height:0,blocks:[]});var a=t;(t===void 0||t==="")&&(a=" ");var o=this.measureText(a,n),s=Fe({},VO(o));s.text=t,s.width=o.width,s.mod=n,(t===void 0||t==="")&&(s.width=0),this.lines[e].blocks.push(s),this.lines[e].width+=s.width}},{key:"curWidth",value:function(){var e=this.lines[this.current];return e===void 0?0:e.width}},{key:"append",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t)}},{key:"newLine",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t),this.current++}},{key:"determineLineHeights",value:function(){for(var e=0;e<this.lines.length;e++){var t=this.lines[e],n=0;if(t.blocks!==void 0)for(var a=0;a<t.blocks.length;a++){var o=t.blocks[a];n<o.height&&(n=o.height)}t.height=n}}},{key:"determineLabelSize",value:function(){for(var e=0,t=0,n=0;n<this.lines.length;n++){var a=this.lines[n];a.width>e&&(e=a.width),t+=a.height}this.width=e,this.height=t}},{key:"removeEmptyBlocks",value:function(){for(var e=[],t=0;t<this.lines.length;t++){var n=this.lines[t];if(n.blocks.length!==0&&!(t===this.lines.length-1&&n.width===0)){var a={};Fe(a,n),a.blocks=[];for(var o=void 0,s=[],l=0;l<n.blocks.length;l++){var u=n.blocks[l];u.width!==0?s.push(u):o===void 0&&(o=u)}s.length===0&&o!==void 0&&s.push(o),a.blocks=s,e.push(a)}}return e}},{key:"finalize",value:function(){this.determineLineHeights(),this.determineLabelSize();var e=this.removeEmptyBlocks();return{width:this.width,height:this.height,lines:e}}}]),r}(),yue={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/},c$=function(){function r(i){C(this,r),this.text=i,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}return x(r,[{key:"mod",value:function(){return this.modStack.length===0?"normal":this.modStack[0]}},{key:"modName",value:function(){if(this.modStack.length===0)return"normal";if(this.modStack[0]==="mono")return"mono";if(this.bold&&this.ital)return"boldital";if(this.bold)return"bold";if(this.ital)return"ital"}},{key:"emitBlock",value:function(){this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}},{key:"add",value:function(e){e===" "&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1),e!=" "&&(this.buffer+=e)}},{key:"parseWS",value:function(e){return/[ \t]/.test(e)?(this.mono?this.add(e):this.spacing=!0,!0):!1}},{key:"setTag",value:function(e){this.emitBlock(),this[e]=!0,this.modStack.unshift(e)}},{key:"unsetTag",value:function(e){this.emitBlock(),this[e]=!1,this.modStack.shift()}},{key:"parseStartTag",value:function(e,t){return!this.mono&&!this[e]&&this.match(t)?(this.setTag(e),!0):!1}},{key:"match",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this.prepareRegExp(e),a=Se(n,2),o=a[0],s=a[1],l=o.test(this.text.substr(this.position,s));return l&&t&&(this.position+=s-1),l}},{key:"parseEndTag",value:function(e,t,n){var a=this.mod()===e;return e==="mono"?a=a&&this.mono:a=a&&!this.mono,a&&this.match(t)?(n!==void 0?(this.position===this.text.length-1||this.match(n,!1))&&this.unsetTag(e):this.unsetTag(e),!0):!1}},{key:"replace",value:function(e,t){return this.match(e)?(this.add(t),this.position+=length-1,!0):!1}},{key:"prepareRegExp",value:function(e){var t,n;if(e instanceof RegExp)n=e,t=1;else{var a=yue[e];a!==void 0?n=a:n=new RegExp(e),t=e.length}return[n,t]}}]),r}(),mue=function(){function r(i,e,t,n){var a=this;C(this,r),this.ctx=i,this.parent=e,this.selected=t,this.hover=n;var o=function(l,u){if(l===void 0)return 0;var h=a.parent.getFormattingValues(i,t,n,u),d=0;if(l!==""){var c=a.ctx.measureText(l);d=c.width}return{width:d,values:h}};this.lines=new gue(o)}return x(r,[{key:"process",value:function(e){if(!Cl(e))return this.lines.finalize();var t=this.parent.fontOptions;e=e.replace(/\r\n/g,`
90
+ `),e=e.replace(/\r/g,`
91
+ `);var n=String(e).split(`
92
+ `),a=n.length;if(t.multi)for(var o=0;o<a;o++){var s=this.splitBlocks(n[o],t.multi);if(s!==void 0){if(s.length===0){this.lines.newLine("");continue}if(t.maxWdt>0)for(var l=0;l<s.length;l++){var u=s[l].mod,h=s[l].text;this.splitStringIntoLines(h,u,!0)}else for(var d=0;d<s.length;d++){var c=s[d].mod,f=s[d].text;this.lines.append(f,c)}this.lines.newLine()}}else if(t.maxWdt>0)for(var v=0;v<a;v++)this.splitStringIntoLines(n[v]);else for(var p=0;p<a;p++)this.lines.newLine(n[p]);return this.lines.finalize()}},{key:"decodeMarkupSystem",value:function(e){var t="none";return e==="markdown"||e==="md"?t="markdown":(e===!0||e==="html")&&(t="html"),t}},{key:"splitHtmlBlocks",value:function(e){for(var t=new c$(e),n=function(l){if(/&/.test(l)){var u=t.replace(t.text,"&lt;","<")||t.replace(t.text,"&amp;","&");return u||t.add("&"),!0}return!1};t.position<t.text.length;){var a=t.text.charAt(t.position),o=t.parseWS(a)||/</.test(a)&&(t.parseStartTag("bold","<b>")||t.parseStartTag("ital","<i>")||t.parseStartTag("mono","<code>")||t.parseEndTag("bold","</b>")||t.parseEndTag("ital","</i>")||t.parseEndTag("mono","</code>"))||n(a);o||t.add(a),t.position++}return t.emitBlock(),t.blocks}},{key:"splitMarkdownBlocks",value:function(e){for(var t=this,n=new c$(e),a=!0,o=function(h){return/\\/.test(h)?(n.position<t.text.length+1&&(n.position++,h=t.text.charAt(n.position),/ \t/.test(h)?n.spacing=!0:(n.add(h),a=!1)),!0):!1};n.position<n.text.length;){var s=n.text.charAt(n.position),l=n.parseWS(s)||o(s)||(a||n.spacing)&&(n.parseStartTag("bold","*")||n.parseStartTag("ital","_")||n.parseStartTag("mono","`"))||n.parseEndTag("bold","*","afterBold")||n.parseEndTag("ital","_","afterItal")||n.parseEndTag("mono","`","afterMono");l||(n.add(s),a=!1),n.position++}return n.emitBlock(),n.blocks}},{key:"splitBlocks",value:function(e,t){var n=this.decodeMarkupSystem(t);if(n==="none")return[{text:e,mod:"normal"}];if(n==="markdown")return this.splitMarkdownBlocks(e);if(n==="html")return this.splitHtmlBlocks(e)}},{key:"overMaxWidth",value:function(e){var t=this.ctx.measureText(e).width;return this.lines.curWidth()+t>this.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(e){for(var t="",n=0;n<e.length;){var a=t===""?"":" ",o=t+a+e[n];if(this.overMaxWidth(o))break;t=o,n++}return n}},{key:"getLongestFitWord",value:function(e){for(var t=0;t<e.length&&!this.overMaxWidth(tt(e).call(e,0,t));)t++;return t}},{key:"splitStringIntoLines",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");for(var a=e.split("\r");a.length>0;){var o=this.getLongestFit(a);if(o===0){var s=a[0],l=this.getLongestFitWord(s);this.lines.newLine(tt(s).call(s,0,l),t),a[0]=tt(s).call(s,l)}else{var u=o;a[o-1]===" "?o--:a[u]===" "&&u++;var h=tt(a).call(a,0,o).join("");o==a.length&&n?this.lines.append(h,t):this.lines.newLine(h,t),a=tt(a).call(a,u)}}}}]),r}(),Ia=["bold","ital","boldital","mono"],UO=function(){function r(i,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;C(this,r),this.body=i,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(e),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=t}return x(r,[{key:"setOptions",value:function(e){if(this.elementOptions=e,this.initFontOptions(e.font),Cl(e.label)?this.labelDirty=!0:e.label=void 0,e.font!==void 0&&e.font!==null){if(typeof e.font=="string")this.baseSize=this.fontOptions.size;else if(he(e.font)==="object"){var t=e.font.size;t!==void 0&&(this.baseSize=t)}}}},{key:"initFontOptions",value:function(e){var t=this;if(te(Ia,function(n){t.fontOptions[n]={}}),r.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}te(e,function(n,a){n!=null&&he(n)!=="object"&&(t.fontOptions[a]=n)})}},{key:"constrain",value:function(e){var t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},n=Gr(e,"widthConstraint");if(typeof n=="number")t.maxWdt=Number(n),t.minWdt=Number(n);else if(he(n)==="object"){var a=Gr(e,["widthConstraint","maximum"]);typeof a=="number"&&(t.maxWdt=Number(a));var o=Gr(e,["widthConstraint","minimum"]);typeof o=="number"&&(t.minWdt=Number(o))}var s=Gr(e,"heightConstraint");if(typeof s=="number")t.minHgt=Number(s);else if(he(s)==="object"){var l=Gr(e,["heightConstraint","minimum"]);typeof l=="number"&&(t.minHgt=Number(l));var u=Gr(e,["heightConstraint","valign"]);typeof u=="string"&&(u==="top"||u==="bottom")&&(t.valign=u)}return t}},{key:"update",value:function(e,t){this.setOptions(e,!0),this.propagateFonts(t),fe(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=jv("label",t)}},{key:"adjustSizes",value:function(e){var t=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t);var n=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=n)}},{key:"addFontOptionsToPile",value:function(e,t){for(var n=0;n<t.length;++n)this.addFontToPile(e,t[n])}},{key:"addFontToPile",value:function(e,t){if(t!==void 0&&!(t.font===void 0||t.font===null)){var n=t.font;e.push(n)}}},{key:"getBasicOptions",value:function(e){for(var t={},n=0;n<e.length;++n){var a=e[n],o={};r.parseFontString(o,a)&&(a=o),te(a,function(s,l){s!==void 0&&(Object.prototype.hasOwnProperty.call(t,l)||(re(Ia).call(Ia,l)!==-1?t[l]={}:t[l]=s))})}return t}},{key:"getFontOption",value:function(e,t,n){for(var a,o=0;o<e.length;++o){var s=e[o];if(Object.prototype.hasOwnProperty.call(s,t)){if(a=s[t],a==null)continue;var l={};if(r.parseFontString(l,a)&&(a=l),Object.prototype.hasOwnProperty.call(a,n))return a[n]}}if(Object.prototype.hasOwnProperty.call(this.fontOptions,n))return this.fontOptions[n];throw new Error("Did not find value for multi-font for property: '"+n+"'")}},{key:"getFontOptions",value:function(e,t){for(var n={},a=["color","size","face","mod","vadjust"],o=0;o<a.length;++o){var s=a[o];n[s]=this.getFontOption(e,t,s)}return n}},{key:"propagateFonts",value:function(e){var t=this,n=[];this.addFontOptionsToPile(n,e),this.fontOptions=this.getBasicOptions(n);for(var a=function(){var l=Ia[o],u=t.fontOptions[l],h=t.getFontOptions(n,l);te(h,function(d,c){u[c]=d}),u.size=Number(u.size),u.vadjust=Number(u.vadjust)},o=0;o<Ia.length;++o)a()}},{key:"draw",value:function(e,t,n,a,o){var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label!==void 0){var l=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&l<this.elementOptions.scaling.label.drawThreshold-1||(l>=this.elementOptions.scaling.label.maxVisible&&(l=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,a,o,t,n,s),this._drawBackground(e),this._drawText(e,t,this.size.yLine,s,l))}}},{key:"_drawBackground",value:function(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){e.fillStyle=this.fontOptions.background;var t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}},{key:"_drawText",value:function(e,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",o=arguments.length>4?arguments[4]:void 0,s=this._setAlignment(e,t,n,a),l=Se(s,2);t=l[0],n=l[1],e.textAlign="left",t=t-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(n-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(n+=(this.size.height-this.size.labelHeight)/2));for(var u=0;u<this.lineCount;u++){var h=this.lines[u];if(h&&h.blocks){var d=0;this.isEdgeLabel||this.fontOptions.align==="center"?d+=(this.size.width-h.width)/2:this.fontOptions.align==="right"&&(d+=this.size.width-h.width);for(var c=0;c<h.blocks.length;c++){var f=h.blocks[c];e.font=f.font;var v=this._getColor(f.color,o,f.strokeColor),p=Se(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+d,n+f.vadjust),e.fillText(f.text,t+d,n+f.vadjust),d+=f.width}n+=h.height}}}},{key:"_setAlignment",value:function(e,t,n,a){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){t=0,n=0;var o=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",n-=2*o):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",n+=2*o):e.textBaseline="middle"}else e.textBaseline=a;return[t,n]}},{key:"_getColor",value:function(e,t,n){var a=e||"#000000",o=n||"#ffffff";if(t<=this.elementOptions.scaling.label.drawThreshold){var s=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)));a=Ut(a,s),o=Ut(o,s)}return[a,o]}},{key:"getTextSize",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,t,n),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:"getSize",value:function(){var e=2,t=this.size.left,n=this.size.top-.5*e;if(this.isEdgeLabel){var a=-this.size.width*.5;switch(this.fontOptions.align){case"middle":t=a,n=-this.size.height*.5;break;case"top":t=a,n=-(this.size.height+e);break;case"bottom":t=a,n=e;break}}var o={left:t,top:n,width:this.size.width,height:this.size.height};return o}},{key:"calculateLabelSize",value:function(e,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(e,t,n),this.size.left=a-this.size.width*.5,this.size.top=o-this.size.height*.5,this.size.yLine=o+(1-this.lineCount)*.5*this.fontOptions.size,s==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}},{key:"getFormattingValues",value:function(e,t,n,a){var o=function(h,d,c){return d==="normal"?c==="mod"?"":h[c]:h[d][c]!==void 0?h[d][c]:h[c]},s={color:o(this.fontOptions,a,"color"),size:o(this.fontOptions,a,"size"),face:o(this.fontOptions,a,"face"),mod:o(this.fontOptions,a,"mod"),vadjust:o(this.fontOptions,a,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(t||n)&&(a==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?s.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(s,this.elementOptions.id,t,n));var l="";return s.mod!==void 0&&s.mod!==""&&(l+=s.mod+" "),l+=s.size+"px "+s.face,e.font=l.replace(/"/g,""),s.font=e.font,s.height=s.size,s}},{key:"differentState",value:function(e,t){return e!==this.selectedState||t!==this.hoverState}},{key:"_processLabelText",value:function(e,t,n,a){var o=new mue(e,this,t,n);return o.process(a)}},{key:"_processLabel",value:function(e,t,n){if(!(this.labelDirty===!1&&!this.differentState(t,n))){var a=this._processLabelText(e,t,n,this.elementOptions.label);this.fontOptions.minWdt>0&&a.width<this.fontOptions.minWdt&&(a.width=this.fontOptions.minWdt),this.size.labelHeight=a.height,this.fontOptions.minHgt>0&&a.height<this.fontOptions.minHgt&&(a.height=this.fontOptions.minHgt),this.lines=a.lines,this.lineCount=a.lines.length,this.size.width=a.width,this.size.height=a.height,this.selectedState=t,this.hoverState=n,this.labelDirty=!1}}},{key:"visible",value:function(){if(this.size.width===0||this.size.height===0||this.elementOptions.label===void 0)return!1;var e=this.fontOptions.size*this.body.view.scale;return!(e<this.elementOptions.scaling.label.drawThreshold-1)}}],[{key:"parseFontString",value:function(e,t){if(!t||typeof t!="string")return!1;var n=t.split(" ");return e.size=+n[0].replace("px",""),e.face=n[1],e.color=n[2],!0}}]),r}(),bue=bu,$ue=fa,wue=TypeError,_ue=function(r){if(bue(r))return r;throw new wue($ue(r)+" is not a constructor")},Eue=G,Sue=Yt,Hd=Co,Oue=hE,f$=_ue,Tue=Ht,v$=Ye,Pue=ga,GO=ne,zv=Sue("Reflect","construct"),Iue=Object.prototype,kue=[].push,KO=GO(function(){function r(){}return!(zv(function(){},[],r)instanceof r)}),qO=!GO(function(){zv(function(){})}),p$=KO||qO;Eue({target:"Reflect",stat:!0,forced:p$,sham:p$},{construct:function(i,e){f$(i),Tue(e);var t=arguments.length<3?i:f$(arguments[2]);if(qO&&!KO)return zv(i,e,t);if(i===t){switch(e.length){case 0:return new i;case 1:return new i(e[0]);case 2:return new i(e[0],e[1]);case 3:return new i(e[0],e[1],e[2]);case 4:return new i(e[0],e[1],e[2],e[3])}var n=[null];return Hd(kue,n,e),new(Hd(Oue,i,n))}var a=t.prototype,o=Pue(v$(a)?a:Iue),s=Hd(i,o,e);return v$(s)?s:o}});var Cue=ie,xue=Cue.Reflect.construct,Aue=xue,Rue=Aue,Due=Rue,S=z(Due),Mue=LS,Nue=Mue,Fue=Nue,Bue=Fue,Lue=Bue,jue=z(Lue),zue=G,Hue=jK;zue({target:"Object",stat:!0},{setPrototypeOf:Hue});var Wue=ie,Vue=Wue.Object.setPrototypeOf,Uue=Vue,Gue=Uue,Kue=Gue,que=Kue,Yue=que,Xue=Yue,Que=Xue,lf=z(Que),Jue=dE,Zue=Jue,ehe=Zue,the=ehe,rhe=the,Hv=z(rhe);function uf(r,i){var e;return uf=lf?Hv(e=lf).call(e):function(n,a){return n.__proto__=a,n},uf(r,i)}function oe(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=jue(i&&i.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),wu(r,"prototype",{writable:!1}),i&&uf(r,i)}function nhe(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function ue(r,i){if(i&&(he(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nhe(r)}var ihe=DS,ahe=ihe,ohe=ahe,she=ohe,lhe=she,g$=z(lhe);function B(r){var i;return B=lf?Hv(i=g$).call(i):function(t){return t.__proto__||g$(t)},B(r)}var oi=function(){function r(i,e,t){C(this,r),this.body=e,this.labelModule=t,this.setOptions(i),this.top=void 0,this.left=void 0,this.height=void 0,this.width=void 0,this.radius=void 0,this.margin=void 0,this.refreshNeeded=!0,this.boundingBox={top:0,left:0,right:0,bottom:0}}return x(r,[{key:"setOptions",value:function(e){this.options=e}},{key:"_setMargins",value:function(e){this.margin={},this.options.margin&&(he(this.options.margin)=="object"?(this.margin.top=this.options.margin.top,this.margin.right=this.options.margin.right,this.margin.bottom=this.options.margin.bottom,this.margin.left=this.options.margin.left):(this.margin.top=this.options.margin,this.margin.right=this.options.margin,this.margin.bottom=this.options.margin,this.margin.left=this.options.margin)),e.adjustSizes(this.margin)}},{key:"_distanceToBorder",value:function(e,t){var n=this.options.borderWidth;return e&&this.resize(e),Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+n}},{key:"enableShadow",value:function(e,t){t.shadow&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}},{key:"disableShadow",value:function(e,t){t.shadow&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},{key:"enableBorderDashes",value:function(e,t){if(t.borderDashes!==!1)if(e.setLineDash!==void 0){var n=t.borderDashes;n===!0&&(n=[5,15]),e.setLineDash(n)}else console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1}},{key:"disableBorderDashes",value:function(e,t){t.borderDashes!==!1&&(e.setLineDash!==void 0?e.setLineDash([0]):(console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1))}},{key:"needsRefresh",value:function(e,t){return this.refreshNeeded===!0?(this.refreshNeeded=!1,!0):this.width===void 0||this.labelModule.differentState(e,t)}},{key:"initContextForDraw",value:function(e,t){var n=t.borderWidth/this.body.view.scale;e.lineWidth=Math.min(this.width,n),e.strokeStyle=t.borderColor,e.fillStyle=t.color}},{key:"performStroke",value:function(e,t){var n=t.borderWidth/this.body.view.scale;e.save(),n>0&&(this.enableBorderDashes(e,t),e.stroke(),this.disableBorderDashes(e,t)),e.restore()}},{key:"performFill",value:function(e,t){e.save(),e.fillStyle=t.color,this.enableShadow(e,t),qo(e).call(e),this.disableShadow(e,t),e.restore(),this.performStroke(e,t)}},{key:"_addBoundingBoxMargin",value:function(e){this.boundingBox.left-=e,this.boundingBox.top-=e,this.boundingBox.bottom+=e,this.boundingBox.right+=e}},{key:"_updateBoundingBox",value:function(e,t,n,a,o){n!==void 0&&this.resize(n,a,o),this.left=e-this.width/2,this.top=t-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"updateBoundingBox",value:function(e,t,n,a,o){this._updateBoundingBox(e,t,n,a,o)}},{key:"getDimensionsFromLabel",value:function(e,t,n){this.textSize=this.labelModule.getTextSize(e,t,n);var a=this.textSize.width,o=this.textSize.height,s=14;return a===0&&(a=s,o=s),{width:a,height:o}}}]),r}();function uhe(r){var i=hhe();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function hhe(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var dhe=function(r){oe(e,r);var i=uhe(e);function e(t,n,a){var o;return C(this,e),o=i.call(this,t,n,a),o._setMargins(a),o}return x(e,[{key:"resize",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(n,a,o);this.width=s.width+this.margin.right+this.margin.left,this.height=s.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}},{key:"draw",value:function(n,a,o,s,l,u){this.resize(n,s,l),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(n,u),cE(n,this.left,this.top,this.width,this.height,u.borderRadius),this.performFill(n,u),this.updateBoundingBox(a,o,n,s,l),this.labelModule.draw(n,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,l)}},{key:"updateBoundingBox",value:function(n,a,o,s,l){this._updateBoundingBox(n,a,o,s,l);var u=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(u)}},{key:"distanceToBorder",value:function(n,a){n&&this.resize(n);var o=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(a)),Math.abs(this.height/2/Math.sin(a)))+o}}]),e}(oi);function che(r){var i=fhe();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function fhe(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var Wv=function(r){oe(e,r);var i=che(e);function e(t,n,a){var o;return C(this,e),o=i.call(this,t,n,a),o.labelOffset=0,o.selected=!1,o}return x(e,[{key:"setOptions",value:function(n,a,o){this.options=n,a===void 0&&o===void 0||this.setImages(a,o)}},{key:"setImages",value:function(n,a){a&&this.selected?(this.imageObj=a,this.imageObjAlt=n):(this.imageObj=n,this.imageObjAlt=a)}},{key:"switchImages",value:function(n){var a=n&&!this.selected||!n&&this.selected;if(this.selected=n,this.imageObjAlt!==void 0&&a){var o=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=o}}},{key:"_getImagePadding",value:function(){var n={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){var a=this.options.imagePadding;he(a)=="object"?(n.top=a.top,n.right=a.right,n.bottom=a.bottom,n.left=a.left):(n.top=a,n.right=a,n.bottom=a,n.left=a)}return n}},{key:"_resizeImage",value:function(){var n,a;if(this.options.shapeProperties.useImageSize===!1){var o=1,s=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?o=this.imageObj.width/this.imageObj.height:s=this.imageObj.height/this.imageObj.width),n=this.options.size*2*o,a=this.options.size*2*s}else{var l=this._getImagePadding();n=this.imageObj.width+l.left+l.right,a=this.imageObj.height+l.top+l.bottom}this.width=n,this.height=a,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(n,a,o,s){this.initContextForDraw(n,s),ov(n,a,o,s.size),this.performFill(n,s)}},{key:"_drawImageAtPosition",value:function(n,a){if(this.imageObj.width!=0){n.globalAlpha=a.opacity!==void 0?a.opacity:1,this.enableShadow(n,a);var o=1;this.options.shapeProperties.interpolation===!0&&(o=this.imageObj.width/this.width/this.body.view.scale);var s=this._getImagePadding(),l=this.left+s.left,u=this.top+s.top,h=this.width-s.left-s.right,d=this.height-s.top-s.bottom;this.imageObj.drawImageAtPosition(n,o,l,u,h,d),this.disableShadow(n,a)}}},{key:"_drawImageLabel",value:function(n,a,o,s,l){var u=0;if(this.height!==void 0){u=this.height*.5;var h=this.labelModule.getTextSize(n,s,l);h.lineCount>=1&&(u+=h.height/2)}var d=o+u;this.options.label&&(this.labelOffset=u),this.labelModule.draw(n,a,d,s,l,"hanging")}}]),e}(oi);function vhe(r){var i=phe();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function phe(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var ghe=function(r){oe(e,r);var i=vhe(e);function e(t,n,a){var o;return C(this,e),o=i.call(this,t,n,a),o._setMargins(a),o}return x(e,[{key:"resize",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(n,a,o),l=Math.max(s.width+this.margin.right+this.margin.left,s.height+this.margin.top+this.margin.bottom);this.options.size=l/2,this.width=l,this.height=l,this.radius=this.width/2}}},{key:"draw",value:function(n,a,o,s,l,u){this.resize(n,s,l),this.left=a-this.width/2,this.top=o-this.height/2,this._drawRawCircle(n,a,o,u),this.updateBoundingBox(a,o),this.labelModule.draw(n,this.left+this.textSize.width/2+this.margin.left,o,s,l)}},{key:"updateBoundingBox",value:function(n,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=n-this.options.size,this.boundingBox.right=n+this.options.size,this.boundingBox.bottom=a+this.options.size}},{key:"distanceToBorder",value:function(n){return n&&this.resize(n),this.width*.5}}]),e}(Wv);function yhe(r){var i=mhe();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function mhe(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var bhe=function(r){oe(e,r);var i=yhe(e);function e(t,n,a,o,s){var l;return C(this,e),l=i.call(this,t,n,a),l.setImages(o,s),l}return x(e,[{key:"resize",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0;if(s){var l=this.options.size*2;this.width=l,this.height=l,this.radius=.5*this.width;return}this.needsRefresh(a,o)&&this._resizeImage()}},{key:"draw",value:function(n,a,o,s,l,u){this.switchImages(s),this.resize();var h=a,d=o;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,h+=this.width/2,d+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this._drawRawCircle(n,h,d,u),n.save(),n.clip(),this._drawImageAtPosition(n,u),n.restore(),this._drawImageLabel(n,h,d,s,l),this.updateBoundingBox(a,o)}},{key:"updateBoundingBox",value:function(n,a){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=a,this.boundingBox.left=n,this.boundingBox.right=n+this.options.size*2,this.boundingBox.bottom=a+this.options.size*2):(this.boundingBox.top=a-this.options.size,this.boundingBox.left=n-this.options.size,this.boundingBox.right=n+this.options.size,this.boundingBox.bottom=a+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}},{key:"distanceToBorder",value:function(n){return n&&this.resize(n),this.width*.5}}]),e}(Wv);function $he(r){var i=whe();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function whe(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var gn=function(r){oe(e,r);var i=$he(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return x(e,[{key:"resize",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(a,o)){var l,u;this.labelModule.getTextSize(n,a,o);var h=2*s.size;this.width=(l=this.customSizeWidth)!==null&&l!==void 0?l:h,this.height=(u=this.customSizeHeight)!==null&&u!==void 0?u:h,this.radius=.5*this.width}}},{key:"_drawShape",value:function(n,a,o,s,l,u,h,d){var c=this;return this.resize(n,u,h,d),this.left=s-this.width/2,this.top=l-this.height/2,this.initContextForDraw(n,d),r7(a)(n,s,l,d.size),this.performFill(n,d),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(n.font=(u?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),n.fillStyle=this.options.icon.color||"black",n.textAlign="center",n.textBaseline="middle",n.fillText(this.options.icon.code,s,l)),{drawExternalLabel:function(){if(c.options.label!==void 0){c.labelModule.calculateLabelSize(n,u,h,s,l,"hanging");var v=l+.5*c.height+.5*c.labelModule.size.height;c.labelModule.draw(n,s,v,u,h,"hanging")}c.updateBoundingBox(s,l)}}}},{key:"updateBoundingBox",value:function(n,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=n-this.options.size,this.boundingBox.right=n+this.options.size,this.boundingBox.bottom=a+this.options.size,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}]),e}(oi);function y$(r,i){var e=_e(r);if(sn){var t=sn(r);i&&(t=Ot(t).call(t,function(n){return pn(r,n).enumerable})),e.push.apply(e,t)}return e}function _he(r){for(var i=1;i<arguments.length;i++){var e,t,n=arguments[i]!=null?arguments[i]:{};i%2?de(e=y$(Object(n),!0)).call(e,function(a){Mu(r,a,n[a])}):ln?Ru(r,ln(n)):de(t=y$(Object(n))).call(t,function(a){Du(r,a,pn(n,a))})}return r}function Ehe(r){var i=She();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function She(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var Ohe=function(r){oe(e,r);var i=Ehe(e);function e(t,n,a,o){var s;return C(this,e),s=i.call(this,t,n,a,o),s.ctxRenderer=o,s}return x(e,[{key:"draw",value:function(n,a,o,s,l,u){this.resize(n,s,l,u),this.left=a-this.width/2,this.top=o-this.height/2,n.save();var h=this.ctxRenderer({ctx:n,id:this.options.id,x:a,y:o,state:{selected:s,hover:l},style:_he({},u),label:this.options.label});if(h.drawNode!=null&&h.drawNode(),n.restore(),h.drawExternalLabel){var d=h.drawExternalLabel;h.drawExternalLabel=function(){n.save(),d(),n.restore()}}return h.nodeDimensions&&(this.customSizeWidth=h.nodeDimensions.width,this.customSizeHeight=h.nodeDimensions.height),h}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function The(r){var i=Phe();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function Phe(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var Ihe=function(r){oe(e,r);var i=The(e);function e(t,n,a){var o;return C(this,e),o=i.call(this,t,n,a),o._setMargins(a),o}return x(e,[{key:"resize",value:function(n,a,o){if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(n,a,o),l=s.width+this.margin.right+this.margin.left;this.width=l,this.height=l,this.radius=this.width/2}}},{key:"draw",value:function(n,a,o,s,l,u){this.resize(n,s,l),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(n,u),fE(n,a-this.width/2,o-this.height/2,this.width,this.height),this.performFill(n,u),this.updateBoundingBox(a,o,n,s,l),this.labelModule.draw(n,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,l)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(oi);function khe(r){var i=Che();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function Che(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var xhe=function(r){oe(e,r);var i=khe(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return x(e,[{key:"draw",value:function(n,a,o,s,l,u){return this._drawShape(n,"diamond",4,a,o,s,l,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function Ahe(r){var i=Rhe();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function Rhe(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var Dhe=function(r){oe(e,r);var i=Ahe(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return x(e,[{key:"draw",value:function(n,a,o,s,l,u){return this._drawShape(n,"circle",2,a,o,s,l,u)}},{key:"distanceToBorder",value:function(n){return n&&this.resize(n),this.options.size}}]),e}(gn);function Mhe(r){var i=Nhe();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function Nhe(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var m$=function(r){oe(e,r);var i=Mhe(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return x(e,[{key:"resize",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(n,a,o);this.height=s.height*2,this.width=s.width+s.height,this.radius=.5*this.width}}},{key:"draw",value:function(n,a,o,s,l,u){this.resize(n,s,l),this.left=a-this.width*.5,this.top=o-this.height*.5,this.initContextForDraw(n,u),Mc(n,this.left,this.top,this.width,this.height),this.performFill(n,u),this.updateBoundingBox(a,o,n,s,l),this.labelModule.draw(n,a,o,s,l)}},{key:"distanceToBorder",value:function(n,a){n&&this.resize(n);var o=this.width*.5,s=this.height*.5,l=Math.sin(a)*o,u=Math.cos(a)*s;return o*s/Math.sqrt(l*l+u*u)}}]),e}(oi);function Fhe(r){var i=Bhe();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function Bhe(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var Lhe=function(r){oe(e,r);var i=Fhe(e);function e(t,n,a){var o;return C(this,e),o=i.call(this,t,n,a),o._setMargins(a),o}return x(e,[{key:"resize",value:function(n,a,o){this.needsRefresh(a,o)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(n,a,o,s,l,u){var h=this;return this.resize(n,s,l),this.options.icon.size=this.options.icon.size||50,this.left=a-this.width/2,this.top=o-this.height/2,this._icon(n,a,o,s,l,u),{drawExternalLabel:function(){if(h.options.label!==void 0){var c=5;h.labelModule.draw(n,h.left+h.iconSize.width/2+h.margin.left,o+h.height/2+c,s)}h.updateBoundingBox(a,o)}}}},{key:"updateBoundingBox",value:function(n,a){if(this.boundingBox.top=a-this.options.icon.size*.5,this.boundingBox.left=n-this.options.icon.size*.5,this.boundingBox.right=n+this.options.icon.size*.5,this.boundingBox.bottom=a+this.options.icon.size*.5,this.options.label!==void 0&&this.labelModule.size.width>0){var o=5;this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+o)}}},{key:"_icon",value:function(n,a,o,s,l,u){var h=Number(this.options.icon.size);this.options.icon.code!==void 0?(n.font=[this.options.icon.weight!=null?this.options.icon.weight:s?"bold":"",(this.options.icon.weight!=null&&s?5:0)+h+"px",this.options.icon.face].join(" "),n.fillStyle=this.options.icon.color||"black",n.textAlign="center",n.textBaseline="middle",this.enableShadow(n,u),n.fillText(this.options.icon.code,a,o),this.disableShadow(n,u)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(oi);function jhe(r){var i=zhe();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function zhe(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var Hhe=function(r){oe(e,r);var i=jhe(e);function e(t,n,a,o,s){var l;return C(this,e),l=i.call(this,t,n,a),l.setImages(o,s),l}return x(e,[{key:"resize",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0;if(s){var l=this.options.size*2;this.width=l,this.height=l;return}this.needsRefresh(a,o)&&this._resizeImage()}},{key:"draw",value:function(n,a,o,s,l,u){n.save(),this.switchImages(s),this.resize();var h=a,d=o;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,h+=this.width/2,d+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){var c=this.options.borderWidth,f=this.options.borderWidthSelected||2*this.options.borderWidth,v=(s?f:c)/this.body.view.scale;n.lineWidth=Math.min(this.width,v),n.beginPath();var p=s?this.options.color.highlight.border:l?this.options.color.hover.border:this.options.color.border,g=s?this.options.color.highlight.background:l?this.options.color.hover.background:this.options.color.background;u.opacity!==void 0&&(p=Ut(p,u.opacity),g=Ut(g,u.opacity)),n.strokeStyle=p,n.fillStyle=g,n.rect(this.left-.5*n.lineWidth,this.top-.5*n.lineWidth,this.width+n.lineWidth,this.height+n.lineWidth),qo(n).call(n),this.performStroke(n,u),n.closePath()}this._drawImageAtPosition(n,u),this._drawImageLabel(n,h,d,s,l),this.updateBoundingBox(a,o),n.restore()}},{key:"updateBoundingBox",value:function(n,a){this.resize(),this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=n,this.top=a):(this.left=n-this.width/2,this.top=a-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(Wv);function Whe(r){var i=Vhe();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function Vhe(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var Uhe=function(r){oe(e,r);var i=Whe(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return x(e,[{key:"draw",value:function(n,a,o,s,l,u){return this._drawShape(n,"square",2,a,o,s,l,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function Ghe(r){var i=Khe();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function Khe(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var qhe=function(r){oe(e,r);var i=Ghe(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return x(e,[{key:"draw",value:function(n,a,o,s,l,u){return this._drawShape(n,"hexagon",4,a,o,s,l,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function Yhe(r){var i=Xhe();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function Xhe(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var Qhe=function(r){oe(e,r);var i=Yhe(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return x(e,[{key:"draw",value:function(n,a,o,s,l,u){return this._drawShape(n,"star",4,a,o,s,l,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function Jhe(r){var i=Zhe();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function Zhe(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var ede=function(r){oe(e,r);var i=Jhe(e);function e(t,n,a){var o;return C(this,e),o=i.call(this,t,n,a),o._setMargins(a),o}return x(e,[{key:"resize",value:function(n,a,o){this.needsRefresh(a,o)&&(this.textSize=this.labelModule.getTextSize(n,a,o),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(n,a,o,s,l,u){this.resize(n,s,l),this.left=a-this.width/2,this.top=o-this.height/2,this.enableShadow(n,u),this.labelModule.draw(n,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,l),this.disableShadow(n,u),this.updateBoundingBox(a,o,n,s,l)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(oi);function tde(r){var i=rde();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function rde(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var nde=function(r){oe(e,r);var i=tde(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return x(e,[{key:"draw",value:function(n,a,o,s,l,u){return this._drawShape(n,"triangle",3,a,o,s,l,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function ide(r){var i=ade();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function ade(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var ode=function(r){oe(e,r);var i=ide(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return x(e,[{key:"draw",value:function(n,a,o,s,l,u){return this._drawShape(n,"triangleDown",3,a,o,s,l,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function b$(r,i){var e=_e(r);if(sn){var t=sn(r);i&&(t=Ot(t).call(t,function(n){return pn(r,n).enumerable})),e.push.apply(e,t)}return e}function $$(r){for(var i=1;i<arguments.length;i++){var e,t,n=arguments[i]!=null?arguments[i]:{};i%2?de(e=b$(Object(n),!0)).call(e,function(a){Mu(r,a,n[a])}):ln?Ru(r,ln(n)):de(t=b$(Object(n))).call(t,function(a){Du(r,a,pn(n,a))})}return r}var Mt=function(){function r(i,e,t,n,a,o){C(this,r),this.options=nn(a),this.globalOptions=a,this.defaultOptions=o,this.body=e,this.edges=[],this.id=void 0,this.imagelist=t,this.grouplist=n,this.x=void 0,this.y=void 0,this.baseSize=this.options.size,this.baseFontSize=this.options.font.size,this.predefinedPosition=!1,this.selected=!1,this.hover=!1,this.labelModule=new UO(this.body,this.options,!1),this.setOptions(i)}return x(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,n=re(t=this.edges).call(t,e);if(n!=-1){var a;kr(a=this.edges).call(a,n,1)}}},{key:"setOptions",value:function(e){var t=this.options.shape;if(e){if(typeof e.color<"u"&&(this._localColor=e.color),e.id!==void 0&&(this.id=e.id),this.id===void 0)throw new Error("Node must have an id");r.checkMass(e,this.id),e.x!==void 0&&(e.x===null?(this.x=void 0,this.predefinedPosition=!1):(this.x=tr(e.x),this.predefinedPosition=!0)),e.y!==void 0&&(e.y===null?(this.y=void 0,this.predefinedPosition=!1):(this.y=tr(e.y),this.predefinedPosition=!0)),e.size!==void 0&&(this.baseSize=e.size),e.value!==void 0&&(e.value=HO(e.value)),r.parseOptions(this.options,e,!0,this.globalOptions,this.grouplist);var n=[e,this.options,this.defaultOptions];return this.chooser=jv("node",n),this._load_images(),this.updateLabelModule(e),e.opacity!==void 0&&r.checkOpacity(e.opacity)&&(this.options.opacity=e.opacity),this.updateShape(t),e.hidden!==void 0||e.physics!==void 0}}},{key:"_load_images",value:function(){if((this.options.shape==="circularImage"||this.options.shape==="image")&&this.options.image===void 0)throw new Error("Option image must be defined for node type '"+this.options.shape+"'");if(this.options.image!==void 0){if(this.imagelist===void 0)throw new Error("Internal Error: No images provided");if(typeof this.options.image=="string")this.imageObj=this.imagelist.load(this.options.image,this.options.brokenImage,this.id);else{if(this.options.image.unselected===void 0)throw new Error("No unselected image provided");this.imageObj=this.imagelist.load(this.options.image.unselected,this.options.brokenImage,this.id),this.options.image.selected!==void 0?this.imageObjAlt=this.imagelist.load(this.options.image.selected,this.options.brokenImage,this.id):this.imageObjAlt=void 0}}}},{key:"getFormattingValues",value:function(){var e={color:this.options.color.background,opacity:this.options.opacity,borderWidth:this.options.borderWidth,borderColor:this.options.color.border,size:this.options.size,borderDashes:this.options.shapeProperties.borderDashes,borderRadius:this.options.shapeProperties.borderRadius,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y};if(this.selected||this.hover?this.chooser===!0?this.selected?(this.options.borderWidthSelected!=null?e.borderWidth=this.options.borderWidthSelected:e.borderWidth*=2,e.color=this.options.color.highlight.background,e.borderColor=this.options.color.highlight.border,e.shadow=this.options.shadow.enabled):this.hover&&(e.color=this.options.color.hover.background,e.borderColor=this.options.color.hover.border,e.shadow=this.options.shadow.enabled):typeof this.chooser=="function"&&(this.chooser(e,this.options.id,this.selected,this.hover),e.shadow===!1&&(e.shadowColor!==this.options.shadow.color||e.shadowSize!==this.options.shadow.size||e.shadowX!==this.options.shadow.x||e.shadowY!==this.options.shadow.y)&&(e.shadow=!0)):e.shadow=this.options.shadow.enabled,this.options.opacity!==void 0){var t=this.options.opacity;e.borderColor=Ut(e.borderColor,t),e.color=Ut(e.color,t),e.shadowColor=Ut(e.shadowColor,t)}return e}},{key:"updateLabelModule",value:function(e){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),r.updateGroupOptions(this.options,$$($$({},e),{},{color:e&&e.color||this._localColor||void 0}),this.grouplist);var t=this.grouplist.get(this.options.group,!1),n=[e,this.options,t,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,n),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateShape",value:function(e){if(e===this.options.shape&&this.shape)this.shape.setOptions(this.options,this.imageObj,this.imageObjAlt);else switch(this.options.shape){case"box":this.shape=new dhe(this.options,this.body,this.labelModule);break;case"circle":this.shape=new ghe(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new bhe(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new Ohe(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new Ihe(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new xhe(this.options,this.body,this.labelModule);break;case"dot":this.shape=new Dhe(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new m$(this.options,this.body,this.labelModule);break;case"icon":this.shape=new Lhe(this.options,this.body,this.labelModule);break;case"image":this.shape=new Hhe(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new Uhe(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new qhe(this.options,this.body,this.labelModule);break;case"star":this.shape=new Qhe(this.options,this.body,this.labelModule);break;case"text":this.shape=new ede(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new nde(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new ode(this.options,this.body,this.labelModule);break;default:this.shape=new m$(this.options,this.body,this.labelModule);break}this.needsRefresh()}},{key:"select",value:function(){this.selected=!0,this.needsRefresh()}},{key:"unselect",value:function(){this.selected=!1,this.needsRefresh()}},{key:"needsRefresh",value:function(){this.shape.refreshNeeded=!0}},{key:"getTitle",value:function(){return this.options.title}},{key:"distanceToBorder",value:function(e,t){return this.shape.distanceToBorder(e,t)}},{key:"isFixed",value:function(){return this.options.fixed.x&&this.options.fixed.y}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"getLabelSize",value:function(){return this.labelModule.size()}},{key:"setValueRange",value:function(e,t,n){if(this.options.value!==void 0){var a=this.options.scaling.customScalingFunction(e,t,n,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){var s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+a*s}this.options.size=this.options.scaling.min+a*o}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}},{key:"draw",value:function(e){var t=this.getFormattingValues();return this.shape.draw(e,this.x,this.y,this.selected,this.hover,t)||{}}},{key:"updateBoundingBox",value:function(e){this.shape.updateBoundingBox(this.x,this.y,e)}},{key:"resize",value:function(e){var t=this.getFormattingValues();this.shape.resize(e,this.selected,this.hover,t)}},{key:"getItemsOnPoint",value:function(e){var t=[];return this.labelModule.visible()&&sf(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),sf(this.shape.boundingBox,e)&&t.push({nodeId:this.id}),t}},{key:"isOverlappingWith",value:function(e){return this.shape.left<e.right&&this.shape.left+this.shape.width>e.left&&this.shape.top<e.bottom&&this.shape.top+this.shape.height>e.top}},{key:"isBoundingBoxOverlappingWith",value:function(e){return this.shape.boundingBox.left<e.right&&this.shape.boundingBox.right>e.left&&this.shape.boundingBox.top<e.bottom&&this.shape.boundingBox.bottom>e.top}}],[{key:"checkOpacity",value:function(e){return 0<=e&&e<=1}},{key:"checkCoordinateOrigin",value:function(e){return e===void 0||e==="center"||e==="top-left"}},{key:"updateGroupOptions",value:function(e,t,n){var a;if(n!==void 0){var o=e.group;if(t!==void 0&&t.group!==void 0&&o!==t.group)throw new Error("updateGroupOptions: group values in options don't match.");var s=typeof o=="number"||typeof o=="string"&&o!="";if(s){var l=n.get(o);l.opacity!==void 0&&t.opacity===void 0&&(r.checkOpacity(l.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+l.opacity),l.opacity=void 0));var u=Ot(a=iue(t)).call(a,function(h){return t[h]!=null});u.push("font"),Pl(u,e,l),e.color=tf(e.color)}}}},{key:"parseOptions",value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0,s=["color","fixed","shadow"];if(Pl(s,e,t,n),r.checkMass(t),e.opacity!==void 0&&(r.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),t.opacity!==void 0&&(r.checkOpacity(t.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+t.opacity),t.opacity=void 0)),t.shapeProperties&&!r.checkCoordinateOrigin(t.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+t.shapeProperties.coordinateOrigin),Vt(e,t,"shadow",a),t.color!==void 0&&t.color!==null){var l=tf(t.color);pO(e.color,l)}else n===!0&&t.color===null&&(e.color=nn(a.color));t.fixed!==void 0&&t.fixed!==null&&(typeof t.fixed=="boolean"?(e.fixed.x=t.fixed,e.fixed.y=t.fixed):(t.fixed.x!==void 0&&typeof t.fixed.x=="boolean"&&(e.fixed.x=t.fixed.x),t.fixed.y!==void 0&&typeof t.fixed.y=="boolean"&&(e.fixed.y=t.fixed.y))),n===!0&&t.font===null&&(e.font=nn(a.font)),r.updateGroupOptions(e,t,o),t.scaling!==void 0&&Vt(e.scaling,t.scaling,"label",a.scaling)}},{key:"checkMass",value:function(e,t){if(e.mass!==void 0&&e.mass<=0){var n="";t!==void 0&&(n=" in node id: "+t),console.error("%cNegative or zero mass disallowed"+n+", setting mass to 1.",bO),e.mass=1}}}]),r}();function sde(r,i){var e=typeof vn<"u"&&ni(r)||r["@@iterator"];if(!e){if(le(r)||(e=lde(r))||i&&r&&typeof r.length=="number"){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
93
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function lde(r,i){var e;if(r){if(typeof r=="string")return w$(r,i);var t=tt(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return ri(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return w$(r,i)}}function w$(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}var ude=function(){function r(i,e,t,n){var a,o=this;if(C(this,r),this.body=i,this.images=e,this.groups=t,this.layoutEngine=n,this.body.functions.createNode=T(a=this.create).call(a,this),this.nodesListeners={add:function(l,u){o.add(u.items)},update:function(l,u){o.update(u.items,u.data,u.oldData)},remove:function(l,u){o.remove(u.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:void 0,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},opacity:void 0,fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,imagePadding:{top:0,right:0,bottom:0,left:0},label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(l,u,h,d){if(u===l)return .5;var c=1/(u-l);return Math.max(0,(d-l)*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=nn(this.defaultOptions),this.bindEventListeners()}return x(r,[{key:"bindEventListeners",value:function(){var e,t,n=this;this.body.emitter.on("refreshNodes",T(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",T(t=this.refresh).call(t,this)),this.body.emitter.on("destroy",function(){te(n.nodesListeners,function(a,o){n.body.data.nodes&&n.body.data.nodes.off(o,a)}),delete n.body.functions.createNode,delete n.nodesListeners.add,delete n.nodesListeners.update,delete n.nodesListeners.remove,delete n.nodesListeners})}},{key:"setOptions",value:function(e){if(e!==void 0){if(Mt.parseOptions(this.options,e),e.opacity!==void 0&&(of(e.opacity)||!Tn(e.opacity)||e.opacity<0||e.opacity>1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity):this.options.opacity=e.opacity),e.shape!==void 0)for(var t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(var n=0,a=_e(this.body.nodes);n<a.length;n++){var o=a[n];this.body.nodes[o].updateLabelModule(),this.body.nodes[o].needsRefresh()}if(e.size!==void 0)for(var s in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,s)&&this.body.nodes[s].needsRefresh();(e.hidden!==void 0||e.physics!==void 0)&&this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this.body.data.nodes;if(U0("id",e))this.body.data.nodes=e;else if(le(e))this.body.data.nodes=new ml,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new ml;else throw new TypeError("Array or DataSet expected");if(n&&te(this.nodesListeners,function(s,l){n.off(l,s)}),this.body.nodes={},this.body.data.nodes){var a=this;te(this.nodesListeners,function(s,l){a.body.data.nodes.on(l,s)});var o=this.body.data.nodes.getIds();this.add(o,!0)}t===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n,a=[],o=0;o<e.length;o++){n=e[o];var s=this.body.data.nodes.get(n),l=this.create(s);a.push(l),this.body.nodes[n]=l}this.layoutEngine.positionInitially(a),t===!1&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(e,t,n){for(var a=this.body.nodes,o=!1,s=0;s<e.length;s++){var l=e[s],u=a[l],h=t[s];u!==void 0?u.setOptions(h)&&(o=!0):(o=!0,u=this.create(h),a[l]=u)}!o&&n!==void 0&&(o=Zse(t).call(t,function(d,c){var f=n[c];return f&&f.level!==d.level})),o===!0?this.body.emitter.emit("_dataChanged"):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(e){for(var t=this.body.nodes,n=0;n<e.length;n++){var a=e[n];delete t[a]}this.body.emitter.emit("_dataChanged")}},{key:"create",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mt;return new t(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;te(this.body.nodes,function(n,a){var o=e.body.data.nodes.get(a);o!==void 0&&(t===!0&&n.setOptions({x:null,y:null}),n.setOptions({fixed:!1}),n.setOptions(o))})}},{key:"getPositions",value:function(e){var t={};if(e!==void 0){if(le(e)===!0){for(var n=0;n<e.length;n++)if(this.body.nodes[e[n]]!==void 0){var a=this.body.nodes[e[n]];t[e[n]]={x:Math.round(a.x),y:Math.round(a.y)}}}else if(this.body.nodes[e]!==void 0){var o=this.body.nodes[e];t[e]={x:Math.round(o.x),y:Math.round(o.y)}}}else for(var s=0;s<this.body.nodeIndices.length;s++){var l=this.body.nodes[this.body.nodeIndices[s]];t[this.body.nodeIndices[s]]={x:Math.round(l.x),y:Math.round(l.y)}}return t}},{key:"getPosition",value:function(e){if(e==null)throw new TypeError("No id was specified for getPosition method.");if(this.body.nodes[e]==null)throw new ReferenceError("NodeId provided for getPosition does not exist. Provided: ".concat(e));return{x:Math.round(this.body.nodes[e].x),y:Math.round(this.body.nodes[e].y)}}},{key:"storePositions",value:function(){var e=[],t=this.body.data.nodes.getDataSet(),n=sde(t.get()),a;try{for(n.s();!(a=n.n()).done;){var o=a.value,s=o.id,l=this.body.nodes[s],u=Math.round(l.x),h=Math.round(l.y);(o.x!==u||o.y!==h)&&e.push({id:s,x:u,y:h})}}catch(d){n.e(d)}finally{n.f()}t.update(e)}},{key:"getBoundingBox",value:function(e){if(this.body.nodes[e]!==void 0)return this.body.nodes[e].shape.boundingBox}},{key:"getConnectedNodes",value:function(e,t){var n=[];if(this.body.nodes[e]!==void 0)for(var a=this.body.nodes[e],o={},s=0;s<a.edges.length;s++){var l=a.edges[s];t!=="to"&&l.toId==a.id?o[l.fromId]===void 0&&(n.push(l.fromId),o[l.fromId]=!0):t!=="from"&&l.fromId==a.id&&o[l.toId]===void 0&&(n.push(l.toId),o[l.toId]=!0)}return n}},{key:"getConnectedEdges",value:function(e){var t=[];if(this.body.nodes[e]!==void 0)for(var n=this.body.nodes[e],a=0;a<n.edges.length;a++)t.push(n.edges[a].id);else console.error("NodeId provided for getConnectedEdges does not exist. Provided: ",e);return t}},{key:"moveNode",value:function(e,t,n){var a=this;this.body.nodes[e]!==void 0?(this.body.nodes[e].x=Number(t),this.body.nodes[e].y=Number(n),gr(function(){a.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}}]),r}(),_$=Xe,hde=function(r){return r!==void 0&&(_$(r,"value")||_$(r,"writable"))},dde=G,cde=jt,fde=Ye,vde=Ht,pde=hde,gde=ha,yde=mu;function YO(r,i){var e=arguments.length<3?r:arguments[2],t,n;if(vde(r)===e)return r[i];if(t=gde.f(r,i),t)return pde(t)?t.value:t.get===void 0?void 0:cde(t.get,e);if(fde(n=yde(r)))return YO(n,i,e)}dde({target:"Reflect",stat:!0},{get:YO});var mde=ie,bde=mde.Reflect.get,$de=bde,wde=$de,_de=wde,Ede=_de,Sde=Ede,Ode=Sde,Tde=Ode,E$=z(Tde),Pde=BO,Ide=Pde,kde=Ide,Cde=kde,xde=Cde,Ade=z(xde);function Rde(r,i){for(;!Object.prototype.hasOwnProperty.call(r,i)&&(r=B(r),r!==null););return r}function el(){if(typeof Reflect<"u"&&E$){var r;el=Hv(r=E$).call(r)}else el=function(e,t,n){var a=Rde(e,t);if(a){var o=Ade(a,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}};return el.apply(this,arguments)}var Dde=G,S$=Math.hypot,Mde=Math.abs,Nde=Math.sqrt,Fde=!!S$&&S$(1/0,NaN)!==1/0;Dde({target:"Math",stat:!0,arity:2,forced:Fde},{hypot:function(i,e){for(var t=0,n=0,a=arguments.length,o=0,s,l;n<a;)s=Mde(arguments[n++]),o<s?(l=o/s,t=t*l*l+1,o=s):s>0?(l=s/o,t+=l*l):t+=s;return o===1/0?1/0:o*Nde(t)}});var Bde=ie,Lde=Bde.Math.hypot,jde=Lde,zde=jde,Hde=zde,Wde=z(Hde);function XO(r){var i=Vde();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function Vde(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var Ae=function(){function r(){C(this,r)}return x(r,null,[{key:"transform",value:function(e,t){le(e)||(e=[e]);for(var n=t.point.x,a=t.point.y,o=t.angle,s=t.length,l=0;l<e.length;++l){var u=e[l],h=u.x*Math.cos(o)-u.y*Math.sin(o),d=u.x*Math.sin(o)+u.y*Math.cos(o);u.x=n+s*h,u.y=a+s*d}}},{key:"drawPath",value:function(e,t){e.beginPath(),e.moveTo(t[0].x,t[0].y);for(var n=1;n<t.length;++n)e.lineTo(t[n].x,t[n].y);e.closePath()}}]),r}(),Ude=function(r){oe(e,r);var i=XO(e);function e(){return C(this,e),i.apply(this,arguments)}return x(e,null,[{key:"draw",value:function(n,a){if(a.image){n.save(),n.translate(a.point.x,a.point.y),n.rotate(Math.PI/2+a.angle);var o=a.imageWidth!=null?a.imageWidth:a.image.width,s=a.imageHeight!=null?a.imageHeight:a.image.height;a.image.drawImageAtPosition(n,1,-o/2,0,o,s),n.restore()}return!1}}]),e}(Ae),Gde=function(r){oe(e,r);var i=XO(e);function e(){return C(this,e),i.apply(this,arguments)}return x(e,null,[{key:"draw",value:function(n,a){var o=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];return Ae.transform(o,a),Ae.drawPath(n,o),!0}}]),e}(Ae),Kde=function(){function r(){C(this,r)}return x(r,null,[{key:"draw",value:function(e,t){var n=[{x:-1,y:0},{x:0,y:.3},{x:-.4,y:0},{x:0,y:-.3}];return Ae.transform(n,t),Ae.drawPath(e,n),!0}}]),r}(),qde=function(){function r(){C(this,r)}return x(r,null,[{key:"draw",value:function(e,t){var n={x:-.4,y:0};Ae.transform(n,t),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";var a=Math.PI,o=t.angle-a/2,s=t.angle+a/2;return e.beginPath(),e.arc(n.x,n.y,t.length*.4,o,s,!1),e.stroke(),!0}}]),r}(),Yde=function(){function r(){C(this,r)}return x(r,null,[{key:"draw",value:function(e,t){var n={x:-.3,y:0};Ae.transform(n,t),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";var a=Math.PI,o=t.angle+a/2,s=t.angle+3*a/2;return e.beginPath(),e.arc(n.x,n.y,t.length*.4,o,s,!1),e.stroke(),!0}}]),r}(),Xde=function(){function r(){C(this,r)}return x(r,null,[{key:"draw",value:function(e,t){var n=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];return Ae.transform(n,t),Ae.drawPath(e,n),!0}}]),r}(),Qde=function(){function r(){C(this,r)}return x(r,null,[{key:"draw",value:function(e,t){var n=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];return Ae.transform(n,t),Ae.drawPath(e,n),!0}}]),r}(),Jde=function(){function r(){C(this,r)}return x(r,null,[{key:"draw",value:function(e,t){var n={x:-.4,y:0};return Ae.transform(n,t),ov(e,n.x,n.y,t.length*.4),!0}}]),r}(),Zde=function(){function r(){C(this,r)}return x(r,null,[{key:"draw",value:function(e,t){var n=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];return Ae.transform(n,t),Ae.drawPath(e,n),!0}}]),r}(),ece=function(){function r(){C(this,r)}return x(r,null,[{key:"draw",value:function(e,t){var n=[{x:0,y:.3},{x:0,y:-.3},{x:-.6,y:-.3},{x:-.6,y:.3}];return Ae.transform(n,t),Ae.drawPath(e,n),!0}}]),r}(),tce=function(){function r(){C(this,r)}return x(r,null,[{key:"draw",value:function(e,t){var n=[{x:0,y:0},{x:-.5,y:-.3},{x:-1,y:0},{x:-.5,y:.3}];return Ae.transform(n,t),Ae.drawPath(e,n),!0}}]),r}(),rce=function(){function r(){C(this,r)}return x(r,null,[{key:"draw",value:function(e,t){var n=[{x:-1,y:.3},{x:-.5,y:0},{x:-1,y:-.3},{x:0,y:0}];return Ae.transform(n,t),Ae.drawPath(e,n),!0}}]),r}(),QO=function(){function r(){C(this,r)}return x(r,null,[{key:"draw",value:function(e,t){var n;switch(t.type&&(n=t.type.toLowerCase()),n){case"image":return Ude.draw(e,t);case"circle":return Jde.draw(e,t);case"box":return ece.draw(e,t);case"crow":return Kde.draw(e,t);case"curve":return qde.draw(e,t);case"diamond":return tce.draw(e,t);case"inv_curve":return Yde.draw(e,t);case"triangle":return Xde.draw(e,t);case"inv_triangle":return Qde.draw(e,t);case"bar":return Zde.draw(e,t);case"vee":return rce.draw(e,t);case"arrow":default:return Gde.draw(e,t)}}}]),r}();function O$(r,i){var e=_e(r);if(sn){var t=sn(r);i&&(t=Ot(t).call(t,function(n){return pn(r,n).enumerable})),e.push.apply(e,t)}return e}function T$(r){for(var i=1;i<arguments.length;i++){var e,t,n=arguments[i]!=null?arguments[i]:{};i%2?de(e=O$(Object(n),!0)).call(e,function(a){Mu(r,a,n[a])}):ln?Ru(r,ln(n)):de(t=O$(Object(n))).call(t,function(a){Du(r,a,pn(n,a))})}return r}var JO=function(){function r(i,e,t){C(this,r),this._body=e,this._labelModule=t,this.color={},this.colorDirty=!0,this.hoverWidth=1.5,this.selectionWidth=2,this.setOptions(i),this.fromPoint=this.from,this.toPoint=this.to}return x(r,[{key:"connect",value:function(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to]}},{key:"cleanup",value:function(){return!1}},{key:"setOptions",value:function(e){this.options=e,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.id=this.options.id}},{key:"drawLine",value:function(e,t,n,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,t),e.lineWidth=t.width,t.dashes!==!1?this._drawDashedLine(e,t,o):this._drawLine(e,t,o)}},{key:"_drawLine",value:function(e,t,n,a,o){if(this.from!=this.to)this._line(e,t,n,a,o);else{var s=this._getCircleData(e),l=Se(s,3),u=l[0],h=l[1],d=l[2];this._circle(e,t,u,h,d)}}},{key:"_drawDashedLine",value:function(e,t,n,a,o){e.lineCap="round";var s=le(t.dashes)?t.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(s),e.lineDashOffset=0,this.from!=this.to)this._line(e,t,n);else{var l=this._getCircleData(e),u=Se(l,3),h=u[0],d=u[1],c=u[2];this._circle(e,t,h,d,c)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)vE(e,this.from.x,this.from.y,this.to.x,this.to.y,s);else{var f=this._getCircleData(e),v=Se(f,3),p=v[0],g=v[1],y=v[2];this._circle(e,t,p,g,y)}this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}}},{key:"findBorderPosition",value:function(e,t,n){return this.from!=this.to?this._findBorderPosition(e,t,n):this._findBorderPositionCircle(e,t,n)}},{key:"findBorderPositions",value:function(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};var t,n=tt(t=this._getCircleData(e)).call(t,0,2),a=Se(n,2),o=a[0],s=a[1];return{from:this._findBorderPositionCircle(this.from,e,{x:o,y:s,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:o,y:s,low:.6,high:.8,direction:1})}}},{key:"_getCircleData",value:function(e){var t=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);var n=WO(e,this.options.selfReference.angle,t,this.from);return[n.x,n.y,t]}},{key:"_pointOnCircle",value:function(e,t,n,a){var o=a*2*Math.PI;return{x:e+n*Math.cos(o),y:t-n*Math.sin(o)}}},{key:"_findBorderPositionCircle",value:function(e,t,n){var a=n.x,o=n.y,s=n.low,l=n.high,u=n.direction,h=10,d=this.options.selfReference.size,c=.05,f,v=(s+l)*.5,p=0;this.options.arrowStrikethrough===!0&&(u===-1?p=this.options.endPointOffset.from:u===1&&(p=this.options.endPointOffset.to));var g=0;do{v=(s+l)*.5,f=this._pointOnCircle(a,o,d,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?u>0?s=v:l=v:u>0?l=v:s=v,++g}while(s<=l&&g<h);return T$(T$({},f),{},{t:v})}},{key:"getLineWidth",value:function(e,t){return e===!0?Math.max(this.selectionWidth,.3/this._body.view.scale):t===!0?Math.max(this.hoverWidth,.3/this._body.view.scale):Math.max(this.options.width,.3/this._body.view.scale)}},{key:"getColor",value:function(e,t){if(t.inheritsColor!==!1){if(t.inheritsColor==="both"&&this.from.id!==this.to.id){var n=e.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),a=this.from.options.color.highlight.border,o=this.to.options.color.highlight.border;return this.from.selected===!1&&this.to.selected===!1?(a=Ut(this.from.options.color.border,t.opacity),o=Ut(this.to.options.color.border,t.opacity)):this.from.selected===!0&&this.to.selected===!1?o=this.to.options.color.border:this.from.selected===!1&&this.to.selected===!0&&(a=this.from.options.color.border),n.addColorStop(0,a),n.addColorStop(1,o),n}return t.inheritsColor==="to"?Ut(this.to.options.color.border,t.opacity):Ut(this.from.options.color.border,t.opacity)}else return Ut(t.color,t.opacity)}},{key:"_circle",value:function(e,t,n,a,o){this.enableShadow(e,t);var s=0,l=Math.PI*2;if(!this.options.selfReference.renderBehindTheNode){var u=this.options.selfReference.angle,h=this.options.selfReference.angle+Math.PI,d=this._findBorderPositionCircle(this.from,e,{x:n,y:a,low:u,high:h,direction:-1}),c=this._findBorderPositionCircle(this.from,e,{x:n,y:a,low:u,high:h,direction:1});s=Math.atan2(d.y-a,d.x-n),l=Math.atan2(c.y-a,c.x-n)}e.beginPath(),e.arc(n,a,o,s,l,!1),e.stroke(),this.disableShadow(e,t)}},{key:"getDistanceToEdge",value:function(e,t,n,a,o,s){if(this.from!=this.to)return this._getDistanceToEdge(e,t,n,a,o,s);var l=this._getCircleData(void 0),u=Se(l,3),h=u[0],d=u[1],c=u[2],f=h-o,v=d-s;return Math.abs(Math.sqrt(f*f+v*v)-c)}},{key:"_getDistanceToLine",value:function(e,t,n,a,o,s){var l=n-e,u=a-t,h=l*l+u*u,d=((o-e)*l+(s-t)*u)/h;d>1?d=1:d<0&&(d=0);var c=e+d*l,f=t+d*u,v=c-o,p=f-s;return Math.sqrt(v*v+p*p)}},{key:"getArrowData",value:function(e,t,n,a,o,s){var l,u,h,d,c,f,v,p=s.width;t==="from"?(h=this.from,d=this.to,c=s.fromArrowScale<0,f=Math.abs(s.fromArrowScale),v=s.fromArrowType):t==="to"?(h=this.to,d=this.from,c=s.toArrowScale<0,f=Math.abs(s.toArrowScale),v=s.toArrowType):(h=this.to,d=this.from,c=s.middleArrowScale<0,f=Math.abs(s.middleArrowScale),v=s.middleArrowType);var g=15*f+3*p;if(h!=d){var y=Wde(h.x-d.x,h.y-d.y),m=g/y;if(t!=="middle")if(this.options.smooth.enabled===!0){var w=this._findBorderPosition(h,e,{via:n}),b=this.getPoint(w.t+m*(t==="from"?1:-1),n);l=Math.atan2(w.y-b.y,w.x-b.x),u=w}else l=Math.atan2(h.y-d.y,h.x-d.x),u=this._findBorderPosition(h,e);else{var _=(c?-m:m)/2,E=this.getPoint(.5+_,n),R=this.getPoint(.5-_,n);l=Math.atan2(E.y-R.y,E.x-R.x),u=this.getPoint(.5,n)}}else{var M=this._getCircleData(e),A=Se(M,3),N=A[0],F=A[1],W=A[2];if(t==="from"){var Y=this.options.selfReference.angle,be=this.options.selfReference.angle+Math.PI,Je=this._findBorderPositionCircle(this.from,e,{x:N,y:F,low:Y,high:be,direction:-1});l=Je.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,u=Je}else if(t==="to"){var De=this.options.selfReference.angle,At=this.options.selfReference.angle+Math.PI,ht=this._findBorderPositionCircle(this.from,e,{x:N,y:F,low:De,high:At,direction:1});l=ht.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,u=ht}else{var nt=this.options.selfReference.angle/(2*Math.PI);u=this._pointOnCircle(N,F,W,nt),l=nt*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}var Rt=u.x-g*.9*Math.cos(l),it=u.y-g*.9*Math.sin(l),pe={x:Rt,y:it};return{point:u,core:pe,angle:l,length:g,type:v}}},{key:"drawArrowHead",value:function(e,t,n,a,o){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width;var s=QO.draw(e,o);s&&(this.enableShadow(e,t),qo(e).call(e),this.disableShadow(e,t))}},{key:"enableShadow",value:function(e,t){t.shadow===!0&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}},{key:"disableShadow",value:function(e,t){t.shadow===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},{key:"drawBackground",value:function(e,t){if(t.background!==!1){var n={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=t.backgroundColor,e.lineWidth=t.backgroundSize,this.setStrokeDashed(e,t.backgroundDashes),e.stroke(),e.strokeStyle=n.strokeStyle,e.lineWidth=n.lineWidth,e.dashes=n.dashes,this.setStrokeDashed(e,t.dashes)}}},{key:"setStrokeDashed",value:function(e,t){if(t!==!1)if(e.setLineDash!==void 0){var n=le(t)?t:[5,5];e.setLineDash(n)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else e.setLineDash!==void 0?e.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}]),r}();function P$(r,i){var e=_e(r);if(sn){var t=sn(r);i&&(t=Ot(t).call(t,function(n){return pn(r,n).enumerable})),e.push.apply(e,t)}return e}function I$(r){for(var i=1;i<arguments.length;i++){var e,t,n=arguments[i]!=null?arguments[i]:{};i%2?de(e=P$(Object(n),!0)).call(e,function(a){Mu(r,a,n[a])}):ln?Ru(r,ln(n)):de(t=P$(Object(n))).call(t,function(a){Du(r,a,pn(n,a))})}return r}function nce(r){var i=ice();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function ice(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var Vv=function(r){oe(e,r);var i=nce(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return x(e,[{key:"_findBorderPositionBezier",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates(),s=10,l=.2,u=!1,h=1,d=0,c=this.to,f,v,p=this.options.endPointOffset?this.options.endPointOffset.to:0;n.id===this.from.id&&(c=this.from,u=!0,p=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(p=0);var g=0;do{v=(d+h)*.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)<l)break;b<0?u===!1?d=v:h=v:u===!1?h=v:d=v,++g}while(d<=h&&g<s);return I$(I$({},f),{},{t:v})}},{key:"_getDistanceToBezierEdge",value:function(n,a,o,s,l,u,h){var d=1e9,c,f,v,p,g,y=n,m=a;for(f=1;f<10;f++)v=.1*f,p=Math.pow(1-v,2)*n+2*v*(1-v)*h.x+Math.pow(v,2)*o,g=Math.pow(1-v,2)*a+2*v*(1-v)*h.y+Math.pow(v,2)*s,f>0&&(c=this._getDistanceToLine(y,m,p,g,l,u),d=c<d?c:d),y=p,m=g;return d}},{key:"_bezierCurve",value:function(n,a,o,s){n.beginPath(),n.moveTo(this.fromPoint.x,this.fromPoint.y),o!=null&&o.x!=null?s!=null&&s.x!=null?n.bezierCurveTo(o.x,o.y,s.x,s.y,this.toPoint.x,this.toPoint.y):n.quadraticCurveTo(o.x,o.y,this.toPoint.x,this.toPoint.y):n.lineTo(this.toPoint.x,this.toPoint.y),this.drawBackground(n,a),this.enableShadow(n,a),n.stroke(),this.disableShadow(n,a)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}}]),e}(JO);function ace(r){var i=oce();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function oce(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var k$=function(r){oe(e,r);var i=ace(e);function e(t,n,a){var o;return C(this,e),o=i.call(this,t,n,a),o.via=o.via,o._boundFunction=function(){o.positionBezierNode()},o._body.emitter.on("_repositionBezierNodes",o._boundFunction),o}return x(e,[{key:"setOptions",value:function(n){el(B(e.prototype),"setOptions",this).call(this,n);var a=!1;this.options.physics!==n.physics&&(a=!0),this.options=n,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),a===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}},{key:"connect",value:function(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}},{key:"cleanup",value:function(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),this.via!==void 0?(delete this._body.nodes[this.via.id],this.via=void 0,!0):!1}},{key:"setupSupportNode",value:function(){if(this.via===void 0){var n="edgeId:"+this.id,a=this._body.functions.createNode({id:n,shape:"circle",physics:!0,hidden:!0});this._body.nodes[n]=a,this.via=a,this.via.parentEdgeId=this.id,this.positionBezierNode()}}},{key:"positionBezierNode",value:function(){this.via!==void 0&&this.from!==void 0&&this.to!==void 0?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):this.via!==void 0&&(this.via.x=0,this.via.y=0)}},{key:"_line",value:function(n,a,o){this._bezierCurve(n,a,o)}},{key:"_getViaCoordinates",value:function(){return this.via}},{key:"getViaNode",value:function(){return this.via}},{key:"getPoint",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){var o=this._getCircleData(),s=Se(o,3),l=s[0],u=s[1],h=s[2],d=2*Math.PI*(1-n);return{x:l+h*Math.sin(d),y:u+h-h*(1-Math.cos(d))}}else return{x:Math.pow(1-n,2)*this.fromPoint.x+2*n*(1-n)*a.x+Math.pow(n,2)*this.toPoint.x,y:Math.pow(1-n,2)*this.fromPoint.y+2*n*(1-n)*a.y+Math.pow(n,2)*this.toPoint.y}}},{key:"_findBorderPosition",value:function(n,a){return this._findBorderPositionBezier(n,a,this.via)}},{key:"_getDistanceToEdge",value:function(n,a,o,s,l,u){return this._getDistanceToBezierEdge(n,a,o,s,l,u,this.via)}}]),e}(Vv);function sce(r){var i=lce();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function lce(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var C$=function(r){oe(e,r);var i=sce(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return x(e,[{key:"_line",value:function(n,a,o){this._bezierCurve(n,a,o)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var n=this.options.smooth.roundness,a=this.options.smooth.type,o=Math.abs(this.from.x-this.to.x),s=Math.abs(this.from.y-this.to.y);if(a==="discrete"||a==="diagonalCross"){var l,u;o<=s?l=u=n*s:l=u=n*o,this.from.x>this.to.x&&(l=-l),this.from.y>=this.to.y&&(u=-u);var h=this.from.x+l,d=this.from.y+u;return a==="discrete"&&(o<=s?h=o<n*s?this.from.x:h:d=s<n*o?this.from.y:d),{x:h,y:d}}else if(a==="straightCross"){var c=(1-n)*o,f=(1-n)*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-n)*o;return this.from.x<this.to.x&&(v=-v),{x:this.to.x+v,y:this.from.y}}else if(a==="vertical"){var p=(1-n)*s;return this.from.y<this.to.y&&(p=-p),{x:this.from.x,y:this.to.y+p}}else if(a==="curvedCW"){o=this.to.x-this.from.x,s=this.from.y-this.to.y;var g=Math.sqrt(o*o+s*s),y=Math.PI,m=Math.atan2(s,o),w=(m+(n*.5+.5)*y)%(2*y);return{x:this.from.x+(n*.5+.5)*g*Math.sin(w),y:this.from.y+(n*.5+.5)*g*Math.cos(w)}}else if(a==="curvedCCW"){o=this.to.x-this.from.x,s=this.from.y-this.to.y;var b=Math.sqrt(o*o+s*s),_=Math.PI,E=Math.atan2(s,o),R=(E+(-n*.5+.5)*_)%(2*_);return{x:this.from.x+(n*.5+.5)*b*Math.sin(R),y:this.from.y+(n*.5+.5)*b*Math.cos(R)}}else{var M,A;o<=s?M=A=n*s:M=A=n*o,this.from.x>this.to.x&&(M=-M),this.from.y>=this.to.y&&(A=-A);var N=this.from.x+M,F=this.from.y+A;return o<=s?this.from.x<=this.to.x?N=this.to.x<N?this.to.x:N:N=this.to.x>N?this.to.x:N:this.from.y>=this.to.y?F=this.to.y>F?this.to.y:F:F=this.to.y<F?this.to.y:F,{x:N,y:F}}}},{key:"_findBorderPosition",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(n,a,o.via)}},{key:"_getDistanceToEdge",value:function(n,a,o,s,l,u){var h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(n,a,o,s,l,u,h)}},{key:"getPoint",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=n,s=Math.pow(1-o,2)*this.fromPoint.x+2*o*(1-o)*a.x+Math.pow(o,2)*this.toPoint.x,l=Math.pow(1-o,2)*this.fromPoint.y+2*o*(1-o)*a.y+Math.pow(o,2)*this.toPoint.y;return{x:s,y:l}}}]),e}(Vv);function uce(r){var i=hce();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function hce(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var dce=function(r){oe(e,r);var i=uce(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return x(e,[{key:"_getDistanceToBezierEdge2",value:function(n,a,o,s,l,u,h,d){for(var c=1e9,f=n,v=a,p=[0,0,0,0],g=1;g<10;g++){var y=.1*g;p[0]=Math.pow(1-y,3),p[1]=3*y*Math.pow(1-y,2),p[2]=3*Math.pow(y,2)*(1-y),p[3]=Math.pow(y,3);var m=p[0]*n+p[1]*h.x+p[2]*d.x+p[3]*o,w=p[0]*a+p[1]*h.y+p[2]*d.y+p[3]*s;if(g>0){var b=this._getDistanceToLine(f,v,m,w,l,u);c=b<c?b:c}f=m,v=w}return c}}]),e}(Vv);function cce(r){var i=fce();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function fce(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var x$=function(r){oe(e,r);var i=cce(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return x(e,[{key:"_line",value:function(n,a,o){var s=o[0],l=o[1];this._bezierCurve(n,a,s,l)}},{key:"_getViaCoordinates",value:function(){var n=this.from.x-this.to.x,a=this.from.y-this.to.y,o,s,l,u,h=this.options.smooth.roundness;return(Math.abs(n)>Math.abs(a)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(s=this.from.y,u=this.to.y,o=this.from.x-h*n,l=this.to.x+h*n):(s=this.from.y-h*a,u=this.to.y+h*a,o=this.from.x,l=this.to.x),[{x:o,y:s},{x:l,y:u}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(n,a){return this._findBorderPositionBezier(n,a)}},{key:"_getDistanceToEdge",value:function(n,a,o,s,l,u){var h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates(),d=Se(h,2),c=d[0],f=d[1];return this._getDistanceToBezierEdge2(n,a,o,s,l,u,c,f)}},{key:"getPoint",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=Se(a,2),s=o[0],l=o[1],u=n,h=[Math.pow(1-u,3),3*u*Math.pow(1-u,2),3*Math.pow(u,2)*(1-u),Math.pow(u,3)],d=h[0]*this.fromPoint.x+h[1]*s.x+h[2]*l.x+h[3]*this.toPoint.x,c=h[0]*this.fromPoint.y+h[1]*s.y+h[2]*l.y+h[3]*this.toPoint.y;return{x:d,y:c}}}]),e}(dce);function vce(r){var i=pce();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function pce(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var A$=function(r){oe(e,r);var i=vce(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return x(e,[{key:"_line",value:function(n,a){n.beginPath(),n.moveTo(this.fromPoint.x,this.fromPoint.y),n.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(n,a),n.stroke(),this.disableShadow(n,a)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(n){return{x:(1-n)*this.fromPoint.x+n*this.toPoint.x,y:(1-n)*this.fromPoint.y+n*this.toPoint.y}}},{key:"_findBorderPosition",value:function(n,a){var o=this.to,s=this.from;n.id===this.from.id&&(o=this.from,s=this.to);var l=Math.atan2(o.y-s.y,o.x-s.x),u=o.x-s.x,h=o.y-s.y,d=Math.sqrt(u*u+h*h),c=n.distanceToBorder(a,l),f=(d-c)/d;return{x:(1-f)*s.x+f*o.x,y:(1-f)*s.y+f*o.y,t:0}}},{key:"_getDistanceToEdge",value:function(n,a,o,s,l,u){return this._getDistanceToLine(n,a,o,s,l,u)}}]),e}(JO),Di=function(){function r(i,e,t,n,a){if(C(this,r),e===void 0)throw new Error("No body provided");this.options=nn(n),this.globalOptions=n,this.defaultOptions=a,this.body=e,this.imagelist=t,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new UO(this.body,this.options,!0),this.setOptions(i)}return x(r,[{key:"setOptions",value:function(e){if(e){var t=typeof e.physics<"u"&&this.options.physics!==e.physics||typeof e.hidden<"u"&&(this.options.hidden||!1)!==(e.hidden||!1)||typeof e.from<"u"&&this.options.from!==e.from||typeof e.to<"u"&&this.options.to!==e.to;r.parseOptions(this.options,e,!0,this.globalOptions),e.id!==void 0&&(this.id=e.id),e.from!==void 0&&(this.fromId=e.from),e.to!==void 0&&(this.toId=e.to),e.title!==void 0&&(this.title=e.title),e.value!==void 0&&(e.value=HO(e.value));var n=[e,this.options,this.defaultOptions];return this.chooser=jv("edge",n),this.updateLabelModule(e),t=this.updateEdgeType()||t,this._setInteractionWidths(),this.connect(),t}}},{key:"getFormattingValues",value:function(){var e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,t=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,n=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,a=this.options.color.inherit,o={toArrow:e,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:n,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:t,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:a?void 0:this.options.color.color,inheritsColor:a,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(this.chooser===!0){if(this.selected){var s=this.options.selectionWidth;typeof s=="function"?o.width=s(o.width):typeof s=="number"&&(o.width+=s),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.highlight,o.shadow=this.options.shadow.enabled}else if(this.hover){var l=this.options.hoverWidth;typeof l=="function"?o.width=l(o.width):typeof l=="number"&&(o.width+=l),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.hover,o.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(o,this.options.id,this.selected,this.hover),o.color!==void 0&&(o.inheritsColor=!1),o.shadow===!1&&(o.shadowColor!==this.options.shadow.color||o.shadowSize!==this.options.shadow.size||o.shadowX!==this.options.shadow.x||o.shadowY!==this.options.shadow.y)&&(o.shadow=!0));else o.shadow=this.options.shadow.enabled,o.width=Math.max(o.width,.3/this.body.view.scale);return o}},{key:"updateLabelModule",value:function(e){var t=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,t),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){var e=this.options.smooth,t=!1,n=!0;return this.edgeType!==void 0&&((this.edgeType instanceof k$&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof x$&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof C$&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof A$&&e.type.enabled===!1)&&(n=!1),n===!0&&(t=this.cleanup())),n===!0?e.enabled===!0?e.type==="dynamic"?(t=!0,this.edgeType=new k$(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new x$(this.options,this.body,this.labelModule):this.edgeType=new C$(this.options,this.body,this.labelModule):this.edgeType=new A$(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),t}},{key:"connect",value:function(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=this.from!==void 0&&this.to!==void 0,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}},{key:"disconnect",value:function(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}},{key:"getTitle",value:function(){return this.title}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"setValueRange",value:function(e,t,n){if(this.options.value!==void 0){var a=this.options.scaling.customScalingFunction(e,t,n,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){var s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+a*s}this.options.width=this.options.scaling.min+a*o}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}},{key:"_setInteractionWidths",value:function(){typeof this.options.hoverWidth=="function"?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,typeof this.options.selectionWidth=="function"?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}},{key:"draw",value:function(e){var t=this.getFormattingValues();if(!t.hidden){var n=this.edgeType.getViaNode();this.edgeType.drawLine(e,t,this.selected,this.hover,n),this.drawLabel(e,n)}}},{key:"drawArrows",value:function(e){var t=this.getFormattingValues();if(!t.hidden){var n=this.edgeType.getViaNode(),a={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,t.fromArrow&&(a.from=this.edgeType.getArrowData(e,"from",n,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.fromPoint=a.from.core),t.fromArrowSrc&&(a.from.image=this.imagelist.load(t.fromArrowSrc)),t.fromArrowImageWidth&&(a.from.imageWidth=t.fromArrowImageWidth),t.fromArrowImageHeight&&(a.from.imageHeight=t.fromArrowImageHeight)),t.toArrow&&(a.to=this.edgeType.getArrowData(e,"to",n,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.toPoint=a.to.core),t.toArrowSrc&&(a.to.image=this.imagelist.load(t.toArrowSrc)),t.toArrowImageWidth&&(a.to.imageWidth=t.toArrowImageWidth),t.toArrowImageHeight&&(a.to.imageHeight=t.toArrowImageHeight)),t.middleArrow&&(a.middle=this.edgeType.getArrowData(e,"middle",n,this.selected,this.hover,t),t.middleArrowSrc&&(a.middle.image=this.imagelist.load(t.middleArrowSrc)),t.middleArrowImageWidth&&(a.middle.imageWidth=t.middleArrowImageWidth),t.middleArrowImageHeight&&(a.middle.imageHeight=t.middleArrowImageHeight)),t.fromArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,a.from),t.middleArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,a.middle),t.toArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,a.to)}}},{key:"drawLabel",value:function(e,t){if(this.options.label!==void 0){var n=this.from,a=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);var o;if(n.id!=a.id){this.labelModule.pointToSelf=!1,o=this.edgeType.getPoint(.5,t),e.save();var s=this._getRotation(e);s.angle!=0&&(e.translate(s.x,s.y),e.rotate(s.angle)),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;var l=WO(e,this.options.selfReference.angle,this.options.selfReference.size,n);o=this._pointOnCircle(l.x,l.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(e){var t=[];if(this.labelModule.visible()){var n=this._getRotation();sf(this.labelModule.getSize(),e,n)&&t.push({edgeId:this.id,labelId:0})}var a={left:e.x,top:e.y};return this.isOverlappingWith(a)&&t.push({edgeId:this.id}),t}},{key:"isOverlappingWith",value:function(e){if(this.connected){var t=10,n=this.from.x,a=this.from.y,o=this.to.x,s=this.to.y,l=e.left,u=e.top,h=this.edgeType.getDistanceToEdge(n,a,o,s,l,u);return h<t}else return!1}},{key:"_getRotation",value:function(e){var t=this.edgeType.getViaNode(),n=this.edgeType.getPoint(.5,t);e!==void 0&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,n.x,n.y);var a={x:n.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible()||this.options.font.align==="horizontal")return a;var o=this.from.y-this.to.y,s=this.from.x-this.to.x,l=Math.atan2(o,s);return(l<-1&&s<0||l>0&&s<0)&&(l+=Math.PI),a.angle=l,a}},{key:"_pointOnCircle",value:function(e,t,n,a){return{x:e+n*Math.cos(a),y:t-n*Math.sin(a)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}},{key:"remove",value:function(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}},{key:"endPointsValid",value:function(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}}],[{key:"parseOptions",value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s=["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"];if(_a(s,e,t,n),t.endPointOffset!==void 0&&t.endPointOffset.from!==void 0&&(Tn(t.endPointOffset.from)?e.endPointOffset.from=t.endPointOffset.from:(e.endPointOffset.from=a.endPointOffset.from!==void 0?a.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),t.endPointOffset!==void 0&&t.endPointOffset.to!==void 0&&(Tn(t.endPointOffset.to)?e.endPointOffset.to=t.endPointOffset.to:(e.endPointOffset.to=a.endPointOffset.to!==void 0?a.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),Cl(t.label)?e.label=t.label:Cl(e.label)||(e.label=void 0),Vt(e,t,"smooth",a),Vt(e,t,"shadow",a),Vt(e,t,"background",a),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:n===!0&&t.dashes===null&&(e.dashes=Dn(a.dashes)),t.scaling!==void 0&&t.scaling!==null?(t.scaling.min!==void 0&&(e.scaling.min=t.scaling.min),t.scaling.max!==void 0&&(e.scaling.max=t.scaling.max),Vt(e.scaling,t.scaling,"label",a.scaling)):n===!0&&t.scaling===null&&(e.scaling=Dn(a.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows=="string"){var l=t.arrows.toLowerCase();e.arrows.to.enabled=re(l).call(l,"to")!=-1,e.arrows.middle.enabled=re(l).call(l,"middle")!=-1,e.arrows.from.enabled=re(l).call(l,"from")!=-1}else if(he(t.arrows)==="object")Vt(e.arrows,t.arrows,"to",a.arrows),Vt(e.arrows,t.arrows,"middle",a.arrows),Vt(e.arrows,t.arrows,"from",a.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+Ko(t.arrows));else n===!0&&t.arrows===null&&(e.arrows=Dn(a.arrows));if(t.color!==void 0&&t.color!==null){var u=Kr(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,h=e.color;if(o)fe(h,a.color,!1,n);else for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&delete h[d];if(Kr(h))h.color=h,h.highlight=h,h.hover=h,h.inherit=!1,u.opacity===void 0&&(h.opacity=1);else{var c=!1;u.color!==void 0&&(h.color=u.color,c=!0),u.highlight!==void 0&&(h.highlight=u.highlight,c=!0),u.hover!==void 0&&(h.hover=u.hover,c=!0),u.inherit!==void 0&&(h.inherit=u.inherit),u.opacity!==void 0&&(h.opacity=Math.min(1,Math.max(0,u.opacity))),c===!0?h.inherit=!1:h.inherit===void 0&&(h.inherit="from")}}else n===!0&&t.color===null&&(e.color=nn(a.color));n===!0&&t.font===null&&(e.font=nn(a.font)),Object.prototype.hasOwnProperty.call(t,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),e.selfReference.size=t.selfReferenceSize)}}]),r}(),gce=function(){function r(i,e,t){var n,a=this;C(this,r),this.body=i,this.images=e,this.groups=t,this.body.functions.createEdge=T(n=this.create).call(n,this),this.edgesListeners={add:function(s,l){a.add(l.items)},update:function(s,l){a.update(l.items)},remove:function(s,l){a.remove(l.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(s,l,u,h){if(l===s)return .5;var d=1/(l-s);return Math.max(0,(h-s)*d)}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},fe(this.options,this.defaultOptions),this.bindEventListeners()}return x(r,[{key:"bindEventListeners",value:function(){var e=this,t,n;this.body.emitter.on("_forceDisableDynamicCurves",function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;a==="dynamic"&&(a="continuous");var s=!1;for(var l in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,l)){var u=e.body.edges[l],h=e.body.data.edges.get(l);if(h!=null){var d=h.smooth;d!==void 0&&d.enabled===!0&&d.type==="dynamic"&&(a===void 0?u.setOptions({smooth:!1}):u.setOptions({smooth:{type:a}}),s=!0)}}o===!0&&s===!0&&e.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",function(){e.reconnectEdges()}),this.body.emitter.on("refreshEdges",T(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",T(n=this.refresh).call(n,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){Di.parseOptions(this.options,e,!0,this.defaultOptions,!0);var t=!1;if(e.smooth!==void 0)for(var n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&(t=this.body.edges[n].updateEdgeType()||t);if(e.font!==void 0)for(var a in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,a)&&this.body.edges[a].updateLabelModule();(e.hidden!==void 0||e.physics!==void 0||t===!0)&&this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.body.data.edges;if(U0("id",e))this.body.data.edges=e;else if(le(e))this.body.data.edges=new ml,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new ml;else throw new TypeError("Array or DataSet expected");if(a&&te(this.edgesListeners,function(s,l){a.off(l,s)}),this.body.edges={},this.body.data.edges){te(this.edgesListeners,function(s,l){t.body.data.edges.on(l,s)});var o=this.body.data.edges.getIds();this.add(o,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),n===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this.body.edges,a=this.body.data.edges,o=0;o<e.length;o++){var s=e[o],l=n[s];l&&l.disconnect();var u=a.get(s,{showInternalIds:!0});n[s]=this.create(u)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),t===!1&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(e){for(var t=this.body.edges,n=this.body.data.edges,a=!1,o=0;o<e.length;o++){var s=e[o],l=n.get(s),u=t[s];u!==void 0?(u.disconnect(),a=u.setOptions(l)||a,u.connect()):(this.body.edges[s]=this.create(l),a=!0)}a===!0?(this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),this.body.emitter.emit("_dataChanged")):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length!==0){var n=this.body.edges;te(e,function(a){var o=n[a];o!==void 0&&o.remove()}),t&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var e=this;te(this.body.edges,function(t,n){var a=e.body.data.edges.get(n);a!==void 0&&t.setOptions(a)})}},{key:"create",value:function(e){return new Di(e,this.body,this.images,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var e,t=this.body.nodes,n=this.body.edges;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].edges=[]);for(e in n)if(Object.prototype.hasOwnProperty.call(n,e)){var a=n[e];a.from=null,a.to=null,a.connect()}}},{key:"getConnectedNodes",value:function(e){var t=[];if(this.body.edges[e]!==void 0){var n=this.body.edges[e];n.fromId!==void 0&&t.push(n.fromId),n.toId!==void 0&&t.push(n.toId)}return t}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var e=this,t=[];te(this.body.edges,function(n,a){var o=e.body.nodes[n.toId],s=e.body.nodes[n.fromId];o!==void 0&&o.isCluster===!0||s!==void 0&&s.isCluster===!0||(o===void 0||s===void 0)&&t.push(a)}),this.remove(t,!1)}},{key:"_addMissingEdges",value:function(){var e=this.body.data.edges;if(e!=null){var t=this.body.edges,n=[];de(e).call(e,function(a,o){var s=t[o];s===void 0&&n.push(o)}),this.add(n,!0)}}}]),r}(),ZO=function(){function r(i,e,t){C(this,r),this.body=i,this.physicsBody=e,this.barnesHutTree,this.setOptions(t),this._rng=xu("BARNES HUT SOLVER")}return x(r,[{key:"setOptions",value:function(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}},{key:"solve",value:function(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){var e,t=this.body.nodes,n=this.physicsBody.physicsNodeIndices,a=n.length,o=this._formBarnesHutTree(t,n);this.barnesHutTree=o;for(var s=0;s<a;s++)e=t[n[s]],e.options.mass>0&&this._getForceContributions(o.root,e)}}},{key:"_getForceContributions",value:function(e,t){this._getForceContribution(e.children.NW,t),this._getForceContribution(e.children.NE,t),this._getForceContribution(e.children.SW,t),this._getForceContribution(e.children.SE,t)}},{key:"_getForceContribution",value:function(e,t){if(e.childrenCount>0){var n=e.centerOfMass.x-t.x,a=e.centerOfMass.y-t.y,o=Math.sqrt(n*n+a*a);o*e.calcSize>this.thetaInversed?this._calculateForces(o,n,a,t,e):e.childrenCount===4?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(o,n,a,t,e)}}},{key:"_calculateForces",value:function(e,t,n,a,o){e===0&&(e=.1,t=e),this.overlapAvoidanceFactor<1&&a.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*a.shape.radius,e-a.shape.radius));var s=this.options.gravitationalConstant*o.mass*a.options.mass/Math.pow(e,3),l=t*s,u=n*s;this.physicsBody.forces[a.id].x+=l,this.physicsBody.forces[a.id].y+=u}},{key:"_formBarnesHutTree",value:function(e,t){for(var n,a=t.length,o=e[t[0]].x,s=e[t[0]].y,l=e[t[0]].x,u=e[t[0]].y,h=1;h<a;h++){var d=e[t[h]],c=d.x,f=d.y;d.options.mass>0&&(c<o&&(o=c),c>l&&(l=c),f<s&&(s=f),f>u&&(u=f))}var v=Math.abs(l-o)-Math.abs(u-s);v>0?(s-=.5*v,u+=.5*v):(o+=.5*v,l-=.5*v);var p=1e-5,g=Math.max(p,Math.abs(l-o)),y=.5*g,m=.5*(o+l),w=.5*(s+u),b={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:m-y,maxX:m+y,minY:w-y,maxY:w+y},size:g,calcSize:1/g,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(b.root);for(var _=0;_<a;_++)n=e[t[_]],n.options.mass>0&&this._placeInTree(b.root,n);return b}},{key:"_updateBranchMass",value:function(e,t){var n=e.centerOfMass,a=e.mass+t.options.mass,o=1/a;n.x=n.x*e.mass+t.x*t.options.mass,n.x*=o,n.y=n.y*e.mass+t.y*t.options.mass,n.y*=o,e.mass=a;var s=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidth<s?s:e.maxWidth}},{key:"_placeInTree",value:function(e,t,n){(n!=!0||n===void 0)&&this._updateBranchMass(e,t);var a=e.children.NW.range,o;a.maxX>t.x?a.maxY>t.y?o="NW":o="SW":a.maxY>t.y?o="NE":o="SE",this._placeInRegion(e,t,o)}},{key:"_placeInRegion",value:function(e,t,n){var a=e.children[n];switch(a.childrenCount){case 0:a.children.data=t,a.childrenCount=1,this._updateBranchMass(a,t);break;case 1:a.children.data.x===t.x&&a.children.data.y===t.y?(t.x+=this._rng(),t.y+=this._rng()):(this._splitBranch(a),this._placeInTree(a,t));break;case 4:this._placeInTree(a,t);break}}},{key:"_splitBranch",value:function(e){var t=null;e.childrenCount===1&&(t=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),t!=null&&this._placeInTree(e,t)}},{key:"_insertRegion",value:function(e,t){var n,a,o,s,l=.5*e.size;switch(t){case"NW":n=e.range.minX,a=e.range.minX+l,o=e.range.minY,s=e.range.minY+l;break;case"NE":n=e.range.minX+l,a=e.range.maxX,o=e.range.minY,s=e.range.minY+l;break;case"SW":n=e.range.minX,a=e.range.minX+l,o=e.range.minY+l,s=e.range.maxY;break;case"SE":n=e.range.minX+l,a=e.range.maxX,o=e.range.minY+l,s=e.range.maxY;break}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:n,maxX:a,minY:o,maxY:s},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}},{key:"_debug",value:function(e,t){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}},{key:"_drawBranch",value:function(e,t,n){n===void 0&&(n="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=n,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}}]),r}(),yce=function(){function r(i,e,t){C(this,r),this._rng=xu("REPULSION SOLVER"),this.body=i,this.physicsBody=e,this.setOptions(t)}return x(r,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,n,a,o,s,l,u,h=this.body.nodes,d=this.physicsBody.physicsNodeIndices,c=this.physicsBody.forces,f=this.options.nodeDistance,v=-2/3/f,p=4/3,g=0;g<d.length-1;g++){l=h[d[g]];for(var y=g+1;y<d.length;y++)u=h[d[y]],e=u.x-l.x,t=u.y-l.y,n=Math.sqrt(e*e+t*t),n===0&&(n=.1*this._rng(),e=n),n<2*f&&(n<.5*f?s=1:s=v*n+p,s=s/n,a=e*s,o=t*s,c[l.id].x-=a,c[l.id].y-=o,c[u.id].x+=a,c[u.id].y+=o)}}}]),r}(),mce=function(){function r(i,e,t){C(this,r),this.body=i,this.physicsBody=e,this.setOptions(t)}return x(r,[{key:"setOptions",value:function(e){this.options=e,this.overlapAvoidanceFactor=Math.max(0,Math.min(1,this.options.avoidOverlap||0))}},{key:"solve",value:function(){for(var e=this.body.nodes,t=this.physicsBody.physicsNodeIndices,n=this.physicsBody.forces,a=this.options.nodeDistance,o=0;o<t.length-1;o++)for(var s=e[t[o]],l=o+1;l<t.length;l++){var u=e[t[l]];if(s.level===u.level){var h=a+this.overlapAvoidanceFactor*((s.shape.radius||0)/2+(u.shape.radius||0)/2),d=u.x-s.x,c=u.y-s.y,f=Math.sqrt(d*d+c*c),v=.05,p=void 0;f<h?p=-Math.pow(v*f,2)+Math.pow(v*h,2):p=0,f!==0&&(p=p/f);var g=d*p,y=c*p;n[s.id].x-=g,n[s.id].y-=y,n[u.id].x+=g,n[u.id].y+=y}}}}]),r}(),Wd=function(){function r(i,e,t){C(this,r),this.body=i,this.physicsBody=e,this.setOptions(t)}return x(r,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,n=this.physicsBody.physicsEdgeIndices,a=this.body.edges,o,s,l,u=0;u<n.length;u++)t=a[n[u]],t.connected===!0&&t.toId!==t.fromId&&this.body.nodes[t.toId]!==void 0&&this.body.nodes[t.fromId]!==void 0&&(t.edgeType.via!==void 0?(e=t.options.length===void 0?this.options.springLength:t.options.length,o=t.to,s=t.edgeType.via,l=t.from,this._calculateSpringForce(o,s,.5*e),this._calculateSpringForce(s,l,.5*e)):(e=t.options.length===void 0?this.options.springLength*1.5:t.options.length,this._calculateSpringForce(t.from,t.to,e)))}},{key:"_calculateSpringForce",value:function(e,t,n){var a=e.x-t.x,o=e.y-t.y,s=Math.max(Math.sqrt(a*a+o*o),.01),l=this.options.springConstant*(n-s)/s,u=a*l,h=o*l;this.physicsBody.forces[e.id]!==void 0&&(this.physicsBody.forces[e.id].x+=u,this.physicsBody.forces[e.id].y+=h),this.physicsBody.forces[t.id]!==void 0&&(this.physicsBody.forces[t.id].x-=u,this.physicsBody.forces[t.id].y-=h)}}]),r}(),bce=function(){function r(i,e,t){C(this,r),this.body=i,this.physicsBody=e,this.setOptions(t)}return x(r,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,n,a,o,s,l,u,h=this.body.edges,d=.5,c=this.physicsBody.physicsEdgeIndices,f=this.physicsBody.physicsNodeIndices,v=this.physicsBody.forces,p=0;p<f.length;p++){var g=f[p];v[g].springFx=0,v[g].springFy=0}for(var y=0;y<c.length;y++)t=h[c[y]],t.connected===!0&&(e=t.options.length===void 0?this.options.springLength:t.options.length,n=t.from.x-t.to.x,a=t.from.y-t.to.y,u=Math.sqrt(n*n+a*a),u=u===0?.01:u,l=this.options.springConstant*(e-u)/u,o=n*l,s=a*l,t.to.level!=t.from.level?(v[t.toId]!==void 0&&(v[t.toId].springFx-=o,v[t.toId].springFy-=s),v[t.fromId]!==void 0&&(v[t.fromId].springFx+=o,v[t.fromId].springFy+=s)):(v[t.toId]!==void 0&&(v[t.toId].x-=d*o,v[t.toId].y-=d*s),v[t.fromId]!==void 0&&(v[t.fromId].x+=d*o,v[t.fromId].y+=d*s)));l=1;for(var m,w,b=0;b<f.length;b++){var _=f[b];m=Math.min(l,Math.max(-l,v[_].springFx)),w=Math.min(l,Math.max(-l,v[_].springFy)),v[_].x+=m,v[_].y+=w}for(var E=0,R=0,M=0;M<f.length;M++){var A=f[M];E+=v[A].x,R+=v[A].y}for(var N=E/f.length,F=R/f.length,W=0;W<f.length;W++){var Y=f[W];v[Y].x-=N,v[Y].y-=F}}}]),r}(),tl=function(){function r(i,e,t){C(this,r),this.body=i,this.physicsBody=e,this.setOptions(t)}return x(r,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,n,a,o=this.body.nodes,s=this.physicsBody.physicsNodeIndices,l=this.physicsBody.forces,u=0;u<s.length;u++){var h=s[u];a=o[h],e=-a.x,t=-a.y,n=Math.sqrt(e*e+t*t),this._calculateForces(n,e,t,l,a)}}},{key:"_calculateForces",value:function(e,t,n,a,o){var s=e===0?0:this.options.centralGravity/e;a[o.id].x=t*s,a[o.id].y=n*s}}]),r}();function $ce(r){var i=wce();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function wce(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var _ce=function(r){oe(e,r);var i=$ce(e);function e(t,n,a){var o;return C(this,e),o=i.call(this,t,n,a),o._rng=xu("FORCE ATLAS 2 BASED REPULSION SOLVER"),o}return x(e,[{key:"_calculateForces",value:function(n,a,o,s,l){n===0&&(n=.1*this._rng(),a=n),this.overlapAvoidanceFactor<1&&s.shape.radius&&(n=Math.max(.1+this.overlapAvoidanceFactor*s.shape.radius,n-s.shape.radius));var u=s.edges.length+1,h=this.options.gravitationalConstant*l.mass*s.options.mass*u/Math.pow(n,2),d=a*h,c=o*h;this.physicsBody.forces[s.id].x+=d,this.physicsBody.forces[s.id].y+=c}}]),e}(ZO);function Ece(r){var i=Sce();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function Sce(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var Oce=function(r){oe(e,r);var i=Ece(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return x(e,[{key:"_calculateForces",value:function(n,a,o,s,l){if(n>0){var u=l.edges.length+1,h=this.options.centralGravity*u*l.options.mass;s[l.id].x=a*h,s[l.id].y=o*h}}}]),e}(tl),Tce=function(){function r(i){C(this,r),this.body=i,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},Fe(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return x(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,Pl(["stabilization"],this.options,e),Vt(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());var t=this.options.wind;t&&((typeof t.x!="number"||of(t.x))&&(t.x=0),(typeof t.y!="number"||of(t.y))&&(t.y=0)),this.timestep=this.options.timestep}this.init()}},{key:"init",value:function(){var e;this.options.solver==="forceAtlas2Based"?(e=this.options.forceAtlas2Based,this.nodesSolver=new _ce(this.body,this.physicsBody,e),this.edgesSolver=new Wd(this.body,this.physicsBody,e),this.gravitySolver=new Oce(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new yce(this.body,this.physicsBody,e),this.edgesSolver=new Wd(this.body,this.physicsBody,e),this.gravitySolver=new tl(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new mce(this.body,this.physicsBody,e),this.edgesSolver=new bce(this.body,this.physicsBody,e),this.gravitySolver=new tl(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new ZO(this.body,this.physicsBody,e),this.edgesSolver=new Wd(this.body,this.physicsBody,e),this.gravitySolver=new tl(this.body,this.physicsBody,e)),this.modelOptions=e}},{key:"initPhysics",value:function(){this.physicsEnabled===!0&&this.options.enabled===!0?this.options.stabilization.enabled===!0?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}},{key:"startSimulation",value:function(){if(this.physicsEnabled===!0&&this.options.enabled===!0){if(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),this.viewFunction===void 0){var e;this.viewFunction=T(e=this.simulationStep).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}else this.body.emitter.emit("_redraw")}},{key:"stopSimulation",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.stabilized=!0,e===!0&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,e===!0&&this.body.emitter.emit("_stopRendering"))}},{key:"simulationStep",value:function(){var e=El();this.physicsTick();var t=El()-e;(t<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}},{key:"_emitStabilized",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&gr(function(){e.body.emitter.emit("stabilized",{iterations:t}),e.startedStabilization=!1,e.stabilizationIterations=0},0)}},{key:"physicsStep",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}},{key:"adjustTimeStep",value:function(){var e=1.2;this._evaluateStepQuality()===!0?this.timestep=e*this.timestep:this.timestep/e<this.options.timestep?this.timestep=this.options.timestep:(this.adaptiveCounter=-1,this.timestep=Math.max(this.options.timestep,this.timestep/e))}},{key:"physicsTick",value:function(){if(this._startStabilizing(),this.stabilized!==!0){if(this.adaptiveTimestep===!0&&this.adaptiveTimestepEnabled===!0){var e=this.adaptiveCounter%this.adaptiveInterval===0;e?(this.timestep=2*this.timestep,this.physicsStep(),this.revert(),this.timestep=.5*this.timestep,this.physicsStep(),this.physicsStep(),this.adjustTimeStep()):this.physicsStep(),this.adaptiveCounter+=1}else this.timestep=this.options.timestep,this.physicsStep();this.stabilized===!0&&this.revert(),this.stabilizationIterations++}}},{key:"updatePhysicsData",value:function(){this.physicsBody.forces={},this.physicsBody.physicsNodeIndices=[],this.physicsBody.physicsEdgeIndices=[];var e=this.body.nodes,t=this.body.edges;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&e[n].options.physics===!0&&this.physicsBody.physicsNodeIndices.push(e[n].id);for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&t[a].options.physics===!0&&this.physicsBody.physicsEdgeIndices.push(t[a].id);for(var o=0;o<this.physicsBody.physicsNodeIndices.length;o++){var s=this.physicsBody.physicsNodeIndices[o];this.physicsBody.forces[s]={x:0,y:0},this.physicsBody.velocities[s]===void 0&&(this.physicsBody.velocities[s]={x:0,y:0})}for(var l in this.physicsBody.velocities)e[l]===void 0&&delete this.physicsBody.velocities[l]}},{key:"revert",value:function(){var e=_e(this.previousStates),t=this.body.nodes,n=this.physicsBody.velocities;this.referenceState={};for(var a=0;a<e.length;a++){var o=e[a];t[o]!==void 0?t[o].options.physics===!0&&(this.referenceState[o]={positions:{x:t[o].x,y:t[o].y}},n[o].x=this.previousStates[o].vx,n[o].y=this.previousStates[o].vy,t[o].x=this.previousStates[o].x,t[o].y=this.previousStates[o].y):delete this.previousStates[o]}}},{key:"_evaluateStepQuality",value:function(){var e,t,n,a=this.body.nodes,o=this.referenceState,s=.3;for(var l in this.referenceState)if(Object.prototype.hasOwnProperty.call(this.referenceState,l)&&a[l]!==void 0&&(e=a[l].x-o[l].positions.x,t=a[l].y-o[l].positions.y,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),n>s))return!1;return!0}},{key:"moveNodes",value:function(){for(var e=this.physicsBody.physicsNodeIndices,t=0,n=0,a=5,o=0;o<e.length;o++){var s=e[o],l=this._performStep(s);t=Math.max(t,l),n+=l}this.adaptiveTimestepEnabled=n/e.length<a,this.stabilized=t<this.options.minVelocity}},{key:"calculateComponentVelocity",value:function(e,t,n){var a=this.modelOptions.damping*e,o=(t-a)/n;e+=o*this.timestep;var s=this.options.maxVelocity||1e9;return Math.abs(e)>s&&(e=e>0?s:-s),e}},{key:"_performStep",value:function(e){var t=this.body.nodes[e],n=this.physicsBody.forces[e];this.options.wind&&(n.x+=this.options.wind.x,n.y+=this.options.wind.y);var a=this.physicsBody.velocities[e];this.previousStates[e]={x:t.x,y:t.y,vx:a.x,vy:a.y},t.options.fixed.x===!1?(a.x=this.calculateComponentVelocity(a.x,n.x,t.options.mass),t.x+=a.x*this.timestep):(n.x=0,a.x=0),t.options.fixed.y===!1?(a.y=this.calculateComponentVelocity(a.y,n.y,t.options.mass),t.y+=a.y*this.timestep):(n.y=0,a.y=0);var o=Math.sqrt(Math.pow(a.x,2)+Math.pow(a.y,2));return o}},{key:"_freezeNodes",value:function(){var e=this.body.nodes;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].x&&e[t].y){var n=e[t].options.fixed;this.freezeCache[t]={x:n.x,y:n.y},n.x=!0,n.y=!0}}},{key:"_restoreFrozenNodes",value:function(){var e=this.body.nodes;for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.freezeCache[t]!==void 0&&(e[t].options.fixed.x=this.freezeCache[t].x,e[t].options.fixed.y=this.freezeCache[t].y);this.freezeCache={}}},{key:"stabilize",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof t!="number"&&(t=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",t)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=t,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,gr(function(){return e._stabilizationBatch()},0)}},{key:"_startStabilizing",value:function(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}},{key:"_stabilizationBatch",value:function(){var e=this,t=function(){return e.stabilized===!1&&e.stabilizationIterations<e.targetIterations},n=function(){e.body.emitter.emit("stabilizationProgress",{iterations:e.stabilizationIterations,total:e.targetIterations})};this._startStabilizing()&&n();for(var a=0;t()&&a<this.options.stabilization.updateInterval;)this.physicsTick(),a++;if(n(),t()){var o;gr(T(o=this._stabilizationBatch).call(o,this),0)}else this._finalizeStabilization()}},{key:"_finalizeStabilization",value:function(){this.body.emitter.emit("_allowRedraw"),this.options.stabilization.fit===!0&&this.body.emitter.emit("fit"),this.options.stabilization.onlyDynamicEdges===!0&&this._restoreFrozenNodes(),this.body.emitter.emit("stabilizationIterationsDone"),this.body.emitter.emit("_requestRedraw"),this.stabilized===!0?this._emitStabilized():this.startSimulation(),this.ready=!0}},{key:"_drawForces",value:function(e){for(var t=0;t<this.physicsBody.physicsNodeIndices.length;t++){var n=this.physicsBody.physicsNodeIndices[t],a=this.body.nodes[n],o=this.physicsBody.forces[n],s=20,l=.03,u=Math.sqrt(Math.pow(o.x,2)+Math.pow(o.x,2)),h=Math.min(Math.max(5,u),15),d=3*h,c=rf((180-Math.min(1,Math.max(0,l*u))*180)/360,1,1),f={x:a.x+s*o.x,y:a.y+s*o.y};e.lineWidth=h,e.strokeStyle=c,e.beginPath(),e.moveTo(a.x,a.y),e.lineTo(f.x,f.y),e.stroke();var v=Math.atan2(o.y,o.x);e.fillStyle=c,QO.draw(e,{type:"arrow",point:f,angle:v,length:d}),qo(e).call(e)}}}]),r}();let Ds;const Pce=new Uint8Array(16);function Ice(){if(!Ds&&(Ds=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ds))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ds(Pce)}const et=[];for(let r=0;r<256;++r)et.push((r+256).toString(16).slice(1));function kce(r,i=0){return et[r[i+0]]+et[r[i+1]]+et[r[i+2]]+et[r[i+3]]+"-"+et[r[i+4]]+et[r[i+5]]+"-"+et[r[i+6]]+et[r[i+7]]+"-"+et[r[i+8]]+et[r[i+9]]+"-"+et[r[i+10]]+et[r[i+11]]+et[r[i+12]]+et[r[i+13]]+et[r[i+14]]+et[r[i+15]]}const Cce=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var R$={randomUUID:Cce};function Ha(r,i,e){if(R$.randomUUID&&!i&&!r)return R$.randomUUID();r=r||{};const t=r.random||(r.rng||Ice)();if(t[6]=t[6]&15|64,t[8]=t[8]&63|128,i){e=e||0;for(let n=0;n<16;++n)i[e+n]=t[n];return i}return kce(t)}var vt=function(){function r(){C(this,r)}return x(r,null,[{key:"getRange",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,a=-1e9,o=1e9,s=-1e9,l;if(t.length>0)for(var u=0;u<t.length;u++)l=e[t[u]],o>l.shape.boundingBox.left&&(o=l.shape.boundingBox.left),s<l.shape.boundingBox.right&&(s=l.shape.boundingBox.right),n>l.shape.boundingBox.top&&(n=l.shape.boundingBox.top),a<l.shape.boundingBox.bottom&&(a=l.shape.boundingBox.bottom);return o===1e9&&s===-1e9&&n===1e9&&a===-1e9&&(n=0,a=0,o=0,s=0),{minX:o,maxX:s,minY:n,maxY:a}}},{key:"getRangeCore",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,a=-1e9,o=1e9,s=-1e9,l;if(t.length>0)for(var u=0;u<t.length;u++)l=e[t[u]],o>l.x&&(o=l.x),s<l.x&&(s=l.x),n>l.y&&(n=l.y),a<l.y&&(a=l.y);return o===1e9&&s===-1e9&&n===1e9&&a===-1e9&&(n=0,a=0,o=0,s=0),{minX:o,maxX:s,minY:n,maxY:a}}},{key:"findCenter",value:function(e){return{x:.5*(e.maxX+e.minX),y:.5*(e.maxY+e.minY)}}},{key:"cloneOptions",value:function(e,t){var n={};return t===void 0||t==="node"?(fe(n,e.options,!0),n.x=e.x,n.y=e.y,n.amountOfConnections=e.edges.length):fe(n,e.options,!0),n}}]),r}();function xce(r){var i=Ace();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function Ace(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var Rce=function(r){oe(e,r);var i=xce(e);function e(t,n,a,o,s,l){var u;return C(this,e),u=i.call(this,t,n,a,o,s,l),u.isCluster=!0,u.containedNodes={},u.containedEdges={},u}return x(e,[{key:"_openChildCluster",value:function(n){var a=this,o=this.body.nodes[n];if(this.containedNodes[n]===void 0)throw new Error("node with id: "+n+" not in current cluster");if(!o.isCluster)throw new Error("node with id: "+n+" is not a cluster");delete this.containedNodes[n],te(o.edges,function(s){delete a.containedEdges[s.id]}),te(o.containedNodes,function(s,l){a.containedNodes[l]=s}),o.containedNodes={},te(o.containedEdges,function(s,l){a.containedEdges[l]=s}),o.containedEdges={},te(o.edges,function(s){te(a.edges,function(l){var u,h,d=re(u=l.clusteringEdgeReplacingIds).call(u,s.id);d!==-1&&(te(s.clusteringEdgeReplacingIds,function(c){l.clusteringEdgeReplacingIds.push(c),a.body.edges[c].edgeReplacedById=l.id}),kr(h=l.clusteringEdgeReplacingIds).call(h,d,1))})}),o.edges=[]}}]),e}(Mt),Dce=function(){function r(i){var e=this;C(this,r),this.body=i,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},Fe(this.options,this.defaultOptions),this.body.emitter.on("_resetData",function(){e.clusteredNodes={},e.clusteredEdges={}})}return x(r,[{key:"clusterByHubsize",value:function(e,t){e===void 0?e=this._getHubSize():he(e)==="object"&&(t=this._checkOptions(e),e=this._getHubSize());for(var n=[],a=0;a<this.body.nodeIndices.length;a++){var o=this.body.nodes[this.body.nodeIndices[a]];o.edges.length>=e&&n.push(o.id)}for(var s=0;s<n.length;s++)this.clusterByConnection(n[s],t,!0);this.body.emitter.emit("_dataChanged")}},{key:"cluster",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(t.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");t=this._checkOptions(t);var a={},o={};te(this.body.nodes,function(s,l){s.options&&t.joinCondition(s.options)===!0&&(a[l]=s,te(s.edges,function(u){e.clusteredEdges[u.id]===void 0&&(o[u.id]=u)}))}),this._cluster(a,o,t,n)}},{key:"clusterByEdgeCount",value:function(e,t){var n=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;t=this._checkOptions(t);for(var o=[],s={},l,u,h,d=function(){var p={},g={},y=n.body.nodeIndices[c],m=n.body.nodes[y];if(s[y]===void 0){h=0,u=[];for(var w=0;w<m.edges.length;w++)l=m.edges[w],n.clusteredEdges[l.id]===void 0&&(l.toId!==l.fromId&&h++,u.push(l));if(h===e){for(var b=function(Y){if(t.joinCondition===void 0||t.joinCondition===null)return!0;var be=vt.cloneOptions(Y);return t.joinCondition(be)},_=!0,E=0;E<u.length;E++){l=u[E];var R=n._getConnectedId(l,y);if(b(m))g[l.id]=l,p[y]=m,p[R]=n.body.nodes[R],s[y]=!0;else{_=!1;break}}if(_e(p).length>0&&_e(g).length>0&&_===!0){var M=function(){for(var Y=0;Y<o.length;++Y)for(var be in p)if(o[Y].nodes[be]!==void 0)return o[Y]},A=M();if(A!==void 0){for(var N in p)A.nodes[N]===void 0&&(A.nodes[N]=p[N]);for(var F in g)A.edges[F]===void 0&&(A.edges[F]=g[F])}else o.push({nodes:p,edges:g})}}}},c=0;c<this.body.nodeIndices.length;c++)d();for(var f=0;f<o.length;f++)this._cluster(o[f].nodes,o[f].edges,t,!1);a===!0&&this.body.emitter.emit("_dataChanged")}},{key:"clusterOutliers",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,t)}},{key:"clusterBridges",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,t)}},{key:"clusterByConnection",value:function(e,t){var n,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[e]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");var o=this.body.nodes[e];t=this._checkOptions(t,o),t.clusterNodeProperties.x===void 0&&(t.clusterNodeProperties.x=o.x),t.clusterNodeProperties.y===void 0&&(t.clusterNodeProperties.y=o.y),t.clusterNodeProperties.fixed===void 0&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=o.options.fixed.x,t.clusterNodeProperties.fixed.y=o.options.fixed.y);var s={},l={},u=o.id,h=vt.cloneOptions(o);s[u]=o;for(var d=0;d<o.edges.length;d++){var c=o.edges[d];if(this.clusteredEdges[c.id]===void 0){var f=this._getConnectedId(c,u);if(this.clusteredNodes[f]===void 0)if(f!==u)if(t.joinCondition===void 0)l[c.id]=c,s[f]=this.body.nodes[f];else{var v=vt.cloneOptions(this.body.nodes[f]);t.joinCondition(h,v)===!0&&(l[c.id]=c,s[f]=this.body.nodes[f])}else l[c.id]=c}}var p=Vi(n=_e(s)).call(n,function(b){return s[b].id});for(var g in s)if(Object.prototype.hasOwnProperty.call(s,g))for(var y=s[g],m=0;m<y.edges.length;m++){var w=y.edges[m];re(p).call(p,this._getConnectedId(w,y.id))>-1&&(l[w.id]=w)}this._cluster(s,l,t,a)}},{key:"_createClusterEdges",value:function(e,t,n,a){for(var o,s,l,u,h,d,c=_e(e),f=[],v=0;v<c.length;v++){s=c[v],l=e[s];for(var p=0;p<l.edges.length;p++)o=l.edges[p],this.clusteredEdges[o.id]===void 0&&(o.toId==o.fromId?t[o.id]=o:o.toId==s?(u=n.id,h=o.fromId,d=h):(u=o.toId,h=n.id,d=u),e[d]===void 0&&f.push({edge:o,fromId:h,toId:u}))}for(var g=[],y=function(R){for(var M=0;M<g.length;M++){var A=g[M],N=R.fromId===A.fromId&&R.toId===A.toId,F=R.fromId===A.toId&&R.toId===A.fromId;if(N||F)return A}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,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,o=[];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&this.clusteredNodes[s]!==void 0&&o.push(s);for(var l=0;l<o.length;++l)delete e[o[l]];if(_e(e).length!=0&&!(_e(e).length==1&&n.clusterNodeProperties.allowSingleNodeCluster!=!0)){var u=fe({},n.clusterNodeProperties);if(n.processProperties!==void 0){var h=[];for(var d in e)if(Object.prototype.hasOwnProperty.call(e,d)){var c=vt.cloneOptions(e[d]);h.push(c)}var f=[];for(var v in t)if(Object.prototype.hasOwnProperty.call(t,v)&&v.substr(0,12)!=="clusterEdge:"){var p=vt.cloneOptions(t[v],"edge");f.push(p)}if(u=n.processProperties(u,h,f),!u)throw new Error("The processProperties function does not return properties!")}u.id===void 0&&(u.id="cluster:"+Ha());var g=u.id;u.label===void 0&&(u.label="cluster");var y=void 0;u.x===void 0&&(y=this._getClusterPosition(e),u.x=y.x),u.y===void 0&&(y===void 0&&(y=this._getClusterPosition(e)),u.y=y.y),u.id=g;var m=this.body.functions.createNode(u,Rce);m.containedNodes=e,m.containedEdges=t,m.clusterEdgeProperties=n.clusterEdgeProperties,this.body.nodes[u.id]=m,this._clusterEdges(e,t,u,n.clusterEdgeProperties),u.id=void 0,a===!0&&this.body.emitter.emit("_dataChanged")}}},{key:"_backupEdgeOptions",value:function(e){this.clusteredEdges[e.id]===void 0&&(this.clusteredEdges[e.id]={physics:e.options.physics})}},{key:"_restoreEdge",value:function(e){var t=this.clusteredEdges[e.id];t!==void 0&&(e.setOptions({physics:t.physics}),delete this.clusteredEdges[e.id])}},{key:"isCluster",value:function(e){return this.body.nodes[e]!==void 0?this.body.nodes[e].isCluster===!0:(console.error("Node does not exist."),!1)}},{key:"_getClusterPosition",value:function(e){for(var t=_e(e),n=e[t[0]].x,a=e[t[0]].x,o=e[t[0]].y,s=e[t[0]].y,l,u=1;u<t.length;u++)l=e[t[u]],n=l.x<n?l.x:n,a=l.x>a?l.x:a,o=l.y<o?l.y:o,s=l.y>s?l.y:s;return{x:.5*(n+a),y:.5*(o+s)}}},{key:"openCluster",value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No clusterNodeId supplied to openCluster.");var a=this.body.nodes[e];if(a===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(a.isCluster!==!0||a.containedNodes===void 0||a.containedEdges===void 0)throw new Error("The node:"+e+" is not a valid cluster.");var o=this.findNode(e),s=re(o).call(o,e)-1;if(s>=0){var l=o[s],u=this.body.nodes[l];u._openChildCluster(e),delete this.body.nodes[e],n===!0&&this.body.emitter.emit("_dataChanged");return}var h=a.containedNodes,d=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 h)if(Object.prototype.hasOwnProperty.call(h,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 h)if(Object.prototype.hasOwnProperty.call(h,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(h,function(ht){ht.options.fixed.x===!1&&(ht.x=a.x),ht.options.fixed.y===!1&&(ht.y=a.y)});for(var w in h)if(Object.prototype.hasOwnProperty.call(h,w)){var b=this.body.nodes[w];b.vx=a.vx,b.vy=a.vy,b.setOptions({physics:!0}),delete this.clusteredNodes[w]}for(var _=[],E=0;E<a.edges.length;E++)_.push(a.edges[E]);for(var R=0;R<_.length;R++){for(var M=_[R],A=this._getConnectedId(M,e),N=this.clusteredNodes[A],F=0;F<M.clusteringEdgeReplacingIds.length;F++){var W=M.clusteringEdgeReplacingIds[F],Y=this.body.edges[W];if(Y!==void 0)if(N!==void 0){var be=this.body.nodes[N.clusterId];be.containedEdges[Y.id]=Y,delete d[Y.id];var Je=Y.fromId,De=Y.toId;Y.toId==A?De=N.clusterId:Je=N.clusterId,this._createClusteredEdge(Je,De,Y,be.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(Y)}M.remove()}for(var At in d)Object.prototype.hasOwnProperty.call(d,At)&&this._restoreEdge(d[At]);delete this.body.nodes[e],n===!0&&this.body.emitter.emit("_dataChanged")}},{key:"getNodesInCluster",value:function(e){var t=[];if(this.isCluster(e)===!0){var n=this.body.nodes[e].containedNodes;for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&t.push(this.body.nodes[a].id)}return t}},{key:"findNode",value:function(e){for(var t=[],n=100,a=0,o;this.clusteredNodes[e]!==void 0&&a<n;){if(o=this.body.nodes[e],o===void 0)return[];t.push(o.id),e=this.clusteredNodes[e].clusterId,a++}return o=this.body.nodes[e],o===void 0?[]:(t.push(o.id),Rn(t).call(t),t)}},{key:"updateClusteredNode",value:function(e,t){if(e===void 0)throw new Error("No clusteredNodeId supplied to updateClusteredNode.");if(t===void 0)throw new Error("No newOptions supplied to updateClusteredNode.");if(this.body.nodes[e]===void 0)throw new Error("The clusteredNodeId supplied to updateClusteredNode does not exist.");this.body.nodes[e].setOptions(t),this.body.emitter.emit("_dataChanged")}},{key:"updateEdge",value:function(e,t){if(e===void 0)throw new Error("No startEdgeId supplied to updateEdge.");if(t===void 0)throw new Error("No newOptions supplied to updateEdge.");if(this.body.edges[e]===void 0)throw new Error("The startEdgeId supplied to updateEdge does not exist.");for(var n=this.getClusteredEdges(e),a=0;a<n.length;a++){var o=this.body.edges[n[a]];o.setOptions(t)}this.body.emitter.emit("_dataChanged")}},{key:"getClusteredEdges",value:function(e){for(var t=[],n=100,a=0;e!==void 0&&this.body.edges[e]!==void 0&&a<n;)t.push(this.body.edges[e].id),e=this.body.edges[e].edgeReplacedById,a++;return Rn(t).call(t),t}},{key:"getBaseEdge",value:function(e){return this.getBaseEdges(e)[0]}},{key:"getBaseEdges",value:function(e){for(var t=[e],n=[],a=[],o=100,s=0;t.length>0&&s<o;){var l=t.pop();if(l!==void 0){var u=this.body.edges[l];if(u!==void 0){s++;var h=u.clusteringEdgeReplacingIds;if(h===void 0)a.push(l);else for(var d=0;d<h.length;++d){var c=h[d];re(t).call(t,h)!==-1||re(n).call(n,h)!==-1||t.push(c)}n.push(l)}}}return a}},{key:"_getConnectedId",value:function(e,t){return e.toId!=t?e.toId:(e.fromId!=t,e.fromId)}},{key:"_getHubSize",value:function(){for(var e=0,t=0,n=0,a=0,o=0;o<this.body.nodeIndices.length;o++){var s=this.body.nodes[this.body.nodeIndices[o]];s.edges.length>a&&(a=s.edges.length),e+=s.edges.length,t+=Math.pow(s.edges.length,2),n+=1}e=e/n,t=t/n;var l=t-Math.pow(e,2),u=Math.sqrt(l),h=Math.floor(e+2*u);return h>a&&(h=a),h}},{key:"_createClusteredEdge",value:function(e,t,n,a,o){var s=vt.cloneOptions(n,"edge");fe(s,a),s.from=e,s.to=t,s.id="clusterEdge:"+Ha(),o!==void 0&&fe(s,o);var l=this.body.functions.createEdge(s);return l.clusteringEdgeReplacingIds=[n.id],l.connect(),this.body.edges[l.id]=l,l}},{key:"_clusterEdges",value:function(e,t,n,a){if(t instanceof Di){var o=t,s={};s[o.id]=o,t=s}if(e instanceof Mt){var l=e,u={};u[l.id]=l,e=u}if(n==null)throw new Error("_clusterEdges: parameter clusterNode required");a===void 0&&(a=n.clusterEdgeProperties),this._createClusterEdges(e,t,n,a);for(var h in t)if(Object.prototype.hasOwnProperty.call(t,h)&&this.body.edges[h]!==void 0){var d=this.body.edges[h];this._backupEdgeOptions(d),d.setOptions({physics:!1})}for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&(this.clusteredNodes[c]={clusterId:n.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 n=t.clusterId;if(n!==void 0)return this.body.nodes[n]}}}},{key:"_filter",value:function(e,t){var n=[];return te(e,function(a){t(a)&&n.push(a)}),n}},{key:"_updateState",value:function(){var e=this,t,n=[],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&&n.push(t)}o(function(f){for(var v=0;v<n.length;v++)delete f.containedNodes[n[v]]});for(var l=0;l<n.length;l++)delete this.clusteredNodes[n[l]];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 u=_e(this.body.edges);te(u,function(f){var v=e.body.edges[f],p=e._isClusteredNode(v.fromId)||e._isClusteredNode(v.toId);if(p!==e._isClusteredEdge(v.id))if(p){var g=e._getClusterNodeForNode(v.fromId);g!==void 0&&e._clusterEdges(e.body.nodes[v.fromId],v,g);var y=e._getClusterNodeForNode(v.toId);y!==void 0&&e._clusterEdges(e.body.nodes[v.toId],v,y)}else delete e._clusterEdges[f],e._restoreEdge(v)});for(var h=!1,d=!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);d=v.length>0,h=h||d};d;)c();h&&this._updateState()}},{key:"_isClusteredNode",value:function(e){return this.clusteredNodes[e]!==void 0}},{key:"_isClusteredEdge",value:function(e){return this.clusteredEdges[e]!==void 0}}]),r}();function Mce(){var r;window!==void 0&&(r=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),r===void 0?window.requestAnimationFrame=function(i){i()}:window.requestAnimationFrame=r}var Nce=function(){function r(i,e){C(this,r),Mce(),this.body=i,this.canvas=e,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},Fe(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return x(r,[{key:"bindEventListeners",value:function(){var e=this,t;this.body.emitter.on("dragStart",function(){e.dragging=!0}),this.body.emitter.on("dragEnd",function(){e.dragging=!1}),this.body.emitter.on("zoom",function(){e.zooming=!0,window.clearTimeout(e.zoomTimeoutId),e.zoomTimeoutId=gr(function(){var n;e.zooming=!1,T(n=e._requestRedraw).call(n,e)()},250)}),this.body.emitter.on("_resizeNodes",function(){e._resizeNodes()}),this.body.emitter.on("_redraw",function(){e.renderingActive===!1&&e._redraw()}),this.body.emitter.on("_blockRedraw",function(){e.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",function(){e.allowRedraw=!0,e.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",T(t=this._requestRedraw).call(t,this)),this.body.emitter.on("_startRendering",function(){e.renderRequests+=1,e.renderingActive=!0,e._startRendering()}),this.body.emitter.on("_stopRendering",function(){e.renderRequests-=1,e.renderingActive=e.renderRequests>0,e.renderTimer=void 0}),this.body.emitter.on("destroy",function(){e.renderRequests=0,e.allowRedraw=!1,e.renderingActive=!1,e.requiresTimeout===!0?clearTimeout(e.renderTimer):window.cancelAnimationFrame(e.renderTimer),e.body.emitter.off()})}},{key:"setOptions",value:function(e){if(e!==void 0){var t=["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"];_a(t,this.options,e)}}},{key:"_requestNextFrame",value:function(e,t){if(!(typeof window>"u")){var n,a=window;return this.requiresTimeout===!0?n=gr(e,t):a.requestAnimationFrame&&(n=a.requestAnimationFrame(e)),n}}},{key:"_startRendering",value:function(){if(this.renderingActive===!0&&this.renderTimer===void 0){var e;this.renderTimer=this._requestNextFrame(T(e=this._renderStep).call(e,this),this.simulationInterval)}}},{key:"_renderStep",value:function(){this.renderingActive===!0&&(this.renderTimer=void 0,this.requiresTimeout===!0&&this._startRendering(),this._redraw(),this.requiresTimeout===!1&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var e=this;this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,this._requestNextFrame(function(){e._redraw(!1)},0))}},{key:"_redraw",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;var t={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();var n=this.canvas.getContext(),a=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(n.clearRect(0,0,a,o),this.canvas.frame.clientWidth===0)return;if(n.save(),n.translate(this.body.view.translation.x,this.body.view.translation.y),n.scale(this.body.view.scale,this.body.view.scale),n.beginPath(),this.body.emitter.emit("beforeDrawing",n),n.closePath(),e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(n),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){var s=this._drawNodes(n,e),l=s.drawExternalLabels;t.drawExternalLabels=l}e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(n),t.drawExternalLabels!=null&&t.drawExternalLabels(),e===!1&&this._drawSelectionBox(n),n.beginPath(),this.body.emitter.emit("afterDrawing",n),n.closePath(),n.restore(),e===!0&&n.clearRect(0,0,a,o)}}},{key:"_resizeNodes",value:function(){this.canvas.setTransform();var e=this.canvas.getContext();e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale);var t=this.body.nodes,n;for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(n=t[a],n.resize(e),n.updateBoundingBox(e,n.selected));e.restore()}},{key:"_drawNodes",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this.body.nodes,a=this.body.nodeIndices,o,s=[],l=[],u=20,h=this.canvas.DOMtoCanvas({x:-u,y:-u}),d=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+u,y:this.canvas.frame.canvas.clientHeight+u}),c={top:h.y,left:h.x,bottom:d.y,right:d.x},f=[],v=0;v<a.length;v++)if(o=n[a[v]],o.hover)l.push(a[v]);else if(o.isSelected())s.push(a[v]);else if(t===!0){var p=o.draw(e);p.drawExternalLabel!=null&&f.push(p.drawExternalLabel)}else if(o.isBoundingBoxOverlappingWith(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=l.length;for(y=0;y<m;y++){o=n[s[y]];var b=o.draw(e);b.drawExternalLabel!=null&&f.push(b.drawExternalLabel)}for(y=0;y<w;y++){o=n[l[y]];var _=o.draw(e);_.drawExternalLabel!=null&&f.push(_.drawExternalLabel)}return{drawExternalLabels:function(){for(var R=0,M=f;R<M.length;R++){var A=M[R];A()}}}}},{key:"_drawEdges",value:function(e){for(var t=this.body.edges,n=this.body.edgeIndices,a=0;a<n.length;a++){var o=t[n[a]];o.connected===!0&&o.draw(e)}}},{key:"_drawArrows",value:function(e){for(var t=this.body.edges,n=this.body.edgeIndices,a=0;a<n.length;a++){var o=t[n[a]];o.connected===!0&&o.drawArrows(e)}}},{key:"_determineBrowserMethod",value:function(){if(typeof window<"u"){var e=navigator.userAgent.toLowerCase();this.requiresTimeout=!1,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,n=this.body.selectionBox.position.end.y-this.body.selectionBox.position.start.y;e.rect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,t,n),e.fillStyle="rgba(151, 194, 252, 0.2)",e.fillRect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,t,n),e.strokeStyle="rgba(151, 194, 252, 1)",e.stroke()}else e.closePath()}}]),r}(),Fce=ie,Bce=Fce.setInterval,Lce=Bce,jce=z(Lce);function xl(r,i){i.inputHandler=function(e){e.isFirst&&i(e)},r.on("hammer.input",i.inputHandler)}function eT(r,i){return i.inputHandler=function(e){e.isFinal&&i(e)},r.on("hammer.input",i.inputHandler)}var zce=function(){function r(i){C(this,r),this.body=i,this.pixelRatio=1,this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this._cleanupCallbacks=[],this.options={},this.defaultOptions={autoResize:!0,height:"100%",width:"100%"},Fe(this.options,this.defaultOptions),this.bindEventListeners()}return x(r,[{key:"bindEventListeners",value:function(){var e=this,t;this.body.emitter.once("resize",function(n){n.width!==0&&(e.body.view.translation.x=n.width*.5),n.height!==0&&(e.body.view.translation.y=n.height*.5)}),this.body.emitter.on("setSize",T(t=this.setSize).call(t,this)),this.body.emitter.on("destroy",function(){e.hammerFrame.destroy(),e.hammer.destroy(),e._cleanUp()})}},{key:"setOptions",value:function(e){var t=this;if(e!==void 0){var n=["width","height","autoResize"];_a(n,this.options,e)}if(this._cleanUp(),this.options.autoResize===!0){var a;if(window.ResizeObserver){var o=new ResizeObserver(function(){var h=t.setSize();h===!0&&t.body.emitter.emit("_requestRedraw")}),s=this.frame;o.observe(s),this._cleanupCallbacks.push(function(){o.unobserve(s)})}else{var l=jce(function(){var h=t.setSize();h===!0&&t.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(function(){clearInterval(l)})}var u=T(a=this._onResize).call(a,this);window.addEventListener("resize",u),this._cleanupCallbacks.push(function(){window.removeEventListener("resize",u)})}}},{key:"_cleanUp",value:function(){var e,t,n;de(e=Rn(t=kr(n=this._cleanupCallbacks).call(n,0)).call(t)).call(e,function(a){try{a()}catch(o){console.error(o)}})}},{key:"_onResize",value:function(){this.setSize(),this.body.emitter.emit("_redraw")}},{key:"_getCameraState",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/e,this.cameraState.previousHeight=this.frame.canvas.height/e,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/e,y:.5*this.frame.canvas.height/e}))}},{key:"_setCameraState",value:function(){if(this.cameraState.scale!==void 0&&this.frame.canvas.clientWidth!==0&&this.frame.canvas.clientHeight!==0&&this.pixelRatio!==0&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){var e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,n=this.cameraState.scale;e!=1&&t!=1?n=this.cameraState.scale*.5*(e+t):e!=1?n=this.cameraState.scale*e:t!=1&&(n=this.cameraState.scale*t),this.body.view.scale=n;var a=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),o={x:a.x-this.cameraState.position.x,y:a.y-this.cameraState.position.y};this.body.view.translation.x+=o.x*this.body.view.scale,this.body.view.translation.y+=o.y*this.body.view.scale}}},{key:"_prepareValue",value:function(e){if(typeof e=="number")return e+"px";if(typeof e=="string"){if(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 Ri(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:Ri.DIRECTION_ALL}),xl(this.hammer,function(t){e.body.eventListeners.onTouch(t)}),this.hammer.on("tap",function(t){e.body.eventListeners.onTap(t)}),this.hammer.on("doubletap",function(t){e.body.eventListeners.onDoubleTap(t)}),this.hammer.on("press",function(t){e.body.eventListeners.onHold(t)}),this.hammer.on("panstart",function(t){e.body.eventListeners.onDragStart(t)}),this.hammer.on("panmove",function(t){e.body.eventListeners.onDrag(t)}),this.hammer.on("panend",function(t){e.body.eventListeners.onDragEnd(t)}),this.hammer.on("pinch",function(t){e.body.eventListeners.onPinch(t)}),this.frame.canvas.addEventListener("wheel",function(t){e.body.eventListeners.onMouseWheel(t)}),this.frame.canvas.addEventListener("mousemove",function(t){e.body.eventListeners.onMouseMove(t)}),this.frame.canvas.addEventListener("contextmenu",function(t){e.body.eventListeners.onContext(t)}),this.hammerFrame=new Ri(this.frame),eT(this.hammerFrame,function(t){e.body.eventListeners.onRelease(t)})}},{key:"setSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;e=this._prepareValue(e),t=this._prepareValue(t);var n=!1,a=this.frame.canvas.width,o=this.frame.canvas.height,s=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||t!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=t)this._getCameraState(s),this.frame.style.width=e,this.frame.style.height=t,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=t,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},n=!0;else{var l=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),u=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==l||this.frame.canvas.height!==u)&&this._getCameraState(s),this.frame.canvas.width!==l&&(this.frame.canvas.width=l,n=!0),this.frame.canvas.height!==u&&(this.frame.canvas.height=u,n=!0)}return n===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(a/this.pixelRatio),oldHeight:Math.round(o/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,n}},{key:"getContext",value:function(){return this.frame.canvas.getContext("2d")}},{key:"_determinePixelRatio",value:function(){var e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");var t=1;typeof window<"u"&&(t=window.devicePixelRatio||1);var n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/n}},{key:"_setPixelRatio",value:function(){this.pixelRatio=this._determinePixelRatio()}},{key:"setTransform",value:function(){var e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}},{key:"_XconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}},{key:"DOMtoCanvas",value:function(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}}]),r}();function Hce(r,i){var e=Fe({nodes:i,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},r??{});if(!le(e.nodes))throw new TypeError("Nodes has to be an array of ids.");if(e.nodes.length===0&&(e.nodes=i),!(typeof e.minZoomLevel=="number"&&e.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof e.maxZoomLevel=="number"&&e.minZoomLevel<=e.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return e}var Wce=function(){function r(i,e){var t,n=this,a;C(this,r),this.body=i,this.canvas=e,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",T(t=this.fit).call(t,this)),this.body.emitter.on("animationFinished",function(){n.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",T(a=this.releaseNode).call(a,this))}return x(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=Hce(e,this.body.nodeIndices);var n=this.canvas.frame.canvas.clientWidth,a=this.canvas.frame.canvas.clientHeight,o,s;if(n===0||a===0)s=1,o=vt.getRange(this.body.nodes,e.nodes);else if(t===!0){var l=0;for(var u in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,u)){var h=this.body.nodes[u];h.predefinedPosition===!0&&(l+=1)}if(l>.5*this.body.nodeIndices.length){this.fit(e,!1);return}o=vt.getRange(this.body.nodes,e.nodes);var d=this.body.nodeIndices.length;s=12.662/(d+7.4147)+.0964822;var c=Math.min(n/600,a/600);s*=c}else{this.body.emitter.emit("_resizeNodes"),o=vt.getRange(this.body.nodes,e.nodes);var f=Math.abs(o.maxX-o.minX)*1.1,v=Math.abs(o.maxY-o.minY)*1.1,p=n/f,g=a/v;s=p<=g?p:g}s>e.maxZoomLevel?s=e.maxZoomLevel:s<e.minZoomLevel&&(s=e.minZoomLevel);var y=vt.findCenter(o),m={position:y,scale:s,animation:e.animation};this.moveTo(m)}},{key:"focus",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){var n={x:this.body.nodes[e].x,y:this.body.nodes[e].y};t.position=n,t.lockedOnNode=e,this.moveTo(t)}else console.error("Node: "+e+" cannot be found.")}},{key:"moveTo",value:function(e){if(e===void 0){e={};return}if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!Tn(e.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else e.offset.x=0;if(e.offset.y!=null){if(e.offset.y=+e.offset.y,!Tn(e.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else e.offset.x=0}else e.offset={x:0,y:0};if(e.position!=null){if(e.position.x!=null){if(e.position.x=+e.position.x,!Tn(e.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else e.position.x=0;if(e.position.y!=null){if(e.position.y=+e.position.y,!Tn(e.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else e.position.x=0}else e.position=this.getViewPosition();if(e.scale!=null){if(e.scale=+e.scale,!(e.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else e.scale=this.body.view.scale;e.animation===void 0&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),e.animation.duration===void 0&&(e.animation.duration=1e3),e.animation.easingFunction===void 0&&(e.animation.easingFunction="easeInOutQuad"),this.animateView(e)}},{key:"animateView",value:function(e){if(e!==void 0){this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),e.locked===!0&&(this.lockedOnNodeId=e.lockedOnNode,this.lockedOnNodeOffset=e.offset),this.easingTime!=0&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=e.scale,this.body.view.scale=this.targetScale;var t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n={x:t.x-e.position.x,y:t.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+n.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+n.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var a;this.viewFunction=T(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=T(o=this._transitionRedraw).call(o,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}}},{key:"_lockedRedraw",value:function(){var e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n={x:t.x-e.x,y:t.y-e.y},a=this.body.view.translation,o={x:a.x+n.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:a.y+n.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=o}},{key:"releaseNode",value:function(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;var t=Tae[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*t,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*t,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*t},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var n;this.viewFunction=T(n=this._lockedRedraw).call(n,this),this.body.emitter.on("initRedraw",this.viewFunction)}this.body.emitter.emit("animationFinished")}}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),r}();function D$(r){var i=r&&r.preventDefault||!1,e=r&&r.container||window,t={},n={keydown:{},keyup:{}},a={},o;for(o=97;o<=122;o++)a[String.fromCharCode(o)]={code:65+(o-97),shift:!1};for(o=65;o<=90;o++)a[String.fromCharCode(o)]={code:o,shift:!0};for(o=0;o<=9;o++)a[""+o]={code:48+o,shift:!1};for(o=1;o<=12;o++)a["F"+o]={code:111+o,shift:!1};for(o=0;o<=9;o++)a["num"+o]={code:96+o,shift:!1};a["num*"]={code:106,shift:!1},a["num+"]={code:107,shift:!1},a["num-"]={code:109,shift:!1},a["num/"]={code:111,shift:!1},a["num."]={code:110,shift:!1},a.left={code:37,shift:!1},a.up={code:38,shift:!1},a.right={code:39,shift:!1},a.down={code:40,shift:!1},a.space={code:32,shift:!1},a.enter={code:13,shift:!1},a.shift={code:16,shift:void 0},a.esc={code:27,shift:!1},a.backspace={code:8,shift:!1},a.tab={code:9,shift:!1},a.ctrl={code:17,shift:!1},a.alt={code:18,shift:!1},a.delete={code:46,shift:!1},a.pageup={code:33,shift:!1},a.pagedown={code:34,shift:!1},a["="]={code:187,shift:!1},a["-"]={code:189,shift:!1},a["]"]={code:221,shift:!1},a["["]={code:219,shift:!1};var s=function(h){u(h,"keydown")},l=function(h){u(h,"keyup")},u=function(h,d){if(n[d][h.keyCode]!==void 0){for(var c=n[d][h.keyCode],f=0;f<c.length;f++)(c[f].shift===void 0||c[f].shift==!0&&h.shiftKey==!0||c[f].shift==!1&&h.shiftKey==!1)&&c[f].fn(h);i==!0&&h.preventDefault()}};return t.bind=function(h,d,c){if(c===void 0&&(c="keydown"),a[h]===void 0)throw new Error("unsupported key: "+h);n[c][a[h].code]===void 0&&(n[c][a[h].code]=[]),n[c][a[h].code].push({fn:d,shift:a[h].shift})},t.bindAll=function(h,d){d===void 0&&(d="keydown");for(var c in a)a.hasOwnProperty(c)&&t.bind(c,h,d)},t.getKey=function(h){for(var d in a)if(a.hasOwnProperty(d)){if(h.shiftKey==!0&&a[d].shift==!0&&h.keyCode==a[d].code)return d;if(h.shiftKey==!1&&a[d].shift==!1&&h.keyCode==a[d].code)return d;if(h.keyCode==a[d].code&&d=="shift")return d}return"unknown key, currently not supported"},t.unbind=function(h,d,c){if(c===void 0&&(c="keydown"),a[h]===void 0)throw new Error("unsupported key: "+h);if(d!==void 0){var f=[],v=n[c][a[h].code];if(v!==void 0)for(var p=0;p<v.length;p++)v[p].fn==d&&v[p].shift==a[h].shift||f.push(n[c][a[h].code][p]);n[c][a[h].code]=f}else n[c][a[h].code]=[]},t.reset=function(){n={keydown:{},keyup:{}}},t.destroy=function(){n={keydown:{},keyup:{}},e.removeEventListener("keydown",s,!0),e.removeEventListener("keyup",l,!0)},e.addEventListener("keydown",s,!0),e.addEventListener("keyup",l,!0),t}var Vce=function(){function r(i,e){var t=this;C(this,r),this.body=i,this.canvas=e,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on("activate",function(){t.activated=!0,t.configureKeyboardBindings()}),this.body.emitter.on("deactivate",function(){t.activated=!1,t.configureKeyboardBindings()}),this.body.emitter.on("destroy",function(){t.keycharm!==void 0&&t.keycharm.destroy()}),this.options={}}return x(r,[{key:"setOptions",value:function(e){e!==void 0&&(this.options=e,this.create())}},{key:"create",value:function(){this.options.navigationButtons===!0?this.iconsCreated===!1&&this.loadNavigationElements():this.iconsCreated===!0&&this.cleanNavigation(),this.configureKeyboardBindings()}},{key:"cleanNavigation",value:function(){if(this.navigationHammers.length!=0){for(var e=0;e<this.navigationHammers.length;e++)this.navigationHammers[e].destroy();this.navigationHammers=[]}this.navigationDOM&&this.navigationDOM.wrapper&&this.navigationDOM.wrapper.parentNode&&this.navigationDOM.wrapper.parentNode.removeChild(this.navigationDOM.wrapper),this.iconsCreated=!1}},{key:"loadNavigationElements",value:function(){var e=this;this.cleanNavigation(),this.navigationDOM={};var t=["up","down","left","right","zoomIn","zoomOut","zoomExtends"],n=["_moveUp","_moveDown","_moveLeft","_moveRight","_zoomIn","_zoomOut","_fit"];this.navigationDOM.wrapper=document.createElement("div"),this.navigationDOM.wrapper.className="vis-navigation",this.canvas.frame.appendChild(this.navigationDOM.wrapper);for(var a=0;a<t.length;a++){this.navigationDOM[t[a]]=document.createElement("div"),this.navigationDOM[t[a]].className="vis-button vis-"+t[a],this.navigationDOM.wrapper.appendChild(this.navigationDOM[t[a]]);var o=new Ri(this.navigationDOM[t[a]]);if(n[a]==="_fit"){var s;xl(o,T(s=this._fit).call(s,this))}else{var l;xl(o,T(l=this.bindToRedraw).call(l,this,n[a]))}this.navigationHammers.push(o)}var u=new Ri(this.canvas.frame);eT(u,function(){e._stopMovement()}),this.navigationHammers.push(u),this.iconsCreated=!0}},{key:"bindToRedraw",value:function(e){if(this.boundFunctions[e]===void 0){var t;this.boundFunctions[e]=T(t=this[e]).call(t,this),this.body.emitter.on("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_startRendering")}}},{key:"unbindFromRedraw",value:function(e){this.boundFunctions[e]!==void 0&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"),delete this.boundFunctions[e])}},{key:"_fit",value:function(){new Date().valueOf()-this.touchTime>700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=new Date().valueOf())}},{key:"_stopMovement",value:function(){for(var e in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,e)&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var e=this.body.view.scale,t=this.body.view.scale*(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,a=t/e,o=(1-a)*this.canvas.canvasViewCenter.x+n.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+n.y*a;this.body.view.scale=t,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}},{key:"_zoomOut",value:function(){var e=this.body.view.scale,t=this.body.view.scale/(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,a=t/e,o=(1-a)*this.canvas.canvasViewCenter.x+n.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+n.y*a;this.body.view.scale=t,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}},{key:"configureKeyboardBindings",value:function(){var e=this;if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=D$({container:window,preventDefault:!0}):this.keycharm=D$({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var t,n,a,o,s,l,u,h,d,c,f,v,p,g,y,m,w,b,_,E,R,M,A,N;T(t=this.keycharm).call(t,"up",function(){e.bindToRedraw("_moveUp")},"keydown"),T(n=this.keycharm).call(n,"down",function(){e.bindToRedraw("_moveDown")},"keydown"),T(a=this.keycharm).call(a,"left",function(){e.bindToRedraw("_moveLeft")},"keydown"),T(o=this.keycharm).call(o,"right",function(){e.bindToRedraw("_moveRight")},"keydown"),T(s=this.keycharm).call(s,"=",function(){e.bindToRedraw("_zoomIn")},"keydown"),T(l=this.keycharm).call(l,"num+",function(){e.bindToRedraw("_zoomIn")},"keydown"),T(u=this.keycharm).call(u,"num-",function(){e.bindToRedraw("_zoomOut")},"keydown"),T(h=this.keycharm).call(h,"-",function(){e.bindToRedraw("_zoomOut")},"keydown"),T(d=this.keycharm).call(d,"[",function(){e.bindToRedraw("_zoomOut")},"keydown"),T(c=this.keycharm).call(c,"]",function(){e.bindToRedraw("_zoomIn")},"keydown"),T(f=this.keycharm).call(f,"pageup",function(){e.bindToRedraw("_zoomIn")},"keydown"),T(v=this.keycharm).call(v,"pagedown",function(){e.bindToRedraw("_zoomOut")},"keydown"),T(p=this.keycharm).call(p,"up",function(){e.unbindFromRedraw("_moveUp")},"keyup"),T(g=this.keycharm).call(g,"down",function(){e.unbindFromRedraw("_moveDown")},"keyup"),T(y=this.keycharm).call(y,"left",function(){e.unbindFromRedraw("_moveLeft")},"keyup"),T(m=this.keycharm).call(m,"right",function(){e.unbindFromRedraw("_moveRight")},"keyup"),T(w=this.keycharm).call(w,"=",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),T(b=this.keycharm).call(b,"num+",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),T(_=this.keycharm).call(_,"num-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),T(E=this.keycharm).call(E,"-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),T(R=this.keycharm).call(R,"[",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),T(M=this.keycharm).call(M,"]",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),T(A=this.keycharm).call(A,"pageup",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),T(N=this.keycharm).call(N,"pagedown",function(){e.unbindFromRedraw("_zoomOut")},"keyup")}}}]),r}();function Uce(r,i){var e=typeof vn<"u"&&ni(r)||r["@@iterator"];if(!e){if(le(r)||(e=Gce(r))||i&&r&&typeof r.length=="number"){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
94
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Gce(r,i){var e;if(r){if(typeof r=="string")return M$(r,i);var t=tt(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return ri(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return M$(r,i)}}function M$(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}var Kce=function(){function r(i,e,t){var n,a,o,s,l,u,h,d,c,f,v,p,g;C(this,r),this.body=i,this.canvas=e,this.selectionHandler=t,this.navigationHandler=new Vce(i,e),this.body.eventListeners.onTap=T(n=this.onTap).call(n,this),this.body.eventListeners.onTouch=T(a=this.onTouch).call(a,this),this.body.eventListeners.onDoubleTap=T(o=this.onDoubleTap).call(o,this),this.body.eventListeners.onHold=T(s=this.onHold).call(s,this),this.body.eventListeners.onDragStart=T(l=this.onDragStart).call(l,this),this.body.eventListeners.onDrag=T(u=this.onDrag).call(u,this),this.body.eventListeners.onDragEnd=T(h=this.onDragEnd).call(h,this),this.body.eventListeners.onMouseWheel=T(d=this.onMouseWheel).call(d,this),this.body.eventListeners.onPinch=T(c=this.onPinch).call(c,this),this.body.eventListeners.onMouseMove=T(f=this.onMouseMove).call(f,this),this.body.eventListeners.onRelease=T(v=this.onRelease).call(v,this),this.body.eventListeners.onContext=T(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=T(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},Fe(this.options,this.defaultOptions),this.bindEventListeners()}return x(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"];Pl(t,this.options,e),Vt(this.options,e,"keyboard"),e.tooltip&&(Fe(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=tf(e.tooltip.color)))}this.navigationHandler.setOptions(this.options)}},{key:"getPointer",value:function(e){return{x:e.x-_ae(this.canvas.frame.canvas),y:e.y-Eae(this.canvas.frame.canvas)}}},{key:"onTouch",value:function(e){new Date().valueOf()-this.touchTime>50&&(this.drag.pointer=this.getPointer(e.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=new Date().valueOf())}},{key:"onTap",value:function(e){var t=this.getPointer(e.center),n=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,n),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t)}},{key:"onDoubleTap",value:function(e){var t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,t)}},{key:"onHold",value:function(e){var t=this.getPointer(e.center),n=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,n),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t),this.selectionHandler.generateClickEvent("hold",e,t)}},{key:"onRelease",value:function(e){if(new Date().valueOf()-this.touchTime>10){var t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,t),this.touchTime=new Date().valueOf()}}},{key:"onContext",value:function(e){var t=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,t)}},{key:"checkSelectionChanges",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;t===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}},{key:"_determineDifference",value:function(e,t){var n=function(o,s){for(var l=[],u=0;u<o.length;u++){var h=o[u];re(s).call(s,h)===-1&&l.push(h)}return l};return{nodes:n(e.nodes,t.nodes),edges:n(e.edges,t.edges)}}},{key:"onDragStart",value:function(e){if(!this.drag.dragging){this.drag.pointer===void 0&&this.onTouch(e);var t=this.selectionHandler.getNodeAt(this.drag.pointer);if(this.drag.dragging=!0,this.drag.selection=[],this.drag.translation=Fe({},this.body.view.translation),this.drag.nodeId=void 0,e.srcEvent.shiftKey){this.body.selectionBox.show=!0;var n=this.getPointer(e.center);this.body.selectionBox.position.start={x:this.canvas._XconvertDOMtoCanvas(n.x),y:this.canvas._YconvertDOMtoCanvas(n.y)},this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(n.x),y:this.canvas._YconvertDOMtoCanvas(n.y)}}else if(t!==void 0&&this.options.dragNodes===!0){this.drag.nodeId=t.id,t.isSelected()===!1&&this.selectionHandler.setSelection({nodes:[t.id]}),this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer);var a=Uce(this.selectionHandler.getSelectedNodes()),o;try{for(a.s();!(o=a.n()).done;){var s=o.value,l={id:s.id,node:s,x:s.x,y:s.y,xFixed:s.options.fixed.x,yFixed:s.options.fixed.y};s.options.fixed.x=!0,s.options.fixed.y=!0,this.drag.selection.push(l)}}catch(u){a.e(u)}finally{a.f()}}else this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer,void 0,!0)}}},{key:"onDrag",value:function(e){var t=this;if(this.drag.pinched!==!0){this.body.emitter.emit("unlockNode");var n=this.getPointer(e.center),a=this.drag.selection;if(a&&a.length&&this.options.dragNodes===!0){this.selectionHandler.generateClickEvent("dragging",e,n);var o=n.x-this.drag.pointer.x,s=n.y-this.drag.pointer.y;de(a).call(a,function(h){var d=h.node;h.xFixed===!1&&(d.x=t.canvas._XconvertDOMtoCanvas(t.canvas._XconvertCanvasToDOM(h.x)+o)),h.yFixed===!1&&(d.y=t.canvas._YconvertDOMtoCanvas(t.canvas._YconvertCanvasToDOM(h.y)+s))}),this.body.emitter.emit("startSimulation")}else{if(e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,n,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(n.x),y:this.canvas._YconvertDOMtoCanvas(n.y)},this.body.emitter.emit("_requestRedraw")}if(this.options.dragView===!0&&!e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,n,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}var l=n.x-this.drag.pointer.x,u=n.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+l,y:this.drag.translation.y+u},this.body.emitter.emit("_requestRedraw")}}}}},{key:"onDragEnd",value:function(e){var t=this;if(this.drag.dragging=!1,this.body.selectionBox.show){var n;this.body.selectionBox.show=!1;var a=this.body.selectionBox.position,o={minX:Math.min(a.start.x,a.end.x),minY:Math.min(a.start.y,a.end.y),maxX:Math.max(a.start.x,a.end.x),maxY:Math.max(a.start.y,a.end.y)},s=Ot(n=this.body.nodeIndices).call(n,function(h){var d=t.body.nodes[h];return d.x>=o.minX&&d.x<=o.maxX&&d.y>=o.minY&&d.y<=o.maxY});de(s).call(s,function(h){return t.selectionHandler.selectObject(t.body.nodes[h])});var l=this.getPointer(e.center);this.selectionHandler.commitAndEmit(l,e),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{var u=this.drag.selection;u&&u.length?(de(u).call(u,function(h){h.node.options.fixed.x=h.xFixed,h.node.options.fixed.y=h.yFixed}),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}}},{key:"onPinch",value:function(e){var t=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);var n=this.pinch.scale*e.scale;this.zoom(n,t)}},{key:"zoom",value:function(e,t){if(this.options.zoomView===!0){var n=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);var a=void 0;this.drag!==void 0&&this.drag.dragging===!0&&(a=this.canvas.DOMtoCanvas(this.drag.pointer));var o=this.body.view.translation,s=e/n,l=(1-s)*t.x+o.x*s,u=(1-s)*t.y+o.y*s;if(this.body.view.scale=e,this.body.view.translation={x:l,y:u},a!=null){var h=this.canvas.canvasToDOM(a);this.drag.pointer.x=h.x,this.drag.pointer.y=h.y}this.body.emitter.emit("_requestRedraw"),n<e?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:t}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:t})}}},{key:"onMouseWheel",value:function(e){if(this.options.zoomView===!0){if(e.deltaY!==0){var t=this.body.view.scale;t*=1+(e.deltaY<0?1:-1)*(this.options.zoomSpeed*.1);var n=this.getPointer({x:e.clientX,y:e.clientY});this.zoom(t,n)}e.preventDefault()}}},{key:"onMouseMove",value:function(e){var t=this,n=this.getPointer({x:e.clientX,y:e.clientY}),a=!1;this.popup!==void 0&&(this.popup.hidden===!1&&this._checkHidePopup(n),this.popup.hidden===!1&&(a=!0,this.popup.setPosition(n.x+3,n.y-5),this.popup.show())),this.options.keyboard.autoFocus&&this.options.keyboard.bindToWindow===!1&&this.options.keyboard.enabled===!0&&this.canvas.frame.focus(),a===!1&&(this.popupTimer!==void 0&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=gr(function(){return t._checkShowPopup(n)},this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(e,n)}},{key:"_checkShowPopup",value:function(e){var t=this.canvas._XconvertDOMtoCanvas(e.x),n=this.canvas._YconvertDOMtoCanvas(e.y),a={left:t,top:n,right:t,bottom:n},o=this.popupObj===void 0?void 0:this.popupObj.id,s=!1,l="node";if(this.popupObj===void 0){for(var u=this.body.nodeIndices,h=this.body.nodes,d,c=[],f=0;f<u.length;f++)d=h[u[f]],d.isOverlappingWith(a)===!0&&(s=!0,d.getTitle()!==void 0&&c.push(u[f]));c.length>0&&(this.popupObj=h[c[c.length-1]],s=!0)}if(this.popupObj===void 0&&s===!1){for(var v=this.body.edgeIndices,p=this.body.edges,g,y=[],m=0;m<v.length;m++)g=p[v[m]],g.isOverlappingWith(a)===!0&&g.connected===!0&&g.getTitle()!==void 0&&y.push(v[m]);y.length>0&&(this.popupObj=p[y[y.length-1]],l="edge")}this.popupObj!==void 0?this.popupObj.id!==o&&(this.popup===void 0&&(this.popup=new Dae(this.canvas.frame)),this.popup.popupTargetType=l,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(e){var t=this.selectionHandler._pointerToPositionObject(e),n=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(n=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t),n===!0)){var a=this.selectionHandler.getNodeAt(e);n=a===void 0?!1:a.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(n=this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));n===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),r}(),qce=Bv,Yce=AO;qce("Set",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},Yce);var Xce=ie,Qce=Xce.Set,Jce=Qce,Zce=Jce,efe=Zce,En=z(efe),tfe=ae,N$=Lv,Ms=Au.getWeakData,rfe=Fv,nfe=Ht,ife=da,Vd=Ye,afe=Nv,tT=fn,F$=Xe,rT=ti,ofe=rT.set,sfe=rT.getterFor,lfe=tT.find,ufe=tT.findIndex,hfe=tfe([].splice),dfe=0,Ns=function(r){return r.frozen||(r.frozen=new nT)},nT=function(){this.entries=[]},Ud=function(r,i){return lfe(r.entries,function(e){return e[0]===i})};nT.prototype={get:function(r){var i=Ud(this,r);if(i)return i[1]},has:function(r){return!!Ud(this,r)},set:function(r,i){var e=Ud(this,r);e?e[1]=i:this.entries.push([r,i])},delete:function(r){var i=ufe(this.entries,function(e){return e[0]===r});return~i&&hfe(this.entries,i,1),!!~i}};var cfe={getConstructor:function(r,i,e,t){var n=r(function(l,u){rfe(l,a),ofe(l,{type:i,id:dfe++,frozen:void 0}),ife(u)||afe(u,l[t],{that:l,AS_ENTRIES:e})}),a=n.prototype,o=sfe(i),s=function(l,u,h){var d=o(l),c=Ms(nfe(u),!0);return c===!0?Ns(d).set(u,h):c[d.id]=h,l};return N$(a,{delete:function(l){var u=o(this);if(!Vd(l))return!1;var h=Ms(l);return h===!0?Ns(u).delete(l):h&&F$(h,u.id)&&delete h[u.id]},has:function(u){var h=o(this);if(!Vd(u))return!1;var d=Ms(u);return d===!0?Ns(h).has(u):d&&F$(d,h.id)}}),N$(a,e?{get:function(u){var h=o(this);if(Vd(u)){var d=Ms(u);return d===!0?Ns(h).get(u):d?d[h.id]:void 0}},set:function(u,h){return s(this,u,h)}}:{add:function(u){return s(this,u,!0)}}),n}},ffe=IO,B$=Pe,rl=ae,L$=Lv,vfe=Au,pfe=Bv,iT=cfe,Fs=Ye,Bs=ti.enforce,gfe=ne,yfe=mE,es=Object,mfe=Array.isArray,Ls=es.isExtensible,aT=es.isFrozen,bfe=es.isSealed,oT=es.freeze,$fe=es.seal,j$={},z$={},wfe=!B$.ActiveXObject&&"ActiveXObject"in B$,ka,sT=function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},lT=pfe("WeakMap",sT,iT),mi=lT.prototype,nl=rl(mi.set),_fe=function(){return ffe&&gfe(function(){var r=oT([]);return nl(new lT,r,1),!aT(r)})};if(yfe)if(wfe){ka=iT.getConstructor(sT,"WeakMap",!0),vfe.enable();var H$=rl(mi.delete),js=rl(mi.has),W$=rl(mi.get);L$(mi,{delete:function(r){if(Fs(r)&&!Ls(r)){var i=Bs(this);return i.frozen||(i.frozen=new ka),H$(this,r)||i.frozen.delete(r)}return H$(this,r)},has:function(i){if(Fs(i)&&!Ls(i)){var e=Bs(this);return e.frozen||(e.frozen=new ka),js(this,i)||e.frozen.has(i)}return js(this,i)},get:function(i){if(Fs(i)&&!Ls(i)){var e=Bs(this);return e.frozen||(e.frozen=new ka),js(this,i)?W$(this,i):e.frozen.get(i)}return W$(this,i)},set:function(i,e){if(Fs(i)&&!Ls(i)){var t=Bs(this);t.frozen||(t.frozen=new ka),js(this,i)?nl(this,i,e):t.frozen.set(i,e)}else nl(this,i,e);return this}})}else _fe()&&L$(mi,{set:function(i,e){var t;return mfe(i)&&(aT(i)?t=j$:bfe(i)&&(t=z$)),nl(this,i,e),t===j$&&oT(i),t===z$&&$fe(i),this}});var Efe=ie,Sfe=Efe.WeakMap,Ofe=Sfe,Tfe=Ofe,Pfe=Tfe,Wa=z(Pfe);function ce(r,i,e,t){if(e==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?r!==i||!t:!i.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?t:e==="a"?t.call(r):t?t.value:i.get(r)}function hf(r,i,e,t,n){if(t==="m")throw new TypeError("Private method is not writable");if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?r!==i||!n:!i.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?n.call(r,e):n?n.value=e:i.set(r,e),e}function df(r,i){var e=typeof vn<"u"&&ni(r)||r["@@iterator"];if(!e){if(le(r)||(e=Ife(r))||i&&r&&typeof r.length=="number"){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
95
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Ife(r,i){var e;if(r){if(typeof r=="string")return V$(r,i);var t=tt(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return ri(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return V$(r,i)}}function V$(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}var $n,Wt,Wr,Vr,il;function U$(r,i){var e=new En,t=df(i),n;try{for(t.s();!(n=t.n()).done;){var a=n.value;r.has(a)||e.add(a)}}catch(o){t.e(o)}finally{t.f()}return e}var G$=function(){function r(){C(this,r),$n.set(this,new En),Wt.set(this,new En)}return x(r,[{key:"size",get:function(){return ce(this,Wt,"f").size}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var a=0,o=t;a<o.length;a++){var s=o[a];ce(this,Wt,"f").add(s)}}},{key:"delete",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var a=0,o=t;a<o.length;a++){var s=o[a];ce(this,Wt,"f").delete(s)}}},{key:"clear",value:function(){ce(this,Wt,"f").clear()}},{key:"getSelection",value:function(){return dr(ce(this,Wt,"f"))}},{key:"getChanges",value:function(){return{added:dr(U$(ce(this,$n,"f"),ce(this,Wt,"f"))),deleted:dr(U$(ce(this,Wt,"f"),ce(this,$n,"f"))),previous:dr(new En(ce(this,$n,"f"))),current:dr(new En(ce(this,Wt,"f")))}}},{key:"commit",value:function(){var e=this.getChanges();hf(this,$n,ce(this,Wt,"f"),"f"),hf(this,Wt,new En(ce(this,$n,"f")),"f");var t=df(e.added),n;try{for(t.s();!(n=t.n()).done;){var a=n.value;a.select()}}catch(u){t.e(u)}finally{t.f()}var o=df(e.deleted),s;try{for(o.s();!(s=o.n()).done;){var l=s.value;l.unselect()}}catch(u){o.e(u)}finally{o.f()}return e}}]),r}();$n=new Wa,Wt=new Wa;var kfe=function(){function r(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};C(this,r),Wr.set(this,new G$),Vr.set(this,new G$),il.set(this,void 0),hf(this,il,i,"f")}return x(r,[{key:"sizeNodes",get:function(){return ce(this,Wr,"f").size}},{key:"sizeEdges",get:function(){return ce(this,Vr,"f").size}},{key:"getNodes",value:function(){return ce(this,Wr,"f").getSelection()}},{key:"getEdges",value:function(){return ce(this,Vr,"f").getSelection()}},{key:"addNodes",value:function(){var e;(e=ce(this,Wr,"f")).add.apply(e,arguments)}},{key:"addEdges",value:function(){var e;(e=ce(this,Vr,"f")).add.apply(e,arguments)}},{key:"deleteNodes",value:function(e){ce(this,Wr,"f").delete(e)}},{key:"deleteEdges",value:function(e){ce(this,Vr,"f").delete(e)}},{key:"clear",value:function(){ce(this,Wr,"f").clear(),ce(this,Vr,"f").clear()}},{key:"commit",value:function(){for(var e,t,n={nodes:ce(this,Wr,"f").commit(),edges:ce(this,Vr,"f").commit()},a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return(e=ce(this,il,"f")).call.apply(e,wv(t=[this,n]).call(t,o)),n}}]),r}();Wr=new Wa,Vr=new Wa,il=new Wa;function K$(r,i){var e=typeof vn<"u"&&ni(r)||r["@@iterator"];if(!e){if(le(r)||(e=Cfe(r))||i&&r&&typeof r.length=="number"){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
96
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Cfe(r,i){var e;if(r){if(typeof r=="string")return q$(r,i);var t=tt(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return ri(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return q$(r,i)}}function q$(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}var xfe=function(){function r(i,e){var t=this;C(this,r),this.body=i,this.canvas=e,this._selectionAccumulator=new kfe,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},Fe(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",function(){t.updateSelection()})}return x(r,[{key:"setOptions",value:function(e){if(e!==void 0){var t=["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"];_a(t,this.options,e)}}},{key:"selectOnPoint",value:function(e){var t=!1;if(this.options.selectable===!0){var n=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),n!==void 0&&(t=this.selectObject(n)),this.body.emitter.emit("_requestRedraw")}return t}},{key:"selectAdditionalOnPoint",value:function(e){var t=!1;if(this.options.selectable===!0){var n=this.getNodeAt(e)||this.getEdgeAt(e);n!==void 0&&(t=!0,n.isSelected()===!0?this.deselectObject(n):this.selectObject(n),this.body.emitter.emit("_requestRedraw"))}return t}},{key:"_initBaseEvent",value:function(e,t){var n={};return n.pointer={DOM:{x:t.x,y:t.y},canvas:this.canvas.DOMtoCanvas(t)},n.event=e,n}},{key:"generateClickEvent",value:function(e,t,n,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s=this._initBaseEvent(t,n);if(o===!0)s.nodes=[],s.edges=[];else{var l=this.getSelection();s.nodes=l.nodes,s.edges=l.edges}a!==void 0&&(s.previousSelection=a),e=="click"&&(s.items=this.getClickedItems(n)),t.controlEdge!==void 0&&(s.controlEdge=t.controlEdge),this.body.emitter.emit(e,s)}},{key:"selectObject",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;if(e!==void 0){if(e instanceof Mt){if(t===!0){var n;(n=this._selectionAccumulator).addEdges.apply(n,dr(e.edges))}this._selectionAccumulator.addNodes(e)}else this._selectionAccumulator.addEdges(e);return!0}return!1}},{key:"deselectObject",value:function(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}},{key:"_getAllNodesOverlappingWith",value:function(e){for(var t=[],n=this.body.nodes,a=0;a<this.body.nodeIndices.length;a++){var o=this.body.nodeIndices[a];n[o].isOverlappingWith(e)&&t.push(o)}return t}},{key:"_pointerToPositionObject",value:function(e){var t=this.canvas.DOMtoCanvas(e);return{left:t.x-1,top:t.y+1,right:t.x+1,bottom:t.y-1}}},{key:"getNodeAt",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this._pointerToPositionObject(e),a=this._getAllNodesOverlappingWith(n);if(a.length>0)return t===!0?this.body.nodes[a[a.length-1]]:a[a.length-1]}},{key:"_getEdgesOverlappingWith",value:function(e,t){for(var n=this.body.edges,a=0;a<this.body.edgeIndices.length;a++){var o=this.body.edgeIndices[a];n[o].isOverlappingWith(e)&&t.push(o)}}},{key:"_getAllEdgesOverlappingWith",value:function(e){var t=[];return this._getEdgesOverlappingWith(e,t),t}},{key:"getEdgeAt",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this.canvas.DOMtoCanvas(e),a=10,o=null,s=this.body.edges,l=0;l<this.body.edgeIndices.length;l++){var u=this.body.edgeIndices[l],h=s[u];if(h.connected){var d=h.from.x,c=h.from.y,f=h.to.x,v=h.to.y,p=h.edgeType.getDistanceToEdge(d,c,f,v,n.x,n.y);p<a&&(o=u,a=p)}}if(o!==null)return t===!0?this.body.edges[o]:o}},{key:"_addToHover",value:function(e){e instanceof Mt?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}},{key:"_removeFromSelection",value:function(e){if(e instanceof Mt){var t;this._selectionAccumulator.deleteNodes(e),(t=this._selectionAccumulator).deleteEdges.apply(t,dr(e.edges))}else this._selectionAccumulator.deleteEdges(e)}},{key:"unselectAll",value:function(){this._selectionAccumulator.clear()}},{key:"getSelectedNodeCount",value:function(){return this._selectionAccumulator.sizeNodes}},{key:"getSelectedEdgeCount",value:function(){return this._selectionAccumulator.sizeEdges}},{key:"_hoverConnectedEdges",value:function(e){for(var t=0;t<e.edges.length;t++){var n=e.edges[t];n.hover=!0,this._addToHover(n)}}},{key:"emitBlurEvent",value:function(e,t,n){var a=this._initBaseEvent(e,t);n.hover===!0&&(n.hover=!1,n instanceof Mt?(a.node=n.id,this.body.emitter.emit("blurNode",a)):(a.edge=n.id,this.body.emitter.emit("blurEdge",a)))}},{key:"emitHoverEvent",value:function(e,t,n){var a=this._initBaseEvent(e,t),o=!1;return n.hover===!1&&(n.hover=!0,this._addToHover(n),o=!0,n instanceof Mt?(a.node=n.id,this.body.emitter.emit("hoverNode",a)):(a.edge=n.id,this.body.emitter.emit("hoverEdge",a))),o}},{key:"hoverObject",value:function(e,t){var n=this.getNodeAt(t);n===void 0&&(n=this.getEdgeAt(t));var a=!1;for(var o in this.hoverObj.nodes)Object.prototype.hasOwnProperty.call(this.hoverObj.nodes,o)&&(n===void 0||n instanceof Mt&&n.id!=o||n instanceof Di)&&(this.emitBlurEvent(e,t,this.hoverObj.nodes[o]),delete this.hoverObj.nodes[o],a=!0);for(var s in this.hoverObj.edges)Object.prototype.hasOwnProperty.call(this.hoverObj.edges,s)&&(a===!0?(this.hoverObj.edges[s].hover=!1,delete this.hoverObj.edges[s]):(n===void 0||n instanceof Di&&n.id!=s||n instanceof Mt&&!n.hover)&&(this.emitBlurEvent(e,t,this.hoverObj.edges[s]),delete this.hoverObj.edges[s],a=!0));if(n!==void 0){var l=_e(this.hoverObj.edges).length,u=_e(this.hoverObj.nodes).length,h=n instanceof Di&&l===0&&u===0,d=n instanceof Mt&&l===0&&u===0;(a||h||d)&&(a=this.emitHoverEvent(e,t,n)),n instanceof Mt&&this.options.hoverConnectedEdges===!0&&this._hoverConnectedEdges(n)}a===!0&&this.body.emitter.emit("_requestRedraw")}},{key:"commitWithoutEmitting",value:function(){this._selectionAccumulator.commit()}},{key:"commitAndEmit",value:function(e,t){var n=!1,a=this._selectionAccumulator.commit(),o={nodes:a.nodes.previous,edges:a.edges.previous};a.edges.deleted.length>0&&(this.generateClickEvent("deselectEdge",t,e,o),n=!0),a.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",t,e,o),n=!0),a.nodes.added.length>0&&(this.generateClickEvent("selectNode",t,e),n=!0),a.edges.added.length>0&&(this.generateClickEvent("selectEdge",t,e),n=!0),n===!0&&this.generateClickEvent("select",t,e)}},{key:"getSelection",value:function(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}},{key:"getSelectedNodes",value:function(){return this._selectionAccumulator.getNodes()}},{key:"getSelectedEdges",value:function(){return this._selectionAccumulator.getEdges()}},{key:"getSelectedNodeIds",value:function(){var e;return Vi(e=this._selectionAccumulator.getNodes()).call(e,function(t){return t.id})}},{key:"getSelectedEdgeIds",value:function(){var e;return Vi(e=this._selectionAccumulator.getEdges()).call(e,function(t){return t.id})}},{key:"setSelection",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((t.unselectAll||t.unselectAll===void 0)&&this.unselectAll(),e.nodes){var n=K$(e.nodes),a;try{for(n.s();!(a=n.n()).done;){var o=a.value,s=this.body.nodes[o];if(!s)throw new RangeError('Node with id "'+o+'" not found');this.selectObject(s,t.highlightEdges)}}catch(c){n.e(c)}finally{n.f()}}if(e.edges){var l=K$(e.edges),u;try{for(l.s();!(u=l.n()).done;){var h=u.value,d=this.body.edges[h];if(!d)throw new RangeError('Edge with id "'+h+'" not found');this.selectObject(d)}}catch(c){l.e(c)}finally{l.f()}}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}},{key:"selectNodes",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({nodes:e},{highlightEdges:t})}},{key:"selectEdges",value:function(e){if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({edges:e})}},{key:"updateSelection",value:function(){for(var e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(var t in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,t.id)||this._selectionAccumulator.deleteEdges(t)}},{key:"getClickedItems",value:function(e){for(var t=this.canvas.DOMtoCanvas(e),n=[],a=this.body.nodeIndices,o=this.body.nodes,s=a.length-1;s>=0;s--){var l=o[a[s]],u=l.getItemsOnPoint(t);n.push.apply(n,u)}for(var h=this.body.edgeIndices,d=this.body.edges,c=h.length-1;c>=0;c--){var f=d[h[c]],v=f.getItemsOnPoint(t);n.push.apply(n,v)}return n}}]),r}(),Y$=GE,Afe=Math.floor,cf=function(r,i){var e=r.length,t=Afe(e/2);return e<8?Rfe(r,i):Dfe(r,cf(Y$(r,0,t),i),cf(Y$(r,t),i),i)},Rfe=function(r,i){for(var e=r.length,t=1,n,a;t<e;){for(a=t,n=r[t];a&&i(r[a-1],n)>0;)r[a]=r[--a];a!==t++&&(r[a]=n)}return r},Dfe=function(r,i,e,t){for(var n=i.length,a=e.length,o=0,s=0;o<n||s<a;)r[o+s]=o<n&&s<a?t(i[o],e[s])<=0?i[o++]:e[s++]:o<n?i[o++]:e[s++];return r},Mfe=cf,Nfe=Ro,X$=Nfe.match(/firefox\/(\d+)/i),Ffe=!!X$&&+X$[1],Bfe=Ro,Lfe=/MSIE|Trident/.test(Bfe),jfe=Ro,Q$=jfe.match(/AppleWebKit\/(\d+)\./),zfe=!!Q$&&+Q$[1],Hfe=G,uT=ae,Wfe=Zn,Vfe=xt,J$=Xt,Ufe=AS,Z$=wr,Uv=ne,Gfe=Mfe,Kfe=$a,e1=Ffe,qfe=Lfe,t1=Do,r1=zfe,Xr=[],n1=uT(Xr.sort),Yfe=uT(Xr.push),Xfe=Uv(function(){Xr.sort(void 0)}),Qfe=Uv(function(){Xr.sort(null)}),Jfe=Kfe("sort"),hT=!Uv(function(){if(t1)return t1<70;if(!(e1&&e1>3)){if(qfe)return!0;if(r1)return r1<603;var r="",i,e,t,n;for(i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(n=0;n<47;n++)Xr.push({k:e+n,v:t})}for(Xr.sort(function(a,o){return o.v-a.v}),n=0;n<Xr.length;n++)e=Xr[n].k.charAt(0),r.charAt(r.length-1)!==e&&(r+=e);return r!=="DGBEFHACIJK"}}),Zfe=Xfe||!Qfe||!Jfe||!hT,eve=function(r){return function(i,e){return e===void 0?-1:i===void 0?1:r!==void 0?+r(i,e)||0:Z$(i)>Z$(e)?1:-1}};Hfe({target:"Array",proto:!0,forced:Zfe},{sort:function(i){i!==void 0&&Wfe(i);var e=Vfe(this);if(hT)return i===void 0?n1(e):n1(e,i);var t=[],n=J$(e),a,o;for(o=0;o<n;o++)o in e&&Yfe(t,e[o]);for(Gfe(t,eve(i)),a=J$(t),o=0;o<a;)e[o]=t[o++];for(;o<n;)Ufe(e,o++);return e}});var tve=Qe,rve=tve("Array").sort,nve=Re,ive=rve,Gd=Array.prototype,ave=function(r){var i=r.sort;return r===Gd||nve(Gd,r)&&i===Gd.sort?ive:i},ove=ave,sve=ove,lve=sve,Va=z(lve),uve=Zn,hve=xt,dve=hu,cve=Xt,fve=TypeError,i1=function(r){return function(i,e,t,n){uve(e);var a=hve(i),o=dve(a),s=cve(a),l=r?s-1:0,u=r?-1:1;if(t<2)for(;;){if(l in o){n=o[l],l+=u;break}if(l+=u,r?l<0:s<=l)throw new fve("Reduce of empty array with no initial value")}for(;r?l>=0:s>l;l+=u)l in o&&(n=e(n,o[l],l,a));return n}},vve={left:i1(!1),right:i1(!0)},pve=Pe,gve=Lr,yve=gve(pve.process)==="process",mve=G,bve=vve.left,$ve=$a,a1=Do,wve=yve,_ve=!wve&&a1>79&&a1<83,Eve=_ve||!$ve("reduce");mve({target:"Array",proto:!0,forced:Eve},{reduce:function(i){var e=arguments.length;return bve(this,i,e,e>1?arguments[1]:void 0)}});var Sve=Qe,Ove=Sve("Array").reduce,Tve=Re,Pve=Ove,Kd=Array.prototype,Ive=function(r){var i=r.reduce;return r===Kd||Tve(Kd,r)&&i===Kd.reduce?Pve:i},kve=Ive,Cve=kve,xve=Cve,dT=z(xve);function cT(r){var i=Ave();return function(){var t=B(r),n;if(i){var a=B(this).constructor;n=S(t,arguments,a)}else n=t.apply(this,arguments);return ue(this,n)}}function Ave(){if(typeof Reflect>"u"||!S||S.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(S(Boolean,[],function(){})),!0}catch{return!1}}var fT=function(){function r(){C(this,r)}return x(r,[{key:"abstract",value:function(){throw new Error("Can't instantiate abstract class!")}},{key:"fake_use",value:function(){}},{key:"curveType",value:function(){return this.abstract()}},{key:"getPosition",value:function(e){return this.fake_use(e),this.abstract()}},{key:"setPosition",value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,t,n),this.abstract()}},{key:"getTreeSize",value:function(e){return this.fake_use(e),this.abstract()}},{key:"sort",value:function(e){this.fake_use(e),this.abstract()}},{key:"fix",value:function(e,t){this.fake_use(e,t),this.abstract()}},{key:"shift",value:function(e,t){this.fake_use(e,t),this.abstract()}}]),r}(),Rve=function(r){oe(e,r);var i=cT(e);function e(t){var n;return C(this,e),n=i.call(this),n.layout=t,n}return x(e,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(n){return n.x}},{key:"setPosition",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(n,o),n.x=a}},{key:"getTreeSize",value:function(n){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,n);return{min:a.min_x,max:a.max_x}}},{key:"sort",value:function(n){Va(n).call(n,function(a,o){return a.x-o.x})}},{key:"fix",value:function(n,a){n.y=this.layout.options.hierarchical.levelSeparation*a,n.options.fixed.y=!0}},{key:"shift",value:function(n,a){this.layout.body.nodes[n].x+=a}}]),e}(fT),Dve=function(r){oe(e,r);var i=cT(e);function e(t){var n;return C(this,e),n=i.call(this),n.layout=t,n}return x(e,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(n){return n.y}},{key:"setPosition",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(n,o),n.y=a}},{key:"getTreeSize",value:function(n){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,n);return{min:a.min_y,max:a.max_y}}},{key:"sort",value:function(n){Va(n).call(n,function(a,o){return a.y-o.y})}},{key:"fix",value:function(n,a){n.x=this.layout.options.hierarchical.levelSeparation*a,n.options.fixed.x=!0}},{key:"shift",value:function(n,a){this.layout.body.nodes[n].y+=a}}]),e}(fT),Mve=G,Nve=fn.every,Fve=$a,Bve=Fve("every");Mve({target:"Array",proto:!0,forced:!Bve},{every:function(i){return Nve(this,i,arguments.length>1?arguments[1]:void 0)}});var Lve=Qe,jve=Lve("Array").every,zve=Re,Hve=jve,qd=Array.prototype,Wve=function(r){var i=r.every;return r===qd||zve(qd,r)&&i===qd.every?Hve:i},Vve=Wve,Uve=Vve,Gve=Uve,vT=z(Gve);function Kve(r,i){var e=typeof vn<"u"&&ni(r)||r["@@iterator"];if(!e){if(le(r)||(e=qve(r))||i&&r&&typeof r.length=="number"){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
97
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function qve(r,i){var e;if(r){if(typeof r=="string")return o1(r,i);var t=tt(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return ri(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o1(r,i)}}function o1(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}function Yve(r,i){var e=new En;return de(r).call(r,function(t){var n;de(n=t.edges).call(n,function(a){a.connected&&e.add(a)})}),de(e).call(e,function(t){var n=t.from.id,a=t.to.id;i[n]==null&&(i[n]=0),(i[a]==null||i[n]>=i[a])&&(i[a]=i[n]+1)}),i}function Xve(r){return pT(function(i){var e,t;return vT(e=Ot(t=i.edges).call(t,function(n){return r.has(n.toId)})).call(e,function(n){return n.to===i})},function(i,e){return e>i},"from",r)}function Qve(r){return pT(function(i){var e,t;return vT(e=Ot(t=i.edges).call(t,function(n){return r.has(n.toId)})).call(e,function(n){return n.from===i})},function(i,e){return e<i},"to",r)}function pT(r,i,e,t){var n,a=Dn(null),o=dT(n=dr(VO(t).call(t))).call(n,function(f,v){return f+1+v.edges.length},0),s=e+"Id",l=e==="to"?1:-1,u=Kve(t),h;try{var d=function(){var v=Se(h.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 R,M;if(!t.has(p))return 0;var A=a[w.id]+l;if(de(R=Ot(M=w.edges).call(M,function(N){return N.connected&&N.to!==N.from&&N[e]!==w&&t.has(N.toId)&&t.has(N.fromId)})).call(R,function(N){var F=N[s],W=a[F];(W==null||i(A,W))&&(a[F]=A,y.push(N[e]))}),m>o)return{v:{v:Yve(t,a)}};++m},_;w=y.pop();)if(_=b(),_!==0&&_)return _.v},c;for(u.s();!(h=u.n()).done;)if(c=d(),c!==0&&c)return c.v}catch(f){u.e(f)}finally{u.f()}return a}var Jve=function(){function r(){C(this,r),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return x(r,[{key:"addRelation",value:function(e,t){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(t),this.parentReference[t]===void 0&&(this.parentReference[t]=[]),this.parentReference[t].push(e)}},{key:"checkIfTree",value:function(){for(var e in this.parentReference)if(this.parentReference[e].length>1){this.isTree=!1;return}this.isTree=!0}},{key:"numTrees",value:function(){return this.treeIndex+1}},{key:"setTreeIndex",value:function(e,t){t!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=t,this.treeIndex=Math.max(t,this.treeIndex))}},{key:"ensureLevel",value:function(e){this.levels[e]===void 0&&(this.levels[e]=0)}},{key:"getMaxLevel",value:function(e){var t=this,n={},a=function o(s){if(n[s]!==void 0)return n[s];var l=t.levels[s];if(t.childrenReference[s]){var u=t.childrenReference[s];if(u.length>0)for(var h=0;h<u.length;h++)l=Math.max(l,o(u[h]))}return n[s]=l,l};return a(e)}},{key:"levelDownstream",value:function(e,t){this.levels[t.id]===void 0&&(this.levels[e.id]===void 0&&(this.levels[e.id]=0),this.levels[t.id]=this.levels[e.id]+1)}},{key:"setMinLevelToZero",value:function(e){var t=1e9;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.levels[n]!==void 0&&(t=Math.min(this.levels[n],t));for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&this.levels[a]!==void 0&&(this.levels[a]-=t)}},{key:"getTreeSize",value:function(e,t){var n=1e9,a=-1e9,o=1e9,s=-1e9;for(var l in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,l)&&this.trees[l]===t){var u=e[l];n=Math.min(u.x,n),a=Math.max(u.x,a),o=Math.min(u.y,o),s=Math.max(u.y,s)}return{min_x:n,max_x:a,min_y:o,max_y:s}}},{key:"hasSameParent",value:function(e,t){var n=this.parentReference[e.id],a=this.parentReference[t.id];if(n===void 0||a===void 0)return!1;for(var o=0;o<n.length;o++)for(var s=0;s<a.length;s++)if(n[o]==a[s])return!0;return!1}},{key:"inSameSubNetwork",value:function(e,t){return this.trees[e.id]===this.trees[t.id]}},{key:"getLevels",value:function(){return _e(this.distributionOrdering)}},{key:"addToOrdering",value:function(e,t){this.distributionOrdering[t]===void 0&&(this.distributionOrdering[t]=[]);var n=!1,a=this.distributionOrdering[t];for(var o in a)if(a[o]===e){n=!0;break}n||(this.distributionOrdering[t].push(e),this.distributionIndex[e.id]=this.distributionOrdering[t].length-1)}}]),r}(),Zve=function(){function r(i){C(this,r),this.body=i,this._resetRNG(Math.random()+":"+El()),this.setPhysics=!1,this.options={},this.optionsBackup={physics:{}},this.defaultOptions={randomSeed:void 0,improvedLayout:!0,clusterThreshold:150,hierarchical:{enabled:!1,levelSeparation:150,nodeSpacing:100,treeSpacing:200,blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:"UD",sortMethod:"hubsize"}},Fe(this.options,this.defaultOptions),this.bindEventListeners()}return x(r,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.on("_dataChanged",function(){e.setupHierarchicalLayout()}),this.body.emitter.on("_dataLoaded",function(){e.layoutNetwork()}),this.body.emitter.on("_resetHierarchicalLayout",function(){e.setupHierarchicalLayout()}),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",function(){if(e.options.hierarchical.enabled===!0){var t=e.direction.curveType();e.body.emitter.emit("_forceDisableDynamicCurves",t,!1)}})}},{key:"setOptions",value:function(e,t){if(e!==void 0){var n=this.options.hierarchical,a=n.enabled;if(_a(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),Vt(this.options,e,"hierarchical"),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),n.enabled===!0)return a===!0&&this.body.emitter.emit("refresh",!0),n.direction==="RL"||n.direction==="DU"?n.levelSeparation>0&&(n.levelSeparation*=-1):n.levelSeparation<0&&(n.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(a===!0)return this.body.emitter.emit("refresh"),fe(t,this.optionsBackup)}return t}},{key:"_resetRNG",value:function(e){this.initialRandomSeed=e,this._rng=xu(this.initialRandomSeed)}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(e){if(this.options.hierarchical.enabled===!0){var t=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:t.enabled===void 0?!0:t.enabled,solver:"hierarchicalRepulsion"},t.enabled=t.enabled===void 0?!0:t.enabled,t.solver=t.solver||"barnesHut"):he(e.physics)==="object"?(t.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,t.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(t.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});var n=this.direction.curveType();if(e.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1};else if(e.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1;else if(typeof e.edges.smooth=="boolean")this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:n};else{var a=e.edges.smooth;a.type!==void 0&&a.type!=="dynamic"&&(n=a.type),this.optionsBackup.edges={smooth:{enabled:a.enabled===void 0?!0:a.enabled,type:a.type===void 0?"dynamic":a.type,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}},e.edges.smooth={enabled:a.enabled===void 0?!0:a.enabled,type:n,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",n)}return e}},{key:"positionInitially",value:function(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);for(var t=e.length+50,n=0;n<e.length;n++){var a=e[n],o=2*Math.PI*this._rng();a.x===void 0&&(a.x=t*Math.cos(o)),a.y===void 0&&(a.y=t*Math.sin(o))}}}},{key:"layoutNetwork",value:function(){if(this.options.hierarchical.enabled!==!0&&this.options.improvedLayout===!0){for(var e=this.body.nodeIndices,t=0,n=0;n<e.length;n++){var a=this.body.nodes[e[n]];a.predefinedPosition===!0&&(t+=1)}if(t<.5*e.length){var o=10,s=0,l=this.options.clusterThreshold,u={clusterNodeProperties:{shape:"ellipse",label:"",group:"",font:{multi:!1}},clusterEdgeProperties:{label:"",font:{multi:!1},smooth:{enabled:!1}}};if(e.length>l){for(var h=e.length;e.length>l&&s<=o;){s+=1;var d=e.length;s%3===0?this.body.modules.clustering.clusterBridges(u):this.body.modules.clustering.clusterOutliers(u);var c=e.length;if(d==c&&s%3!==0){this._declusterAll(),this.body.emitter.emit("_layoutFailed"),console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.");return}}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*h)})}s>o&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(e,this.body.edgeIndices,!0),this._shiftToCenter();for(var f=70,v=0;v<e.length;v++){var p=this.body.nodes[e[v]];p.predefinedPosition===!1&&(p.x+=(.5-this._rng())*f,p.y+=(.5-this._rng())*f)}this._declusterAll(),this.body.emitter.emit("_repositionBezierNodes")}}}},{key:"_shiftToCenter",value:function(){for(var e=vt.getRangeCore(this.body.nodes,this.body.nodeIndices),t=vt.findCenter(e),n=0;n<this.body.nodeIndices.length;n++){var a=this.body.nodes[this.body.nodeIndices[n]];a.x-=t.x,a.y-=t.y}}},{key:"_declusterAll",value:function(){for(var e=!0;e===!0;){e=!1;for(var t=0;t<this.body.nodeIndices.length;t++)this.body.nodes[this.body.nodeIndices[t]].isCluster===!0&&(e=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[t],{},!1));e===!0&&this.body.emitter.emit("_dataChanged")}}},{key:"getSeed",value:function(){return this.initialRandomSeed}},{key:"setupHierarchicalLayout",value:function(){if(this.options.hierarchical.enabled===!0&&this.body.nodeIndices.length>0){var e,t,n=!1,a=!1;this.lastNodeOnLevel={},this.hierarchical=new Jve;for(t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&(e=this.body.nodes[t],e.options.level!==void 0?(n=!0,this.hierarchical.levels[t]=e.options.level):a=!0);if(a===!0&&n===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");if(a===!0){var o=this.options.hierarchical.sortMethod;o==="hubsize"?this._determineLevelsByHubsize():o==="directed"?this._determineLevelsDirected():o==="custom"&&this._determineLevelsCustomCallback()}for(var s in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,s)&&this.hierarchical.ensureLevel(s);var l=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(l),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var e=this,t=!1,n={},a=function(){for(var w=s(),b=0,_=0;_<w.length-1;_++){var E=w[_].max-w[_+1].min;b+=E+e.options.hierarchical.treeSpacing,o(_+1,b)}},o=function(w,b){var _=e.hierarchical.trees;for(var E in _)Object.prototype.hasOwnProperty.call(_,E)&&_[E]===w&&e.direction.shift(E,b)},s=function(){for(var w=[],b=0;b<e.hierarchical.numTrees();b++)w.push(e.direction.getTreeSize(b));return w},l=function m(w,b){if(!b[w.id]&&(b[w.id]=!0,e.hierarchical.childrenReference[w.id])){var _=e.hierarchical.childrenReference[w.id];if(_.length>0)for(var E=0;E<_.length;E++)m(e.body.nodes[_[E]],b)}},u=function(w){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,_=1e9,E=1e9,R=1e9,M=-1e9;for(var A in w)if(Object.prototype.hasOwnProperty.call(w,A)){var N=e.body.nodes[A],F=e.hierarchical.levels[N.id],W=e.direction.getPosition(N),Y=e._getSpaceAroundNode(N,w),be=Se(Y,2),Je=be[0],De=be[1];_=Math.min(Je,_),E=Math.min(De,E),F<=b&&(R=Math.min(W,R),M=Math.max(W,M))}return[R,M,_,E]},h=function(w,b){var _=e.hierarchical.getMaxLevel(w.id),E=e.hierarchical.getMaxLevel(b.id);return Math.min(_,E)},d=function(w,b,_){for(var E=e.hierarchical,R=0;R<b.length;R++){var M=b[R],A=E.distributionOrdering[M];if(A.length>1)for(var N=0;N<A.length-1;N++){var F=A[N],W=A[N+1];E.hasSameParent(F,W)&&E.inSameSubNetwork(F,W)&&w(F,W,_)}}},c=function(w,b){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,E=e.direction.getPosition(w),R=e.direction.getPosition(b),M=Math.abs(R-E),A=e.options.hierarchical.nodeSpacing;if(M>A){var N={},F={};l(w,N),l(b,F);var W=h(w,b),Y=u(N,W),be=u(F,W),Je=Y[1],De=be[0],At=be[2],ht=Math.abs(Je-De);if(ht>A){var nt=Je-De+A;nt<-At+A&&(nt=-At+A),nt<0&&(e._shiftBlock(b.id,nt),t=!0,_===!0&&e._centerParent(b))}}},f=function(w,b){for(var _=b.id,E=b.edges,R=e.hierarchical.levels[b.id],M=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,A={},N=[],F=0;F<E.length;F++){var W=E[F];if(W.toId!=W.fromId){var Y=W.toId==_?W.from:W.to;A[E[F].id]=Y,e.hierarchical.levels[Y.id]<R&&N.push(W)}}var be=function(it,pe){for(var Me=0,Ce=0;Ce<pe.length;Ce++)if(A[pe[Ce].id]!==void 0){var at=e.direction.getPosition(A[pe[Ce].id])-it;Me+=at/Math.sqrt(at*at+M)}return Me},Je=function(it,pe){for(var Me=0,Ce=0;Ce<pe.length;Ce++)if(A[pe[Ce].id]!==void 0){var at=e.direction.getPosition(A[pe[Ce].id])-it;Me-=M*Math.pow(at*at+M,-1.5)}return Me},De=function(it,pe){for(var Me=e.direction.getPosition(b),Ce={},at=0;at<it;at++){var _r=be(Me,pe),Dt=Je(Me,pe),ot=40,D=Math.max(-ot,Math.min(ot,Math.round(_r/Dt)));if(Me=Me-D,Ce[Me]!==void 0)break;Ce[Me]=at}return Me},At=function(it){var pe=e.direction.getPosition(b);if(n[b.id]===void 0){var Me={};l(b,Me),n[b.id]=Me}var Ce=u(n[b.id]),at=Ce[2],_r=Ce[3],Dt=it-pe,ot=0;Dt>0?ot=Math.min(Dt,_r-e.options.hierarchical.nodeSpacing):Dt<0&&(ot=-Math.min(-Dt,at-e.options.hierarchical.nodeSpacing)),ot!=0&&(e._shiftBlock(b.id,ot),t=!0)},ht=function(it){var pe=e.direction.getPosition(b),Me=e._getSpaceAroundNode(b),Ce=Se(Me,2),at=Ce[0],_r=Ce[1],Dt=it-pe,ot=pe;Dt>0?ot=Math.min(pe+(_r-e.options.hierarchical.nodeSpacing),it):Dt<0&&(ot=Math.max(pe-(at-e.options.hierarchical.nodeSpacing),it)),ot!==pe&&(e.direction.setPosition(b,ot),t=!0)},nt=De(w,N);At(nt),nt=De(w,E),ht(nt)},v=function(w){var b=e.hierarchical.getLevels();b=Rn(b).call(b);for(var _=0;_<w;_++){t=!1;for(var E=0;E<b.length;E++)for(var R=b[E],M=e.hierarchical.distributionOrdering[R],A=0;A<M.length;A++)f(1e3,M[A]);if(t!==!0)break}},p=function(w){var b=e.hierarchical.getLevels();b=Rn(b).call(b);for(var _=0;_<w&&(t=!1,d(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=Rn(w).call(w);for(var b=0;b<w.length;b++)for(var _=w[b],E=e.hierarchical.distributionOrdering[_],R=0;R<E.length;R++)e._centerParent(E[R])};this.options.hierarchical.blockShifting===!0&&(p(5),g()),this.options.hierarchical.edgeMinimization===!0&&v(20),this.options.hierarchical.parentCentralization===!0&&y(),a()}},{key:"_getSpaceAroundNode",value:function(e,t){var n=!0;t===void 0&&(n=!1);var a=this.hierarchical.levels[e.id];if(a!==void 0){var o=this.hierarchical.distributionIndex[e.id],s=this.direction.getPosition(e),l=this.hierarchical.distributionOrdering[a],u=1e9,h=1e9;if(o!==0){var d=l[o-1];if(n===!0&&t[d.id]===void 0||n===!1){var c=this.direction.getPosition(d);u=s-c}}if(o!=l.length-1){var f=l[o+1];if(n===!0&&t[f.id]===void 0||n===!1){var v=this.direction.getPosition(f);h=Math.min(h,v-s)}}return[u,h]}else return[0,0]}},{key:"_centerParent",value:function(e){if(this.hierarchical.parentReference[e.id])for(var t=this.hierarchical.parentReference[e.id],n=0;n<t.length;n++){var a=t[n],o=this.body.nodes[a],s=this.hierarchical.childrenReference[a];if(s!==void 0){var l=this._getCenterPosition(s),u=this.direction.getPosition(o),h=this._getSpaceAroundNode(o),d=Se(h,2),c=d[0],f=d[1],v=u-l;(v<0&&Math.abs(v)<f-this.options.hierarchical.nodeSpacing||v>0&&Math.abs(v)<c-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(o,l)}}}},{key:"_placeNodesByHierarchy",value:function(e){this.positionedNodes={};for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var n,a=_e(e[t]);a=this._indexArrayToNodes(a),Va(n=this.direction).call(n,a);for(var o=0,s=0;s<a.length;s++){var l=a[s];if(this.positionedNodes[l.id]===void 0){var u=this.options.hierarchical.nodeSpacing,h=u*o;o>0&&(h=this.direction.getPosition(a[s-1])+u),this.direction.setPosition(l,h,t),this._validatePositionAndContinue(l,t,h),o++}}}}},{key:"_placeBranchNodes",value:function(e,t){var n,a=this.hierarchical.childrenReference[e];if(a!==void 0){for(var o=[],s=0;s<a.length;s++)o.push(this.body.nodes[a[s]]);Va(n=this.direction).call(n,o);for(var l=0;l<o.length;l++){var u=o[l],h=this.hierarchical.levels[u.id];if(h>t&&this.positionedNodes[u.id]===void 0){var d=this.options.hierarchical.nodeSpacing,c=void 0;l===0?c=this.direction.getPosition(this.body.nodes[e]):c=this.direction.getPosition(o[l-1])+d,this.direction.setPosition(u,c,h),this._validatePositionAndContinue(u,h,c)}else return}var f=this._getCenterPosition(o);this.direction.setPosition(this.body.nodes[e],f,t)}}},{key:"_validatePositionAndContinue",value:function(e,t,n){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[t]!==void 0){var a=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(n-a<this.options.hierarchical.nodeSpacing){var o=a+this.options.hierarchical.nodeSpacing-n,s=this._findCommonParent(this.lastNodeOnLevel[t],e.id);this._shiftBlock(s.withChild,o)}}this.lastNodeOnLevel[t]=e.id,this.positionedNodes[e.id]=!0,this._placeBranchNodes(e.id,t)}}},{key:"_indexArrayToNodes",value:function(e){for(var t=[],n=0;n<e.length;n++)t.push(this.body.nodes[e[n]]);return t}},{key:"_getDistribution",value:function(){var e={},t,n;for(t in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,t)){n=this.body.nodes[t];var a=this.hierarchical.levels[t]===void 0?0:this.hierarchical.levels[t];this.direction.fix(n,a),e[a]===void 0&&(e[a]={}),e[a][t]=n}return e}},{key:"_getActiveEdges",value:function(e){var t=this,n=[];return te(e.edges,function(a){var o;re(o=t.body.edgeIndices).call(o,a.id)!==-1&&n.push(a)}),n}},{key:"_getHubSizes",value:function(){var e=this,t={},n=this.body.nodeIndices;te(n,function(o){var s=e.body.nodes[o],l=e._getActiveEdges(s).length;t[l]=!0});var a=[];return te(t,function(o){a.push(Number(o))}),Va(a).call(a,function(o,s){return s-o}),a}},{key:"_determineLevelsByHubsize",value:function(){for(var e=this,t=function(l,u){e.hierarchical.levelDownstream(l,u)},n=this._getHubSizes(),a=function(){var l=n[o];if(l===0)return 1;te(e.body.nodeIndices,function(u){var h=e.body.nodes[u];l===e._getActiveEdges(h).length&&e._crawlNetwork(t,u)})},o=0;o<n.length&&!a();++o);}},{key:"_determineLevelsCustomCallback",value:function(){var e=this,t=1e5,n=function(s,l,u){},a=function(s,l,u){var h=e.hierarchical.levels[s.id];h===void 0&&(h=e.hierarchical.levels[s.id]=t);var d=n(vt.cloneOptions(s,"node"),vt.cloneOptions(l,"node"),vt.cloneOptions(u,"edge"));e.hierarchical.levels[l.id]=h+d};this._crawlNetwork(a),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_determineLevelsDirected",value:function(){var e,t=this,n=dT(e=this.body.nodeIndices).call(e,function(a,o){return a.set(o,t.body.nodes[o]),a},new RO);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=Qve(n):this.hierarchical.levels=Xve(n),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_generateMap",value:function(){var e=this,t=function(a,o){e.hierarchical.levels[o.id]>e.hierarchical.levels[a.id]&&e.hierarchical.addRelation(a.id,o.id)};this._crawlNetwork(t),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},n=arguments.length>1?arguments[1]:void 0,a={},o=function 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(n===void 0)for(var s=0,l=0;l<this.body.nodeIndices.length;l++){var u=this.body.nodeIndices[l];if(a[u]===void 0){var h=this.body.nodes[u];o(h,s),s+=1}}else{var d=this.body.nodes[n];if(d===void 0){console.error("Node not found:",n);return}o(d)}}},{key:"_shiftBlock",value:function(e,t){var n=this,a={},o=function s(l){if(!a[l]){a[l]=!0,n.direction.shift(l,t);var u=n.hierarchical.childrenReference[l];if(u!==void 0)for(var h=0;h<u.length;h++)s(u[h])}};o(e)}},{key:"_findCommonParent",value:function(e,t){var n=this,a={},o=function l(u,h){var d=n.hierarchical.parentReference[h];if(d!==void 0)for(var c=0;c<d.length;c++){var f=d[c];u[f]=!0,l(u,f)}},s=function l(u,h){var d=n.hierarchical.parentReference[h];if(d!==void 0)for(var c=0;c<d.length;c++){var f=d[c];if(u[f]!==void 0)return{foundParent:f,withChild:h};var v=l(u,f);if(v.foundParent!==null)return v}return{foundParent:null,withChild:h}};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 Rve(this):this.direction=new Dve(this)}},{key:"_getCenterPosition",value:function(e){for(var t=1e9,n=-1e9,a=0;a<e.length;a++){var o=void 0;if(e[a].id!==void 0)o=e[a];else{var s=e[a];o=this.body.nodes[s]}var l=this.direction.getPosition(o);t=Math.min(t,l),n=Math.max(n,l)}return .5*(t+n)}}]),r}();function epe(r,i){var e=typeof vn<"u"&&ni(r)||r["@@iterator"];if(!e){if(le(r)||(e=tpe(r))||i&&r&&typeof r.length=="number"){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
98
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function tpe(r,i){var e;if(r){if(typeof r=="string")return s1(r,i);var t=tt(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return ri(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s1(r,i)}}function s1(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}var rpe=function(){function r(i,e,t,n){var a=this,o,s;C(this,r),this.body=i,this.canvas=e,this.selectionHandler=t,this.interactionHandler=n,this.editMode=!1,this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0,this._domEventListenerCleanupQueue=[],this.temporaryUIFunctions={},this.temporaryEventFunctions=[],this.touchTime=0,this.temporaryIds={nodes:[],edges:[]},this.guiEnabled=!1,this.inMode=!1,this.selectedControlNode=void 0,this.options={},this.defaultOptions={enabled:!1,initiallyActive:!1,addNode:!0,addEdge:!0,editNode:void 0,editEdge:!0,deleteNode:!0,deleteEdge:!0,controlNodeStyle:{shape:"dot",size:6,color:{background:"#ff0000",border:"#3c3c3c",highlight:{background:"#07f968",border:"#3c3c3c"}},borderWidth:2,borderWidthSelected:2}},Fe(this.options,this.defaultOptions),this.body.emitter.on("destroy",function(){a._clean()}),this.body.emitter.on("_dataChanged",T(o=this._restore).call(o,this)),this.body.emitter.on("_resetData",T(s=this._restore).call(s,this))}return x(r,[{key:"_restore",value:function(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}},{key:"setOptions",value:function(e,t,n){t!==void 0&&(t.locale!==void 0?this.options.locale=t.locale:this.options.locale=n.locale,t.locales!==void 0?this.options.locales=t.locales:this.options.locales=n.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,fe(this.options,e)),this.options.initiallyActive===!0&&(this.editMode=!0),this._setup())}},{key:"toggleEditMode",value:function(){this.editMode===!0?this.disableEditMode():this.enableEditMode()}},{key:"enableEditMode",value:function(){this.editMode=!0,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}},{key:"disableEditMode",value:function(){this.editMode=!1,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}},{key:"showManipulatorToolbar",value:function(){if(this._clean(),this.manipulationDOM={},this.guiEnabled===!0){var e,t;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";var n=this.selectionHandler.getSelectedNodeCount(),a=this.selectionHandler.getSelectedEdgeCount(),o=n+a,s=this.options.locales[this.options.locale],l=!1;this.options.addNode!==!1&&(this._createAddNodeButton(s),l=!0),this.options.addEdge!==!1&&(l===!0?this._createSeperator(1):l=!0,this._createAddEdgeButton(s)),n===1&&typeof this.options.editNode=="function"?(l===!0?this._createSeperator(2):l=!0,this._createEditNodeButton(s)):a===1&&n===0&&this.options.editEdge!==!1&&(l===!0?this._createSeperator(3):l=!0,this._createEditEdgeButton(s)),o!==0&&(n>0&&this.options.deleteNode!==!1?(l===!0&&this._createSeperator(4),this._createDeleteButton(s)):n===0&&this.options.deleteEdge!==!1&&(l===!0&&this._createSeperator(4),this._createDeleteButton(s))),this._bindElementEvents(this.closeDiv,T(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",T(t=this.showManipulatorToolbar).call(t,this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var t,n=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(n),this._createSeperator(),this._createDescription(n.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,T(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent("click",T(e=this._performAddNode).call(e,this))}},{key:"editNode",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var t=this.selectionHandler.getSelectedNodes()[0];if(t!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(t.isCluster!==!0){var n=fe({},t.options,!1);if(n.x=t.x,n.y=t.y,this.options.editNode.length===2)this.options.editNode(n,function(a){a!=null&&e.inMode==="editNode"&&e.body.data.nodes.getDataSet().update(a),e.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){var e,t,n,a,o;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var s,l=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(l),this._createSeperator(),this._createDescription(l.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,T(s=this.toggleEditMode).call(s,this))}this._temporaryBindUI("onTouch",T(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",T(t=this._finishConnect).call(t,this)),this._temporaryBindUI("onDrag",T(n=this._dragControlNode).call(n,this)),this._temporaryBindUI("onRelease",T(a=this._finishConnect).call(a,this)),this._temporaryBindUI("onDragStart",T(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",he(this.options.editEdge)==="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){var e=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(e.from.id,e.to.id);return}if(this.guiEnabled===!0){var t,n=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(n),this._createSeperator(),this._createDescription(n.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,T(t=this.toggleEditMode).call(t,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var a,o,s,l,u=this.body.edges[this.edgeBeingEditedId],h=this._getNewTargetNode(u.from.x,u.from.y),d=this._getNewTargetNode(u.to.x,u.to.y);this.temporaryIds.nodes.push(h.id),this.temporaryIds.nodes.push(d.id),this.body.nodes[h.id]=h,this.body.nodeIndices.push(h.id),this.body.nodes[d.id]=d,this.body.nodeIndices.push(d.id),this._temporaryBindUI("onTouch",T(a=this._controlNodeTouch).call(a,this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",T(o=this._controlNodeDragStart).call(o,this)),this._temporaryBindUI("onDrag",T(s=this._controlNodeDrag).call(s,this)),this._temporaryBindUI("onDragEnd",T(l=this._controlNodeDragEnd).call(l,this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(c){var f=u.edgeType.findBorderPositions(c);h.selected===!1&&(h.x=f.from.x,h.y=f.from.y),d.selected===!1&&(d.x=f.to.x,d.y=f.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";var t=this.selectionHandler.getSelectedNodeIds(),n=this.selectionHandler.getSelectedEdgeIds(),a=void 0;if(t.length>0){for(var o=0;o<t.length;o++)if(this.body.nodes[t[o]].isCluster===!0){alert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);return}typeof this.options.deleteNode=="function"&&(a=this.options.deleteNode)}else n.length>0&&typeof this.options.deleteEdge=="function"&&(a=this.options.deleteEdge);if(typeof a=="function"){var s={nodes:t,edges:n};if(a.length===2)a(s,function(l){l!=null&&e.inMode==="delete"?(e.body.data.edges.getDataSet().remove(l.edges),e.body.data.nodes.getDataSet().remove(l.nodes),e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar()):(e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(n),this.body.data.nodes.getDataSet().remove(t),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){if(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0){var e,t;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(t=this.options.locales[this.options.locale])===null||t===void 0?void 0:t.close)!==null&&e!==void 0?e:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}},{key:"_getNewTargetNode",value:function(e,t){var n=fe({},this.options.controlNodeStyle);n.id="targetNode"+Ha(),n.hidden=!1,n.physics=!1,n.x=e,n.y=t;var a=this.body.functions.createNode(n);return a.shape.boundingBox={left:e,right:e,top:t,bottom:t},a}},{key:"_createEditButton",value:function(){var e;this._clean(),this.manipulationDOM={},Ur(this.editModeDiv);var t=this.options.locales[this.options.locale],n=this._createButton("editMode","vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(n),this._bindElementEvents(n,T(e=this.toggleEditMode).call(e,this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(Ur(this.editModeDiv),Ur(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanupDOMEventListeners",value:function(){var e,t=epe(kr(e=this._domEventListenerCleanupQueue).call(e,0)),n;try{for(t.s();!(n=t.n()).done;){var a=n.value;a()}}catch(o){t.e(o)}finally{t.f()}}},{key:"_removeManipulationDOM",value:function(){this._clean(),Ur(this.manipulationDiv),Ur(this.editModeDiv),Ur(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}},{key:"_createSeperator",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+e]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+e].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+e])}},{key:"_createAddNodeButton",value:function(e){var t,n=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,T(t=this.addNodeMode).call(t,this))}},{key:"_createAddEdgeButton",value:function(e){var t,n=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,T(t=this.addEdgeMode).call(t,this))}},{key:"_createEditNodeButton",value:function(e){var t,n=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,T(t=this.editNode).call(t,this))}},{key:"_createEditEdgeButton",value:function(e){var t,n=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,T(t=this.editEdgeMode).call(t,this))}},{key:"_createDeleteButton",value:function(e){var t,n;this.options.rtl?n="vis-delete-rtl":n="vis-delete";var a=this._createButton("delete",n,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(a),this._bindElementEvents(a,T(t=this.deleteSelected).call(t,this))}},{key:"_createBackButton",value:function(e){var t,n=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,T(t=this.showManipulatorToolbar).call(t,this))}},{key:"_createButton",value:function(e,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"vis-label";return this.manipulationDOM[e+"Div"]=document.createElement("button"),this.manipulationDOM[e+"Div"].className="vis-button "+t,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=a,this.manipulationDOM[e+"Label"].innerText=n,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}},{key:"_createDescription",value:function(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}},{key:"_temporaryBindEvent",value:function(e,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}},{key:"_temporaryBindUI",value:function(e,t){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+Ko(_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,n=this.temporaryEventFunctions[e].boundFunction;this.body.emitter.off(t,n)}this.temporaryEventFunctions=[]}},{key:"_bindElementEvents",value:function(e,t){var n=new Ri(e,{});xl(n,t),this._domEventListenerCleanupQueue.push(function(){n.destroy()});var a=function(s){var l=s.keyCode,u=s.key;(u==="Enter"||u===" "||l===13||l===32)&&t()};e.addEventListener("keyup",a,!1),this._domEventListenerCleanupQueue.push(function(){e.removeEventListener("keyup",a,!1)})}},{key:"_cleanupTemporaryNodesAndEdges",value:function(){for(var e=0;e<this.temporaryIds.edges.length;e++){var t;this.body.edges[this.temporaryIds.edges[e]].disconnect(),delete this.body.edges[this.temporaryIds.edges[e]];var n=re(t=this.body.edgeIndices).call(t,this.temporaryIds.edges[e]);if(n!==-1){var a;kr(a=this.body.edgeIndices).call(a,n,1)}}for(var o=0;o<this.temporaryIds.nodes.length;o++){var s;delete this.body.nodes[this.temporaryIds.nodes[o]];var l=re(s=this.body.nodeIndices).call(s,this.temporaryIds.nodes[o]);if(l!==-1){var u;kr(u=this.body.nodeIndices).call(u,l,1)}}this.temporaryIds={nodes:[],edges:[]}}},{key:"_controlNodeTouch",value:function(e){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Fe({},this.body.view.translation)}},{key:"_controlNodeDragStart",value:function(){var e=this.lastTouch,t=this.selectionHandler._pointerToPositionObject(e),n=this.body.nodes[this.temporaryIds.nodes[0]],a=this.body.nodes[this.temporaryIds.nodes[1]],o=this.body.edges[this.edgeBeingEditedId];this.selectedControlNode=void 0;var s=n.isOverlappingWith(t),l=a.isOverlappingWith(t);s===!0?(this.selectedControlNode=n,o.edgeType.from=n):l===!0&&(this.selectedControlNode=a,o.edgeType.to=a),this.selectedControlNode!==void 0&&this.selectionHandler.selectObject(this.selectedControlNode),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDrag",value:function(e){this.body.emitter.emit("disablePhysics");var t=this.body.functions.getPointer(e.center),n=this.canvas.DOMtoCanvas(t);this.selectedControlNode!==void 0?(this.selectedControlNode.x=n.x,this.selectedControlNode.y=n.y):this.interactionHandler.onDrag(e),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDragEnd",value:function(e){var t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),a=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode!==void 0){this.selectionHandler.unselectAll();for(var o=this.selectionHandler._getAllNodesOverlappingWith(n),s=void 0,l=o.length-1;l>=0;l--)if(o[l]!==this.selectedControlNode.id){s=this.body.nodes[o[l]];break}if(s!==void 0&&this.selectedControlNode!==void 0)if(s.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var u=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===u.id?this._performEditEdge(s.id,a.to.id):this._performEditEdge(a.from.id,s.id)}else a.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Fe({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;var t=this.lastTouch,n=this.selectionHandler.getNodeAt(t);if(n!==void 0)if(n.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this._getNewTargetNode(n.x,n.y);this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id);var o=this.body.functions.createEdge({id:"connectionEdge"+Ha(),from:n.id,to:a.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[o.id]=o,this.body.edgeIndices.push(o.id),this.temporaryIds.nodes.push(a.id),this.temporaryIds.edges.push(o.id)}this.touchTime=new Date().valueOf()}}},{key:"_dragControlNode",value:function(e){var t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(n),s=void 0,l=o.length-1;l>=0;l--){var u;if(re(u=this.temporaryIds.nodes).call(u,o[l])===-1){s=this.body.nodes[o[l]];break}}if(e.controlEdge={from:a,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,t),this.temporaryIds.nodes[0]!==void 0){var h=this.body.nodes[this.temporaryIds.nodes[0]];h.x=this.canvas._XconvertDOMtoCanvas(t.x),h.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}},{key:"_finishConnect",value:function(e){var t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(n),s=void 0,l=o.length-1;l>=0;l--){var u;if(re(u=this.temporaryIds.nodes).call(u,o[l])===-1){s=this.body.nodes[o[l]];break}}this._cleanupTemporaryNodesAndEdges(),s!==void 0&&(s.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[a]!==void 0&&this.body.nodes[s.id]!==void 0&&this._performAddEdge(a,s.id)),e.controlEdge={from:a,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,t),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(e){var t=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,t,void 0,!0)}},{key:"_performAddNode",value:function(e){var t=this,n={id:Ha(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(n,function(a){a!=null&&t.inMode==="addNode"&&t.body.data.nodes.getDataSet().add(a),t.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(n),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(e,t){var n=this,a={from:e,to:t};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(a,function(o){o!=null&&n.inMode==="addEdge"&&(n.body.data.edges.getDataSet().add(o),n.selectionHandler.unselectAll(),n.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(a),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(e,t){var n=this,a={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label},o=this.options.editEdge;if(he(o)==="object"&&(o=o.editWithoutDrag),typeof o=="function")if(o.length===2)o(a,function(s){s==null||n.inMode!=="editEdge"?(n.body.edges[a.id].updateEdgeType(),n.body.emitter.emit("_redraw"),n.showManipulatorToolbar()):(n.body.data.edges.getDataSet().update(s),n.selectionHandler.unselectAll(),n.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(a),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),r}(),k="string",O="boolean",$="number",Ra="array",j="object",gT="dom",npe="any",Yd=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],Xd={borderWidth:{number:$},borderWidthSelected:{number:$,undefined:"undefined"},brokenImage:{string:k,undefined:"undefined"},chosen:{label:{boolean:O,function:"function"},node:{boolean:O,function:"function"},__type__:{object:j,boolean:O}},color:{border:{string:k},background:{string:k},highlight:{border:{string:k},background:{string:k},__type__:{object:j,string:k}},hover:{border:{string:k},background:{string:k},__type__:{object:j,string:k}},__type__:{object:j,string:k}},opacity:{number:$,undefined:"undefined"},fixed:{x:{boolean:O},y:{boolean:O},__type__:{object:j,boolean:O}},font:{align:{string:k},color:{string:k},size:{number:$},face:{string:k},background:{string:k},strokeWidth:{number:$},strokeColor:{string:k},vadjust:{number:$},multi:{boolean:O,string:k},bold:{color:{string:k},size:{number:$},face:{string:k},mod:{string:k},vadjust:{number:$},__type__:{object:j,string:k}},boldital:{color:{string:k},size:{number:$},face:{string:k},mod:{string:k},vadjust:{number:$},__type__:{object:j,string:k}},ital:{color:{string:k},size:{number:$},face:{string:k},mod:{string:k},vadjust:{number:$},__type__:{object:j,string:k}},mono:{color:{string:k},size:{number:$},face:{string:k},mod:{string:k},vadjust:{number:$},__type__:{object:j,string:k}},__type__:{object:j,string:k}},group:{string:k,number:$,undefined:"undefined"},heightConstraint:{minimum:{number:$},valign:{string:k},__type__:{object:j,boolean:O,number:$}},hidden:{boolean:O},icon:{face:{string:k},code:{string:k},size:{number:$},color:{string:k},weight:{string:k,number:$},__type__:{object:j}},id:{string:k,number:$},image:{selected:{string:k,undefined:"undefined"},unselected:{string:k,undefined:"undefined"},__type__:{object:j,string:k}},imagePadding:{top:{number:$},right:{number:$},bottom:{number:$},left:{number:$},__type__:{object:j,number:$}},label:{string:k,undefined:"undefined"},labelHighlightBold:{boolean:O},level:{number:$,undefined:"undefined"},margin:{top:{number:$},right:{number:$},bottom:{number:$},left:{number:$},__type__:{object:j,number:$}},mass:{number:$},physics:{boolean:O},scaling:{min:{number:$},max:{number:$},label:{enabled:{boolean:O},min:{number:$},max:{number:$},maxVisible:{number:$},drawThreshold:{number:$},__type__:{object:j,boolean:O}},customScalingFunction:{function:"function"},__type__:{object:j}},shadow:{enabled:{boolean:O},color:{string:k},size:{number:$},x:{number:$},y:{number:$},__type__:{object:j,boolean:O}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:O,array:Ra},borderRadius:{number:$},interpolation:{boolean:O},useImageSize:{boolean:O},useBorderWithImage:{boolean:O},coordinateOrigin:{string:["center","top-left"]},__type__:{object:j}},size:{number:$},title:{string:k,dom:gT,undefined:"undefined"},value:{number:$,undefined:"undefined"},widthConstraint:{minimum:{number:$},maximum:{number:$},__type__:{object:j,boolean:O,number:$}},x:{number:$},y:{number:$},__type__:{object:j}},ipe={configure:{enabled:{boolean:O},filter:{boolean:O,string:k,array:Ra,function:"function"},container:{dom:gT},showButton:{boolean:O},__type__:{object:j,boolean:O,string:k,array:Ra,function:"function"}},edges:{arrows:{to:{enabled:{boolean:O},scaleFactor:{number:$},type:{string:Yd},imageHeight:{number:$},imageWidth:{number:$},src:{string:k},__type__:{object:j,boolean:O}},middle:{enabled:{boolean:O},scaleFactor:{number:$},type:{string:Yd},imageWidth:{number:$},imageHeight:{number:$},src:{string:k},__type__:{object:j,boolean:O}},from:{enabled:{boolean:O},scaleFactor:{number:$},type:{string:Yd},imageWidth:{number:$},imageHeight:{number:$},src:{string:k},__type__:{object:j,boolean:O}},__type__:{string:["from","to","middle"],object:j}},endPointOffset:{from:{number:$},to:{number:$},__type__:{object:j,number:$}},arrowStrikethrough:{boolean:O},background:{enabled:{boolean:O},color:{string:k},size:{number:$},dashes:{boolean:O,array:Ra},__type__:{object:j,boolean:O}},chosen:{label:{boolean:O,function:"function"},edge:{boolean:O,function:"function"},__type__:{object:j,boolean:O}},color:{color:{string:k},highlight:{string:k},hover:{string:k},inherit:{string:["from","to","both"],boolean:O},opacity:{number:$},__type__:{object:j,string:k}},dashes:{boolean:O,array:Ra},font:{color:{string:k},size:{number:$},face:{string:k},background:{string:k},strokeWidth:{number:$},strokeColor:{string:k},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:$},multi:{boolean:O,string:k},bold:{color:{string:k},size:{number:$},face:{string:k},mod:{string:k},vadjust:{number:$},__type__:{object:j,string:k}},boldital:{color:{string:k},size:{number:$},face:{string:k},mod:{string:k},vadjust:{number:$},__type__:{object:j,string:k}},ital:{color:{string:k},size:{number:$},face:{string:k},mod:{string:k},vadjust:{number:$},__type__:{object:j,string:k}},mono:{color:{string:k},size:{number:$},face:{string:k},mod:{string:k},vadjust:{number:$},__type__:{object:j,string:k}},__type__:{object:j,string:k}},hidden:{boolean:O},hoverWidth:{function:"function",number:$},label:{string:k,undefined:"undefined"},labelHighlightBold:{boolean:O},length:{number:$,undefined:"undefined"},physics:{boolean:O},scaling:{min:{number:$},max:{number:$},label:{enabled:{boolean:O},min:{number:$},max:{number:$},maxVisible:{number:$},drawThreshold:{number:$},__type__:{object:j,boolean:O}},customScalingFunction:{function:"function"},__type__:{object:j}},selectionWidth:{function:"function",number:$},selfReferenceSize:{number:$},selfReference:{size:{number:$},angle:{number:$},renderBehindTheNode:{boolean:O},__type__:{object:j}},shadow:{enabled:{boolean:O},color:{string:k},size:{number:$},x:{number:$},y:{number:$},__type__:{object:j,boolean:O}},smooth:{enabled:{boolean:O},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:$},forceDirection:{string:["horizontal","vertical","none"],boolean:O},__type__:{object:j,boolean:O}},title:{string:k,undefined:"undefined"},width:{number:$},widthConstraint:{maximum:{number:$},__type__:{object:j,boolean:O,number:$}},value:{number:$,undefined:"undefined"},__type__:{object:j}},groups:{useDefaultGroups:{boolean:O},__any__:Xd,__type__:{object:j}},interaction:{dragNodes:{boolean:O},dragView:{boolean:O},hideEdgesOnDrag:{boolean:O},hideEdgesOnZoom:{boolean:O},hideNodesOnDrag:{boolean:O},hover:{boolean:O},keyboard:{enabled:{boolean:O},speed:{x:{number:$},y:{number:$},zoom:{number:$},__type__:{object:j}},bindToWindow:{boolean:O},autoFocus:{boolean:O},__type__:{object:j,boolean:O}},multiselect:{boolean:O},navigationButtons:{boolean:O},selectable:{boolean:O},selectConnectedEdges:{boolean:O},hoverConnectedEdges:{boolean:O},tooltipDelay:{number:$},zoomView:{boolean:O},zoomSpeed:{number:$},__type__:{object:j}},layout:{randomSeed:{undefined:"undefined",number:$,string:k},improvedLayout:{boolean:O},clusterThreshold:{number:$},hierarchical:{enabled:{boolean:O},levelSeparation:{number:$},nodeSpacing:{number:$},treeSpacing:{number:$},blockShifting:{boolean:O},edgeMinimization:{boolean:O},parentCentralization:{boolean:O},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:j,boolean:O}},__type__:{object:j}},manipulation:{enabled:{boolean:O},initiallyActive:{boolean:O},addNode:{boolean:O,function:"function"},addEdge:{boolean:O,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:j,boolean:O,function:"function"}},deleteNode:{boolean:O,function:"function"},deleteEdge:{boolean:O,function:"function"},controlNodeStyle:Xd,__type__:{object:j,boolean:O}},nodes:Xd,physics:{enabled:{boolean:O},barnesHut:{theta:{number:$},gravitationalConstant:{number:$},centralGravity:{number:$},springLength:{number:$},springConstant:{number:$},damping:{number:$},avoidOverlap:{number:$},__type__:{object:j}},forceAtlas2Based:{theta:{number:$},gravitationalConstant:{number:$},centralGravity:{number:$},springLength:{number:$},springConstant:{number:$},damping:{number:$},avoidOverlap:{number:$},__type__:{object:j}},repulsion:{centralGravity:{number:$},springLength:{number:$},springConstant:{number:$},nodeDistance:{number:$},damping:{number:$},__type__:{object:j}},hierarchicalRepulsion:{centralGravity:{number:$},springLength:{number:$},springConstant:{number:$},nodeDistance:{number:$},damping:{number:$},avoidOverlap:{number:$},__type__:{object:j}},maxVelocity:{number:$},minVelocity:{number:$},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:O},iterations:{number:$},updateInterval:{number:$},onlyDynamicEdges:{boolean:O},fit:{boolean:O},__type__:{object:j,boolean:O}},timestep:{number:$},adaptiveTimestep:{boolean:O},wind:{x:{number:$},y:{number:$},__type__:{object:j}},__type__:{object:j,boolean:O}},autoResize:{boolean:O},clickToUse:{boolean:O},locale:{string:k},locales:{__any__:{any:npe},__type__:{object:j}},height:{string:k},width:{string:k},__type__:{object:j}},yT={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},opacity:[0,0,1,.1],fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},endPointOffset:{from:[0,-10,10,1],to:[0,-10,10,1]},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],selfReference:{size:[20,0,200,1],angle:[Math.PI/2,-6*Math.PI,6*Math.PI,Math.PI/8],renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"],shakeTowards:["leaves","roots"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0,autoFocus:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:[1,.1,2,.1]},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{theta:[.5,.1,1,.05],gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{theta:[.5,.1,1,.05],gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01],wind:{x:[0,-10,10,.1],y:[0,-10,10,.1]}}},ape=function(i,e,t){var n;return!!(tn(i).call(i,"physics")&&tn(n=yT.physics.solver).call(n,e)&&t.physics.solver!==e&&e!=="wind")},ope=function(){function r(){C(this,r)}return x(r,[{key:"getDistances",value:function(e,t,n){for(var a={},o=e.edges,s=0;s<t.length;s++){var l=t[s],u={};a[l]=u;for(var h=0;h<t.length;h++)u[t[h]]=s==h?0:1e9}for(var d=0;d<n.length;d++){var c=o[n[d]];c.connected===!0&&a[c.fromId]!==void 0&&a[c.toId]!==void 0&&(a[c.fromId][c.toId]=1,a[c.toId][c.fromId]=1)}for(var f=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],E=a[_],R=Math.min(w[_],w[p]+g[_]);w[_]=R,E[m]=R}return a}}]),r}(),spe=function(){function r(i,e,t){C(this,r),this.body=i,this.springLength=e,this.springConstant=t,this.distanceSolver=new ope}return x(r,[{key:"setOptions",value:function(e){e&&(e.springLength&&(this.springLength=e.springLength),e.springConstant&&(this.springConstant=e.springConstant))}},{key:"solve",value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(a),this._createK_matrix(a),this._createE_matrix();for(var o=.01,s=1,l=0,u=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),h=5,d=1e9,c=0,f=0,v=0,p=0,g=0;d>o&&l<u;){l+=1;var y=this._getHighestEnergyNode(n),m=Se(y,4);for(c=m[0],d=m[1],f=m[2],v=m[3],p=d,g=0;p>s&&g<h;){g+=1,this._moveNode(c,f,v);var w=this._getEnergy(c),b=Se(w,3);p=b[0],f=b[1],v=b[2]}}}},{key:"_getHighestEnergyNode",value:function(e){for(var t=this.body.nodeIndices,n=this.body.nodes,a=0,o=t[0],s=0,l=0,u=0;u<t.length;u++){var h=t[u];if(n[h].predefinedPosition!==!0||n[h].isCluster===!0&&e===!0||n[h].options.fixed.x!==!0||n[h].options.fixed.y!==!0){var d=this._getEnergy(h),c=Se(d,3),f=c[0],v=c[1],p=c[2];a<f&&(a=f,o=h,s=v,l=p)}}return[o,a,s,l]}},{key:"_getEnergy",value:function(e){var t=Se(this.E_sums[e],2),n=t[0],a=t[1],o=Math.sqrt(Math.pow(n,2)+Math.pow(a,2));return[o,n,a]}},{key:"_moveNode",value:function(e,t,n){for(var a=this.body.nodeIndices,o=this.body.nodes,s=0,l=0,u=0,h=o[e].x,d=o[e].y,c=this.K_matrix[e],f=this.L_matrix[e],v=0;v<a.length;v++){var p=a[v];if(p!==e){var g=o[p].x,y=o[p].y,m=c[p],w=f[p],b=1/Math.pow(Math.pow(h-g,2)+Math.pow(d-y,2),1.5);s+=m*(1-w*Math.pow(d-y,2)*b),l+=m*(w*(h-g)*(d-y)*b),u+=m*(1-w*Math.pow(h-g,2)*b)}}var _=s,E=l,R=t,M=u,A=n,N=(R/_+A/E)/(E/_-M/E),F=-(E*N+R)/_;o[e].x+=F,o[e].y+=N,this._updateE_matrix(e)}},{key:"_createL_matrix",value:function(e){var t=this.body.nodeIndices,n=this.springLength;this.L_matrix=[];for(var a=0;a<t.length;a++){this.L_matrix[t[a]]={};for(var o=0;o<t.length;o++)this.L_matrix[t[a]][t[o]]=n*e[t[a]][t[o]]}}},{key:"_createK_matrix",value:function(e){var t=this.body.nodeIndices,n=this.springConstant;this.K_matrix=[];for(var a=0;a<t.length;a++){this.K_matrix[t[a]]={};for(var o=0;o<t.length;o++)this.K_matrix[t[a]][t[o]]=n*Math.pow(e[t[a]][t[o]],-2)}}},{key:"_createE_matrix",value:function(){var e=this.body.nodeIndices,t=this.body.nodes;this.E_matrix={},this.E_sums={};for(var n=0;n<e.length;n++)this.E_matrix[e[n]]=[];for(var a=0;a<e.length;a++){for(var o=e[a],s=t[o].x,l=t[o].y,u=0,h=0,d=a;d<e.length;d++){var c=e[d];if(c!==o){var f=t[c].x,v=t[c].y,p=1/Math.sqrt(Math.pow(s-f,2)+Math.pow(l-v,2));this.E_matrix[o][d]=[this.K_matrix[o][c]*(s-f-this.L_matrix[o][c]*(s-f)*p),this.K_matrix[o][c]*(l-v-this.L_matrix[o][c]*(l-v)*p)],this.E_matrix[c][a]=this.E_matrix[o][d],u+=this.E_matrix[o][d][0],h+=this.E_matrix[o][d][1]}}this.E_sums[o]=[u,h]}}},{key:"_updateE_matrix",value:function(e){for(var t=this.body.nodeIndices,n=this.body.nodes,a=this.E_matrix[e],o=this.K_matrix[e],s=this.L_matrix[e],l=n[e].x,u=n[e].y,h=0,d=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=n[f].x,m=n[f].y,w=1/Math.sqrt(Math.pow(l-y,2)+Math.pow(u-m,2)),b=o[f]*(l-y-s[f]*(l-y)*w),_=o[f]*(u-m-s[f]*(u-m)*w);a[c]=[b,_],h+=b,d+=_;var E=this.E_sums[f];E[0]+=b-p,E[1]+=_-g}}this.E_sums[e]=[h,d]}}]),r}();function L(r,i,e){var t,n,a,o,s=this;if(!(this instanceof L))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:ioe,clickToUse:!1},Fe(this.options,this.defaultOptions),this.body={container:r,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:T(t=this.on).call(t,this),off:T(n=this.off).call(n,this),emit:T(a=this.emit).call(a,this),once:T(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 soe(function(){return s.body.emitter.emit("_requestRedraw")}),this.groups=new Sse,this.canvas=new zce(this.body),this.selectionHandler=new xfe(this.body,this.canvas),this.interactionHandler=new Kce(this.body,this.canvas,this.selectionHandler),this.view=new Wce(this.body,this.canvas),this.renderer=new Nce(this.body,this.canvas),this.physics=new Tce(this.body),this.layoutEngine=new Zve(this.body),this.clustering=new Dce(this.body),this.manipulation=new rpe(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new ude(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new gce(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new spe(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(e),this.setData(i)}gE(L.prototype);L.prototype.setOptions=function(r){var i=this;if(r===null&&(r=void 0),r!==void 0){var e=Mae.validate(r,ipe);e===!0&&console.error("%cErrors have been found in the supplied options object.",bO);var t=["locale","locales","clickToUse"];if(_a(t,this.options,r),r.locale!==void 0&&(r.locale=aoe(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 Rae(this,this.body.container,yT,this.canvas.pixelRatio,ape)),this.configurator.setOptions(r.configure)),this.configurator&&this.configurator.options.enabled===!0){var n={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};fe(n.nodes,this.nodesHandler.options),fe(n.edges,this.edgesHandler.options),fe(n.layout,this.layoutEngine.options),fe(n.interaction,this.selectionHandler.options),fe(n.interaction,this.renderer.options),fe(n.interaction,this.interactionHandler.options),fe(n.manipulation,this.manipulation.options),fe(n.physics,this.physics.options),fe(n.global,this.canvas.options),fe(n.global,this.options),this.configurator.setModuleOptions(n)}r.clickToUse!==void 0?r.clickToUse===!0?this.activator===void 0&&(this.activator=new Aae(this.canvas.frame),this.activator.on("change",function(){i.body.emitter.emit("activate")})):(this.activator!==void 0&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}};L.prototype._updateVisibleIndices=function(){var r=this.body.nodes,i=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&!this.clustering._isClusteredNode(e)&&r[e].options.hidden===!1&&this.body.nodeIndices.push(r[e].id);for(var t in i)if(Object.prototype.hasOwnProperty.call(i,t)){var n=i[t],a=r[n.fromId],o=r[n.toId],s=a!==void 0&&o!==void 0,l=!this.clustering._isClusteredEdge(t)&&n.options.hidden===!1&&s&&a.options.hidden===!1&&o.options.hidden===!1;l&&this.body.edgeIndices.push(n.id)}};L.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")})};L.prototype.setData=function(r){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),r&&r.dot&&(r.nodes||r.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(r&&r.options),r&&r.dot){console.warn("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");var i=Uae(r.dot);this.setData(i);return}else if(r&&r.gephi){console.warn("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");var e=Gae(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")};L.prototype.destroy=function(){this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images;for(var r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&delete this.body.nodes[r];for(var i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&delete this.body.edges[i];Ur(this.body.container)};L.prototype._updateValueRange=function(r){var i,e=void 0,t=void 0,n=0;for(i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var a=r[i].getValue();a!==void 0&&(e=e===void 0?a:Math.min(a,e),t=t===void 0?a:Math.max(a,t),n+=a)}if(e!==void 0&&t!==void 0)for(i in r)Object.prototype.hasOwnProperty.call(r,i)&&r[i].setValueRange(e,t,n)};L.prototype.isActive=function(){return!this.activator||this.activator.active};L.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};L.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};L.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};L.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};L.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};L.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};L.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};L.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};L.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};L.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};L.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};L.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};L.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};L.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};L.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};L.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};L.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};L.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};L.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};L.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};L.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};L.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};L.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};L.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};L.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};L.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};L.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};L.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};L.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};L.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};L.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)};L.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};L.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};L.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};L.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};L.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};L.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};L.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};L.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};L.prototype.getNodeAt=function(){var r=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};L.prototype.getEdgeAt=function(){var r=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};L.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};L.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};L.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};L.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};L.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};L.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};L.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};L.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};L.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};L.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};L.prototype.getOptionsFromConfigurator=function(){var r={};return this.configurator&&(r=this.configurator.getOptions.apply(this.configurator)),r};const lpe={flex:"~ gap-4 wrap","w-full":""},upe=Q("span",{op75:""},"Show pages",-1),hpe=Q("span",{op75:""},"Show layouts",-1),dpe=Q("span",{op75:""},"Show workspace",-1),cpe=Q("span",{op75:""},"Show node_modules",-1),fpe=Q("span",{op75:""},"Show global components",-1),vpe=Q("div",{"i-carbon-close":""},null,-1),ppe=Q("div",{"flex-auto":""},null,-1),gpe={relative:"","h-full":"","w-full":""},ype=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),mpe={key:0,py4:"",pt4:"",flex:"~ col"},bpe={border:"t base",p4:""},$pe=Yi({__name:"ComponentsGraph",props:{components:{},relationships:{}},setup(r){const i=r,e=bi(),t=bi(),n=bT(),a=bi(),o=$T(),s=wT(),l=_T(),{componentsGraphShowNodeModules:u,componentsGraphShowGlobalComponents:h,componentsGraphShowPages:d,componentsGraphShowLayouts:c,componentsGraphShowWorkspace:f}=l1(),v=bi(),p=rr(()=>{const b=i.relationships||[];if(v.value){let _=function(R){!R||E.has(R)||(E.add(R),R.deps.forEach(M=>{_(b.find(A=>A.id===M))}))};const E=new Set;return _(v.value),Array.from(E)}return b}),g=rr(()=>{const b=p.value.map(E=>{const R=i.components.find(Y=>Y.filePath===E.id),M=o.value?.find(Y=>Y.file===E.id),A=l.value?.find(Y=>Y.file===E.id),N=E.id.replace(/\?.*$/,"").replace(/\#.*$/,""),F=E.id.includes("/node_modules/")?"lib":R?R.global?"global":"user":A?"layout":M?"page":"unknown";if(!u.value&&F==="lib"||!d.value&&F==="page"||!c.value&&F==="layout"||!f.value&&F==="user"&&s.value&&!E.id.startsWith(s.value.rootDir)||!h.value&&F==="global")return null;const W=F==="layout"?"hexagon":F==="page"?"square":"dot";return{id:E.id,label:N.split("/").splice(-1)[0].replace(/\.\w+$/,""),group:F,shape:W,size:15+Math.min(E.deps.length/2,8),font:{color:n.value==="dark"?"white":"black"},color:v.value?.id===E.id?"#82c742":void 0,extra:{id:E.id,component:R,page:M,layout:A,relationship:E}}}).filter(E=>!!E),_=p.value.flatMap(E=>E.deps.map(R=>({from:E.id,to:R,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:b,edges:_}}),y=rr(()=>a.value?.component?i.relationships?.find(_=>_.id===a.value?.component?.filePath)?.deps?.map(_=>i.relationships?.find(E=>E.id===_)?.id).filter(Boolean):[]),m=rr(()=>a.value?.component?i.relationships?.filter(_=>_.deps.includes(a.value.component.filePath))?.map(_=>i.relationships?.find(E=>E.id===_.id)?.id).filter(Boolean):[]);ET(()=>{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 L(e.value,g.value,b);_.on("click",E=>{const R=E.nodes?.[0],M=g.value.nodes?.find(A=>A.id===R)?.extra;M&&(a.value=M)}),ST(g,()=>{_.setData(g.value)})});function w(){v.value=a.value?.relationship,a.value=void 0}return(b,_)=>{const E=LT,R=u1,M=OT,A=v1,N=ff,F=jT;return ee(),Ee(hr,null,[we(R,{ref_key:"navbar",ref:t,absolute:"","left-0":"","right-0":"","top-0":""},{search:ze(()=>[Q("div",lpe,[we(E,{modelValue:q(d),"onUpdate:modelValue":_[0]||(_[0]=W=>_n(d)?d.value=W:null),n:"primary sm"},{default:ze(()=>[upe]),_:1},8,["modelValue"]),we(E,{modelValue:q(c),"onUpdate:modelValue":_[1]||(_[1]=W=>_n(c)?c.value=W:null),n:"primary sm"},{default:ze(()=>[hpe]),_:1},8,["modelValue"]),we(E,{modelValue:q(f),"onUpdate:modelValue":_[2]||(_[2]=W=>_n(f)?f.value=W:null),n:"primary sm"},{default:ze(()=>[dpe]),_:1},8,["modelValue"]),we(E,{modelValue:q(u),"onUpdate:modelValue":_[3]||(_[3]=W=>_n(u)?u.value=W:null),n:"primary sm"},{default:ze(()=>[cpe]),_:1},8,["modelValue"]),we(E,{modelValue:q(h),"onUpdate:modelValue":_[4]||(_[4]=W=>_n(h)?h.value=W:null),n:"primary sm"},{default:ze(()=>[fpe]),_:1},8,["modelValue"])]),q(v)?(ee(),Ee("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]=W=>v.value=void 0)},[Qd(" Clear filter "),vpe])):lt("",!0),ppe,Al(b.$slots,"default")]),_:3},512),Q("div",gpe,[Q("div",{ref_key:"container",ref:e,"h-full":"","w-full":""},null,512),we(M,{absolute:"","bottom-3":"","left-3":"","border-0":"",p2:"",px3:"","text-sm":"","n-glass-effect":""},{default:ze(()=>[ype]),_:1}),we(F,{"model-value":!!(q(a)&&q(a).component),top:q(t),border:"t l base","w-80":"",onClose:_[7]||(_[7]=W=>a.value=void 0)},{default:ze(()=>[q(a)&&q(a).component?(ee(),Ee("div",mpe,[we(A,{component:q(a).component,dependencies:q(y),dependents:q(m)},null,8,["component","dependencies","dependents"]),Q("div",bpe,[we(N,{n:"primary solid",onClick:_[6]||(_[6]=W=>w())},{default:ze(()=>[Qd(" Filter to this component ")]),_:1})])])):lt("",!0)]),_:1},8,["model-value","top"])])],64)}}}),wpe={hover:"bg-active",class:"group",flex:"~ gap2","w-full":"","items-center":"",rounded:"",px2:"",py1:""},_pe={key:0,"ml--1":"","text-primary":""},Epe=Yi({__name:"ComponentItem",props:{component:{},dependencies:{},dependents:{}},setup(r){const i=r,e=rr(()=>i.component.filePath||i.component.file||i.component.__file||"");return(t,n)=>{const a=f1,o=v1,s=TT("VDropdown"),l=h1,u=d1;return ee(),Ee("div",wpe,[we(s,null,{popper:ze(()=>[we(o,{component:t.component,dependencies:t.dependencies,dependents:t.dependents,"w-100":"",pt4:""},null,8,["component","dependencies","dependents"])]),default:ze(()=>[Q("button",{"hover:text-primary":"",class:PT(t.dependents&&t.dependents.length===0?"op50":"")},[we(a,{component:t.component},null,8,["component"])],2)]),_:1}),t.dependents?.length?(ee(),Ee("sup",_pe," x"+al(t.dependents?.length),1)):lt("",!0),t.component.global?(ee(),st(l,{key:1,n:"green",title:"Registered at runtime as a global component",textContent:"runtime"})):lt("",!0),Al(t.$slots,"default"),q(e)?(ee(),st(u,{key:2,filepath:q(e),"text-sm":"",op25:"","group-hover:op75":""},null,8,["filepath"])):lt("",!0)])}}}),Spe={flex:"~ gap-2 items-center"},Ope={pl4:""},Tpe=Yi({__name:"ComponentsList",props:{components:{},relationships:{}},setup(r){const i=r,e=bi(""),t=bi("all"),n=rr(()=>{const s=i.components.map(l=>IT(l,i.relationships));return t.value==="using"?s.filter(l=>l.dependents?.length):t.value==="not-used"?s.filter(l=>!l.dependents?.length):s}),a=rr(()=>new kT(n.value,{keys:["component.pascalName","component.filePath","component.kebabName"]})),o=rr(()=>{const s=[],l=new Map,u=[],h=[],d={user:0,lib:0,builtin:0,runtime:0};return(e.value?a.value.search(e.value).map(f=>f.item):n.value).forEach(f=>{const v=f.component;if(v.filePath&&CT(v.filePath)){const p=xT(v.filePath);if(!p)return;p==="nuxt"?(u.push(f),d.builtin++):(l.has(p)||l.set(p,[]),l.get(p).push(f),d.lib++)}else v.global&&!v.filePath?(h.push(f),d.runtime++):(s.push(f),d.user++)}),{count:d,user:s,builtin:u,lib:l,runtime:h}});return(s,l)=>{const u=AT,h=zT,d=u1,c=Epe,f=HT,v=WT;return ee(),Ee(hr,null,[we(d,{search:q(e),"onUpdate:search":l[1]||(l[1]=p=>_n(e)?e.value=p:null),pb3:""},{actions:ze(()=>[Al(s.$slots,"default")]),default:ze(()=>[Q("div",Spe,[we(u,{icon:"carbon-filter",op50:""}),we(h,{modelValue:q(t),"onUpdate:modelValue":l[0]||(l[0]=p=>_n(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(),st(f,{key:0,icon:"carbon-nominal",text:"User components",open:q(o).user.length<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:q(Nu)),description:`Total components: ${q(o).count.user}`},{default:ze(()=>[(ee(!0),Ee(hr,null,wn(q(o).user,p=>(ee(),st(c,ts({key:p.component.filePath},p),null,16))),128))]),_:1},8,["open","description"])):lt("",!0),q(o).runtime.length?(ee(),st(f,{key:1,icon:"carbon-load-balancer-global",open:q(o).runtime.length<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:q(Nu)),text:"Runtime components",description:`Total components: ${q(o).count.runtime}`},{default:ze(()=>[(ee(!0),Ee(hr,null,wn(q(o).runtime,p=>(ee(),st(c,ts({key:p.component.filePath},p),null,16))),128))]),_:1},8,["open","description"])):lt("",!0),q(o).builtin.length?(ee(),st(f,{key:2,icon:"simple-icons-nuxtdotjs",text:"Built-in components",description:`Total components: ${q(o).count.builtin}`},{default:ze(()=>[(ee(!0),Ee(hr,null,wn(q(o).builtin,p=>(ee(),st(c,ts({key:p.component.filePath},p),null,16))),128))]),_:1},8,["description"])):lt("",!0),q(o).lib.size?(ee(),st(f,{key:3,open:q(o).count.lib<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:q(Nu)),icon:"carbon-3d-mpr-toggle",text:"Components from libraries",description:`${q(o).count.lib} components from ${q(o).lib.size} packages`},{default:ze(()=>[(ee(!0),Ee(hr,null,wn(q(o).lib.entries(),([p,g])=>(ee(),Ee("div",{key:p,"ml-2":""},[we(v,{text:`${p} (${g.length})`,py1:"",op50:""},null,8,["text"]),Q("div",Ope,[(ee(!0),Ee(hr,null,wn(g,y=>(ee(),st(c,ts({key:y.component.filePath},y),null,16))),128))])]))),128))]),_:1},8,["open","description"])):lt("",!0)],64)}}}),Ppe={relative:"","h-full":"","of-auto":""},Ipe={"flex-none":"",flex:"~ gap3"},zpe=Yi({__name:"components",setup(r){const i=RT(),e=FT(),t=BT(),{componentsView:n}=l1();function a(){i.value?.inspector?.instance&&i.value.inspector.enable()}function o(){n.value=n.value==="list"?"graph":"list"}return(s,l)=>{const u=ff,h=XT,d=NT,c=DT("tooltip");return ee(),Ee(hr,null,[Q("div",Ppe,[(ee(),st(MT(q(n)==="list"?Tpe:$pe),{components:q(e),relationships:q(t)},{default:ze(()=>[Q("div",Ipe,[Gv(we(u,{"text-lg":"",border:!1,icon:q(n)==="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(i)?.inspector?.instance?Gv((ee(),st(u,{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}]]):lt("",!0)])]),_:1},8,["components","relationships"]))]),we(d,null,{default:ze(()=>[we(h)]),_:1})],64)}}});export{zpe as default};