@rubytech/create-maxy-code 0.1.500 → 0.1.502
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/payload/platform/docs/superpowers/plans/2026-07-25-task-1974-uploads-intake-inbox.md +235 -0
- package/payload/platform/docs/superpowers/plans/2026-07-25-task-1976-intra-folder-hygiene.md +215 -0
- package/payload/platform/lib/graph-style/dist/index.d.ts +9 -0
- package/payload/platform/lib/graph-style/dist/index.d.ts.map +1 -1
- package/payload/platform/lib/graph-style/dist/index.js +152 -6
- package/payload/platform/lib/graph-style/dist/index.js.map +1 -1
- package/payload/platform/lib/graph-style/src/__tests__/caption-coverage.test.ts +69 -0
- package/payload/platform/lib/graph-style/src/__tests__/coverage-source.ts +73 -0
- package/payload/platform/lib/graph-style/src/__tests__/icons.test.ts +20 -3
- package/payload/platform/lib/graph-style/src/index.ts +166 -5
- package/payload/platform/plugins/admin/PLUGIN.md +1 -0
- package/payload/platform/plugins/admin/skills/agent-builder/SKILL.md +15 -0
- package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +52 -2
- package/payload/platform/plugins/admin/skills/summarise/SKILL.md +37 -0
- package/payload/platform/plugins/admin/skills/whats-new/SKILL.md +7 -0
- package/payload/platform/plugins/docs/references/admin-ui.md +50 -0
- package/payload/platform/plugins/docs/references/internals.md +1 -1
- package/payload/platform/plugins/docs/references/summarise-skill.md +7 -0
- package/payload/platform/templates/account-schema/SCHEMA.md +36 -1
- package/payload/platform/templates/specialists/agents/data-manager.md +4 -2
- package/payload/server/public/activity.html +6 -6
- package/payload/server/public/assets/AdminLoginScreens-Bv_bKKeL.js +1 -0
- package/payload/server/public/assets/AdminShell-Gq8DU_ig.js +2 -0
- package/payload/server/public/assets/{activity-CKUYOLd2.js → activity-DZFYDHNA.js} +1 -1
- package/payload/server/public/assets/admin-DLUOixl6.js +1 -0
- package/payload/server/public/assets/{arc-CpWWSum8.js → arc-CvlzUHOf.js} +1 -1
- package/payload/server/public/assets/architecture-YZFGNWBL-BQc779DH.js +1 -0
- package/payload/server/public/assets/{architectureDiagram-Q4EWVU46-D2EzaII0.js → architectureDiagram-Q4EWVU46-I1Hs0RJA.js} +1 -1
- package/payload/server/public/assets/{blockDiagram-DXYQGD6D-8kDpaNSZ.js → blockDiagram-DXYQGD6D-Df5jTGtl.js} +1 -1
- package/payload/server/public/assets/{bot-DESMpxSQ.js → bot-CrEhKW1l.js} +1 -1
- package/payload/server/public/assets/{browser-CpLq_DIo.js → browser-Bt4-LKLU.js} +1 -1
- package/payload/server/public/assets/{c4Diagram-AHTNJAMY-CbwmZpK3.js → c4Diagram-AHTNJAMY-B6WY5IDv.js} +1 -1
- package/payload/server/public/assets/{calendar-ClOwyuz-.js → calendar-D0qIvLUR.js} +1 -1
- package/payload/server/public/assets/channel-AqnC3SHu.js +1 -0
- package/payload/server/public/assets/chat-geSkx0j2.js +1 -0
- package/payload/server/public/assets/chevron-left-CQ8rcBoO.js +1 -0
- package/payload/server/public/assets/chevron-right-CSRSqblN.js +1 -0
- package/payload/server/public/assets/{chunk-2KRD3SAO-PFheZ9mw.js → chunk-2KRD3SAO-BsIIFDkc.js} +1 -1
- package/payload/server/public/assets/{chunk-336JU56O-CCFOp5VK.js → chunk-336JU56O-j9z1VtyC.js} +2 -2
- package/payload/server/public/assets/chunk-426QAEUC-CO02gU5d.js +1 -0
- package/payload/server/public/assets/{chunk-4BX2VUAB-Hz4JWOf2.js → chunk-4BX2VUAB-C9i7prxq.js} +1 -1
- package/payload/server/public/assets/{chunk-4TB4RGXK-4xeV0s85.js → chunk-4TB4RGXK-DH0QVGcv.js} +1 -1
- package/payload/server/public/assets/{chunk-55IACEB6-4QKgBpoh.js → chunk-55IACEB6-Dnd_YCPA.js} +1 -1
- package/payload/server/public/assets/{chunk-5FUZZQ4R-ms3K6Z5z.js → chunk-5FUZZQ4R-D5sSz3yN.js} +1 -1
- package/payload/server/public/assets/{chunk-5PVQY5BW-CIC4GIGi.js → chunk-5PVQY5BW-CJrwWjAT.js} +1 -1
- package/payload/server/public/assets/{chunk-67CJDMHE-B-XrWVmV.js → chunk-67CJDMHE-SjP6_hUw.js} +1 -1
- package/payload/server/public/assets/{chunk-7N4EOEYR-C7ECOUYQ.js → chunk-7N4EOEYR-fAuhVJD0.js} +1 -1
- package/payload/server/public/assets/{chunk-AA7GKIK3-DOZ6Fxwk.js → chunk-AA7GKIK3-DZxa7KVg.js} +1 -1
- package/payload/server/public/assets/{chunk-BSJP7CBP-4cJ_b0c6.js → chunk-BSJP7CBP-DjeG3eQ-.js} +1 -1
- package/payload/server/public/assets/{chunk-CIAEETIT--mhZipWM.js → chunk-CIAEETIT-RYQULNJm.js} +1 -1
- package/payload/server/public/assets/{chunk-EDXVE4YY-jZpVwob_.js → chunk-EDXVE4YY-Cahapnon.js} +1 -1
- package/payload/server/public/assets/{chunk-ENJZ2VHE-Nn-p-xIA.js → chunk-ENJZ2VHE-1146X1L4.js} +1 -1
- package/payload/server/public/assets/{chunk-FMBD7UC4-DyNpcKOS.js → chunk-FMBD7UC4-BCFumtcP.js} +1 -1
- package/payload/server/public/assets/{chunk-FOC6F5B3-C0P8q1uz.js → chunk-FOC6F5B3-CkrtX8Zt.js} +1 -1
- package/payload/server/public/assets/{chunk-ICPOFSXX-CdXQ5SfI.js → chunk-ICPOFSXX-Ba1y3DaW.js} +2 -2
- package/payload/server/public/assets/{chunk-K5T4RW27-BVZJKKsT.js → chunk-K5T4RW27-CF-PI3uQ.js} +1 -1
- package/payload/server/public/assets/{chunk-KGLVRYIC-QlVWTe0V.js → chunk-KGLVRYIC-SFFC6ZC-.js} +1 -1
- package/payload/server/public/assets/{chunk-LIHQZDEY-CpGVZutP.js → chunk-LIHQZDEY-DbOLEP4R.js} +1 -1
- package/payload/server/public/assets/{chunk-ORNJ4GCN-WVcS6fUC.js → chunk-ORNJ4GCN-VB963bkN.js} +1 -1
- package/payload/server/public/assets/{chunk-OYMX7WX6-B7hiSTed.js → chunk-OYMX7WX6-DWYY1pQa.js} +1 -1
- package/payload/server/public/assets/chunk-QZHKN3VN-BiFMbK8t.js +1 -0
- package/payload/server/public/assets/{chunk-U2HBQHQK-DJPnZxGy.js → chunk-U2HBQHQK-DAH1diYP.js} +1 -1
- package/payload/server/public/assets/{chunk-X2U36JSP-DilBs1Yc.js → chunk-X2U36JSP-Dmw9coXz.js} +1 -1
- package/payload/server/public/assets/{chunk-XPW4576I-B5-uyrJ0.js → chunk-XPW4576I-DaAUON1-.js} +1 -1
- package/payload/server/public/assets/{chunk-YZCP3GAM-BNO4z0Mv.js → chunk-YZCP3GAM-BUcfkEef.js} +1 -1
- package/payload/server/public/assets/{chunk-ZZ45TVLE-BzHMQpip.js → chunk-ZZ45TVLE-BLD-vFRO.js} +1 -1
- package/payload/server/public/assets/classDiagram-6PBFFD2Q-BdRqzScB.js +1 -0
- package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-ChPLgHbS.js +1 -0
- package/payload/server/public/assets/clock-B7Ba8AZL.js +1 -0
- package/payload/server/public/assets/clone-TKtrjWBC.js +1 -0
- package/payload/server/public/assets/{cose-bilkent-S5V4N54A-3DWYmn1o.js → cose-bilkent-S5V4N54A-CoZX0uki.js} +1 -1
- package/payload/server/public/assets/{dagre-Cpy31xJW.js → dagre-Bmjs8zJA.js} +1 -1
- package/payload/server/public/assets/{dagre-KV5264BT-C8fyxHFd.js → dagre-KV5264BT-BZCP2wnq.js} +1 -1
- package/payload/server/public/assets/data-BdlGqjKM.js +1 -0
- package/payload/server/public/assets/{diagram-5BDNPKRD-ycyhnLvr.js → diagram-5BDNPKRD-8Nt9a4xX.js} +1 -1
- package/payload/server/public/assets/{diagram-G4DWMVQ6-BkeYicIt.js → diagram-G4DWMVQ6-vh5tcYqJ.js} +1 -1
- package/payload/server/public/assets/{diagram-MMDJMWI5-BcGZU-Q3.js → diagram-MMDJMWI5-DGf--jc8.js} +1 -1
- package/payload/server/public/assets/{diagram-TYMM5635-DuBDCFb_.js → diagram-TYMM5635-CsO7TIdw.js} +1 -1
- package/payload/server/public/assets/{dist-BYc_arNy.js → dist-cdnE4DqK.js} +1 -1
- package/payload/server/public/assets/{erDiagram-SMLLAGMA-DmkeOzvp.js → erDiagram-SMLLAGMA-4a78yV8_.js} +1 -1
- package/payload/server/public/assets/file-text-BpLcZKld.js +1 -0
- package/payload/server/public/assets/{flatten-QjnJ1Gcl.js → flatten-BtIc9jX7.js} +1 -1
- package/payload/server/public/assets/{flowDiagram-DWJPFMVM-CkE-pjuB.js → flowDiagram-DWJPFMVM-BoQBXs6t.js} +1 -1
- package/payload/server/public/assets/{ganttDiagram-T4ZO3ILL-Cjiy3kvE.js → ganttDiagram-T4ZO3ILL-CvzqwCC8.js} +1 -1
- package/payload/server/public/assets/gitGraph-7Q5UKJZL-DfcaTE9L.js +1 -0
- package/payload/server/public/assets/{gitGraphDiagram-UUTBAWPF-CsI4lKZm.js → gitGraphDiagram-UUTBAWPF-D_nBxay_.js} +1 -1
- package/payload/server/public/assets/graph-HB0199x-.js +51 -0
- package/payload/server/public/assets/graph-labels-Bx19ZYvJ.js +1 -0
- package/payload/server/public/assets/{graphlib-BkXxC6D5.js → graphlib-D0NdsKJI.js} +1 -1
- package/payload/server/public/assets/info-OMHHGYJF-CD-u6gw9.js +1 -0
- package/payload/server/public/assets/infoDiagram-42DDH7IO-C6gPQCvO.js +2 -0
- package/payload/server/public/assets/{isEmpty-BavJI9Cn.js → isEmpty-Bu4fZ8Kf.js} +1 -1
- package/payload/server/public/assets/{ishikawaDiagram-UXIWVN3A-D8lZtjRc.js → ishikawaDiagram-UXIWVN3A-auW-s0i0.js} +1 -1
- package/payload/server/public/assets/{journeyDiagram-VCZTEJTY-kLE7SiR_.js → journeyDiagram-VCZTEJTY-3Q6AWK4A.js} +1 -1
- package/payload/server/public/assets/{kanban-definition-6JOO6SKY-ove6JuD3.js → kanban-definition-6JOO6SKY-B4MPFp98.js} +1 -1
- package/payload/server/public/assets/{line-CZMSoxM6.js → line-26MdeG5Z.js} +1 -1
- package/payload/server/public/assets/{linear-Be8IK9hK.js → linear-Dq9s_bDO.js} +1 -1
- package/payload/server/public/assets/{maximize-2-BbzPm7o8.js → maximize-2-BhR-Ec21.js} +1 -1
- package/payload/server/public/assets/{mermaid-parser.core-BBADqbnp.js → mermaid-parser.core-vLEpOXgf.js} +2 -2
- package/payload/server/public/assets/{mermaid.core-mH3N7K0I.js → mermaid.core-Durk4m6D.js} +3 -3
- package/payload/server/public/assets/{mindmap-definition-QFDTVHPH-BjwwwWil.js → mindmap-definition-QFDTVHPH-DOIg-TyG.js} +1 -1
- package/payload/server/public/assets/operator-DejfJlvi.js +1 -0
- package/payload/server/public/assets/{ordinal-BHeIKG-K.js → ordinal-C2TEWKNu.js} +1 -1
- package/payload/server/public/assets/packet-4T2RLAQJ-BaLYeIrU.js +1 -0
- package/payload/server/public/assets/page-DomkejEB.js +32 -0
- package/payload/server/public/assets/page-FnCmAeHc.js +1 -0
- package/payload/server/public/assets/{pdf-render-fJz4vym9.js → pdf-render-C257cidb.js} +1 -1
- package/payload/server/public/assets/pie-ZZUOXDRM-CL-XJtk-.js +1 -0
- package/payload/server/public/assets/{pieDiagram-DEJITSTG-D-lXWWta.js → pieDiagram-DEJITSTG-DtgBHZfi.js} +1 -1
- package/payload/server/public/assets/{public-DqJjXR4p.js → public-Be_Galv6.js} +1 -1
- package/payload/server/public/assets/{quadrantDiagram-34T5L4WZ-13QyG_AO.js → quadrantDiagram-34T5L4WZ-BTc5Qn2y.js} +1 -1
- package/payload/server/public/assets/radar-PYXPWWZC-Cn-g6F_h.js +1 -0
- package/payload/server/public/assets/{reduce-Fm685to3.js → reduce-BGpN5lgn.js} +1 -1
- package/payload/server/public/assets/{requirementDiagram-MS252O5E-Bx45Bgn4.js → requirementDiagram-MS252O5E-BNgOO5YW.js} +1 -1
- package/payload/server/public/assets/{rotate-ccw-L42fL8ey.js → rotate-ccw-D9qOBLig.js} +1 -1
- package/payload/server/public/assets/routines-lGiYaMiX.js +1 -0
- package/payload/server/public/assets/{sankeyDiagram-XADWPNL6-Cj-Gq25v.js → sankeyDiagram-XADWPNL6-MyUATmVt.js} +1 -1
- package/payload/server/public/assets/{sequenceDiagram-FGHM5R23-B8RDRq93.js → sequenceDiagram-FGHM5R23-CBJrF5Vi.js} +1 -1
- package/payload/server/public/assets/skills-D9nWOqoz.js +1 -0
- package/payload/server/public/assets/{src-D3VYuW_Z.js → src-DekKlUCp.js} +1 -1
- package/payload/server/public/assets/{stateDiagram-FHFEXIEX-DoyFF1Kl.js → stateDiagram-FHFEXIEX-6wbUjn1Q.js} +1 -1
- package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-BdMdfBeC.js +1 -0
- package/payload/server/public/assets/{tasks-GNtvZL8F.js → tasks-Cyc1EfLA.js} +1 -1
- package/payload/server/public/assets/{time-entry-format-BreNpFLJ.js → time-entry-format-RkCW7hKu.js} +1 -1
- package/payload/server/public/assets/{timeline-definition-GMOUNBTQ-Df4RQXm6.js → timeline-definition-GMOUNBTQ-BHjTMCGY.js} +1 -1
- package/payload/server/public/assets/treeView-SZITEDCU-CmZoOGlC.js +1 -0
- package/payload/server/public/assets/treemap-W4RFUUIX-H27WFS-y.js +1 -0
- package/payload/server/public/assets/{triangle-alert-DumCWC08.js → triangle-alert-k8ulav-N.js} +1 -1
- package/payload/server/public/assets/{useCopyFeedback-DHCtz8qX.js → useCopyFeedback-DN1WA5vU.js} +1 -1
- package/payload/server/public/assets/useSubAccountSwitcher-fvBunpOC.css +1 -0
- package/payload/server/public/assets/useSubAccountSwitcher-iQGqNJhI.js +9 -0
- package/payload/server/public/assets/useVoiceRecorder-v--TIxaM.js +2 -0
- package/payload/server/public/assets/{vennDiagram-DHZGUBPP-D2o5og9l.js → vennDiagram-DHZGUBPP-yo3-cf0U.js} +1 -1
- package/payload/server/public/assets/wardley-RL74JXVD-DNpWIvU4.js +1 -0
- package/payload/server/public/assets/{wardleyDiagram-NUSXRM2D-BDueObbS.js → wardleyDiagram-NUSXRM2D-DZlyFzrg.js} +1 -1
- package/payload/server/public/assets/{wrench-iWkROE1V.js → wrench-CKhz8KnQ.js} +1 -1
- package/payload/server/public/assets/{xychartDiagram-5P7HB3ND-BTYs4Fgh.js → xychartDiagram-5P7HB3ND-B5HV5h80.js} +1 -1
- package/payload/server/public/browser.html +5 -5
- package/payload/server/public/calendar.html +8 -8
- package/payload/server/public/chat.html +16 -15
- package/payload/server/public/data.html +13 -12
- package/payload/server/public/graph.html +10 -10
- package/payload/server/public/index.html +17 -16
- package/payload/server/public/operator.html +17 -16
- package/payload/server/public/public.html +16 -15
- package/payload/server/public/routines.html +7 -7
- package/payload/server/public/skills.html +19 -0
- package/payload/server/public/tasks.html +7 -7
- package/payload/server/server.js +1157 -789
- package/payload/server/public/assets/AdminLoginScreens-CKg_Dlpv.js +0 -1
- package/payload/server/public/assets/AdminShell-BFVVkWFC.js +0 -2
- package/payload/server/public/assets/admin-wtSUU5N0.js +0 -1
- package/payload/server/public/assets/architecture-YZFGNWBL-D-AX2VuA.js +0 -1
- package/payload/server/public/assets/channel-DZ5sh6YQ.js +0 -1
- package/payload/server/public/assets/chat-DRuIxGtE.js +0 -1
- package/payload/server/public/assets/chevron-left-BzIg4in6.js +0 -1
- package/payload/server/public/assets/chevron-right-BcFSa9C3.js +0 -1
- package/payload/server/public/assets/chunk-426QAEUC-CcjBLp4a.js +0 -1
- package/payload/server/public/assets/chunk-QZHKN3VN-B2WjDYBE.js +0 -1
- package/payload/server/public/assets/classDiagram-6PBFFD2Q-CT3jNrze.js +0 -1
- package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-DJRsjAkC.js +0 -1
- package/payload/server/public/assets/clock-Dr3NGtjR.js +0 -1
- package/payload/server/public/assets/clone-FcEDnoMT.js +0 -1
- package/payload/server/public/assets/data-BdZCvyvN.js +0 -1
- package/payload/server/public/assets/gitGraph-7Q5UKJZL-D1uhnP9U.js +0 -1
- package/payload/server/public/assets/graph-B7niLM97.js +0 -51
- package/payload/server/public/assets/graph-labels-DykmXYHA.js +0 -1
- package/payload/server/public/assets/info-OMHHGYJF-oNm27GAV.js +0 -1
- package/payload/server/public/assets/infoDiagram-42DDH7IO-LxTftqyS.js +0 -2
- package/payload/server/public/assets/operator-DglDYmdV.js +0 -1
- package/payload/server/public/assets/packet-4T2RLAQJ-eQNVGiK3.js +0 -1
- package/payload/server/public/assets/page-C-5sTAE-.js +0 -32
- package/payload/server/public/assets/page-C8G5p4jr.js +0 -1
- package/payload/server/public/assets/pie-ZZUOXDRM-E1u-48rt.js +0 -1
- package/payload/server/public/assets/radar-PYXPWWZC-Cn2cGN90.js +0 -1
- package/payload/server/public/assets/routines-JOV6xdYh.js +0 -1
- package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-Bml-X4-H.js +0 -1
- package/payload/server/public/assets/treeView-SZITEDCU-CimabhXy.js +0 -1
- package/payload/server/public/assets/treemap-W4RFUUIX-Cg264rpM.js +0 -1
- package/payload/server/public/assets/useSubAccountSwitcher-Bc7XHr0L.js +0 -9
- package/payload/server/public/assets/useSubAccountSwitcher-DPHQJO7E.css +0 -1
- package/payload/server/public/assets/useVoiceRecorder-Cj-VZDKO.js +0 -2
- package/payload/server/public/assets/wardley-RL74JXVD-tbgfCg0E.js +0 -1
- /package/payload/server/public/assets/{_baseFor-Bvwvhrz4.js → _baseFor-Be3EKK3K.js} +0 -0
- /package/payload/server/public/assets/{array-D3d-WgFW.js → array-X0JlPOfd.js} +0 -0
- /package/payload/server/public/assets/{chunk-fQC6bEKA.js → chunk-CCr-iYLO.js} +0 -0
- /package/payload/server/public/assets/{cytoscape.esm-Cun-OM6a.js → cytoscape.esm-CI2IWMLB.js} +0 -0
- /package/payload/server/public/assets/{defaultLocale-CisKV5Ew.js → defaultLocale-B6RGN4id.js} +0 -0
- /package/payload/server/public/assets/{init-D9ZOVaZ3.js → init-BmUWJJHz.js} +0 -0
- /package/payload/server/public/assets/{katex-C-3ZDK8o.js → katex-BjZuzSQn.js} +0 -0
- /package/payload/server/public/assets/{path-BMOgQSLM.js → path-CoPyR7c2.js} +0 -0
- /package/payload/server/public/assets/{preload-helper-DL2DwvxV.js → preload-helper-BQrMkyGX.js} +0 -0
- /package/payload/server/public/assets/{rough.esm-BrTFrov0.js → rough.esm-jSt7UMyi.js} +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import{o as e,t}from"./chunk-CCr-iYLO.js";import{F as n,K as r,M as i,T as a,U as o,V as s,W as c,_ as l,b as u,g as d,p as f,x as p,y as m}from"./useSubAccountSwitcher-iQGqNJhI.js";import{C as h,S as g,n as _,p as v,t as y,v as b}from"./AdminShell-Gq8DU_ig.js";import{t as x}from"./chevron-left-CQ8rcBoO.js";import{n as S,t as ee}from"./maximize-2-BhR-Ec21.js";import{t as C}from"./rotate-ccw-D9qOBLig.js";import{i as te,n as w,r as ne}from"./graph-labels-Bx19ZYvJ.js";import{t as T}from"./useCopyFeedback-DN1WA5vU.js";var E=n(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),D=n(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),O=n(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),k=n(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),re=n(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]),ie=n(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),A=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.vis=n.vis||{}))})(e,(function(e){function t(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var n=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var i={exports:{}},a=function(e){return e&&e.Math===Math&&e},o=a(typeof globalThis==`object`&&globalThis)||a(typeof window==`object`&&window)||a(typeof self==`object`&&self)||a(typeof n==`object`&&n)||(function(){return this})()||n||Function(`return this`)(),s=function(e){try{return!!e()}catch{return!0}},c=!s(function(){var e=(function(){}).bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)}),l=c,u=Function.prototype,d=u.apply,f=u.call,p=typeof Reflect==`object`&&Reflect.apply||(l?f.bind(d):function(){return f.apply(d,arguments)}),m=c,h=Function.prototype,g=h.call,_=m&&h.bind.bind(g,g),v=m?_:function(e){return function(){return g.apply(e,arguments)}},y=v,b=y({}.toString),x=y(``.slice),S=function(e){return x(b(e),8,-1)},ee=S,C=v,te=function(e){if(ee(e)===`Function`)return C(e)},w=typeof document==`object`&&document.all,ne={all:w,IS_HTMLDDA:w===void 0&&w!==void 0},T=ne,E=T.all,D=T.IS_HTMLDDA?function(e){return typeof e==`function`||e===E}:function(e){return typeof e==`function`},O={},k=!s(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),re=c,ie=Function.prototype.call,A=re?ie.bind(ie):function(){return ie.apply(ie,arguments)},ae={},oe={}.propertyIsEnumerable,se=Object.getOwnPropertyDescriptor;ae.f=se&&!oe.call({1:2},1)?function(e){var t=se(this,e);return!!t&&t.enumerable}:oe;var ce=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},j=v,le=s,ue=S,de=Object,fe=j(``.split),pe=le(function(){return!de(`z`).propertyIsEnumerable(0)})?function(e){return ue(e)===`String`?fe(e,``):de(e)}:de,me=function(e){return e==null},he=me,ge=TypeError,_e=function(e){if(he(e))throw new ge(`Can't call method on `+e);return e},ve=pe,ye=_e,be=function(e){return ve(ye(e))},xe=D,M=ne,N=M.all,P=M.IS_HTMLDDA?function(e){return typeof e==`object`?e!==null:xe(e)||e===N}:function(e){return typeof e==`object`?e!==null:xe(e)},Se={},Ce=Se,we=o,Te=D,F=function(e){return Te(e)?e:void 0},I=function(e,t){return arguments.length<2?F(Ce[e])||F(we[e]):Ce[e]&&Ce[e][t]||we[e]&&we[e][t]},Ee=v({}.isPrototypeOf),De=typeof navigator<`u`&&String(navigator.userAgent)||``,Oe=o,ke=De,Ae=Oe.process,je=Oe.Deno,Me=Ae&&Ae.versions||je&&je.version,Ne=Me&&Me.v8,Pe,Fe;Ne&&(Pe=Ne.split(`.`),Fe=Pe[0]>0&&Pe[0]<4?1:+(Pe[0]+Pe[1])),!Fe&&ke&&(Pe=ke.match(/Edge\/(\d+)/),(!Pe||Pe[1]>=74)&&(Pe=ke.match(/Chrome\/(\d+)/),Pe&&(Fe=+Pe[1])));var Ie=Fe,Le=Ie,Re=s,ze=o.String,Be=!!Object.getOwnPropertySymbols&&!Re(function(){var e=Symbol(`symbol detection`);return!ze(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Le&&Le<41}),Ve=Be&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,He=I,Ue=D,We=Ee,Ge=Ve,Ke=Object,qe=Ge?function(e){return typeof e==`symbol`}:function(e){var t=He(`Symbol`);return Ue(t)&&We(t.prototype,Ke(e))},Je=String,Ye=function(e){try{return Je(e)}catch{return`Object`}},Xe=D,Ze=Ye,Qe=TypeError,$e=function(e){if(Xe(e))return e;throw new Qe(Ze(e)+` is not a function`)},et=$e,tt=me,nt=function(e,t){var n=e[t];return tt(n)?void 0:et(n)},rt=A,it=D,at=P,ot=TypeError,L=function(e,t){var n,r;if(t===`string`&&it(n=e.toString)&&!at(r=rt(n,e))||it(n=e.valueOf)&&!at(r=rt(n,e))||t!==`string`&&it(n=e.toString)&&!at(r=rt(n,e)))return r;throw new ot(`Can't convert object to primitive value`)},st={exports:{}},ct=!0,lt=o,ut=Object.defineProperty,dt=function(e,t){try{ut(lt,e,{value:t,configurable:!0,writable:!0})}catch{lt[e]=t}return t},ft=o,pt=dt,mt=`__core-js_shared__`,ht=ft[mt]||pt(mt,{}),gt=ht;(st.exports=function(e,t){return gt[e]||(gt[e]=t===void 0?{}:t)})(`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 _t=st.exports,vt=_e,yt=Object,bt=function(e){return yt(vt(e))},xt=v,St=bt,Ct=xt({}.hasOwnProperty),wt=Object.hasOwn||function(e,t){return Ct(St(e),t)},Tt=v,Et=0,Dt=Math.random(),Ot=Tt(1 .toString),kt=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+Ot(++Et+Dt,36)},At=o,jt=_t,Mt=wt,Nt=kt,Pt=Be,Ft=Ve,It=At.Symbol,Lt=jt(`wks`),Rt=Ft?It.for||It:It&&It.withoutSetter||Nt,zt=function(e){return Mt(Lt,e)||(Lt[e]=Pt&&Mt(It,e)?It[e]:Rt(`Symbol.`+e)),Lt[e]},Bt=A,Vt=P,Ht=qe,Ut=nt,Wt=L,Gt=zt,Kt=TypeError,qt=Gt(`toPrimitive`),Jt=function(e,t){if(!Vt(e)||Ht(e))return e;var n=Ut(e,qt),r;if(n){if(t===void 0&&(t=`default`),r=Bt(n,e,t),!Vt(r)||Ht(r))return r;throw new Kt(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),Wt(e,t)},Yt=qe,Xt=function(e){var t=Jt(e,`string`);return Yt(t)?t:t+``},Zt=o,Qt=P,$t=Zt.document,en=Qt($t)&&Qt($t.createElement),tn=function(e){return en?$t.createElement(e):{}},nn=k,rn=s,an=tn,on=!nn&&!rn(function(){return Object.defineProperty(an(`div`),`a`,{get:function(){return 7}}).a!==7}),sn=k,cn=A,ln=ae,un=ce,dn=be,fn=Xt,pn=wt,mn=on,hn=Object.getOwnPropertyDescriptor;O.f=sn?hn:function(e,t){if(e=dn(e),t=fn(t),mn)try{return hn(e,t)}catch{}if(pn(e,t))return un(!cn(ln.f,e,t),e[t])};var gn=s,_n=D,vn=/#|\.prototype\./,yn=function(e,t){var n=xn[bn(e)];return n===Cn?!0:n===Sn?!1:_n(t)?gn(t):!!t},bn=yn.normalize=function(e){return String(e).replace(vn,`.`).toLowerCase()},xn=yn.data={},Sn=yn.NATIVE=`N`,Cn=yn.POLYFILL=`P`,wn=yn,Tn=te,En=$e,Dn=c,On=Tn(Tn.bind),kn=function(e,t){return En(e),t===void 0?e:Dn?On(e,t):function(){return e.apply(t,arguments)}},An={},jn=k&&s(function(){return Object.defineProperty(function(){},`prototype`,{value:42,writable:!1}).prototype!==42}),Mn=P,Nn=String,Pn=TypeError,Fn=function(e){if(Mn(e))return e;throw new Pn(Nn(e)+` is not an object`)},In=k,Ln=on,Rn=jn,zn=Fn,Bn=Xt,Vn=TypeError,Hn=Object.defineProperty,Un=Object.getOwnPropertyDescriptor,Wn=`enumerable`,R=`configurable`,z=`writable`;An.f=In?Rn?function(e,t,n){if(zn(e),t=Bn(t),zn(n),typeof e==`function`&&t===`prototype`&&`value`in n&&z in n&&!n[z]){var r=Un(e,t);r&&r[z]&&(e[t]=n.value,n={configurable:R in n?n[R]:r[R],enumerable:Wn in n?n[Wn]:r[Wn],writable:!1})}return Hn(e,t,n)}:Hn:function(e,t,n){if(zn(e),t=Bn(t),zn(n),Ln)try{return Hn(e,t,n)}catch{}if(`get`in n||`set`in n)throw new Vn(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e};var Gn=k,Kn=An,qn=ce,Jn=Gn?function(e,t,n){return Kn.f(e,t,qn(1,n))}:function(e,t,n){return e[t]=n,e},Yn=o,Xn=p,Zn=te,Qn=D,$n=O.f,er=wn,tr=Se,nr=kn,rr=Jn,ir=wt,ar=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return Xn(e,this,arguments)};return t.prototype=e.prototype,t},B=function(e,t){var n=e.target,r=e.global,i=e.stat,a=e.proto,o=r?Yn:i?Yn[n]:(Yn[n]||{}).prototype,s=r?tr:tr[n]||rr(tr,n,{})[n],c=s.prototype,l,u,d,f,p,m,h,g,_;for(f in t)l=er(r?f:n+(i?`.`:`#`)+f,e.forced),u=!l&&o&&ir(o,f),m=s[f],u&&(e.dontCallGetSet?(_=$n(o,f),h=_&&_.value):h=o[f]),p=u&&h?h:t[f],!(u&&typeof m==typeof p)&&(g=e.bind&&u?nr(p,Yn):e.wrap&&u?ar(p):a&&Qn(p)?Zn(p):p,(e.sham||p&&p.sham||m&&m.sham)&&rr(g,`sham`,!0),rr(s,f,g),a&&(d=n+`Prototype`,ir(tr,d)||rr(tr,d,{}),rr(tr[d],f,p),e.real&&c&&(l||!c[f])&&rr(c,f,p)))},or=B,sr=k,cr=An.f;or({target:`Object`,stat:!0,forced:Object.defineProperty!==cr,sham:!sr},{defineProperty:cr});var lr=Se.Object,ur=i.exports=function(e,t,n){return lr.defineProperty(e,t,n)};lr.defineProperty.sham&&(ur.sham=!0);var dr=i.exports,fr=dr,pr=r(fr),mr=S,hr=Array.isArray||function(e){return mr(e)===`Array`},gr=Math.ceil,_r=Math.floor,vr=Math.trunc||function(e){var t=+e;return(t>0?_r:gr)(t)},yr=function(e){var t=+e;return t!==t||t===0?0:vr(t)},br=yr,xr=Math.min,Sr=function(e){return e>0?xr(br(e),9007199254740991):0},Cr=function(e){return Sr(e.length)},wr=TypeError,Tr=9007199254740991,Er=function(e){if(e>Tr)throw wr(`Maximum allowed index exceeded`);return e},Dr=Xt,Or=An,kr=ce,Ar=function(e,t,n){var r=Dr(t);r in e?Or.f(e,r,kr(0,n)):e[r]=n},jr=zt(`toStringTag`),Mr={};Mr[jr]=`z`;var Nr=String(Mr)===`[object z]`,Pr=Nr,Fr=D,Ir=S,Lr=zt(`toStringTag`),Rr=Object,zr=Ir(function(){return arguments}())===`Arguments`,Br=function(e,t){try{return e[t]}catch{}},Vr=Pr?Ir:function(e){var t,n,r;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=Br(t=Rr(e),Lr))==`string`?n:zr?Ir(t):(r=Ir(t))===`Object`&&Fr(t.callee)?`Arguments`:r},Hr=v,Ur=D,Wr=ht,Gr=Hr(Function.toString);Ur(Wr.inspectSource)||(Wr.inspectSource=function(e){return Gr(e)});var Kr=Wr.inspectSource,qr=v,Jr=s,Yr=D,Xr=Vr,Zr=I,V=Kr,Qr=function(){},$r=[],ei=Zr(`Reflect`,`construct`),ti=/^\s*(?:class|function)\b/,ni=qr(ti.exec),ri=!ti.test(Qr),ii=function(e){if(!Yr(e))return!1;try{return ei(Qr,$r,e),!0}catch{return!1}},ai=function(e){if(!Yr(e))return!1;switch(Xr(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return ri||!!ni(ti,V(e))}catch{return!0}};ai.sham=!0;var oi=!ei||Jr(function(){var e;return ii(ii.call)||!ii(Object)||!ii(function(){e=!0})||e})?ai:ii,si=hr,ci=oi,li=P,ui=zt(`species`),di=Array,fi=function(e){var t;return si(e)&&(t=e.constructor,ci(t)&&(t===di||si(t.prototype))?t=void 0:li(t)&&(t=t[ui],t===null&&(t=void 0))),t===void 0?di:t},pi=function(e,t){return new(fi(e))(t===0?0:t)},mi=s,hi=zt,gi=Ie,_i=hi(`species`),vi=function(e){return gi>=51||!mi(function(){var t=[],n=t.constructor={};return n[_i]=function(){return{foo:1}},t[e](Boolean).foo!==1})},yi=B,bi=s,xi=hr,Si=P,Ci=bt,wi=Cr,Ti=Er,Ei=Ar,Di=pi,Oi=vi,ki=zt,Ai=Ie,ji=ki(`isConcatSpreadable`),Mi=Ai>=51||!bi(function(){var e=[];return e[ji]=!1,e.concat()[0]!==e}),Ni=function(e){if(!Si(e))return!1;var t=e[ji];return t===void 0?xi(e):!!t};yi({target:`Array`,proto:!0,arity:1,forced:!Mi||!Oi(`concat`)},{concat:function(e){var t=Ci(this),n=Di(t,0),r=0,i,a,o,s,c;for(i=-1,o=arguments.length;i<o;i++)if(c=i===-1?t:arguments[i],Ni(c))for(s=wi(c),Ti(r+s),a=0;a<s;a++,r++)a in c&&Ei(n,r,c[a]);else Ti(r+1),Ei(n,r++,c);return n.length=r,n}});var Pi=Vr,Fi=String,Ii=function(e){if(Pi(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return Fi(e)},Li={},Ri=yr,zi=Math.max,Bi=Math.min,Vi=function(e,t){var n=Ri(e);return n<0?zi(n+t,0):Bi(n,t)},Hi=be,Ui=Vi,Wi=Cr,Gi=function(e){return function(t,n,r){var i=Hi(t),a=Wi(i),o=Ui(r,a),s;if(e&&n!==n){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},Ki={includes:Gi(!0),indexOf:Gi(!1)},qi={},Ji=v,Yi=wt,Xi=be,Zi=Ki.indexOf,Qi=qi,$i=Ji([].push),ea=function(e,t){var n=Xi(e),r=0,i=[],a;for(a in n)!Yi(Qi,a)&&Yi(n,a)&&$i(i,a);for(;t.length>r;)Yi(n,a=t[r++])&&(~Zi(i,a)||$i(i,a));return i},ta=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],na=ea,ra=ta,ia=Object.keys||function(e){return na(e,ra)},aa=k,oa=jn,sa=An,ca=Fn,la=be,ua=ia;Li.f=aa&&!oa?Object.defineProperties:function(e,t){ca(e);for(var n=la(t),r=ua(t),i=r.length,a=0,o;i>a;)sa.f(e,o=r[a++],n[o]);return e};var da=I(`document`,`documentElement`),fa=_t,pa=kt,ma=fa(`keys`),ha=function(e){return ma[e]||(ma[e]=pa(e))},ga=Fn,_a=Li,va=ta,ya=qi,ba=da,xa=tn,Sa=ha,Ca=`>`,wa=`<`,Ta=`prototype`,Ea=`script`,Da=Sa(`IE_PROTO`),Oa=function(){},ka=function(e){return wa+Ea+Ca+e+wa+`/`+Ea+Ca},Aa=function(e){e.write(ka(``)),e.close();var t=e.parentWindow.Object;return e=null,t},ja=function(){var e=xa(`iframe`),t=`java`+Ea+`:`,n;return e.style.display=`none`,ba.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(ka(`document.F=Object`)),n.close(),n.F},Ma,Na=function(){try{Ma=new ActiveXObject(`htmlfile`)}catch{}Na=typeof document<`u`?document.domain&&Ma?Aa(Ma):ja():Aa(Ma);for(var e=va.length;e--;)delete Na[Ta][va[e]];return Na()};ya[Da]=!0;var Pa=Object.create||function(e,t){var n;return e===null?n=Na():(Oa[Ta]=ga(e),n=new Oa,Oa[Ta]=null,n[Da]=e),t===void 0?n:_a.f(n,t)},Fa={},Ia=ea,La=ta.concat(`length`,`prototype`);Fa.f=Object.getOwnPropertyNames||function(e){return Ia(e,La)};var Ra={},za=Vi,Ba=Cr,Va=Ar,Ha=Array,Ua=Math.max,Wa=function(e,t,n){for(var r=Ba(e),i=za(t,r),a=za(n===void 0?r:n,r),o=Ha(Ua(a-i,0)),s=0;i<a;i++,s++)Va(o,s,e[i]);return o.length=s,o},Ga=S,Ka=be,qa=Fa.f,Ja=Wa,Ya=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Xa=function(e){try{return qa(e)}catch{return Ja(Ya)}};Ra.f=function(e){return Ya&&Ga(e)===`Window`?Xa(e):qa(Ka(e))};var Za={};Za.f=Object.getOwnPropertySymbols;var Qa=Jn,$a=function(e,t,n,r){return r&&r.enumerable?e[t]=n:Qa(e,t,n),e},eo=An,to=function(e,t,n){return eo.f(e,t,n)},no={};no.f=zt;var ro=Se,io=wt,ao=no,oo=An.f,so=function(e){var t=ro.Symbol||={};io(t,e)||oo(t,e,{value:ao.f(e)})},co=A,lo=I,uo=zt,fo=$a,po=function(){var e=lo(`Symbol`),t=e&&e.prototype,n=t&&t.valueOf,r=uo(`toPrimitive`);t&&!t[r]&&fo(t,r,function(e){return co(n,this)},{arity:1})},mo=Nr,ho=Vr,go=mo?{}.toString:function(){return`[object `+ho(this)+`]`},_o=Nr,vo=An.f,yo=Jn,bo=wt,xo=go,So=zt(`toStringTag`),Co=function(e,t,n,r){if(e){var i=n?e:e.prototype;bo(i,So)||vo(i,So,{configurable:!0,value:t}),r&&!_o&&yo(i,`toString`,xo)}},wo=o,To=D,Eo=wo.WeakMap,Do=To(Eo)&&/native code/.test(String(Eo)),Oo=o,ko=P,Ao=Jn,jo=wt,Mo=ht,No=ha,Po=qi,Fo=`Object already initialized`,Io=Oo.TypeError,Lo=Oo.WeakMap,Ro,zo,Bo,Vo=function(e){return Bo(e)?zo(e):Ro(e,{})},Ho=function(e){return function(t){var n;if(!ko(t)||(n=zo(t)).type!==e)throw new Io(`Incompatible receiver, `+e+` required`);return n}};if(Do||Mo.state){var Uo=Mo.state||=new Lo;Uo.get=Uo.get,Uo.has=Uo.has,Uo.set=Uo.set,Ro=function(e,t){if(Uo.has(e))throw new Io(Fo);return t.facade=e,Uo.set(e,t),t},zo=function(e){return Uo.get(e)||{}},Bo=function(e){return Uo.has(e)}}else{var Wo=No(`state`);Po[Wo]=!0,Ro=function(e,t){if(jo(e,Wo))throw new Io(Fo);return t.facade=e,Ao(e,Wo,t),t},zo=function(e){return jo(e,Wo)?e[Wo]:{}},Bo=function(e){return jo(e,Wo)}}var Go={set:Ro,get:zo,has:Bo,enforce:Vo,getterFor:Ho},Ko=kn,qo=v,Jo=pe,Yo=bt,Xo=Cr,Zo=pi,Qo=qo([].push),$o=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(c,l,u,d){for(var f=Yo(c),p=Jo(f),m=Ko(l,u),h=Xo(p),g=0,_=d||Zo,v=t?_(c,h):n||o?_(c,0):void 0,y,b;h>g;g++)if((s||g in p)&&(y=p[g],b=m(y,g,f),e))if(t)v[g]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return g;case 2:Qo(v,y)}else switch(e){case 4:return!1;case 7:Qo(v,y)}return a?-1:r||i?i:v}},es={forEach:$o(0),map:$o(1),filter:$o(2),some:$o(3),every:$o(4),find:$o(5),findIndex:$o(6),filterReject:$o(7)},ts=B,ns=o,rs=A,is=v,as=k,os=Be,ss=s,cs=wt,ls=Ee,us=Fn,ds=be,fs=Xt,ps=Ii,ms=ce,hs=Pa,gs=ia,_s=Fa,vs=Ra,ys=Za,bs=O,xs=An,Ss=Li,Cs=ae,ws=$a,Ts=to,Es=_t,Ds=ha,Os=qi,ks=kt,As=zt,js=no,Ms=so,Ns=po,Ps=Co,Fs=Go,Is=es.forEach,Ls=Ds(`hidden`),Rs=`Symbol`,zs=`prototype`,Bs=Fs.set,Vs=Fs.getterFor(Rs),Hs=Object[zs],Us=ns.Symbol,Ws=Us&&Us[zs],Gs=ns.RangeError,Ks=ns.TypeError,qs=ns.QObject,Js=bs.f,Ys=xs.f,Xs=vs.f,Zs=Cs.f,Qs=is([].push),$s=Es(`symbols`),ec=Es(`op-symbols`),tc=Es(`wks`),nc=!qs||!qs[zs]||!qs[zs].findChild,rc=function(e,t,n){var r=Js(Hs,t);r&&delete Hs[t],Ys(e,t,n),r&&e!==Hs&&Ys(Hs,t,r)},ic=as&&ss(function(){return hs(Ys({},`a`,{get:function(){return Ys(this,`a`,{value:7}).a}})).a!==7})?rc:Ys,ac=function(e,t){var n=$s[e]=hs(Ws);return Bs(n,{type:Rs,tag:e,description:t}),as||(n.description=t),n},oc=function(e,t,n){e===Hs&&oc(ec,t,n),us(e);var r=fs(t);return us(n),cs($s,r)?(n.enumerable?(cs(e,Ls)&&e[Ls][r]&&(e[Ls][r]=!1),n=hs(n,{enumerable:ms(0,!1)})):(cs(e,Ls)||Ys(e,Ls,ms(1,{})),e[Ls][r]=!0),ic(e,r,n)):Ys(e,r,n)},sc=function(e,t){us(e);var n=ds(t);return Is(gs(n).concat(fc(n)),function(t){(!as||rs(lc,n,t))&&oc(e,t,n[t])}),e},cc=function(e,t){return t===void 0?hs(e):sc(hs(e),t)},lc=function(e){var t=fs(e),n=rs(Zs,this,t);return this===Hs&&cs($s,t)&&!cs(ec,t)?!1:n||!cs(this,t)||!cs($s,t)||cs(this,Ls)&&this[Ls][t]?n:!0},uc=function(e,t){var n=ds(e),r=fs(t);if(!(n===Hs&&cs($s,r)&&!cs(ec,r))){var i=Js(n,r);return i&&cs($s,r)&&!(cs(n,Ls)&&n[Ls][r])&&(i.enumerable=!0),i}},dc=function(e){var t=Xs(ds(e)),n=[];return Is(t,function(e){!cs($s,e)&&!cs(Os,e)&&Qs(n,e)}),n},fc=function(e){var t=e===Hs,n=Xs(t?ec:ds(e)),r=[];return Is(n,function(e){cs($s,e)&&(!t||cs(Hs,e))&&Qs(r,$s[e])}),r};os||(Us=function(){if(ls(Ws,this))throw new Ks(`Symbol is not a constructor`);var e=!arguments.length||arguments[0]===void 0?void 0:ps(arguments[0]),t=ks(e),n=function(e){var r=this===void 0?ns:this;r===Hs&&rs(n,ec,e),cs(r,Ls)&&cs(r[Ls],t)&&(r[Ls][t]=!1);var i=ms(1,e);try{ic(r,t,i)}catch(e){if(!(e instanceof Gs))throw e;rc(r,t,i)}};return as&&nc&&ic(Hs,t,{configurable:!0,set:n}),ac(t,e)},Ws=Us[zs],ws(Ws,`toString`,function(){return Vs(this).tag}),ws(Us,`withoutSetter`,function(e){return ac(ks(e),e)}),Cs.f=lc,xs.f=oc,Ss.f=sc,bs.f=uc,_s.f=vs.f=dc,ys.f=fc,js.f=function(e){return ac(As(e),e)},as&&Ts(Ws,`description`,{configurable:!0,get:function(){return Vs(this).description}})),ts({global:!0,constructor:!0,wrap:!0,forced:!os,sham:!os},{Symbol:Us}),Is(gs(tc),function(e){Ms(e)}),ts({target:Rs,stat:!0,forced:!os},{useSetter:function(){nc=!0},useSimple:function(){nc=!1}}),ts({target:`Object`,stat:!0,forced:!os,sham:!as},{create:cc,defineProperty:oc,defineProperties:sc,getOwnPropertyDescriptor:uc}),ts({target:`Object`,stat:!0,forced:!os},{getOwnPropertyNames:dc}),Ns(),Ps(Us,Rs),Os[Ls]=!0;var pc=Be&&!!Symbol.for&&!!Symbol.keyFor,mc=B,hc=I,gc=wt,_c=Ii,vc=_t,yc=pc,bc=vc(`string-to-symbol-registry`),H=vc(`symbol-to-string-registry`);mc({target:`Symbol`,stat:!0,forced:!yc},{for:function(e){var t=_c(e);if(gc(bc,t))return bc[t];var n=hc(`Symbol`)(t);return bc[t]=n,H[n]=t,n}});var xc=B,Sc=wt,Cc=qe,wc=Ye,Tc=_t,Ec=pc,Dc=Tc(`symbol-to-string-registry`);xc({target:`Symbol`,stat:!0,forced:!Ec},{keyFor:function(e){if(!Cc(e))throw TypeError(wc(e)+` is not a symbol`);if(Sc(Dc,e))return Dc[e]}});var Oc=v([].slice),kc=v,Ac=hr,jc=D,Mc=S,Nc=Ii,Pc=kc([].push),Fc=function(e){if(jc(e))return e;if(Ac(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i==`string`?Pc(n,i):(typeof i==`number`||Mc(i)===`Number`||Mc(i)===`String`)&&Pc(n,Nc(i))}var a=n.length,o=!0;return function(e,t){if(o)return o=!1,t;if(Ac(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},Ic=B,Lc=I,Rc=p,zc=A,Bc=v,Vc=s,Hc=D,Uc=qe,Wc=Oc,Gc=Fc,Kc=Be,qc=String,Jc=Lc(`JSON`,`stringify`),Yc=Bc(/./.exec),Xc=Bc(``.charAt),Zc=Bc(``.charCodeAt),Qc=Bc(``.replace),$c=Bc(1 .toString),el=/[\uD800-\uDFFF]/g,tl=/^[\uD800-\uDBFF]$/,nl=/^[\uDC00-\uDFFF]$/,rl=!Kc||Vc(function(){var e=Lc(`Symbol`)(`stringify detection`);return Jc([e])!==`[null]`||Jc({a:e})!==`{}`||Jc(Object(e))!==`{}`}),il=Vc(function(){return Jc(`\udf06\ud834`)!==`"\\udf06\\ud834"`||Jc(`\udead`)!==`"\\udead"`}),al=function(e,t){var n=Wc(arguments),r=Gc(t);if(!(!Hc(r)&&(e===void 0||Uc(e))))return n[1]=function(e,t){if(Hc(r)&&(t=zc(r,this,qc(e),t)),!Uc(t))return t},Rc(Jc,null,n)},ol=function(e,t,n){var r=Xc(n,t-1),i=Xc(n,t+1);return Yc(tl,e)&&!Yc(nl,i)||Yc(nl,e)&&!Yc(tl,r)?`\\u`+$c(Zc(e,0),16):e};Jc&&Ic({target:`JSON`,stat:!0,arity:3,forced:rl||il},{stringify:function(e,t,n){var r=Wc(arguments),i=Rc(rl?al:Jc,null,r);return il&&typeof i==`string`?Qc(i,el,ol):i}});var sl=B,cl=Be,ll=s,ul=Za,dl=bt;sl({target:`Object`,stat:!0,forced:!cl||ll(function(){ul.f(1)})},{getOwnPropertySymbols:function(e){var t=ul.f;return t?t(dl(e)):[]}}),so(`asyncIterator`),so(`hasInstance`),so(`isConcatSpreadable`),so(`iterator`),so(`match`),so(`matchAll`),so(`replace`),so(`search`),so(`species`),so(`split`);var fl=so,pl=po;fl(`toPrimitive`),pl();var ml=I,hl=so,gl=Co;hl(`toStringTag`),gl(ml(`Symbol`),`Symbol`),so(`unscopables`),Co(o.JSON,`JSON`,!0);var _l=Se.Symbol,vl={},yl=k,bl=wt,xl=Function.prototype,Sl=yl&&Object.getOwnPropertyDescriptor,Cl=bl(xl,`name`),wl={EXISTS:Cl,PROPER:Cl&&(function(){}).name===`something`,CONFIGURABLE:Cl&&(!yl||yl&&Sl(xl,`name`).configurable)},Tl=!s(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),El=wt,Dl=D,Ol=bt,kl=ha,Al=Tl,jl=kl(`IE_PROTO`),Ml=Object,Nl=Ml.prototype,Pl=Al?Ml.getPrototypeOf:function(e){var t=Ol(e);if(El(t,jl))return t[jl];var n=t.constructor;return Dl(n)&&t instanceof n?n.prototype:t instanceof Ml?Nl:null},Fl=s,Il=D,Ll=P,Rl=Pa,zl=Pl,Bl=$a,Vl=zt(`iterator`),Hl=!1,Ul,Wl,Gl;[].keys&&(Gl=[].keys(),`next`in Gl?(Wl=zl(zl(Gl)),Wl!==Object.prototype&&(Ul=Wl)):Hl=!0),Ul=!Ll(Ul)||Fl(function(){var e={};return Ul[Vl].call(e)!==e})?{}:Rl(Ul),Il(Ul[Vl])||Bl(Ul,Vl,function(){return this});var Kl={IteratorPrototype:Ul,BUGGY_SAFARI_ITERATORS:Hl},ql=Kl.IteratorPrototype,Jl=Pa,Yl=ce,Xl=Co,Zl=vl,Ql=function(){return this},$l=function(e,t,n,r){var i=t+` Iterator`;return e.prototype=Jl(ql,{next:Yl(+!r,n)}),Xl(e,i,!1,!0),Zl[i]=Ql,e},eu=v,tu=$e,nu=function(e,t,n){try{return eu(tu(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},ru=D,iu=String,au=TypeError,ou=function(e){if(typeof e==`object`||ru(e))return e;throw new au(`Can't set `+iu(e)+` as a prototype`)},su=nu,cu=Fn,lu=ou,uu=Object.setPrototypeOf||(`__proto__`in{}?function(){var e=!1,t={},n;try{n=su(Object.prototype,`__proto__`,`set`),n(t,[]),e=t instanceof Array}catch{}return function(t,r){return cu(t),lu(r),e?n(t,r):t.__proto__=r,t}}():void 0),du=B,fu=A,pu=wl,mu=$l,hu=Pl,gu=Co,_u=$a,vu=zt,yu=vl,bu=Kl,xu=pu.PROPER;pu.CONFIGURABLE,bu.IteratorPrototype;var Su=bu.BUGGY_SAFARI_ITERATORS,Cu=vu(`iterator`),wu=`keys`,Tu=`values`,Eu=`entries`,Du=function(){return this},Ou=function(e,t,n,r,i,a,o){mu(n,t,r);var s=function(e){if(e===i&&f)return f;if(!Su&&e&&e in u)return u[e];switch(e){case wu:return function(){return new n(this,e)};case Tu:return function(){return new n(this,e)};case Eu:return function(){return new n(this,e)}}return function(){return new n(this)}},c=t+` Iterator`,l=!1,u=e.prototype,d=u[Cu]||u[`@@iterator`]||i&&u[i],f=!Su&&d||s(i),p=t===`Array`&&u.entries||d,m,h,g;if(p&&(m=hu(p.call(new e)),m!==Object.prototype&&m.next&&(gu(m,c,!0,!0),yu[c]=Du)),xu&&i===Tu&&d&&d.name!==Tu&&(l=!0,f=function(){return fu(d,this)}),i)if(h={values:s(Tu),keys:a?f:s(wu),entries:s(Eu)},o)for(g in h)(Su||l||!(g in u))&&_u(u,g,h[g]);else du({target:t,proto:!0,forced:Su||l},h);return o&&u[Cu]!==f&&_u(u,Cu,f,{name:i}),yu[t]=f,h},ku=function(e,t){return{value:e,done:t}},Au=be,ju=vl,Mu=Go;An.f;var Nu=Ou,Pu=ku,Fu=`Array Iterator`,Iu=Mu.set,Lu=Mu.getterFor(Fu);Nu(Array,`Array`,function(e,t){Iu(this,{type:Fu,target:Au(e),index:0,kind:t})},function(){var e=Lu(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,Pu(void 0,!0);switch(e.kind){case`keys`:return Pu(n,!1);case`values`:return Pu(t[n],!1)}return Pu([n,t[n]],!1)},`values`),ju.Arguments=ju.Array;var Ru={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},zu=o,Bu=Vr,Vu=Jn,Hu=vl,Uu=zt(`toStringTag`);for(var Wu in Ru){var Gu=zu[Wu],Ku=Gu&&Gu.prototype;Ku&&Bu(Ku)!==Uu&&Vu(Ku,Uu,Wu),Hu[Wu]=Hu.Array}var qu=_l,Ju=zt,Yu=An.f,Xu=Ju(`metadata`),Zu=Function.prototype;Zu[Xu]===void 0&&Yu(Zu,Xu,{value:null}),so(`asyncDispose`),so(`dispose`),so(`metadata`);var Qu=qu,$u=I,ed=v,td=$u(`Symbol`),nd=td.keyFor,rd=ed(td.prototype.valueOf),id=td.isRegisteredSymbol||function(e){try{return nd(rd(e))!==void 0}catch{return!1}};B({target:`Symbol`,stat:!0},{isRegisteredSymbol:id});for(var ad=_t,od=I,sd=v,cd=qe,ld=zt,ud=od(`Symbol`),dd=ud.isWellKnownSymbol,fd=od(`Object`,`getOwnPropertyNames`),pd=sd(ud.prototype.valueOf),md=ad(`wks`),hd=0,gd=fd(ud),_d=gd.length;hd<_d;hd++)try{var vd=gd[hd];cd(ud[vd])&&ld(vd)}catch{}var yd=function(e){if(dd&&dd(e))return!0;try{for(var t=pd(e),n=0,r=fd(md),i=r.length;n<i;n++)if(md[r[n]]==t)return!0}catch{}return!1};B({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:yd}),so(`matcher`),so(`observable`),B({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:id}),B({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:yd}),so(`metadataKey`),so(`patternMatch`),so(`replaceAll`);var bd=Qu,xd=r(bd),Sd=v,Cd=yr,wd=Ii,Td=_e,Ed=Sd(``.charAt),Dd=Sd(``.charCodeAt),Od=Sd(``.slice),kd=function(e){return function(t,n){var r=wd(Td(t)),i=Cd(n),a=r.length,o,s;return i<0||i>=a?e?``:void 0:(o=Dd(r,i),o<55296||o>56319||i+1===a||(s=Dd(r,i+1))<56320||s>57343?e?Ed(r,i):o:e?Od(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},Ad={codeAt:kd(!1),charAt:kd(!0)}.charAt,jd=Ii,Md=Go,Nd=Ou,Pd=ku,Fd=`String Iterator`,Id=Md.set,Ld=Md.getterFor(Fd);Nd(String,`String`,function(e){Id(this,{type:Fd,string:jd(e),index:0})},function(){var e=Ld(this),t=e.string,n=e.index,r;return n>=t.length?Pd(void 0,!0):(r=Ad(t,n),e.index+=r.length,Pd(r,!1))});var Rd=no.f(`iterator`),zd=Rd,Bd=r(zd);function Vd(e){"@babel/helpers - typeof";return Vd=typeof xd==`function`&&typeof Bd==`symbol`?function(e){return typeof e}:function(e){return e&&typeof xd==`function`&&e.constructor===xd&&e!==xd.prototype?`symbol`:typeof e},Vd(e)}var Hd=r(no.f(`toPrimitive`));function Ud(e,t){if(Vd(e)!==`object`||e===null)return e;var n=e[Hd];if(n!==void 0){var r=n.call(e,t||`default`);if(Vd(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Wd(e){var t=Ud(e,`string`);return Vd(t)===`symbol`?t:String(t)}function Gd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),pr(e,Wd(r.key),r)}}function Kd(e,t,n){return t&&Gd(e.prototype,t),n&&Gd(e,n),pr(e,`prototype`,{writable:!1}),e}function qd(e,t,n){return t=Wd(t),t in e?pr(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Jd=v,Yd=$e,Xd=P,Zd=wt,Qd=Oc,$d=c,ef=Function,tf=Jd([].concat),nf=Jd([].join),rf={},af=function(e,t,n){if(!Zd(rf,t)){for(var r=[],i=0;i<t;i++)r[i]=`a[`+i+`]`;rf[t]=ef(`C,a`,`return new C(`+nf(r,`,`)+`)`)}return rf[t](e,n)},of=$d?ef.bind:function(e){var t=Yd(this),n=t.prototype,r=Qd(arguments,1),i=function(){var n=tf(r,Qd(arguments));return this instanceof i?af(t,n.length,n):t.apply(e,n)};return Xd(n)&&(i.prototype=n),i},sf=B,cf=of;sf({target:`Function`,proto:!0,forced:Function.bind!==cf},{bind:cf});var lf=o,uf=Se,df=function(e,t){var n=uf[e+`Prototype`],r=n&&n[t];if(r)return r;var i=lf[e],a=i&&i.prototype;return a&&a[t]},ff=df(`Function`,`bind`),pf=Ee,mf=ff,hf=Function.prototype,gf=function(e){var t=e.bind;return e===hf||pf(hf,e)&&t===hf.bind?mf:t},_f=r(gf),vf=$e,yf=bt,bf=pe,xf=Cr,Sf=TypeError,Cf=function(e){return function(t,n,r,i){vf(n);var a=yf(t),o=bf(a),s=xf(a),c=e?s-1:0,l=e?-1:1;if(r<2)for(;;){if(c in o){i=o[c],c+=l;break}if(c+=l,e?c<0:s<=c)throw new Sf(`Reduce of empty array with no initial value`)}for(;e?c>=0:s>c;c+=l)c in o&&(i=n(i,o[c],c,a));return i}},wf={left:Cf(!1),right:Cf(!0)},U=s,Tf=function(e,t){var n=[][e];return!!n&&U(function(){n.call(null,t||function(){return 1},1)})},Ef=S(o.process)===`process`,Df=B,Of=wf.left,kf=Tf,Af=Ie;Df({target:`Array`,proto:!0,forced:!Ef&&Af>79&&Af<83||!kf(`reduce`)},{reduce:function(e){var t=arguments.length;return Of(this,e,t,t>1?arguments[1]:void 0)}});var jf=df(`Array`,`reduce`),Mf=Ee,Nf=jf,Pf=Array.prototype,Ff=r(function(e){var t=e.reduce;return e===Pf||Mf(Pf,e)&&t===Pf.reduce?Nf:t}),If=B,Lf=es.filter;If({target:`Array`,proto:!0,forced:!vi(`filter`)},{filter:function(e){return Lf(this,e,arguments.length>1?arguments[1]:void 0)}});var Rf=df(`Array`,`filter`),zf=Ee,Bf=Rf,Vf=Array.prototype,Hf=r(function(e){var t=e.filter;return e===Vf||zf(Vf,e)&&t===Vf.filter?Bf:t}),Uf=B,Wf=es.map;Uf({target:`Array`,proto:!0,forced:!vi(`map`)},{map:function(e){return Wf(this,e,arguments.length>1?arguments[1]:void 0)}});var Gf=df(`Array`,`map`),Kf=Ee,qf=Gf,Jf=Array.prototype,Yf=r(function(e){var t=e.map;return e===Jf||Kf(Jf,e)&&t===Jf.map?qf:t}),Xf=hr,Zf=Cr,Qf=Er,$f=kn,ep=function(e,t,n,r,i,a,o,s){for(var c=i,l=0,u=o?$f(o,s):!1,d,f;l<r;)l in n&&(d=u?u(n[l],l,t):n[l],a>0&&Xf(d)?(f=Zf(d),c=ep(e,t,d,f,c,a-1)-1):(Qf(c+1),e[c]=d),c++),l++;return c},tp=ep,np=B,rp=tp,ip=$e,ap=bt,op=Cr,sp=pi;np({target:`Array`,proto:!0},{flatMap:function(e){var t=ap(this),n=op(t),r;return ip(e),r=sp(t,0),r.length=rp(r,t,t,n,0,1,e,arguments.length>1?arguments[1]:void 0),r}});var cp=df(`Array`,`flatMap`),lp=Ee,up=cp,dp=Array.prototype,fp=r(function(e){var t=e.flatMap;return e===dp||lp(dp,e)&&t===dp.flatMap?up:t});function pp(e){return new hp(e)}var mp=function(){function e(n,r,i){var a,o,s;t(this,e),qd(this,`_listeners`,{add:_f(a=this._add).call(a,this),remove:_f(o=this._remove).call(o,this),update:_f(s=this._update).call(s,this)}),this._source=n,this._transformers=r,this._target=i}return Kd(e,[{key:`all`,value:function(){return this._target.update(this._transformItems(this._source.get())),this}},{key:`start`,value:function(){return this._source.on(`add`,this._listeners.add),this._source.on(`remove`,this._listeners.remove),this._source.on(`update`,this._listeners.update),this}},{key:`stop`,value:function(){return this._source.off(`add`,this._listeners.add),this._source.off(`remove`,this._listeners.remove),this._source.off(`update`,this._listeners.update),this}},{key:`_transformItems`,value:function(e){var t;return Ff(t=this._transformers).call(t,function(e,t){return t(e)},e)}},{key:`_add`,value:function(e,t){t!=null&&this._target.add(this._transformItems(this._source.get(t.items)))}},{key:`_update`,value:function(e,t){t!=null&&this._target.update(this._transformItems(this._source.get(t.items)))}},{key:`_remove`,value:function(e,t){t!=null&&this._target.remove(this._transformItems(t.oldData))}}]),e}(),hp=function(){function e(n){t(this,e),qd(this,`_transformers`,[]),this._source=n}return Kd(e,[{key:`filter`,value:function(e){return this._transformers.push(function(t){return Hf(t).call(t,e)}),this}},{key:`map`,value:function(e){return this._transformers.push(function(t){return Yf(t).call(t,e)}),this}},{key:`flatMap`,value:function(e){return this._transformers.push(function(t){return fp(t).call(t,e)}),this}},{key:`to`,value:function(e){return new mp(this._source,this._transformers,e)}}]),e}(),gp=A,_p=Fn,vp=nt,yp=function(e,t,n){var r,i;_p(e);try{if(r=vp(e,`return`),!r){if(t===`throw`)throw n;return n}r=gp(r,e)}catch(e){i=!0,r=e}if(t===`throw`)throw n;if(i)throw r;return _p(r),n},bp=Fn,xp=yp,Sp=function(e,t,n,r){try{return r?t(bp(n)[0],n[1]):t(n)}catch(t){xp(e,`throw`,t)}},Cp=zt,wp=vl,Tp=Cp(`iterator`),Ep=Array.prototype,Dp=function(e){return e!==void 0&&(wp.Array===e||Ep[Tp]===e)},Op=Vr,kp=nt,Ap=me,jp=vl,Mp=zt(`iterator`),Np=function(e){if(!Ap(e))return kp(e,Mp)||kp(e,`@@iterator`)||jp[Op(e)]},Pp=A,Fp=$e,Ip=Fn,Lp=Ye,Rp=Np,zp=TypeError,Bp=function(e,t){var n=arguments.length<2?Rp(e):t;if(Fp(n))return Ip(Pp(n,e));throw new zp(Lp(e)+` is not iterable`)},Vp=kn,Hp=A,Up=bt,Wp=Sp,Gp=Dp,Kp=oi,qp=Cr,Jp=Ar,Yp=Bp,Xp=Np,Zp=Array,Qp=function(e){var t=Up(e),n=Kp(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=i!==void 0;a&&(i=Vp(i,r>2?arguments[2]:void 0));var o=Xp(t),s=0,c,l,u,d,f,p;if(o&&!(this===Zp&&Gp(o)))for(d=Yp(t,o),f=d.next,l=n?new this:[];!(u=Hp(f,d)).done;s++)p=a?Wp(d,i,[u.value,s],!0):u.value,Jp(l,s,p);else for(c=qp(t),l=n?new this(c):Zp(c);c>s;s++)p=a?i(t[s],s):t[s],Jp(l,s,p);return l.length=s,l},$p=zt(`iterator`),em=!1;try{var tm=0,nm={next:function(){return{done:!!tm++}},return:function(){em=!0}};nm[$p]=function(){return this},Array.from(nm,function(){throw 2})}catch{}var rm=function(e,t){try{if(!t&&!em)return!1}catch{return!1}var n=!1;try{var r={};r[$p]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},im=B,am=Qp;im({target:`Array`,stat:!0,forced:!rm(function(e){Array.from(e)})},{from:am});var om=Se.Array.from,sm=r(om),cm=Np,lm=r(cm),um=r(cm);B({target:`Array`,stat:!0},{isArray:hr});var dm=Se.Array.isArray,fm=r(dm);function pm(e){if(fm(e))return e}var mm=k,hm=hr,gm=TypeError,_m=Object.getOwnPropertyDescriptor,vm=mm&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],`length`,{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(hm(e)&&!_m(e,`length`).writable)throw new gm(`Cannot set read only .length`);return e.length=t}:function(e,t){return e.length=t},ym=B,bm=bt,xm=Cr,Sm=vm,Cm=Er;ym({target:`Array`,proto:!0,arity:1,forced:s(function(){return[].push.call({length:4294967296},1)!==4294967297})||!function(){try{Object.defineProperty([],`length`,{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=bm(this),n=xm(t),r=arguments.length;Cm(n+r);for(var i=0;i<r;i++)t[n]=arguments[i],n++;return Sm(t,n),n}});var wm=df(`Array`,`push`),Tm=Ee,Em=wm,Dm=Array.prototype,Om=function(e){var t=e.push;return e===Dm||Tm(Dm,e)&&t===Dm.push?Em:t},km=r(Om);function Am(e,t){var n=e==null?null:xd!==void 0&&lm(e)||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(km(s).call(s,r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}var jm=B,Mm=hr,Nm=oi,Pm=P,Fm=Vi,Im=Cr,Lm=be,Rm=Ar,zm=zt,Bm=vi,Vm=Oc,Hm=Bm(`slice`),Um=zm(`species`),Wm=Array,Gm=Math.max;jm({target:`Array`,proto:!0,forced:!Hm},{slice:function(e,t){var n=Lm(this),r=Im(n),i=Fm(e,r),a=Fm(t===void 0?r:t,r),o,s,c;if(Mm(n)&&(o=n.constructor,Nm(o)&&(o===Wm||Mm(o.prototype))?o=void 0:Pm(o)&&(o=o[Um],o===null&&(o=void 0)),o===Wm||o===void 0))return Vm(n,i,a);for(s=new(o===void 0?Wm:o)(Gm(a-i,0)),c=0;i<a;i++,c++)i in n&&Rm(s,c,n[i]);return s.length=c,s}});var Km=df(`Array`,`slice`),qm=Ee,Jm=Km,Ym=Array.prototype,Xm=function(e){var t=e.slice;return e===Ym||qm(Ym,e)&&t===Ym.slice?Jm:t},Zm=Xm,Qm=r(Zm),$m=r(om);function eh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function th(e,t){var n;if(e){if(typeof e==`string`)return eh(e,t);var r=Qm(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return $m(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eh(e,t)}}function nh(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rh(e,t){return pm(e)||Am(e,t)||th(e,t)||nh()}function ih(e){if(fm(e))return eh(e)}function ah(e){if(xd!==void 0&&lm(e)!=null||e[`@@iterator`]!=null)return $m(e)}function oh(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sh(e){return ih(e)||ah(e)||th(e)||oh()}var ch=r(qu),lh=df(`Array`,`concat`),uh=Ee,dh=lh,fh=Array.prototype,ph=r(function(e){var t=e.concat;return e===fh||uh(fh,e)&&t===fh.concat?dh:t}),mh=r(Xm),hh=I,gh=v,_h=Fa,vh=Za,yh=Fn,bh=gh([].concat),xh=hh(`Reflect`,`ownKeys`)||function(e){var t=_h.f(yh(e)),n=vh.f;return n?bh(t,n(e)):t};B({target:`Reflect`,stat:!0},{ownKeys:xh});var Sh=Se.Reflect.ownKeys,Ch=r(Sh),wh=r(dm),Th=B,Eh=bt,Dh=ia;Th({target:`Object`,stat:!0,forced:s(function(){Dh(1)})},{keys:function(e){return Dh(Eh(e))}});var Oh=Se.Object.keys,kh=r(Oh),Ah=es.forEach,jh=Tf(`forEach`)?[].forEach:function(e){return Ah(this,e,arguments.length>1?arguments[1]:void 0)},Mh=B,Nh=jh;Mh({target:`Array`,proto:!0,forced:[].forEach!==Nh},{forEach:Nh});var Ph=df(`Array`,`forEach`),Fh=Vr,Ih=wt,Lh=Ee,Rh=Ph,zh=Array.prototype,Bh={DOMTokenList:!0,NodeList:!0},Vh=function(e){var t=e.forEach;return e===zh||Lh(zh,e)&&t===zh.forEach||Ih(Bh,Fh(e))?Rh:t},Hh=r(Vh),Uh=B,Wh=v,Gh=hr,Kh=Wh([].reverse),qh=[1,2];Uh({target:`Array`,proto:!0,forced:String(qh)===String(qh.reverse())},{reverse:function(){return Gh(this)&&(this.length=this.length),Kh(this)}});var Jh=df(`Array`,`reverse`),Yh=Ee,Xh=Jh,Zh=Array.prototype,Qh=function(e){var t=e.reverse;return e===Zh||Yh(Zh,e)&&t===Zh.reverse?Xh:t},$h=r(Qh),eg=Ye,tg=TypeError,ng=function(e,t){if(!delete e[t])throw new tg(`Cannot delete property `+eg(t)+` of `+eg(e))},rg=B,ig=bt,ag=Vi,og=yr,sg=Cr,cg=vm,lg=Er,ug=pi,dg=Ar,fg=ng,pg=vi(`splice`),mg=Math.max,hg=Math.min;rg({target:`Array`,proto:!0,forced:!pg},{splice:function(e,t){var n=ig(this),r=sg(n),i=ag(e,r),a=arguments.length,o,s,c,l,u,d;for(a===0?o=s=0:a===1?(o=0,s=r-i):(o=a-2,s=hg(mg(og(t),0),r-i)),lg(r+o-s),c=ug(n,s),l=0;l<s;l++)u=i+l,u in n&&dg(c,l,n[u]);if(c.length=s,o<s){for(l=i;l<r-s;l++)u=l+s,d=l+o,u in n?n[d]=n[u]:fg(n,d);for(l=r;l>r-s+o;l--)fg(n,l-1)}else if(o>s)for(l=r-s;l>i;l--)u=l+s-1,d=l+o-1,u in n?n[d]=n[u]:fg(n,d);for(l=0;l<o;l++)n[l+i]=arguments[l+2];return cg(n,r-s+o),c}});var gg=df(`Array`,`splice`),_g=Ee,vg=gg,yg=Array.prototype,bg=r(function(e){var t=e.splice;return e===yg||_g(yg,e)&&t===yg.splice?vg:t}),xg=k,Sg=v,Cg=A,wg=s,Tg=ia,Eg=Za,Dg=ae,Og=bt,kg=pe,Ag=Object.assign,jg=Object.defineProperty,Mg=Sg([].concat),Ng=!Ag||wg(function(){if(xg&&Ag({b:1},Ag(jg({},`a`,{enumerable:!0,get:function(){jg(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol(`assign detection`),r=`abcdefghijklmnopqrst`;return e[n]=7,r.split(``).forEach(function(e){t[e]=e}),Ag({},e)[n]!==7||Tg(Ag({},t)).join(``)!==r})?function(e,t){for(var n=Og(e),r=arguments.length,i=1,a=Eg.f,o=Dg.f;r>i;)for(var s=kg(arguments[i++]),c=a?Mg(Tg(s),a(s)):Tg(s),l=c.length,u=0,d;l>u;)d=c[u++],(!xg||Cg(o,s,d))&&(n[d]=s[d]);return n}:Ag,Pg=B,Fg=Ng;Pg({target:`Object`,stat:!0,arity:2,forced:Object.assign!==Fg},{assign:Fg});var Ig=Se.Object.assign,Lg=r(Ig),Rg=B,zg=s,Bg=bt,Vg=Pl,Hg=Tl;Rg({target:`Object`,stat:!0,forced:zg(function(){Vg(1)}),sham:!Hg},{getPrototypeOf:function(e){return Vg(Bg(e))}});var Ug=Se.Object.getPrototypeOf;B({target:`Object`,stat:!0,sham:!k},{create:Pa});var Wg=Se.Object,Gg=function(e,t){return Wg.create(e,t)},Kg=r(Gg),qg=Se,Jg=p;qg.JSON||={stringify:JSON.stringify};var Yg=r(function(e,t,n){return Jg(qg.JSON.stringify,null,arguments)}),Xg=typeof Bun==`function`&&Bun&&typeof Bun.version==`string`,Zg=TypeError,Qg=function(e,t){if(e<t)throw new Zg(`Not enough arguments`);return e},$g=o,e_=p,t_=D,n_=Xg,r_=De,i_=Oc,a_=Qg,o_=$g.Function,s_=/MSIE .\./.test(r_)||n_&&(function(){var e=$g.Bun.version.split(`.`);return e.length<3||e[0]===`0`&&(e[1]<3||e[1]===`3`&&e[2]===`0`)})(),c_=function(e,t){var n=t?2:1;return s_?function(r,i){var a=a_(arguments.length,1)>n,o=t_(r)?r:o_(r),s=a?i_(arguments,n):[],c=a?function(){e_(o,this,s)}:o;return t?e(c,i):e(c)}:e},l_=B,u_=o,d_=c_(u_.setInterval,!0);l_({global:!0,bind:!0,forced:u_.setInterval!==d_},{setInterval:d_});var f_=B,p_=o,m_=c_(p_.setTimeout,!0);f_({global:!0,bind:!0,forced:p_.setTimeout!==m_},{setTimeout:m_});var h_=Se.setTimeout,g_=r(h_),__={exports:{}};(function(e){function t(e){if(e)return n(e);this._callbacks=new Map}function n(e){return Object.assign(e,t.prototype),e._callbacks=new Map,e}t.prototype.on=function(e,t){let n=this._callbacks.get(e)??[];return n.push(t),this._callbacks.set(e,n),this},t.prototype.once=function(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return n.fn=t,this.on(e,n),this},t.prototype.off=function(e,t){if(e===void 0&&t===void 0)return this._callbacks.clear(),this;if(t===void 0)return this._callbacks.delete(e),this;let n=this._callbacks.get(e);if(n){for(let[e,r]of n.entries())if(r===t||r.fn===t){n.splice(e,1);break}n.length===0?this._callbacks.delete(e):this._callbacks.set(e,n)}return this},t.prototype.emit=function(e,...t){let n=this._callbacks.get(e);if(n){let e=[...n];for(let n of e)n.apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks.get(e)??[]},t.prototype.listenerCount=function(e){if(e)return this.listeners(e).length;let t=0;for(let e of this._callbacks.values())t+=e.length;return t},t.prototype.hasListeners=function(e){return this.listenerCount(e)>0},t.prototype.addEventListener=t.prototype.on,t.prototype.removeListener=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,e.exports=t})(__);var v_=__.exports,y_=r(v_);function b_(){return b_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b_.apply(this,arguments)}function x_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function S_(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var C_=typeof Object.assign==`function`?Object.assign:function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t},w_=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],T_=typeof document>`u`?{style:{}}:document.createElement(`div`),E_=`function`,D_=Math.round,O_=Math.abs,k_=Date.now;function A_(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<w_.length;){if(n=w_[a],r=n?n+i:t,r in e)return r;a++}}var j_=typeof window>`u`?{}:window,M_=A_(T_.style,`touchAction`),N_=M_!==void 0;function P_(){if(!N_)return!1;var e={},t=j_.CSS&&j_.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach(function(n){return e[n]=t?j_.CSS.supports(`touch-action`,n):!0}),e}var F_=`compute`,I_=`auto`,L_=`manipulation`,R_=`none`,z_=`pan-x`,B_=`pan-y`,V_=P_(),H_=/mobile|tablet|ip(ad|hone|od)|android/i,U_=`ontouchstart`in j_,W_=A_(j_,`PointerEvent`)!==void 0,G_=U_&&H_.test(navigator.userAgent),K_=`touch`,q_=`pen`,J_=`mouse`,Y_=`kinect`,X_=25,Z_=1,Q_=2,$_=4,ev=8,tv=1,nv=2,rv=4,iv=8,av=16,ov=nv|rv,sv=iv|av,cv=ov|sv,lv=[`x`,`y`],uv=[`clientX`,`clientY`];function dv(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==void 0)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function fv(e,t){return typeof e===E_?e.apply(t&&t[0]||void 0,t):e}function pv(e,t){return e.indexOf(t)>-1}function mv(e){if(pv(e,R_))return R_;var t=pv(e,z_),n=pv(e,B_);return t&&n?R_:t||n?t?z_:B_:pv(e,L_)?L_:I_}var hv=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===F_&&(e=this.compute()),N_&&this.manager.element.style&&V_[e]&&(this.manager.element.style[M_]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return dv(this.manager.recognizers,function(t){fv(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),mv(e.join(` `))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented){t.preventDefault();return}var r=this.actions,i=pv(r,R_)&&!V_[R_],a=pv(r,B_)&&!V_[B_],o=pv(r,z_)&&!V_[z_];if(i){var s=e.pointers.length===1,c=e.distance<2,l=e.deltaTime<250;if(s&&c&&l)return}if(!(o&&a)&&(i||a&&n&ov||o&&n&sv))return this.preventSrc(t)},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function gv(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function _v(e){var t=e.length;if(t===1)return{x:D_(e[0].clientX),y:D_(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:D_(n/t),y:D_(r/t)}}function vv(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:D_(e.pointers[n].clientX),clientY:D_(e.pointers[n].clientY)},n++;return{timeStamp:k_(),pointers:t,center:_v(t),deltaX:e.deltaX,deltaY:e.deltaY}}function yv(e,t,n){n||=lv;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function bv(e,t,n){n||=lv;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.atan2(i,r)*180/Math.PI}function xv(e,t){return e===t?tv:O_(e)>=O_(t)?e<0?nv:rv:t<0?iv:av}function Sv(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};(t.eventType===Z_||a.eventType===$_)&&(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}function Cv(e,t,n){return{x:t/e||0,y:n/e||0}}function wv(e,t){return yv(t[0],t[1],uv)/yv(e[0],e[1],uv)}function Tv(e,t){return bv(t[1],t[0],uv)+bv(e[1],e[0],uv)}function Ev(e,t){var n=e.lastInterval||t,r=t.timeStamp-n.timeStamp,i,a,o,s;if(t.eventType!==ev&&(r>X_||n.velocity===void 0)){var c=t.deltaX-n.deltaX,l=t.deltaY-n.deltaY,u=Cv(r,c,l);a=u.x,o=u.y,i=O_(u.x)>O_(u.y)?u.x:u.y,s=xv(c,l),e.lastInterval=t}else i=n.velocity,a=n.velocityX,o=n.velocityY,s=n.direction;t.velocity=i,t.velocityX=a,t.velocityY=o,t.direction=s}function Dv(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||=vv(t),i>1&&!n.firstMultiple?n.firstMultiple=vv(t):i===1&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,c=t.center=_v(r);t.timeStamp=k_(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=bv(s,c),t.distance=yv(s,c),Sv(n,t),t.offsetDirection=xv(t.deltaX,t.deltaY);var l=Cv(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=l.x,t.overallVelocityY=l.y,t.overallVelocity=O_(l.x)>O_(l.y)?l.x:l.y,t.scale=o?wv(o.pointers,r):1,t.rotation=o?Tv(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,Ev(n,t);var u=e.element,d=t.srcEvent,f=d.composedPath?d.composedPath()[0]:d.path?d.path[0]:d.target;gv(f,u)&&(u=f),t.target=u}function Ov(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=t&Z_&&r-i===0,o=t&($_|ev)&&r-i===0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,Dv(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function kv(e){return e.trim().split(/\s+/g)}function Av(e,t,n){dv(kv(t),function(t){e.addEventListener(t,n,!1)})}function W(e,t,n){dv(kv(t),function(t){e.removeEventListener(t,n,!1)})}function jv(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var Mv=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){fv(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&Av(this.element,this.evEl,this.domHandler),this.evTarget&&Av(this.target,this.evTarget,this.domHandler),this.evWin&&Av(jv(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&W(this.element,this.evEl,this.domHandler),this.evTarget&&W(this.target,this.evTarget,this.domHandler),this.evWin&&W(jv(this.element),this.evWin,this.domHandler)},e}();function Nv(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var Pv={pointerdown:Z_,pointermove:Q_,pointerup:$_,pointercancel:ev,pointerout:ev},Fv={2:K_,3:q_,4:J_,5:Y_},Iv=`pointerdown`,Lv=`pointermove pointerup pointercancel`;j_.MSPointerEvent&&!j_.PointerEvent&&(Iv=`MSPointerDown`,Lv=`MSPointerMove MSPointerUp MSPointerCancel`);var Rv=function(e){x_(t,e);function t(){var n,r=t.prototype;return r.evEl=Iv,r.evWin=Lv,n=e.apply(this,arguments)||this,n.store=n.manager.session.pointerEvents=[],n}var n=t.prototype;return n.handler=function(e){var t=this.store,n=!1,r=Pv[e.type.toLowerCase().replace(`ms`,``)],i=Fv[e.pointerType]||e.pointerType,a=i===K_,o=Nv(t,e.pointerId,`pointerId`);r&Z_&&(e.button===0||a)?o<0&&(t.push(e),o=t.length-1):r&($_|ev)&&(n=!0),!(o<0)&&(t[o]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:i,srcEvent:e}),n&&t.splice(o,1))},t}(Mv);function zv(e){return Array.prototype.slice.call(e,0)}function Bv(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];Nv(i,o)<0&&r.push(e[a]),i[a]=o,a++}return n&&(r=t?r.sort(function(e,n){return e[t]>n[t]}):r.sort()),r}var Vv={touchstart:Z_,touchmove:Q_,touchend:$_,touchcancel:ev},Hv=`touchstart touchmove touchend touchcancel`,Uv=function(e){x_(t,e);function t(){var n;return t.prototype.evTarget=Hv,n=e.apply(this,arguments)||this,n.targetIds={},n}var n=t.prototype;return n.handler=function(e){var t=Vv[e.type],n=Wv.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:K_,srcEvent:e})},t}(Mv);function Wv(e,t){var n=zv(e.touches),r=this.targetIds;if(t&(Z_|Q_)&&n.length===1)return r[n[0].identifier]=!0,[n,n];var i,a,o=zv(e.changedTouches),s=[],c=this.target;if(a=n.filter(function(e){return gv(e.target,c)}),t===Z_)for(i=0;i<a.length;)r[a[i].identifier]=!0,i++;for(i=0;i<o.length;)r[o[i].identifier]&&s.push(o[i]),t&($_|ev)&&delete r[o[i].identifier],i++;if(s.length)return[Bv(a.concat(s),`identifier`,!0),s]}var Gv={mousedown:Z_,mousemove:Q_,mouseup:$_},Kv=`mousedown`,qv=`mousemove mouseup`,Jv=function(e){x_(t,e);function t(){var n,r=t.prototype;return r.evEl=Kv,r.evWin=qv,n=e.apply(this,arguments)||this,n.pressed=!1,n}var n=t.prototype;return n.handler=function(e){var t=Gv[e.type];t&Z_&&e.button===0&&(this.pressed=!0),t&Q_&&e.which!==1&&(t=$_),this.pressed&&(t&$_&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:J_,srcEvent:e}))},t}(Mv),Yv=2500,Xv=25;function Zv(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout(function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)},Yv)}}function Qv(e,t){e&Z_?(this.primaryTouch=t.changedPointers[0].identifier,Zv.call(this,t)):e&($_|ev)&&Zv.call(this,t)}function $v(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(t-i.x),o=Math.abs(n-i.y);if(a<=Xv&&o<=Xv)return!0}return!1}var ey=function(){return function(e){x_(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.handler=function(e,t,n){var i=n.pointerType===K_,a=n.pointerType===J_;if(!(a&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)Qv.call(S_(S_(r)),t,n);else if(a&&$v.call(S_(S_(r)),n))return;r.callback(e,t,n)}},r.touch=new Uv(r.manager,r.handler),r.mouse=new Jv(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}var n=t.prototype;return n.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(Mv)}();function ty(e){var t;return t=e.options.inputClass||(W_?Rv:G_?Uv:U_?ey:Jv),new t(e,Ov)}function ny(e,t,n){return Array.isArray(e)?(dv(e,n[t],n),!0):!1}var ry=1,iy=2,ay=4,oy=8,sy=oy,cy=16,ly=32,uy=1;function dy(){return uy++}function G(e,t){var n=t.manager;return n?n.get(e):e}function K(e){return e&cy?`cancel`:e&oy?`end`:e&ay?`move`:e&iy?`start`:``}var fy=function(){function e(e){e===void 0&&(e={}),this.options=b_({enable:!0},e),this.id=dy(),this.manager=null,this.state=ry,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return C_(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(ny(e,`recognizeWith`,this))return this;var t=this.simultaneous;return e=G(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return ny(e,`dropRecognizeWith`,this)?this:(e=G(e,this),delete this.simultaneous[e.id],this)},t.requireFailure=function(e){if(ny(e,`requireFailure`,this))return this;var t=this.requireFail;return e=G(e,this),Nv(t,e)===-1&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(ny(e,`dropRequireFailure`,this))return this;e=G(e,this);var t=Nv(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<oy&&r(t.options.event+K(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=oy&&r(t.options.event+K(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=ly},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(ly|ry)))return!1;e++}return!0},t.recognize=function(e){var t=C_({},e);if(!fv(this.options.enable,[this,t])){this.reset(),this.state=ly;return}this.state&(sy|cy|ly)&&(this.state=ry),this.state=this.process(t),this.state&(iy|ay|oy|cy)&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),py=function(e){x_(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,b_({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 n=t.prototype;return n.getTouchAction=function(){return[L_]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime<n.time;if(this.reset(),e.eventType&Z_&&this.count===0)return this.failTimeout();if(i&&a&&r){if(e.eventType!==$_)return this.failTimeout();var o=this.pTime?e.timeStamp-this.pTime<n.interval:!0,s=!this.pCenter||yv(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,!s||!o?this.count=1:this.count+=1,this._input=e,this.count%n.taps===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){t.state=sy,t.tryEmit()},n.interval),iy):sy}return ly},n.failTimeout=function(){var e=this;return this._timer=setTimeout(function(){e.state=ly},this.options.interval),ly},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){this.state===sy&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(fy),my=function(e){x_(t,e);function t(t){return t===void 0&&(t={}),e.call(this,b_({pointers:1},t))||this}var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return t===0||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=t&(iy|ay),i=this.attrTest(e);return r&&(n&ev||!i)?t|cy:r||i?n&$_?t|oy:t&iy?t|ay:iy:ly},t}(fy);function hy(e){return e===av?`down`:e===iv?`up`:e===nv?`left`:e===rv?`right`:``}var gy=function(e){x_(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,b_({event:`pan`,threshold:10,pointers:1,direction:cv},t))||this,n.pX=null,n.pY=null,n}var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&ov&&t.push(B_),e&sv&&t.push(z_),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,a=e.deltaX,o=e.deltaY;return i&t.direction||(t.direction&ov?(i=a===0?tv:a<0?nv:rv,n=a!==this.pX,r=Math.abs(e.deltaX)):(i=o===0?tv:o<0?iv:av,n=o!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return my.prototype.attrTest.call(this,e)&&(this.state&iy||!(this.state&iy)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=hy(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(my),_y=function(e){x_(t,e);function t(t){return t===void 0&&(t={}),e.call(this,b_({event:`swipe`,threshold:10,velocity:.3,direction:ov|sv,pointers:1},t))||this}var n=t.prototype;return n.getTouchAction=function(){return gy.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n=this.options.direction,r;return n&(ov|sv)?r=t.overallVelocity:n&ov?r=t.overallVelocityX:n&sv&&(r=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&O_(r)>this.options.velocity&&t.eventType&$_},n.emit=function(e){var t=hy(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(my),vy=function(e){x_(t,e);function t(t){return t===void 0&&(t={}),e.call(this,b_({event:`pinch`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[R_]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&iy)},n.emit=function(t){if(t.scale!==1){var n=t.scale<1?`in`:`out`;t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(my),yy=function(e){x_(t,e);function t(t){return t===void 0&&(t={}),e.call(this,b_({event:`rotate`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[R_]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&iy)},t}(my),by=function(e){x_(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,b_({event:`press`,pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var n=t.prototype;return n.getTouchAction=function(){return[I_]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime>n.time;if(this._input=e,!i||!r||e.eventType&($_|ev)&&!a)this.reset();else if(e.eventType&Z_)this.reset(),this._timer=setTimeout(function(){t.state=sy,t.tryEmit()},n.time);else if(e.eventType&$_)return sy;return ly},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){this.state===sy&&(e&&e.eventType&$_?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=k_(),this.manager.emit(this.options.event,this._input)))},t}(fy),xy={domEvents:!1,touchAction:F_,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}},Sy=[[yy,{enable:!1}],[vy,{enable:!1},[`rotate`]],[_y,{direction:ov}],[gy,{direction:ov},[`swipe`]],[py],[py,{event:`doubletap`,taps:2},[`tap`]],[by]],Cy=1,wy=2;function Ty(e,t){var n=e.element;if(n.style){var r;dv(e.options.cssProps,function(i,a){r=A_(n.style,a),t?(e.oldCssProps[r]=n.style[r],n.style[r]=i):n.style[r]=e.oldCssProps[r]||``}),t||(e.oldCssProps={})}}function Ey(e,t){var n=document.createEvent(`Event`);n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}var Dy=function(){function e(e,t){var n=this;this.options=C_({},xy,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=ty(this),this.touchAction=new hv(this,this.options.touchAction),Ty(this,!0),dv(this.options.recognizers,function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}var t=e.prototype;return t.set=function(e){return C_(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?wy:Cy},t.recognize=function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,r=this.recognizers,i=t.curRecognizer;(!i||i&&i.state&sy)&&(t.curRecognizer=null,i=null);for(var a=0;a<r.length;)n=r[a],t.stopped!==wy&&(!i||n===i||n.canRecognizeWith(i))?n.recognize(e):n.reset(),!i&&n.state&(iy|ay|oy)&&(t.curRecognizer=n,i=n),a++}},t.get=function(e){if(e instanceof fy)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(ny(e,`add`,this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(ny(e,`remove`,this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=Nv(n,t);r!==-1&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(e===void 0||t===void 0)return this;var n=this.handlers;return dv(kv(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this},t.off=function(e,t){if(e===void 0)return this;var n=this.handlers;return dv(kv(e),function(e){t?n[e]&&n[e].splice(Nv(n[e],t),1):delete n[e]}),this},t.emit=function(e,t){this.options.domEvents&&Ey(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(!(!n||!n.length)){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&Ty(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),Oy={touchstart:Z_,touchmove:Q_,touchend:$_,touchcancel:ev},ky=`touchstart`,Ay=`touchstart touchmove touchend touchcancel`,jy=function(e){x_(t,e);function t(){var n,r=t.prototype;return r.evTarget=ky,r.evWin=Ay,n=e.apply(this,arguments)||this,n.started=!1,n}var n=t.prototype;return n.handler=function(e){var t=Oy[e.type];if(t===Z_&&(this.started=!0),this.started){var n=My.call(this,e,t);t&($_|ev)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:K_,srcEvent:e})}},t}(Mv);function My(e,t){var n=zv(e.touches),r=zv(e.changedTouches);return t&($_|ev)&&(n=Bv(n.concat(r),`identifier`,!0)),[n,r]}function Ny(e,t,n){var r=`DEPRECATED METHOD: `+t+`
|
|
4
|
+
`+n+` AT
|
|
5
|
+
`;return function(){var t=Error(`get-stack-trace`),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,``).replace(/^\s+at\s+/gm,``).replace(/^Object.<anonymous>\s*\(/gm,`{anonymous}()@`):`Unknown Stack Trace`,i=window.console&&(window.console.warn||window.console.log);return i&&i.call(window.console,r,n),e.apply(this,arguments)}}var Py=Ny(function(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;)(!n||n&&e[r[i]]===void 0)&&(e[r[i]]=t[r[i]]),i++;return e},`extend`,"Use `assign`."),Fy=Ny(function(e,t){return Py(e,t,!0)},`merge`,"Use `assign`.");function Iy(e,t,n){var r=t.prototype,i=e.prototype=Object.create(r);i.constructor=e,i._super=r,n&&C_(i,n)}function Ly(e,t){return function(){return e.apply(t,arguments)}}var Ry=function(){var e=function(e,t){return t===void 0&&(t={}),new Dy(e,b_({recognizers:Sy.concat()},t))};return e.VERSION=`2.0.17-rc`,e.DIRECTION_ALL=cv,e.DIRECTION_DOWN=av,e.DIRECTION_LEFT=nv,e.DIRECTION_RIGHT=rv,e.DIRECTION_UP=iv,e.DIRECTION_HORIZONTAL=ov,e.DIRECTION_VERTICAL=sv,e.DIRECTION_NONE=tv,e.DIRECTION_DOWN=av,e.INPUT_START=Z_,e.INPUT_MOVE=Q_,e.INPUT_END=$_,e.INPUT_CANCEL=ev,e.STATE_POSSIBLE=ry,e.STATE_BEGAN=iy,e.STATE_CHANGED=ay,e.STATE_ENDED=oy,e.STATE_RECOGNIZED=sy,e.STATE_CANCELLED=cy,e.STATE_FAILED=ly,e.Manager=Dy,e.Input=Mv,e.TouchAction=hv,e.TouchInput=Uv,e.MouseInput=Jv,e.PointerEventInput=Rv,e.TouchMouseInput=ey,e.SingleTouchInput=jy,e.Recognizer=fy,e.AttrRecognizer=my,e.Tap=py,e.Pan=gy,e.Swipe=_y,e.Pinch=vy,e.Rotate=yy,e.Press=by,e.on=Av,e.off=W,e.each=dv,e.merge=Fy,e.extend=Py,e.bindFn=Ly,e.assign=C_,e.inherit=Iy,e.bindFn=Ly,e.prefixed=A_,e.toArray=zv,e.inArray=Nv,e.uniqueArray=Bv,e.splitStr=kv,e.boolOrFn=fv,e.hasParent=gv,e.addEventListeners=Av,e.removeEventListeners=W,e.defaults=C_({},xy,{preset:Sy}),e}();function zy(e,t){var n=ch!==void 0&&um(e)||e[`@@iterator`];if(!n){if(wh(e)||(n=By(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
6
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function By(e,t){var n;if(e){if(typeof e==`string`)return Vy(e,t);var r=mh(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return sm(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vy(e,t)}}function Vy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Hy=ch(`DELETE`);function Uy(e){var t,n=[...arguments].slice(1);return Wy.apply(void 0,ph(t=[{},e]).call(t,n))}function Wy(){var e=Gy.apply(void 0,arguments);return qy(e),e}function Gy(){var e=[...arguments];if(e.length<2)return e[0];if(e.length>2){var t;return Gy.apply(void 0,ph(t=[Wy(e[0],e[1])]).call(t,sh(mh(e).call(e,2))))}var n=e[0],r=e[1];if(n instanceof Date&&r instanceof Date)return n.setTime(r.getTime()),n;var i=zy(Ch(r)),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;Object.prototype.propertyIsEnumerable.call(r,o)&&(r[o]===Hy?delete n[o]:n[o]!==null&&r[o]!==null&&typeof n[o]==`object`&&typeof r[o]==`object`&&!wh(n[o])&&!wh(r[o])?n[o]=Gy(n[o],r[o]):n[o]=Ky(r[o]))}}catch(e){i.e(e)}finally{i.f()}return n}function Ky(e){return wh(e)?Yf(e).call(e,function(e){return Ky(e)}):typeof e==`object`&&e?e instanceof Date?new Date(e.getTime()):Gy({},e):e}function qy(e){for(var t=0,n=kh(e);t<n.length;t++){var r=n[t];e[r]===Hy?delete e[r]:typeof e[r]==`object`&&e[r]!==null&&qy(e[r])}}function Jy(){var e=function(){};return{on:e,off:e,destroy:e,emit:e,get(){return{set:e}}}}var Yy=typeof window<`u`?window.Hammer||Ry:function(){return Jy()};function Xy(e){var t=this,n;this._cleanupQueue=[],this.active=!1,this._dom={container:e,overlay:document.createElement(`div`)},this._dom.overlay.classList.add(`vis-overlay`),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){t._dom.overlay.parentNode.removeChild(t._dom.overlay)});var r=Yy(this._dom.overlay);r.on(`tap`,_f(n=this._onTapOverlay).call(n,this)),this._cleanupQueue.push(function(){r.destroy()});var i=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];Hh(i).call(i,function(e){r.on(e,function(e){e.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(n){Zy(n.target,e)||t.deactivate()},document.body.addEventListener(`click`,this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener(`click`,t._onClick)})),this._escListener=function(e){(`key`in e?e.key===`Escape`:e.keyCode===27)&&t.deactivate()}}y_(Xy.prototype),Xy.current=null,Xy.prototype.destroy=function(){var e,t;this.deactivate();var n=zy($h(e=bg(t=this._cleanupQueue).call(t,0)).call(e)),r;try{for(n.s();!(r=n.n()).done;){var i=r.value;i()}}catch(e){n.e(e)}finally{n.f()}},Xy.prototype.activate=function(){Xy.current&&Xy.current.deactivate(),Xy.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)},Xy.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`)},Xy.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};function Zy(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}var Qy=oi,$y=Ye,eb=TypeError,tb=function(e){if(Qy(e))return e;throw new eb($y(e)+` is not a constructor`)},nb=B,rb=I,ib=p,ab=of,ob=tb,sb=Fn,cb=P,lb=Pa,ub=s,db=rb(`Reflect`,`construct`),fb=Object.prototype,pb=[].push,mb=ub(function(){function e(){}return!(db(function(){},[],e)instanceof e)}),hb=!ub(function(){db(function(){})}),gb=mb||hb;nb({target:`Reflect`,stat:!0,forced:gb,sham:gb},{construct:function(e,t){ob(e),sb(t);var n=arguments.length<3?e:ob(arguments[2]);if(hb&&!mb)return db(e,t,n);if(e===n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return ib(pb,r,t),new(ib(ab,e,r))}var i=n.prototype,a=lb(cb(i)?i:fb),o=ib(e,a,t);return cb(o)?o:a}});var _b=Se.Reflect.construct,vb=r(_b),yb=Se.Object.getOwnPropertySymbols,bb=r(yb),xb={exports:{}},Sb=B,Cb=s,wb=be,Tb=O.f,Eb=k;Sb({target:`Object`,stat:!0,forced:!Eb||Cb(function(){Tb(1)}),sham:!Eb},{getOwnPropertyDescriptor:function(e,t){return Tb(wb(e),t)}});var Db=Se.Object,Ob=xb.exports=function(e,t){return Db.getOwnPropertyDescriptor(e,t)};Db.getOwnPropertyDescriptor.sham&&(Ob.sham=!0);var kb=xb.exports,Ab=r(kb),jb=B,Mb=k,Nb=xh,Pb=be,Fb=O,Ib=Ar;jb({target:`Object`,stat:!0,sham:!Mb},{getOwnPropertyDescriptors:function(e){for(var t=Pb(e),n=Fb.f,r=Nb(t),i={},a=0,o,s;r.length>a;)s=n(t,o=r[a++]),s!==void 0&&Ib(i,o,s);return i}});var Lb=Se.Object.getOwnPropertyDescriptors,Rb=r(Lb),zb={exports:{}},Bb=B,Vb=k,Hb=Li.f;Bb({target:`Object`,stat:!0,forced:Object.defineProperties!==Hb,sham:!Vb},{defineProperties:Hb});var Ub=Se.Object,Wb=zb.exports=function(e,t){return Ub.defineProperties(e,t)};Ub.defineProperties.sham&&(Wb.sham=!0);var Gb=zb.exports,Kb=r(Gb),qb=r(dr);function Jb(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var Yb=Gg,Xb=r(Yb);B({target:`Object`,stat:!0},{setPrototypeOf:uu});var Zb=Se.Object.setPrototypeOf,Qb=r(Zb),$b=r(gf);function ex(e,t){var n;return ex=Qb?$b(n=Qb).call(n):function(e,t){return e.__proto__=t,e},ex(e,t)}function tx(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Xb(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),pr(e,`prototype`,{writable:!1}),t&&ex(e,t)}function nx(e,t){if(t&&(Vd(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Jb(e)}var rx=Ug,ix=r(rx);function ax(e){var t;return ax=Qb?$b(t=ix).call(t):function(e){return e.__proto__||ix(e)},ax(e)}var ox={exports:{}},sx={exports:{}};(function(e){var t=bd,n=zd;function r(i){"@babel/helpers - typeof";return e.exports=r=typeof t==`function`&&typeof n==`symbol`?function(e){return typeof e}:function(e){return e&&typeof t==`function`&&e.constructor===t&&e!==t.prototype?`symbol`:typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,r(i)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(sx);var cx=sx.exports,lx=Vh,ux=wt,dx=xh,fx=O,px=An,mx=function(e,t,n){for(var r=dx(t),i=px.f,a=fx.f,o=0;o<r.length;o++){var s=r[o];!ux(e,s)&&!(n&&ux(n,s))&&i(e,s,a(t,s))}},hx=P,gx=Jn,_x=function(e,t){hx(t)&&`cause`in t&&gx(e,`cause`,t.cause)},vx=v,yx=Error,bx=vx(``.replace),xx=(function(e){return String(new yx(e).stack)})(`zxcasd`),Sx=/\n\s*at [^:]*:[^\n]*/,Cx=Sx.test(xx),wx=function(e,t){if(Cx&&typeof e==`string`&&!yx.prepareStackTrace)for(;t--;)e=bx(e,Sx,``);return e},Tx=s,Ex=ce,Dx=!Tx(function(){var e=Error(`a`);return`stack`in e?(Object.defineProperty(e,`stack`,Ex(1,7)),e.stack!==7):!0}),Ox=Jn,kx=wx,Ax=Dx,jx=Error.captureStackTrace,Mx=function(e,t,n,r){Ax&&(jx?jx(e,t):Ox(e,`stack`,kx(n,r)))},Nx=kn,Px=A,Fx=Fn,Ix=Ye,Lx=Dp,Rx=Cr,zx=Ee,Bx=Bp,Vx=Np,Hx=yp,Ux=TypeError,Wx=function(e,t){this.stopped=e,this.result=t},Gx=Wx.prototype,Kx=function(e,t,n){var r=n&&n.that,i=!!(n&&n.AS_ENTRIES),a=!!(n&&n.IS_RECORD),o=!!(n&&n.IS_ITERATOR),s=!!(n&&n.INTERRUPTED),c=Nx(t,r),l,u,d,f,p,m,h,g=function(e){return l&&Hx(l,`normal`,e),new Wx(!0,e)},_=function(e){return i?(Fx(e),s?c(e[0],e[1],g):c(e[0],e[1])):s?c(e,g):c(e)};if(a)l=e.iterator;else if(o)l=e;else{if(u=Vx(e),!u)throw new Ux(Ix(e)+` is not iterable`);if(Lx(u)){for(d=0,f=Rx(e);f>d;d++)if(p=_(e[d]),p&&zx(Gx,p))return p;return new Wx(!1)}l=Bx(e,u)}for(m=a?e.next:l.next;!(h=Px(m,l)).done;){try{p=_(h.value)}catch(e){Hx(l,`throw`,e)}if(typeof p==`object`&&p&&zx(Gx,p))return p}return new Wx(!1)},qx=Ii,Jx=function(e,t){return e===void 0?arguments.length<2?``:t:qx(e)},Yx=B,Xx=Ee,Zx=Pl,Qx=uu,$x=mx,eS=Pa,tS=Jn,nS=ce,rS=_x,iS=Mx,aS=Kx,oS=Jx,sS=zt(`toStringTag`),cS=Error,lS=[].push,uS=function(e,t){var n=Xx(dS,this),r;Qx?r=Qx(new cS,n?Zx(this):dS):(r=n?this:eS(dS),tS(r,sS,`Error`)),t!==void 0&&tS(r,`message`,oS(t)),iS(r,uS,r.stack,1),arguments.length>2&&rS(r,arguments[2]);var i=[];return aS(e,lS,{that:i}),tS(r,`errors`,i),r};Qx?Qx(uS,cS):$x(uS,cS,{name:!0});var dS=uS.prototype=eS(cS.prototype,{constructor:nS(1,uS),message:nS(1,``),name:nS(1,`AggregateError`)});Yx({global:!0,constructor:!0,arity:2},{AggregateError:uS});var fS=I,pS=to,mS=zt,hS=k,gS=mS(`species`),_S=function(e){var t=fS(e);hS&&t&&!t[gS]&&pS(t,gS,{configurable:!0,get:function(){return this}})},vS=Ee,yS=TypeError,bS=function(e,t){if(vS(t,e))return e;throw new yS(`Incorrect invocation`)},xS=Fn,SS=tb,CS=me,wS=zt(`species`),TS=function(e,t){var n=xS(e).constructor,r;return n===void 0||CS(r=xS(n)[wS])?t:SS(r)},ES=De,DS=/(?:ipad|iphone|ipod).*applewebkit/i.test(ES),OS=o,kS=p,AS=kn,jS=D,MS=wt,NS=s,PS=da,FS=Oc,IS=tn,LS=Qg,RS=DS,zS=Ef,BS=OS.setImmediate,VS=OS.clearImmediate,HS=OS.process,q=OS.Dispatch,US=OS.Function,WS=OS.MessageChannel,GS=OS.String,KS=0,qS={},JS=`onreadystatechange`,YS,J,XS,ZS;NS(function(){YS=OS.location});var QS=function(e){if(MS(qS,e)){var t=qS[e];delete qS[e],t()}},$S=function(e){return function(){QS(e)}},eC=function(e){QS(e.data)},tC=function(e){OS.postMessage(GS(e),YS.protocol+`//`+YS.host)};(!BS||!VS)&&(BS=function(e){LS(arguments.length,1);var t=jS(e)?e:US(e),n=FS(arguments,1);return qS[++KS]=function(){kS(t,void 0,n)},J(KS),KS},VS=function(e){delete qS[e]},zS?J=function(e){HS.nextTick($S(e))}:q&&q.now?J=function(e){q.now($S(e))}:WS&&!RS?(XS=new WS,ZS=XS.port2,XS.port1.onmessage=eC,J=AS(ZS.postMessage,ZS)):OS.addEventListener&&jS(OS.postMessage)&&!OS.importScripts&&YS&&YS.protocol!==`file:`&&!NS(tC)?(J=tC,OS.addEventListener(`message`,eC,!1)):J=JS in IS(`script`)?function(e){PS.appendChild(IS(`script`))[JS]=function(){PS.removeChild(this),QS(e)}}:function(e){setTimeout($S(e),0)});var nC={set:BS,clear:VS},rC=function(){this.head=null,this.tail=null};rC.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return(this.head=e.next)===null&&(this.tail=null),e.item}};var iC=rC,aC=De,oC=/ipad|iphone|ipod/i.test(aC)&&typeof Pebble<`u`,sC=De,cC=/web0s(?!.*chrome)/i.test(sC),lC=o,uC=kn,dC=O.f,fC=nC.set,pC=iC,mC=DS,hC=oC,gC=cC,_C=Ef,vC=lC.MutationObserver||lC.WebKitMutationObserver,yC=lC.document,bC=lC.process,xC=lC.Promise,SC=dC(lC,`queueMicrotask`),CC=SC&&SC.value,wC,TC,EC,DC,OC;if(!CC){var kC=new pC,AC=function(){var e,t;for(_C&&(e=bC.domain)&&e.exit();t=kC.get();)try{t()}catch(e){throw kC.head&&wC(),e}e&&e.enter()};!mC&&!_C&&!gC&&vC&&yC?(TC=!0,EC=yC.createTextNode(``),new vC(AC).observe(EC,{characterData:!0}),wC=function(){EC.data=TC=!TC}):!hC&&xC&&xC.resolve?(DC=xC.resolve(void 0),DC.constructor=xC,OC=uC(DC.then,DC),wC=function(){OC(AC)}):_C?wC=function(){bC.nextTick(AC)}:(fC=uC(fC,lC),wC=function(){fC(AC)}),CC=function(e){kC.head||wC(),kC.add(e)}}var jC=CC,MC=function(e,t){try{arguments.length===1?console.error(e):console.error(e,t)}catch{}},NC=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},PC=o.Promise,FC=typeof Deno==`object`&&Deno&&typeof Deno.version==`object`,IC=!FC&&!Ef&&typeof window==`object`&&typeof document==`object`,LC=o,RC=PC,zC=D,BC=wn,VC=Kr,HC=zt,UC=IC,WC=FC,GC=Ie,KC=RC&&RC.prototype,qC=HC(`species`),JC=!1,YC=zC(LC.PromiseRejectionEvent),XC={CONSTRUCTOR:BC(`Promise`,function(){var e=VC(RC),t=e!==String(RC);if(!t&&GC===66||!(KC.catch&&KC.finally))return!0;if(!GC||GC<51||!/native code/.test(e)){var n=new RC(function(e){e(1)}),r=function(e){e(function(){},function(){})},i=n.constructor={};if(i[qC]=r,JC=n.then(function(){})instanceof r,!JC)return!0}return!t&&(UC||WC)&&!YC}),REJECTION_EVENT:YC,SUBCLASSING:JC},ZC={},QC=$e,$C=TypeError,ew=function(e){var t,n;this.promise=new e(function(e,r){if(t!==void 0||n!==void 0)throw new $C(`Bad Promise constructor`);t=e,n=r}),this.resolve=QC(t),this.reject=QC(n)};ZC.f=function(e){return new ew(e)};var tw=B,nw=Ef,rw=o,iw=A,aw=$a,ow=Co,sw=_S,cw=$e,lw=D,uw=P,dw=bS,fw=TS,pw=nC.set,mw=jC,hw=MC,gw=NC,_w=iC,vw=Go,yw=PC,bw=XC,xw=ZC,Sw=`Promise`,Cw=bw.CONSTRUCTOR,ww=bw.REJECTION_EVENT;bw.SUBCLASSING;var Tw=vw.getterFor(Sw),Ew=vw.set,Dw=yw&&yw.prototype,Ow=yw,kw=Dw,Aw=rw.TypeError,jw=rw.document,Mw=rw.process,Nw=xw.f,Pw=Nw,Fw=!!(jw&&jw.createEvent&&rw.dispatchEvent),Iw=`unhandledrejection`,Lw=`rejectionhandled`,Rw=0,zw=1,Bw=2,Vw=1,Hw=2,Uw,Ww,Gw,Kw=function(e){var t;return uw(e)&&lw(t=e.then)?t:!1},qw=function(e,t){var n=t.value,r=t.state===zw,i=r?e.ok:e.fail,a=e.resolve,o=e.reject,s=e.domain,c,l,u;try{i?(r||(t.rejection===Hw&&Qw(t),t.rejection=Vw),i===!0?c=n:(s&&s.enter(),c=i(n),s&&(s.exit(),u=!0)),c===e.promise?o(new Aw(`Promise-chain cycle`)):(l=Kw(c))?iw(l,c,a,o):a(c)):o(n)}catch(e){s&&!u&&s.exit(),o(e)}},Jw=function(e,t){e.notified||(e.notified=!0,mw(function(){for(var n=e.reactions,r;r=n.get();)qw(r,e);e.notified=!1,t&&!e.rejection&&Xw(e)}))},Yw=function(e,t,n){var r,i;Fw?(r=jw.createEvent(`Event`),r.promise=t,r.reason=n,r.initEvent(e,!1,!0),rw.dispatchEvent(r)):r={promise:t,reason:n},!ww&&(i=rw[`on`+e])?i(r):e===Iw&&hw(`Unhandled promise rejection`,n)},Xw=function(e){iw(pw,rw,function(){var t=e.facade,n=e.value,r=Zw(e),i;if(r&&(i=gw(function(){nw?Mw.emit(`unhandledRejection`,n,t):Yw(Iw,t,n)}),e.rejection=nw||Zw(e)?Hw:Vw,i.error))throw i.value})},Zw=function(e){return e.rejection!==Vw&&!e.parent},Qw=function(e){iw(pw,rw,function(){var t=e.facade;nw?Mw.emit(`rejectionHandled`,t):Yw(Lw,t,e.value)})},$w=function(e,t,n){return function(r){e(t,r,n)}},eT=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=Bw,Jw(e,!0))},tT=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new Aw(`Promise can't be resolved itself`);var r=Kw(t);r?mw(function(){var n={done:!1};try{iw(r,t,$w(tT,n,e),$w(eT,n,e))}catch(t){eT(n,t,e)}}):(e.value=t,e.state=zw,Jw(e,!1))}catch(t){eT({done:!1},t,e)}}};Cw&&(Ow=function(e){dw(this,kw),cw(e),iw(Uw,this);var t=Tw(this);try{e($w(tT,t),$w(eT,t))}catch(e){eT(t,e)}},kw=Ow.prototype,Uw=function(e){Ew(this,{type:Sw,done:!1,notified:!1,parent:!1,reactions:new _w,rejection:!1,state:Rw,value:void 0})},Uw.prototype=aw(kw,`then`,function(e,t){var n=Tw(this),r=Nw(fw(this,Ow));return n.parent=!0,r.ok=lw(e)?e:!0,r.fail=lw(t)&&t,r.domain=nw?Mw.domain:void 0,n.state===Rw?n.reactions.add(r):mw(function(){qw(r,n)}),r.promise}),Ww=function(){var e=new Uw,t=Tw(e);this.promise=e,this.resolve=$w(tT,t),this.reject=$w(eT,t)},xw.f=Nw=function(e){return e===Ow||e===Gw?new Ww(e):Pw(e)}),tw({global:!0,constructor:!0,wrap:!0,forced:Cw},{Promise:Ow}),ow(Ow,Sw,!1,!0),sw(Sw);var nT=PC,rT=rm,iT=XC.CONSTRUCTOR||!rT(function(e){nT.all(e).then(void 0,function(){})}),aT=B,oT=A,sT=$e,cT=ZC,lT=NC,uT=Kx;aT({target:`Promise`,stat:!0,forced:iT},{all:function(e){var t=this,n=cT.f(t),r=n.resolve,i=n.reject,a=lT(function(){var n=sT(t.resolve),a=[],o=0,s=1;uT(e,function(e){var c=o++,l=!1;s++,oT(n,t,e).then(function(e){l||(l=!0,a[c]=e,--s||r(a))},i)}),--s||r(a)});return a.error&&i(a.value),n.promise}});var dT=B,fT=XC.CONSTRUCTOR,pT=PC;pT&&pT.prototype,dT({target:`Promise`,proto:!0,forced:fT,real:!0},{catch:function(e){return this.then(void 0,e)}});var mT=B,hT=A,gT=$e,_T=ZC,vT=NC,yT=Kx;mT({target:`Promise`,stat:!0,forced:iT},{race:function(e){var t=this,n=_T.f(t),r=n.reject,i=vT(function(){var i=gT(t.resolve);yT(e,function(e){hT(i,t,e).then(n.resolve,r)})});return i.error&&r(i.value),n.promise}});var bT=B,xT=A,ST=ZC,CT=XC.CONSTRUCTOR;bT({target:`Promise`,stat:!0,forced:CT},{reject:function(e){var t=ST.f(this);return xT(t.reject,void 0,e),t.promise}});var wT=Fn,TT=P,ET=ZC,DT=function(e,t){if(wT(e),TT(t)&&t.constructor===e)return t;var n=ET.f(e),r=n.resolve;return r(t),n.promise},OT=B,kT=I,AT=ct,jT=PC,MT=XC.CONSTRUCTOR,NT=DT,PT=kT(`Promise`),FT=!MT;OT({target:`Promise`,stat:!0,forced:AT},{resolve:function(e){return NT(FT&&this===PT?jT:this,e)}});var IT=B,LT=A,RT=$e,zT=ZC,BT=NC,VT=Kx;IT({target:`Promise`,stat:!0,forced:iT},{allSettled:function(e){var t=this,n=zT.f(t),r=n.resolve,i=n.reject,a=BT(function(){var n=RT(t.resolve),i=[],a=0,o=1;VT(e,function(e){var s=a++,c=!1;o++,LT(n,t,e).then(function(e){c||(c=!0,i[s]={status:`fulfilled`,value:e},--o||r(i))},function(e){c||(c=!0,i[s]={status:`rejected`,reason:e},--o||r(i))})}),--o||r(i)});return a.error&&i(a.value),n.promise}});var HT=B,UT=A,WT=$e,GT=I,KT=ZC,qT=NC,JT=Kx,YT=iT,XT=`No one promise resolved`;HT({target:`Promise`,stat:!0,forced:YT},{any:function(e){var t=this,n=GT(`AggregateError`),r=KT.f(t),i=r.resolve,a=r.reject,o=qT(function(){var r=WT(t.resolve),o=[],s=0,c=1,l=!1;JT(e,function(e){var u=s++,d=!1;c++,UT(r,t,e).then(function(e){d||l||(l=!0,i(e))},function(e){d||l||(d=!0,o[u]=e,--c||a(new n(o,XT)))})}),--c||a(new n(o,XT))});return o.error&&a(o.value),r.promise}});var ZT=B,QT=PC,$T=s,eE=I,tE=D,nE=TS,rE=DT,iE=QT&&QT.prototype;ZT({target:`Promise`,proto:!0,real:!0,forced:!!QT&&$T(function(){iE.finally.call({then:function(){}},function(){})})},{finally:function(e){var t=nE(this,eE(`Promise`)),n=tE(e);return this.then(n?function(n){return rE(t,e()).then(function(){return n})}:e,n?function(n){return rE(t,e()).then(function(){throw n})}:e)}});var aE=Se.Promise,oE=B,sE=ZC;oE({target:`Promise`,stat:!0},{withResolvers:function(){var e=sE.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}});var cE=aE,lE=B,uE=ZC,dE=NC;lE({target:`Promise`,stat:!0,forced:!0},{try:function(e){var t=uE.f(this),n=dE(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var fE=cE,pE=Qh;(function(e){var t=cx.default,n=fr,r=bd,i=Yb,a=rx,o=lx,s=Om,c=Zb,l=fE,u=pE,d=Zm;function f(){e.exports=f=function(){return m},e.exports.__esModule=!0,e.exports.default=e.exports;var p,m={},h=Object.prototype,g=h.hasOwnProperty,_=n||function(e,t,n){e[t]=n.value},v=typeof r==`function`?r:{},y=v.iterator||`@@iterator`,b=v.asyncIterator||`@@asyncIterator`,x=v.toStringTag||`@@toStringTag`;function S(e,t,r){return n(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{S({},``)}catch{S=function(e,t,n){return e[t]=n}}function ee(e,t,n,r){var a=i((t&&t.prototype instanceof D?t:D).prototype);return _(a,`_invoke`,{value:ce(e,n,new de(r||[]))}),a}function C(e,t,n){try{return{type:`normal`,arg:e.call(t,n)}}catch(e){return{type:`throw`,arg:e}}}m.wrap=ee;var te=`suspendedStart`,w=`suspendedYield`,ne=`executing`,T=`completed`,E={};function D(){}function O(){}function k(){}var re={};S(re,y,function(){return this});var ie=a,A=ie&&ie(ie(fe([])));A&&A!==h&&g.call(A,y)&&(re=A);var ae=k.prototype=D.prototype=i(re);function oe(e){var t;o(t=[`next`,`throw`,`return`]).call(t,function(t){S(e,t,function(e){return this._invoke(t,e)})})}function se(e,n){function r(i,a,o,s){var c=C(e[i],e,a);if(c.type!==`throw`){var l=c.arg,u=l.value;return u&&t(u)==`object`&&g.call(u,`__await`)?n.resolve(u.__await).then(function(e){r(`next`,e,o,s)},function(e){r(`throw`,e,o,s)}):n.resolve(u).then(function(e){l.value=e,o(l)},function(e){return r(`throw`,e,o,s)})}s(c.arg)}var i;_(this,`_invoke`,{value:function(e,t){function a(){return new n(function(n,i){r(e,t,n,i)})}return i=i?i.then(a,a):a()}})}function ce(e,t,n){var r=te;return function(i,a){if(r===ne)throw Error(`Generator is already running`);if(r===T){if(i===`throw`)throw a;return{value:p,done:!0}}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=j(o,n);if(s){if(s===E)continue;return s}}if(n.method===`next`)n.sent=n._sent=n.arg;else if(n.method===`throw`){if(r===te)throw r=T,n.arg;n.dispatchException(n.arg)}else n.method===`return`&&n.abrupt(`return`,n.arg);r=ne;var c=C(e,t,n);if(c.type===`normal`){if(r=n.done?T:w,c.arg===E)continue;return{value:c.arg,done:n.done}}c.type===`throw`&&(r=T,n.method=`throw`,n.arg=c.arg)}}}function j(e,t){var n=t.method,r=e.iterator[n];if(r===p)return t.delegate=null,n===`throw`&&e.iterator.return&&(t.method=`return`,t.arg=p,j(e,t),t.method===`throw`)||n!==`return`&&(t.method=`throw`,t.arg=TypeError(`The iterator does not provide a '`+n+`' method`)),E;var i=C(r,e.iterator,t.arg);if(i.type===`throw`)return t.method=`throw`,t.arg=i.arg,t.delegate=null,E;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,t.method!==`return`&&(t.method=`next`,t.arg=p),t.delegate=null,E):a:(t.method=`throw`,t.arg=TypeError(`iterator result is not an object`),t.delegate=null,E)}function le(e){var t,n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),s(t=this.tryEntries).call(t,n)}function ue(e){var t=e.completion||{};t.type=`normal`,delete t.arg,e.completion=t}function de(e){this.tryEntries=[{tryLoc:`root`}],o(e).call(e,le,this),this.reset(!0)}function fe(e){if(e||e===``){var n=e[y];if(n)return n.call(e);if(typeof e.next==`function`)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(g.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=p,t.done=!0,t};return i.next=i}}throw TypeError(t(e)+` is not iterable`)}return O.prototype=k,_(ae,`constructor`,{value:k,configurable:!0}),_(k,`constructor`,{value:O,configurable:!0}),O.displayName=S(k,x,`GeneratorFunction`),m.isGeneratorFunction=function(e){var t=typeof e==`function`&&e.constructor;return!!t&&(t===O||(t.displayName||t.name)===`GeneratorFunction`)},m.mark=function(e){return c?c(e,k):(e.__proto__=k,S(e,x,`GeneratorFunction`)),e.prototype=i(ae),e},m.awrap=function(e){return{__await:e}},oe(se.prototype),S(se.prototype,b,function(){return this}),m.AsyncIterator=se,m.async=function(e,t,n,r,i){i===void 0&&(i=l);var a=new se(ee(e,t,n,r),i);return m.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},oe(ae),S(ae,x,`Generator`),S(ae,y,function(){return this}),S(ae,`toString`,function(){return`[object Generator]`}),m.keys=function(e){var t=Object(e),n=[];for(var r in t)s(n).call(n,r);return u(n).call(n),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},m.values=fe,de.prototype={constructor:de,reset:function(e){var t;if(this.prev=0,this.next=0,this.sent=this._sent=p,this.done=!1,this.delegate=null,this.method=`next`,this.arg=p,o(t=this.tryEntries).call(t,ue),!e)for(var n in this)n.charAt(0)===`t`&&g.call(this,n)&&!isNaN(+d(n).call(n,1))&&(this[n]=p)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type===`throw`)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type=`throw`,a.arg=e,t.next=n,r&&(t.method=`next`,t.arg=p),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if(i.tryLoc===`root`)return n(`end`);if(i.tryLoc<=this.prev){var o=g.call(i,`catchLoc`),s=g.call(i,`finallyLoc`);if(o&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw Error(`try statement without catch or finally`);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,`finallyLoc`)&&this.prev<r.finallyLoc){var i=r;break}}i&&(e===`break`||e===`continue`)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method=`next`,this.next=i.finallyLoc,E):this.complete(a)},complete:function(e,t){if(e.type===`throw`)throw e.arg;return e.type===`break`||e.type===`continue`?this.next=e.arg:e.type===`return`?(this.rval=this.arg=e.arg,this.method=`return`,this.next=`end`):e.type===`normal`&&t&&(this.next=t),E},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),ue(n),E}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if(r.type===`throw`){var i=r.arg;ue(n)}return i}}throw Error(`illegal catch attempt`)},delegateYield:function(e,t,n){return this.delegate={iterator:fe(e),resultName:t,nextLoc:n},this.method===`next`&&(this.arg=p),E}},m}e.exports=f,e.exports.__esModule=!0,e.exports.default=e.exports})(ox);var mE=ox.exports,hE=mE(),gE=hE;try{regeneratorRuntime=hE}catch{typeof globalThis==`object`?globalThis.regeneratorRuntime=hE:Function(`r`,`regeneratorRuntime = r`)(hE)}var _E=r(gE),vE={exports:{}},yE=s(function(){if(typeof ArrayBuffer==`function`){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,`a`,{value:8})}}),bE=s,xE=P,SE=S,CE=yE,wE=Object.isExtensible,TE=bE(function(){wE(1)})||CE?function(e){return!xE(e)||CE&&SE(e)===`ArrayBuffer`?!1:wE?wE(e):!0}:wE,EE=!s(function(){return Object.isExtensible(Object.preventExtensions({}))}),DE=B,OE=v,kE=qi,AE=P,jE=wt,ME=An.f,NE=Fa,PE=Ra,FE=TE,IE=kt,LE=EE,RE=!1,zE=IE(`meta`),BE=0,VE=function(e){ME(e,zE,{value:{objectID:`O`+ BE++,weakData:{}}})},HE=vE.exports={enable:function(){HE.enable=function(){},RE=!0;var e=NE.f,t=OE([].splice),n={};n[zE]=1,e(n).length&&(NE.f=function(n){for(var r=e(n),i=0,a=r.length;i<a;i++)if(r[i]===zE){t(r,i,1);break}return r},DE({target:`Object`,stat:!0,forced:!0},{getOwnPropertyNames:PE.f}))},fastKey:function(e,t){if(!AE(e))return typeof e==`symbol`?e:(typeof e==`string`?`S`:`P`)+e;if(!jE(e,zE)){if(!FE(e))return`F`;if(!t)return`E`;VE(e)}return e[zE].objectID},getWeakData:function(e,t){if(!jE(e,zE)){if(!FE(e))return!0;if(!t)return!1;VE(e)}return e[zE].weakData},onFreeze:function(e){return LE&&RE&&FE(e)&&!jE(e,zE)&&VE(e),e}};kE[zE]=!0;var UE=vE.exports,WE=B,GE=o,KE=UE,qE=s,JE=Jn,YE=Kx,XE=bS,ZE=D,QE=P,$E=me,eD=Co,tD=An.f,nD=es.forEach,rD=k,iD=Go,aD=iD.set,oD=iD.getterFor,sD=function(e,t,n){var r=e.indexOf(`Map`)!==-1,i=e.indexOf(`Weak`)!==-1,a=r?`set`:`add`,o=GE[e],s=o&&o.prototype,c={},l;if(!rD||!ZE(o)||!(i||s.forEach&&!qE(function(){new o().entries().next()})))l=n.getConstructor(t,e,r,a),KE.enable();else{l=t(function(t,n){aD(XE(t,u),{type:e,collection:new o}),$E(n)||YE(n,t[a],{that:t,AS_ENTRIES:r})});var u=l.prototype,d=oD(e);nD([`add`,`clear`,`delete`,`forEach`,`get`,`has`,`set`,`keys`,`values`,`entries`],function(e){var t=e===`add`||e===`set`;e in s&&!(i&&e===`clear`)&&JE(u,e,function(n,r){var a=d(this).collection;if(!t&&i&&!QE(n))return e===`get`?void 0:!1;var o=a[e](n===0?0:n,r);return t?this:o})}),i||tD(u,`size`,{configurable:!0,get:function(){return d(this).collection.size}})}return eD(l,e,!1,!0),c[e]=l,WE({global:!0,forced:!0},c),i||n.setStrong(l,e,r),l},cD=$a,lD=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:cD(e,r,t[r],n);return e},uD=Pa,dD=to,fD=lD,pD=kn,mD=bS,hD=me,gD=Kx,_D=Ou,vD=ku,yD=_S,bD=k,xD=UE.fastKey,SD=Go,CD=SD.set,wD=SD.getterFor,TD={getConstructor:function(e,t,n,r){var i=e(function(e,i){mD(e,a),CD(e,{type:t,index:uD(null),first:void 0,last:void 0,size:0}),bD||(e.size=0),hD(i)||gD(i,e[r],{that:e,AS_ENTRIES:n})}),a=i.prototype,o=wD(t),s=function(e,t,n){var r=o(e),i=c(e,t),a,s;return i?i.value=n:(r.last=i={index:s=xD(t,!0),key:t,value:n,previous:a=r.last,next:void 0,removed:!1},r.first||=i,a&&(a.next=i),bD?r.size++:e.size++,s!==`F`&&(r.index[s]=i)),e},c=function(e,t){var n=o(e),r=xD(t),i;if(r!==`F`)return n.index[r];for(i=n.first;i;i=i.next)if(i.key===t)return i};return fD(a,{clear:function(){for(var e=this,t=o(e),n=t.index,r=t.first;r;)r.removed=!0,r.previous&&=r.previous.next=void 0,delete n[r.index],r=r.next;t.first=t.last=void 0,bD?t.size=0:e.size=0},delete:function(e){var t=this,n=o(t),r=c(t,e);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first===r&&(n.first=i),n.last===r&&(n.last=a),bD?n.size--:t.size--}return!!r},forEach:function(e){for(var t=o(this),n=pD(e,arguments.length>1?arguments[1]:void 0),r;r=r?r.next:t.first;)for(n(r.value,r.key,this);r&&r.removed;)r=r.previous},has:function(e){return!!c(this,e)}}),fD(a,n?{get:function(e){var t=c(this,e);return t&&t.value},set:function(e,t){return s(this,e===0?0:e,t)}}:{add:function(e){return s(this,e=e===0?0:e,e)}}),bD&&dD(a,`size`,{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(e,t,n){var r=t+` Iterator`,i=wD(t),a=wD(r);_D(e,t,function(e,t){CD(this,{type:r,target:e,state:i(e),kind:t,last:void 0})},function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return!e.target||!(e.last=n=n?n.next:e.state.first)?(e.target=void 0,vD(void 0,!0)):vD(t===`keys`?n.key:t===`values`?n.value:[n.key,n.value],!1)},n?`entries`:`values`,!n,!0),yD(t)}};sD(`Map`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},TD);var ED=Se.Map,DD=r(ED),OD=B,kD=es.some;OD({target:`Array`,proto:!0,forced:!Tf(`some`)},{some:function(e){return kD(this,e,arguments.length>1?arguments[1]:void 0)}});var AD=df(`Array`,`some`),jD=Ee,MD=AD,ND=Array.prototype,PD=r(function(e){var t=e.some;return e===ND||jD(ND,e)&&t===ND.some?MD:t}),FD=df(`Array`,`keys`),ID=Vr,LD=wt,RD=Ee,zD=FD,BD=Array.prototype,Y={DOMTokenList:!0,NodeList:!0},X=r(function(e){var t=e.keys;return e===BD||RD(BD,e)&&t===BD.keys||LD(Y,ID(e))?zD:t}),Z=Wa,VD=Math.floor,Q=function(e,t){var n=e.length,r=VD(n/2);return n<8?HD(e,t):UD(e,Q(Z(e,0,r),t),Q(Z(e,r),t),t)},HD=function(e,t){for(var n=e.length,r=1,i,a;r<n;){for(a=r,i=e[r];a&&t(e[a-1],i)>0;)e[a]=e[--a];a!==r++&&(e[a]=i)}return e},UD=function(e,t,n,r){for(var i=t.length,a=n.length,o=0,s=0;o<i||s<a;)e[o+s]=o<i&&s<a?r(t[o],n[s])<=0?t[o++]:n[s++]:o<i?t[o++]:n[s++];return e},WD=Q,GD=De.match(/firefox\/(\d+)/i),KD=!!GD&&+GD[1],qD=De,JD=/MSIE|Trident/.test(qD),YD=De.match(/AppleWebKit\/(\d+)\./),$=!!YD&&+YD[1],XD=B,ZD=v,QD=$e,$D=bt,eO=Cr,tO=ng,nO=Ii,rO=s,iO=WD,aO=Tf,oO=KD,sO=JD,cO=Ie,lO=$,uO=[],dO=ZD(uO.sort),fO=ZD(uO.push),pO=rO(function(){uO.sort(void 0)}),mO=rO(function(){uO.sort(null)}),hO=aO(`sort`),gO=!rO(function(){if(cO)return cO<70;if(!(oO&&oO>3)){if(sO)return!0;if(lO)return lO<603;var e=``,t,n,r,i;for(t=65;t<76;t++){switch(n=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(i=0;i<47;i++)uO.push({k:n+i,v:r})}for(uO.sort(function(e,t){return t.v-e.v}),i=0;i<uO.length;i++)n=uO[i].k.charAt(0),e.charAt(e.length-1)!==n&&(e+=n);return e!==`DGBEFHACIJK`}}),_O=pO||!mO||!hO||!gO,vO=function(e){return function(t,n){return n===void 0?-1:t===void 0?1:e===void 0?nO(t)>nO(n)?1:-1:+e(t,n)||0}};XD({target:`Array`,proto:!0,forced:_O},{sort:function(e){e!==void 0&&QD(e);var t=$D(this);if(gO)return e===void 0?dO(t):dO(t,e);var n=[],r=eO(t),i,a;for(a=0;a<r;a++)a in t&&fO(n,t[a]);for(iO(n,vO(e)),i=eO(n),a=0;a<i;)t[a]=n[a++];for(;a<r;)tO(t,a++);return t}});var yO=df(`Array`,`sort`),bO=Ee,xO=yO,SO=Array.prototype,CO=r(function(e){var t=e.sort;return e===SO||bO(SO,e)&&t===SO.sort?xO:t}),wO=df(`Array`,`values`),TO=Vr,EO=wt,DO=Ee,OO=wO,kO=Array.prototype,AO={DOMTokenList:!0,NodeList:!0},jO=r(function(e){var t=e.values;return e===kO||DO(kO,e)&&t===kO.values||EO(AO,TO(e))?OO:t}),MO=r(Rd),NO=df(`Array`,`entries`),PO=Vr,FO=wt,IO=Ee,LO=NO,RO=Array.prototype,zO={DOMTokenList:!0,NodeList:!0},BO=r(function(e){var t=e.entries;return e===RO||IO(RO,e)&&t===RO.entries||FO(zO,PO(e))?LO:t});let VO,HO=new Uint8Array(16);function UO(){if(!VO&&(VO=typeof crypto<`u`&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!VO))throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);return VO(HO)}let WO=[];for(let e=0;e<256;++e)WO.push((e+256).toString(16).slice(1));function GO(e,t=0){return WO[e[t+0]]+WO[e[t+1]]+WO[e[t+2]]+WO[e[t+3]]+`-`+WO[e[t+4]]+WO[e[t+5]]+`-`+WO[e[t+6]]+WO[e[t+7]]+`-`+WO[e[t+8]]+WO[e[t+9]]+`-`+WO[e[t+10]]+WO[e[t+11]]+WO[e[t+12]]+WO[e[t+13]]+WO[e[t+14]]+WO[e[t+15]]}var KO={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function qO(e,t,n){if(KO.randomUUID&&!t&&!e)return KO.randomUUID();e||={};let r=e.random||(e.rng||UO)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n||=0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return GO(r)}function JO(e){return typeof e==`string`||typeof e==`number`}var YO=function(){function e(n){t(this,e),qd(this,`_queue`,[]),qd(this,`_timeout`,null),qd(this,`_extended`,null),this.delay=null,this.max=1/0,this.setOptions(n)}return Kd(e,[{key:`setOptions`,value:function(e){e&&e.delay!==void 0&&(this.delay=e.delay),e&&e.max!==void 0&&(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 r=t[n];r.original?e[r.name]=r.original:delete e[r.name]}this._extended=null}}},{key:`replace`,value:function(e,t){var n=this,r=e[t];if(!r)throw Error(`Method `+t+` undefined`);e[t]=function(){var e=[...arguments];n.queue({args:e,fn:r,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=g_(function(){e.flush()},this.delay))}},{key:`flush`,value:function(){var e,t;Hh(e=bg(t=this._queue).call(t,0)).call(e,function(e){e.fn.apply(e.context||e.fn,e.args||[])})}}],[{key:`extend`,value:function(t,n){var r=new e(n);if(t.flush!==void 0)throw Error(`Target object already has a property flush`);t.flush=function(){r.flush()};var i=[{name:`flush`,original:void 0}];if(n&&n.replace)for(var a=0;a<n.replace.length;a++){var o=n.replace[a];i.push({name:o,original:t[o]}),r.replace(t,o)}return r._extended={object:t,methods:i},r}}]),e}(),XO=function(){function e(){t(this,e),qd(this,`_subscribers`,{"*":[],add:[],remove:[],update:[]}),qd(this,`subscribe`,e.prototype.on),qd(this,`unsubscribe`,e.prototype.off)}return Kd(e,[{key:`_trigger`,value:function(e,t,n){var r,i;if(e===`*`)throw Error(`Cannot trigger event *`);Hh(r=ph(i=[]).call(i,sh(this._subscribers[e]),sh(this._subscribers[`*`]))).call(r,function(r){r(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]=Hf(n=this._subscribers[e]).call(n,function(e){return e!==t})}}]),e}();sD(`Set`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},TD);var ZO=Se.Set,QO=r(ZO),$O=r(Bp);function ek(e,t){var n=ch!==void 0&&um(e)||e[`@@iterator`];if(!n){if(wh(e)||(n=tk(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
7
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function tk(e,t){var n;if(e){if(typeof e==`string`)return nk(e,t);var r=mh(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return sm(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nk(e,t)}}function nk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var rk=function(e){function n(e){t(this,n),this._pairs=e}return Kd(n,[{key:e,value:_E.mark(function e(){var t,n,r,i,a;return _E.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=ek(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=rh(n.value,2),i=r[0],a=r[1],e.next=7,[i,a];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case`end`:return e.stop()}},e,this,[[1,11,14,17]])})},{key:`entries`,value:_E.mark(function e(){var t,n,r,i,a;return _E.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=ek(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=rh(n.value,2),i=r[0],a=r[1],e.next=7,[i,a];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case`end`:return e.stop()}},e,this,[[1,11,14,17]])})},{key:`keys`,value:_E.mark(function e(){var t,n,r,i;return _E.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=ek(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=rh(n.value,1),i=r[0],e.next=7,i;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case`end`:return e.stop()}},e,this,[[1,11,14,17]])})},{key:`values`,value:_E.mark(function e(){var t,n,r,i;return _E.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=ek(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=rh(n.value,2),i=r[1],e.next=7,i;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case`end`:return e.stop()}},e,this,[[1,11,14,17]])})},{key:`toIdArray`,value:function(){var e;return Yf(e=sh(this._pairs)).call(e,function(e){return e[0]})}},{key:`toItemArray`,value:function(){var e;return Yf(e=sh(this._pairs)).call(e,function(e){return e[1]})}},{key:`toEntryArray`,value:function(){return sh(this._pairs)}},{key:`toObjectMap`,value:function(){var e=Kg(null),t=ek(this._pairs),n;try{for(t.s();!(n=t.n()).done;){var r=rh(n.value,2),i=r[0];e[i]=r[1]}}catch(e){t.e(e)}finally{t.f()}return e}},{key:`toMap`,value:function(){return new DD(this._pairs)}},{key:`toIdSet`,value:function(){return new QO(this.toIdArray())}},{key:`toItemSet`,value:function(){return new QO(this.toItemArray())}},{key:`cache`,value:function(){return new n(sh(this._pairs))}},{key:`distinct`,value:function(e){var t=new QO,n=ek(this._pairs),r;try{for(n.s();!(r=n.n()).done;){var i=rh(r.value,2),a=i[0],o=i[1];t.add(e(o,a))}}catch(e){n.e(e)}finally{n.f()}return t}},{key:`filter`,value:function(e){var t=this._pairs;return new n({[MO](){return _E.mark(function n(){var r,i,a,o,s;return _E.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:r=ek(t),n.prev=1,r.s();case 3:if((i=r.n()).done){n.next=10;break}if(a=rh(i.value,2),o=a[0],s=a[1],!e(s,o)){n.next=8;break}return n.next=8,[o,s];case 8:n.next=3;break;case 10:n.next=15;break;case 12:n.prev=12,n.t0=n.catch(1),r.e(n.t0);case 15:return n.prev=15,r.f(),n.finish(15);case 18:case`end`:return n.stop()}},n,null,[[1,12,15,18]])})()}})}},{key:`forEach`,value:function(e){var t=ek(this._pairs),n;try{for(t.s();!(n=t.n()).done;){var r=rh(n.value,2),i=r[0],a=r[1];e(a,i)}}catch(e){t.e(e)}finally{t.f()}}},{key:`map`,value:function(e){var t=this._pairs;return new n({[MO](){return _E.mark(function n(){var r,i,a,o,s;return _E.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:r=ek(t),n.prev=1,r.s();case 3:if((i=r.n()).done){n.next=9;break}return a=rh(i.value,2),o=a[0],s=a[1],n.next=7,[o,e(s,o)];case 7:n.next=3;break;case 9:n.next=14;break;case 11:n.prev=11,n.t0=n.catch(1),r.e(n.t0);case 14:return n.prev=14,r.f(),n.finish(14);case 17:case`end`:return n.stop()}},n,null,[[1,11,14,17]])})()}})}},{key:`max`,value:function(e){var t=$O(this._pairs),n=t.next();if(n.done)return null;for(var r=n.value[1],i=e(n.value[1],n.value[0]);!(n=t.next()).done;){var a=rh(n.value,2),o=a[0],s=a[1],c=e(s,o);c>i&&(i=c,r=s)}return r}},{key:`min`,value:function(e){var t=$O(this._pairs),n=t.next();if(n.done)return null;for(var r=n.value[1],i=e(n.value[1],n.value[0]);!(n=t.next()).done;){var a=rh(n.value,2),o=a[0],s=a[1],c=e(s,o);c<i&&(i=c,r=s)}return r}},{key:`reduce`,value:function(e,t){var n=ek(this._pairs),r;try{for(n.s();!(r=n.n()).done;){var i=rh(r.value,2),a=i[0],o=i[1];t=e(t,o,a)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:`sort`,value:function(e){var t=this;return new n({[MO]:function(){var n;return $O(CO(n=sh(t._pairs)).call(n,function(t,n){var r=rh(t,2),i=r[0],a=r[1],o=rh(n,2),s=o[0],c=o[1];return e(a,c,i,s)}))}})}}]),n}(MO);function ik(e,t){var n=kh(e);if(bb){var r=bb(e);t&&(r=Hf(r).call(r,function(t){return Ab(e,t).enumerable})),n.push.apply(n,r)}return n}function ak(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?Hh(n=ik(Object(i),!0)).call(n,function(t){qd(e,t,i[t])}):Rb?Kb(e,Rb(i)):Hh(r=ik(Object(i))).call(r,function(t){qb(e,t,Ab(i,t))})}return e}function ok(e,t){var n=ch!==void 0&&um(e)||e[`@@iterator`];if(!n){if(wh(e)||(n=sk(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
8
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function sk(e,t){var n;if(e){if(typeof e==`string`)return ck(e,t);var r=mh(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return sm(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ck(e,t)}}function ck(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function lk(e){var t=uk();return function(){var n=ax(e),r;if(t){var i=ax(this).constructor;r=vb(n,arguments,i)}else r=n.apply(this,arguments);return nx(this,r)}}function uk(){if(typeof Reflect>`u`||!vb||vb.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(vb(Boolean,[],function(){})),!0}catch{return!1}}function dk(e,t){return e[t]??(e[t]=qO()),e}var fk=function(e){tx(r,e);var n=lk(r);function r(e,i){var a;return t(this,r),a=n.call(this),qd(Jb(a),`_queue`,null),e&&!wh(e)&&(i=e,e=[]),a._options=i||{},a._data=new DD,a.length=0,a._idProp=a._options.fieldId||`id`,e&&e.length&&a.add(e),a.setOptions(i),a}return Kd(r,[{key:`idProp`,get:function(){return this._idProp}},{key:`setOptions`,value:function(e){e&&e.queue!==void 0&&(e.queue===!1?this._queue&&=(this._queue.destroy(),null):(this._queue||=YO.extend(this,{replace:[`add`,`update`,`remove`]}),e.queue&&typeof e.queue==`object`&&this._queue.setOptions(e.queue)))}},{key:`add`,value:function(e,t){var n=this,r=[],i;if(wh(e)){var a=Yf(e).call(e,function(e){return e[n._idProp]});if(PD(a).call(a,function(e){return n._data.has(e)}))throw Error(`A duplicate id was found in the parameter array.`);for(var o=0,s=e.length;o<s;o++)i=this._addItem(e[o]),r.push(i)}else if(e&&typeof e==`object`)i=this._addItem(e),r.push(i);else throw Error(`Unknown dataType`);return r.length&&this._trigger(`add`,{items:r},t),r}},{key:`update`,value:function(e,t){var n=this,r=[],i=[],a=[],o=[],s=this._idProp,c=function(e){var t=e[s];if(t!=null&&n._data.has(t)){var c=e,l=Lg({},n._data.get(t)),u=n._updateItem(c);i.push(u),o.push(c),a.push(l)}else{var d=n._addItem(e);r.push(d)}};if(wh(e))for(var l=0,u=e.length;l<u;l++)e[l]&&typeof e[l]==`object`?c(e[l]):console.warn(`Ignoring input item, which is not an object at index `+l);else if(e&&typeof e==`object`)c(e);else throw Error(`Unknown dataType`);if(r.length&&this._trigger(`add`,{items:r},t),i.length){var d={items:i,oldData:a,data:o};this._trigger(`update`,d,t)}return ph(r).call(r,i)}},{key:`updateOnly`,value:function(e,t){var n,r=this;wh(e)||(e=[e]);var i=Yf(n=Yf(e).call(e,function(e){var t=r._data.get(e[r._idProp]);if(t==null)throw Error(`Updating non-existent items is not allowed.`);return{oldData:t,update:e}})).call(n,function(e){var t=e.oldData,n=e.update,i=t[r._idProp],a=Uy(t,n);return r._data.set(i,a),{id:i,oldData:t,updatedData:a}});if(i.length){var a={items:Yf(i).call(i,function(e){return e.id}),oldData:Yf(i).call(i,function(e){return e.oldData}),data:Yf(i).call(i,function(e){return e.updatedData})};return this._trigger(`update`,a,t),a.items}else return[]}},{key:`get`,value:function(e,t){var n=void 0,r=void 0,i=void 0;JO(e)?(n=e,i=t):wh(e)?(r=e,i=t):i=e;var a=i&&i.returnType===`Object`?`Object`:`Array`,o=i&&Hf(i),s=[],c=void 0,l=void 0,u=void 0;if(n!=null)c=this._data.get(n),c&&o&&!o(c)&&(c=void 0);else if(r!=null)for(var d=0,f=r.length;d<f;d++)c=this._data.get(r[d]),c!=null&&(!o||o(c))&&s.push(c);else{var p;l=sh(X(p=this._data).call(p));for(var m=0,h=l.length;m<h;m++)u=l[m],c=this._data.get(u),c!=null&&(!o||o(c))&&s.push(c)}if(i&&i.order&&n==null&&this._sort(s,i.order),i&&i.fields){var g=i.fields;if(n!=null&&c!=null)c=this._filterFields(c,g);else for(var _=0,v=s.length;_<v;_++)s[_]=this._filterFields(s[_],g)}if(a==`Object`){for(var y={},b=0,x=s.length;b<x;b++){var S=s[b],ee=S[this._idProp];y[ee]=S}return y}else if(n!=null)return c??null;else return s}},{key:`getIds`,value:function(e){var t=this._data,n=e&&Hf(e),r=e&&e.order,i=sh(X(t).call(t)),a=[];if(n)if(r){for(var o=[],s=0,c=i.length;s<c;s++){var l=i[s],u=this._data.get(l);u!=null&&n(u)&&o.push(u)}this._sort(o,r);for(var d=0,f=o.length;d<f;d++)a.push(o[d][this._idProp])}else for(var p=0,m=i.length;p<m;p++){var h=i[p],g=this._data.get(h);g!=null&&n(g)&&a.push(g[this._idProp])}else if(r){for(var _=[],v=0,y=i.length;v<y;v++){var b=i[v];_.push(t.get(b))}this._sort(_,r);for(var x=0,S=_.length;x<S;x++)a.push(_[x][this._idProp])}else for(var ee=0,C=i.length;ee<C;ee++){var te=i[ee],w=t.get(te);w!=null&&a.push(w[this._idProp])}return a}},{key:`getDataSet`,value:function(){return this}},{key:`forEach`,value:function(e,t){var n=t&&Hf(t),r=this._data,i=sh(X(r).call(r));if(t&&t.order)for(var a=this.get(t),o=0,s=a.length;o<s;o++){var c=a[o],l=c[this._idProp];e(c,l)}else for(var u=0,d=i.length;u<d;u++){var f=i[u],p=this._data.get(f);p!=null&&(!n||n(p))&&e(p,f)}}},{key:`map`,value:function(e,t){for(var n=t&&Hf(t),r=[],i=this._data,a=sh(X(i).call(i)),o=0,s=a.length;o<s;o++){var c=a[o],l=this._data.get(c);l!=null&&(!n||n(l))&&r.push(e(l,c))}return t&&t.order&&this._sort(r,t.order),r}},{key:`_filterFields`,value:function(e,t){var n;return e&&Ff(n=wh(t)?t:kh(t)).call(n,function(t,n){return t[n]=e[n],t},{})}},{key:`_sort`,value:function(e,t){if(typeof t==`string`){var n=t;CO(e).call(e,function(e,t){var r=e[n],i=t[n];return r>i?1:r<i?-1:0})}else if(typeof t==`function`)CO(e).call(e,t);else throw TypeError(`Order must be a function or a string`)}},{key:`remove`,value:function(e,t){for(var n=[],r=[],i=wh(e)?e:[e],a=0,o=i.length;a<o;a++){var s=this._remove(i[a]);if(s){var c=s[this._idProp];c!=null&&(n.push(c),r.push(s))}}return n.length&&this._trigger(`remove`,{items:n,oldData:r},t),n}},{key:`_remove`,value:function(e){var t;if(JO(e)?t=e:e&&typeof e==`object`&&(t=e[this._idProp]),t!=null&&this._data.has(t)){var n=this._data.get(t)||null;return this._data.delete(t),--this.length,n}return null}},{key:`clear`,value:function(e){for(var t,n=sh(X(t=this._data).call(t)),r=[],i=0,a=n.length;i<a;i++)r.push(this._data.get(n[i]));return this._data.clear(),this.length=0,this._trigger(`remove`,{items:n,oldData:r},e),n}},{key:`max`,value:function(e){var t,n=null,r=null,i=ok(jO(t=this._data).call(t)),a;try{for(i.s();!(a=i.n()).done;){var o=a.value,s=o[e];typeof s==`number`&&(r==null||s>r)&&(n=o,r=s)}}catch(e){i.e(e)}finally{i.f()}return n||null}},{key:`min`,value:function(e){var t,n=null,r=null,i=ok(jO(t=this._data).call(t)),a;try{for(i.s();!(a=i.n()).done;){var o=a.value,s=o[e];typeof s==`number`&&(r==null||s<r)&&(n=o,r=s)}}catch(e){i.e(e)}finally{i.f()}return n||null}},{key:`distinct`,value:function(e){for(var t=this._data,n=sh(X(t).call(t)),r=[],i=0,a=0,o=n.length;a<o;a++){for(var s=n[a],c=t.get(s)[e],l=!1,u=0;u<i;u++)if(r[u]==c){l=!0;break}!l&&c!==void 0&&(r[i]=c,i++)}return r}},{key:`_addItem`,value:function(e){var t=dk(e,this._idProp),n=t[this._idProp];if(this._data.has(n))throw Error(`Cannot add item: item with id `+n+` already exists`);return this._data.set(n,t),++this.length,n}},{key:`_updateItem`,value:function(e){var t=e[this._idProp];if(t==null)throw Error(`Cannot update item: item has no id (item: `+Yg(e)+`)`);var n=this._data.get(t);if(!n)throw Error(`Cannot update item: no item with id `+t+` found`);return this._data.set(t,ak(ak({},n),e)),t}},{key:`stream`,value:function(e){if(e){var t=this._data;return new rk({[MO](){return _E.mark(function n(){var r,i,a,o;return _E.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:r=ok(e),n.prev=1,r.s();case 3:if((i=r.n()).done){n.next=11;break}if(a=i.value,o=t.get(a),o==null){n.next=9;break}return n.next=9,[a,o];case 9:n.next=3;break;case 11:n.next=16;break;case 13:n.prev=13,n.t0=n.catch(1),r.e(n.t0);case 16:return n.prev=16,r.f(),n.finish(16);case 19:case`end`:return n.stop()}},n,null,[[1,13,16,19]])})()}})}else{var n;return new rk({[MO]:_f(n=BO(this._data)).call(n,this._data)})}}}]),r}(XO);function pk(e,t){var n=ch!==void 0&&um(e)||e[`@@iterator`];if(!n){if(wh(e)||(n=mk(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
9
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function mk(e,t){var n;if(e){if(typeof e==`string`)return hk(e,t);var r=mh(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return sm(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hk(e,t)}}function hk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gk(e){var t=_k();return function(){var n=ax(e),r;if(t){var i=ax(this).constructor;r=vb(n,arguments,i)}else r=n.apply(this,arguments);return nx(this,r)}}function _k(){if(typeof Reflect>`u`||!vb||vb.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(vb(Boolean,[],function(){})),!0}catch{return!1}}var vk=function(e){tx(r,e);var n=gk(r);function r(e,i){var a,o;return t(this,r),o=n.call(this),qd(Jb(o),`length`,0),qd(Jb(o),`_ids`,new QO),o._options=i||{},o._listener=_f(a=o._onEvent).call(a,Jb(o)),o.setData(e),o}return Kd(r,[{key:`idProp`,get:function(){return this.getDataSet().idProp}},{key:`setData`,value:function(e){if(this._data){this._data.off&&this._data.off(`*`,this._listener);var t=this._data.getIds({filter:Hf(this._options)}),n=this._data.get(t);this._ids.clear(),this.length=0,this._trigger(`remove`,{items:t,oldData:n})}if(e!=null){this._data=e;for(var r=this._data.getIds({filter:Hf(this._options)}),i=0,a=r.length;i<a;i++){var o=r[i];this._ids.add(o)}this.length=r.length,this._trigger(`add`,{items:r})}else this._data=new fk;this._data.on&&this._data.on(`*`,this._listener)}},{key:`refresh`,value:function(){for(var e=this._data.getIds({filter:Hf(this._options)}),t=sh(this._ids),n={},r=[],i=[],a=[],o=0,s=e.length;o<s;o++){var c=e[o];n[c]=!0,this._ids.has(c)||(r.push(c),this._ids.add(c))}for(var l=0,u=t.length;l<u;l++){var d=t[l],f=this._data.get(d);f==null?console.error(`If you see this, report it please.`):n[d]||(i.push(d),a.push(f),this._ids.delete(d))}this.length+=r.length-i.length,r.length&&this._trigger(`add`,{items:r}),i.length&&this._trigger(`remove`,{items:i,oldData:a})}},{key:`get`,value:function(e,t){if(this._data==null)return null;var n=null,r;JO(e)||wh(e)?(n=e,r=t):r=e;var i=Lg({},this._options,r),a=Hf(this._options),o=r&&Hf(r);return a&&o&&(i.filter=function(e){return a(e)&&o(e)}),n==null?this._data.get(i):this._data.get(n,i)}},{key:`getIds`,value:function(e){if(this._data.length){var t=Hf(this._options),n=e==null?null:Hf(e),r=n?t?function(e){return t(e)&&n(e)}:n:t;return this._data.getIds({filter:r,order:e&&e.order})}else return[]}},{key:`forEach`,value:function(e,t){if(this._data){var n,r=Hf(this._options),i=t&&Hf(t),a=i?r?function(e){return r(e)&&i(e)}:i:r;Hh(n=this._data).call(n,e,{filter:a,order:t&&t.order})}}},{key:`map`,value:function(e,t){if(this._data){var n,r=Hf(this._options),i=t&&Hf(t),a=i?r?function(e){return r(e)&&i(e)}:i:r;return Yf(n=this._data).call(n,e,{filter:a,order:t&&t.order})}else return[]}},{key:`getDataSet`,value:function(){return this._data.getDataSet()}},{key:`stream`,value:function(e){var t;return this._data.stream(e||{[MO]:_f(t=X(this._ids)).call(t,this._ids)})}},{key:`dispose`,value:function(){var e;(e=this._data)!=null&&e.off&&this._data.off(`*`,this._listener);var t=`This data view has already been disposed of.`,n={get:function(){throw Error(t)},set:function(){throw Error(t)},configurable:!1},i=pk(Ch(r.prototype)),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;qb(this,o,n)}}catch(e){i.e(e)}finally{i.f()}}},{key:`_onEvent`,value:function(e,t,n){if(!(!t||!t.items||!this._data)){var r=t.items,i=[],a=[],o=[],s=[],c=[],l=[];switch(e){case`add`:for(var u=0,d=r.length;u<d;u++){var f=r[u];this.get(f)&&(this._ids.add(f),i.push(f))}break;case`update`:for(var p=0,m=r.length;p<m;p++){var h=r[p];this.get(h)?this._ids.has(h)?(a.push(h),c.push(t.data[p]),s.push(t.oldData[p])):(this._ids.add(h),i.push(h)):this._ids.has(h)&&(this._ids.delete(h),o.push(h),l.push(t.oldData[p]))}break;case`remove`:for(var g=0,_=r.length;g<_;g++){var v=r[g];this._ids.has(v)&&(this._ids.delete(v),o.push(v),l.push(t.oldData[g]))}break}this.length+=i.length-o.length,i.length&&this._trigger(`add`,{items:i},n),a.length&&this._trigger(`update`,{items:a,oldData:s,data:c},n),o.length&&this._trigger(`remove`,{items:o,oldData:l},n)}}}]),r}(XO);function yk(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof t.add==`function`&&typeof t.clear==`function`&&typeof t.distinct==`function`&&typeof Hh(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof Yf(t)==`function`&&typeof t.max==`function`&&typeof t.min==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.remove==`function`&&typeof t.setOptions==`function`&&typeof t.stream==`function`&&typeof t.update==`function`&&typeof t.updateOnly==`function`}function bk(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof Hh(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof Yf(t)==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.stream==`function`&&yk(e,t.getDataSet())}e.DELETE=Hy,e.DataSet=fk,e.DataStream=rk,e.DataView=vk,e.Queue=YO,e.createNewDataPipeFrom=pp,e.isDataSetLike=yk,e.isDataViewLike=bk}))})),ae=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e,A()):typeof define==`function`&&define.amd?define([`exports`,`vis-data/peer/umd/vis-data.js`],r):r((n=typeof globalThis<`u`?globalThis:n||self).vis=n.vis||{},n.vis)})(e,(function(e,t){var n=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var i=function(e){return e&&e.Math===Math&&e},a=i(typeof globalThis==`object`&&globalThis)||i(typeof window==`object`&&window)||i(typeof self==`object`&&self)||i(typeof n==`object`&&n)||function(){return this}()||n||Function(`return this`)(),o=function(e){try{return!!e()}catch{return!0}},s=!o((function(){var e=function(){}.bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)})),c=s,l=Function.prototype,u=l.apply,d=l.call,f=typeof Reflect==`object`&&Reflect.apply||(c?d.bind(u):function(){return d.apply(u,arguments)}),p=s,m=Function.prototype,h=m.call,g=p&&m.bind.bind(h,h),_=p?g:function(e){return function(){return h.apply(e,arguments)}},v=_,y=v({}.toString),b=v(``.slice),x=function(e){return b(y(e),8,-1)},S=x,ee=_,C=function(e){if(S(e)===`Function`)return ee(e)},te=typeof document==`object`&&document.all,w={all:te,IS_HTMLDDA:te===void 0&&te!==void 0},ne=w.all,T=w.IS_HTMLDDA?function(e){return typeof e==`function`||e===ne}:function(e){return typeof e==`function`},E={},D=!o((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})),O=s,k=Function.prototype.call,re=O?k.bind(k):function(){return k.apply(k,arguments)},ie={},A={}.propertyIsEnumerable,ae=Object.getOwnPropertyDescriptor;ie.f=ae&&!A.call({1:2},1)?function(e){var t=ae(this,e);return!!t&&t.enumerable}:A;var oe,se,ce=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},j=o,le=x,ue=Object,de=_(``.split),fe=j((function(){return!ue(`z`).propertyIsEnumerable(0)}))?function(e){return le(e)===`String`?de(e,``):ue(e)}:ue,pe=function(e){return e==null},me=pe,he=TypeError,ge=function(e){if(me(e))throw new he(`Can't call method on `+e);return e},_e=fe,ve=ge,ye=function(e){return _e(ve(e))},be=T,xe=w.all,M=w.IS_HTMLDDA?function(e){return typeof e==`object`?e!==null:be(e)||e===xe}:function(e){return typeof e==`object`?e!==null:be(e)},N={},P=N,Se=a,Ce=T,we=function(e){return Ce(e)?e:void 0},Te=function(e,t){return arguments.length<2?we(P[e])||we(Se[e]):P[e]&&P[e][t]||Se[e]&&Se[e][t]},F=_({}.isPrototypeOf),I=typeof navigator<`u`&&String(navigator.userAgent)||``,Ee=a,De=I,Oe=Ee.process,ke=Ee.Deno,Ae=Oe&&Oe.versions||ke&&ke.version,je=Ae&&Ae.v8;je&&(se=(oe=je.split(`.`))[0]>0&&oe[0]<4?1:+(oe[0]+oe[1])),!se&&De&&(!(oe=De.match(/Edge\/(\d+)/))||oe[1]>=74)&&(oe=De.match(/Chrome\/(\d+)/))&&(se=+oe[1]);var Me=se,Ne=Me,Pe=o,Fe=a.String,Ie=!!Object.getOwnPropertySymbols&&!Pe((function(){var e=Symbol(`symbol detection`);return!Fe(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Ne&&Ne<41})),Le=Ie&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,Re=Te,ze=T,Be=F,Ve=Object,He=Le?function(e){return typeof e==`symbol`}:function(e){var t=Re(`Symbol`);return ze(t)&&Be(t.prototype,Ve(e))},Ue=String,We=function(e){try{return Ue(e)}catch{return`Object`}},Ge=T,Ke=We,qe=TypeError,Je=function(e){if(Ge(e))return e;throw new qe(Ke(e)+` is not a function`)},Ye=Je,Xe=pe,Ze=function(e,t){var n=e[t];return Xe(n)?void 0:Ye(n)},Qe=re,$e=T,et=M,tt=TypeError,nt={exports:{}},rt=a,it=Object.defineProperty,at=function(e,t){try{it(rt,e,{value:t,configurable:!0,writable:!0})}catch{rt[e]=t}return t},ot=`__core-js_shared__`,L=a[ot]||at(ot,{}),st=L;(nt.exports=function(e,t){return st[e]||(st[e]=t===void 0?{}:t)})(`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 ct=nt.exports,lt=ge,ut=Object,dt=function(e){return ut(lt(e))},ft=dt,pt=_({}.hasOwnProperty),mt=Object.hasOwn||function(e,t){return pt(ft(e),t)},ht=_,gt=0,_t=Math.random(),vt=ht(1 .toString),yt=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+vt(++gt+_t,36)},bt=ct,xt=mt,St=yt,Ct=Ie,wt=Le,Tt=a.Symbol,Et=bt(`wks`),Dt=wt?Tt.for||Tt:Tt&&Tt.withoutSetter||St,Ot=function(e){return xt(Et,e)||(Et[e]=Ct&&xt(Tt,e)?Tt[e]:Dt(`Symbol.`+e)),Et[e]},kt=re,At=M,jt=He,Mt=Ze,Nt=function(e,t){var n,r;if(t===`string`&&$e(n=e.toString)&&!et(r=Qe(n,e))||$e(n=e.valueOf)&&!et(r=Qe(n,e))||t!==`string`&&$e(n=e.toString)&&!et(r=Qe(n,e)))return r;throw new tt(`Can't convert object to primitive value`)},Pt=TypeError,Ft=Ot(`toPrimitive`),It=function(e,t){if(!At(e)||jt(e))return e;var n,r=Mt(e,Ft);if(r){if(t===void 0&&(t=`default`),n=kt(r,e,t),!At(n)||jt(n))return n;throw new Pt(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),Nt(e,t)},Lt=He,Rt=function(e){var t=It(e,`string`);return Lt(t)?t:t+``},zt=M,Bt=a.document,Vt=zt(Bt)&&zt(Bt.createElement),Ht=function(e){return Vt?Bt.createElement(e):{}},Ut=Ht,Wt=!D&&!o((function(){return Object.defineProperty(Ut(`div`),`a`,{get:function(){return 7}}).a!==7})),Gt=D,Kt=re,qt=ie,Jt=ce,Yt=ye,Xt=Rt,Zt=mt,Qt=Wt,$t=Object.getOwnPropertyDescriptor;E.f=Gt?$t:function(e,t){if(e=Yt(e),t=Xt(t),Qt)try{return $t(e,t)}catch{}if(Zt(e,t))return Jt(!Kt(qt.f,e,t),e[t])};var en=o,tn=T,nn=/#|\.prototype\./,rn=function(e,t){var n=on[an(e)];return n===cn||n!==sn&&(tn(t)?en(t):!!t)},an=rn.normalize=function(e){return String(e).replace(nn,`.`).toLowerCase()},on=rn.data={},sn=rn.NATIVE=`N`,cn=rn.POLYFILL=`P`,ln=rn,un=Je,dn=s,fn=C(C.bind),pn=function(e,t){return un(e),t===void 0?e:dn?fn(e,t):function(){return e.apply(t,arguments)}},mn={},hn=D&&o((function(){return Object.defineProperty((function(){}),`prototype`,{value:42,writable:!1}).prototype!==42})),gn=M,_n=String,vn=TypeError,yn=function(e){if(gn(e))return e;throw new vn(_n(e)+` is not an object`)},bn=D,xn=Wt,Sn=hn,Cn=yn,wn=Rt,Tn=TypeError,En=Object.defineProperty,Dn=Object.getOwnPropertyDescriptor,On=`enumerable`,kn=`configurable`,An=`writable`;mn.f=bn?Sn?function(e,t,n){if(Cn(e),t=wn(t),Cn(n),typeof e==`function`&&t===`prototype`&&`value`in n&&An in n&&!n[An]){var r=Dn(e,t);r&&r[An]&&(e[t]=n.value,n={configurable:kn in n?n[kn]:r[kn],enumerable:On in n?n[On]:r[On],writable:!1})}return En(e,t,n)}:En:function(e,t,n){if(Cn(e),t=wn(t),Cn(n),xn)try{return En(e,t,n)}catch{}if(`get`in n||`set`in n)throw new Tn(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e};var jn=mn,Mn=ce,Nn=D?function(e,t,n){return jn.f(e,t,Mn(1,n))}:function(e,t,n){return e[t]=n,e},Pn=a,Fn=f,In=C,Ln=T,Rn=E.f,zn=ln,Bn=N,Vn=pn,Hn=Nn,Un=mt,Wn=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return Fn(e,this,arguments)};return t.prototype=e.prototype,t},R=function(e,t){var n,r,i,a,o,s,c,l,u,d=e.target,f=e.global,p=e.stat,m=e.proto,h=f?Pn:p?Pn[d]:(Pn[d]||{}).prototype,g=f?Bn:Bn[d]||Hn(Bn,d,{})[d],_=g.prototype;for(a in t)r=!(n=zn(f?a:d+(p?`.`:`#`)+a,e.forced))&&h&&Un(h,a),s=g[a],r&&(c=e.dontCallGetSet?(u=Rn(h,a))&&u.value:h[a]),o=r&&c?c:t[a],r&&typeof s==typeof o||(l=e.bind&&r?Vn(o,Pn):e.wrap&&r?Wn(o):m&&Ln(o)?In(o):o,(e.sham||o&&o.sham||s&&s.sham)&&Hn(l,`sham`,!0),Hn(g,a,l),m&&(Un(Bn,i=d+`Prototype`)||Hn(Bn,i,{}),Hn(Bn[i],a,o),e.real&&_&&(n||!_[a])&&Hn(_,a,o)))},z=Math.ceil,Gn=Math.floor,Kn=Math.trunc||function(e){var t=+e;return(t>0?Gn:z)(t)},qn=function(e){var t=+e;return t!=t||t===0?0:Kn(t)},Jn=qn,Yn=Math.max,Xn=Math.min,Zn=function(e,t){var n=Jn(e);return n<0?Yn(n+t,0):Xn(n,t)},Qn=qn,$n=Math.min,er=function(e){return e>0?$n(Qn(e),9007199254740991):0},tr=function(e){return er(e.length)},nr=ye,rr=Zn,ir=tr,ar=function(e){return function(t,n,r){var i,a=nr(t),o=ir(a),s=rr(r,o);if(e&&n!=n){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},B={includes:ar(!0),indexOf:ar(!1)},or={},sr=mt,cr=ye,lr=B.indexOf,ur=or,dr=_([].push),fr=function(e,t){var n,r=cr(e),i=0,a=[];for(n in r)!sr(ur,n)&&sr(r,n)&&dr(a,n);for(;t.length>i;)sr(r,n=t[i++])&&(~lr(a,n)||dr(a,n));return a},pr=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],mr=fr,hr=pr,gr=Object.keys||function(e){return mr(e,hr)},_r={};_r.f=Object.getOwnPropertySymbols;var vr=D,yr=_,br=re,xr=o,Sr=gr,Cr=_r,wr=ie,Tr=dt,Er=fe,Dr=Object.assign,Or=Object.defineProperty,kr=yr([].concat),Ar=!Dr||xr((function(){if(vr&&Dr({b:1},Dr(Or({},`a`,{enumerable:!0,get:function(){Or(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol(`assign detection`),r=`abcdefghijklmnopqrst`;return e[n]=7,r.split(``).forEach((function(e){t[e]=e})),Dr({},e)[n]!==7||Sr(Dr({},t)).join(``)!==r}))?function(e,t){for(var n=Tr(e),r=arguments.length,i=1,a=Cr.f,o=wr.f;r>i;)for(var s,c=Er(arguments[i++]),l=a?kr(Sr(c),a(c)):Sr(c),u=l.length,d=0;u>d;)s=l[d++],vr&&!br(o,c,s)||(n[s]=c[s]);return n}:Dr;R({target:`Object`,stat:!0,arity:2,forced:Object.assign!==Ar},{assign:Ar});var jr=r(N.Object.assign),Mr=_([].slice),Nr=_,Pr=Je,Fr=M,Ir=mt,Lr=Mr,Rr=s,zr=Function,Br=Nr([].concat),Vr=Nr([].join),Hr={},Ur=Rr?zr.bind:function(e){var t=Pr(this),n=t.prototype,r=Lr(arguments,1),i=function(){var n=Br(r,Lr(arguments));return this instanceof i?function(e,t,n){if(!Ir(Hr,t)){for(var r=[],i=0;i<t;i++)r[i]=`a[`+i+`]`;Hr[t]=zr(`C,a`,`return new C(`+Vr(r,`,`)+`)`)}return Hr[t](e,n)}(t,n.length,n):t.apply(e,n)};return Fr(n)&&(i.prototype=n),i},Wr=Ur;R({target:`Function`,proto:!0,forced:Function.bind!==Wr},{bind:Wr});var Gr=N,Kr=function(e){return Gr[e+`Prototype`]},qr=Kr(`Function`).bind,Jr=F,Yr=qr,Xr=Function.prototype,Zr=function(e){var t=e.bind;return e===Xr||Jr(Xr,e)&&t===Xr.bind?Yr:t},V=r(Zr);function Qr(e,t,n,r){e.beginPath(),e.arc(t,n,r,0,2*Math.PI,!1),e.closePath()}function $r(e,t,n,r,i,a){var o=Math.PI/180;r-2*a<0&&(a=r/2),i-2*a<0&&(a=i/2),e.beginPath(),e.moveTo(t+a,n),e.lineTo(t+r-a,n),e.arc(t+r-a,n+a,a,270*o,360*o,!1),e.lineTo(t+r,n+i-a),e.arc(t+r-a,n+i-a,a,0,90*o,!1),e.lineTo(t+a,n+i),e.arc(t+a,n+i-a,a,90*o,180*o,!1),e.lineTo(t,n+a),e.arc(t+a,n+a,a,180*o,270*o,!1),e.closePath()}function ei(e,t,n,r,i){var a=.5522848,o=r/2*a,s=i/2*a,c=t+r,l=n+i,u=t+r/2,d=n+i/2;e.beginPath(),e.moveTo(t,d),e.bezierCurveTo(t,d-s,u-o,n,u,n),e.bezierCurveTo(u+o,n,c,d-s,c,d),e.bezierCurveTo(c,d+s,u+o,l,u,l),e.bezierCurveTo(u-o,l,t,d+s,t,d),e.closePath()}function ti(e,t,n,r,i){var a=1/3*i,o=.5522848,s=r/2*o,c=a/2*o,l=t+r,u=n+a,d=t+r/2,f=n+a/2,p=n+(i-a/2),m=n+i;e.beginPath(),e.moveTo(l,f),e.bezierCurveTo(l,f+c,d+s,u,d,u),e.bezierCurveTo(d-s,u,t,f+c,t,f),e.bezierCurveTo(t,f-c,d-s,n,d,n),e.bezierCurveTo(d+s,n,l,f-c,l,f),e.lineTo(l,p),e.bezierCurveTo(l,p+c,d+s,m,d,m),e.bezierCurveTo(d-s,m,t,p+c,t,p),e.lineTo(t,f)}function ni(e,t,n,r,i,a){e.beginPath(),e.moveTo(t,n);for(var o=a.length,s=r-t,c=i-n,l=c/s,u=Math.sqrt(s*s+c*c),d=0,f=!0,p=0,m=+a[0];u>=.1;)(m=+a[d++%o])>u&&(m=u),p=Math.sqrt(m*m/(1+l*l)),t+=p=s<0?-p:p,n+=l*p,!0===f?e.lineTo(t,n):e.moveTo(t,n),u-=m,f=!f}var ri={circle:Qr,dashedLine:ni,database:ti,diamond:function(e,t,n,r){e.beginPath(),e.lineTo(t,n+r),e.lineTo(t+r,n),e.lineTo(t,n-r),e.lineTo(t-r,n),e.closePath()},ellipse:ei,ellipse_vis:ei,hexagon:function(e,t,n,r){e.beginPath();var i=2*Math.PI/6;e.moveTo(t+r,n);for(var a=1;a<6;a++)e.lineTo(t+r*Math.cos(i*a),n+r*Math.sin(i*a));e.closePath()},roundRect:$r,square:function(e,t,n,r){e.beginPath(),e.rect(t-r,n-r,2*r,2*r),e.closePath()},star:function(e,t,n,r){e.beginPath(),n+=.1*(r*=.82);for(var i=0;i<10;i++){var a=i%2==0?1.3*r:.5*r;e.lineTo(t+a*Math.sin(2*i*Math.PI/10),n-a*Math.cos(2*i*Math.PI/10))}e.closePath()},triangle:function(e,t,n,r){e.beginPath(),n+=.275*(r*=1.15);var i=2*r,a=i/2,o=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-a*a);e.moveTo(t,n-(s-o)),e.lineTo(t+a,n+o),e.lineTo(t-a,n+o),e.lineTo(t,n-(s-o)),e.closePath()},triangleDown:function(e,t,n,r){e.beginPath(),n-=.275*(r*=1.15);var i=2*r,a=i/2,o=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-a*a);e.moveTo(t,n+(s-o)),e.lineTo(t+a,n-o),e.lineTo(t-a,n-o),e.lineTo(t,n+(s-o)),e.closePath()}},ii={exports:{}};(function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n,r=this._callbacks[`$`+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return r.length===0&&delete this._callbacks[`$`+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}})(ii);var ai=r(ii.exports),oi={};oi[Ot(`toStringTag`)]=`z`;var si,ci,li,ui=String(oi)===`[object z]`,di=ui,fi=T,pi=x,mi=Ot(`toStringTag`),hi=Object,gi=pi(function(){return arguments}())===`Arguments`,_i=di?pi:function(e){var t,n,r;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=function(e,t){try{return e[t]}catch{}}(t=hi(e),mi))==`string`?n:gi?pi(t):(r=pi(t))===`Object`&&fi(t.callee)?`Arguments`:r},vi=_i,yi=String,bi=function(e){if(vi(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return yi(e)},xi=_,Si=qn,Ci=bi,wi=ge,Ti=xi(``.charAt),Ei=xi(``.charCodeAt),Di=xi(``.slice),Oi=function(e){return function(t,n){var r,i,a=Ci(wi(t)),o=Si(n),s=a.length;return o<0||o>=s?e?``:void 0:(r=Ei(a,o))<55296||r>56319||o+1===s||(i=Ei(a,o+1))<56320||i>57343?e?Ti(a,o):r:e?Di(a,o,o+2):i-56320+(r-55296<<10)+65536}},ki={codeAt:Oi(!1),charAt:Oi(!0)},Ai=T,ji=a.WeakMap,Mi=Ai(ji)&&/native code/.test(String(ji)),Ni=yt,Pi=ct(`keys`),Fi=function(e){return Pi[e]||(Pi[e]=Ni(e))},Ii=Mi,Li=a,Ri=M,zi=Nn,Bi=mt,Vi=L,Hi=Fi,Ui=or,Wi=`Object already initialized`,Gi=Li.TypeError,Ki=Li.WeakMap;if(Ii||Vi.state){var qi=Vi.state||=new Ki;qi.get=qi.get,qi.has=qi.has,qi.set=qi.set,si=function(e,t){if(qi.has(e))throw new Gi(Wi);return t.facade=e,qi.set(e,t),t},ci=function(e){return qi.get(e)||{}},li=function(e){return qi.has(e)}}else{var Ji=Hi(`state`);Ui[Ji]=!0,si=function(e,t){if(Bi(e,Ji))throw new Gi(Wi);return t.facade=e,zi(e,Ji,t),t},ci=function(e){return Bi(e,Ji)?e[Ji]:{}},li=function(e){return Bi(e,Ji)}}var Yi={set:si,get:ci,has:li,enforce:function(e){return li(e)?ci(e):si(e,{})},getterFor:function(e){return function(t){var n;if(!Ri(t)||(n=ci(t)).type!==e)throw new Gi(`Incompatible receiver, `+e+` required`);return n}}},Xi=D,Zi=mt,Qi=Function.prototype,$i=Xi&&Object.getOwnPropertyDescriptor,ea=Zi(Qi,`name`),ta={EXISTS:ea,PROPER:ea&&function(){}.name===`something`,CONFIGURABLE:ea&&(!Xi||Xi&&$i(Qi,`name`).configurable)},na={},ra=D,ia=hn,aa=mn,oa=yn,sa=ye,ca=gr;na.f=ra&&!ia?Object.defineProperties:function(e,t){oa(e);for(var n,r=sa(t),i=ca(t),a=i.length,o=0;a>o;)aa.f(e,n=i[o++],r[n]);return e};var la,ua=Te(`document`,`documentElement`),da=yn,fa=na,pa=pr,ma=or,ha=ua,ga=Ht,_a=`prototype`,va=`script`,ya=Fi(`IE_PROTO`),ba=function(){},xa=function(e){return`<`+va+`>`+e+`</`+va+`>`},Sa=function(e){e.write(xa(``)),e.close();var t=e.parentWindow.Object;return e=null,t},Ca=function(){try{la=new ActiveXObject(`htmlfile`)}catch{}var e,t,n;Ca=typeof document<`u`?document.domain&&la?Sa(la):(t=ga(`iframe`),n=`java`+va+`:`,t.style.display=`none`,ha.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(xa(`document.F=Object`)),e.close(),e.F):Sa(la);for(var r=pa.length;r--;)delete Ca[_a][pa[r]];return Ca()};ma[ya]=!0;var wa,Ta,Ea,Da=Object.create||function(e,t){var n;return e===null?n=Ca():(ba[_a]=da(e),n=new ba,ba[_a]=null,n[ya]=e),t===void 0?n:fa.f(n,t)},Oa=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),ka=mt,Aa=T,ja=dt,Ma=Oa,Na=Fi(`IE_PROTO`),Pa=Object,Fa=Pa.prototype,Ia=Ma?Pa.getPrototypeOf:function(e){var t=ja(e);if(ka(t,Na))return t[Na];var n=t.constructor;return Aa(n)&&t instanceof n?n.prototype:t instanceof Pa?Fa:null},La=Nn,Ra=function(e,t,n,r){return r&&r.enumerable?e[t]=n:La(e,t,n),e},za=o,Ba=T,Va=M,Ha=Da,Ua=Ia,Wa=Ra,Ga=Ot(`iterator`),Ka=!1;[].keys&&(`next`in(Ea=[].keys())?(Ta=Ua(Ua(Ea)))!==Object.prototype&&(wa=Ta):Ka=!0),Ba((wa=!Va(wa)||za((function(){var e={};return wa[Ga].call(e)!==e}))?{}:Ha(wa))[Ga])||Wa(wa,Ga,(function(){return this}));var qa={IteratorPrototype:wa,BUGGY_SAFARI_ITERATORS:Ka},Ja=_i,Ya=ui?{}.toString:function(){return`[object `+Ja(this)+`]`},Xa=ui,Za=mn.f,Qa=Nn,$a=mt,eo=Ya,to=Ot(`toStringTag`),no=function(e,t,n,r){if(e){var i=n?e:e.prototype;$a(i,to)||Za(i,to,{configurable:!0,value:t}),r&&!Xa&&Qa(i,`toString`,eo)}},ro={},io=qa.IteratorPrototype,ao=Da,oo=ce,so=no,co=ro,lo=function(){return this},uo=_,fo=Je,po=T,mo=String,ho=TypeError,go=function(e,t,n){try{return uo(fo(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},_o=yn,vo=function(e){if(typeof e==`object`||po(e))return e;throw new ho(`Can't set `+mo(e)+` as a prototype`)},yo=Object.setPrototypeOf||(`__proto__`in{}?function(){var e,t=!1,n={};try{(e=go(Object.prototype,`__proto__`,`set`))(n,[]),t=n instanceof Array}catch{}return function(n,r){return _o(n),vo(r),t?e(n,r):n.__proto__=r,n}}():void 0),bo=R,xo=re,So=ta,Co=function(e,t,n,r){var i=t+` Iterator`;return e.prototype=ao(io,{next:oo(+!r,n)}),so(e,i,!1,!0),co[i]=lo,e},wo=Ia,To=no,Eo=Ra,Do=ro,Oo=qa,ko=So.PROPER,Ao=Oo.BUGGY_SAFARI_ITERATORS,jo=Ot(`iterator`),Mo=`keys`,No=`values`,Po=`entries`,Fo=function(){return this},Io=function(e,t,n,r,i,a,o){Co(n,t,r);var s,c,l,u=function(e){if(e===i&&h)return h;if(!Ao&&e&&e in p)return p[e];switch(e){case Mo:case No:case Po:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+` Iterator`,f=!1,p=e.prototype,m=p[jo]||p[`@@iterator`]||i&&p[i],h=!Ao&&m||u(i),g=t===`Array`&&p.entries||m;if(g&&(s=wo(g.call(new e)))!==Object.prototype&&s.next&&(To(s,d,!0,!0),Do[d]=Fo),ko&&i===No&&m&&m.name!==No&&(f=!0,h=function(){return xo(m,this)}),i)if(c={values:u(No),keys:a?h:u(Mo),entries:u(Po)},o)for(l in c)(Ao||f||!(l in p))&&Eo(p,l,c[l]);else bo({target:t,proto:!0,forced:Ao||f},c);return o&&p[jo]!==h&&Eo(p,jo,h,{name:i}),Do[t]=h,c},Lo=function(e,t){return{value:e,done:t}},Ro=ki.charAt,zo=bi,Bo=Yi,Vo=Io,Ho=Lo,Uo=`String Iterator`,Wo=Bo.set,Go=Bo.getterFor(Uo);Vo(String,`String`,(function(e){Wo(this,{type:Uo,string:zo(e),index:0})}),(function(){var e,t=Go(this),n=t.string,r=t.index;return r>=n.length?Ho(void 0,!0):(e=Ro(n,r),t.index+=e.length,Ho(e,!1))}));var Ko=re,qo=yn,Jo=Ze,Yo=function(e,t,n){var r,i;qo(e);try{if(!(r=Jo(e,`return`))){if(t===`throw`)throw n;return n}r=Ko(r,e)}catch(e){i=!0,r=e}if(t===`throw`)throw n;if(i)throw r;return qo(r),n},Xo=yn,Zo=Yo,Qo=ro,$o=Ot(`iterator`),es=Array.prototype,ts=function(e){return e!==void 0&&(Qo.Array===e||es[$o]===e)},ns=T,rs=L,is=_(Function.toString);ns(rs.inspectSource)||(rs.inspectSource=function(e){return is(e)});var as=rs.inspectSource,os=_,ss=o,cs=T,ls=_i,us=as,ds=function(){},fs=[],ps=Te(`Reflect`,`construct`),ms=/^\s*(?:class|function)\b/,hs=os(ms.exec),gs=!ms.test(ds),_s=function(e){if(!cs(e))return!1;try{return ps(ds,fs,e),!0}catch{return!1}},vs=function(e){if(!cs(e))return!1;switch(ls(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return gs||!!hs(ms,us(e))}catch{return!0}};vs.sham=!0;var ys=!ps||ss((function(){var e;return _s(_s.call)||!_s(Object)||!_s((function(){e=!0}))||e}))?vs:_s,bs=Rt,xs=mn,Ss=ce,Cs=function(e,t,n){var r=bs(t);r in e?xs.f(e,r,Ss(0,n)):e[r]=n},ws=_i,Ts=Ze,Es=pe,Ds=ro,Os=Ot(`iterator`),ks=function(e){if(!Es(e))return Ts(e,Os)||Ts(e,`@@iterator`)||Ds[ws(e)]},As=re,js=Je,Ms=yn,Ns=We,Ps=ks,Fs=TypeError,Is=function(e,t){var n=arguments.length<2?Ps(e):t;if(js(n))return Ms(As(n,e));throw new Fs(Ns(e)+` is not iterable`)},Ls=pn,Rs=re,zs=dt,Bs=function(e,t,n,r){try{return r?t(Xo(n)[0],n[1]):t(n)}catch(t){Zo(e,`throw`,t)}},Vs=ts,Hs=ys,Us=tr,Ws=Cs,Gs=Is,Ks=ks,qs=Array,Js=Ot(`iterator`),Ys=!1;try{var Xs=0,Zs={next:function(){return{done:!!Xs++}},return:function(){Ys=!0}};Zs[Js]=function(){return this},Array.from(Zs,(function(){throw 2}))}catch{}R({target:`Array`,stat:!0,forced:!function(e,t){try{if(!t&&!Ys)return!1}catch{return!1}var n=!1;try{var r={};r[Js]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n}((function(e){Array.from(e)}))},{from:function(e){var t=zs(e),n=Hs(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=i!==void 0;a&&(i=Ls(i,r>2?arguments[2]:void 0));var o,s,c,l,u,d,f=Ks(t),p=0;if(!f||this===qs&&Vs(f))for(o=Us(t),s=n?new this(o):qs(o);o>p;p++)d=a?i(t[p],p):t[p],Ws(s,p,d);else for(u=(l=Gs(t,f)).next,s=n?new this:[];!(c=Rs(u,l)).done;p++)d=a?Bs(l,i,[c.value,p],!0):c.value,Ws(s,p,d);return s.length=p,s}});var Qs=N.Array.from,$s=r(Qs),ec=ye,tc=ro,nc=Yi;mn.f;var rc=Io,ic=Lo,ac=`Array Iterator`,oc=nc.set,sc=nc.getterFor(ac);rc(Array,`Array`,(function(e,t){oc(this,{type:ac,target:ec(e),index:0,kind:t})}),(function(){var e=sc(this),t=e.target,n=e.kind,r=e.index++;if(!t||r>=t.length)return e.target=void 0,ic(void 0,!0);switch(n){case`keys`:return ic(r,!1);case`values`:return ic(t[r],!1)}return ic([r,t[r]],!1)}),`values`),tc.Arguments=tc.Array;var cc=ks,lc={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},uc=a,dc=_i,fc=Nn,pc=ro,mc=Ot(`toStringTag`);for(var hc in lc){var gc=uc[hc],_c=gc&&gc.prototype;_c&&dc(_c)!==mc&&fc(_c,mc,hc),pc[hc]=pc.Array}var vc=cc,yc=r(vc),bc=r(vc);function H(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var xc={exports:{}},Sc=R,Cc=D,wc=mn.f;Sc({target:`Object`,stat:!0,forced:Object.defineProperty!==wc,sham:!Cc},{defineProperty:wc});var Tc=N.Object,Ec=xc.exports=function(e,t,n){return Tc.defineProperty(e,t,n)};Tc.defineProperty.sham&&(Ec.sham=!0);var Dc=xc.exports,Oc=r(Dc),kc=x,Ac=Array.isArray||function(e){return kc(e)===`Array`},jc=TypeError,Mc=function(e){if(e>9007199254740991)throw jc(`Maximum allowed index exceeded`);return e},Nc=Ac,Pc=ys,Fc=M,Ic=Ot(`species`),Lc=Array,Rc=function(e){var t;return Nc(e)&&(t=e.constructor,(Pc(t)&&(t===Lc||Nc(t.prototype))||Fc(t)&&(t=t[Ic])===null)&&(t=void 0)),t===void 0?Lc:t},zc=function(e,t){return new(Rc(e))(t===0?0:t)},Bc=o,Vc=Me,Hc=Ot(`species`),Uc=function(e){return Vc>=51||!Bc((function(){var t=[];return(t.constructor={})[Hc]=function(){return{foo:1}},t[e](Boolean).foo!==1}))},Wc=R,Gc=o,Kc=Ac,qc=M,Jc=dt,Yc=tr,Xc=Mc,Zc=Cs,Qc=zc,$c=Uc,el=Me,tl=Ot(`isConcatSpreadable`),nl=el>=51||!Gc((function(){var e=[];return e[tl]=!1,e.concat()[0]!==e})),rl=function(e){if(!qc(e))return!1;var t=e[tl];return t===void 0?Kc(e):!!t};Wc({target:`Array`,proto:!0,arity:1,forced:!nl||!$c(`concat`)},{concat:function(e){var t,n,r,i,a,o=Jc(this),s=Qc(o,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(rl(a=t===-1?o:arguments[t]))for(i=Yc(a),Xc(c+i),n=0;n<i;n++,c++)n in a&&Zc(s,c,a[n]);else Xc(c+1),Zc(s,c++,a);return s.length=c,s}});var il={},al=fr,ol=pr.concat(`length`,`prototype`);il.f=Object.getOwnPropertyNames||function(e){return al(e,ol)};var sl={},cl=Zn,ll=tr,ul=Cs,dl=Array,fl=Math.max,pl=function(e,t,n){for(var r=ll(e),i=cl(t,r),a=cl(n===void 0?r:n,r),o=dl(fl(a-i,0)),s=0;i<a;i++,s++)ul(o,s,e[i]);return o.length=s,o},ml=x,hl=ye,gl=il.f,_l=pl,vl=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];sl.f=function(e){return vl&&ml(e)===`Window`?function(e){try{return gl(e)}catch{return _l(vl)}}(e):gl(hl(e))};var yl=mn,bl=function(e,t,n){return yl.f(e,t,n)},xl={};xl.f=Ot;var Sl=N,Cl=mt,wl=xl,Tl=mn.f,El=function(e){var t=Sl.Symbol||={};Cl(t,e)||Tl(t,e,{value:wl.f(e)})},Dl=re,Ol=Te,kl=Ot,Al=Ra,jl=function(){var e=Ol(`Symbol`),t=e&&e.prototype,n=t&&t.valueOf,r=kl(`toPrimitive`);t&&!t[r]&&Al(t,r,(function(e){return Dl(n,this)}),{arity:1})},Ml=pn,Nl=fe,Pl=dt,Fl=tr,Il=zc,Ll=_([].push),Rl=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(c,l,u,d){for(var f,p,m=Pl(c),h=Nl(m),g=Ml(l,u),_=Fl(h),v=0,y=d||Il,b=t?y(c,_):n||o?y(c,0):void 0;_>v;v++)if((s||v in h)&&(p=g(f=h[v],v,m),e))if(t)b[v]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return v;case 2:Ll(b,f)}else switch(e){case 4:return!1;case 7:Ll(b,f)}return a?-1:r||i?i:b}},zl={forEach:Rl(0),map:Rl(1),filter:Rl(2),some:Rl(3),every:Rl(4),find:Rl(5),findIndex:Rl(6),filterReject:Rl(7)},Bl=R,Vl=a,Hl=re,Ul=_,Wl=D,Gl=Ie,Kl=o,ql=mt,Jl=F,Yl=yn,Xl=ye,Zl=Rt,Ql=bi,$l=ce,eu=Da,tu=gr,nu=il,ru=sl,iu=_r,au=E,ou=mn,su=na,cu=ie,lu=Ra,uu=bl,du=ct,fu=or,pu=yt,mu=Ot,hu=xl,gu=El,_u=jl,vu=no,yu=Yi,bu=zl.forEach,xu=Fi(`hidden`),Su=`Symbol`,Cu=`prototype`,wu=yu.set,Tu=yu.getterFor(Su),Eu=Object[Cu],Du=Vl.Symbol,Ou=Du&&Du[Cu],ku=Vl.RangeError,Au=Vl.TypeError,ju=Vl.QObject,Mu=au.f,Nu=ou.f,Pu=ru.f,Fu=cu.f,Iu=Ul([].push),Lu=du(`symbols`),Ru=du(`op-symbols`),zu=du(`wks`),Bu=!ju||!ju[Cu]||!ju[Cu].findChild,Vu=function(e,t,n){var r=Mu(Eu,t);r&&delete Eu[t],Nu(e,t,n),r&&e!==Eu&&Nu(Eu,t,r)},Hu=Wl&&Kl((function(){return eu(Nu({},`a`,{get:function(){return Nu(this,`a`,{value:7}).a}})).a!==7}))?Vu:Nu,Uu=function(e,t){var n=Lu[e]=eu(Ou);return wu(n,{type:Su,tag:e,description:t}),Wl||(n.description=t),n},Wu=function(e,t,n){e===Eu&&Wu(Ru,t,n),Yl(e);var r=Zl(t);return Yl(n),ql(Lu,r)?(n.enumerable?(ql(e,xu)&&e[xu][r]&&(e[xu][r]=!1),n=eu(n,{enumerable:$l(0,!1)})):(ql(e,xu)||Nu(e,xu,$l(1,{})),e[xu][r]=!0),Hu(e,r,n)):Nu(e,r,n)},Gu=function(e,t){Yl(e);var n=Xl(t);return bu(tu(n).concat(Yu(n)),(function(t){Wl&&!Hl(Ku,n,t)||Wu(e,t,n[t])})),e},Ku=function(e){var t=Zl(e),n=Hl(Fu,this,t);return!(this===Eu&&ql(Lu,t)&&!ql(Ru,t))&&(!(n||!ql(this,t)||!ql(Lu,t)||ql(this,xu)&&this[xu][t])||n)},qu=function(e,t){var n=Xl(e),r=Zl(t);if(n!==Eu||!ql(Lu,r)||ql(Ru,r)){var i=Mu(n,r);return!i||!ql(Lu,r)||ql(n,xu)&&n[xu][r]||(i.enumerable=!0),i}},Ju=function(e){var t=Pu(Xl(e)),n=[];return bu(t,(function(e){ql(Lu,e)||ql(fu,e)||Iu(n,e)})),n},Yu=function(e){var t=e===Eu,n=Pu(t?Ru:Xl(e)),r=[];return bu(n,(function(e){!ql(Lu,e)||t&&!ql(Eu,e)||Iu(r,Lu[e])})),r};Gl||(Du=function(){if(Jl(Ou,this))throw new Au(`Symbol is not a constructor`);var e=arguments.length&&arguments[0]!==void 0?Ql(arguments[0]):void 0,t=pu(e),n=function(e){this===Eu&&Hl(n,Ru,e),ql(this,xu)&&ql(this[xu],t)&&(this[xu][t]=!1);var r=$l(1,e);try{Hu(this,t,r)}catch(e){if(!(e instanceof ku))throw e;Vu(this,t,r)}};return Wl&&Bu&&Hu(Eu,t,{configurable:!0,set:n}),Uu(t,e)},lu(Ou=Du[Cu],`toString`,(function(){return Tu(this).tag})),lu(Du,`withoutSetter`,(function(e){return Uu(pu(e),e)})),cu.f=Ku,ou.f=Wu,su.f=Gu,au.f=qu,nu.f=ru.f=Ju,iu.f=Yu,hu.f=function(e){return Uu(mu(e),e)},Wl&&uu(Ou,`description`,{configurable:!0,get:function(){return Tu(this).description}})),Bl({global:!0,constructor:!0,wrap:!0,forced:!Gl,sham:!Gl},{Symbol:Du}),bu(tu(zu),(function(e){gu(e)})),Bl({target:Su,stat:!0,forced:!Gl},{useSetter:function(){Bu=!0},useSimple:function(){Bu=!1}}),Bl({target:`Object`,stat:!0,forced:!Gl,sham:!Wl},{create:function(e,t){return t===void 0?eu(e):Gu(eu(e),t)},defineProperty:Wu,defineProperties:Gu,getOwnPropertyDescriptor:qu}),Bl({target:`Object`,stat:!0,forced:!Gl},{getOwnPropertyNames:Ju}),_u(),vu(Du,Su),fu[xu]=!0;var Xu=Ie&&!!Symbol.for&&!!Symbol.keyFor,Zu=R,Qu=Te,$u=mt,ed=bi,td=ct,nd=Xu,rd=td(`string-to-symbol-registry`),id=td(`symbol-to-string-registry`);Zu({target:`Symbol`,stat:!0,forced:!nd},{for:function(e){var t=ed(e);if($u(rd,t))return rd[t];var n=Qu(`Symbol`)(t);return rd[t]=n,id[n]=t,n}});var ad=R,od=mt,sd=He,cd=We,ld=Xu,ud=ct(`symbol-to-string-registry`);ad({target:`Symbol`,stat:!0,forced:!ld},{keyFor:function(e){if(!sd(e))throw TypeError(cd(e)+` is not a symbol`);if(od(ud,e))return ud[e]}});var dd=Ac,fd=T,pd=x,md=bi,hd=_([].push),gd=R,_d=Te,vd=f,yd=re,bd=_,xd=o,Sd=T,Cd=He,wd=Mr,Td=function(e){if(fd(e))return e;if(dd(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i==`string`?hd(n,i):typeof i!=`number`&&pd(i)!==`Number`&&pd(i)!==`String`||hd(n,md(i))}var a=n.length,o=!0;return function(e,t){if(o)return o=!1,t;if(dd(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},Ed=Ie,Dd=String,Od=_d(`JSON`,`stringify`),kd=bd(/./.exec),Ad=bd(``.charAt),jd=bd(``.charCodeAt),Md=bd(``.replace),Nd=bd(1 .toString),Pd=/[\uD800-\uDFFF]/g,Fd=/^[\uD800-\uDBFF]$/,Id=/^[\uDC00-\uDFFF]$/,Ld=!Ed||xd((function(){var e=_d(`Symbol`)(`stringify detection`);return Od([e])!==`[null]`||Od({a:e})!==`{}`||Od(Object(e))!==`{}`})),Rd=xd((function(){return Od(`\udf06\ud834`)!==`"\\udf06\\ud834"`||Od(`\udead`)!==`"\\udead"`})),zd=function(e,t){var n=wd(arguments),r=Td(t);if(Sd(r)||e!==void 0&&!Cd(e))return n[1]=function(e,t){if(Sd(r)&&(t=yd(r,this,Dd(e),t)),!Cd(t))return t},vd(Od,null,n)},Bd=function(e,t,n){var r=Ad(n,t-1),i=Ad(n,t+1);return kd(Fd,e)&&!kd(Id,i)||kd(Id,e)&&!kd(Fd,r)?`\\u`+Nd(jd(e,0),16):e};Od&&gd({target:`JSON`,stat:!0,arity:3,forced:Ld||Rd},{stringify:function(e,t,n){var r=wd(arguments),i=vd(Ld?zd:Od,null,r);return Rd&&typeof i==`string`?Md(i,Pd,Bd):i}});var Vd=_r,Hd=dt;R({target:`Object`,stat:!0,forced:!Ie||o((function(){Vd.f(1)}))},{getOwnPropertySymbols:function(e){var t=Vd.f;return t?t(Hd(e)):[]}}),El(`asyncIterator`),El(`hasInstance`),El(`isConcatSpreadable`),El(`iterator`),El(`match`),El(`matchAll`),El(`replace`),El(`search`),El(`species`),El(`split`);var Ud=jl;El(`toPrimitive`),Ud();var Wd=Te,Gd=no;El(`toStringTag`),Gd(Wd(`Symbol`),`Symbol`),El(`unscopables`),no(a.JSON,`JSON`,!0);var Kd=N.Symbol,qd=Ot,Jd=mn.f,Yd=qd(`metadata`),Xd=Function.prototype;Xd[Yd]===void 0&&Jd(Xd,Yd,{value:null}),El(`asyncDispose`),El(`dispose`),El(`metadata`);var Zd=Kd,Qd=_,$d=Te(`Symbol`),ef=$d.keyFor,tf=Qd($d.prototype.valueOf),nf=$d.isRegisteredSymbol||function(e){try{return ef(tf(e))!==void 0}catch{return!1}};R({target:`Symbol`,stat:!0},{isRegisteredSymbol:nf});for(var rf=ct,af=Te,of=_,sf=He,cf=Ot,lf=af(`Symbol`),uf=lf.isWellKnownSymbol,df=af(`Object`,`getOwnPropertyNames`),ff=of(lf.prototype.valueOf),pf=rf(`wks`),mf=0,hf=df(lf),gf=hf.length;mf<gf;mf++)try{var _f=hf[mf];sf(lf[_f])&&cf(_f)}catch{}var vf=function(e){if(uf&&uf(e))return!0;try{for(var t=ff(e),n=0,r=df(pf),i=r.length;n<i;n++)if(pf[r[n]]==t)return!0}catch{}return!1};R({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:vf}),El(`matcher`),El(`observable`),R({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:nf}),R({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:vf}),El(`metadataKey`),El(`patternMatch`),El(`replaceAll`);var yf=r(Zd),bf=r(xl.f(`iterator`));function xf(e){return xf=typeof yf==`function`&&typeof bf==`symbol`?function(e){return typeof e}:function(e){return e&&typeof yf==`function`&&e.constructor===yf&&e!==yf.prototype?`symbol`:typeof e},xf(e)}var Sf=r(xl.f(`toPrimitive`));function Cf(e){var t=function(e,t){if(xf(e)!==`object`||e===null)return e;var n=e[Sf];if(n!==void 0){var r=n.call(e,t||`default`);if(xf(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return xf(t)===`symbol`?t:String(t)}function wf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Oc(e,Cf(r.key),r)}}function U(e,t,n){return t&&wf(e.prototype,t),n&&wf(e,n),Oc(e,`prototype`,{writable:!1}),e}R({target:`Array`,stat:!0},{isArray:Ac});var Tf=N.Array.isArray,Ef=r(Tf),Df=D,Of=Ac,kf=TypeError,Af=Object.getOwnPropertyDescriptor,jf=Df&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],`length`,{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(Of(e)&&!Af(e,`length`).writable)throw new kf(`Cannot set read only .length`);return e.length=t}:function(e,t){return e.length=t},Mf=dt,Nf=tr,Pf=jf,Ff=Mc;R({target:`Array`,proto:!0,arity:1,forced:o((function(){return[].push.call({length:4294967296},1)!==4294967297}))||!function(){try{Object.defineProperty([],`length`,{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=Mf(this),n=Nf(t),r=arguments.length;Ff(n+r);for(var i=0;i<r;i++)t[n]=arguments[i],n++;return Pf(t,n),n}});var If=Kr(`Array`).push,Lf=F,Rf=If,zf=Array.prototype,Bf=r(function(e){var t=e.push;return e===zf||Lf(zf,e)&&t===zf.push?Rf:t}),Vf=R,Hf=Ac,Uf=ys,Wf=M,Gf=Zn,Kf=tr,qf=ye,Jf=Cs,Yf=Ot,Xf=Mr,Zf=Uc(`slice`),Qf=Yf(`species`),$f=Array,ep=Math.max;Vf({target:`Array`,proto:!0,forced:!Zf},{slice:function(e,t){var n,r,i,a=qf(this),o=Kf(a),s=Gf(e,o),c=Gf(t===void 0?o:t,o);if(Hf(a)&&(n=a.constructor,(Uf(n)&&(n===$f||Hf(n.prototype))||Wf(n)&&(n=n[Qf])===null)&&(n=void 0),n===$f||n===void 0))return Xf(a,s,c);for(r=new(n===void 0?$f:n)(ep(c-s,0)),i=0;s<c;s++,i++)s in a&&Jf(r,i,a[s]);return r.length=i,r}});var tp=Kr(`Array`).slice,np=F,rp=tp,ip=Array.prototype,ap=function(e){var t=e.slice;return e===ip||np(ip,e)&&t===ip.slice?rp:t},op=r(ap),sp=r(Qs);function cp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function lp(e,t){var n;if(e){if(typeof e==`string`)return cp(e,t);var r=op(n=Object.prototype.toString.call(e)).call(n,8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?sp(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cp(e,t):void 0}}function up(e,t){return function(e){if(Ef(e))return e}(e)||function(e,t){var n=e==null?null:yf!==void 0&&yc(e)||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(Bf(s).call(s,r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||lp(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
10
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function dp(e){return function(e){if(Ef(e))return cp(e)}(e)||function(e){if(yf!==void 0&&yc(e)!=null||e[`@@iterator`]!=null)return sp(e)}(e)||lp(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
11
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}var fp=r(Kd),pp=Kr(`Array`).concat,mp=F,hp=pp,gp=Array.prototype,_p=r(function(e){var t=e.concat;return e===gp||mp(gp,e)&&t===gp.concat?hp:t}),vp=r(ap),yp=Te,bp=il,xp=_r,Sp=yn,Cp=_([].concat),wp=yp(`Reflect`,`ownKeys`)||function(e){var t=bp.f(Sp(e)),n=xp.f;return n?Cp(t,n(e)):t},Tp=r(Tf),Ep=zl.map;R({target:`Array`,proto:!0,forced:!Uc(`map`)},{map:function(e){return Ep(this,e,arguments.length>1?arguments[1]:void 0)}});var Dp=Kr(`Array`).map,Op=F,kp=Dp,Ap=Array.prototype,jp=r(function(e){var t=e.map;return e===Ap||Op(Ap,e)&&t===Ap.map?kp:t}),Mp=dt,Np=gr;R({target:`Object`,stat:!0,forced:o((function(){Np(1)}))},{keys:function(e){return Np(Mp(e))}});var Pp=r(N.Object.keys),Fp=R,Ip=Date,Lp=_(Ip.prototype.getTime);Fp({target:`Date`,stat:!0},{now:function(){return Lp(new Ip)}});var Rp=r(N.Date.now),zp=o,Bp=function(e,t){var n=[][e];return!!n&&zp((function(){n.call(null,t||function(){return 1},1)}))},Vp=zl.forEach,Hp=Bp(`forEach`)?[].forEach:function(e){return Vp(this,e,arguments.length>1?arguments[1]:void 0)};R({target:`Array`,proto:!0,forced:[].forEach!==Hp},{forEach:Hp});var Up=Kr(`Array`).forEach,Wp=_i,Gp=mt,Kp=F,qp=Up,Jp=Array.prototype,Yp={DOMTokenList:!0,NodeList:!0},Xp=r(function(e){var t=e.forEach;return e===Jp||Kp(Jp,e)&&t===Jp.forEach||Gp(Yp,Wp(e))?qp:t}),Zp=R,Qp=Ac,$p=_([].reverse),em=[1,2];Zp({target:`Array`,proto:!0,forced:String(em)===String(em.reverse())},{reverse:function(){return Qp(this)&&(this.length=this.length),$p(this)}});var tm=Kr(`Array`).reverse,nm=F,rm=tm,im=Array.prototype,am=r(function(e){var t=e.reverse;return e===im||nm(im,e)&&t===im.reverse?rm:t}),om=We,sm=TypeError,cm=function(e,t){if(!delete e[t])throw new sm(`Cannot delete property `+om(t)+` of `+om(e))},lm=R,um=dt,dm=Zn,fm=qn,pm=tr,mm=jf,hm=Mc,gm=zc,_m=Cs,vm=cm,ym=Uc(`splice`),bm=Math.max,xm=Math.min;lm({target:`Array`,proto:!0,forced:!ym},{splice:function(e,t){var n,r,i,a,o,s,c=um(this),l=pm(c),u=dm(e,l),d=arguments.length;for(d===0?n=r=0:d===1?(n=0,r=l-u):(n=d-2,r=xm(bm(fm(t),0),l-u)),hm(l+n-r),i=gm(c,r),a=0;a<r;a++)(o=u+a)in c&&_m(i,a,c[o]);if(i.length=r,n<r){for(a=u;a<l-r;a++)s=a+n,(o=a+r)in c?c[s]=c[o]:vm(c,s);for(a=l;a>l-r+n;a--)vm(c,a-1)}else if(n>r)for(a=l-r;a>u;a--)s=a+n-1,(o=a+r-1)in c?c[s]=c[o]:vm(c,s);for(a=0;a<n;a++)c[a+u]=arguments[a+2];return mm(c,l-r+n),i}});var Sm=Kr(`Array`).splice,Cm=F,wm=Sm,Tm=Array.prototype,Em=r(function(e){var t=e.splice;return e===Tm||Cm(Tm,e)&&t===Tm.splice?wm:t}),Dm=B.includes;R({target:`Array`,proto:!0,forced:o((function(){return![,].includes()}))},{includes:function(e){return Dm(this,e,arguments.length>1?arguments[1]:void 0)}});var Om=Kr(`Array`).includes,km=M,Am=x,jm=Ot(`match`),Mm=function(e){var t;return km(e)&&((t=e[jm])===void 0?Am(e)===`RegExp`:!!t)},Nm=TypeError,Pm=Ot(`match`),Fm=R,Im=function(e){if(Mm(e))throw new Nm(`The method doesn't accept regular expressions`);return e},Lm=ge,Rm=bi,zm=function(e){var t=/./;try{`/./`[e](t)}catch{try{return t[Pm]=!1,`/./`[e](t)}catch{}}return!1},Bm=_(``.indexOf);Fm({target:`String`,proto:!0,forced:!zm(`includes`)},{includes:function(e){return!!~Bm(Rm(Lm(this)),Rm(Im(e)),arguments.length>1?arguments[1]:void 0)}});var Vm=Kr(`String`).includes,Hm=F,Um=Om,Wm=Vm,Gm=Array.prototype,Km=String.prototype,qm=r(function(e){var t=e.includes;return e===Gm||Hm(Gm,e)&&t===Gm.includes?Um:typeof e==`string`||e===Km||Hm(Km,e)&&t===Km.includes?Wm:t}),Jm=dt,Ym=Ia,Xm=Oa;R({target:`Object`,stat:!0,forced:o((function(){Ym(1)})),sham:!Xm},{getPrototypeOf:function(e){return Ym(Jm(e))}});var Zm=N.Object.getPrototypeOf,Qm=r(Zm),$m=zl.filter;R({target:`Array`,proto:!0,forced:!Uc(`filter`)},{filter:function(e){return $m(this,e,arguments.length>1?arguments[1]:void 0)}});var eh=Kr(`Array`).filter,th=F,nh=eh,rh=Array.prototype,ih=r(function(e){var t=e.filter;return e===rh||th(rh,e)&&t===rh.filter?nh:t}),ah=`
|
|
12
|
+
\v\f\r \xA0 \u2028\u2029`,oh=ge,sh=bi,ch=ah,lh=_(``.replace),uh=RegExp(`^[`+ch+`]+`),dh=RegExp(`(^|[^`+ch+`])[`+ch+`]+$`),fh=function(e){return function(t){var n=sh(oh(t));return 1&e&&(n=lh(n,uh,``)),2&e&&(n=lh(n,dh,`$1`)),n}},ph={start:fh(1),end:fh(2),trim:fh(3)},mh=a,hh=o,gh=_,_h=bi,vh=ph.trim,yh=ah,bh=mh.parseInt,xh=mh.Symbol,Sh=xh&&xh.iterator,Ch=/^[+-]?0x/i,wh=gh(Ch.exec),Th=bh(yh+`08`)!==8||bh(yh+`0x16`)!==22||Sh&&!hh((function(){bh(Object(Sh))}))?function(e,t){var n=vh(_h(e));return bh(n,t>>>0||(wh(Ch,n)?16:10))}:bh;R({global:!0,forced:parseInt!==Th},{parseInt:Th});var Eh=r(N.parseInt),Dh=R,Oh=B.indexOf,kh=Bp,Ah=C([].indexOf),jh=!!Ah&&1/Ah([1],1,-0)<0;Dh({target:`Array`,proto:!0,forced:jh||!kh(`indexOf`)},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return jh?Ah(this,e,t)||0:Oh(this,e,t)}});var Mh=Kr(`Array`).indexOf,Nh=F,Ph=Mh,Fh=Array.prototype,Ih=r(function(e){var t=e.indexOf;return e===Fh||Nh(Fh,e)&&t===Fh.indexOf?Ph:t});R({target:`Object`,stat:!0,sham:!D},{create:Da});var Lh=N.Object,Rh=function(e,t){return Lh.create(e,t)},zh=r(Rh),Bh=N,Vh=f;Bh.JSON||={stringify:JSON.stringify};var Hh=r(function(e,t,n){return Vh(Bh.JSON.stringify,null,arguments)}),Uh=typeof Bun==`function`&&Bun&&typeof Bun.version==`string`,Wh=TypeError,Gh=a,Kh=f,qh=T,Jh=Uh,Yh=I,Xh=Mr,Zh=function(e,t){if(e<t)throw new Wh(`Not enough arguments`);return e},Qh=Gh.Function,$h=/MSIE .\./.test(Yh)||Jh&&function(){var e=Gh.Bun.version.split(`.`);return e.length<3||e[0]===`0`&&(e[1]<3||e[1]===`3`&&e[2]===`0`)}(),eg=function(e,t){var n=t?2:1;return $h?function(r,i){var a=Zh(arguments.length,1)>n,o=qh(r)?r:Qh(r),s=a?Xh(arguments,n):[],c=a?function(){Kh(o,this,s)}:o;return t?e(c,i):e(c)}:e},tg=R,ng=a,rg=eg(ng.setInterval,!0);tg({global:!0,bind:!0,forced:ng.setInterval!==rg},{setInterval:rg});var ig=R,ag=a,og=eg(ag.setTimeout,!0);ig({global:!0,bind:!0,forced:ag.setTimeout!==og},{setTimeout:og});var sg=r(N.setTimeout),cg=dt,lg=Zn,ug=tr;R({target:`Array`,proto:!0},{fill:function(e){for(var t=cg(this),n=ug(t),r=arguments.length,i=lg(r>1?arguments[1]:void 0,n),a=r>2?arguments[2]:void 0,o=a===void 0?n:lg(a,n);o>i;)t[i++]=e;return t}});var dg,fg=Kr(`Array`).fill,pg=F,mg=fg,hg=Array.prototype,gg=r(function(e){var t=e.fill;return e===hg||pg(hg,e)&&t===hg.fill?mg:t});function _g(){return _g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_g.apply(this,arguments)}function vg(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function yg(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}dg=typeof Object.assign==`function`?Object.assign:function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t};var bg,xg=dg,Sg=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],Cg=typeof document>`u`?{style:{}}:document.createElement(`div`),wg=Math.round,Tg=Math.abs,Eg=Date.now;function Dg(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<Sg.length;){if((r=(n=Sg[a])?n+i:t)in e)return r;a++}}bg=typeof window>`u`?{}:window;var Og=Dg(Cg.style,`touchAction`),kg=Og!==void 0,Ag=`compute`,jg=`auto`,Mg=`manipulation`,Ng=`none`,Pg=`pan-x`,Fg=`pan-y`,Ig=function(){if(!kg)return!1;var e={},t=bg.CSS&&bg.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach((function(n){return e[n]=!t||bg.CSS.supports(`touch-action`,n)})),e}(),Lg=`ontouchstart`in bg,Rg=Dg(bg,`PointerEvent`)!==void 0,zg=Lg&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),Bg=`touch`,Vg=`mouse`,Hg=25,Ug=1,Wg=4,Gg=8,Kg=1,qg=2,Jg=4,Yg=8,Xg=16,Zg=qg|Jg,Qg=Yg|Xg,$g=Zg|Qg,e_=[`x`,`y`],t_=[`clientX`,`clientY`];function n_(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==void 0)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function r_(e,t){return typeof e==`function`?e.apply(t&&t[0]||void 0,t):e}function i_(e,t){return e.indexOf(t)>-1}var a_=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===Ag&&(e=this.compute()),kg&&this.manager.element.style&&Ig[e]&&(this.manager.element.style[Og]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return n_(this.manager.recognizers,(function(t){r_(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(i_(e,Ng))return Ng;var t=i_(e,Pg),n=i_(e,Fg);return t&&n?Ng:t||n?t?Pg:Fg:i_(e,Mg)?Mg:jg}(e.join(` `))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,i=i_(r,Ng)&&!Ig[Ng],a=i_(r,Fg)&&!Ig[Fg],o=i_(r,Pg)&&!Ig[Pg];if(i){var s=e.pointers.length===1,c=e.distance<2,l=e.deltaTime<250;if(s&&c&&l)return}if(!o||!a)return i||a&&n&Zg||o&&n&Qg?this.preventSrc(t):void 0}},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function o_(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function s_(e){var t=e.length;if(t===1)return{x:wg(e[0].clientX),y:wg(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:wg(n/t),y:wg(r/t)}}function c_(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:wg(e.pointers[n].clientX),clientY:wg(e.pointers[n].clientY)},n++;return{timeStamp:Eg(),pointers:t,center:s_(t),deltaX:e.deltaX,deltaY:e.deltaY}}function l_(e,t,n){n||=e_;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function u_(e,t,n){n||=e_;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}function d_(e,t){return e===t?Kg:Tg(e)>=Tg(t)?e<0?qg:Jg:t<0?Yg:Xg}function f_(e,t,n){return{x:t/e||0,y:n/e||0}}function p_(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||=c_(t),i>1&&!n.firstMultiple?n.firstMultiple=c_(t):i===1&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,c=t.center=s_(r);t.timeStamp=Eg(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=u_(s,c),t.distance=l_(s,c),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};t.eventType!==Ug&&a.eventType!==Wg||(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=d_(t.deltaX,t.deltaY);var l,u,d=f_(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=d.x,t.overallVelocityY=d.y,t.overallVelocity=Tg(d.x)>Tg(d.y)?d.x:d.y,t.scale=o?(l=o.pointers,l_((u=r)[0],u[1],t_)/l_(l[0],l[1],t_)):1,t.rotation=o?function(e,t){return u_(t[1],t[0],t_)+u_(e[1],e[0],t_)}(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,i,a,o=e.lastInterval||t,s=t.timeStamp-o.timeStamp;if(t.eventType!==Gg&&(s>Hg||o.velocity===void 0)){var c=t.deltaX-o.deltaX,l=t.deltaY-o.deltaY,u=f_(s,c,l);r=u.x,i=u.y,n=Tg(u.x)>Tg(u.y)?u.x:u.y,a=d_(c,l),e.lastInterval=t}else n=o.velocity,r=o.velocityX,i=o.velocityY,a=o.direction;t.velocity=n,t.velocityX=r,t.velocityY=i,t.direction=a}(n,t);var f,p=e.element,m=t.srcEvent;o_(f=m.composedPath?m.composedPath()[0]:m.path?m.path[0]:m.target,p)&&(p=f),t.target=p}function m_(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=t&Ug&&r-i==0,o=t&(Wg|Gg)&&r-i==0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,p_(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function h_(e){return e.trim().split(/\s+/g)}function g_(e,t,n){n_(h_(t),(function(t){e.addEventListener(t,n,!1)}))}function __(e,t,n){n_(h_(t),(function(t){e.removeEventListener(t,n,!1)}))}function v_(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var y_=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){r_(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&g_(this.element,this.evEl,this.domHandler),this.evTarget&&g_(this.target,this.evTarget,this.domHandler),this.evWin&&g_(v_(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&__(this.element,this.evEl,this.domHandler),this.evTarget&&__(this.target,this.evTarget,this.domHandler),this.evWin&&__(v_(this.element),this.evWin,this.domHandler)},e}();function b_(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var x_={pointerdown:Ug,pointermove:2,pointerup:Wg,pointercancel:Gg,pointerout:Gg},S_={2:Bg,3:`pen`,4:Vg,5:`kinect`},C_=`pointerdown`,w_=`pointermove pointerup pointercancel`;bg.MSPointerEvent&&!bg.PointerEvent&&(C_=`MSPointerDown`,w_=`MSPointerMove MSPointerUp MSPointerCancel`);var T_=function(e){function t(){var n,r=t.prototype;return r.evEl=C_,r.evWin=w_,(n=e.apply(this,arguments)||this).store=n.manager.session.pointerEvents=[],n}return vg(t,e),t.prototype.handler=function(e){var t=this.store,n=!1,r=x_[e.type.toLowerCase().replace(`ms`,``)],i=S_[e.pointerType]||e.pointerType,a=i===Bg,o=b_(t,e.pointerId,`pointerId`);r&Ug&&(e.button===0||a)?o<0&&(t.push(e),o=t.length-1):r&(Wg|Gg)&&(n=!0),o<0||(t[o]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:i,srcEvent:e}),n&&t.splice(o,1))},t}(y_);function E_(e){return Array.prototype.slice.call(e,0)}function D_(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];b_(i,o)<0&&r.push(e[a]),i[a]=o,a++}return n&&(r=t?r.sort((function(e,n){return e[t]>n[t]})):r.sort()),r}var O_={touchstart:Ug,touchmove:2,touchend:Wg,touchcancel:Gg},k_=function(e){function t(){var n;return t.prototype.evTarget=`touchstart touchmove touchend touchcancel`,(n=e.apply(this,arguments)||this).targetIds={},n}return vg(t,e),t.prototype.handler=function(e){var t=O_[e.type],n=A_.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Bg,srcEvent:e})},t}(y_);function A_(e,t){var n,r,i=E_(e.touches),a=this.targetIds;if(t&(2|Ug)&&i.length===1)return a[i[0].identifier]=!0,[i,i];var o=E_(e.changedTouches),s=[],c=this.target;if(r=i.filter((function(e){return o_(e.target,c)})),t===Ug)for(n=0;n<r.length;)a[r[n].identifier]=!0,n++;for(n=0;n<o.length;)a[o[n].identifier]&&s.push(o[n]),t&(Wg|Gg)&&delete a[o[n].identifier],n++;return s.length?[D_(r.concat(s),`identifier`,!0),s]:void 0}var j_={mousedown:Ug,mousemove:2,mouseup:Wg},M_=function(e){function t(){var n,r=t.prototype;return r.evEl=`mousedown`,r.evWin=`mousemove mouseup`,(n=e.apply(this,arguments)||this).pressed=!1,n}return vg(t,e),t.prototype.handler=function(e){var t=j_[e.type];t&Ug&&e.button===0&&(this.pressed=!0),2&t&&e.which!==1&&(t=Wg),this.pressed&&(t&Wg&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:Vg,srcEvent:e}))},t}(y_),N_=2500;function P_(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout((function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)}),N_)}}function F_(e,t){e&Ug?(this.primaryTouch=t.changedPointers[0].identifier,P_.call(this,t)):e&(Wg|Gg)&&P_.call(this,t)}function I_(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(t-i.x),o=Math.abs(n-i.y);if(a<=25&&o<=25)return!0}return!1}var L_=function(){return function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handler=function(e,t,n){var i=n.pointerType===Bg,a=n.pointerType===Vg;if(!(a&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)F_.call(yg(yg(r)),t,n);else if(a&&I_.call(yg(yg(r)),n))return;r.callback(e,t,n)}},r.touch=new k_(r.manager,r.handler),r.mouse=new M_(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}return vg(t,e),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(y_)}();function R_(e,t,n){return!!Array.isArray(e)&&(n_(e,n[t],n),!0)}var z_=32,B_=1;function V_(e,t){var n=t.manager;return n?n.get(e):e}function H_(e){return 16&e?`cancel`:8&e?`end`:4&e?`move`:2&e?`start`:``}var U_=function(){function e(e){e===void 0&&(e={}),this.options=_g({enable:!0},e),this.id=B_++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return xg(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(R_(e,`recognizeWith`,this))return this;var t=this.simultaneous;return t[(e=V_(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return R_(e,`dropRecognizeWith`,this)||(e=V_(e,this),delete this.simultaneous[e.id]),this},t.requireFailure=function(e){if(R_(e,`requireFailure`,this))return this;var t=this.requireFail;return b_(t,e=V_(e,this))===-1&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(R_(e,`dropRequireFailure`,this))return this;e=V_(e,this);var t=b_(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<8&&r(t.options.event+H_(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+H_(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=z_},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},t.recognize=function(e){var t=xg({},e);if(!r_(this.options.enable,[this,t]))return this.reset(),void(this.state=z_);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),W_=function(e){function t(t){var n;return t===void 0&&(t={}),(n=e.call(this,_g({event:`tap`,pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this).pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}vg(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Mg]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime<n.time;if(this.reset(),e.eventType&Ug&&this.count===0)return this.failTimeout();if(i&&a&&r){if(e.eventType!==Wg)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<n.interval,s=!this.pCenter||l_(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,s&&o?this.count+=1:this.count=1,this._input=e,this.count%n.taps===0)return this.hasRequireFailures()?(this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),n.interval),2):8}return z_},n.failTimeout=function(){var e=this;return this._timer=setTimeout((function(){e.state=z_}),this.options.interval),z_},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){this.state===8&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(U_),G_=function(e){function t(t){return t===void 0&&(t={}),e.call(this,_g({pointers:1},t))||this}vg(t,e);var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return t===0||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=6&t,i=this.attrTest(e);return r&&(n&Gg||!i)?16|t:r||i?n&Wg?8|t:2&t?4|t:2:z_},t}(U_);function K_(e){return e===Xg?`down`:e===Yg?`up`:e===qg?`left`:e===Jg?`right`:``}var q_=function(e){function t(t){var n;return t===void 0&&(t={}),(n=e.call(this,_g({event:`pan`,threshold:10,pointers:1,direction:$g},t))||this).pX=null,n.pY=null,n}vg(t,e);var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&Zg&&t.push(Fg),e&Qg&&t.push(Pg),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,a=e.deltaX,o=e.deltaY;return i&t.direction||(t.direction&Zg?(i=a===0?Kg:a<0?qg:Jg,n=a!==this.pX,r=Math.abs(e.deltaX)):(i=o===0?Kg:o<0?Yg:Xg,n=o!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return G_.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=K_(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(G_),J_=function(e){function t(t){return t===void 0&&(t={}),e.call(this,_g({event:`swipe`,threshold:10,velocity:.3,direction:Zg|Qg,pointers:1},t))||this}vg(t,e);var n=t.prototype;return n.getTouchAction=function(){return q_.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n,r=this.options.direction;return r&(Zg|Qg)?n=t.overallVelocity:r&Zg?n=t.overallVelocityX:r&Qg&&(n=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&r&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&Tg(n)>this.options.velocity&&t.eventType&Wg},n.emit=function(e){var t=K_(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(G_),Y_=function(e){function t(t){return t===void 0&&(t={}),e.call(this,_g({event:`pinch`,threshold:0,pointers:2},t))||this}vg(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Ng]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},n.emit=function(t){if(t.scale!==1){var n=t.scale<1?`in`:`out`;t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(G_),X_=function(e){function t(t){return t===void 0&&(t={}),e.call(this,_g({event:`rotate`,threshold:0,pointers:2},t))||this}vg(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Ng]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)},t}(G_),Z_=function(e){function t(t){var n;return t===void 0&&(t={}),(n=e.call(this,_g({event:`press`,pointers:1,time:251,threshold:9},t))||this)._timer=null,n._input=null,n}vg(t,e);var n=t.prototype;return n.getTouchAction=function(){return[jg]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime>n.time;if(this._input=e,!i||!r||e.eventType&(Wg|Gg)&&!a)this.reset();else if(e.eventType&Ug)this.reset(),this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),n.time);else if(e.eventType&Wg)return 8;return z_},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){this.state===8&&(e&&e.eventType&Wg?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=Eg(),this.manager.emit(this.options.event,this._input)))},t}(U_),Q_={domEvents:!1,touchAction:Ag,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}},$_=[[X_,{enable:!1}],[Y_,{enable:!1},[`rotate`]],[J_,{direction:Zg}],[q_,{direction:Zg},[`swipe`]],[W_],[W_,{event:`doubletap`,taps:2},[`tap`]],[Z_]];function ev(e,t){var n,r=e.element;r.style&&(n_(e.options.cssProps,(function(i,a){n=Dg(r.style,a),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||``})),t||(e.oldCssProps={}))}var tv=function(){function e(e,t){var n,r=this;this.options=xg({},Q_,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((n=this).options.inputClass||(Rg?T_:zg?k_:Lg?L_:M_))(n,m_),this.touchAction=new a_(this,this.options.touchAction),ev(this,!0),n_(this.options.recognizers,(function(e){var t=r.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}var t=e.prototype;return t.set=function(e){return xg(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?2:1},t.recognize=function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var r=this.recognizers,i=t.curRecognizer;(!i||i&&8&i.state)&&(t.curRecognizer=null,i=null);for(var a=0;a<r.length;)n=r[a],t.stopped===2||i&&n!==i&&!n.canRecognizeWith(i)?n.reset():n.recognize(e),!i&&14&n.state&&(t.curRecognizer=n,i=n),a++}},t.get=function(e){if(e instanceof U_)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(R_(e,`add`,this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(R_(e,`remove`,this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=b_(n,t);r!==-1&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(e===void 0||t===void 0)return this;var n=this.handlers;return n_(h_(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this},t.off=function(e,t){if(e===void 0)return this;var n=this.handlers;return n_(h_(e),(function(e){t?n[e]&&n[e].splice(b_(n[e],t),1):delete n[e]})),this},t.emit=function(e,t){this.options.domEvents&&function(e,t){var n=document.createEvent(`Event`);n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&ev(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),nv={touchstart:Ug,touchmove:2,touchend:Wg,touchcancel:Gg},rv=function(e){function t(){var n,r=t.prototype;return r.evTarget=`touchstart`,r.evWin=`touchstart touchmove touchend touchcancel`,(n=e.apply(this,arguments)||this).started=!1,n}return vg(t,e),t.prototype.handler=function(e){var t=nv[e.type];if(t===Ug&&(this.started=!0),this.started){var n=iv.call(this,e,t);t&(Wg|Gg)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Bg,srcEvent:e})}},t}(y_);function iv(e,t){var n=E_(e.touches),r=E_(e.changedTouches);return t&(Wg|Gg)&&(n=D_(n.concat(r),`identifier`,!0)),[n,r]}function av(e,t,n){var r=`DEPRECATED METHOD: `+t+`
|
|
13
|
+
`+n+` AT
|
|
14
|
+
`;return function(){var t=Error(`get-stack-trace`),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,``).replace(/^\s+at\s+/gm,``).replace(/^Object.<anonymous>\s*\(/gm,`{anonymous}()@`):`Unknown Stack Trace`,i=window.console&&(window.console.warn||window.console.log);return i&&i.call(window.console,r,n),e.apply(this,arguments)}}var ov=av((function(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;)(!n||n&&e[r[i]]===void 0)&&(e[r[i]]=t[r[i]]),i++;return e}),`extend`,"Use `assign`."),sv=av((function(e,t){return ov(e,t,!0)}),`merge`,"Use `assign`.");function cv(e,t,n){var r,i=t.prototype;(r=e.prototype=Object.create(i)).constructor=e,r._super=i,n&&xg(r,n)}function lv(e,t){return function(){return e.apply(t,arguments)}}var uv=function(){var e=function(e,t){return t===void 0&&(t={}),new tv(e,_g({recognizers:$_.concat()},t))};return e.VERSION=`2.0.17-rc`,e.DIRECTION_ALL=$g,e.DIRECTION_DOWN=Xg,e.DIRECTION_LEFT=qg,e.DIRECTION_RIGHT=Jg,e.DIRECTION_UP=Yg,e.DIRECTION_HORIZONTAL=Zg,e.DIRECTION_VERTICAL=Qg,e.DIRECTION_NONE=Kg,e.DIRECTION_DOWN=Xg,e.INPUT_START=Ug,e.INPUT_MOVE=2,e.INPUT_END=Wg,e.INPUT_CANCEL=Gg,e.STATE_POSSIBLE=1,e.STATE_BEGAN=2,e.STATE_CHANGED=4,e.STATE_ENDED=8,e.STATE_RECOGNIZED=8,e.STATE_CANCELLED=16,e.STATE_FAILED=z_,e.Manager=tv,e.Input=y_,e.TouchAction=a_,e.TouchInput=k_,e.MouseInput=M_,e.PointerEventInput=T_,e.TouchMouseInput=L_,e.SingleTouchInput=rv,e.Recognizer=U_,e.AttrRecognizer=G_,e.Tap=W_,e.Pan=q_,e.Swipe=J_,e.Pinch=Y_,e.Rotate=X_,e.Press=Z_,e.on=g_,e.off=__,e.each=n_,e.merge=sv,e.extend=ov,e.bindFn=lv,e.assign=xg,e.inherit=cv,e.bindFn=lv,e.prefixed=Dg,e.toArray=E_,e.inArray=b_,e.uniqueArray=D_,e.splitStr=h_,e.boolOrFn=r_,e.hasParent=o_,e.addEventListeners=g_,e.removeEventListeners=__,e.defaults=xg({},Q_,{preset:$_}),e}();uv.defaults;var dv=uv;function fv(e,t){var n=fp!==void 0&&bc(e)||e[`@@iterator`];if(!n){if(Tp(e)||(n=function(e,t){var n;if(e){if(typeof e==`string`)return pv(e,t);var r=vp(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return $s(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pv(e,t)}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
15
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function pv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mv(){var e=[...arguments];return function(e){var t=up(function(){for(var e=function(){var e=4022871197;return function(t){for(var n=t.toString(),r=0;r<n.length;r++){var i=.02519603282416938*(e+=n.charCodeAt(r));i-=e=i>>>0,e=(i*=e)>>>0,e+=4294967296*(i-=e)}return 23283064365386963e-26*(e>>>0)}}(),t=e(` `),n=e(` `),r=e(` `),i=0;i<arguments.length;i++)(t-=e(i<0||arguments.length<=i?void 0:arguments[i]))<0&&(t+=1),(n-=e(i<0||arguments.length<=i?void 0:arguments[i]))<0&&(n+=1),(r-=e(i<0||arguments.length<=i?void 0:arguments[i]))<0&&(r+=1);return[t,n,r]}(e),3),n=t[0],r=t[1],i=t[2],a=1,o=function(){var e=2091639*n+23283064365386963e-26*a;return n=r,r=i,i=e-(a=0|e)};return o.uint32=function(){return 4294967296*o()},o.fract53=function(){return o()+11102230246251565e-32*(2097152*o()|0)},o.algorithm=`Alea`,o.seed=e,o.version=`0.9`,o}(e.length?e:[Rp()])}fp(`DELETE`);var hv=typeof window<`u`?window.Hammer||dv:function(){return function(){var e=function(){};return{on:e,off:e,destroy:e,emit:e,get:function(){return{set:e}}}}()};function gv(e){var t,n=this;this._cleanupQueue=[],this.active=!1,this._dom={container:e,overlay:document.createElement(`div`)},this._dom.overlay.classList.add(`vis-overlay`),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push((function(){n._dom.overlay.parentNode.removeChild(n._dom.overlay)}));var r=hv(this._dom.overlay);r.on(`tap`,V(t=this._onTapOverlay).call(t,this)),this._cleanupQueue.push((function(){r.destroy()}));var i=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];Xp(i).call(i,(function(e){r.on(e,(function(e){e.srcEvent.stopPropagation()}))})),document&&document.body&&(this._onClick=function(t){(function(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1})(t.target,e)||n.deactivate()},document.body.addEventListener(`click`,this._onClick),this._cleanupQueue.push((function(){document.body.removeEventListener(`click`,n._onClick)}))),this._escListener=function(e){(`key`in e?e.key===`Escape`:e.keyCode===27)&&n.deactivate()}}ai(gv.prototype),gv.current=null,gv.prototype.destroy=function(){var e,t;this.deactivate();var n,r=fv(am(e=Em(t=this._cleanupQueue).call(t,0)).call(e));try{for(r.s();!(n=r.n()).done;)(0,n.value)()}catch(e){r.e(e)}finally{r.f()}},gv.prototype.activate=function(){gv.current&&gv.current.deactivate(),gv.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)},gv.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`)},gv.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};var _v=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,vv=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,yv=/^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,bv=/^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 xv(e){if(e)for(;!0===e.hasChildNodes();){var t=e.firstChild;t&&(xv(t),e.removeChild(t))}}function Sv(e){return e instanceof String||typeof e==`string`}function Cv(e){return xf(e)===`object`&&e!==null}function wv(e,t,n,r){var i=!1;!0===r&&(i=t[n]===null&&e[n]!==void 0),i?delete e[n]:e[n]=t[n]}function Tv(e,t){var n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];for(var r in e)if(t[r]!==void 0)if(t[r]===null||xf(t[r])!==`object`)wv(e,t,r,n);else{var i=e[r],a=t[r];Cv(i)&&Cv(a)&&Tv(i,a,n)}}function Ev(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(Tp(n))throw TypeError(`Arrays are not supported by deepExtend`);for(var i=0;i<e.length;i++){var a=e[i];if(Object.prototype.hasOwnProperty.call(n,a))if(n[a]&&n[a].constructor===Object)t[a]===void 0&&(t[a]={}),t[a].constructor===Object?Ov(t[a],n[a],!1,r):wv(t,n,a,r);else{if(Tp(n[a]))throw TypeError(`Arrays are not supported by deepExtend`);wv(t,n,a,r)}}return t}function Dv(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(Tp(n))throw TypeError(`Arrays are not supported by deepExtend`);for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&!qm(e).call(e,i))if(n[i]&&n[i].constructor===Object)t[i]===void 0&&(t[i]={}),t[i].constructor===Object?Ov(t[i],n[i]):wv(t,n,i,r);else if(Tp(n[i])){t[i]=[];for(var a=0;a<n[i].length;a++)t[i].push(n[i][a])}else wv(t,n,i,r);return t}function Ov(e,t){var n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)||!0===n)if(xf(t[i])===`object`&&t[i]!==null&&Qm(t[i])===Object.prototype)e[i]===void 0?e[i]=Ov({},t[i],n):xf(e[i])===`object`&&e[i]!==null&&Qm(e[i])===Object.prototype?Ov(e[i],t[i],n):wv(e,t,i,r);else if(Tp(t[i])){var a;e[i]=vp(a=t[i]).call(a)}else wv(e,t,i,r);return e}function kv(e,t){var n;return _p(n=[]).call(n,dp(e),[t])}function Av(e){return e.getBoundingClientRect().top}function W(e,t){if(Tp(e))for(var n=e.length,r=0;r<n;r++)t(e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t(e[i],i,e)}function jv(e){var t;switch(e.length){case 3:case 4:return(t=vv.exec(e))?{r:Eh(t[1]+t[1],16),g:Eh(t[2]+t[2],16),b:Eh(t[3]+t[3],16)}:null;case 6:case 7:return(t=_v.exec(e))?{r:Eh(t[1],16),g:Eh(t[2],16),b:Eh(t[3],16)}:null;default:return null}}function Mv(e,t){if(qm(e).call(e,`rgba`))return e;if(qm(e).call(e,`rgb`)){var n=e.substr(Ih(e).call(e,`(`)+1).replace(`)`,``).split(`,`);return`rgba(`+n[0]+`,`+n[1]+`,`+n[2]+`,`+t+`)`}var r=jv(e);return r==null?e:`rgba(`+r.r+`,`+r.g+`,`+r.b+`,`+t+`)`}function Nv(e,t,n){var r;return`#`+vp(r=((1<<24)+(e<<16)+(t<<8)+n).toString(16)).call(r,1)}function Pv(e,t){if(Sv(e)){var n=e;if(zv(n)){var r,i=jp(r=n.substr(4).substr(0,n.length-5).split(`,`)).call(r,(function(e){return Eh(e)}));n=Nv(i[0],i[1],i[2])}if(!0===Rv(n)){var a=function(e){var t=jv(e);if(!t)throw TypeError(`'${e}' is not a valid color.`);return Fv(t.r,t.g,t.b)}(n),o={h:a.h,s:.8*a.s,v:Math.min(1,1.02*a.v)},s={h:a.h,s:Math.min(1,1.25*a.s),v:.8*a.v},c=Lv(s.h,s.s,s.v),l=Lv(o.h,o.s,o.v);return{background:n,border:c,highlight:{background:l,border:c},hover:{background:l,border:c}}}return{background:n,border:n,highlight:{background:n,border:n},hover:{background:n,border:n}}}return t?{background:e.background||t.background,border:e.border||t.border,highlight:Sv(e.highlight)?{border:e.highlight,background:e.highlight}:{background:e.highlight&&e.highlight.background||t.highlight.background,border:e.highlight&&e.highlight.border||t.highlight.border},hover:Sv(e.hover)?{border:e.hover,background:e.hover}:{border:e.hover&&e.hover.border||t.hover.border,background:e.hover&&e.hover.background||t.hover.background}}:{background:e.background||void 0,border:e.border||void 0,highlight:Sv(e.highlight)?{border:e.highlight,background:e.highlight}:{background:e.highlight&&e.highlight.background||void 0,border:e.highlight&&e.highlight.border||void 0},hover:Sv(e.hover)?{border:e.hover,background:e.hover}:{border:e.hover&&e.hover.border||void 0,background:e.hover&&e.hover.background||void 0}}}function Fv(e,t,n){e/=255,t/=255,n/=255;var r=Math.min(e,Math.min(t,n)),i=Math.max(e,Math.max(t,n));return r===i?{h:0,s:0,v:r}:{h:60*((e===r?3:n===r?1:5)-(e===r?t-n:n===r?e-t:n-e)/(i-r))/360,s:(i-r)/i,v:i}}function Iv(e,t,n){var r,i,a,o=Math.floor(6*e),s=6*e-o,c=n*(1-t),l=n*(1-s*t),u=n*(1-(1-s)*t);switch(o%6){case 0:r=n,i=u,a=c;break;case 1:r=l,i=n,a=c;break;case 2:r=c,i=n,a=u;break;case 3:r=c,i=l,a=n;break;case 4:r=u,i=c,a=n;break;case 5:r=n,i=c,a=l}return{r:Math.floor(255*r),g:Math.floor(255*i),b:Math.floor(255*a)}}function Lv(e,t,n){var r=Iv(e,t,n);return Nv(r.r,r.g,r.b)}function Rv(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)}function zv(e){return yv.test(e)}function Bv(e){if(e===null||xf(e)!==`object`)return null;if(e instanceof Element)return e;var t=zh(e);for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&xf(e[n])==`object`&&(t[n]=Bv(e[n]));return t}function Vv(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=function(e){return e!=null},a=function(e){return e!==null&&xf(e)===`object`};if(!a(e))throw Error(`Parameter mergeTarget must be an object`);if(!a(t))throw Error(`Parameter options must be an object`);if(!i(n))throw Error(`Parameter option must have a value`);if(!a(r))throw Error(`Parameter globalOptions must be an object`);var o=t[n],s=a(r)&&!function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(r)?r[n]:void 0,c=s?s.enabled:void 0;if(o!==void 0){if(typeof o==`boolean`)return a(e[n])||(e[n]={}),void(e[n].enabled=o);if(o===null&&!a(e[n])){if(!i(s))return;e[n]=zh(s)}if(a(o)){var l=!0;o.enabled===void 0?c!==void 0&&(l=s.enabled):l=o.enabled,function(e,t,n){a(e[n])||(e[n]={});var r=t[n],i=e[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(i[o]=r[o])}(e,t,n),e[n].enabled=l}}}var Hv={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:(4-2*e)*e-1},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};function Uv(e,t){var n;Tp(t)||(t=[t]);var r,i=fv(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(a){n=a[t[0]];for(var o=1;o<t.length;o++)n&&=n[t[o]];if(n!==void 0)break}}}catch(e){i.e(e)}finally{i.f()}return n}var Wv={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`},Gv=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;H(this,e),this.pixelRatio=t,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},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 U(e,[{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`)throw Error(`Function attempted to set as colorPicker update callback is not a function.`);this.updateCallback=e}},{key:`setCloseCallback`,value:function(e){if(typeof e!=`function`)throw Error(`Function attempted to set as colorPicker closing callback is not a function.`);this.closeCallback=e}},{key:`_isColorString`,value:function(e){if(typeof e==`string`)return Wv[e]}},{key:`setColor`,value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];if(e!==`none`){var n,r=this._isColorString(e);if(r!==void 0&&(e=r),!0===Sv(e)){if(!0===zv(e)){var i=e.substr(4).substr(0,e.length-5).split(`,`);n={r:i[0],g:i[1],b:i[2],a:1}}else if(!0===function(e){return bv.test(e)}(e)){var a=e.substr(5).substr(0,e.length-6).split(`,`);n={r:a[0],g:a[1],b:a[2],a:a[3]}}else if(!0===Rv(e)){var o=jv(e);n={r:o.r,g:o.g,b:o.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){var s=e.a===void 0?`1.0`:e.a;n={r:e.r,g:e.g,b:e.b,a:s}}if(n===void 0)throw Error(`Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: `+Hh(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;!0===(!(arguments.length>0&&arguments[0]!==void 0)||arguments[0])&&(this.previousColor=jr({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display=`none`,sg((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?alert(`There is no last color to load...`):this.setColor(this.previousColor,!1)}},{key:`_setColor`,value:function(e){!0===(!(arguments.length>1&&arguments[1]!==void 0)||arguments[1])&&(this.initialColor=jr({},e)),this.color=e;var t=Fv(e.r,e.g,e.b),n=2*Math.PI,r=this.r*t.s,i=this.centerCoordinates.x+r*Math.sin(n*t.h),a=this.centerCoordinates.y+r*Math.cos(n*t.h);this.colorPickerSelector.style.left=i-.5*this.colorPickerSelector.clientWidth+`px`,this.colorPickerSelector.style.top=a-.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=Fv(this.color.r,this.color.g,this.color.b);t.v=e/100;var n=Iv(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=Fv(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 r=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,r,i),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),gg(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,r;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 i=this.colorPickerCanvas.getContext(`2d`);this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1),this.colorPickerCanvas.getContext(`2d`).setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var a=document.createElement(`DIV`);a.style.color=`red`,a.style.fontWeight=`bold`,a.style.padding=`10px`,a.innerText=`Error: your browser does not support HTML canvas`,this.colorPickerCanvas.appendChild(a)}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 o=this;this.opacityRange.onchange=function(){o._setOpacity(this.value)},this.opacityRange.oninput=function(){o._setOpacity(this.value)},this.brightnessRange.onchange=function(){o._setBrightness(this.value)},this.brightnessRange.oninput=function(){o._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=V(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=V(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=V(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=V(r=this._loadLast).call(r,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 hv(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(!1===this.generated){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,n,r,i,a=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,a,o),this.centerCoordinates={x:.5*a,y:.5*o},this.r=.49*a;var s,c=2*Math.PI/360,l=1/this.r;for(r=0;r<360;r++)for(i=0;i<this.r;i++)t=this.centerCoordinates.x+i*Math.sin(c*r),n=this.centerCoordinates.y+i*Math.cos(c*r),s=Iv(.002777777777777778*r,i*l,1),e.fillStyle=`rgb(`+s.r+`,`+s.g+`,`+s.b+`)`,e.fillRect(t-.5,n-.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,a,o)}this.generated=!0}},{key:`_moveSelector`,value:function(e){var t=this.colorPickerDiv.getBoundingClientRect(),n=e.center.x-t.left,r=e.center.y-t.top,i=.5*this.colorPickerDiv.clientHeight,a=.5*this.colorPickerDiv.clientWidth,o=n-a,s=r-i,c=Math.atan2(o,s),l=.98*Math.min(Math.sqrt(o*o+s*s),a),u=Math.cos(c)*l+i,d=Math.sin(c)*l+a;this.colorPickerSelector.style.top=u-.5*this.colorPickerSelector.clientHeight+`px`,this.colorPickerSelector.style.left=d-.5*this.colorPickerSelector.clientWidth+`px`;var f=c/(2*Math.PI);f=f<0?f+1:f;var p=l/this.r,m=Fv(this.color.r,this.color.g,this.color.b);m.h=f,m.s=p;var h=Iv(m.h,m.s,m.v);h.a=this.color.a,this.color=h,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+`)`}}]),e}();function Kv(){var e=[...arguments];if(e.length<1)throw TypeError(`Invalid arguments.`);if(e.length===1)return document.createTextNode(e[0]);var t=document.createElement(e[0]);return t.appendChild(Kv.apply(void 0,dp(vp(e).call(e,1)))),t}var qv,Jv=function(){function e(t,n,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){return!1};H(this,e),this.parent=t,this.changedOptions=[],this.container=n,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},jr(this.options,this.defaultOptions),this.configureOptions=r,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new Gv(i),this.wrapper=void 0}return U(e,[{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(Tp(e))this.options.filter=e.join();else if(xf(e)===`object`){if(e==null)throw TypeError(`options cannot be null`);e.container!==void 0&&(this.options.container=e.container),ih(e)!==void 0&&(this.options.filter=ih(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);!1===ih(this.options)&&(t=!1),this.options.enabled=t}this._clean()}},{key:`setModuleOptions`,value:function(e){this.moduleOptions=e,!0===this.options.enabled&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}},{key:`_create`,value:function(){this._clean(),this.changedOptions=[];var e=ih(this.options),t=0,n=!1;for(var r in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,r)&&(this.allowCreation=!1,n=!1,typeof e==`function`?n=(n=e(r,[]))||this._handleObject(this.configureOptions[r],[r],!0):!0!==e&&Ih(e).call(e,r)===-1||(n=!0),!1!==n&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(r),this._handleObject(this.configureOptions[r],[r])),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=void 0;break}t=t[e[n]]}return t}},{key:`_makeItem`,value:function(e){if(!0===this.allowCreation){var t=document.createElement(`div`);t.className=`vis-configuration vis-config-item vis-config-s`+e.length;var n=[...arguments].slice(1);return Xp(n).call(n,(function(e){t.appendChild(e)})),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],r=document.createElement(`div`);if(r.className=`vis-configuration vis-config-label vis-config-s`+t.length,!0===n){for(;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(Kv(`i`,`b`,e))}else r.innerText=e+`:`;return r}},{key:`_makeDropdown`,value:function(e,t,n){var r=document.createElement(`select`);r.className=`vis-configuration vis-config-select`;var i=0;t!==void 0&&Ih(e).call(e,t)!==-1&&(i=Ih(e).call(e,t));for(var a=0;a<e.length;a++){var o=document.createElement(`option`);o.value=e[a],a===i&&(o.selected=`selected`),o.innerText=e[a],r.appendChild(o)}var s=this;r.onchange=function(){s._update(this.value,n)};var c=this._makeLabel(n[n.length-1],n);this._makeItem(n,c,r)}},{key:`_makeRange`,value:function(e,t,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=document.createElement(`input`);s.className=`vis-configuration vis-config-range`;try{s.type=`range`,s.min=i,s.max=a}catch{}s.step=o;var c=``,l=0;if(t!==void 0){var u=1.2;t<0&&t*u<i?(s.min=Math.ceil(t*u),l=s.min,c=`range increased`):t/u<i&&(s.min=Math.ceil(t/u),l=s.min,c=`range increased`),t*u>a&&a!==1&&(s.max=Math.ceil(t*u),l=s.max,c=`range increased`),s.value=t}else s.value=r;var d=document.createElement(`input`);d.className=`vis-configuration vis-config-rangeinput`,d.value=s.value;var f=this;s.onchange=function(){d.value=this.value,f._update(Number(this.value),n)},s.oninput=function(){d.value=this.value};var p=this._makeLabel(n[n.length-1],n),m=this._makeItem(n,p,s,d);c!==``&&this.popupHistory[m]!==l&&(this.popupHistory[m]=l,this._setupPopup(c,m))}},{key:`_makeButton`,value:function(){var e=this;if(!0===this.options.showButton){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(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter<this.popupLimit){var r=document.createElement(`div`);r.id=`vis-configuration-popup`,r.className=`vis-configuration-popup`,r.innerText=e,r.onclick=function(){n._removePopup()},this.popupCounter+=1,this.popupDiv={html:r,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].getBoundingClientRect();this.popupDiv.html.style.left=t.left+`px`,this.popupDiv.html.style.top=t.top-30+`px`,document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=sg((function(){e.popupDiv.html.style.opacity=0}),1500),this.popupDiv.deleteTimeout=sg((function(){e._removePopup()}),1800)}}},{key:`_makeCheckbox`,value:function(e,t,n){var r=document.createElement(`input`);r.type=`checkbox`,r.className=`vis-configuration vis-config-checkbox`,r.checked=e,t!==void 0&&(r.checked=t,t!==e&&(xf(e)===`object`?t!==e.enabled&&this.changedOptions.push({path:n,value:t}):this.changedOptions.push({path:n,value:t})));var i=this;r.onchange=function(){i._update(this.checked,n)};var a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,r)}},{key:`_makeTextInput`,value:function(e,t,n){var r=document.createElement(`input`);r.type=`text`,r.className=`vis-configuration vis-config-text`,r.value=t,t!==e&&this.changedOptions.push({path:n,value:t});var i=this;r.onchange=function(){i._update(this.value,n)};var a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,r)}},{key:`_makeColorField`,value:function(e,t,n){var r=this,i=e[1],a=document.createElement(`div`);(t=t===void 0?i:t)===`none`?a.className=`vis-configuration vis-config-colorBlock none`:(a.className=`vis-configuration vis-config-colorBlock`,a.style.backgroundColor=t),t=t===void 0?i:t,a.onclick=function(){r._showColorPicker(t,a,n)};var o=this._makeLabel(n[n.length-1],n);this._makeItem(n,o,a)}},{key:`_showColorPicker`,value:function(e,t,n){var r=this;t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback((function(e){var i=`rgba(`+e.r+`,`+e.g+`,`+e.b+`,`+e.a+`)`;t.style.backgroundColor=i,r._update(i,n)})),this.colorPicker.setCloseCallback((function(){t.onclick=function(){r._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],r=!1,i=ih(this.options),a=!1;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){r=!0;var s=e[o],c=kv(t,o);if(typeof i==`function`&&!1===(r=i(o,t))&&!Tp(s)&&typeof s!=`string`&&typeof s!=`boolean`&&s instanceof Object&&(this.allowCreation=!1,r=this._handleObject(s,c,!0),this.allowCreation=!1===n),!1!==r){a=!0;var l=this._getValue(c);if(Tp(s))this._handleArray(s,l,c);else if(typeof s==`string`)this._makeTextInput(s,l,c);else if(typeof s==`boolean`)this._makeCheckbox(s,l,c);else if(s instanceof Object){if(!this.hideOption(t,o,this.moduleOptions))if(s.enabled!==void 0){var u=kv(c,`enabled`),d=this._getValue(u);if(!0===d){var f=this._makeLabel(o,c,!0);this._makeItem(c,f),a=this._handleObject(s,c)||a}else this._makeCheckbox(s,d,c)}else{var p=this._makeLabel(o,c,!0);this._makeItem(c,p),a=this._handleObject(s,c)||a}}else console.error(`dont know how to handle`,s,o,c)}}return a}},{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]:{},r=n;e=(e=e===`true`||e)!==`false`&&e;for(var i=0;i<t.length;i++)t[i]!==`global`&&(r[t[i]]===void 0&&(r[t[i]]={}),i===t.length-1?r[t[i]]=e:r=r[t[i]]);return n}},{key:`_printOptions`,value:function(){for(var e=this.getOptions();this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(Kv(`pre`,`const options = `+Hh(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}}]),e}(),Yv=function(){function e(t,n){H(this,e),this.container=t,this.overflowMethod=n||`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 U(e,[{key:`setPosition`,value:function(e,t){this.x=Eh(e),this.y=Eh(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),!0===e){var t=this.frame.clientHeight,n=this.frame.clientWidth,r=this.frame.parentNode.clientHeight,i=this.frame.parentNode.clientWidth,a=0,o=0;if(this.overflowMethod==`flip`){var s=!1,c=!0;this.y-t<this.padding&&(c=!1),this.x+n>i-this.padding&&(s=!0),a=s?this.x-n:this.x,o=c?this.y-t:this.y}else (o=this.y-t)+t+this.padding>r&&(o=r-t-this.padding),o<this.padding&&(o=this.padding),(a=this.x)+n+this.padding>i&&(a=i-n-this.padding),a<this.padding&&(a=this.padding);this.frame.style.left=a+`px`,this.frame.style.top=o+`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)}}]),e}(),Xv=!1,Zv=`background: #FFeeee; color: #dd0000`,Qv=function(){function e(){H(this,e)}return U(e,null,[{key:`validate`,value:function(t,n,r){Xv=!1,qv=n;var i=n;return r!==void 0&&(i=n[r]),e.parse(t,i,[]),Xv}},{key:`parse`,value:function(t,n,r){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.check(i,t,n,r)}},{key:`check`,value:function(t,n,r,i){if(r[t]!==void 0||r.__any__!==void 0){var a=t,o=!0;r[t]===void 0&&r.__any__!==void 0&&(a=`__any__`,o=e.getType(n[t])===`object`);var s=r[a];o&&s.__type__!==void 0&&(s=s.__type__),e.checkFields(t,n,r,a,s,i)}else e.getSuggestion(t,r,i)}},{key:`checkFields`,value:function(t,n,r,i,a,o){var s=function(n){console.error(`%c`+n+e.printLocation(o,t),Zv)},c=e.getType(n[t]),l=a[c];l===void 0?a.any===void 0&&(s(`Invalid type received for "`+t+`". Expected: `+e.print(Pp(a))+`. Received [`+c+`] "`+n[t]+`"`),Xv=!0):e.getType(l)===`array`&&Ih(l).call(l,n[t])===-1?(s(`Invalid option detected in "`+t+`". Allowed values are:`+e.print(l)+` not "`+n[t]+`". `),Xv=!0):c===`object`&&i!==`__any__`&&(o=kv(o,t),e.parse(n[t],r[i],o))}},{key:`getType`,value:function(e){var t=xf(e);return t===`object`?e===null?`null`:e instanceof Boolean?`boolean`:e instanceof Number?`number`:e instanceof String?`string`:Tp(e)?`array`:e instanceof Date?`date`:e.nodeType===void 0?!0===e._isAMomentObject?`moment`:`object`:`dom`:t===`number`?`number`:t===`boolean`?`boolean`:t===`string`?`string`:t===void 0?`undefined`:t}},{key:`getSuggestion`,value:function(t,n,r){var i,a=e.findInOptions(t,n,r,!1),o=e.findInOptions(t,qv,[],!0);i=a.indexMatch===void 0?o.distance<=4&&a.distance>o.distance?` in `+e.printLocation(a.path,t,``)+`Perhaps it was misplaced? Matching option found at: `+e.printLocation(o.path,o.closestMatch,``):a.distance<=8?`. Did you mean "`+a.closestMatch+`"?`+e.printLocation(a.path,t):`. Did you mean one of these: `+e.print(Pp(n))+e.printLocation(r,t):` in `+e.printLocation(a.path,t,``)+`Perhaps it was incomplete? Did you mean: "`+a.indexMatch+`"?
|
|
16
|
+
|
|
17
|
+
`,console.error(`%cUnknown option detected: "`+t+`"`+i,Zv),Xv=!0}},{key:`findInOptions`,value:function(t,n,r){var i,a=arguments.length>3&&arguments[3]!==void 0&&arguments[3],o=1e9,s=``,c=[],l=t.toLowerCase(),u=void 0;for(var d in n){var f=void 0;if(n[d].__type__!==void 0&&!0===a){var p=e.findInOptions(t,n[d],kv(r,d));o>p.distance&&(s=p.closestMatch,c=p.path,o=p.distance,u=p.indexMatch)}else{var m;Ih(m=d.toLowerCase()).call(m,l)!==-1&&(u=d),o>(f=e.levenshteinDistance(t,d))&&(s=d,c=vp(i=r).call(i),o=f)}}return{closestMatch:s,path:c,distance:o,indexMatch:u}}},{key:`printLocation`,value:function(e,t){for(var n=`
|
|
18
|
+
|
|
19
|
+
`+(arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at:
|
|
20
|
+
`)+`options = {
|
|
21
|
+
`,r=0;r<e.length;r++){for(var i=0;i<r+1;i++)n+=` `;n+=e[r]+`: {
|
|
22
|
+
`}for(var a=0;a<e.length+1;a++)n+=` `;n+=t+`
|
|
23
|
+
`;for(var o=0;o<e.length+1;o++){for(var s=0;s<e.length-o;s++)n+=` `;n+=`}
|
|
24
|
+
`}return n+`
|
|
25
|
+
|
|
26
|
+
`}},{key:`print`,value:function(e){return Hh(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,r,i=[];for(n=0;n<=t.length;n++)i[n]=[n];for(r=0;r<=e.length;r++)i[0][r]=r;for(n=1;n<=t.length;n++)for(r=1;r<=e.length;r++)t.charAt(n-1)==e.charAt(r-1)?i[n][r]=i[n-1][r-1]:i[n][r]=Math.min(i[n-1][r-1]+1,Math.min(i[n][r-1]+1,i[n-1][r]+1));return i[t.length][e.length]}}]),e}(),$v=gv,ey=Jv,ty=hv,ny=Yv,ry=Zv,iy=Qv;function ay(e){return uy=e,function(){var e={};if(dy=0,G=uy.charAt(0),xy(),K===`strict`&&(e.strict=!0,xy()),K!==`graph`&&K!==`digraph`||(e.type=K,xy()),fy===cy.IDENTIFIER&&(e.id=K,xy()),K!=`{`)throw Dy(`Angle bracket { expected`);if(xy(),Sy(e),K!=`}`)throw Dy(`Angle bracket } expected`);if(xy(),K!==``)throw Dy(`End of file expected`);return xy(),delete e.node,delete e.edge,delete e.graph,e}()}var oy={fontsize:`font.size`,fontcolor:`font.color`,labelfontcolor:`font.color`,fontname:`font.face`,color:[`color.border`,`color.background`],fillcolor:`color.background`,tooltip:`title`,labeltooltip:`title`},sy=zh(oy);sy.color=`color.color`,sy.style=`dashes`;var cy={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},ly={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},uy=``,dy=0,G=``,K=``,fy=cy.NULL;function py(){dy++,G=uy.charAt(dy)}function my(){return uy.charAt(dy+1)}function hy(e){var t=e.charCodeAt(0);return t<47?t===35||t===46:t<59?t>47:t<91?t>64:t<96?t===95:t<123&&t>96}function gy(e,t){if(e||={},t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function _y(e,t,n){for(var r=t.split(`.`),i=e;r.length;){var a=r.shift();r.length?(i[a]||(i[a]={}),i=i[a]):i[a]=n}}function vy(e,t){for(var n,r,i=null,a=[e],o=e;o.parent;)a.push(o.parent),o=o.parent;if(o.nodes){for(n=0,r=o.nodes.length;n<r;n++)if(t.id===o.nodes[n].id){i=o.nodes[n];break}}for(i||(i={id:t.id},e.node&&(i.attr=gy(i.attr,e.node))),n=a.length-1;n>=0;n--){var s,c=a[n];c.nodes||=[],Ih(s=c.nodes).call(s,i)===-1&&c.nodes.push(i)}t.attr&&(i.attr=gy(i.attr,t.attr))}function yy(e,t){e.edges||=[],e.edges.push(t),e.edge&&(t.attr=gy(gy({},e.edge),t.attr))}function by(e,t,n,r,i){var a={from:t,to:n,type:r};return e.edge&&(a.attr=gy({},e.edge)),a.attr=gy(a.attr||{},i),i!=null&&i.hasOwnProperty(`arrows`)&&i.arrows!=null&&(a.arrows={to:{enabled:!0,type:i.arrows.type}},i.arrows=null),a}function xy(){for(fy=cy.NULL,K=``;G===` `||G===` `||G===`
|
|
27
|
+
`||G===`\r`;)py();do{var e=!1;if(G===`#`){for(var t=dy-1;uy.charAt(t)===` `||uy.charAt(t)===` `;)t--;if(uy.charAt(t)===`
|
|
28
|
+
`||uy.charAt(t)===``){for(;G!=``&&G!=`
|
|
29
|
+
`;)py();e=!0}}if(G===`/`&&my()===`/`){for(;G!=``&&G!=`
|
|
30
|
+
`;)py();e=!0}if(G===`/`&&my()===`*`){for(;G!=``;){if(G===`*`&&my()===`/`){py(),py();break}py()}e=!0}for(;G===` `||G===` `||G===`
|
|
31
|
+
`||G===`\r`;)py()}while(e);if(G!==``){var n=G+my();if(ly[n])return fy=cy.DELIMITER,K=n,py(),void py();if(ly[G])return fy=cy.DELIMITER,K=G,void py();if(hy(G)||G===`-`){for(K+=G,py();hy(G);)K+=G,py();K===`false`?K=!1:K===`true`?K=!0:isNaN(Number(K))||(K=Number(K)),fy=cy.IDENTIFIER;return}if(G===`"`){for(py();G!=``&&(G!=`"`||G===`"`&&my()===`"`);)G===`"`?(K+=G,py()):G===`\\`&&my()===`n`?(K+=`
|
|
32
|
+
`,py()):K+=G,py();if(G!=`"`)throw Dy(`End of string " expected`);py(),fy=cy.IDENTIFIER;return}for(fy=cy.UNKNOWN;G!=``;)K+=G,py();throw SyntaxError(`Syntax error in part "`+Oy(K,30)+`"`)}fy=cy.DELIMITER}function Sy(e){for(;K!==``&&K!=`}`;)Cy(e),K===`;`&&xy()}function Cy(e){var t=wy(e);if(t)Ty(e,t);else if(!function(e){return K===`node`?(xy(),e.node=Ey(),`node`):K===`edge`?(xy(),e.edge=Ey(),`edge`):K===`graph`?(xy(),e.graph=Ey(),`graph`):null}(e)){if(fy!=cy.IDENTIFIER)throw Dy(`Identifier expected`);var n=K;if(xy(),K===`=`){if(xy(),fy!=cy.IDENTIFIER)throw Dy(`Identifier expected`);e[n]=K,xy()}else (function(e,t){var n={id:t},r=Ey();r&&(n.attr=r),vy(e,n),Ty(e,t)})(e,n)}}function wy(e){var t=null;if(K===`subgraph`&&((t={}).type=`subgraph`,xy(),fy===cy.IDENTIFIER&&(t.id=K,xy())),K===`{`){if(xy(),t||={},t.parent=e,t.node=e.node,t.edge=e.edge,t.graph=e.graph,Sy(t),K!=`}`)throw Dy(`Angle bracket } expected`);xy(),delete t.node,delete t.edge,delete t.graph,delete t.parent,e.subgraphs||=[],e.subgraphs.push(t)}return t}function Ty(e,t){for(;K===`->`||K===`--`;){var n,r=K;xy();var i=wy(e);if(i)n=i;else{if(fy!=cy.IDENTIFIER)throw Dy(`Identifier or subgraph expected`);vy(e,{id:n=K}),xy()}yy(e,by(e,t,n,r,Ey())),t=n}}function Ey(){for(var e,t,n=null,r={dashed:!0,solid:!1,dotted:[1,5]},i={dot:`circle`,box:`box`,crow:`crow`,curve:`curve`,icurve:`inv_curve`,normal:`triangle`,inv:`inv_triangle`,diamond:`diamond`,tee:`bar`,vee:`vee`},a=[],o=[];K===`[`;){for(xy(),n={};K!==``&&K!=`]`;){if(fy!=cy.IDENTIFIER)throw Dy(`Attribute name expected`);var s=K;if(xy(),K!=`=`)throw Dy(`Equal sign = expected`);if(xy(),fy!=cy.IDENTIFIER)throw Dy(`Attribute value expected`);var c=K;s===`style`&&(c=r[c]),s===`arrowhead`&&(s=`arrows`,c={to:{enabled:!0,type:i[c]}}),s===`arrowtail`&&(s=`arrows`,c={from:{enabled:!0,type:i[c]}}),a.push({attr:n,name:s,value:c}),o.push(s),xy(),K==`,`&&xy()}if(K!=`]`)throw Dy(`Bracket ] expected`);xy()}if(qm(o).call(o,`dir`)){var l={arrows:{}};for(e=0;e<a.length;e++)if(a[e].name===`arrows`)if(a[e].value.to!=null)l.arrows.to=e;else{if(a[e].value.from==null)throw Dy(`Invalid value of arrows`);l.arrows.from=e}else a[e].name===`dir`&&(l.dir=e);var u,d,f=a[l.dir].value;if(!qm(o).call(o,`arrows`))if(f===`both`)a.push({attr:a[l.dir].attr,name:`arrows`,value:{to:{enabled:!0}}}),l.arrows.to=a.length-1,a.push({attr:a[l.dir].attr,name:`arrows`,value:{from:{enabled:!0}}}),l.arrows.from=a.length-1;else if(f===`forward`)a.push({attr:a[l.dir].attr,name:`arrows`,value:{to:{enabled:!0}}}),l.arrows.to=a.length-1;else if(f===`back`)a.push({attr:a[l.dir].attr,name:`arrows`,value:{from:{enabled:!0}}}),l.arrows.from=a.length-1;else{if(f!==`none`)throw Dy(`Invalid dir type "`+f+`"`);a.push({attr:a[l.dir].attr,name:`arrows`,value:``}),l.arrows.to=a.length-1}if(f===`both`)l.arrows.to&&l.arrows.from?(d=a[l.arrows.to].value.to.type,u=a[l.arrows.from].value.from.type,a[l.arrows.to]={attr:a[l.arrows.to].attr,name:a[l.arrows.to].name,value:{to:{enabled:!0,type:d},from:{enabled:!0,type:u}}},Em(a).call(a,l.arrows.from,1)):l.arrows.to?(d=a[l.arrows.to].value.to.type,u=`arrow`,a[l.arrows.to]={attr:a[l.arrows.to].attr,name:a[l.arrows.to].name,value:{to:{enabled:!0,type:d},from:{enabled:!0,type:u}}}):l.arrows.from&&(d=`arrow`,u=a[l.arrows.from].value.from.type,a[l.arrows.from]={attr:a[l.arrows.from].attr,name:a[l.arrows.from].name,value:{to:{enabled:!0,type:d},from:{enabled:!0,type:u}}});else if(f===`back`)l.arrows.to&&l.arrows.from?(d=``,u=a[l.arrows.from].value.from.type,a[l.arrows.from]={attr:a[l.arrows.from].attr,name:a[l.arrows.from].name,value:{to:{enabled:!0,type:d},from:{enabled:!0,type:u}}}):l.arrows.to?(d=``,u=`arrow`,l.arrows.from=l.arrows.to,a[l.arrows.from]={attr:a[l.arrows.from].attr,name:a[l.arrows.from].name,value:{to:{enabled:!0,type:d},from:{enabled:!0,type:u}}}):l.arrows.from&&(d=``,u=a[l.arrows.from].value.from.type,a[l.arrows.to]={attr:a[l.arrows.from].attr,name:a[l.arrows.from].name,value:{to:{enabled:!0,type:d},from:{enabled:!0,type:u}}}),a[l.arrows.from]={attr:a[l.arrows.from].attr,name:a[l.arrows.from].name,value:{from:{enabled:!0,type:a[l.arrows.from].value.from.type}}};else if(f===`none`){var p;a[p=l.arrows.to?l.arrows.to:l.arrows.from]={attr:a[p].attr,name:a[p].name,value:``}}else{if(f!==`forward`)throw Dy(`Invalid dir type "`+f+`"`);l.arrows.to&&l.arrows.from||l.arrows.to?(d=a[l.arrows.to].value.to.type,u=``,a[l.arrows.to]={attr:a[l.arrows.to].attr,name:a[l.arrows.to].name,value:{to:{enabled:!0,type:d},from:{enabled:!0,type:u}}}):l.arrows.from&&(d=`arrow`,u=``,l.arrows.to=l.arrows.from,a[l.arrows.to]={attr:a[l.arrows.to].attr,name:a[l.arrows.to].name,value:{to:{enabled:!0,type:d},from:{enabled:!0,type:u}}}),a[l.arrows.to]={attr:a[l.arrows.to].attr,name:a[l.arrows.to].name,value:{to:{enabled:!0,type:a[l.arrows.to].value.to.type}}}}Em(a).call(a,l.dir,1)}if(qm(o).call(o,`penwidth`)){var m=[];for(t=a.length,e=0;e<t;e++)a[e].name!==`width`&&(a[e].name===`penwidth`&&(a[e].name=`width`),m.push(a[e]));a=m}for(t=a.length,e=0;e<t;e++)_y(a[e].attr,a[e].name,a[e].value);return n}function Dy(e){return SyntaxError(e+`, got "`+Oy(K,30)+`" (char `+dy+`)`)}function Oy(e,t){return e.length<=t?e:e.substr(0,27)+`...`}function ky(e,t,n){for(var r=t.split(`.`),i=r.pop(),a=e,o=0;o<r.length;o++){var s=r[o];s in a||(a[s]={}),a=a[s]}return a[i]=n,e}function Ay(e,t){var n={};for(var r in e)if(e.hasOwnProperty(r)){var i=t[r];Tp(i)?Xp(i).call(i,(function(t){ky(n,t,e[r])})):ky(n,typeof i==`string`?i:r,e[r])}return n}function jy(e){var t,n=ay(e),r={nodes:[],edges:[],options:{}};if(n.nodes&&Xp(t=n.nodes).call(t,(function(e){var t={id:e.id,label:String(e.label||e.id)};gy(t,Ay(e.attr,oy)),t.image&&(t.shape=`image`),r.nodes.push(t)})),n.edges){var i,a=function(e){var t={from:e.from,to:e.to};return gy(t,Ay(e.attr,sy)),t.arrows==null&&e.type===`->`&&(t.arrows=`to`),t};Xp(i=n.edges).call(i,(function(e){var t,n,i,o,s,c,l;(t=e.from instanceof Object?e.from.nodes:{id:e.from},n=e.to instanceof Object?e.to.nodes:{id:e.to},e.from instanceof Object&&e.from.edges)&&Xp(i=e.from.edges).call(i,(function(e){var t=a(e);r.edges.push(t)})),(s=n,c=function(t,n){var i=a(by(r,t.id,n.id,e.type,e.attr));r.edges.push(i)},Tp(o=t)?Xp(o).call(o,(function(e){Tp(s)?Xp(s).call(s,(function(t){c(e,t)})):c(e,s)})):Tp(s)?Xp(s).call(s,(function(e){c(o,e)})):c(o,s),e.to instanceof Object&&e.to.edges)&&Xp(l=e.to.edges).call(l,(function(e){var t=a(e);r.edges.push(t)}))}))}return n.attr&&(r.options=n.attr),r}var My=Object.freeze({__proto__:null,DOTToGraph:jy,parseDOT:ay});function Ny(e,t){var n,r={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};t!=null&&(t.fixed!=null&&(r.nodes.fixed=t.fixed),t.parseColor!=null&&(r.nodes.parseColor=t.parseColor),t.inheritColor!=null&&(r.edges.inheritColor=t.inheritColor));var i=e.edges,a=jp(i).call(i,(function(e){var t={from:e.source,id:e.id,to:e.target};return e.attributes!=null&&(t.attributes=e.attributes),e.label!=null&&(t.label=e.label),e.attributes!=null&&e.attributes.title!=null&&(t.title=e.attributes.title),e.type===`Directed`&&(t.arrows=`to`),e.color&&!1===r.edges.inheritColor&&(t.color=e.color),t}));return{nodes:jp(n=e.nodes).call(n,(function(e){var t={id:e.id,fixed:r.nodes.fixed&&e.x!=null&&e.y!=null};return e.attributes!=null&&(t.attributes=e.attributes),e.label!=null&&(t.label=e.label),e.size!=null&&(t.size=e.size),e.attributes!=null&&e.attributes.title!=null&&(t.title=e.attributes.title),e.title!=null&&(t.title=e.title),e.x!=null&&(t.x=e.x),e.y!=null&&(t.y=e.y),e.color!=null&&(!0===r.nodes.parseColor?t.color=e.color:t.color={background:e.color,border:e.color,highlight:{background:e.color,border:e.color},hover:{background:e.color,border:e.color}}),t})),edges:a}}var Py=Object.freeze({__proto__:null,parseGephi:Ny}),Fy=Object.freeze({__proto__:null,cn:{addDescription:`单击空白处放置新节点。`,addEdge:`添加连接线`,addNode:`添加节点`,back:`返回`,close:`關閉`,createEdgeError:`无法将连接线连接到群集。`,del:`删除选定`,deleteClusterError:`无法删除群集。`,edgeDescription:`单击某个节点并将该连接线拖动到另一个节点以连接它们。`,edit:`编辑`,editClusterError:`无法编辑群集。`,editEdge:`编辑连接线`,editEdgeDescription:`单击控制节点并将它们拖到节点上连接。`,editNode:`编辑节点`},cs:{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`},de:{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`},en:{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`},es:{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`},fr:{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`},it:{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`},nl:{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`},pt:{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ó`},ru:{addDescription:`Кликните в свободное место, чтобы добавить новый узел.`,addEdge:`Добавить ребро`,addNode:`Добавить узел`,back:`Назад`,close:`Закрывать`,createEdgeError:`Невозможно соединить ребра в кластер.`,del:`Удалить выбранное`,deleteClusterError:`Кластеры не могут быть удалены`,edgeDescription:`Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.`,edit:`Редактировать`,editClusterError:`Кластеры недоступны для редактирования.`,editEdge:`Редактировать ребро`,editEdgeDescription:`Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.`,editNode:`Редактировать узел`},uk:{addDescription:`Kлікніть на вільне місце, щоб додати новий вузол.`,addEdge:`Додати край`,addNode:`Додати вузол`,back:`Назад`,close:`Закрити`,createEdgeError:`Не можливо об'єднати краї в групу.`,del:`Видалити обране`,deleteClusterError:`Групи не можуть бути видалені.`,edgeDescription:`Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.`,edit:`Редагувати`,editClusterError:`Групи недоступні для редагування.`,editEdge:`Редагувати край`,editEdgeDescription:`Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.`,editNode:`Редагувати вузол`}}),Iy=function(){function e(){H(this,e),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement(`canvas`)}return U(e,[{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),r=Math.floor(t/4),i=Math.floor(t/8),a=Math.floor(t/16),o=Math.floor(e/2),s=Math.floor(e/4),c=Math.floor(e/8),l=Math.floor(e/16);this.canvas.width=3*s,this.canvas.height=n,this.coordinates=[[0,0,o,n],[o,0,s,r],[o,r,c,i],[5*c,r,l,a]],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 r=this.coordinates[n-1],i=this.coordinates[n];e.drawImage(this.canvas,r[0],r[1],r[2],r[3],i[0],i[1],i[2],i[3])}}},{key:`drawImageAtPosition`,value:function(e,t,n,r,i,a){if(this.initialized())if(t>2){t*=.5;for(var o=0;t>2&&o<this.NUM_ITERATIONS;)t*=.5,o+=1;o>=this.NUM_ITERATIONS&&(o=this.NUM_ITERATIONS-1);var s=this.coordinates[o];e.drawImage(this.canvas,s[0],s[1],s[2],s[3],n,r,i,a)}else e.drawImage(this.image,n,r,i,a)}}]),e}(),Ly=function(){function e(t){H(this,e),this.images={},this.imageBroken={},this.callback=t}return U(e,[{key:`_tryloadBrokenUrl`,value:function(e,t,n){e!==void 0&&n!==void 0&&(t===void 0?console.warn(`No broken url image defined`):(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,r=this.images[e];if(r)return r;var i=new Iy;return this.images[e]=i,i.image.onload=function(){n._fixImageCoordinates(i.image),i.init(),n._redrawWithImage(i)},i.image.onerror=function(){console.error(`Could not load image:`,e),n._tryloadBrokenUrl(e,t,i)},i.image.src=e,i}},{key:`_fixImageCoordinates`,value:function(e){e.width===0&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}]),e}(),Ry={exports:{}},zy=o((function(){if(typeof ArrayBuffer==`function`){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,`a`,{value:8})}})),By=o,Vy=M,Hy=x,Uy=zy,Wy=Object.isExtensible,Gy=By((function(){Wy(1)}))||Uy?function(e){return!!Vy(e)&&(!Uy||Hy(e)!==`ArrayBuffer`)&&(!Wy||Wy(e))}:Wy,Ky=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),qy=R,Jy=_,Yy=or,Xy=M,Zy=mt,Qy=mn.f,$y=il,eb=sl,tb=Gy,nb=Ky,rb=!1,ib=yt(`meta`),ab=0,ob=function(e){Qy(e,ib,{value:{objectID:`O`+ ab++,weakData:{}}})},sb=Ry.exports={enable:function(){sb.enable=function(){},rb=!0;var e=$y.f,t=Jy([].splice),n={};n[ib]=1,e(n).length&&($y.f=function(n){for(var r=e(n),i=0,a=r.length;i<a;i++)if(r[i]===ib){t(r,i,1);break}return r},qy({target:`Object`,stat:!0,forced:!0},{getOwnPropertyNames:eb.f}))},fastKey:function(e,t){if(!Xy(e))return typeof e==`symbol`?e:(typeof e==`string`?`S`:`P`)+e;if(!Zy(e,ib)){if(!tb(e))return`F`;if(!t)return`E`;ob(e)}return e[ib].objectID},getWeakData:function(e,t){if(!Zy(e,ib)){if(!tb(e))return!0;if(!t)return!1;ob(e)}return e[ib].weakData},onFreeze:function(e){return nb&&rb&&tb(e)&&!Zy(e,ib)&&ob(e),e}};Yy[ib]=!0;var cb=Ry.exports,lb=pn,ub=re,db=yn,fb=We,pb=ts,mb=tr,hb=F,gb=Is,_b=ks,vb=Yo,yb=TypeError,bb=function(e,t){this.stopped=e,this.result=t},xb=bb.prototype,Sb=function(e,t,n){var r,i,a,o,s,c,l,u=n&&n.that,d=!(!n||!n.AS_ENTRIES),f=!(!n||!n.IS_RECORD),p=!(!n||!n.IS_ITERATOR),m=!(!n||!n.INTERRUPTED),h=lb(t,u),g=function(e){return r&&vb(r,`normal`,e),new bb(!0,e)},_=function(e){return d?(db(e),m?h(e[0],e[1],g):h(e[0],e[1])):m?h(e,g):h(e)};if(f)r=e.iterator;else if(p)r=e;else{if(!(i=_b(e)))throw new yb(fb(e)+` is not iterable`);if(pb(i)){for(a=0,o=mb(e);o>a;a++)if((s=_(e[a]))&&hb(xb,s))return s;return new bb(!1)}r=gb(e,i)}for(c=f?e.next:r.next;!(l=ub(c,r)).done;){try{s=_(l.value)}catch(e){vb(r,`throw`,e)}if(typeof s==`object`&&s&&hb(xb,s))return s}return new bb(!1)},Cb=F,wb=TypeError,Tb=function(e,t){if(Cb(t,e))return e;throw new wb(`Incorrect invocation`)},Eb=R,Db=a,Ob=cb,kb=o,Ab=Nn,jb=Sb,Mb=Tb,Nb=T,Pb=M,Fb=pe,Ib=no,Lb=mn.f,Rb=zl.forEach,zb=D,Bb=Yi.set,Vb=Yi.getterFor,Hb=function(e,t,n){var r,i=e.indexOf(`Map`)!==-1,a=e.indexOf(`Weak`)!==-1,o=i?`set`:`add`,s=Db[e],c=s&&s.prototype,l={};if(zb&&Nb(s)&&(a||c.forEach&&!kb((function(){new s().entries().next()})))){var u=(r=t((function(t,n){Bb(Mb(t,u),{type:e,collection:new s}),Fb(n)||jb(n,t[o],{that:t,AS_ENTRIES:i})}))).prototype,d=Vb(e);Rb([`add`,`clear`,`delete`,`forEach`,`get`,`has`,`set`,`keys`,`values`,`entries`],(function(e){var t=e===`add`||e===`set`;!(e in c)||a&&e===`clear`||Ab(u,e,(function(n,r){var i=d(this).collection;if(!t&&a&&!Pb(n))return e===`get`&&void 0;var o=i[e](n===0?0:n,r);return t?this:o}))})),a||Lb(u,`size`,{configurable:!0,get:function(){return d(this).collection.size}})}else r=n.getConstructor(t,e,i,o),Ob.enable();return Ib(r,e,!1,!0),l[e]=r,Eb({global:!0,forced:!0},l),a||n.setStrong(r,e,i),r},Ub=Ra,Wb=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:Ub(e,r,t[r],n);return e},Gb=Te,Kb=bl,qb=D,Jb=Ot(`species`),Yb=Da,Xb=bl,Zb=Wb,Qb=pn,$b=Tb,ex=pe,tx=Sb,nx=Io,rx=Lo,ix=function(e){var t=Gb(e);qb&&t&&!t[Jb]&&Kb(t,Jb,{configurable:!0,get:function(){return this}})},ax=D,ox=cb.fastKey,sx=Yi.set,cx=Yi.getterFor,lx={getConstructor:function(e,t,n,r){var i=e((function(e,i){$b(e,a),sx(e,{type:t,index:Yb(null),first:void 0,last:void 0,size:0}),ax||(e.size=0),ex(i)||tx(i,e[r],{that:e,AS_ENTRIES:n})})),a=i.prototype,o=cx(t),s=function(e,t,n){var r,i,a=o(e),s=c(e,t);return s?s.value=n:(a.last=s={index:i=ox(t,!0),key:t,value:n,previous:r=a.last,next:void 0,removed:!1},a.first||=s,r&&(r.next=s),ax?a.size++:e.size++,i!==`F`&&(a.index[i]=s)),e},c=function(e,t){var n,r=o(e),i=ox(t);if(i!==`F`)return r.index[i];for(n=r.first;n;n=n.next)if(n.key===t)return n};return Zb(a,{clear:function(){for(var e=o(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&=n.previous.next=void 0,delete t[n.index],n=n.next;e.first=e.last=void 0,ax?e.size=0:this.size=0},delete:function(e){var t=this,n=o(t),r=c(t,e);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first===r&&(n.first=i),n.last===r&&(n.last=a),ax?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=o(this),r=Qb(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!c(this,e)}}),Zb(a,n?{get:function(e){var t=c(this,e);return t&&t.value},set:function(e,t){return s(this,e===0?0:e,t)}}:{add:function(e){return s(this,e=e===0?0:e,e)}}),ax&&Xb(a,`size`,{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(e,t,n){var r=t+` Iterator`,i=cx(t),a=cx(r);nx(e,t,(function(e,t){sx(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?rx(t===`keys`?n.key:t===`values`?n.value:[n.key,n.value],!1):(e.target=void 0,rx(void 0,!0))}),n?`entries`:`values`,!n,!0),ix(t)}};Hb(`Map`,(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),lx);var ux=r(N.Map),dx=function(){function e(){H(this,e),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},jr(this.options,this.defaultOptions)}return U(e,[{key:`setOptions`,value:function(e){var t=[`useDefaultGroups`];if(e!==void 0){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ih(t).call(t,n)===-1){var r=e[n];this.add(n,r)}}}},{key:`clear`,value:function(){this._groups=new ux,this._groupNames=[]}},{key:`get`,value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=this._groups.get(e);if(n===void 0&&t)if(!1===this.options.useDefaultGroups&&this._groupNames.length>0){var r=this._groupIndex%this._groupNames.length;++this._groupIndex,(n={}).color=this._groups.get(this._groupNames[r]),this._groups.set(e,n)}else{var i=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,(n={}).color=this._defaultGroups[i],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}}]),e}();R({target:`Number`,stat:!0},{isNaN:function(e){return e!=e}});var fx=r(N.Number.isNaN),px=a.isFinite;R({target:`Number`,stat:!0},{isFinite:Number.isFinite||function(e){return typeof e==`number`&&px(e)}});var mx=r(N.Number.isFinite),hx=zl.some;R({target:`Array`,proto:!0,forced:!Bp(`some`)},{some:function(e){return hx(this,e,arguments.length>1?arguments[1]:void 0)}});var gx=Kr(`Array`).some,_x=F,vx=gx,yx=Array.prototype,bx=r(function(e){var t=e.some;return e===yx||_x(yx,e)&&t===yx.some?vx:t}),xx=r(N.Object.getOwnPropertySymbols),Sx={exports:{}},Cx=R,wx=o,Tx=ye,Ex=E.f,Dx=D;Cx({target:`Object`,stat:!0,forced:!Dx||wx((function(){Ex(1)})),sham:!Dx},{getOwnPropertyDescriptor:function(e,t){return Ex(Tx(e),t)}});var Ox=N.Object,kx=Sx.exports=function(e,t){return Ox.getOwnPropertyDescriptor(e,t)};Ox.getOwnPropertyDescriptor.sham&&(kx.sham=!0);var Ax=Sx.exports,jx=r(Ax),Mx=wp,Nx=ye,Px=E,Fx=Cs;R({target:`Object`,stat:!0,sham:!D},{getOwnPropertyDescriptors:function(e){for(var t,n,r=Nx(e),i=Px.f,a=Mx(r),o={},s=0;a.length>s;)(n=i(r,t=a[s++]))!==void 0&&Fx(o,t,n);return o}});var Ix=r(N.Object.getOwnPropertyDescriptors),Lx={exports:{}},Rx=R,zx=D,Bx=na.f;Rx({target:`Object`,stat:!0,forced:Object.defineProperties!==Bx,sham:!zx},{defineProperties:Bx});var Vx=N.Object,Hx=Lx.exports=function(e,t){return Vx.defineProperties(e,t)};Vx.defineProperties.sham&&(Hx.sham=!0);var Ux=r(Lx.exports),Wx=r(Dc);function Gx(e,t,n){return(t=Cf(t))in e?Oc(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Kx=a,qx=o,Jx=bi,Yx=ph.trim,Xx=ah,Zx=_(``.charAt),Qx=Kx.parseFloat,$x=Kx.Symbol,eS=$x&&$x.iterator,tS=1/Qx(Xx+`-0`)!=-1/0||eS&&!qx((function(){Qx(Object(eS))}))?function(e){var t=Yx(Jx(e)),n=Qx(t);return n===0&&Zx(t,0)===`-`?-0:n}:Qx;R({global:!0,forced:parseFloat!==tS},{parseFloat:tS});var nS=r(N.parseFloat),rS=R,iS=o,aS=sl.f;rS({target:`Object`,stat:!0,forced:iS((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:aS});var oS=N.Object,sS=r(function(e){return oS.getOwnPropertyNames(e)});function cS(e,t){var n=[`node`,`edge`,`label`],r=!0,i=Uv(t,`chosen`);if(typeof i==`boolean`)r=i;else if(xf(i)===`object`){if(Ih(n).call(n,e)===-1)throw Error(`choosify: subOption '`+e+`' should be one of '`+n.join(`', '`)+`'`);var a=Uv(t,[`chosen`,e]);typeof a!=`boolean`&&typeof a!=`function`||(r=a)}return r}function lS(e,t,n){if(e.width<=0||e.height<=0)return!1;if(n!==void 0){var r={x:t.x-n.x,y:t.y-n.y};if(n.angle!==0){var i=-n.angle;t={x:Math.cos(i)*r.x-Math.sin(i)*r.y,y:Math.sin(i)*r.x+Math.cos(i)*r.y}}else t=r}var a=e.x+e.width,o=e.y+e.width;return e.left<t.x&&a>t.x&&e.top<t.y&&o>t.y}function uS(e){return typeof e==`string`&&e!==``}function dS(e,t,n,r){var i=r.x,a=r.y;if(typeof r.distanceToBorder==`function`){var o=r.distanceToBorder(e,t),s=Math.sin(t)*o,c=Math.cos(t)*o;c===o?(i+=o,a=r.y):s===o?(i=r.x,a-=o):(i+=c,a-=s)}else r.shape.width>r.shape.height?(i=r.x+.5*r.shape.width,a=r.y-n):(i=r.x+n,a=r.y-.5*r.shape.height);return{x:i,y:a}}var fS=Kr(`Array`).values,pS=_i,mS=mt,hS=F,gS=fS,_S=Array.prototype,vS={DOMTokenList:!0,NodeList:!0},yS=r(function(e){var t=e.values;return e===_S||hS(_S,e)&&t===_S.values||mS(vS,pS(e))?gS:t}),bS=function(){function e(t){H(this,e),this.measureText=t,this.current=0,this.width=0,this.height=0,this.lines=[]}return U(e,[{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 r=t;t!==void 0&&t!==``||(r=` `);var i=this.measureText(r,n),a=jr({},yS(i));a.text=t,a.width=i.width,a.mod=n,t!==void 0&&t!==``||(a.width=0),this.lines[e].blocks.push(a),this.lines[e].width+=a.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 r=0;r<t.blocks.length;r++){var i=t.blocks[r];n<i.height&&(n=i.height)}t.height=n}}},{key:`determineLabelSize`,value:function(){for(var e=0,t=0,n=0;n<this.lines.length;n++){var r=this.lines[n];r.width>e&&(e=r.width),t+=r.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 r={};jr(r,n),r.blocks=[];for(var i=void 0,a=[],o=0;o<n.blocks.length;o++){var s=n.blocks[o];s.width===0?i===void 0&&(i=s):a.push(s)}a.length===0&&i!==void 0&&a.push(i),r.blocks=a,e.push(r)}}return e}},{key:`finalize`,value:function(){this.determineLineHeights(),this.determineLabelSize();var e=this.removeEmptyBlocks();return{width:this.width,height:this.height,lines:e}}}]),e}(),xS={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/},SS=function(){function e(t){H(this,e),this.text=t,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer=``,this.modStack=[],this.blocks=[]}return U(e,[{key:`mod`,value:function(){return this.modStack.length===0?`normal`:this.modStack[0]}},{key:`modName`,value:function(){return this.modStack.length===0?`normal`:this.modStack[0]===`mono`?`mono`:this.bold&&this.ital?`boldital`:this.bold?`bold`:this.ital?`ital`:void 0}},{key:`emitBlock`,value:function(){this.spacing&&=(this.add(` `),!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+=` `,!1),e!=` `&&(this.buffer+=e)}},{key:`parseWS`,value:function(e){return!!/[ \t]/.test(e)&&(this.mono?this.add(e):this.spacing=!0,!0)}},{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)}},{key:`match`,value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=up(this.prepareRegExp(e),2),r=n[0],i=n[1],a=r.test(this.text.substr(this.position,i));return a&&t&&(this.position+=i-1),a}},{key:`parseEndTag`,value:function(e,t,n){var r=this.mod()===e;return!(!(r=e===`mono`?r&&this.mono:r&&!this.mono)||!this.match(t))&&((n===void 0||this.position===this.text.length-1||this.match(n,!1))&&this.unsetTag(e),!0)}},{key:`replace`,value:function(e,t){return!!this.match(e)&&(this.add(t),this.position+=length-1,!0)}},{key:`prepareRegExp`,value:function(e){var t,n;if(e instanceof RegExp)n=e,t=1;else{var r=xS[e];n=r===void 0?new RegExp(e):r,t=e.length}return[n,t]}}]),e}(),CS=function(){function e(t,n,r,i){var a=this;H(this,e),this.ctx=t,this.parent=n,this.selected=r,this.hover=i,this.lines=new bS((function(e,n){if(e===void 0)return 0;var o=a.parent.getFormattingValues(t,r,i,n),s=0;return e!==``&&(s=a.ctx.measureText(e).width),{width:s,values:o}}))}return U(e,[{key:`process`,value:function(e){if(!uS(e))return this.lines.finalize();var t=this.parent.fontOptions;e=(e=e.replace(/\r\n/g,`
|
|
33
|
+
`)).replace(/\r/g,`
|
|
34
|
+
`);var n=String(e).split(`
|
|
35
|
+
`),r=n.length;if(t.multi)for(var i=0;i<r;i++){var a=this.splitBlocks(n[i],t.multi);if(a!==void 0)if(a.length!==0){if(t.maxWdt>0)for(var o=0;o<a.length;o++){var s=a[o].mod,c=a[o].text;this.splitStringIntoLines(c,s,!0)}else for(var l=0;l<a.length;l++){var u=a[l].mod,d=a[l].text;this.lines.append(d,u)}this.lines.newLine()}else this.lines.newLine(``)}else if(t.maxWdt>0)for(var f=0;f<r;f++)this.splitStringIntoLines(n[f]);else for(var p=0;p<r;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`:!0!==e&&e!==`html`||(t=`html`),t}},{key:`splitHtmlBlocks`,value:function(e){for(var t=new SS(e),n=function(e){return!!/&/.test(e)&&(t.replace(t.text,`<`,`<`)||t.replace(t.text,`&`,`&`)||t.add(`&`),!0)};t.position<t.text.length;){var r=t.text.charAt(t.position);t.parseWS(r)||/</.test(r)&&(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(r)||t.add(r),t.position++}return t.emitBlock(),t.blocks}},{key:`splitMarkdownBlocks`,value:function(e){for(var t=this,n=new SS(e),r=!0,i=function(e){return!!/\\/.test(e)&&(n.position<t.text.length+1&&(n.position++,e=t.text.charAt(n.position),/ \t/.test(e)?n.spacing=!0:(n.add(e),r=!1)),!0)};n.position<n.text.length;){var a=n.text.charAt(n.position);n.parseWS(a)||i(a)||(r||n.spacing)&&(n.parseStartTag(`bold`,`*`)||n.parseStartTag(`ital`,`_`)||n.parseStartTag(`mono`,"`"))||n.parseEndTag(`bold`,`*`,`afterBold`)||n.parseEndTag(`ital`,`_`,`afterItal`)||n.parseEndTag(`mono`,"`",`afterMono`)||(n.add(a),r=!1),n.position++}return n.emitBlock(),n.blocks}},{key:`splitBlocks`,value:function(e,t){var n=this.decodeMarkupSystem(t);return n===`none`?[{text:e,mod:`normal`}]:n===`markdown`?this.splitMarkdownBlocks(e):n===`html`?this.splitHtmlBlocks(e):void 0}},{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 r=t+(t===``?``:` `)+e[n];if(this.overMaxWidth(r))break;t=r,n++}return n}},{key:`getLongestFitWord`,value:function(e){for(var t=0;t<e.length&&!this.overMaxWidth(vp(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];this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t);for(var r=(e=(e=e.replace(/^( +)/g,`$1\r`)).replace(/([^\r][^ ]*)( +)/g,`$1\r$2\r`)).split(`\r`);r.length>0;){var i=this.getLongestFit(r);if(i===0){var a=r[0],o=this.getLongestFitWord(a);this.lines.newLine(vp(a).call(a,0,o),t),r[0]=vp(a).call(a,o)}else{var s=i;r[i-1]===` `?i--:r[s]===` `&&s++;var c=vp(r).call(r,0,i).join(``);i==r.length&&n?this.lines.append(c,t):this.lines.newLine(c,t),r=vp(r).call(r,s)}}}}]),e}(),wS=[`bold`,`ital`,`boldital`,`mono`],TS=function(){function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0&&arguments[2];H(this,e),this.body=t,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(n),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=r}return U(e,[{key:`setOptions`,value:function(e){if(this.elementOptions=e,this.initFontOptions(e.font),uS(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(xf(e.font)===`object`){var t=e.font.size;t!==void 0&&(this.baseSize=t)}}}},{key:`initFontOptions`,value:function(t){var n=this;W(wS,(function(e){n.fontOptions[e]={}})),e.parseFontString(this.fontOptions,t)?this.fontOptions.vadjust=0:W(t,(function(e,t){e!=null&&xf(e)!==`object`&&(n.fontOptions[t]=e)}))}},{key:`constrain`,value:function(e){var t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:`middle`},n=Uv(e,`widthConstraint`);if(typeof n==`number`)t.maxWdt=Number(n),t.minWdt=Number(n);else if(xf(n)===`object`){var r=Uv(e,[`widthConstraint`,`maximum`]);typeof r==`number`&&(t.maxWdt=Number(r));var i=Uv(e,[`widthConstraint`,`minimum`]);typeof i==`number`&&(t.minWdt=Number(i))}var a=Uv(e,`heightConstraint`);if(typeof a==`number`)t.minHgt=Number(a);else if(xf(a)===`object`){var o=Uv(e,[`heightConstraint`,`minimum`]);typeof o==`number`&&(t.minHgt=Number(o));var s=Uv(e,[`heightConstraint`,`valign`]);typeof s==`string`&&(s!==`top`&&s!==`bottom`||(t.valign=s))}return t}},{key:`update`,value:function(e,t){this.setOptions(e,!0),this.propagateFonts(t),Ov(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=cS(`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(t){for(var n={},r=0;r<t.length;++r){var i=t[r],a={};e.parseFontString(a,i)&&(i=a),W(i,(function(e,t){e!==void 0&&(Object.prototype.hasOwnProperty.call(n,t)||(Ih(wS).call(wS,t)===-1?n[t]=e:n[t]={}))}))}return n}},{key:`getFontOption`,value:function(t,n,r){for(var i,a=0;a<t.length;++a){var o=t[a];if(Object.prototype.hasOwnProperty.call(o,n)){if((i=o[n])==null)continue;var s={};if(e.parseFontString(s,i)&&(i=s),Object.prototype.hasOwnProperty.call(i,r))return i[r]}}if(Object.prototype.hasOwnProperty.call(this.fontOptions,r))return this.fontOptions[r];throw Error(`Did not find value for multi-font for property: '`+r+`'`)}},{key:`getFontOptions`,value:function(e,t){for(var n={},r=[`color`,`size`,`face`,`mod`,`vadjust`],i=0;i<r.length;++i){var a=r[i];n[a]=this.getFontOption(e,t,a)}return n}},{key:`propagateFonts`,value:function(e){var t=this,n=[];this.addFontOptionsToPile(n,e),this.fontOptions=this.getBasicOptions(n);for(var r=function(){var e=wS[i],r=t.fontOptions[e];W(t.getFontOptions(n,e),(function(e,t){r[t]=e})),r.size=Number(r.size),r.vadjust=Number(r.vadjust)},i=0;i<wS.length;++i)r()}},{key:`draw`,value:function(e,t,n,r,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:`middle`;if(this.elementOptions.label!==void 0){var o=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&o<this.elementOptions.scaling.label.drawThreshold-1||(o>=this.elementOptions.scaling.label.maxVisible&&(o=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,r,i,t,n,a),this._drawBackground(e),this._drawText(e,t,this.size.yLine,a,o))}}},{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 r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`middle`,i=arguments.length>4?arguments[4]:void 0,a=up(this._setAlignment(e,t,n,r),2);t=a[0],n=a[1],e.textAlign=`left`,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 o=0;o<this.lineCount;o++){var s=this.lines[o];if(s&&s.blocks){var c=0;this.isEdgeLabel||this.fontOptions.align===`center`?c+=(this.size.width-s.width)/2:this.fontOptions.align===`right`&&(c+=this.size.width-s.width);for(var l=0;l<s.blocks.length;l++){var u=s.blocks[l];e.font=u.font;var d=up(this._getColor(u.color,i,u.strokeColor),2),f=d[0],p=d[1];u.strokeWidth>0&&(e.lineWidth=u.strokeWidth,e.strokeStyle=p,e.lineJoin=`round`),e.fillStyle=f,u.strokeWidth>0&&e.strokeText(u.text,t+c,n+u.vadjust),e.fillText(u.text,t+c,n+u.vadjust),c+=u.width}n+=s.height}}}},{key:`_setAlignment`,value:function(e,t,n,r){return this.isEdgeLabel&&this.fontOptions.align!==`horizontal`&&!1===this.pointToSelf?(t=0,n=0,this.fontOptions.align===`top`?(e.textBaseline=`alphabetic`,n-=4):this.fontOptions.align===`bottom`?(e.textBaseline=`hanging`,n+=4):e.textBaseline=`middle`):e.textBaseline=r,[t,n]}},{key:`_getColor`,value:function(e,t,n){var r=e||`#000000`,i=n||`#ffffff`;if(t<=this.elementOptions.scaling.label.drawThreshold){var a=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)));r=Mv(r,a),i=Mv(i,a)}return[r,i]}},{key:`getTextSize`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return this._processLabel(e,t,n),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:`getSize`,value:function(){var e=this.size.left,t=this.size.top-1;if(this.isEdgeLabel){var n=.5*-this.size.width;switch(this.fontOptions.align){case`middle`:e=n,t=.5*-this.size.height;break;case`top`:e=n,t=-(this.size.height+2);break;case`bottom`:e=n,t=2}}return{left:e,top:t,width:this.size.width,height:this.size.height}}},{key:`calculateLabelSize`,value:function(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:`middle`;this._processLabel(e,t,n),this.size.left=r-.5*this.size.width,this.size.top=i-.5*this.size.height,this.size.yLine=i+.5*(1-this.lineCount)*this.fontOptions.size,a===`hanging`&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}},{key:`getFormattingValues`,value:function(e,t,n,r){var i=function(e,t,n){return t===`normal`?n===`mod`?``:e[n]:e[t][n]===void 0?e[n]:e[t][n]},a={color:i(this.fontOptions,r,`color`),size:i(this.fontOptions,r,`size`),face:i(this.fontOptions,r,`face`),mod:i(this.fontOptions,r,`mod`),vadjust:i(this.fontOptions,r,`vadjust`),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(t||n)&&(r===`normal`&&!0===this.fontOptions.chooser&&this.elementOptions.labelHighlightBold?a.mod=`bold`:typeof this.fontOptions.chooser==`function`&&this.fontOptions.chooser(a,this.elementOptions.id,t,n));var o=``;return a.mod!==void 0&&a.mod!==``&&(o+=a.mod+` `),o+=a.size+`px `+a.face,e.font=o.replace(/"/g,``),a.font=e.font,a.height=a.size,a}},{key:`differentState`,value:function(e,t){return e!==this.selectedState||t!==this.hoverState}},{key:`_processLabelText`,value:function(e,t,n,r){return new CS(e,this,t,n).process(r)}},{key:`_processLabel`,value:function(e,t,n){if(!1!==this.labelDirty||this.differentState(t,n)){var r=this._processLabelText(e,t,n,this.elementOptions.label);this.fontOptions.minWdt>0&&r.width<this.fontOptions.minWdt&&(r.width=this.fontOptions.minWdt),this.size.labelHeight=r.height,this.fontOptions.minHgt>0&&r.height<this.fontOptions.minHgt&&(r.height=this.fontOptions.minHgt),this.lines=r.lines,this.lineCount=r.lines.length,this.size.width=r.width,this.size.height=r.height,this.selectedState=t,this.hoverState=n,this.labelDirty=!1}}},{key:`visible`,value:function(){return this.size.width!==0&&this.size.height!==0&&this.elementOptions.label!==void 0&&!(this.fontOptions.size*this.body.view.scale<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}}]),e}(),ES=ys,DS=We,OS=TypeError,kS=R,AS=f,jS=Ur,MS=function(e){if(ES(e))return e;throw new OS(DS(e)+` is not a constructor`)},NS=yn,PS=M,FS=Da,IS=o,LS=Te(`Reflect`,`construct`),RS=Object.prototype,zS=[].push,BS=IS((function(){function e(){}return!(LS((function(){}),[],e)instanceof e)})),VS=!IS((function(){LS((function(){}))})),HS=BS||VS;kS({target:`Reflect`,stat:!0,forced:HS,sham:HS},{construct:function(e,t){MS(e),NS(t);var n=arguments.length<3?e:MS(arguments[2]);if(VS&&!BS)return LS(e,t,n);if(e===n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return AS(zS,r,t),new(AS(jS,e,r))}var i=n.prototype,a=FS(PS(i)?i:RS),o=AS(e,a,t);return PS(o)?o:a}});var q=r(N.Reflect.construct),US=r(Rh);R({target:`Object`,stat:!0},{setPrototypeOf:yo});var WS=r(N.Object.setPrototypeOf),GS=r(Zr);function KS(e,t){var n;return KS=WS?GS(n=WS).call(n):function(e,t){return e.__proto__=t,e},KS(e,t)}function qS(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=US(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Oc(e,`prototype`,{writable:!1}),t&&KS(e,t)}function JS(e,t){if(t&&(xf(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(e)}var YS=r(Zm);function J(e){var t;return J=WS?GS(t=YS).call(t):function(e){return e.__proto__||YS(e)},J(e)}var XS=function(){function e(t,n,r){H(this,e),this.body=n,this.labelModule=r,this.setOptions(t),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 U(e,[{key:`setOptions`,value:function(e){this.options=e}},{key:`_setMargins`,value:function(e){this.margin={},this.options.margin&&(xf(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(!1!==t.borderDashes)if(e.setLineDash!==void 0){var n=t.borderDashes;!0===n&&(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){!1!==t.borderDashes&&(e.setLineDash===void 0?(console.warn(`setLineDash is not supported in this browser. The dashed borders cannot be used.`),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1):e.setLineDash([0]))}},{key:`needsRefresh`,value:function(e,t){return!0===this.refreshNeeded?(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),gg(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,r,i){n!==void 0&&this.resize(n,r,i),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,r,i){this._updateBoundingBox(e,t,n,r,i)}},{key:`getDimensionsFromLabel`,value:function(e,t,n){this.textSize=this.labelModule.getTextSize(e,t,n);var r=this.textSize.width,i=this.textSize.height;return r===0&&(r=14,i=14),{width:r,height:i}}}]),e}();function ZS(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var QS=function(e){qS(n,e);var t=ZS(n);function n(e,r,i){var a;return H(this,n),(a=t.call(this,e,r,i))._setMargins(i),a}return U(n,[{key:`resize`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,n)){var r=this.getDimensionsFromLabel(e,t,n);this.width=r.width+this.margin.right+this.margin.left,this.height=r.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}},{key:`draw`,value:function(e,t,n,r,i,a){this.resize(e,r,i),this.left=t-this.width/2,this.top=n-this.height/2,this.initContextForDraw(e,a),$r(e,this.left,this.top,this.width,this.height,a.borderRadius),this.performFill(e,a),this.updateBoundingBox(t,n,e,r,i),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,r,i)}},{key:`updateBoundingBox`,value:function(e,t,n,r,i){this._updateBoundingBox(e,t,n,r,i);var a=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(a)}},{key:`distanceToBorder`,value:function(e,t){e&&this.resize(e);var n=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+n}}]),n}(XS);function $S(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var eC=function(e){qS(n,e);var t=$S(n);function n(e,r,i){var a;return H(this,n),(a=t.call(this,e,r,i)).labelOffset=0,a.selected=!1,a}return U(n,[{key:`setOptions`,value:function(e,t,n){this.options=e,t===void 0&&n===void 0||this.setImages(t,n)}},{key:`setImages`,value:function(e,t){t&&this.selected?(this.imageObj=t,this.imageObjAlt=e):(this.imageObj=e,this.imageObjAlt=t)}},{key:`switchImages`,value:function(e){var t=e&&!this.selected||!e&&this.selected;if(this.selected=e,this.imageObjAlt!==void 0&&t){var n=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=n}}},{key:`_getImagePadding`,value:function(){var e={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){var t=this.options.imagePadding;xf(t)==`object`?(e.top=t.top,e.right=t.right,e.bottom=t.bottom,e.left=t.left):(e.top=t,e.right=t,e.bottom=t,e.left=t)}return e}},{key:`_resizeImage`,value:function(){var e,t;if(!1===this.options.shapeProperties.useImageSize){var n=1,r=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?n=this.imageObj.width/this.imageObj.height:r=this.imageObj.height/this.imageObj.width),e=2*this.options.size*n,t=2*this.options.size*r}else{var i=this._getImagePadding();e=this.imageObj.width+i.left+i.right,t=this.imageObj.height+i.top+i.bottom}this.width=e,this.height=t,this.radius=.5*this.width}},{key:`_drawRawCircle`,value:function(e,t,n,r){this.initContextForDraw(e,r),Qr(e,t,n,r.size),this.performFill(e,r)}},{key:`_drawImageAtPosition`,value:function(e,t){if(this.imageObj.width!=0){e.globalAlpha=t.opacity===void 0?1:t.opacity,this.enableShadow(e,t);var n=1;!0===this.options.shapeProperties.interpolation&&(n=this.imageObj.width/this.width/this.body.view.scale);var r=this._getImagePadding(),i=this.left+r.left,a=this.top+r.top,o=this.width-r.left-r.right,s=this.height-r.top-r.bottom;this.imageObj.drawImageAtPosition(e,n,i,a,o,s),this.disableShadow(e,t)}}},{key:`_drawImageLabel`,value:function(e,t,n,r,i){var a=0;if(this.height!==void 0){a=.5*this.height;var o=this.labelModule.getTextSize(e,r,i);o.lineCount>=1&&(a+=o.height/2)}var s=n+a;this.options.label&&(this.labelOffset=a),this.labelModule.draw(e,t,s,r,i,`hanging`)}}]),n}(XS);function tC(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var nC=function(e){qS(n,e);var t=tC(n);function n(e,r,i){var a;return H(this,n),(a=t.call(this,e,r,i))._setMargins(i),a}return U(n,[{key:`resize`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,n)){var r=this.getDimensionsFromLabel(e,t,n),i=Math.max(r.width+this.margin.right+this.margin.left,r.height+this.margin.top+this.margin.bottom);this.options.size=i/2,this.width=i,this.height=i,this.radius=this.width/2}}},{key:`draw`,value:function(e,t,n,r,i,a){this.resize(e,r,i),this.left=t-this.width/2,this.top=n-this.height/2,this._drawRawCircle(e,t,n,a),this.updateBoundingBox(t,n),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,n,r,i)}},{key:`updateBoundingBox`,value:function(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size}},{key:`distanceToBorder`,value:function(e){return e&&this.resize(e),.5*this.width}}]),n}(eC);function rC(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var iC=function(e){qS(n,e);var t=rC(n);function n(e,r,i,a,o){var s;return H(this,n),(s=t.call(this,e,r,i)).setImages(a,o),s}return U(n,[{key:`resize`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){var r=2*this.options.size;this.width=r,this.height=r,this.radius=.5*this.width;return}this.needsRefresh(t,n)&&this._resizeImage()}},{key:`draw`,value:function(e,t,n,r,i,a){this.switchImages(r),this.resize();var o=t,s=n;this.options.shapeProperties.coordinateOrigin===`top-left`?(this.left=t,this.top=n,o+=this.width/2,s+=this.height/2):(this.left=t-this.width/2,this.top=n-this.height/2),this._drawRawCircle(e,o,s,a),e.save(),e.clip(),this._drawImageAtPosition(e,a),e.restore(),this._drawImageLabel(e,o,s,r,i),this.updateBoundingBox(t,n)}},{key:`updateBoundingBox`,value:function(e,t){this.options.shapeProperties.coordinateOrigin===`top-left`?(this.boundingBox.top=t,this.boundingBox.left=e,this.boundingBox.right=e+2*this.options.size,this.boundingBox.bottom=t+2*this.options.size):(this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}},{key:`distanceToBorder`,value:function(e){return e&&this.resize(e),.5*this.width}}]),n}(eC);function aC(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var oC=function(e){qS(n,e);var t=aC(n);function n(e,r,i){return H(this,n),t.call(this,e,r,i)}return U(n,[{key:`resize`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(t,n)){this.labelModule.getTextSize(e,t,n);var i=2*r.size;this.width=this.customSizeWidth??i,this.height=this.customSizeHeight??i,this.radius=.5*this.width}}},{key:`_drawShape`,value:function(e,t,n,r,i,a,o,s){var c,l=this;return this.resize(e,a,o,s),this.left=r-this.width/2,this.top=i-this.height/2,this.initContextForDraw(e,s),(c=t,Object.prototype.hasOwnProperty.call(ri,c)?ri[c]:function(e){var t=[...arguments].slice(1);CanvasRenderingContext2D.prototype[c].call(e,t)})(e,r,i,s.size),this.performFill(e,s),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(e.font=(a?`bold `:``)+this.height/2+`px `+(this.options.icon.face||`FontAwesome`),e.fillStyle=this.options.icon.color||`black`,e.textAlign=`center`,e.textBaseline=`middle`,e.fillText(this.options.icon.code,r,i)),{drawExternalLabel:function(){if(l.options.label!==void 0){l.labelModule.calculateLabelSize(e,a,o,r,i,`hanging`);var t=i+.5*l.height+.5*l.labelModule.size.height;l.labelModule.draw(e,r,t,a,o,`hanging`)}l.updateBoundingBox(r,i)}}}},{key:`updateBoundingBox`,value:function(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}]),n}(XS);function sC(e,t){var n=Pp(e);if(xx){var r=xx(e);t&&(r=ih(r).call(r,(function(t){return jx(e,t).enumerable}))),n.push.apply(n,r)}return n}function cC(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?Xp(n=sC(Object(i),!0)).call(n,(function(t){Gx(e,t,i[t])})):Ix?Ux(e,Ix(i)):Xp(r=sC(Object(i))).call(r,(function(t){Wx(e,t,jx(i,t))}))}return e}function lC(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var uC=function(e){qS(n,e);var t=lC(n);function n(e,r,i,a){var o;return H(this,n),(o=t.call(this,e,r,i,a)).ctxRenderer=a,o}return U(n,[{key:`draw`,value:function(e,t,n,r,i,a){this.resize(e,r,i,a),this.left=t-this.width/2,this.top=n-this.height/2,e.save();var o=this.ctxRenderer({ctx:e,id:this.options.id,x:t,y:n,state:{selected:r,hover:i},style:cC({},a),label:this.options.label});if(o.drawNode!=null&&o.drawNode(),e.restore(),o.drawExternalLabel){var s=o.drawExternalLabel;o.drawExternalLabel=function(){e.save(),s(),e.restore()}}return o.nodeDimensions&&(this.customSizeWidth=o.nodeDimensions.width,this.customSizeHeight=o.nodeDimensions.height),o}},{key:`distanceToBorder`,value:function(e,t){return this._distanceToBorder(e,t)}}]),n}(oC);function dC(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var fC=function(e){qS(n,e);var t=dC(n);function n(e,r,i){var a;return H(this,n),(a=t.call(this,e,r,i))._setMargins(i),a}return U(n,[{key:`resize`,value:function(e,t,n){if(this.needsRefresh(t,n)){var r=this.getDimensionsFromLabel(e,t,n).width+this.margin.right+this.margin.left;this.width=r,this.height=r,this.radius=this.width/2}}},{key:`draw`,value:function(e,t,n,r,i,a){this.resize(e,r,i),this.left=t-this.width/2,this.top=n-this.height/2,this.initContextForDraw(e,a),ti(e,t-this.width/2,n-this.height/2,this.width,this.height),this.performFill(e,a),this.updateBoundingBox(t,n,e,r,i),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,r,i)}},{key:`distanceToBorder`,value:function(e,t){return this._distanceToBorder(e,t)}}]),n}(XS);function pC(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var mC=function(e){qS(n,e);var t=pC(n);function n(e,r,i){return H(this,n),t.call(this,e,r,i)}return U(n,[{key:`draw`,value:function(e,t,n,r,i,a){return this._drawShape(e,`diamond`,4,t,n,r,i,a)}},{key:`distanceToBorder`,value:function(e,t){return this._distanceToBorder(e,t)}}]),n}(oC);function hC(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var gC=function(e){qS(n,e);var t=hC(n);function n(e,r,i){return H(this,n),t.call(this,e,r,i)}return U(n,[{key:`draw`,value:function(e,t,n,r,i,a){return this._drawShape(e,`circle`,2,t,n,r,i,a)}},{key:`distanceToBorder`,value:function(e){return e&&this.resize(e),this.options.size}}]),n}(oC);function _C(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var vC=function(e){qS(n,e);var t=_C(n);function n(e,r,i){return H(this,n),t.call(this,e,r,i)}return U(n,[{key:`resize`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,n)){var r=this.getDimensionsFromLabel(e,t,n);this.height=2*r.height,this.width=r.width+r.height,this.radius=.5*this.width}}},{key:`draw`,value:function(e,t,n,r,i,a){this.resize(e,r,i),this.left=t-.5*this.width,this.top=n-.5*this.height,this.initContextForDraw(e,a),ei(e,this.left,this.top,this.width,this.height),this.performFill(e,a),this.updateBoundingBox(t,n,e,r,i),this.labelModule.draw(e,t,n,r,i)}},{key:`distanceToBorder`,value:function(e,t){e&&this.resize(e);var n=.5*this.width,r=.5*this.height,i=Math.sin(t)*n,a=Math.cos(t)*r;return n*r/Math.sqrt(i*i+a*a)}}]),n}(XS);function yC(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var bC=function(e){qS(n,e);var t=yC(n);function n(e,r,i){var a;return H(this,n),(a=t.call(this,e,r,i))._setMargins(i),a}return U(n,[{key:`resize`,value:function(e,t,n){this.needsRefresh(t,n)&&(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(e,t,n,r,i,a){var o=this;return this.resize(e,r,i),this.options.icon.size=this.options.icon.size||50,this.left=t-this.width/2,this.top=n-this.height/2,this._icon(e,t,n,r,i,a),{drawExternalLabel:function(){o.options.label!==void 0&&o.labelModule.draw(e,o.left+o.iconSize.width/2+o.margin.left,n+o.height/2+5,r),o.updateBoundingBox(t,n)}}}},{key:`updateBoundingBox`,value:function(e,t){this.boundingBox.top=t-.5*this.options.icon.size,this.boundingBox.left=e-.5*this.options.icon.size,this.boundingBox.right=e+.5*this.options.icon.size,this.boundingBox.bottom=t+.5*this.options.icon.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+5))}},{key:`_icon`,value:function(e,t,n,r,i,a){var o=Number(this.options.icon.size);this.options.icon.code===void 0?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.`):(e.font=[this.options.icon.weight==null?r?`bold`:``:this.options.icon.weight,(this.options.icon.weight!=null&&r?5:0)+o+`px`,this.options.icon.face].join(` `),e.fillStyle=this.options.icon.color||`black`,e.textAlign=`center`,e.textBaseline=`middle`,this.enableShadow(e,a),e.fillText(this.options.icon.code,t,n),this.disableShadow(e,a))}},{key:`distanceToBorder`,value:function(e,t){return this._distanceToBorder(e,t)}}]),n}(XS);function xC(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var SC=function(e){qS(n,e);var t=xC(n);function n(e,r,i,a,o){var s;return H(this,n),(s=t.call(this,e,r,i)).setImages(a,o),s}return U(n,[{key:`resize`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){var r=2*this.options.size;this.width=r,this.height=r;return}this.needsRefresh(t,n)&&this._resizeImage()}},{key:`draw`,value:function(e,t,n,r,i,a){e.save(),this.switchImages(r),this.resize();var o=t,s=n;if(this.options.shapeProperties.coordinateOrigin===`top-left`?(this.left=t,this.top=n,o+=this.width/2,s+=this.height/2):(this.left=t-this.width/2,this.top=n-this.height/2),!0===this.options.shapeProperties.useBorderWithImage){var c=this.options.borderWidth,l=this.options.borderWidthSelected||2*this.options.borderWidth,u=(r?l:c)/this.body.view.scale;e.lineWidth=Math.min(this.width,u),e.beginPath();var d=r?this.options.color.highlight.border:i?this.options.color.hover.border:this.options.color.border,f=r?this.options.color.highlight.background:i?this.options.color.hover.background:this.options.color.background;a.opacity!==void 0&&(d=Mv(d,a.opacity),f=Mv(f,a.opacity)),e.strokeStyle=d,e.fillStyle=f,e.rect(this.left-.5*e.lineWidth,this.top-.5*e.lineWidth,this.width+e.lineWidth,this.height+e.lineWidth),gg(e).call(e),this.performStroke(e,a),e.closePath()}this._drawImageAtPosition(e,a),this._drawImageLabel(e,o,s,r,i),this.updateBoundingBox(t,n),e.restore()}},{key:`updateBoundingBox`,value:function(e,t){this.resize(),this.options.shapeProperties.coordinateOrigin===`top-left`?(this.left=e,this.top=t):(this.left=e-this.width/2,this.top=t-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:`distanceToBorder`,value:function(e,t){return this._distanceToBorder(e,t)}}]),n}(eC);function CC(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var wC=function(e){qS(n,e);var t=CC(n);function n(e,r,i){return H(this,n),t.call(this,e,r,i)}return U(n,[{key:`draw`,value:function(e,t,n,r,i,a){return this._drawShape(e,`square`,2,t,n,r,i,a)}},{key:`distanceToBorder`,value:function(e,t){return this._distanceToBorder(e,t)}}]),n}(oC);function TC(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var EC=function(e){qS(n,e);var t=TC(n);function n(e,r,i){return H(this,n),t.call(this,e,r,i)}return U(n,[{key:`draw`,value:function(e,t,n,r,i,a){return this._drawShape(e,`hexagon`,4,t,n,r,i,a)}},{key:`distanceToBorder`,value:function(e,t){return this._distanceToBorder(e,t)}}]),n}(oC);function DC(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var OC=function(e){qS(n,e);var t=DC(n);function n(e,r,i){return H(this,n),t.call(this,e,r,i)}return U(n,[{key:`draw`,value:function(e,t,n,r,i,a){return this._drawShape(e,`star`,4,t,n,r,i,a)}},{key:`distanceToBorder`,value:function(e,t){return this._distanceToBorder(e,t)}}]),n}(oC);function kC(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var AC=function(e){qS(n,e);var t=kC(n);function n(e,r,i){var a;return H(this,n),(a=t.call(this,e,r,i))._setMargins(i),a}return U(n,[{key:`resize`,value:function(e,t,n){this.needsRefresh(t,n)&&(this.textSize=this.labelModule.getTextSize(e,t,n),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(e,t,n,r,i,a){this.resize(e,r,i),this.left=t-this.width/2,this.top=n-this.height/2,this.enableShadow(e,a),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,r,i),this.disableShadow(e,a),this.updateBoundingBox(t,n,e,r,i)}},{key:`distanceToBorder`,value:function(e,t){return this._distanceToBorder(e,t)}}]),n}(XS);function jC(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var MC=function(e){qS(n,e);var t=jC(n);function n(e,r,i){return H(this,n),t.call(this,e,r,i)}return U(n,[{key:`draw`,value:function(e,t,n,r,i,a){return this._drawShape(e,`triangle`,3,t,n,r,i,a)}},{key:`distanceToBorder`,value:function(e,t){return this._distanceToBorder(e,t)}}]),n}(oC);function NC(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var PC=function(e){qS(n,e);var t=NC(n);function n(e,r,i){return H(this,n),t.call(this,e,r,i)}return U(n,[{key:`draw`,value:function(e,t,n,r,i,a){return this._drawShape(e,`triangleDown`,3,t,n,r,i,a)}},{key:`distanceToBorder`,value:function(e,t){return this._distanceToBorder(e,t)}}]),n}(oC);function FC(e,t){var n=Pp(e);if(xx){var r=xx(e);t&&(r=ih(r).call(r,(function(t){return jx(e,t).enumerable}))),n.push.apply(n,r)}return n}function IC(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?Xp(n=FC(Object(i),!0)).call(n,(function(t){Gx(e,t,i[t])})):Ix?Ux(e,Ix(i)):Xp(r=FC(Object(i))).call(r,(function(t){Wx(e,t,jx(i,t))}))}return e}var LC=function(){function e(t,n,r,i,a,o){H(this,e),this.options=Bv(a),this.globalOptions=a,this.defaultOptions=o,this.body=n,this.edges=[],this.id=void 0,this.imagelist=r,this.grouplist=i,this.x=void 0,this.y=void 0,this.baseSize=this.options.size,this.baseFontSize=this.options.font.size,this.predefinedPosition=!1,this.selected=!1,this.hover=!1,this.labelModule=new TS(this.body,this.options,!1),this.setOptions(t)}return U(e,[{key:`attachEdge`,value:function(e){var t;Ih(t=this.edges).call(t,e)===-1&&this.edges.push(e)}},{key:`detachEdge`,value:function(e){var t,n,r=Ih(t=this.edges).call(t,e);r!=-1&&Em(n=this.edges).call(n,r,1)}},{key:`setOptions`,value:function(t){var n=this.options.shape;if(t){if(t.color!==void 0&&(this._localColor=t.color),t.id!==void 0&&(this.id=t.id),this.id===void 0)throw Error(`Node must have an id`);return e.checkMass(t,this.id),t.x!==void 0&&(t.x===null?(this.x=void 0,this.predefinedPosition=!1):(this.x=Eh(t.x),this.predefinedPosition=!0)),t.y!==void 0&&(t.y===null?(this.y=void 0,this.predefinedPosition=!1):(this.y=Eh(t.y),this.predefinedPosition=!0)),t.size!==void 0&&(this.baseSize=t.size),t.value!==void 0&&(t.value=nS(t.value)),e.parseOptions(this.options,t,!0,this.globalOptions,this.grouplist),this.chooser=cS(`node`,[t,this.options,this.defaultOptions]),this._load_images(),this.updateLabelModule(t),t.opacity!==void 0&&e.checkOpacity(t.opacity)&&(this.options.opacity=t.opacity),this.updateShape(n),t.hidden!==void 0||t.physics!==void 0}}},{key:`_load_images`,value:function(){if((this.options.shape===`circularImage`||this.options.shape===`image`)&&this.options.image===void 0)throw Error(`Option image must be defined for node type '`+this.options.shape+`'`);if(this.options.image!==void 0){if(this.imagelist===void 0)throw 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 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=void 0:this.imageObjAlt=this.imagelist.load(this.options.image.selected,this.options.brokenImage,this.id)}}}},{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?!0===this.chooser?this.selected?(this.options.borderWidthSelected==null?e.borderWidth*=2:e.borderWidth=this.options.borderWidthSelected,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),!1===e.shadow&&(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=Mv(e.borderColor,t),e.color=Mv(e.color,t),e.shadowColor=Mv(e.shadowColor,t)}return e}},{key:`updateLabelModule`,value:function(t){this.options.label!==void 0&&this.options.label!==null||(this.options.label=``),e.updateGroupOptions(this.options,IC(IC({},t),{},{color:t&&t.color||this._localColor||void 0}),this.grouplist);var n=this.grouplist.get(this.options.group,!1),r=[t,this.options,n,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,r),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 QS(this.options,this.body,this.labelModule);break;case`circle`:this.shape=new nC(this.options,this.body,this.labelModule);break;case`circularImage`:this.shape=new iC(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case`custom`:this.shape=new uC(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case`database`:this.shape=new fC(this.options,this.body,this.labelModule);break;case`diamond`:this.shape=new mC(this.options,this.body,this.labelModule);break;case`dot`:this.shape=new gC(this.options,this.body,this.labelModule);break;case`ellipse`:default:this.shape=new vC(this.options,this.body,this.labelModule);break;case`icon`:this.shape=new bC(this.options,this.body,this.labelModule);break;case`image`:this.shape=new SC(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case`square`:this.shape=new wC(this.options,this.body,this.labelModule);break;case`hexagon`:this.shape=new EC(this.options,this.body,this.labelModule);break;case`star`:this.shape=new OC(this.options,this.body,this.labelModule);break;case`text`:this.shape=new AC(this.options,this.body,this.labelModule);break;case`triangle`:this.shape=new MC(this.options,this.body,this.labelModule);break;case`triangleDown`:this.shape=new PC(this.options,this.body,this.labelModule)}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 r=this.options.scaling.customScalingFunction(e,t,n,this.options.value),i=this.options.scaling.max-this.options.scaling.min;if(!0===this.options.scaling.label.enabled){var a=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+r*a}this.options.size=this.options.scaling.min+r*i}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()&&lS(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),lS(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(t,n,r){var i;if(r!==void 0){var a=t.group;if(n!==void 0&&n.group!==void 0&&a!==n.group)throw Error(`updateGroupOptions: group values in options don't match.`);if(typeof a==`number`||typeof a==`string`&&a!=``){var o=r.get(a);o.opacity!==void 0&&n.opacity===void 0&&(e.checkOpacity(o.opacity)||(console.error(`Invalid option for node opacity. Value must be between 0 and 1, found: `+o.opacity),o.opacity=void 0));var s=ih(i=sS(n)).call(i,(function(e){return n[e]!=null}));s.push(`font`),Dv(s,t,o),t.color=Pv(t.color)}}}},{key:`parseOptions`,value:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=arguments.length>4?arguments[4]:void 0;if(Dv([`color`,`fixed`,`shadow`],t,n,r),e.checkMass(n),t.opacity!==void 0&&(e.checkOpacity(t.opacity)||(console.error(`Invalid option for node opacity. Value must be between 0 and 1, found: `+t.opacity),t.opacity=void 0)),n.opacity!==void 0&&(e.checkOpacity(n.opacity)||(console.error(`Invalid option for node opacity. Value must be between 0 and 1, found: `+n.opacity),n.opacity=void 0)),n.shapeProperties&&!e.checkCoordinateOrigin(n.shapeProperties.coordinateOrigin)&&console.error(`Invalid option for node coordinateOrigin, found: `+n.shapeProperties.coordinateOrigin),Vv(t,n,`shadow`,i),n.color!==void 0&&n.color!==null){var o=Pv(n.color);Tv(t.color,o)}else !0===r&&n.color===null&&(t.color=Bv(i.color));n.fixed!==void 0&&n.fixed!==null&&(typeof n.fixed==`boolean`?(t.fixed.x=n.fixed,t.fixed.y=n.fixed):(n.fixed.x!==void 0&&typeof n.fixed.x==`boolean`&&(t.fixed.x=n.fixed.x),n.fixed.y!==void 0&&typeof n.fixed.y==`boolean`&&(t.fixed.y=n.fixed.y))),!0===r&&n.font===null&&(t.font=Bv(i.font)),e.updateGroupOptions(t,n,a),n.scaling!==void 0&&Vv(t.scaling,n.scaling,`label`,i.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.`,ry),e.mass=1}}}]),e}();function RC(e,t){var n=fp!==void 0&&bc(e)||e[`@@iterator`];if(!n){if(Tp(e)||(n=function(e,t){var n;if(e){if(typeof e==`string`)return zC(e,t);var r=vp(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return $s(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zC(e,t)}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw 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,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function zC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var BC=function(){function e(t,n,r,i){var a,o=this;if(H(this,e),this.body=t,this.images=n,this.groups=r,this.layoutEngine=i,this.body.functions.createNode=V(a=this.create).call(a,this),this.nodesListeners={add:function(e,t){o.add(t.items)},update:function(e,t){o.update(t.items,t.data,t.oldData)},remove:function(e,t){o.remove(t.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(e,t,n,r){if(t===e)return .5;var i=1/(t-e);return Math.max(0,(r-e)*i)}},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=Bv(this.defaultOptions),this.bindEventListeners()}return U(e,[{key:`bindEventListeners`,value:function(){var e,t,n=this;this.body.emitter.on(`refreshNodes`,V(e=this.refresh).call(e,this)),this.body.emitter.on(`refresh`,V(t=this.refresh).call(t,this)),this.body.emitter.on(`destroy`,(function(){W(n.nodesListeners,(function(e,t){n.body.data.nodes&&n.body.data.nodes.off(t,e)})),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(LC.parseOptions(this.options,e),e.opacity!==void 0&&(fx(e.opacity)||!mx(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(e.font!==void 0||e.widthConstraint!==void 0||e.heightConstraint!==void 0)for(var n=0,r=Pp(this.body.nodes);n<r.length;n++){var i=r[n];this.body.nodes[i].updateLabelModule(),this.body.nodes[i].needsRefresh()}if(e.size!==void 0)for(var a in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,a)&&this.body.nodes[a].needsRefresh();e.hidden===void 0&&e.physics===void 0||this.body.emitter.emit(`_dataChanged`)}}},{key:`setData`,value:function(e){var n=arguments.length>1&&arguments[1]!==void 0&&arguments[1],r=this.body.data.nodes;if(t.isDataViewLike(`id`,e))this.body.data.nodes=e;else if(Tp(e))this.body.data.nodes=new t.DataSet,this.body.data.nodes.add(e);else{if(e)throw TypeError(`Array or DataSet expected`);this.body.data.nodes=new t.DataSet}if(r&&W(this.nodesListeners,(function(e,t){r.off(t,e)})),this.body.nodes={},this.body.data.nodes){var i=this;W(this.nodesListeners,(function(e,t){i.body.data.nodes.on(t,e)}));var a=this.body.data.nodes.getIds();this.add(a,!0)}!1===n&&this.body.emitter.emit(`_dataChanged`)}},{key:`add`,value:function(e){for(var t,n=arguments.length>1&&arguments[1]!==void 0&&arguments[1],r=[],i=0;i<e.length;i++){t=e[i];var a=this.body.data.nodes.get(t),o=this.create(a);r.push(o),this.body.nodes[t]=o}this.layoutEngine.positionInitially(r),!1===n&&this.body.emitter.emit(`_dataChanged`)}},{key:`update`,value:function(e,t,n){for(var r=this.body.nodes,i=!1,a=0;a<e.length;a++){var o=e[a],s=r[o],c=t[a];s===void 0?(i=!0,s=this.create(c),r[o]=s):s.setOptions(c)&&(i=!0)}i||n===void 0||(i=bx(t).call(t,(function(e,t){var r=n[t];return r&&r.level!==e.level}))),!0===i?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++)delete t[e[n]];this.body.emitter.emit(`_dataChanged`)}},{key:`create`,value:function(e){return new(arguments.length>1&&arguments[1]!==void 0?arguments[1]:LC)(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];W(this.body.nodes,(function(n,r){var i=e.body.data.nodes.get(r);i!==void 0&&(!0===t&&n.setOptions({x:null,y:null}),n.setOptions({fixed:!1}),n.setOptions(i))}))}},{key:`getPositions`,value:function(e){var t={};if(e!==void 0){if(!0===Tp(e)){for(var n=0;n<e.length;n++)if(this.body.nodes[e[n]]!==void 0){var r=this.body.nodes[e[n]];t[e[n]]={x:Math.round(r.x),y:Math.round(r.y)}}}else if(this.body.nodes[e]!==void 0){var i=this.body.nodes[e];t[e]={x:Math.round(i.x),y:Math.round(i.y)}}}else for(var a=0;a<this.body.nodeIndices.length;a++){var o=this.body.nodes[this.body.nodeIndices[a]];t[this.body.nodeIndices[a]]={x:Math.round(o.x),y:Math.round(o.y)}}return t}},{key:`getPosition`,value:function(e){if(e==null)throw TypeError(`No id was specified for getPosition method.`);if(this.body.nodes[e]==null)throw ReferenceError(`NodeId provided for getPosition does not exist. Provided: ${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=[],n=this.body.data.nodes.getDataSet(),r=RC(n.get());try{for(r.s();!(e=r.n()).done;){var i=e.value,a=i.id,o=this.body.nodes[a],s=Math.round(o.x),c=Math.round(o.y);i.x===s&&i.y===c||t.push({id:a,x:s,y:c})}}catch(e){r.e(e)}finally{r.f()}n.update(t)}},{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 r=this.body.nodes[e],i={},a=0;a<r.edges.length;a++){var o=r.edges[a];t!==`to`&&o.toId==r.id?i[o.fromId]===void 0&&(n.push(o.fromId),i[o.fromId]=!0):t!==`from`&&o.fromId==r.id&&i[o.toId]===void 0&&(n.push(o.toId),i[o.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],r=0;r<n.edges.length;r++)t.push(n.edges[r].id);else console.error(`NodeId provided for getConnectedEdges does not exist. Provided: `,e);return t}},{key:`moveNode`,value:function(e,t,n){var r=this;this.body.nodes[e]===void 0?console.error(`Node id supplied to moveNode does not exist. Provided: `,e):(this.body.nodes[e].x=Number(t),this.body.nodes[e].y=Number(n),sg((function(){r.body.emitter.emit(`startSimulation`)}),0))}}]),e}(),VC=mt,HC=re,UC=M,WC=yn,GC=function(e){return e!==void 0&&(VC(e,`value`)||VC(e,`writable`))},KC=E,qC=Ia;R({target:`Reflect`,stat:!0},{get:function e(t,n){var r,i,a=arguments.length<3?t:arguments[2];return WC(t)===a?t[n]:(r=KC.f(t,n))?GC(r)?r.value:r.get===void 0?void 0:HC(r.get,a):UC(i=qC(t))?e(i,n,a):void 0}});var JC=r(N.Reflect.get),YC=r(Ax);function XC(){var e;return XC=typeof Reflect<`u`&&JC?GS(e=JC).call(e):function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=J(e))!==null;);return e}(e,t);if(r){var i=YC(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},XC.apply(this,arguments)}var ZC=R,QC=Math.hypot,$C=Math.abs,ew=Math.sqrt;ZC({target:`Math`,stat:!0,arity:2,forced:!!QC&&QC(1/0,NaN)!==1/0},{hypot:function(e,t){for(var n,r,i=0,a=0,o=arguments.length,s=0;a<o;)s<(n=$C(arguments[a++]))?(i=i*(r=s/n)*r+1,s=n):i+=n>0?(r=n/s)*r:n;return s===1/0?1/0:s*ew(i)}});var tw=r(N.Math.hypot);function nw(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var rw=function(){function e(){H(this,e)}return U(e,null,[{key:`transform`,value:function(e,t){Tp(e)||(e=[e]);for(var n=t.point.x,r=t.point.y,i=t.angle,a=t.length,o=0;o<e.length;++o){var s=e[o],c=s.x*Math.cos(i)-s.y*Math.sin(i),l=s.x*Math.sin(i)+s.y*Math.cos(i);s.x=n+a*c,s.y=r+a*l}}},{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()}}]),e}(),iw=function(e){qS(n,e);var t=nw(n);function n(){return H(this,n),t.apply(this,arguments)}return U(n,null,[{key:`draw`,value:function(e,t){if(t.image){e.save(),e.translate(t.point.x,t.point.y),e.rotate(Math.PI/2+t.angle);var n=t.imageWidth==null?t.image.width:t.imageWidth,r=t.imageHeight==null?t.image.height:t.imageHeight;t.image.drawImageAtPosition(e,1,-n/2,0,n,r),e.restore()}return!1}}]),n}(rw),aw=function(e){qS(n,e);var t=nw(n);function n(){return H(this,n),t.apply(this,arguments)}return U(n,null,[{key:`draw`,value:function(e,t){var n=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];return rw.transform(n,t),rw.drawPath(e,n),!0}}]),n}(rw),ow=function(){function e(){H(this,e)}return U(e,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 rw.transform(n,t),rw.drawPath(e,n),!0}}]),e}(),sw=function(){function e(){H(this,e)}return U(e,null,[{key:`draw`,value:function(e,t){var n={x:-.4,y:0};rw.transform(n,t),e.strokeStyle=e.fillStyle,e.fillStyle=`rgba(0, 0, 0, 0)`;var r=Math.PI,i=t.angle-r/2,a=t.angle+r/2;return e.beginPath(),e.arc(n.x,n.y,.4*t.length,i,a,!1),e.stroke(),!0}}]),e}(),cw=function(){function e(){H(this,e)}return U(e,null,[{key:`draw`,value:function(e,t){var n={x:-.3,y:0};rw.transform(n,t),e.strokeStyle=e.fillStyle,e.fillStyle=`rgba(0, 0, 0, 0)`;var r=Math.PI,i=t.angle+r/2,a=t.angle+3*r/2;return e.beginPath(),e.arc(n.x,n.y,.4*t.length,i,a,!1),e.stroke(),!0}}]),e}(),lw=function(){function e(){H(this,e)}return U(e,null,[{key:`draw`,value:function(e,t){var n=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];return rw.transform(n,t),rw.drawPath(e,n),!0}}]),e}(),uw=function(){function e(){H(this,e)}return U(e,null,[{key:`draw`,value:function(e,t){var n=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];return rw.transform(n,t),rw.drawPath(e,n),!0}}]),e}(),dw=function(){function e(){H(this,e)}return U(e,null,[{key:`draw`,value:function(e,t){var n={x:-.4,y:0};return rw.transform(n,t),Qr(e,n.x,n.y,.4*t.length),!0}}]),e}(),fw=function(){function e(){H(this,e)}return U(e,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 rw.transform(n,t),rw.drawPath(e,n),!0}}]),e}(),pw=function(){function e(){H(this,e)}return U(e,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 rw.transform(n,t),rw.drawPath(e,n),!0}}]),e}(),mw=function(){function e(){H(this,e)}return U(e,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 rw.transform(n,t),rw.drawPath(e,n),!0}}]),e}(),hw=function(){function e(){H(this,e)}return U(e,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 rw.transform(n,t),rw.drawPath(e,n),!0}}]),e}(),gw=function(){function e(){H(this,e)}return U(e,null,[{key:`draw`,value:function(e,t){var n;switch(t.type&&(n=t.type.toLowerCase()),n){case`image`:return iw.draw(e,t);case`circle`:return dw.draw(e,t);case`box`:return pw.draw(e,t);case`crow`:return ow.draw(e,t);case`curve`:return sw.draw(e,t);case`diamond`:return mw.draw(e,t);case`inv_curve`:return cw.draw(e,t);case`triangle`:return lw.draw(e,t);case`inv_triangle`:return uw.draw(e,t);case`bar`:return fw.draw(e,t);case`vee`:return hw.draw(e,t);default:return aw.draw(e,t)}}}]),e}();function _w(e,t){var n=Pp(e);if(xx){var r=xx(e);t&&(r=ih(r).call(r,(function(t){return jx(e,t).enumerable}))),n.push.apply(n,r)}return n}function vw(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?Xp(n=_w(Object(i),!0)).call(n,(function(t){Gx(e,t,i[t])})):Ix?Ux(e,Ix(i)):Xp(r=_w(Object(i))).call(r,(function(t){Wx(e,t,jx(i,t))}))}return e}var yw=function(){function e(t,n,r){H(this,e),this._body=n,this._labelModule=r,this.color={},this.colorDirty=!0,this.hoverWidth=1.5,this.selectionWidth=2,this.setOptions(t),this.fromPoint=this.from,this.toPoint=this.to}return U(e,[{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,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,t),e.lineWidth=t.width,!1===t.dashes?this._drawLine(e,t,i):this._drawDashedLine(e,t,i)}},{key:`_drawLine`,value:function(e,t,n,r,i){if(this.from!=this.to)this._line(e,t,n,r,i);else{var a=up(this._getCircleData(e),3),o=a[0],s=a[1],c=a[2];this._circle(e,t,o,s,c)}}},{key:`_drawDashedLine`,value:function(e,t,n,r,i){e.lineCap=`round`;var a=Tp(t.dashes)?t.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(a),e.lineDashOffset=0,this.from!=this.to)this._line(e,t,n);else{var o=up(this._getCircleData(e),3),s=o[0],c=o[1],l=o[2];this._circle(e,t,s,c,l)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)ni(e,this.from.x,this.from.y,this.to.x,this.to.y,a);else{var u=up(this._getCircleData(e),3),d=u[0],f=u[1],p=u[2];this._circle(e,t,d,f,p)}this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}}},{key:`findBorderPosition`,value:function(e,t,n){return this.from==this.to?this._findBorderPositionCircle(e,t,n):this._findBorderPosition(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=up(vp(t=this._getCircleData(e)).call(t,0,2),2),r=n[0],i=n[1];return{from:this._findBorderPositionCircle(this.from,e,{x:r,y:i,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:r,y:i,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=dS(e,this.options.selfReference.angle,t,this.from);return[n.x,n.y,t]}},{key:`_pointOnCircle`,value:function(e,t,n,r){var i=2*r*Math.PI;return{x:e+n*Math.cos(i),y:t-n*Math.sin(i)}}},{key:`_findBorderPositionCircle`,value:function(e,t,n){var r,i=n.x,a=n.y,o=n.low,s=n.high,c=n.direction,l=this.options.selfReference.size,u=.5*(o+s),d=0;!0===this.options.arrowStrikethrough&&(c===-1?d=this.options.endPointOffset.from:c===1&&(d=this.options.endPointOffset.to));var f=0;do{u=.5*(o+s),r=this._pointOnCircle(i,a,l,u);var p=Math.atan2(e.y-r.y,e.x-r.x),m=e.distanceToBorder(t,p)+d-Math.sqrt((r.x-e.x)**2+(r.y-e.y)**2);if(Math.abs(m)<.05)break;m>0?c>0?o=u:s=u:c>0?s=u:o=u,++f}while(o<=s&&f<10);return vw(vw({},r),{},{t:u})}},{key:`getLineWidth`,value:function(e,t){return Math.max(!0===e?this.selectionWidth:!0===t?this.hoverWidth:this.options.width,.3/this._body.view.scale)}},{key:`getColor`,value:function(e,t){if(!1!==t.inheritsColor){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),r=this.from.options.color.highlight.border,i=this.to.options.color.highlight.border;return!1===this.from.selected&&!1===this.to.selected?(r=Mv(this.from.options.color.border,t.opacity),i=Mv(this.to.options.color.border,t.opacity)):!0===this.from.selected&&!1===this.to.selected?i=this.to.options.color.border:!1===this.from.selected&&!0===this.to.selected&&(r=this.from.options.color.border),n.addColorStop(0,r),n.addColorStop(1,i),n}return t.inheritsColor===`to`?Mv(this.to.options.color.border,t.opacity):Mv(this.from.options.color.border,t.opacity)}return Mv(t.color,t.opacity)}},{key:`_circle`,value:function(e,t,n,r,i){this.enableShadow(e,t);var a=0,o=2*Math.PI;if(!this.options.selfReference.renderBehindTheNode){var s=this.options.selfReference.angle,c=this.options.selfReference.angle+Math.PI,l=this._findBorderPositionCircle(this.from,e,{x:n,y:r,low:s,high:c,direction:-1}),u=this._findBorderPositionCircle(this.from,e,{x:n,y:r,low:s,high:c,direction:1});a=Math.atan2(l.y-r,l.x-n),o=Math.atan2(u.y-r,u.x-n)}e.beginPath(),e.arc(n,r,i,a,o,!1),e.stroke(),this.disableShadow(e,t)}},{key:`getDistanceToEdge`,value:function(e,t,n,r,i,a){if(this.from!=this.to)return this._getDistanceToEdge(e,t,n,r,i,a);var o=up(this._getCircleData(void 0),3),s=o[0],c=o[1],l=o[2],u=s-i,d=c-a;return Math.abs(Math.sqrt(u*u+d*d)-l)}},{key:`_getDistanceToLine`,value:function(e,t,n,r,i,a){var o=n-e,s=r-t,c=((i-e)*o+(a-t)*s)/(o*o+s*s);c>1?c=1:c<0&&(c=0);var l=e+c*o-i,u=t+c*s-a;return Math.sqrt(l*l+u*u)}},{key:`getArrowData`,value:function(e,t,n,r,i,a){var o,s,c,l,u,d,f,p=a.width;t===`from`?(c=this.from,l=this.to,u=a.fromArrowScale<0,d=Math.abs(a.fromArrowScale),f=a.fromArrowType):t===`to`?(c=this.to,l=this.from,u=a.toArrowScale<0,d=Math.abs(a.toArrowScale),f=a.toArrowType):(c=this.to,l=this.from,u=a.middleArrowScale<0,d=Math.abs(a.middleArrowScale),f=a.middleArrowType);var m=15*d+3*p;if(c!=l){var h=m/tw(c.x-l.x,c.y-l.y);if(t!==`middle`)if(!0===this.options.smooth.enabled){var g=this._findBorderPosition(c,e,{via:n}),_=this.getPoint(g.t+h*(t===`from`?1:-1),n);o=Math.atan2(g.y-_.y,g.x-_.x),s=g}else o=Math.atan2(c.y-l.y,c.x-l.x),s=this._findBorderPosition(c,e);else{var v=(u?-h:h)/2,y=this.getPoint(.5+v,n),b=this.getPoint(.5-v,n);o=Math.atan2(y.y-b.y,y.x-b.x),s=this.getPoint(.5,n)}}else{var x=up(this._getCircleData(e),3),S=x[0],ee=x[1],C=x[2];if(t===`from`){var te=this.options.selfReference.angle,w=this.options.selfReference.angle+Math.PI,ne=this._findBorderPositionCircle(this.from,e,{x:S,y:ee,low:te,high:w,direction:-1});o=-2*ne.t*Math.PI+1.5*Math.PI+.1*Math.PI,s=ne}else if(t===`to`){var T=this.options.selfReference.angle,E=this.options.selfReference.angle+Math.PI,D=this._findBorderPositionCircle(this.from,e,{x:S,y:ee,low:T,high:E,direction:1});o=-2*D.t*Math.PI+1.5*Math.PI-1.1*Math.PI,s=D}else{var O=this.options.selfReference.angle/(2*Math.PI);s=this._pointOnCircle(S,ee,C,O),o=-2*O*Math.PI+1.5*Math.PI+.1*Math.PI}}return{point:s,core:{x:s.x-.9*m*Math.cos(o),y:s.y-.9*m*Math.sin(o)},angle:o,length:m,type:f}}},{key:`drawArrowHead`,value:function(e,t,n,r,i){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width,gw.draw(e,i)&&(this.enableShadow(e,t),gg(e).call(e),this.disableShadow(e,t))}},{key:`enableShadow`,value:function(e,t){!0===t.shadow&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}},{key:`disableShadow`,value:function(e,t){!0===t.shadow&&(e.shadowColor=`rgba(0,0,0,0)`,e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},{key:`drawBackground`,value:function(e,t){if(!1!==t.background){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(!1!==t)if(e.setLineDash!==void 0){var n=Tp(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?console.warn(`setLineDash is not supported in this browser. The dashed stroke cannot be used.`):e.setLineDash([])}}]),e}();function bw(e,t){var n=Pp(e);if(xx){var r=xx(e);t&&(r=ih(r).call(r,(function(t){return jx(e,t).enumerable}))),n.push.apply(n,r)}return n}function xw(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?Xp(n=bw(Object(i),!0)).call(n,(function(t){Gx(e,t,i[t])})):Ix?Ux(e,Ix(i)):Xp(r=bw(Object(i))).call(r,(function(t){Wx(e,t,jx(i,t))}))}return e}function Sw(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var Cw=function(e){qS(n,e);var t=Sw(n);function n(e,r,i){return H(this,n),t.call(this,e,r,i)}return U(n,[{key:`_findBorderPositionBezier`,value:function(e,t){var n,r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates(),a=!1,o=1,s=0,c=this.to,l=this.options.endPointOffset?this.options.endPointOffset.to:0;e.id===this.from.id&&(c=this.from,a=!0,l=this.options.endPointOffset?this.options.endPointOffset.from:0),!1===this.options.arrowStrikethrough&&(l=0);var u=0;do{r=.5*(s+o),n=this.getPoint(r,i);var d=Math.atan2(c.y-n.y,c.x-n.x),f=c.distanceToBorder(t,d)+l-Math.sqrt((n.x-c.x)**2+(n.y-c.y)**2);if(Math.abs(f)<.2)break;f<0?!1===a?s=r:o=r:!1===a?o=r:s=r,++u}while(s<=o&&u<10);return xw(xw({},n),{},{t:r})}},{key:`_getDistanceToBezierEdge`,value:function(e,t,n,r,i,a,o){var s,c,l,u,d,f=1e9,p=e,m=t;for(c=1;c<10;c++)l=.1*c,u=(1-l)**2*e+2*l*(1-l)*o.x+l**2*n,d=(1-l)**2*t+2*l*(1-l)*o.y+l**2*r,c>0&&(f=(s=this._getDistanceToLine(p,m,u,d,i,a))<f?s:f),p=u,m=d;return f}},{key:`_bezierCurve`,value:function(e,t,n,r){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),n!=null&&n.x!=null?r!=null&&r.x!=null?e.bezierCurveTo(n.x,n.y,r.x,r.y,this.toPoint.x,this.toPoint.y):e.quadraticCurveTo(n.x,n.y,this.toPoint.x,this.toPoint.y):e.lineTo(this.toPoint.x,this.toPoint.y),this.drawBackground(e,t),this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}},{key:`getViaNode`,value:function(){return this._getViaCoordinates()}}]),n}(yw);function ww(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var Tw=function(e){qS(n,e);var t=ww(n);function n(e,r,i){var a;return H(this,n),(a=t.call(this,e,r,i)).via=a.via,a._boundFunction=function(){a.positionBezierNode()},a._body.emitter.on(`_repositionBezierNodes`,a._boundFunction),a}return U(n,[{key:`setOptions`,value:function(e){XC(J(n.prototype),`setOptions`,this).call(this,e);var t=!1;this.options.physics!==e.physics&&(t=!0),this.options=e,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),!0===t&&(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||!1===this.options.physics||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)}},{key:`setupSupportNode`,value:function(){if(this.via===void 0){var e=`edgeId:`+this.id,t=this._body.functions.createNode({id:e,shape:`circle`,physics:!0,hidden:!0});this._body.nodes[e]=t,this.via=t,this.via.parentEdgeId=this.id,this.positionBezierNode()}}},{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(e,t,n){this._bezierCurve(e,t,n)}},{key:`_getViaCoordinates`,value:function(){return this.via}},{key:`getViaNode`,value:function(){return this.via}},{key:`getPoint`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){var n=up(this._getCircleData(),3),r=n[0],i=n[1],a=n[2],o=2*Math.PI*(1-e);return{x:r+a*Math.sin(o),y:i+a-a*(1-Math.cos(o))}}return{x:(1-e)**2*this.fromPoint.x+2*e*(1-e)*t.x+e**2*this.toPoint.x,y:(1-e)**2*this.fromPoint.y+2*e*(1-e)*t.y+e**2*this.toPoint.y}}},{key:`_findBorderPosition`,value:function(e,t){return this._findBorderPositionBezier(e,t,this.via)}},{key:`_getDistanceToEdge`,value:function(e,t,n,r,i,a){return this._getDistanceToBezierEdge(e,t,n,r,i,a,this.via)}}]),n}(Cw);function Ew(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var Dw=function(e){qS(n,e);var t=Ew(n);function n(e,r,i){return H(this,n),t.call(this,e,r,i)}return U(n,[{key:`_line`,value:function(e,t,n){this._bezierCurve(e,t,n)}},{key:`getViaNode`,value:function(){return this._getViaCoordinates()}},{key:`_getViaCoordinates`,value:function(){var e,t,n=this.options.smooth.roundness,r=this.options.smooth.type,i=Math.abs(this.from.x-this.to.x),a=Math.abs(this.from.y-this.to.y);if(r===`discrete`||r===`diagonalCross`){var o=s=i<=a?n*a:n*i,s;this.from.x>this.to.x&&(o=-o),this.from.y>=this.to.y&&(s=-s);var c=this.from.x+o,l=this.from.y+s;return r===`discrete`&&(i<=a?c=i<n*a?this.from.x:c:l=a<n*i?this.from.y:l),{x:c,y:l}}if(r===`straightCross`){var u=(1-n)*i,d=(1-n)*a;return i<=a?(u=0,this.from.y<this.to.y&&(d=-d)):(this.from.x<this.to.x&&(u=-u),d=0),{x:this.to.x+u,y:this.to.y+d}}if(r===`horizontal`){var f=(1-n)*i;return this.from.x<this.to.x&&(f=-f),{x:this.to.x+f,y:this.from.y}}if(r===`vertical`){var p=(1-n)*a;return this.from.y<this.to.y&&(p=-p),{x:this.from.x,y:this.to.y+p}}if(r===`curvedCW`){i=this.to.x-this.from.x,a=this.from.y-this.to.y;var m=Math.sqrt(i*i+a*a),h=Math.PI,g=(Math.atan2(a,i)+(.5*n+.5)*h)%(2*h);return{x:this.from.x+(.5*n+.5)*m*Math.sin(g),y:this.from.y+(.5*n+.5)*m*Math.cos(g)}}if(r===`curvedCCW`){i=this.to.x-this.from.x,a=this.from.y-this.to.y;var _=Math.sqrt(i*i+a*a),v=Math.PI,y=(Math.atan2(a,i)+(.5*-n+.5)*v)%(2*v);return{x:this.from.x+(.5*n+.5)*_*Math.sin(y),y:this.from.y+(.5*n+.5)*_*Math.cos(y)}}e=t=i<=a?n*a:n*i,this.from.x>this.to.x&&(e=-e),this.from.y>=this.to.y&&(t=-t);var b=this.from.x+e,x=this.from.y+t;return i<=a?b=this.from.x<=this.to.x?this.to.x<b?this.to.x:b:this.to.x>b?this.to.x:b:x=this.from.y>=this.to.y?this.to.y>x?this.to.y:x:this.to.y<x?this.to.y:x,{x:b,y:x}}},{key:`_findBorderPosition`,value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(e,t,n.via)}},{key:`_getDistanceToEdge`,value:function(e,t,n,r,i,a){var o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(e,t,n,r,i,a,o)}},{key:`getPoint`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),n=e;return{x:(1-n)**2*this.fromPoint.x+2*n*(1-n)*t.x+n**2*this.toPoint.x,y:(1-n)**2*this.fromPoint.y+2*n*(1-n)*t.y+n**2*this.toPoint.y}}}]),n}(Cw);function Ow(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var kw=function(e){qS(n,e);var t=Ow(n);function n(e,r,i){return H(this,n),t.call(this,e,r,i)}return U(n,[{key:`_getDistanceToBezierEdge2`,value:function(e,t,n,r,i,a,o,s){for(var c=1e9,l=e,u=t,d=[0,0,0,0],f=1;f<10;f++){var p=.1*f;d[0]=(1-p)**3,d[1]=3*p*(1-p)**2,d[2]=3*p**2*(1-p),d[3]=p**3;var m=d[0]*e+d[1]*o.x+d[2]*s.x+d[3]*n,h=d[0]*t+d[1]*o.y+d[2]*s.y+d[3]*r;if(f>0){var g=this._getDistanceToLine(l,u,m,h,i,a);c=g<c?g:c}l=m,u=h}return c}}]),n}(Cw);function Aw(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var jw=function(e){qS(n,e);var t=Aw(n);function n(e,r,i){return H(this,n),t.call(this,e,r,i)}return U(n,[{key:`_line`,value:function(e,t,n){var r=n[0],i=n[1];this._bezierCurve(e,t,r,i)}},{key:`_getViaCoordinates`,value:function(){var e,t,n,r,i=this.from.x-this.to.x,a=this.from.y-this.to.y,o=this.options.smooth.roundness;return(Math.abs(i)>Math.abs(a)||!0===this.options.smooth.forceDirection||this.options.smooth.forceDirection===`horizontal`)&&this.options.smooth.forceDirection!==`vertical`?(t=this.from.y,r=this.to.y,e=this.from.x-o*i,n=this.to.x+o*i):(t=this.from.y-o*a,r=this.to.y+o*a,e=this.from.x,n=this.to.x),[{x:e,y:t},{x:n,y:r}]}},{key:`getViaNode`,value:function(){return this._getViaCoordinates()}},{key:`_findBorderPosition`,value:function(e,t){return this._findBorderPositionBezier(e,t)}},{key:`_getDistanceToEdge`,value:function(e,t,n,r,i,a){var o=up(arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates(),2),s=o[0],c=o[1];return this._getDistanceToBezierEdge2(e,t,n,r,i,a,s,c)}},{key:`getPoint`,value:function(e){var t=up(arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),2),n=t[0],r=t[1],i=e,a=[(1-i)**3,3*i*(1-i)**2,3*i**2*(1-i),i**3];return{x:a[0]*this.fromPoint.x+a[1]*n.x+a[2]*r.x+a[3]*this.toPoint.x,y:a[0]*this.fromPoint.y+a[1]*n.y+a[2]*r.y+a[3]*this.toPoint.y}}}]),n}(kw);function Mw(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var Nw=function(e){qS(n,e);var t=Mw(n);function n(e,r,i){return H(this,n),t.call(this,e,r,i)}return U(n,[{key:`_line`,value:function(e,t){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),e.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}},{key:`getViaNode`,value:function(){}},{key:`getPoint`,value:function(e){return{x:(1-e)*this.fromPoint.x+e*this.toPoint.x,y:(1-e)*this.fromPoint.y+e*this.toPoint.y}}},{key:`_findBorderPosition`,value:function(e,t){var n=this.to,r=this.from;e.id===this.from.id&&(n=this.from,r=this.to);var i=Math.atan2(n.y-r.y,n.x-r.x),a=n.x-r.x,o=n.y-r.y,s=Math.sqrt(a*a+o*o),c=(s-e.distanceToBorder(t,i))/s;return{x:(1-c)*r.x+c*n.x,y:(1-c)*r.y+c*n.y,t:0}}},{key:`_getDistanceToEdge`,value:function(e,t,n,r,i,a){return this._getDistanceToLine(e,t,n,r,i,a)}}]),n}(yw),Pw=function(){function e(t,n,r,i,a){if(H(this,e),n===void 0)throw Error(`No body provided`);this.options=Bv(i),this.globalOptions=i,this.defaultOptions=a,this.body=n,this.imagelist=r,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new TS(this.body,this.options,!0),this.setOptions(t)}return U(e,[{key:`setOptions`,value:function(t){if(t){var n=t.physics!==void 0&&this.options.physics!==t.physics||t.hidden!==void 0&&(this.options.hidden||!1)!==(t.hidden||!1)||t.from!==void 0&&this.options.from!==t.from||t.to!==void 0&&this.options.to!==t.to;return e.parseOptions(this.options,t,!0,this.globalOptions),t.id!==void 0&&(this.id=t.id),t.from!==void 0&&(this.fromId=t.from),t.to!==void 0&&(this.toId=t.to),t.title!==void 0&&(this.title=t.title),t.value!==void 0&&(t.value=nS(t.value)),this.chooser=cS(`edge`,[t,this.options,this.defaultOptions]),this.updateLabelModule(t),n=this.updateEdgeType()||n,this._setInteractionWidths(),this.connect(),n}}},{key:`getFormattingValues`,value:function(){var e=!0===this.options.arrows.to||!0===this.options.arrows.to.enabled,t=!0===this.options.arrows.from||!0===this.options.arrows.from.enabled,n=!0===this.options.arrows.middle||!0===this.options.arrows.middle.enabled,r=this.options.color.inherit,i={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:r?void 0:this.options.color.color,inheritsColor:r,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(!0===this.chooser){if(this.selected){var a=this.options.selectionWidth;typeof a==`function`?i.width=a(i.width):typeof a==`number`&&(i.width+=a),i.width=Math.max(i.width,.3/this.body.view.scale),i.color=this.options.color.highlight,i.shadow=this.options.shadow.enabled}else if(this.hover){var o=this.options.hoverWidth;typeof o==`function`?i.width=o(i.width):typeof o==`number`&&(i.width+=o),i.width=Math.max(i.width,.3/this.body.view.scale),i.color=this.options.color.hover,i.shadow=this.options.shadow.enabled}}else typeof this.chooser==`function`&&(this.chooser(i,this.options.id,this.selected,this.hover),i.color!==void 0&&(i.inheritsColor=!1),!1===i.shadow&&(i.shadowColor===this.options.shadow.color&&i.shadowSize===this.options.shadow.size&&i.shadowX===this.options.shadow.x&&i.shadowY===this.options.shadow.y||(i.shadow=!0)));else i.shadow=this.options.shadow.enabled,i.width=Math.max(i.width,.3/this.body.view.scale);return i}},{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 Tw&&!0===e.enabled&&e.type===`dynamic`||this.edgeType instanceof jw&&!0===e.enabled&&e.type===`cubicBezier`||this.edgeType instanceof Dw&&!0===e.enabled&&e.type!==`dynamic`&&e.type!==`cubicBezier`||this.edgeType instanceof Nw&&!1===e.type.enabled)&&(n=!1),!0===n&&(t=this.cleanup())),!0===n?!0===e.enabled?e.type===`dynamic`?(t=!0,this.edgeType=new Tw(this.options,this.body,this.labelModule)):e.type===`cubicBezier`?this.edgeType=new jw(this.options,this.body,this.labelModule):this.edgeType=new Dw(this.options,this.body,this.labelModule):this.edgeType=new Nw(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,!0===this.connected?(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),void 0),this.to&&=(this.to.detachEdge(this),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 r=this.options.scaling.customScalingFunction(e,t,n,this.options.value),i=this.options.scaling.max-this.options.scaling.min;if(!0===this.options.scaling.label.enabled){var a=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+r*a}this.options.width=this.options.scaling.min+r*i}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(),r={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,t.fromArrow&&(r.from=this.edgeType.getArrowData(e,`from`,n,this.selected,this.hover,t),!1===t.arrowStrikethrough&&(this.edgeType.fromPoint=r.from.core),t.fromArrowSrc&&(r.from.image=this.imagelist.load(t.fromArrowSrc)),t.fromArrowImageWidth&&(r.from.imageWidth=t.fromArrowImageWidth),t.fromArrowImageHeight&&(r.from.imageHeight=t.fromArrowImageHeight)),t.toArrow&&(r.to=this.edgeType.getArrowData(e,`to`,n,this.selected,this.hover,t),!1===t.arrowStrikethrough&&(this.edgeType.toPoint=r.to.core),t.toArrowSrc&&(r.to.image=this.imagelist.load(t.toArrowSrc)),t.toArrowImageWidth&&(r.to.imageWidth=t.toArrowImageWidth),t.toArrowImageHeight&&(r.to.imageHeight=t.toArrowImageHeight)),t.middleArrow&&(r.middle=this.edgeType.getArrowData(e,`middle`,n,this.selected,this.hover,t),t.middleArrowSrc&&(r.middle.image=this.imagelist.load(t.middleArrowSrc)),t.middleArrowImageWidth&&(r.middle.imageWidth=t.middleArrowImageWidth),t.middleArrowImageHeight&&(r.middle.imageHeight=t.middleArrowImageHeight)),t.fromArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,r.from),t.middleArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,r.middle),t.toArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,r.to)}}},{key:`drawLabel`,value:function(e,t){if(this.options.label!==void 0){var n,r=this.from,i=this.to;if(this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover),r.id!=i.id){this.labelModule.pointToSelf=!1,n=this.edgeType.getPoint(.5,t),e.save();var a=this._getRotation(e);a.angle!=0&&(e.translate(a.x,a.y),e.rotate(a.angle)),this.labelModule.draw(e,n.x,n.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;var o=dS(e,this.options.selfReference.angle,this.options.selfReference.size,r);n=this._pointOnCircle(o.x,o.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,n.x,n.y,this.selected,this.hover)}}}},{key:`getItemsOnPoint`,value:function(e){var t=[];if(this.labelModule.visible()){var n=this._getRotation();lS(this.labelModule.getSize(),e,n)&&t.push({edgeId:this.id,labelId:0})}var r={left:e.x,top:e.y};return this.isOverlappingWith(r)&&t.push({edgeId:this.id}),t}},{key:`isOverlappingWith`,value:function(e){if(this.connected){var t=this.from.x,n=this.from.y,r=this.to.x,i=this.to.y,a=e.left,o=e.top;return this.edgeType.getDistanceToEdge(t,n,r,i,a,o)<10}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 r={x:n.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible()||this.options.font.align===`horizontal`)return r;var i=this.from.y-this.to.y,a=this.from.x-this.to.x,o=Math.atan2(i,a);return(o<-1&&a<0||o>0&&a<0)&&(o+=Math.PI),r.angle=o,r}},{key:`_pointOnCircle`,value:function(e,t,n,r){return{x:e+n*Math.cos(r),y:t-n*Math.sin(r)}}},{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],r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=arguments.length>4&&arguments[4]!==void 0&&arguments[4];if(Ev([`endPointOffset`,`arrowStrikethrough`,`id`,`from`,`hidden`,`hoverWidth`,`labelHighlightBold`,`length`,`line`,`opacity`,`physics`,`scaling`,`selectionWidth`,`selfReferenceSize`,`selfReference`,`to`,`title`,`value`,`width`,`font`,`chosen`,`widthConstraint`],e,t,n),t.endPointOffset!==void 0&&t.endPointOffset.from!==void 0&&(mx(t.endPointOffset.from)?e.endPointOffset.from=t.endPointOffset.from:(e.endPointOffset.from=r.endPointOffset.from===void 0?0:r.endPointOffset.from,console.error(`endPointOffset.from is not a valid number`))),t.endPointOffset!==void 0&&t.endPointOffset.to!==void 0&&(mx(t.endPointOffset.to)?e.endPointOffset.to=t.endPointOffset.to:(e.endPointOffset.to=r.endPointOffset.to===void 0?0:r.endPointOffset.to,console.error(`endPointOffset.to is not a valid number`))),uS(t.label)?e.label=t.label:uS(e.label)||(e.label=void 0),Vv(e,t,`smooth`,r),Vv(e,t,`shadow`,r),Vv(e,t,`background`,r),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:!0===n&&t.dashes===null&&(e.dashes=zh(r.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),Vv(e.scaling,t.scaling,`label`,r.scaling)):!0===n&&t.scaling===null&&(e.scaling=zh(r.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows==`string`){var a=t.arrows.toLowerCase();e.arrows.to.enabled=Ih(a).call(a,`to`)!=-1,e.arrows.middle.enabled=Ih(a).call(a,`middle`)!=-1,e.arrows.from.enabled=Ih(a).call(a,`from`)!=-1}else{if(xf(t.arrows)!==`object`)throw Error(`The arrow newOptions can only be an object or a string. Refer to the documentation. You used:`+Hh(t.arrows));Vv(e.arrows,t.arrows,`to`,r.arrows),Vv(e.arrows,t.arrows,`middle`,r.arrows),Vv(e.arrows,t.arrows,`from`,r.arrows)}else !0===n&&t.arrows===null&&(e.arrows=zh(r.arrows));if(t.color!==void 0&&t.color!==null){var o=Sv(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,s=e.color;if(i)Ov(s,r.color,!1,n);else for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&delete s[c];if(Sv(s))s.color=s,s.highlight=s,s.hover=s,s.inherit=!1,o.opacity===void 0&&(s.opacity=1);else{var l=!1;o.color!==void 0&&(s.color=o.color,l=!0),o.highlight!==void 0&&(s.highlight=o.highlight,l=!0),o.hover!==void 0&&(s.hover=o.hover,l=!0),o.inherit!==void 0&&(s.inherit=o.inherit),o.opacity!==void 0&&(s.opacity=Math.min(1,Math.max(0,o.opacity))),!0===l?s.inherit=!1:s.inherit===void 0&&(s.inherit=`from`)}}else !0===n&&t.color===null&&(e.color=Bv(r.color));!0===n&&t.font===null&&(e.font=Bv(r.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)}}]),e}(),Fw=function(){function e(t,n,r){var i,a=this;H(this,e),this.body=t,this.images=n,this.groups=r,this.body.functions.createEdge=V(i=this.create).call(i,this),this.edgesListeners={add:function(e,t){a.add(t.items)},update:function(e,t){a.update(t.items)},remove:function(e,t){a.remove(t.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(e,t,n,r){if(t===e)return .5;var i=1/(t-e);return Math.max(0,(r-e)*i)}},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},Ov(this.options,this.defaultOptions),this.bindEventListeners()}return U(e,[{key:`bindEventListeners`,value:function(){var e,t,n=this;this.body.emitter.on(`_forceDisableDynamicCurves`,(function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];e===`dynamic`&&(e=`continuous`);var r=!1;for(var i in n.body.edges)if(Object.prototype.hasOwnProperty.call(n.body.edges,i)){var a=n.body.edges[i],o=n.body.data.edges.get(i);if(o!=null){var s=o.smooth;s!==void 0&&!0===s.enabled&&s.type===`dynamic`&&(e===void 0?a.setOptions({smooth:!1}):a.setOptions({smooth:{type:e}}),r=!0)}}!0===t&&!0===r&&n.body.emitter.emit(`_dataChanged`)})),this.body.emitter.on(`_dataUpdated`,(function(){n.reconnectEdges()})),this.body.emitter.on(`refreshEdges`,V(e=this.refresh).call(e,this)),this.body.emitter.on(`refresh`,V(t=this.refresh).call(t,this)),this.body.emitter.on(`destroy`,(function(){W(n.edgesListeners,(function(e,t){n.body.data.edges&&n.body.data.edges.off(t,e)})),delete n.body.functions.createEdge,delete n.edgesListeners.add,delete n.edgesListeners.update,delete n.edgesListeners.remove,delete n.edgesListeners}))}},{key:`setOptions`,value:function(e){if(e!==void 0){Pw.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 r in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,r)&&this.body.edges[r].updateLabelModule();e.hidden===void 0&&e.physics===void 0&&!0!==t||this.body.emitter.emit(`_dataChanged`)}}},{key:`setData`,value:function(e){var n=this,r=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=this.body.data.edges;if(t.isDataViewLike(`id`,e))this.body.data.edges=e;else if(Tp(e))this.body.data.edges=new t.DataSet,this.body.data.edges.add(e);else{if(e)throw TypeError(`Array or DataSet expected`);this.body.data.edges=new t.DataSet}if(i&&W(this.edgesListeners,(function(e,t){i.off(t,e)})),this.body.edges={},this.body.data.edges){W(this.edgesListeners,(function(e,t){n.body.data.edges.on(t,e)}));var a=this.body.data.edges.getIds();this.add(a,!0)}this.body.emitter.emit(`_adjustEdgesForHierarchicalLayout`),!1===r&&this.body.emitter.emit(`_dataChanged`)}},{key:`add`,value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.body.edges,r=this.body.data.edges,i=0;i<e.length;i++){var a=e[i],o=n[a];o&&o.disconnect();var s=r.get(a,{showInternalIds:!0});n[a]=this.create(s)}this.body.emitter.emit(`_adjustEdgesForHierarchicalLayout`),!1===t&&this.body.emitter.emit(`_dataChanged`)}},{key:`update`,value:function(e){for(var t=this.body.edges,n=this.body.data.edges,r=!1,i=0;i<e.length;i++){var a=e[i],o=n.get(a),s=t[a];s===void 0?(this.body.edges[a]=this.create(o),r=!0):(s.disconnect(),r=s.setOptions(o)||r,s.connect())}!0===r?(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];if(e.length!==0){var n=this.body.edges;W(e,(function(e){var t=n[e];t!==void 0&&t.remove()})),t&&this.body.emitter.emit(`_dataChanged`)}}},{key:`refresh`,value:function(){var e=this;W(this.body.edges,(function(t,n){var r=e.body.data.edges.get(n);r!==void 0&&t.setOptions(r)}))}},{key:`create`,value:function(e){return new Pw(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 r=n[e];r.from=null,r.to=null,r.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=[];W(this.body.edges,(function(n,r){var i=e.body.nodes[n.toId],a=e.body.nodes[n.fromId];i!==void 0&&!0===i.isCluster||a!==void 0&&!0===a.isCluster||i!==void 0&&a!==void 0||t.push(r)})),this.remove(t,!1)}},{key:`_addMissingEdges`,value:function(){var e=this.body.data.edges;if(e!=null){var t=this.body.edges,n=[];Xp(e).call(e,(function(e,r){t[r]===void 0&&n.push(r)})),this.add(n,!0)}}}]),e}(),Iw=function(){function e(t,n,r){H(this,e),this.body=t,this.physicsBody=n,this.barnesHutTree,this.setOptions(r),this._rng=mv(`BARNES HUT SOLVER`)}return U(e,[{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,r=n.length,i=this._formBarnesHutTree(t,n);this.barnesHutTree=i;for(var a=0;a<r;a++)(e=t[n[a]]).options.mass>0&&this._getForceContributions(i.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,r=e.centerOfMass.y-t.y,i=Math.sqrt(n*n+r*r);i*e.calcSize>this.thetaInversed?this._calculateForces(i,n,r,t,e):e.childrenCount===4?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(i,n,r,t,e)}}},{key:`_calculateForces`,value:function(e,t,n,r,i){e===0&&(t=e=.1),this.overlapAvoidanceFactor<1&&r.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*r.shape.radius,e-r.shape.radius));var a=this.options.gravitationalConstant*i.mass*r.options.mass/e**3,o=t*a,s=n*a;this.physicsBody.forces[r.id].x+=o,this.physicsBody.forces[r.id].y+=s}},{key:`_formBarnesHutTree`,value:function(e,t){for(var n,r=t.length,i=e[t[0]].x,a=e[t[0]].y,o=e[t[0]].x,s=e[t[0]].y,c=1;c<r;c++){var l=e[t[c]],u=l.x,d=l.y;l.options.mass>0&&(u<i&&(i=u),u>o&&(o=u),d<a&&(a=d),d>s&&(s=d))}var f=Math.abs(o-i)-Math.abs(s-a);f>0?(a-=.5*f,s+=.5*f):(i+=.5*f,o-=.5*f);var p=Math.max(1e-5,Math.abs(o-i)),m=.5*p,h=.5*(i+o),g=.5*(a+s),_={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:h-m,maxX:h+m,minY:g-m,maxY:g+m},size:p,calcSize:1/p,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(_.root);for(var v=0;v<r;v++)(n=e[t[v]]).options.mass>0&&this._placeInTree(_.root,n);return _}},{key:`_updateBranchMass`,value:function(e,t){var n=e.centerOfMass,r=e.mass+t.options.mass,i=1/r;n.x=n.x*e.mass+t.x*t.options.mass,n.x*=i,n.y=n.y*e.mass+t.y*t.options.mass,n.y*=i,e.mass=r;var a=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidth<a?a:e.maxWidth}},{key:`_placeInTree`,value:function(e,t,n){n==1&&n!==void 0||this._updateBranchMass(e,t);var r,i=e.children.NW.range;r=i.maxX>t.x?i.maxY>t.y?`NW`:`SW`:i.maxY>t.y?`NE`:`SE`,this._placeInRegion(e,t,r)}},{key:`_placeInRegion`,value:function(e,t,n){var r=e.children[n];switch(r.childrenCount){case 0:r.children.data=t,r.childrenCount=1,this._updateBranchMass(r,t);break;case 1:r.children.data.x===t.x&&r.children.data.y===t.y?(t.x+=this._rng(),t.y+=this._rng()):(this._splitBranch(r),this._placeInTree(r,t));break;case 4:this._placeInTree(r,t)}}},{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,r,i,a,o=.5*e.size;switch(t){case`NW`:n=e.range.minX,r=e.range.minX+o,i=e.range.minY,a=e.range.minY+o;break;case`NE`:n=e.range.minX+o,r=e.range.maxX,i=e.range.minY,a=e.range.minY+o;break;case`SW`:n=e.range.minX,r=e.range.minX+o,i=e.range.minY+o,a=e.range.maxY;break;case`SE`:n=e.range.minX+o,r=e.range.maxX,i=e.range.minY+o,a=e.range.maxY}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:n,maxX:r,minY:i,maxY:a},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()}}]),e}(),Lw=function(){function e(t,n,r){H(this,e),this._rng=mv(`REPULSION SOLVER`),this.body=t,this.physicsBody=n,this.setOptions(r)}return U(e,[{key:`setOptions`,value:function(e){this.options=e}},{key:`solve`,value:function(){for(var e,t,n,r,i,a,o,s,c=this.body.nodes,l=this.physicsBody.physicsNodeIndices,u=this.physicsBody.forces,d=this.options.nodeDistance,f=-2/3/d,p=0;p<l.length-1;p++){o=c[l[p]];for(var m=p+1;m<l.length;m++)e=(s=c[l[m]]).x-o.x,t=s.y-o.y,(n=Math.sqrt(e*e+t*t))===0&&(e=n=.1*this._rng()),n<2*d&&(a=n<.5*d?1:f*n+1.3333333333333333,r=e*(a/=n),i=t*a,u[o.id].x-=r,u[o.id].y-=i,u[s.id].x+=r,u[s.id].y+=i)}}}]),e}(),Rw=function(){function e(t,n,r){H(this,e),this.body=t,this.physicsBody=n,this.setOptions(r)}return U(e,[{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,r=this.options.nodeDistance,i=0;i<t.length-1;i++)for(var a=e[t[i]],o=i+1;o<t.length;o++){var s=e[t[o]];if(a.level===s.level){var c=r+this.overlapAvoidanceFactor*((a.shape.radius||0)/2+(s.shape.radius||0)/2),l=s.x-a.x,u=s.y-a.y,d=Math.sqrt(l*l+u*u),f=void 0;f=d<c?-((.05*d)**2)+(.05*c)**2:0,d!==0&&(f/=d);var p=l*f,m=u*f;n[a.id].x-=p,n[a.id].y-=m,n[s.id].x+=p,n[s.id].y+=m}}}}]),e}(),zw=function(){function e(t,n,r){H(this,e),this.body=t,this.physicsBody=n,this.setOptions(r)}return U(e,[{key:`setOptions`,value:function(e){this.options=e}},{key:`solve`,value:function(){for(var e,t,n,r,i,a=this.physicsBody.physicsEdgeIndices,o=this.body.edges,s=0;s<a.length;s++)!0===(t=o[a[s]]).connected&&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?1.5*this.options.springLength:t.options.length,this._calculateSpringForce(t.from,t.to,e)):(e=t.options.length===void 0?this.options.springLength:t.options.length,n=t.to,r=t.edgeType.via,i=t.from,this._calculateSpringForce(n,r,.5*e),this._calculateSpringForce(r,i,.5*e)))}},{key:`_calculateSpringForce`,value:function(e,t,n){var r=e.x-t.x,i=e.y-t.y,a=Math.max(Math.sqrt(r*r+i*i),.01),o=this.options.springConstant*(n-a)/a,s=r*o,c=i*o;this.physicsBody.forces[e.id]!==void 0&&(this.physicsBody.forces[e.id].x+=s,this.physicsBody.forces[e.id].y+=c),this.physicsBody.forces[t.id]!==void 0&&(this.physicsBody.forces[t.id].x-=s,this.physicsBody.forces[t.id].y-=c)}}]),e}(),Bw=function(){function e(t,n,r){H(this,e),this.body=t,this.physicsBody=n,this.setOptions(r)}return U(e,[{key:`setOptions`,value:function(e){this.options=e}},{key:`solve`,value:function(){for(var e,t,n,r,i,a,o,s,c,l,u=this.body.edges,d=.5,f=this.physicsBody.physicsEdgeIndices,p=this.physicsBody.physicsNodeIndices,m=this.physicsBody.forces,h=0;h<p.length;h++){var g=p[h];m[g].springFx=0,m[g].springFy=0}for(var _=0;_<f.length;_++)!0===(t=u[f[_]]).connected&&(e=t.options.length===void 0?this.options.springLength:t.options.length,n=t.from.x-t.to.x,r=t.from.y-t.to.y,s=(s=Math.sqrt(n*n+r*r))===0?.01:s,i=n*(o=this.options.springConstant*(e-s)/s),a=r*o,t.to.level==t.from.level?(m[t.toId]!==void 0&&(m[t.toId].x-=d*i,m[t.toId].y-=d*a),m[t.fromId]!==void 0&&(m[t.fromId].x+=d*i,m[t.fromId].y+=d*a)):(m[t.toId]!==void 0&&(m[t.toId].springFx-=i,m[t.toId].springFy-=a),m[t.fromId]!==void 0&&(m[t.fromId].springFx+=i,m[t.fromId].springFy+=a)));o=1;for(var v=0;v<p.length;v++){var y=p[v];c=Math.min(o,Math.max(-o,m[y].springFx)),l=Math.min(o,Math.max(-o,m[y].springFy)),m[y].x+=c,m[y].y+=l}for(var b=0,x=0,S=0;S<p.length;S++){var ee=p[S];b+=m[ee].x,x+=m[ee].y}for(var C=b/p.length,te=x/p.length,w=0;w<p.length;w++){var ne=p[w];m[ne].x-=C,m[ne].y-=te}}}]),e}(),Vw=function(){function e(t,n,r){H(this,e),this.body=t,this.physicsBody=n,this.setOptions(r)}return U(e,[{key:`setOptions`,value:function(e){this.options=e}},{key:`solve`,value:function(){for(var e,t,n,r,i=this.body.nodes,a=this.physicsBody.physicsNodeIndices,o=this.physicsBody.forces,s=0;s<a.length;s++)e=-(r=i[a[s]]).x,t=-r.y,n=Math.sqrt(e*e+t*t),this._calculateForces(n,e,t,o,r)}},{key:`_calculateForces`,value:function(e,t,n,r,i){var a=e===0?0:this.options.centralGravity/e;r[i.id].x=t*a,r[i.id].y=n*a}}]),e}();function Hw(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var Uw=function(e){qS(n,e);var t=Hw(n);function n(e,r,i){var a;return H(this,n),(a=t.call(this,e,r,i))._rng=mv(`FORCE ATLAS 2 BASED REPULSION SOLVER`),a}return U(n,[{key:`_calculateForces`,value:function(e,t,n,r,i){e===0&&(t=e=.1*this._rng()),this.overlapAvoidanceFactor<1&&r.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*r.shape.radius,e-r.shape.radius));var a=r.edges.length+1,o=this.options.gravitationalConstant*i.mass*r.options.mass*a/e**2,s=t*o,c=n*o;this.physicsBody.forces[r.id].x+=s,this.physicsBody.forces[r.id].y+=c}}]),n}(Iw);function Ww(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var Gw=function(e){qS(n,e);var t=Ww(n);function n(e,r,i){return H(this,n),t.call(this,e,r,i)}return U(n,[{key:`_calculateForces`,value:function(e,t,n,r,i){if(e>0){var a=i.edges.length+1,o=this.options.centralGravity*a*i.options.mass;r[i.id].x=t*o,r[i.id].y=n*o}}}]),n}(Vw),Kw=function(){function e(t){H(this,e),this.body=t,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}},jr(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return U(e,[{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),!0===e.ready&&e.startSimulation()})),this.body.emitter.on(`startSimulation`,(function(){!0===e.ready&&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(!1===e)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(!0===e)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,Dv([`stabilization`],this.options,e),Vv(this.options,e,`stabilization`),e.enabled===void 0&&(this.options.enabled=!0),!1===this.options.enabled&&(this.physicsEnabled=!1,this.stopSimulation());var t=this.options.wind;t&&((typeof t.x!=`number`||fx(t.x))&&(t.x=0),(typeof t.y!=`number`||fx(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 Uw(this.body,this.physicsBody,e),this.edgesSolver=new zw(this.body,this.physicsBody,e),this.gravitySolver=new Gw(this.body,this.physicsBody,e)):this.options.solver===`repulsion`?(e=this.options.repulsion,this.nodesSolver=new Lw(this.body,this.physicsBody,e),this.edgesSolver=new zw(this.body,this.physicsBody,e),this.gravitySolver=new Vw(this.body,this.physicsBody,e)):this.options.solver===`hierarchicalRepulsion`?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new Rw(this.body,this.physicsBody,e),this.edgesSolver=new Bw(this.body,this.physicsBody,e),this.gravitySolver=new Vw(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new Iw(this.body,this.physicsBody,e),this.edgesSolver=new zw(this.body,this.physicsBody,e),this.gravitySolver=new Vw(this.body,this.physicsBody,e)),this.modelOptions=e}},{key:`initPhysics`,value:function(){!0===this.physicsEnabled&&!0===this.options.enabled?!0===this.options.stabilization.enabled?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(){var e;!0===this.physicsEnabled&&!0===this.options.enabled?(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit(`_resizeNodes`),this.viewFunction===void 0&&(this.viewFunction=V(e=this.simulationStep).call(e,this),this.body.emitter.on(`initRedraw`,this.viewFunction),this.body.emitter.emit(`_startRendering`))):this.body.emitter.emit(`_redraw`)}},{key:`stopSimulation`,value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.stabilized=!0,!0===e&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off(`initRedraw`,this.viewFunction),this.viewFunction=void 0,!0===e&&this.body.emitter.emit(`_stopRendering`))}},{key:`simulationStep`,value:function(){var e=Rp();this.physicsTick(),(Rp()-e<.4*this.simulationInterval||!0===this.runDoubleSpeed)&&!1===this.stabilized&&(this.physicsTick(),this.runDoubleSpeed=!0),!0===this.stabilized&&this.stopSimulation()}},{key:`_emitStabilized`,value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||!0===this.startedStabilization)&&sg((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(){!0===this._evaluateStepQuality()?this.timestep=1.2*this.timestep:this.timestep/1.2<this.options.timestep?this.timestep=this.options.timestep:(this.adaptiveCounter=-1,this.timestep=Math.max(this.options.timestep,this.timestep/1.2))}},{key:`physicsTick`,value:function(){this._startStabilizing(),!0!==this.stabilized&&(!0===this.adaptiveTimestep&&!0===this.adaptiveTimestepEnabled?(this.adaptiveCounter%this.adaptiveInterval==0?(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):(this.timestep=this.options.timestep,this.physicsStep()),!0===this.stabilized&&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)&&!0===e[n].options.physics&&this.physicsBody.physicsNodeIndices.push(e[n].id);for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&!0===t[r].options.physics&&this.physicsBody.physicsEdgeIndices.push(t[r].id);for(var i=0;i<this.physicsBody.physicsNodeIndices.length;i++){var a=this.physicsBody.physicsNodeIndices[i];this.physicsBody.forces[a]={x:0,y:0},this.physicsBody.velocities[a]===void 0&&(this.physicsBody.velocities[a]={x:0,y:0})}for(var o in this.physicsBody.velocities)e[o]===void 0&&delete this.physicsBody.velocities[o]}},{key:`revert`,value:function(){var e=Pp(this.previousStates),t=this.body.nodes,n=this.physicsBody.velocities;this.referenceState={};for(var r=0;r<e.length;r++){var i=e[r];t[i]===void 0?delete this.previousStates[i]:!0===t[i].options.physics&&(this.referenceState[i]={positions:{x:t[i].x,y:t[i].y}},n[i].x=this.previousStates[i].vx,n[i].y=this.previousStates[i].vy,t[i].x=this.previousStates[i].x,t[i].y=this.previousStates[i].y)}}},{key:`_evaluateStepQuality`,value:function(){var e,t,n=this.body.nodes,r=this.referenceState;for(var i in this.referenceState)if(Object.prototype.hasOwnProperty.call(this.referenceState,i)&&n[i]!==void 0&&(e=n[i].x-r[i].positions.x,t=n[i].y-r[i].positions.y,Math.sqrt(e**2+t**2)>.3))return!1;return!0}},{key:`moveNodes`,value:function(){for(var e=this.physicsBody.physicsNodeIndices,t=0,n=0,r=0;r<e.length;r++){var i=e[r],a=this._performStep(i);t=Math.max(t,a),n+=a}this.adaptiveTimestepEnabled=n/e.length<5,this.stabilized=t<this.options.minVelocity}},{key:`calculateComponentVelocity`,value:function(e,t,n){e+=(t-this.modelOptions.damping*e)/n*this.timestep;var r=this.options.maxVelocity||1e9;return Math.abs(e)>r&&(e=e>0?r:-r),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 r=this.physicsBody.velocities[e];return this.previousStates[e]={x:t.x,y:t.y,vx:r.x,vy:r.y},!1===t.options.fixed.x?(r.x=this.calculateComponentVelocity(r.x,n.x,t.options.mass),t.x+=r.x*this.timestep):(n.x=0,r.x=0),!1===t.options.fixed.y?(r.y=this.calculateComponentVelocity(r.y,n.y,t.options.mass),t.y+=r.y*this.timestep):(n.y=0,r.y=0),Math.sqrt(r.x**2+r.y**2)}},{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;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:(this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit(`_resizeNodes`),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit(`_blockRedraw`),this.targetIterations=t,!0===this.options.stabilization.onlyDynamicEdges&&this._freezeNodes(),this.stabilizationIterations=0,sg((function(){return e._stabilizationBatch()}),0))}},{key:`_startStabilizing`,value:function(){return!0!==this.startedStabilization&&(this.body.emitter.emit(`startStabilizing`),this.startedStabilization=!0,!0)}},{key:`_stabilizationBatch`,value:function(){var e=this,t=function(){return!1===e.stabilized&&e.stabilizationIterations<e.targetIterations},n=function(){e.body.emitter.emit(`stabilizationProgress`,{iterations:e.stabilizationIterations,total:e.targetIterations})};this._startStabilizing()&&n();for(var r,i=0;t()&&i<this.options.stabilization.updateInterval;)this.physicsTick(),i++;n(),t()?sg(V(r=this._stabilizationBatch).call(r,this),0):this._finalizeStabilization()}},{key:`_finalizeStabilization`,value:function(){this.body.emitter.emit(`_allowRedraw`),!0===this.options.stabilization.fit&&this.body.emitter.emit(`fit`),!0===this.options.stabilization.onlyDynamicEdges&&this._restoreFrozenNodes(),this.body.emitter.emit(`stabilizationIterationsDone`),this.body.emitter.emit(`_requestRedraw`),!0===this.stabilized?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],r=this.body.nodes[n],i=this.physicsBody.forces[n],a=Math.sqrt(i.x**2+i.x**2),o=Math.min(Math.max(5,a),15),s=3*o,c=Lv((180-180*Math.min(1,Math.max(0,.03*a)))/360,1,1),l={x:r.x+20*i.x,y:r.y+20*i.y};e.lineWidth=o,e.strokeStyle=c,e.beginPath(),e.moveTo(r.x,r.y),e.lineTo(l.x,l.y),e.stroke();var u=Math.atan2(i.y,i.x);e.fillStyle=c,gw.draw(e,{type:`arrow`,point:l,angle:u,length:s}),gg(e).call(e)}}}]),e}();let qw,Jw=new Uint8Array(16);function Yw(){if(!qw&&(qw=typeof crypto<`u`&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!qw))throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);return qw(Jw)}let Xw=[];for(let e=0;e<256;++e)Xw.push((e+256).toString(16).slice(1));var Zw={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Qw(e,t,n){if(Zw.randomUUID&&!t&&!e)return Zw.randomUUID();let r=(e||={}).random||(e.rng||Yw)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n||=0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return Xw[e[t+0]]+Xw[e[t+1]]+Xw[e[t+2]]+Xw[e[t+3]]+`-`+Xw[e[t+4]]+Xw[e[t+5]]+`-`+Xw[e[t+6]]+Xw[e[t+7]]+`-`+Xw[e[t+8]]+Xw[e[t+9]]+`-`+Xw[e[t+10]]+Xw[e[t+11]]+Xw[e[t+12]]+Xw[e[t+13]]+Xw[e[t+14]]+Xw[e[t+15]]}(r)}var $w=function(){function e(){H(this,e)}return U(e,null,[{key:`getRange`,value:function(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=1e9,i=-1e9,a=1e9,o=-1e9;if(n.length>0)for(var s=0;s<n.length;s++)a>(t=e[n[s]]).shape.boundingBox.left&&(a=t.shape.boundingBox.left),o<t.shape.boundingBox.right&&(o=t.shape.boundingBox.right),r>t.shape.boundingBox.top&&(r=t.shape.boundingBox.top),i<t.shape.boundingBox.bottom&&(i=t.shape.boundingBox.bottom);return a===1e9&&o===-1e9&&r===1e9&&i===-1e9&&(r=0,i=0,a=0,o=0),{minX:a,maxX:o,minY:r,maxY:i}}},{key:`getRangeCore`,value:function(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=1e9,i=-1e9,a=1e9,o=-1e9;if(n.length>0)for(var s=0;s<n.length;s++)a>(t=e[n[s]]).x&&(a=t.x),o<t.x&&(o=t.x),r>t.y&&(r=t.y),i<t.y&&(i=t.y);return a===1e9&&o===-1e9&&r===1e9&&i===-1e9&&(r=0,i=0,a=0,o=0),{minX:a,maxX:o,minY:r,maxY:i}}},{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`?(Ov(n,e.options,!0),n.x=e.x,n.y=e.y,n.amountOfConnections=e.edges.length):Ov(n,e.options,!0),n}}]),e}();function eT(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var tT=function(e){qS(n,e);var t=eT(n);function n(e,r,i,a,o,s){var c;return H(this,n),(c=t.call(this,e,r,i,a,o,s)).isCluster=!0,c.containedNodes={},c.containedEdges={},c}return U(n,[{key:`_openChildCluster`,value:function(e){var t=this,n=this.body.nodes[e];if(this.containedNodes[e]===void 0)throw Error(`node with id: `+e+` not in current cluster`);if(!n.isCluster)throw Error(`node with id: `+e+` is not a cluster`);delete this.containedNodes[e],W(n.edges,(function(e){delete t.containedEdges[e.id]})),W(n.containedNodes,(function(e,n){t.containedNodes[n]=e})),n.containedNodes={},W(n.containedEdges,(function(e,n){t.containedEdges[n]=e})),n.containedEdges={},W(n.edges,(function(e){W(t.edges,(function(n){var r,i,a=Ih(r=n.clusteringEdgeReplacingIds).call(r,e.id);a!==-1&&(W(e.clusteringEdgeReplacingIds,(function(e){n.clusteringEdgeReplacingIds.push(e),t.body.edges[e].edgeReplacedById=n.id})),Em(i=n.clusteringEdgeReplacingIds).call(i,a,1))}))})),n.edges=[]}}]),n}(LC),nT=function(){function e(t){var n=this;H(this,e),this.body=t,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},jr(this.options,this.defaultOptions),this.body.emitter.on(`_resetData`,(function(){n.clusteredNodes={},n.clusteredEdges={}}))}return U(e,[{key:`clusterByHubsize`,value:function(e,t){e===void 0?e=this._getHubSize():xf(e)===`object`&&(t=this._checkOptions(e),e=this._getHubSize());for(var n=[],r=0;r<this.body.nodeIndices.length;r++){var i=this.body.nodes[this.body.nodeIndices[r]];i.edges.length>=e&&n.push(i.id)}for(var a=0;a<n.length;a++)this.clusterByConnection(n[a],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];if(t.joinCondition===void 0)throw Error(`Cannot call clusterByNodeData without a joinCondition function in the options.`);t=this._checkOptions(t);var r={},i={};W(this.body.nodes,(function(n,a){n.options&&!0===t.joinCondition(n.options)&&(r[a]=n,W(n.edges,(function(t){e.clusteredEdges[t.id]===void 0&&(i[t.id]=t)})))})),this._cluster(r,i,t,n)}},{key:`clusterByEdgeCount`,value:function(e,t){var n=this,r=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];t=this._checkOptions(t);for(var i,a,o,s=[],c={},l=function(){var r={},l={},d=n.body.nodeIndices[u],f=n.body.nodes[d];if(c[d]===void 0){o=0,a=[];for(var p=0;p<f.edges.length;p++)i=f.edges[p],n.clusteredEdges[i.id]===void 0&&(i.toId!==i.fromId&&o++,a.push(i));if(o===e){for(var m=function(e){if(t.joinCondition===void 0||t.joinCondition===null)return!0;var n=$w.cloneOptions(e);return t.joinCondition(n)},h=!0,g=0;g<a.length;g++){i=a[g];var _=n._getConnectedId(i,d);if(!m(f)){h=!1;break}l[i.id]=i,r[d]=f,r[_]=n.body.nodes[_],c[d]=!0}if(Pp(r).length>0&&Pp(l).length>0&&!0===h){var v=function(){for(var e=0;e<s.length;++e)for(var t in r)if(s[e].nodes[t]!==void 0)return s[e]}();if(v!==void 0){for(var y in r)v.nodes[y]===void 0&&(v.nodes[y]=r[y]);for(var b in l)v.edges[b]===void 0&&(v.edges[b]=l[b])}else s.push({nodes:r,edges:l})}}}},u=0;u<this.body.nodeIndices.length;u++)l();for(var d=0;d<s.length;d++)this._cluster(s[d].nodes,s[d].edges,t,!1);!0===r&&this.body.emitter.emit(`_dataChanged`)}},{key:`clusterOutliers`,value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.clusterByEdgeCount(1,e,t)}},{key:`clusterBridges`,value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.clusterByEdgeCount(2,e,t)}},{key:`clusterByConnection`,value:function(e,t){var n,r=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];if(e===void 0)throw Error(`No nodeId supplied to clusterByConnection!`);if(this.body.nodes[e]===void 0)throw Error(`The nodeId given to clusterByConnection does not exist!`);var i=this.body.nodes[e];(t=this._checkOptions(t,i)).clusterNodeProperties.x===void 0&&(t.clusterNodeProperties.x=i.x),t.clusterNodeProperties.y===void 0&&(t.clusterNodeProperties.y=i.y),t.clusterNodeProperties.fixed===void 0&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=i.options.fixed.x,t.clusterNodeProperties.fixed.y=i.options.fixed.y);var a={},o={},s=i.id,c=$w.cloneOptions(i);a[s]=i;for(var l=0;l<i.edges.length;l++){var u=i.edges[l];if(this.clusteredEdges[u.id]===void 0){var d=this._getConnectedId(u,s);if(this.clusteredNodes[d]===void 0)if(d!==s)if(t.joinCondition===void 0)o[u.id]=u,a[d]=this.body.nodes[d];else{var f=$w.cloneOptions(this.body.nodes[d]);!0===t.joinCondition(c,f)&&(o[u.id]=u,a[d]=this.body.nodes[d])}else o[u.id]=u}}var p=jp(n=Pp(a)).call(n,(function(e){return a[e].id}));for(var m in a)if(Object.prototype.hasOwnProperty.call(a,m))for(var h=a[m],g=0;g<h.edges.length;g++){var _=h.edges[g];Ih(p).call(p,this._getConnectedId(_,h.id))>-1&&(o[_.id]=_)}this._cluster(a,o,t,r)}},{key:`_createClusterEdges`,value:function(e,t,n,r){for(var i,a,o,s,c,l,u=Pp(e),d=[],f=0;f<u.length;f++){o=e[a=u[f]];for(var p=0;p<o.edges.length;p++)i=o.edges[p],this.clusteredEdges[i.id]===void 0&&(i.toId==i.fromId?t[i.id]=i:i.toId==a?(s=n.id,l=c=i.fromId):(s=i.toId,c=n.id,l=s),e[l]===void 0&&d.push({edge:i,fromId:c,toId:s}))}for(var m=[],h=function(e){for(var t=0;t<m.length;t++){var n=m[t],r=e.fromId===n.fromId&&e.toId===n.toId,i=e.fromId===n.toId&&e.toId===n.fromId;if(r||i)return n}return null},g=0;g<d.length;g++){var _=d[g],v=_.edge,y=h(_);y===null?(y=this._createClusteredEdge(_.fromId,_.toId,v,r),m.push(y)):y.clusteringEdgeReplacingIds.push(v.id),this.body.edges[v.id].edgeReplacedById=y.id,this._backupEdgeOptions(v),v.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 r=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],i=[];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&this.clusteredNodes[a]!==void 0&&i.push(a);for(var o=0;o<i.length;++o)delete e[i[o]];if(Pp(e).length!=0&&(Pp(e).length!=1||n.clusterNodeProperties.allowSingleNodeCluster==1)){var s=Ov({},n.clusterNodeProperties);if(n.processProperties!==void 0){var c=[];for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){var u=$w.cloneOptions(e[l]);c.push(u)}var d=[];for(var f in t)if(Object.prototype.hasOwnProperty.call(t,f)&&f.substr(0,12)!==`clusterEdge:`){var p=$w.cloneOptions(t[f],`edge`);d.push(p)}if(!(s=n.processProperties(s,c,d)))throw Error(`The processProperties function does not return properties!`)}s.id===void 0&&(s.id=`cluster:`+Qw());var m=s.id;s.label===void 0&&(s.label=`cluster`);var h=void 0;s.x===void 0&&(h=this._getClusterPosition(e),s.x=h.x),s.y===void 0&&(h===void 0&&(h=this._getClusterPosition(e)),s.y=h.y),s.id=m;var g=this.body.functions.createNode(s,tT);g.containedNodes=e,g.containedEdges=t,g.clusterEdgeProperties=n.clusterEdgeProperties,this.body.nodes[s.id]=g,this._clusterEdges(e,t,s,n.clusterEdgeProperties),s.id=void 0,!0===r&&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?(console.error(`Node does not exist.`),!1):!0===this.body.nodes[e].isCluster}},{key:`_getClusterPosition`,value:function(e){for(var t,n=Pp(e),r=e[n[0]].x,i=e[n[0]].x,a=e[n[0]].y,o=e[n[0]].y,s=1;s<n.length;s++)r=(t=e[n[s]]).x<r?t.x:r,i=t.x>i?t.x:i,a=t.y<a?t.y:a,o=t.y>o?t.y:o;return{x:.5*(r+i),y:.5*(a+o)}}},{key:`openCluster`,value:function(e,t){var n=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];if(e===void 0)throw Error(`No clusterNodeId supplied to openCluster.`);var r=this.body.nodes[e];if(r===void 0)throw Error(`The clusterNodeId supplied to openCluster does not exist.`);if(!0!==r.isCluster||r.containedNodes===void 0||r.containedEdges===void 0)throw Error(`The node:`+e+` is not a valid cluster.`);var i=this.findNode(e),a=Ih(i).call(i,e)-1;if(a>=0){var o=i[a];this.body.nodes[o]._openChildCluster(e),delete this.body.nodes[e],!0===n&&this.body.emitter.emit(`_dataChanged`);return}var s=r.containedNodes,c=r.containedEdges;if(t!==void 0&&t.releaseFunction!==void 0&&typeof t.releaseFunction==`function`){var l={},u={x:r.x,y:r.y};for(var d in s)if(Object.prototype.hasOwnProperty.call(s,d)){var f=this.body.nodes[d];l[d]={x:f.x,y:f.y}}var p=t.releaseFunction(u,l);for(var m in s)if(Object.prototype.hasOwnProperty.call(s,m)){var h=this.body.nodes[m];p[m]!==void 0&&(h.x=p[m].x===void 0?r.x:p[m].x,h.y=p[m].y===void 0?r.y:p[m].y)}}else W(s,(function(e){!1===e.options.fixed.x&&(e.x=r.x),!1===e.options.fixed.y&&(e.y=r.y)}));for(var g in s)if(Object.prototype.hasOwnProperty.call(s,g)){var _=this.body.nodes[g];_.vx=r.vx,_.vy=r.vy,_.setOptions({physics:!0}),delete this.clusteredNodes[g]}for(var v=[],y=0;y<r.edges.length;y++)v.push(r.edges[y]);for(var b=0;b<v.length;b++){for(var x=v[b],S=this._getConnectedId(x,e),ee=this.clusteredNodes[S],C=0;C<x.clusteringEdgeReplacingIds.length;C++){var te=x.clusteringEdgeReplacingIds[C],w=this.body.edges[te];if(w!==void 0)if(ee!==void 0){var ne=this.body.nodes[ee.clusterId];ne.containedEdges[w.id]=w,delete c[w.id];var T=w.fromId,E=w.toId;w.toId==S?E=ee.clusterId:T=ee.clusterId,this._createClusteredEdge(T,E,w,ne.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(w)}x.remove()}for(var D in c)Object.prototype.hasOwnProperty.call(c,D)&&this._restoreEdge(c[D]);delete this.body.nodes[e],!0===n&&this.body.emitter.emit(`_dataChanged`)}},{key:`getNodesInCluster`,value:function(e){var t=[];if(!0===this.isCluster(e)){var n=this.body.nodes[e].containedNodes;for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&t.push(this.body.nodes[r].id)}return t}},{key:`findNode`,value:function(e){for(var t,n=[],r=0;this.clusteredNodes[e]!==void 0&&r<100;){if((t=this.body.nodes[e])===void 0)return[];n.push(t.id),e=this.clusteredNodes[e].clusterId,r++}return(t=this.body.nodes[e])===void 0?[]:(n.push(t.id),am(n).call(n),n)}},{key:`updateClusteredNode`,value:function(e,t){if(e===void 0)throw Error(`No clusteredNodeId supplied to updateClusteredNode.`);if(t===void 0)throw Error(`No newOptions supplied to updateClusteredNode.`);if(this.body.nodes[e]===void 0)throw 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 Error(`No startEdgeId supplied to updateEdge.`);if(t===void 0)throw Error(`No newOptions supplied to updateEdge.`);if(this.body.edges[e]===void 0)throw Error(`The startEdgeId supplied to updateEdge does not exist.`);for(var n=this.getClusteredEdges(e),r=0;r<n.length;r++)this.body.edges[n[r]].setOptions(t);this.body.emitter.emit(`_dataChanged`)}},{key:`getClusteredEdges`,value:function(e){for(var t=[],n=0;e!==void 0&&this.body.edges[e]!==void 0&&n<100;)t.push(this.body.edges[e].id),e=this.body.edges[e].edgeReplacedById,n++;return am(t).call(t),t}},{key:`getBaseEdge`,value:function(e){return this.getBaseEdges(e)[0]}},{key:`getBaseEdges`,value:function(e){for(var t=[e],n=[],r=[],i=0;t.length>0&&i<100;){var a=t.pop();if(a!==void 0){var o=this.body.edges[a];if(o!==void 0){i++;var s=o.clusteringEdgeReplacingIds;if(s===void 0)r.push(a);else for(var c=0;c<s.length;++c){var l=s[c];Ih(t).call(t,s)===-1&&Ih(n).call(n,s)===-1&&t.push(l)}n.push(a)}}}return r}},{key:`_getConnectedId`,value:function(e,t){return e.toId==t?(e.fromId,e.fromId):e.toId}},{key:`_getHubSize`,value:function(){for(var e=0,t=0,n=0,r=0,i=0;i<this.body.nodeIndices.length;i++){var a=this.body.nodes[this.body.nodeIndices[i]];a.edges.length>r&&(r=a.edges.length),e+=a.edges.length,t+=a.edges.length**2,n+=1}e/=n;var o=(t/=n)-e**2,s=Math.floor(e+2*Math.sqrt(o));return s>r&&(s=r),s}},{key:`_createClusteredEdge`,value:function(e,t,n,r,i){var a=$w.cloneOptions(n,`edge`);Ov(a,r),a.from=e,a.to=t,a.id=`clusterEdge:`+Qw(),i!==void 0&&Ov(a,i);var o=this.body.functions.createEdge(a);return o.clusteringEdgeReplacingIds=[n.id],o.connect(),this.body.edges[o.id]=o,o}},{key:`_clusterEdges`,value:function(e,t,n,r){if(t instanceof Pw){var i=t,a={};a[i.id]=i,t=a}if(e instanceof LC){var o=e,s={};s[o.id]=o,e=s}if(n==null)throw Error(`_clusterEdges: parameter clusterNode required`);for(var c in r===void 0&&(r=n.clusterEdgeProperties),this._createClusterEdges(e,t,n,r),t)if(Object.prototype.hasOwnProperty.call(t,c)&&this.body.edges[c]!==void 0){var l=this.body.edges[c];this._backupEdgeOptions(l),l.setOptions({physics:!1})}for(var u in e)Object.prototype.hasOwnProperty.call(e,u)&&(this.clusteredNodes[u]={clusterId:n.id,node:this.body.nodes[u]},this.body.nodes[u].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 W(e,(function(e){t(e)&&n.push(e)})),n}},{key:`_updateState`,value:function(){var e,t=this,n=[],r={},i=function(e){W(t.body.nodes,(function(t){!0===t.isCluster&&e(t)}))};for(e in this.clusteredNodes)Object.prototype.hasOwnProperty.call(this.clusteredNodes,e)&&this.body.nodes[e]===void 0&&n.push(e);i((function(e){for(var t=0;t<n.length;t++)delete e.containedNodes[n[t]]}));for(var a=0;a<n.length;a++)delete this.clusteredNodes[n[a]];W(this.clusteredEdges,(function(e){var n=t.body.edges[e];n!==void 0&&n.endPointsValid()||(r[e]=e)})),i((function(e){W(e.containedEdges,(function(e,t){e.endPointsValid()||r[t]||(r[t]=t)}))})),W(this.body.edges,(function(e,n){var i=!0,a=e.clusteringEdgeReplacingIds;if(a!==void 0){var o=0;W(a,(function(e){var n=t.body.edges[e];n!==void 0&&n.endPointsValid()&&(o+=1)})),i=o>0}e.endPointsValid()&&i||(r[n]=n)})),i((function(e){W(r,(function(n){delete e.containedEdges[n],W(e.edges,(function(i,a){i.id===n?e.edges[a]=null:i.clusteringEdgeReplacingIds=t._filter(i.clusteringEdgeReplacingIds,(function(e){return!r[e]}))})),e.edges=t._filter(e.edges,(function(e){return e!==null}))}))})),W(r,(function(e){delete t.clusteredEdges[e]})),W(r,(function(e){delete t.body.edges[e]})),W(Pp(this.body.edges),(function(e){var n=t.body.edges[e],r=t._isClusteredNode(n.fromId)||t._isClusteredNode(n.toId);if(r!==t._isClusteredEdge(n.id))if(r){var i=t._getClusterNodeForNode(n.fromId);i!==void 0&&t._clusterEdges(t.body.nodes[n.fromId],n,i);var a=t._getClusterNodeForNode(n.toId);a!==void 0&&t._clusterEdges(t.body.nodes[n.toId],n,a)}else delete t._clusterEdges[e],t._restoreEdge(n)}));for(var o=!1,s=!0,c=function(){var e=[];i((function(t){var n=Pp(t.containedNodes).length,r=!0===t.options.allowSingleNodeCluster;(r&&n<1||!r&&n<2)&&e.push(t.id)}));for(var n=0;n<e.length;++n)t.openCluster(e[n],{},!1);s=e.length>0,o||=s};s;)c();o&&this._updateState()}},{key:`_isClusteredNode`,value:function(e){return this.clusteredNodes[e]!==void 0}},{key:`_isClusteredEdge`,value:function(e){return this.clusteredEdges[e]!==void 0}}]),e}(),rT=function(){function e(t,n){var r;H(this,e),window!==void 0&&(r=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),window.requestAnimationFrame=r===void 0?function(e){e()}:r,this.body=t,this.canvas=n,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},jr(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return U(e,[{key:`bindEventListeners`,value:function(){var e,t=this;this.body.emitter.on(`dragStart`,(function(){t.dragging=!0})),this.body.emitter.on(`dragEnd`,(function(){t.dragging=!1})),this.body.emitter.on(`zoom`,(function(){t.zooming=!0,window.clearTimeout(t.zoomTimeoutId),t.zoomTimeoutId=sg((function(){var e;t.zooming=!1,V(e=t._requestRedraw).call(e,t)()}),250)})),this.body.emitter.on(`_resizeNodes`,(function(){t._resizeNodes()})),this.body.emitter.on(`_redraw`,(function(){!1===t.renderingActive&&t._redraw()})),this.body.emitter.on(`_blockRedraw`,(function(){t.allowRedraw=!1})),this.body.emitter.on(`_allowRedraw`,(function(){t.allowRedraw=!0,t.redrawRequested=!1})),this.body.emitter.on(`_requestRedraw`,V(e=this._requestRedraw).call(e,this)),this.body.emitter.on(`_startRendering`,(function(){t.renderRequests+=1,t.renderingActive=!0,t._startRendering()})),this.body.emitter.on(`_stopRendering`,(function(){--t.renderRequests,t.renderingActive=t.renderRequests>0,t.renderTimer=void 0})),this.body.emitter.on(`destroy`,(function(){t.renderRequests=0,t.allowRedraw=!1,t.renderingActive=!1,!0===t.requiresTimeout?clearTimeout(t.renderTimer):window.cancelAnimationFrame(t.renderTimer),t.body.emitter.off()}))}},{key:`setOptions`,value:function(e){e!==void 0&&Ev([`hideEdgesOnDrag`,`hideEdgesOnZoom`,`hideNodesOnDrag`],this.options,e)}},{key:`_requestNextFrame`,value:function(e,t){if(typeof window<`u`){var n,r=window;return!0===this.requiresTimeout?n=sg(e,t):r.requestAnimationFrame&&(n=r.requestAnimationFrame(e)),n}}},{key:`_startRendering`,value:function(){var e;!0===this.renderingActive&&this.renderTimer===void 0&&(this.renderTimer=this._requestNextFrame(V(e=this._renderStep).call(e,this),this.simulationInterval))}},{key:`_renderStep`,value:function(){!0===this.renderingActive&&(this.renderTimer=void 0,!0===this.requiresTimeout&&this._startRendering(),this._redraw(),!1===this.requiresTimeout&&this._startRendering())}},{key:`redraw`,value:function(){this.body.emitter.emit(`setSize`),this._redraw()}},{key:`_requestRedraw`,value:function(){var e=this;!0!==this.redrawRequested&&!1===this.renderingActive&&!0===this.allowRedraw&&(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];if(!0===this.allowRedraw){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(),r=this.canvas.frame.canvas.clientWidth,i=this.canvas.frame.canvas.clientHeight;if(n.clearRect(0,0,r,i),this.canvas.frame.clientWidth===0)return;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(),!1===e&&(!1===this.dragging||!0===this.dragging&&!1===this.options.hideEdgesOnDrag)&&(!1===this.zooming||!0===this.zooming&&!1===this.options.hideEdgesOnZoom)&&this._drawEdges(n),(!1===this.dragging||!0===this.dragging&&!1===this.options.hideNodesOnDrag)&&(t.drawExternalLabels=this._drawNodes(n,e).drawExternalLabels),!1===e&&(!1===this.dragging||!0===this.dragging&&!1===this.options.hideEdgesOnDrag)&&(!1===this.zooming||!0===this.zooming&&!1===this.options.hideEdgesOnZoom)&&this._drawArrows(n),t.drawExternalLabels!=null&&t.drawExternalLabels(),!1===e&&this._drawSelectionBox(n),n.beginPath(),this.body.emitter.emit(`afterDrawing`,n),n.closePath(),n.restore(),!0===e&&n.clearRect(0,0,r,i)}}},{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,n=this.body.nodes;for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&((t=n[r]).resize(e),t.updateBoundingBox(e,t.selected));e.restore()}},{key:`_drawNodes`,value:function(e){for(var t,n,r=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=this.body.nodes,a=this.body.nodeIndices,o=[],s=[],c=this.canvas.DOMtoCanvas({x:-20,y:-20}),l=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+20,y:this.canvas.frame.canvas.clientHeight+20}),u={top:c.y,left:c.x,bottom:l.y,right:l.x},d=[],f=0;f<a.length;f++)if((t=i[a[f]]).hover)s.push(a[f]);else if(t.isSelected())o.push(a[f]);else if(!0===r){var p=t.draw(e);p.drawExternalLabel!=null&&d.push(p.drawExternalLabel)}else if(!0===t.isBoundingBoxOverlappingWith(u)){var m=t.draw(e);m.drawExternalLabel!=null&&d.push(m.drawExternalLabel)}else t.updateBoundingBox(e,t.selected);var h=o.length,g=s.length;for(n=0;n<h;n++){var _=(t=i[o[n]]).draw(e);_.drawExternalLabel!=null&&d.push(_.drawExternalLabel)}for(n=0;n<g;n++){var v=(t=i[s[n]]).draw(e);v.drawExternalLabel!=null&&d.push(v.drawExternalLabel)}return{drawExternalLabels:function(){for(var e=0,t=d;e<t.length;e++)(0,t[e])()}}}},{key:`_drawEdges`,value:function(e){for(var t=this.body.edges,n=this.body.edgeIndices,r=0;r<n.length;r++){var i=t[n[r]];!0===i.connected&&i.draw(e)}}},{key:`_drawArrows`,value:function(e){for(var t=this.body.edges,n=this.body.edgeIndices,r=0;r<n.length;r++){var i=t[n[r]];!0===i.connected&&i.drawArrows(e)}}},{key:`_determineBrowserMethod`,value:function(){if(typeof window<`u`){var e=navigator.userAgent.toLowerCase();this.requiresTimeout=!1,(Ih(e).call(e,`msie 9.0`)!=-1||Ih(e).call(e,`safari`)!=-1&&Ih(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()}}]),e}(),iT=r(N.setInterval);function aT(e,t){t.inputHandler=function(e){e.isFirst&&t(e)},e.on(`hammer.input`,t.inputHandler)}function oT(e,t){return t.inputHandler=function(e){e.isFinal&&t(e)},e.on(`hammer.input`,t.inputHandler)}var sT=function(){function e(t){H(this,e),this.body=t,this.pixelRatio=1,this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this._cleanupCallbacks=[],this.options={},this.defaultOptions={autoResize:!0,height:`100%`,width:`100%`},jr(this.options,this.defaultOptions),this.bindEventListeners()}return U(e,[{key:`bindEventListeners`,value:function(){var e,t=this;this.body.emitter.once(`resize`,(function(e){e.width!==0&&(t.body.view.translation.x=.5*e.width),e.height!==0&&(t.body.view.translation.y=.5*e.height)})),this.body.emitter.on(`setSize`,V(e=this.setSize).call(e,this)),this.body.emitter.on(`destroy`,(function(){t.hammerFrame.destroy(),t.hammer.destroy(),t._cleanUp()}))}},{key:`setOptions`,value:function(e){var t=this;if(e!==void 0&&Ev([`width`,`height`,`autoResize`],this.options,e),this._cleanUp(),!0===this.options.autoResize){var n;if(window.ResizeObserver){var r=new ResizeObserver((function(){!0===t.setSize()&&t.body.emitter.emit(`_requestRedraw`)})),i=this.frame;r.observe(i),this._cleanupCallbacks.push((function(){r.unobserve(i)}))}else{var a=iT((function(){!0===t.setSize()&&t.body.emitter.emit(`_requestRedraw`)}),1e3);this._cleanupCallbacks.push((function(){clearInterval(a)}))}var o=V(n=this._onResize).call(n,this);window.addEventListener(`resize`,o),this._cleanupCallbacks.push((function(){window.removeEventListener(`resize`,o)}))}}},{key:`_cleanUp`,value:function(){var e,t,n;Xp(e=am(t=Em(n=this._cleanupCallbacks).call(n,0)).call(t)).call(e,(function(e){try{e()}catch(e){console.error(e)}}))}},{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;!0===this.initialized&&(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=.5*this.cameraState.scale*(e+t):e==1?t!=1&&(n=this.cameraState.scale*t):n=this.cameraState.scale*e,this.body.view.scale=n;var r=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),i={x:r.x-this.cameraState.position.x,y:r.y-this.cameraState.position.y};this.body.view.translation.x+=i.x*this.body.view.scale,this.body.view.translation.y+=i.y*this.body.view.scale}}},{key:`_prepareValue`,value:function(e){if(typeof e==`number`)return e+`px`;if(typeof e==`string`){if(Ih(e).call(e,`%`)!==-1||Ih(e).call(e,`px`)!==-1)return e;if(Ih(e).call(e,`%`)===-1)return e+`px`}throw 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 ty(this.frame.canvas),this.hammer.get(`pinch`).set({enable:!0}),this.hammer.get(`pan`).set({threshold:5,direction:ty.DIRECTION_ALL}),aT(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 ty(this.frame),oT(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,r=this.frame.canvas.width,i=this.frame.canvas.height,a=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(a),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 o=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),s=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);this.frame.canvas.width===o&&this.frame.canvas.height===s||this._getCameraState(a),this.frame.canvas.width!==o&&(this.frame.canvas.width=o,n=!0),this.frame.canvas.height!==s&&(this.frame.canvas.height=s,n=!0)}return!0===n&&(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(r/this.pixelRatio),oldHeight:Math.round(i/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 Error(`Could not get canvax context`);var t=1;return typeof window<`u`&&(t=window.devicePixelRatio||1),t/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}},{key:`_setPixelRatio`,value:function(){this.pixelRatio=this._determinePixelRatio()}},{key:`setTransform`,value:function(){var e=this.getContext();if(e===void 0)throw 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)}}}]),e}(),cT=function(){function e(t,n){var r,i,a=this;H(this,e),this.body=t,this.canvas=n,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`,V(r=this.fit).call(r,this)),this.body.emitter.on(`animationFinished`,(function(){a.body.emitter.emit(`_stopRendering`)})),this.body.emitter.on(`unlockNode`,V(i=this.releaseNode).call(i,this))}return U(e,[{key:`setOptions`,value:function(){this.options=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}}},{key:`fit`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];e=function(e,t){var n=jr({nodes:t,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},e??{});if(!Tp(n.nodes))throw TypeError(`Nodes has to be an array of ids.`);if(n.nodes.length===0&&(n.nodes=t),!(typeof n.minZoomLevel==`number`&&n.minZoomLevel>0))throw TypeError(`Min zoom level has to be a number higher than zero.`);if(!(typeof n.maxZoomLevel==`number`&&n.minZoomLevel<=n.maxZoomLevel))throw TypeError(`Max zoom level has to be a number higher than min zoom level.`);return n}(e,this.body.nodeIndices);var n,r,i=this.canvas.frame.canvas.clientWidth,a=this.canvas.frame.canvas.clientHeight;if(i===0||a===0)r=1,n=$w.getRange(this.body.nodes,e.nodes);else if(!0===t){var o=0;for(var s in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,s)&&!0===this.body.nodes[s].predefinedPosition&&(o+=1);if(o>.5*this.body.nodeIndices.length)return void this.fit(e,!1);n=$w.getRange(this.body.nodes,e.nodes),r=12.662/(this.body.nodeIndices.length+7.4147)+.0964822,r*=Math.min(i/600,a/600)}else{this.body.emitter.emit(`_resizeNodes`),n=$w.getRange(this.body.nodes,e.nodes);var c=i/(1.1*Math.abs(n.maxX-n.minX)),l=a/(1.1*Math.abs(n.maxY-n.minY));r=c<=l?c:l}r>e.maxZoomLevel?r=e.maxZoomLevel:r<e.minZoomLevel&&(r=e.minZoomLevel);var u={position:$w.findCenter(n),scale:r,animation:e.animation};this.moveTo(u)}},{key:`focus`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.body.nodes[e]===void 0?console.error(`Node: `+e+` cannot be found.`):(t.position={x:this.body.nodes[e].x,y:this.body.nodes[e].y},t.lockedOnNode=e,this.moveTo(t))}},{key:`moveTo`,value:function(e){if(e!==void 0){if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!mx(e.offset.x))throw 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,!mx(e.offset.y))throw 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,!mx(e.position.x))throw 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,!mx(e.position.y))throw 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 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}),!1===e.animation&&(e.animation={duration:0}),!0===e.animation&&(e.animation={}),e.animation.duration===void 0&&(e.animation.duration=1e3),e.animation.easingFunction===void 0&&(e.animation.easingFunction=`easeInOutQuad`),this.animateView(e)}else e={}}},{key:`animateView`,value:function(e){if(e!==void 0){this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),!0===e.locked&&(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,n,r=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i=r.x-e.position.x,a=r.y-e.position.y;this.targetTranslation={x:this.sourceTranslation.x+i*this.targetScale+e.offset.x,y:this.sourceTranslation.y+a*this.targetScale+e.offset.y},e.animation.duration===0?this.lockedOnNodeId==null?(this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit(`_requestRedraw`)):(this.viewFunction=V(t=this._lockedRedraw).call(t,this),this.body.emitter.on(`initRedraw`,this.viewFunction)):(this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=V(n=this._transitionRedraw).call(n,this),this.body.emitter.on(`initRedraw`,this.viewFunction),this.body.emitter.emit(`_startRendering`))}}},{key:`_lockedRedraw`,value:function(){var e=this.body.nodes[this.lockedOnNodeId].x,t=this.body.nodes[this.lockedOnNodeId].y,n=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),r=n.x-e,i=n.y-t,a=this.body.view.translation,o={x:a.x+r*this.body.view.scale+this.lockedOnNodeOffset.x,y:a.y+i*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];this.easingTime+=this.animationSpeed,this.easingTime=!0===e?1:this.easingTime;var t=Hv[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){var n;this.body.emitter.off(`initRedraw`,this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null&&(this.viewFunction=V(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})}}]),e}();function lT(e){var t,n=e&&e.preventDefault||!1,r=e&&e.container||window,i={},a={keydown:{},keyup:{}},o={};for(t=97;t<=122;t++)o[String.fromCharCode(t)]={code:t-97+65,shift:!1};for(t=65;t<=90;t++)o[String.fromCharCode(t)]={code:t,shift:!0};for(t=0;t<=9;t++)o[``+t]={code:48+t,shift:!1};for(t=1;t<=12;t++)o[`F`+t]={code:111+t,shift:!1};for(t=0;t<=9;t++)o[`num`+t]={code:96+t,shift:!1};o[`num*`]={code:106,shift:!1},o[`num+`]={code:107,shift:!1},o[`num-`]={code:109,shift:!1},o[`num/`]={code:111,shift:!1},o[`num.`]={code:110,shift:!1},o.left={code:37,shift:!1},o.up={code:38,shift:!1},o.right={code:39,shift:!1},o.down={code:40,shift:!1},o.space={code:32,shift:!1},o.enter={code:13,shift:!1},o.shift={code:16,shift:void 0},o.esc={code:27,shift:!1},o.backspace={code:8,shift:!1},o.tab={code:9,shift:!1},o.ctrl={code:17,shift:!1},o.alt={code:18,shift:!1},o.delete={code:46,shift:!1},o.pageup={code:33,shift:!1},o.pagedown={code:34,shift:!1},o[`=`]={code:187,shift:!1},o[`-`]={code:189,shift:!1},o[`]`]={code:221,shift:!1},o[`[`]={code:219,shift:!1};var s=function(e){l(e,`keydown`)},c=function(e){l(e,`keyup`)},l=function(e,t){if(a[t][e.keyCode]!==void 0){for(var r=a[t][e.keyCode],i=0;i<r.length;i++)(r[i].shift===void 0||r[i].shift==1&&e.shiftKey==1||r[i].shift==0&&e.shiftKey==0)&&r[i].fn(e);n==1&&e.preventDefault()}};return i.bind=function(e,t,n){if(n===void 0&&(n=`keydown`),o[e]===void 0)throw Error(`unsupported key: `+e);a[n][o[e].code]===void 0&&(a[n][o[e].code]=[]),a[n][o[e].code].push({fn:t,shift:o[e].shift})},i.bindAll=function(e,t){for(var n in t===void 0&&(t=`keydown`),o)o.hasOwnProperty(n)&&i.bind(n,e,t)},i.getKey=function(e){for(var t in o)if(o.hasOwnProperty(t)&&(e.shiftKey==1&&o[t].shift==1&&e.keyCode==o[t].code||e.shiftKey==0&&o[t].shift==0&&e.keyCode==o[t].code||e.keyCode==o[t].code&&t==`shift`))return t;return`unknown key, currently not supported`},i.unbind=function(e,t,n){if(n===void 0&&(n=`keydown`),o[e]===void 0)throw Error(`unsupported key: `+e);if(t!==void 0){var r=[],i=a[n][o[e].code];if(i!==void 0)for(var s=0;s<i.length;s++)i[s].fn==t&&i[s].shift==o[e].shift||r.push(a[n][o[e].code][s]);a[n][o[e].code]=r}else a[n][o[e].code]=[]},i.reset=function(){a={keydown:{},keyup:{}}},i.destroy=function(){a={keydown:{},keyup:{}},r.removeEventListener(`keydown`,s,!0),r.removeEventListener(`keyup`,c,!0)},r.addEventListener(`keydown`,s,!0),r.addEventListener(`keyup`,c,!0),i}var uT=function(){function e(t,n){var r=this;H(this,e),this.body=t,this.canvas=n,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on(`activate`,(function(){r.activated=!0,r.configureKeyboardBindings()})),this.body.emitter.on(`deactivate`,(function(){r.activated=!1,r.configureKeyboardBindings()})),this.body.emitter.on(`destroy`,(function(){r.keycharm!==void 0&&r.keycharm.destroy()})),this.options={}}return U(e,[{key:`setOptions`,value:function(e){e!==void 0&&(this.options=e,this.create())}},{key:`create`,value:function(){!0===this.options.navigationButtons?!1===this.iconsCreated&&this.loadNavigationElements():!0===this.iconsCreated&&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 r=0;r<t.length;r++){this.navigationDOM[t[r]]=document.createElement(`div`),this.navigationDOM[t[r]].className=`vis-button vis-`+t[r],this.navigationDOM.wrapper.appendChild(this.navigationDOM[t[r]]);var i,a,o=new ty(this.navigationDOM[t[r]]);n[r]===`_fit`?aT(o,V(i=this._fit).call(i,this)):aT(o,V(a=this.bindToRedraw).call(a,this,n[r])),this.navigationHammers.push(o)}var s=new ty(this.canvas.frame);oT(s,(function(){e._stopMovement()})),this.navigationHammers.push(s),this.iconsCreated=!0}},{key:`bindToRedraw`,value:function(e){var t;this.boundFunctions[e]===void 0&&(this.boundFunctions[e]=V(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,r=t/e,i=(1-r)*this.canvas.canvasViewCenter.x+n.x*r,a=(1-r)*this.canvas.canvasViewCenter.y+n.y*r;this.body.view.scale=t,this.body.view.translation={x:i,y:a},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,r=t/e,i=(1-r)*this.canvas.canvasViewCenter.x+n.x*r,a=(1-r)*this.canvas.canvasViewCenter.y+n.y*r;this.body.view.scale=t,this.body.view.translation={x:i,y:a},this.body.emitter.emit(`zoom`,{direction:`-`,scale:this.body.view.scale,pointer:null})}},{key:`configureKeyboardBindings`,value:function(){var e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,ee,C=this;(this.keycharm!==void 0&&this.keycharm.destroy(),!0===this.options.keyboard.enabled)&&(!0===this.options.keyboard.bindToWindow?this.keycharm=lT({container:window,preventDefault:!0}):this.keycharm=lT({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),!0===this.activated&&(V(e=this.keycharm).call(e,`up`,(function(){C.bindToRedraw(`_moveUp`)}),`keydown`),V(t=this.keycharm).call(t,`down`,(function(){C.bindToRedraw(`_moveDown`)}),`keydown`),V(n=this.keycharm).call(n,`left`,(function(){C.bindToRedraw(`_moveLeft`)}),`keydown`),V(r=this.keycharm).call(r,`right`,(function(){C.bindToRedraw(`_moveRight`)}),`keydown`),V(i=this.keycharm).call(i,`=`,(function(){C.bindToRedraw(`_zoomIn`)}),`keydown`),V(a=this.keycharm).call(a,`num+`,(function(){C.bindToRedraw(`_zoomIn`)}),`keydown`),V(o=this.keycharm).call(o,`num-`,(function(){C.bindToRedraw(`_zoomOut`)}),`keydown`),V(s=this.keycharm).call(s,`-`,(function(){C.bindToRedraw(`_zoomOut`)}),`keydown`),V(c=this.keycharm).call(c,`[`,(function(){C.bindToRedraw(`_zoomOut`)}),`keydown`),V(l=this.keycharm).call(l,`]`,(function(){C.bindToRedraw(`_zoomIn`)}),`keydown`),V(u=this.keycharm).call(u,`pageup`,(function(){C.bindToRedraw(`_zoomIn`)}),`keydown`),V(d=this.keycharm).call(d,`pagedown`,(function(){C.bindToRedraw(`_zoomOut`)}),`keydown`),V(f=this.keycharm).call(f,`up`,(function(){C.unbindFromRedraw(`_moveUp`)}),`keyup`),V(p=this.keycharm).call(p,`down`,(function(){C.unbindFromRedraw(`_moveDown`)}),`keyup`),V(m=this.keycharm).call(m,`left`,(function(){C.unbindFromRedraw(`_moveLeft`)}),`keyup`),V(h=this.keycharm).call(h,`right`,(function(){C.unbindFromRedraw(`_moveRight`)}),`keyup`),V(g=this.keycharm).call(g,`=`,(function(){C.unbindFromRedraw(`_zoomIn`)}),`keyup`),V(_=this.keycharm).call(_,`num+`,(function(){C.unbindFromRedraw(`_zoomIn`)}),`keyup`),V(v=this.keycharm).call(v,`num-`,(function(){C.unbindFromRedraw(`_zoomOut`)}),`keyup`),V(y=this.keycharm).call(y,`-`,(function(){C.unbindFromRedraw(`_zoomOut`)}),`keyup`),V(b=this.keycharm).call(b,`[`,(function(){C.unbindFromRedraw(`_zoomOut`)}),`keyup`),V(x=this.keycharm).call(x,`]`,(function(){C.unbindFromRedraw(`_zoomIn`)}),`keyup`),V(S=this.keycharm).call(S,`pageup`,(function(){C.unbindFromRedraw(`_zoomIn`)}),`keyup`),V(ee=this.keycharm).call(ee,`pagedown`,(function(){C.unbindFromRedraw(`_zoomOut`)}),`keyup`)))}}]),e}();function dT(e,t){var n=fp!==void 0&&bc(e)||e[`@@iterator`];if(!n){if(Tp(e)||(n=function(e,t){var n;if(e){if(typeof e==`string`)return fT(e,t);var r=vp(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return $s(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fT(e,t)}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw 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,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function fT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var pT=function(){function e(t,n,r){var i,a,o,s,c,l,u,d,f,p,m,h,g;H(this,e),this.body=t,this.canvas=n,this.selectionHandler=r,this.navigationHandler=new uT(t,n),this.body.eventListeners.onTap=V(i=this.onTap).call(i,this),this.body.eventListeners.onTouch=V(a=this.onTouch).call(a,this),this.body.eventListeners.onDoubleTap=V(o=this.onDoubleTap).call(o,this),this.body.eventListeners.onHold=V(s=this.onHold).call(s,this),this.body.eventListeners.onDragStart=V(c=this.onDragStart).call(c,this),this.body.eventListeners.onDrag=V(l=this.onDrag).call(l,this),this.body.eventListeners.onDragEnd=V(u=this.onDragEnd).call(u,this),this.body.eventListeners.onMouseWheel=V(d=this.onMouseWheel).call(d,this),this.body.eventListeners.onPinch=V(f=this.onPinch).call(f,this),this.body.eventListeners.onMouseMove=V(p=this.onMouseMove).call(p,this),this.body.eventListeners.onRelease=V(m=this.onRelease).call(m,this),this.body.eventListeners.onContext=V(h=this.onContext).call(h,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=V(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},jr(this.options,this.defaultOptions),this.bindEventListeners()}return U(e,[{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){e!==void 0&&(Dv([`hideEdgesOnDrag`,`hideEdgesOnZoom`,`hideNodesOnDrag`,`keyboard`,`multiselect`,`selectable`,`selectConnectedEdges`],this.options,e),Vv(this.options,e,`keyboard`),e.tooltip&&(jr(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=Pv(e.tooltip.color)))),this.navigationHandler.setOptions(this.options)}},{key:`getPointer`,value:function(e){return{x:e.x-(t=this.canvas.frame.canvas,t.getBoundingClientRect().left),y:e.y-Av(this.canvas.frame.canvas)};var t}},{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){!0===(arguments.length>1&&arguments[1]!==void 0&&arguments[1])?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}},{key:`_determineDifference`,value:function(e,t){var n=function(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r];Ih(t).call(t,i)===-1&&n.push(i)}return n};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=jr({},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&&!0===this.options.dragNodes){this.drag.nodeId=t.id,!1===t.isSelected()&&this.selectionHandler.setSelection({nodes:[t.id]}),this.selectionHandler.generateClickEvent(`dragStart`,e,this.drag.pointer);var r,i=dT(this.selectionHandler.getSelectedNodes());try{for(i.s();!(r=i.n()).done;){var a=r.value,o={id:a.id,node:a,x:a.x,y:a.y,xFixed:a.options.fixed.x,yFixed:a.options.fixed.y};a.options.fixed.x=!0,a.options.fixed.y=!0,this.drag.selection.push(o)}}catch(e){i.e(e)}finally{i.f()}}else this.selectionHandler.generateClickEvent(`dragStart`,e,this.drag.pointer,void 0,!0)}}},{key:`onDrag`,value:function(e){var t=this;if(!0!==this.drag.pinched){this.body.emitter.emit(`unlockNode`);var n=this.getPointer(e.center),r=this.drag.selection;if(r&&r.length&&!0===this.options.dragNodes){this.selectionHandler.generateClickEvent(`dragging`,e,n);var i=n.x-this.drag.pointer.x,a=n.y-this.drag.pointer.y;Xp(r).call(r,(function(e){var n=e.node;!1===e.xFixed&&(n.x=t.canvas._XconvertDOMtoCanvas(t.canvas._XconvertCanvasToDOM(e.x)+i)),!1===e.yFixed&&(n.y=t.canvas._YconvertDOMtoCanvas(t.canvas._YconvertCanvasToDOM(e.y)+a))})),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)return void this.onDragStart(e);this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(n.x),y:this.canvas._YconvertDOMtoCanvas(n.y)},this.body.emitter.emit(`_requestRedraw`)}if(!0===this.options.dragView&&!e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent(`dragging`,e,n,void 0,!0),this.drag.pointer===void 0)return void this.onDragStart(e);var o=n.x-this.drag.pointer.x,s=n.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+o,y:this.drag.translation.y+s},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 r=this.body.selectionBox.position,i={minX:Math.min(r.start.x,r.end.x),minY:Math.min(r.start.y,r.end.y),maxX:Math.max(r.start.x,r.end.x),maxY:Math.max(r.start.y,r.end.y)},a=ih(n=this.body.nodeIndices).call(n,(function(e){var n=t.body.nodes[e];return n.x>=i.minX&&n.x<=i.maxX&&n.y>=i.minY&&n.y<=i.maxY}));Xp(a).call(a,(function(e){return t.selectionHandler.selectObject(t.body.nodes[e])}));var o=this.getPointer(e.center);this.selectionHandler.commitAndEmit(o,e),this.selectionHandler.generateClickEvent(`dragEnd`,e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit(`_requestRedraw`)}else{var s=this.drag.selection;s&&s.length?(Xp(s).call(s,(function(e){e.node.options.fixed.x=e.xFixed,e.node.options.fixed.y=e.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(!0===this.options.zoomView){var n=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);var r=void 0;this.drag!==void 0&&!0===this.drag.dragging&&(r=this.canvas.DOMtoCanvas(this.drag.pointer));var i=this.body.view.translation,a=e/n,o=(1-a)*t.x+i.x*a,s=(1-a)*t.y+i.y*a;if(this.body.view.scale=e,this.body.view.translation={x:o,y:s},r!=null){var c=this.canvas.canvasToDOM(r);this.drag.pointer.x=c.x,this.drag.pointer.y=c.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(!0===this.options.zoomView){if(e.deltaY!==0){var t=this.body.view.scale;t*=1+(e.deltaY<0?1:-1)*(.1*this.options.zoomSpeed);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}),r=!1;this.popup!==void 0&&(!1===this.popup.hidden&&this._checkHidePopup(n),!1===this.popup.hidden&&(r=!0,this.popup.setPosition(n.x+3,n.y-5),this.popup.show())),this.options.keyboard.autoFocus&&!1===this.options.keyboard.bindToWindow&&!0===this.options.keyboard.enabled&&this.canvas.frame.focus(),!1===r&&(this.popupTimer!==void 0&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=sg((function(){return t._checkShowPopup(n)}),this.options.tooltipDelay))),!0===this.options.hover&&this.selectionHandler.hoverObject(e,n)}},{key:`_checkShowPopup`,value:function(e){var t=this.canvas._XconvertDOMtoCanvas(e.x),n=this.canvas._YconvertDOMtoCanvas(e.y),r={left:t,top:n,right:t,bottom:n},i=this.popupObj===void 0?void 0:this.popupObj.id,a=!1,o=`node`;if(this.popupObj===void 0){for(var s,c=this.body.nodeIndices,l=this.body.nodes,u=[],d=0;d<c.length;d++)!0===(s=l[c[d]]).isOverlappingWith(r)&&(a=!0,s.getTitle()!==void 0&&u.push(c[d]));u.length>0&&(this.popupObj=l[u[u.length-1]],a=!0)}if(this.popupObj===void 0&&!1===a){for(var f,p=this.body.edgeIndices,m=this.body.edges,h=[],g=0;g<p.length;g++)!0===(f=m[p[g]]).isOverlappingWith(r)&&!0===f.connected&&f.getTitle()!==void 0&&h.push(p[g]);h.length>0&&(this.popupObj=m[h[h.length-1]],o=`edge`)}this.popupObj===void 0?this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit(`hidePopup`)):this.popupObj.id!==i&&(this.popup===void 0&&(this.popup=new ny(this.canvas.frame)),this.popup.popupTargetType=o,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))}},{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&&!0===(n=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t))){var r=this.selectionHandler.getNodeAt(e);n=r!==void 0&&r.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));!1===n&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit(`hidePopup`))}}]),e}();Hb(`Set`,(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),lx);var mT=r(N.Set),hT=_,gT=Wb,_T=cb.getWeakData,vT=Tb,yT=yn,bT=pe,xT=M,ST=Sb,CT=mt,wT=Yi.set,TT=Yi.getterFor,ET=zl.find,DT=zl.findIndex,OT=hT([].splice),kT=0,AT=function(e){return e.frozen||=new jT},jT=function(){this.entries=[]},MT=function(e,t){return ET(e.entries,(function(e){return e[0]===t}))};jT.prototype={get:function(e){var t=MT(this,e);if(t)return t[1]},has:function(e){return!!MT(this,e)},set:function(e,t){var n=MT(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=DT(this.entries,(function(t){return t[0]===e}));return~t&&OT(this.entries,t,1),!!~t}};var NT,PT={getConstructor:function(e,t,n,r){var i=e((function(e,i){vT(e,a),wT(e,{type:t,id:kT++,frozen:void 0}),bT(i)||ST(i,e[r],{that:e,AS_ENTRIES:n})})),a=i.prototype,o=TT(t),s=function(e,t,n){var r=o(e),i=_T(yT(t),!0);return!0===i?AT(r).set(t,n):i[r.id]=n,e};return gT(a,{delete:function(e){var t=o(this);if(!xT(e))return!1;var n=_T(e);return!0===n?AT(t).delete(e):n&&CT(n,t.id)&&delete n[t.id]},has:function(e){var t=o(this);if(!xT(e))return!1;var n=_T(e);return!0===n?AT(t).has(e):n&&CT(n,t.id)}}),gT(a,n?{get:function(e){var t=o(this);if(xT(e)){var n=_T(e);return!0===n?AT(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),i}},FT=Ky,IT=a,LT=_,RT=Wb,zT=cb,BT=Hb,VT=PT,HT=M,UT=Yi.enforce,WT=o,GT=Mi,KT=Object,qT=Array.isArray,JT=KT.isExtensible,YT=KT.isFrozen,XT=KT.isSealed,ZT=KT.freeze,QT=KT.seal,$T={},eE={},tE=!IT.ActiveXObject&&`ActiveXObject`in IT,nE=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},rE=BT(`WeakMap`,nE,VT),iE=rE.prototype,aE=LT(iE.set);if(GT)if(tE){NT=VT.getConstructor(nE,`WeakMap`,!0),zT.enable();var oE=LT(iE.delete),sE=LT(iE.has),cE=LT(iE.get);RT(iE,{delete:function(e){if(HT(e)&&!JT(e)){var t=UT(this);return t.frozen||=new NT,oE(this,e)||t.frozen.delete(e)}return oE(this,e)},has:function(e){if(HT(e)&&!JT(e)){var t=UT(this);return t.frozen||=new NT,sE(this,e)||t.frozen.has(e)}return sE(this,e)},get:function(e){if(HT(e)&&!JT(e)){var t=UT(this);return t.frozen||=new NT,sE(this,e)?cE(this,e):t.frozen.get(e)}return cE(this,e)},set:function(e,t){if(HT(e)&&!JT(e)){var n=UT(this);n.frozen||=new NT,sE(this,e)?aE(this,e,t):n.frozen.set(e,t)}else aE(this,e,t);return this}})}else FT&&WT((function(){var e=ZT([]);return aE(new rE,e,1),!YT(e)}))&&RT(iE,{set:function(e,t){var n;return qT(e)&&(YT(e)?n=$T:XT(e)&&(n=eE)),aE(this,e,t),n===$T&&ZT(e),n===eE&&QT(e),this}});var lE,uE,dE,fE,pE,mE=r(N.WeakMap);function hE(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)}function gE(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n}function _E(e,t){var n=fp!==void 0&&bc(e)||e[`@@iterator`];if(!n){if(Tp(e)||(n=function(e,t){var n;if(e){if(typeof e==`string`)return vE(e,t);var r=vp(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return $s(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vE(e,t)}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
38
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function vE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yE(e,t){var n,r=new mT,i=_E(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;e.has(a)||r.add(a)}}catch(e){i.e(e)}finally{i.f()}return r}var bE=function(){function e(){H(this,e),lE.set(this,new mT),uE.set(this,new mT)}return U(e,[{key:`size`,get:function(){return hE(this,uE,`f`).size}},{key:`add`,value:function(){for(var e=[...arguments],t=0,n=e;t<n.length;t++){var r=n[t];hE(this,uE,`f`).add(r)}}},{key:`delete`,value:function(){for(var e=[...arguments],t=0,n=e;t<n.length;t++){var r=n[t];hE(this,uE,`f`).delete(r)}}},{key:`clear`,value:function(){hE(this,uE,`f`).clear()}},{key:`getSelection`,value:function(){return dp(hE(this,uE,`f`))}},{key:`getChanges`,value:function(){return{added:dp(yE(hE(this,lE,`f`),hE(this,uE,`f`))),deleted:dp(yE(hE(this,uE,`f`),hE(this,lE,`f`))),previous:dp(new mT(hE(this,lE,`f`))),current:dp(new mT(hE(this,uE,`f`)))}}},{key:`commit`,value:function(){var e=this.getChanges();gE(this,lE,hE(this,uE,`f`),`f`),gE(this,uE,new mT(hE(this,lE,`f`)),`f`);var t,n=_E(e.added);try{for(n.s();!(t=n.n()).done;)t.value.select()}catch(e){n.e(e)}finally{n.f()}var r,i=_E(e.deleted);try{for(i.s();!(r=i.n()).done;)r.value.unselect()}catch(e){i.e(e)}finally{i.f()}return e}}]),e}();lE=new mE,uE=new mE;var xE=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};H(this,e),dE.set(this,new bE),fE.set(this,new bE),pE.set(this,void 0),gE(this,pE,t,`f`)}return U(e,[{key:`sizeNodes`,get:function(){return hE(this,dE,`f`).size}},{key:`sizeEdges`,get:function(){return hE(this,fE,`f`).size}},{key:`getNodes`,value:function(){return hE(this,dE,`f`).getSelection()}},{key:`getEdges`,value:function(){return hE(this,fE,`f`).getSelection()}},{key:`addNodes`,value:function(){var e;(e=hE(this,dE,`f`)).add.apply(e,arguments)}},{key:`addEdges`,value:function(){var e;(e=hE(this,fE,`f`)).add.apply(e,arguments)}},{key:`deleteNodes`,value:function(e){hE(this,dE,`f`).delete(e)}},{key:`deleteEdges`,value:function(e){hE(this,fE,`f`).delete(e)}},{key:`clear`,value:function(){hE(this,dE,`f`).clear(),hE(this,fE,`f`).clear()}},{key:`commit`,value:function(){for(var e,t,n={nodes:hE(this,dE,`f`).commit(),edges:hE(this,fE,`f`).commit()},r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=hE(this,pE,`f`)).call.apply(e,_p(t=[this,n]).call(t,i)),n}}]),e}();function SE(e,t){var n=fp!==void 0&&bc(e)||e[`@@iterator`];if(!n){if(Tp(e)||(n=function(e,t){var n;if(e){if(typeof e==`string`)return CE(e,t);var r=vp(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return $s(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return CE(e,t)}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
39
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function CE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}dE=new mE,fE=new mE,pE=new mE;var wE=function(){function e(t,n){var r=this;H(this,e),this.body=t,this.canvas=n,this._selectionAccumulator=new xE,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},jr(this.options,this.defaultOptions),this.body.emitter.on(`_dataChanged`,(function(){r.updateSelection()}))}return U(e,[{key:`setOptions`,value:function(e){e!==void 0&&Ev([`multiselect`,`hoverConnectedEdges`,`selectable`,`selectConnectedEdges`],this.options,e)}},{key:`selectOnPoint`,value:function(e){var t=!1;if(!0===this.options.selectable){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(!0===this.options.selectable){var n=this.getNodeAt(e)||this.getEdgeAt(e);n!==void 0&&(t=!0,!0===n.isSelected()?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,r){var i=arguments.length>4&&arguments[4]!==void 0&&arguments[4],a=this._initBaseEvent(t,n);if(!0===i)a.nodes=[],a.edges=[];else{var o=this.getSelection();a.nodes=o.nodes,a.edges=o.edges}r!==void 0&&(a.previousSelection=r),e==`click`&&(a.items=this.getClickedItems(n)),t.controlEdge!==void 0&&(a.controlEdge=t.controlEdge),this.body.emitter.emit(e,a)}},{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 LC){var n;!0===t&&(n=this._selectionAccumulator).addEdges.apply(n,dp(e.edges)),this._selectionAccumulator.addNodes(e)}else this._selectionAccumulator.addEdges(e);return!0}return!1}},{key:`deselectObject`,value:function(e){!0===e.isSelected()&&(e.selected=!1,this._removeFromSelection(e))}},{key:`_getAllNodesOverlappingWith`,value:function(e){for(var t=[],n=this.body.nodes,r=0;r<this.body.nodeIndices.length;r++){var i=this.body.nodeIndices[r];n[i].isOverlappingWith(e)&&t.push(i)}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],n=this._pointerToPositionObject(e),r=this._getAllNodesOverlappingWith(n);return r.length>0?!0===t?this.body.nodes[r[r.length-1]]:r[r.length-1]:void 0}},{key:`_getEdgesOverlappingWith`,value:function(e,t){for(var n=this.body.edges,r=0;r<this.body.edgeIndices.length;r++){var i=this.body.edgeIndices[r];n[i].isOverlappingWith(e)&&t.push(i)}}},{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],n=this.canvas.DOMtoCanvas(e),r=10,i=null,a=this.body.edges,o=0;o<this.body.edgeIndices.length;o++){var s=this.body.edgeIndices[o],c=a[s];if(c.connected){var l=c.from.x,u=c.from.y,d=c.to.x,f=c.to.y,p=c.edgeType.getDistanceToEdge(l,u,d,f,n.x,n.y);p<r&&(i=s,r=p)}}return i===null?void 0:!0===t?this.body.edges[i]:i}},{key:`_addToHover`,value:function(e){e instanceof LC?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}},{key:`_removeFromSelection`,value:function(e){var t;e instanceof LC?(this._selectionAccumulator.deleteNodes(e),(t=this._selectionAccumulator).deleteEdges.apply(t,dp(e.edges))):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 r=this._initBaseEvent(e,t);!0===n.hover&&(n.hover=!1,n instanceof LC?(r.node=n.id,this.body.emitter.emit(`blurNode`,r)):(r.edge=n.id,this.body.emitter.emit(`blurEdge`,r)))}},{key:`emitHoverEvent`,value:function(e,t,n){var r=this._initBaseEvent(e,t),i=!1;return!1===n.hover&&(n.hover=!0,this._addToHover(n),i=!0,n instanceof LC?(r.node=n.id,this.body.emitter.emit(`hoverNode`,r)):(r.edge=n.id,this.body.emitter.emit(`hoverEdge`,r))),i}},{key:`hoverObject`,value:function(e,t){var n=this.getNodeAt(t);n===void 0&&(n=this.getEdgeAt(t));var r=!1;for(var i in this.hoverObj.nodes)Object.prototype.hasOwnProperty.call(this.hoverObj.nodes,i)&&(n===void 0||n instanceof LC&&n.id!=i||n instanceof Pw)&&(this.emitBlurEvent(e,t,this.hoverObj.nodes[i]),delete this.hoverObj.nodes[i],r=!0);for(var a in this.hoverObj.edges)Object.prototype.hasOwnProperty.call(this.hoverObj.edges,a)&&(!0===r?(this.hoverObj.edges[a].hover=!1,delete this.hoverObj.edges[a]):(n===void 0||n instanceof Pw&&n.id!=a||n instanceof LC&&!n.hover)&&(this.emitBlurEvent(e,t,this.hoverObj.edges[a]),delete this.hoverObj.edges[a],r=!0));if(n!==void 0){var o=Pp(this.hoverObj.edges).length,s=Pp(this.hoverObj.nodes).length;(r||n instanceof Pw&&o===0&&s===0||n instanceof LC&&o===0&&s===0)&&(r=this.emitHoverEvent(e,t,n)),n instanceof LC&&!0===this.options.hoverConnectedEdges&&this._hoverConnectedEdges(n)}!0===r&&this.body.emitter.emit(`_requestRedraw`)}},{key:`commitWithoutEmitting`,value:function(){this._selectionAccumulator.commit()}},{key:`commitAndEmit`,value:function(e,t){var n=!1,r=this._selectionAccumulator.commit(),i={nodes:r.nodes.previous,edges:r.edges.previous};r.edges.deleted.length>0&&(this.generateClickEvent(`deselectEdge`,t,e,i),n=!0),r.nodes.deleted.length>0&&(this.generateClickEvent(`deselectNode`,t,e,i),n=!0),r.nodes.added.length>0&&(this.generateClickEvent(`selectNode`,t,e),n=!0),r.edges.added.length>0&&(this.generateClickEvent(`selectEdge`,t,e),n=!0),!0===n&&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 jp(e=this._selectionAccumulator.getNodes()).call(e,(function(e){return e.id}))}},{key:`getSelectedEdgeIds`,value:function(){var e;return jp(e=this._selectionAccumulator.getEdges()).call(e,(function(e){return e.id}))}},{key:`setSelection`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw 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,r=SE(e.nodes);try{for(r.s();!(n=r.n()).done;){var i=n.value,a=this.body.nodes[i];if(!a)throw RangeError(`Node with id "`+i+`" not found`);this.selectObject(a,t.highlightEdges)}}catch(e){r.e(e)}finally{r.f()}}if(e.edges){var o,s=SE(e.edges);try{for(s.s();!(o=s.n()).done;){var c=o.value,l=this.body.edges[c];if(!l)throw RangeError(`Edge with id "`+c+`" not found`);this.selectObject(l)}}catch(e){s.e(e)}finally{s.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];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=[],r=this.body.nodeIndices,i=this.body.nodes,a=r.length-1;a>=0;a--){var o=i[r[a]].getItemsOnPoint(t);n.push.apply(n,o)}for(var s=this.body.edgeIndices,c=this.body.edges,l=s.length-1;l>=0;l--){var u=c[s[l]].getItemsOnPoint(t);n.push.apply(n,u)}return n}}]),e}(),TE=pl,EE=Math.floor,DE=function(e,t){var n=e.length,r=EE(n/2);return n<8?OE(e,t):kE(e,DE(TE(e,0,r),t),DE(TE(e,r),t),t)},OE=function(e,t){for(var n,r,i=e.length,a=1;a<i;){for(r=a,n=e[a];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==a++&&(e[r]=n)}return e},kE=function(e,t,n,r){for(var i=t.length,a=n.length,o=0,s=0;o<i||s<a;)e[o+s]=o<i&&s<a?r(t[o],n[s])<=0?t[o++]:n[s++]:o<i?t[o++]:n[s++];return e},AE=DE,jE=I.match(/firefox\/(\d+)/i),ME=!!jE&&+jE[1],NE=/MSIE|Trident/.test(I),PE=I.match(/AppleWebKit\/(\d+)\./),FE=!!PE&&+PE[1],IE=R,LE=_,RE=Je,zE=dt,BE=tr,VE=cm,HE=bi,UE=o,WE=AE,GE=Bp,KE=ME,qE=NE,JE=Me,YE=FE,XE=[],ZE=LE(XE.sort),QE=LE(XE.push),$E=UE((function(){XE.sort(void 0)})),eD=UE((function(){XE.sort(null)})),tD=GE(`sort`),nD=!UE((function(){if(JE)return JE<70;if(!(KE&&KE>3)){if(qE)return!0;if(YE)return YE<603;var e,t,n,r,i=``;for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)XE.push({k:t+r,v:n})}for(XE.sort((function(e,t){return t.v-e.v})),r=0;r<XE.length;r++)t=XE[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return i!==`DGBEFHACIJK`}}));IE({target:`Array`,proto:!0,forced:$E||!eD||!tD||!nD},{sort:function(e){e!==void 0&&RE(e);var t=zE(this);if(nD)return e===void 0?ZE(t):ZE(t,e);var n,r,i=[],a=BE(t);for(r=0;r<a;r++)r in t&&QE(i,t[r]);for(WE(i,function(e){return function(t,n){return n===void 0?-1:t===void 0?1:e===void 0?HE(t)>HE(n)?1:-1:+e(t,n)||0}}(e)),n=BE(i),r=0;r<n;)t[r]=i[r++];for(;r<a;)VE(t,r++);return t}});var rD=Kr(`Array`).sort,iD=F,aD=rD,oD=Array.prototype,sD=r(function(e){var t=e.sort;return e===oD||iD(oD,e)&&t===oD.sort?aD:t}),cD=Je,lD=dt,uD=fe,dD=tr,fD=TypeError,pD=function(e){return function(t,n,r,i){cD(n);var a=lD(t),o=uD(a),s=dD(a),c=e?s-1:0,l=e?-1:1;if(r<2)for(;;){if(c in o){i=o[c],c+=l;break}if(c+=l,e?c<0:s<=c)throw new fD(`Reduce of empty array with no initial value`)}for(;e?c>=0:s>c;c+=l)c in o&&(i=n(i,o[c],c,a));return i}},mD={left:pD(!1),right:pD(!0)},hD=x(a.process)===`process`,gD=mD.left;R({target:`Array`,proto:!0,forced:!hD&&Me>79&&Me<83||!Bp(`reduce`)},{reduce:function(e){var t=arguments.length;return gD(this,e,t,t>1?arguments[1]:void 0)}});var _D=Kr(`Array`).reduce,vD=F,yD=_D,bD=Array.prototype,xD=r(function(e){var t=e.reduce;return e===bD||vD(bD,e)&&t===bD.reduce?yD:t});function SD(e){var t=function(){if(typeof Reflect>`u`||!q||q.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(q(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=q(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var CD=function(){function e(){H(this,e)}return U(e,[{key:`abstract`,value:function(){throw 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()}}]),e}(),wD=function(e){qS(n,e);var t=SD(n);function n(e){var r;return H(this,n),(r=t.call(this)).layout=e,r}return U(n,[{key:`curveType`,value:function(){return`horizontal`}},{key:`getPosition`,value:function(e){return e.x}},{key:`setPosition`,value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;n!==void 0&&this.layout.hierarchical.addToOrdering(e,n),e.x=t}},{key:`getTreeSize`,value:function(e){var t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_x,max:t.max_x}}},{key:`sort`,value:function(e){sD(e).call(e,(function(e,t){return e.x-t.x}))}},{key:`fix`,value:function(e,t){e.y=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.y=!0}},{key:`shift`,value:function(e,t){this.layout.body.nodes[e].x+=t}}]),n}(CD),TD=function(e){qS(n,e);var t=SD(n);function n(e){var r;return H(this,n),(r=t.call(this)).layout=e,r}return U(n,[{key:`curveType`,value:function(){return`vertical`}},{key:`getPosition`,value:function(e){return e.y}},{key:`setPosition`,value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;n!==void 0&&this.layout.hierarchical.addToOrdering(e,n),e.y=t}},{key:`getTreeSize`,value:function(e){var t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_y,max:t.max_y}}},{key:`sort`,value:function(e){sD(e).call(e,(function(e,t){return e.y-t.y}))}},{key:`fix`,value:function(e,t){e.x=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.x=!0}},{key:`shift`,value:function(e,t){this.layout.body.nodes[e].y+=t}}]),n}(CD),ED=zl.every;R({target:`Array`,proto:!0,forced:!Bp(`every`)},{every:function(e){return ED(this,e,arguments.length>1?arguments[1]:void 0)}});var DD=Kr(`Array`).every,OD=F,kD=DD,AD=Array.prototype,jD=r(function(e){var t=e.every;return e===AD||OD(AD,e)&&t===AD.every?kD:t});function MD(e,t){var n=fp!==void 0&&bc(e)||e[`@@iterator`];if(!n){if(Tp(e)||(n=function(e,t){var n;if(e){if(typeof e==`string`)return ND(e,t);var r=vp(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return $s(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ND(e,t)}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
40
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function ND(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function PD(e,t){var n=new mT;return Xp(e).call(e,(function(e){var t;Xp(t=e.edges).call(t,(function(e){e.connected&&n.add(e)}))})),Xp(n).call(n,(function(e){var n=e.from.id,r=e.to.id;t[n]??(t[n]=0),(t[r]==null||t[n]>=t[r])&&(t[r]=t[n]+1)})),t}function FD(e,t,n,r){var i,a,o=zh(null),s=xD(i=dp(yS(r).call(r))).call(i,(function(e,t){return e+1+t.edges.length}),0),c=n+`Id`,l=n===`to`?1:-1,u=MD(r);try{var d,f=function(){var i=up(a.value,2),u=i[0],d=i[1];if(!r.has(u)||!e(d))return 0;o[u]=0;for(var f,p,m=[d],h=0,g=function(){var e,i;if(!r.has(u))return 0;var a=o[f.id]+l;if(Xp(e=ih(i=f.edges).call(i,(function(e){return e.connected&&e.to!==e.from&&e[n]!==f&&r.has(e.toId)&&r.has(e.fromId)}))).call(e,(function(e){var r=e[c],i=o[r];(i==null||t(a,i))&&(o[r]=a,m.push(e[n]))})),h>s)return{v:{v:PD(r,o)}};++h};f=m.pop();)if((p=g())!==0&&p)return p.v};for(u.s();!(a=u.n()).done;)if((d=f())!==0&&d)return d.v}catch(e){u.e(e)}finally{u.f()}return o}var ID=function(){function e(){H(this,e),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return U(e,[{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)return void(this.isTree=!1);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={};return function e(r){if(n[r]!==void 0)return n[r];var i=t.levels[r];if(t.childrenReference[r]){var a=t.childrenReference[r];if(a.length>0)for(var o=0;o<a.length;o++)i=Math.max(i,e(a[o]))}return n[r]=i,i}(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 r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.levels[r]!==void 0&&(this.levels[r]-=t)}},{key:`getTreeSize`,value:function(e,t){var n=1e9,r=-1e9,i=1e9,a=-1e9;for(var o in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,o)&&this.trees[o]===t){var s=e[o];n=Math.min(s.x,n),r=Math.max(s.x,r),i=Math.min(s.y,i),a=Math.max(s.y,a)}return{min_x:n,max_x:r,min_y:i,max_y:a}}},{key:`hasSameParent`,value:function(e,t){var n=this.parentReference[e.id],r=this.parentReference[t.id];if(n===void 0||r===void 0)return!1;for(var i=0;i<n.length;i++)for(var a=0;a<r.length;a++)if(n[i]==r[a])return!0;return!1}},{key:`inSameSubNetwork`,value:function(e,t){return this.trees[e.id]===this.trees[t.id]}},{key:`getLevels`,value:function(){return Pp(this.distributionOrdering)}},{key:`addToOrdering`,value:function(e,t){this.distributionOrdering[t]===void 0&&(this.distributionOrdering[t]=[]);var n=!1,r=this.distributionOrdering[t];for(var i in r)if(r[i]===e){n=!0;break}n||(this.distributionOrdering[t].push(e),this.distributionIndex[e.id]=this.distributionOrdering[t].length-1)}}]),e}(),LD=function(){function e(t){H(this,e),this.body=t,this._resetRNG(Math.random()+`:`+Rp()),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`}},jr(this.options,this.defaultOptions),this.bindEventListeners()}return U(e,[{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(!0===e.options.hierarchical.enabled){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,r=n.enabled;if(Ev([`randomSeed`,`improvedLayout`,`clusterThreshold`],this.options,e),Vv(this.options,e,`hierarchical`),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),!0===n.enabled)return!0===r&&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(!0===r)return this.body.emitter.emit(`refresh`),Ov(t,this.optionsBackup)}return t}},{key:`_resetRNG`,value:function(e){this.initialRandomSeed=e,this._rng=mv(this.initialRandomSeed)}},{key:`adaptAllOptionsForHierarchicalLayout`,value:function(e){if(!0===this.options.hierarchical.enabled){var t=this.optionsBackup.physics;e.physics===void 0||!0===e.physics?(e.physics={enabled:t.enabled===void 0||t.enabled,solver:`hierarchicalRepulsion`},t.enabled=t.enabled===void 0||t.enabled,t.solver=t.solver||`barnesHut`):xf(e.physics)===`object`?(t.enabled=e.physics.enabled===void 0||e.physics.enabled,t.solver=e.physics.solver||`barnesHut`,e.physics.solver=`hierarchicalRepulsion`):!1!==e.physics&&(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 r=e.edges.smooth;r.type!==void 0&&r.type!==`dynamic`&&(n=r.type),this.optionsBackup.edges={smooth:{enabled:r.enabled===void 0||r.enabled,type:r.type===void 0?`dynamic`:r.type,roundness:r.roundness===void 0?.5:r.roundness,forceDirection:r.forceDirection!==void 0&&r.forceDirection}},e.edges.smooth={enabled:r.enabled===void 0||r.enabled,type:n,roundness:r.roundness===void 0?.5:r.roundness,forceDirection:r.forceDirection!==void 0&&r.forceDirection}}this.body.emitter.emit(`_forceDisableDynamicCurves`,n)}return e}},{key:`positionInitially`,value:function(e){if(!0!==this.options.hierarchical.enabled){this._resetRNG(this.initialRandomSeed);for(var t=e.length+50,n=0;n<e.length;n++){var r=e[n],i=2*Math.PI*this._rng();r.x===void 0&&(r.x=t*Math.cos(i)),r.y===void 0&&(r.y=t*Math.sin(i))}}}},{key:`layoutNetwork`,value:function(){if(!0!==this.options.hierarchical.enabled&&!0===this.options.improvedLayout){for(var e=this.body.nodeIndices,t=0,n=0;n<e.length;n++)!0===this.body.nodes[e[n]].predefinedPosition&&(t+=1);if(t<.5*e.length){var r=0,i=this.options.clusterThreshold,a={clusterNodeProperties:{shape:`ellipse`,label:``,group:``,font:{multi:!1}},clusterEdgeProperties:{label:``,font:{multi:!1},smooth:{enabled:!1}}};if(e.length>i){for(var o=e.length;e.length>i&&r<=10;){r+=1;var s=e.length;if(r%3==0?this.body.modules.clustering.clusterBridges(a):this.body.modules.clustering.clusterOutliers(a),s==e.length&&r%3!=0)return this._declusterAll(),this.body.emitter.emit(`_layoutFailed`),void console.info(`This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.`)}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*o)})}r>10&&console.info(`The clustering didn't succeed within the amount of interations allowed, progressing with partial result.`),this.body.modules.kamadaKawai.solve(e,this.body.edgeIndices,!0),this._shiftToCenter();for(var c=0;c<e.length;c++){var l=this.body.nodes[e[c]];!1===l.predefinedPosition&&(l.x+=70*(.5-this._rng()),l.y+=70*(.5-this._rng()))}this._declusterAll(),this.body.emitter.emit(`_repositionBezierNodes`)}}}},{key:`_shiftToCenter`,value:function(){for(var e=$w.getRangeCore(this.body.nodes,this.body.nodeIndices),t=$w.findCenter(e),n=0;n<this.body.nodeIndices.length;n++){var r=this.body.nodes[this.body.nodeIndices[n]];r.x-=t.x,r.y-=t.y}}},{key:`_declusterAll`,value:function(){for(var e=!0;!0===e;){e=!1;for(var t=0;t<this.body.nodeIndices.length;t++)!0===this.body.nodes[this.body.nodeIndices[t]].isCluster&&(e=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[t],{},!1));!0===e&&this.body.emitter.emit(`_dataChanged`)}}},{key:`getSeed`,value:function(){return this.initialRandomSeed}},{key:`setupHierarchicalLayout`,value:function(){if(!0===this.options.hierarchical.enabled&&this.body.nodeIndices.length>0){var e,t,n=!1,r=!1;for(t in this.lastNodeOnLevel={},this.hierarchical=new ID,this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&((e=this.body.nodes[t]).options.level===void 0?r=!0:(n=!0,this.hierarchical.levels[t]=e.options.level));if(!0===r&&!0===n)throw Error(`To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.`);if(!0===r){var i=this.options.hierarchical.sortMethod;i===`hubsize`?this._determineLevelsByHubsize():i===`directed`?this._determineLevelsDirected():i===`custom`&&this._determineLevelsCustomCallback()}for(var a in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,a)&&this.hierarchical.ensureLevel(a);var o=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(o),this._condenseHierarchy(),this._shiftToCenter()}}},{key:`_condenseHierarchy`,value:function(){var e=this,t=!1,n={},r=function(t,n){var r=e.hierarchical.trees;for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&r[i]===t&&e.direction.shift(i,n)},i=function(){for(var t=[],n=0;n<e.hierarchical.numTrees();n++)t.push(e.direction.getTreeSize(n));return t},a=function t(n,r){if(!r[n.id]&&(r[n.id]=!0,e.hierarchical.childrenReference[n.id])){var i=e.hierarchical.childrenReference[n.id];if(i.length>0)for(var a=0;a<i.length;a++)t(e.body.nodes[i[a]],r)}},o=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,r=1e9,i=1e9,a=1e9,o=-1e9;for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s)){var c=e.body.nodes[s],l=e.hierarchical.levels[c.id],u=e.direction.getPosition(c),d=up(e._getSpaceAroundNode(c,t),2),f=d[0],p=d[1];r=Math.min(f,r),i=Math.min(p,i),l<=n&&(a=Math.min(u,a),o=Math.max(u,o))}return[a,o,r,i]},s=function(t,n,r){for(var i=e.hierarchical,a=0;a<n.length;a++){var o=n[a],s=i.distributionOrdering[o];if(s.length>1)for(var c=0;c<s.length-1;c++){var l=s[c],u=s[c+1];i.hasSameParent(l,u)&&i.inSameSubNetwork(l,u)&&t(l,u,r)}}},c=function(n,r){var i=arguments.length>2&&arguments[2]!==void 0&&arguments[2],s=e.direction.getPosition(n),c=e.direction.getPosition(r),l=Math.abs(c-s),u=e.options.hierarchical.nodeSpacing;if(l>u){var d={},f={};a(n,d),a(r,f);var p=function(t,n){var r=e.hierarchical.getMaxLevel(t.id),i=e.hierarchical.getMaxLevel(n.id);return Math.min(r,i)}(n,r),m=o(d,p),h=o(f,p),g=m[1],_=h[0],v=h[2];if(Math.abs(g-_)>u){var y=g-_+u;y<-v+u&&(y=-v+u),y<0&&(e._shiftBlock(r.id,y),t=!0,!0===i&&e._centerParent(r))}}},l=function(r,i){for(var s=i.id,c=i.edges,l=e.hierarchical.levels[i.id],u=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,d={},f=[],p=0;p<c.length;p++){var m=c[p];if(m.toId!=m.fromId){var h=m.toId==s?m.from:m.to;d[c[p].id]=h,e.hierarchical.levels[h.id]<l&&f.push(m)}}var g=function(t,n){for(var r=0,i=0;i<n.length;i++)if(d[n[i].id]!==void 0){var a=e.direction.getPosition(d[n[i].id])-t;r+=a/Math.sqrt(a*a+u)}return r},_=function(t,n){for(var r=0,i=0;i<n.length;i++)if(d[n[i].id]!==void 0){var a=e.direction.getPosition(d[n[i].id])-t;r-=u*(a*a+u)**-1.5}return r},v=function(t,n){for(var r=e.direction.getPosition(i),a={},o=0;o<t;o++){var s=g(r,n),c=_(r,n);if(a[r-=Math.max(-40,Math.min(40,Math.round(s/c)))]!==void 0)break;a[r]=o}return r},y=v(r,f);(function(r){var s=e.direction.getPosition(i);if(n[i.id]===void 0){var c={};a(i,c),n[i.id]=c}var l=o(n[i.id]),u=l[2],d=l[3],f=r-s,p=0;f>0?p=Math.min(f,d-e.options.hierarchical.nodeSpacing):f<0&&(p=-Math.min(-f,u-e.options.hierarchical.nodeSpacing)),p!=0&&(e._shiftBlock(i.id,p),t=!0)})(y),function(n){var r=e.direction.getPosition(i),a=up(e._getSpaceAroundNode(i),2),o=a[0],s=a[1],c=n-r,l=r;c>0?l=Math.min(r+(s-e.options.hierarchical.nodeSpacing),n):c<0&&(l=Math.max(r-(o-e.options.hierarchical.nodeSpacing),n)),l!==r&&(e.direction.setPosition(i,l),t=!0)}(y=v(r,c))};!0===this.options.hierarchical.blockShifting&&(function(n){var r=e.hierarchical.getLevels();r=am(r).call(r);for(var i=0;i<n&&(t=!1,s(c,r,!0),!0===t);i++);}(5),function(){for(var t in e.body.nodes)Object.prototype.hasOwnProperty.call(e.body.nodes,t)&&e._centerParent(e.body.nodes[t])}()),!0===this.options.hierarchical.edgeMinimization&&function(n){var r=e.hierarchical.getLevels();r=am(r).call(r);for(var i=0;i<n;i++){t=!1;for(var a=0;a<r.length;a++)for(var o=r[a],s=e.hierarchical.distributionOrdering[o],c=0;c<s.length;c++)l(1e3,s[c]);if(!0!==t)break}}(20),!0===this.options.hierarchical.parentCentralization&&function(){var t=e.hierarchical.getLevels();t=am(t).call(t);for(var n=0;n<t.length;n++)for(var r=t[n],i=e.hierarchical.distributionOrdering[r],a=0;a<i.length;a++)e._centerParent(i[a])}(),function(){for(var t=i(),n=0,a=0;a<t.length-1;a++)n+=t[a].max-t[a+1].min+e.options.hierarchical.treeSpacing,r(a+1,n)}()}},{key:`_getSpaceAroundNode`,value:function(e,t){var n=!0;t===void 0&&(n=!1);var r=this.hierarchical.levels[e.id];if(r!==void 0){var i=this.hierarchical.distributionIndex[e.id],a=this.direction.getPosition(e),o=this.hierarchical.distributionOrdering[r],s=1e9,c=1e9;if(i!==0){var l=o[i-1];(!0===n&&t[l.id]===void 0||!1===n)&&(s=a-this.direction.getPosition(l))}if(i!=o.length-1){var u=o[i+1];if(!0===n&&t[u.id]===void 0||!1===n){var d=this.direction.getPosition(u);c=Math.min(c,d-a)}}return[s,c]}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 r=t[n],i=this.body.nodes[r],a=this.hierarchical.childrenReference[r];if(a!==void 0){var o=this._getCenterPosition(a),s=this.direction.getPosition(i),c=up(this._getSpaceAroundNode(i),2),l=c[0],u=c[1],d=s-o;(d<0&&Math.abs(d)<u-this.options.hierarchical.nodeSpacing||d>0&&Math.abs(d)<l-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(i,o)}}}},{key:`_placeNodesByHierarchy`,value:function(e){for(var t in this.positionedNodes={},e)if(Object.prototype.hasOwnProperty.call(e,t)){var n,r=Pp(e[t]);r=this._indexArrayToNodes(r),sD(n=this.direction).call(n,r);for(var i=0,a=0;a<r.length;a++){var o=r[a];if(this.positionedNodes[o.id]===void 0){var s=this.options.hierarchical.nodeSpacing,c=s*i;i>0&&(c=this.direction.getPosition(r[a-1])+s),this.direction.setPosition(o,c,t),this._validatePositionAndContinue(o,t,c),i++}}}}},{key:`_placeBranchNodes`,value:function(e,t){var n,r=this.hierarchical.childrenReference[e];if(r!==void 0){for(var i=[],a=0;a<r.length;a++)i.push(this.body.nodes[r[a]]);sD(n=this.direction).call(n,i);for(var o=0;o<i.length;o++){var s=i[o],c=this.hierarchical.levels[s.id];if(!(c>t&&this.positionedNodes[s.id]===void 0))return;var l=this.options.hierarchical.nodeSpacing,u=void 0;u=o===0?this.direction.getPosition(this.body.nodes[e]):this.direction.getPosition(i[o-1])+l,this.direction.setPosition(s,u,c),this._validatePositionAndContinue(s,c,u)}var d=this._getCenterPosition(i);this.direction.setPosition(this.body.nodes[e],d,t)}}},{key:`_validatePositionAndContinue`,value:function(e,t,n){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[t]!==void 0){var r=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(n-r<this.options.hierarchical.nodeSpacing){var i=r+this.options.hierarchical.nodeSpacing-n,a=this._findCommonParent(this.lastNodeOnLevel[t],e.id);this._shiftBlock(a.withChild,i)}}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(e in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,e)){t=this.body.nodes[e];var r=this.hierarchical.levels[e]===void 0?0:this.hierarchical.levels[e];this.direction.fix(t,r),n[r]===void 0&&(n[r]={}),n[r][e]=t}return n}},{key:`_getActiveEdges`,value:function(e){var t=this,n=[];return W(e.edges,(function(e){var r;Ih(r=t.body.edgeIndices).call(r,e.id)!==-1&&n.push(e)})),n}},{key:`_getHubSizes`,value:function(){var e=this,t={};W(this.body.nodeIndices,(function(n){var r=e.body.nodes[n],i=e._getActiveEdges(r).length;t[i]=!0}));var n=[];return W(t,(function(e){n.push(Number(e))})),sD(n).call(n,(function(e,t){return t-e})),n}},{key:`_determineLevelsByHubsize`,value:function(){for(var e=this,t=function(t,n){e.hierarchical.levelDownstream(t,n)},n=this._getHubSizes(),r=function(){var r=n[i];if(r===0)return 1;W(e.body.nodeIndices,(function(n){var i=e.body.nodes[n];r===e._getActiveEdges(i).length&&e._crawlNetwork(t,n)}))},i=0;i<n.length&&!r();++i);}},{key:`_determineLevelsCustomCallback`,value:function(){var e=this;this._crawlNetwork((function(t,n,r){var i=e.hierarchical.levels[t.id];i===void 0&&(i=e.hierarchical.levels[t.id]=1e5);var a=($w.cloneOptions(t,`node`),$w.cloneOptions(n,`node`),void $w.cloneOptions(r,`edge`));e.hierarchical.levels[n.id]=i+a})),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:`_determineLevelsDirected`,value:function(){var e,t=this,n=xD(e=this.body.nodeIndices).call(e,(function(e,n){return e.set(n,t.body.nodes[n]),e}),new ux);this.options.hierarchical.shakeTowards===`roots`?this.hierarchical.levels=function(e){return FD((function(t){var n,r;return jD(n=ih(r=t.edges).call(r,(function(t){return e.has(t.toId)}))).call(n,(function(e){return e.from===t}))}),(function(e,t){return t<e}),`to`,e)}(n):this.hierarchical.levels=function(e){return FD((function(t){var n,r;return jD(n=ih(r=t.edges).call(r,(function(t){return e.has(t.toId)}))).call(n,(function(e){return e.to===t}))}),(function(e,t){return t>e}),`from`,e)}(n),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:`_generateMap`,value:function(){var e=this;this._crawlNetwork((function(t,n){e.hierarchical.levels[n.id]>e.hierarchical.levels[t.id]&&e.hierarchical.addRelation(t.id,n.id)})),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,r={},i=function n(i,a){if(r[i.id]===void 0){var o;e.hierarchical.setTreeIndex(i,a),r[i.id]=!0;for(var s=e._getActiveEdges(i),c=0;c<s.length;c++){var l=s[c];!0===l.connected&&(o=l.toId==i.id?l.from:l.to,i.id!=o.id&&(t(i,o,l),n(o,a)))}}};if(n===void 0)for(var a=0,o=0;o<this.body.nodeIndices.length;o++){var s=this.body.nodeIndices[o];r[s]===void 0&&(i(this.body.nodes[s],a),a+=1)}else{var c=this.body.nodes[n];if(c===void 0)return void console.error(`Node not found:`,n);i(c)}}},{key:`_shiftBlock`,value:function(e,t){var n=this,r={};(function e(i){if(!r[i]){r[i]=!0,n.direction.shift(i,t);var a=n.hierarchical.childrenReference[i];if(a!==void 0)for(var o=0;o<a.length;o++)e(a[o])}})(e)}},{key:`_findCommonParent`,value:function(e,t){var n=this,r={};return function e(t,r){var i=n.hierarchical.parentReference[r];if(i!==void 0)for(var a=0;a<i.length;a++){var o=i[a];t[o]=!0,e(t,o)}}(r,e),function e(t,r){var i=n.hierarchical.parentReference[r];if(i!==void 0)for(var a=0;a<i.length;a++){var o=i[a];if(t[o]!==void 0)return{foundParent:o,withChild:r};var s=e(t,o);if(s.foundParent!==null)return s}return{foundParent:null,withChild:r}}(r,t)}},{key:`setDirectionStrategy`,value:function(){this.direction=this.options.hierarchical.direction===`UD`||this.options.hierarchical.direction===`DU`?new wD(this):new TD(this)}},{key:`_getCenterPosition`,value:function(e){for(var t=1e9,n=-1e9,r=0;r<e.length;r++){var i=void 0;if(e[r].id!==void 0)i=e[r];else{var a=e[r];i=this.body.nodes[a]}var o=this.direction.getPosition(i);t=Math.min(t,o),n=Math.max(n,o)}return .5*(t+n)}}]),e}();function RD(e,t){var n=fp!==void 0&&bc(e)||e[`@@iterator`];if(!n){if(Tp(e)||(n=function(e,t){var n;if(e){if(typeof e==`string`)return zD(e,t);var r=vp(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return $s(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zD(e,t)}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
41
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function zD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var BD=function(){function e(t,n,r,i){var a,o,s=this;H(this,e),this.body=t,this.canvas=n,this.selectionHandler=r,this.interactionHandler=i,this.editMode=!1,this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0,this._domEventListenerCleanupQueue=[],this.temporaryUIFunctions={},this.temporaryEventFunctions=[],this.touchTime=0,this.temporaryIds={nodes:[],edges:[]},this.guiEnabled=!1,this.inMode=!1,this.selectedControlNode=void 0,this.options={},this.defaultOptions={enabled:!1,initiallyActive:!1,addNode:!0,addEdge:!0,editNode:void 0,editEdge:!0,deleteNode:!0,deleteEdge:!0,controlNodeStyle:{shape:`dot`,size:6,color:{background:`#ff0000`,border:`#3c3c3c`,highlight:{background:`#07f968`,border:`#3c3c3c`}},borderWidth:2,borderWidthSelected:2}},jr(this.options,this.defaultOptions),this.body.emitter.on(`destroy`,(function(){s._clean()})),this.body.emitter.on(`_dataChanged`,V(a=this._restore).call(a,this)),this.body.emitter.on(`_resetData`,V(o=this._restore).call(o,this))}return U(e,[{key:`_restore`,value:function(){!1!==this.inMode&&(!0===this.options.initiallyActive?this.enableEditMode():this.disableEditMode())}},{key:`setOptions`,value:function(e,t,n){t!==void 0&&(t.locale===void 0?this.options.locale=n.locale:this.options.locale=t.locale,t.locales===void 0?this.options.locales=n.locales:this.options.locales=t.locales),e!==void 0&&(typeof e==`boolean`?this.options.enabled=e:(this.options.enabled=!0,Ov(this.options,e)),!0===this.options.initiallyActive&&(this.editMode=!0),this._setup())}},{key:`toggleEditMode`,value:function(){!0===this.editMode?this.disableEditMode():this.enableEditMode()}},{key:`enableEditMode`,value:function(){this.editMode=!0,this._clean(),!0===this.guiEnabled&&(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(),!0===this.guiEnabled&&(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={},!0===this.guiEnabled){var e,t;this.editMode=!0,this.manipulationDiv.style.display=`block`,this.closeDiv.style.display=`block`;var n=this.selectionHandler.getSelectedNodeCount(),r=this.selectionHandler.getSelectedEdgeCount(),i=n+r,a=this.options.locales[this.options.locale],o=!1;!1!==this.options.addNode&&(this._createAddNodeButton(a),o=!0),!1!==this.options.addEdge&&(!0===o?this._createSeperator(1):o=!0,this._createAddEdgeButton(a)),n===1&&typeof this.options.editNode==`function`?(!0===o?this._createSeperator(2):o=!0,this._createEditNodeButton(a)):r===1&&n===0&&!1!==this.options.editEdge&&(!0===o?this._createSeperator(3):o=!0,this._createEditEdgeButton(a)),i!==0&&(n>0&&!1!==this.options.deleteNode||n===0&&!1!==this.options.deleteEdge)&&(!0===o&&this._createSeperator(4),this._createDeleteButton(a)),this._bindElementEvents(this.closeDiv,V(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent(`select`,V(t=this.showManipulatorToolbar).call(t,this))}this.body.emitter.emit(`_redraw`)}},{key:`addNodeMode`,value:function(){var e;if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode=`addNode`,!0===this.guiEnabled){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,V(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent(`click`,V(e=this._performAddNode).call(e,this))}},{key:`editNode`,value:function(){var e=this;!0!==this.editMode&&this.enableEditMode(),this._clean();var t=this.selectionHandler.getSelectedNodes()[0];if(t!==void 0){if(this.inMode=`editNode`,typeof this.options.editNode!=`function`)throw Error(`No function has been configured to handle the editing of nodes.`);if(!0!==t.isCluster){var n=Ov({},t.options,!1);if(n.x=t.x,n.y=t.y,this.options.editNode.length!==2)throw Error(`The function for edit does not support two arguments (data, callback)`);this.options.editNode(n,(function(t){t!=null&&e.inMode===`editNode`&&e.body.data.nodes.getDataSet().update(t),e.showManipulatorToolbar()}))}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError)}else this.showManipulatorToolbar()}},{key:`addEdgeMode`,value:function(){var e,t,n,r,i;if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode=`addEdge`,!0===this.guiEnabled){var a,o=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(o),this._createSeperator(),this._createDescription(o.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,V(a=this.toggleEditMode).call(a,this))}this._temporaryBindUI(`onTouch`,V(e=this._handleConnect).call(e,this)),this._temporaryBindUI(`onDragEnd`,V(t=this._finishConnect).call(t,this)),this._temporaryBindUI(`onDrag`,V(n=this._dragControlNode).call(n,this)),this._temporaryBindUI(`onRelease`,V(r=this._finishConnect).call(r,this)),this._temporaryBindUI(`onDragStart`,V(i=this._dragStartEdge).call(i,this)),this._temporaryBindUI(`onHold`,(function(){}))}},{key:`editEdgeMode`,value:function(){if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode=`editEdge`,xf(this.options.editEdge)!==`object`||typeof this.options.editEdge.editWithoutDrag!=`function`||(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId===void 0)){if(!0===this.guiEnabled){var e,t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,V(e=this.toggleEditMode).call(e,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var n,r,i,a,o=this.body.edges[this.edgeBeingEditedId],s=this._getNewTargetNode(o.from.x,o.from.y),c=this._getNewTargetNode(o.to.x,o.to.y);this.temporaryIds.nodes.push(s.id),this.temporaryIds.nodes.push(c.id),this.body.nodes[s.id]=s,this.body.nodeIndices.push(s.id),this.body.nodes[c.id]=c,this.body.nodeIndices.push(c.id),this._temporaryBindUI(`onTouch`,V(n=this._controlNodeTouch).call(n,this)),this._temporaryBindUI(`onTap`,(function(){})),this._temporaryBindUI(`onHold`,(function(){})),this._temporaryBindUI(`onDragStart`,V(r=this._controlNodeDragStart).call(r,this)),this._temporaryBindUI(`onDrag`,V(i=this._controlNodeDrag).call(i,this)),this._temporaryBindUI(`onDragEnd`,V(a=this._controlNodeDragEnd).call(a,this)),this._temporaryBindUI(`onMouseMove`,(function(){})),this._temporaryBindEvent(`beforeDrawing`,(function(e){var t=o.edgeType.findBorderPositions(e);!1===s.selected&&(s.x=t.from.x,s.y=t.from.y),!1===c.selected&&(c.x=t.to.x,c.y=t.to.y)})),this.body.emitter.emit(`_redraw`)}else this.showManipulatorToolbar()}else{var l=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(l.from.id,l.to.id)}}},{key:`deleteSelected`,value:function(){var e=this;!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode=`delete`;var t=this.selectionHandler.getSelectedNodeIds(),n=this.selectionHandler.getSelectedEdgeIds(),r=void 0;if(t.length>0){for(var i=0;i<t.length;i++)if(!0===this.body.nodes[t[i]].isCluster)return void alert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);typeof this.options.deleteNode==`function`&&(r=this.options.deleteNode)}else n.length>0&&typeof this.options.deleteEdge==`function`&&(r=this.options.deleteEdge);if(typeof r==`function`){var a={nodes:t,edges:n};if(r.length!==2)throw Error(`The function for delete does not support two arguments (data, callback)`);r(a,(function(t){t!=null&&e.inMode===`delete`?(e.body.data.edges.getDataSet().remove(t.edges),e.body.data.nodes.getDataSet().remove(t.nodes),e.body.emitter.emit(`startSimulation`),e.showManipulatorToolbar()):(e.body.emitter.emit(`startSimulation`),e.showManipulatorToolbar())}))}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(){!0===this.options.enabled?(this.guiEnabled=!0,this._createWrappers(),!1===this.editMode?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:`_createWrappers`,value:function(){(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement(`div`),this.manipulationDiv.className=`vis-manipulation`,!0===this.editMode?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`,!0===this.editMode?this.editModeDiv.style.display=`none`:this.editModeDiv.style.display=`block`,this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0)&&(this.closeDiv=document.createElement(`button`),this.closeDiv.className=`vis-close`,this.closeDiv.setAttribute(`aria-label`,this.options.locales[this.options.locale]?.close??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=Ov({},this.options.controlNodeStyle);n.id=`targetNode`+Qw(),n.hidden=!1,n.physics=!1,n.x=e,n.y=t;var r=this.body.functions.createNode(n);return r.shape.boundingBox={left:e,right:e,top:t,bottom:t},r}},{key:`_createEditButton`,value:function(){var e;this._clean(),this.manipulationDOM={},xv(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,V(e=this.toggleEditMode).call(e,this))}},{key:`_clean`,value:function(){this.inMode=!1,!0===this.guiEnabled&&(xv(this.editModeDiv),xv(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit(`restorePhysics`)}},{key:`_cleanupDOMEventListeners`,value:function(){var e,t,n=RD(Em(e=this._domEventListenerCleanupQueue).call(e,0));try{for(n.s();!(t=n.n()).done;)(0,t.value)()}catch(e){n.e(e)}finally{n.f()}}},{key:`_removeManipulationDOM`,value:function(){this._clean(),xv(this.manipulationDiv),xv(this.editModeDiv),xv(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,V(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,V(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,V(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,V(t=this.editEdgeMode).call(t,this))}},{key:`_createDeleteButton`,value:function(e){var t,n=this.options.rtl?`vis-delete-rtl`:`vis-delete`,r=this._createButton(`delete`,n,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,V(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,V(t=this.showManipulatorToolbar).call(t,this))}},{key:`_createButton`,value:function(e,t,n){var r=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=r,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)throw Error(`This UI function does not exist. Typo? You tried: `+e+` possible are: `+Hh(Pp(this.body.eventListeners)));this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t}},{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 ty(e,{});aT(n,t),this._domEventListenerCleanupQueue.push((function(){n.destroy()}));var r=function(e){var n=e.keyCode,r=e.key;r!==`Enter`&&r!==` `&&n!==13&&n!==32||t()};e.addEventListener(`keyup`,r,!1),this._domEventListenerCleanupQueue.push((function(){e.removeEventListener(`keyup`,r,!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,r=Ih(t=this.body.edgeIndices).call(t,this.temporaryIds.edges[e]);r!==-1&&Em(n=this.body.edgeIndices).call(n,r,1)}for(var i=0;i<this.temporaryIds.nodes.length;i++){var a;delete this.body.nodes[this.temporaryIds.nodes[i]];var o,s=Ih(a=this.body.nodeIndices).call(a,this.temporaryIds.nodes[i]);s!==-1&&Em(o=this.body.nodeIndices).call(o,s,1)}this.temporaryIds={nodes:[],edges:[]}}},{key:`_controlNodeTouch`,value:function(e){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=jr({},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]],r=this.body.nodes[this.temporaryIds.nodes[1]],i=this.body.edges[this.edgeBeingEditedId];this.selectedControlNode=void 0;var a=n.isOverlappingWith(t),o=r.isOverlappingWith(t);!0===a?(this.selectedControlNode=n,i.edgeType.from=n):!0===o&&(this.selectedControlNode=r,i.edgeType.to=r),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.interactionHandler.onDrag(e):(this.selectedControlNode.x=n.x,this.selectedControlNode.y=n.y),this.body.emitter.emit(`_redraw`)}},{key:`_controlNodeDragEnd`,value:function(e){var t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),r=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode!==void 0){this.selectionHandler.unselectAll();for(var i=this.selectionHandler._getAllNodesOverlappingWith(n),a=void 0,o=i.length-1;o>=0;o--)if(i[o]!==this.selectedControlNode.id){a=this.body.nodes[i[o]];break}if(a!==void 0&&this.selectedControlNode!==void 0)if(!0===a.isCluster)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var s=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===s.id?this._performEditEdge(a.id,r.to.id):this._performEditEdge(r.from.id,a.id)}else r.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=jr({},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(!0===n.isCluster)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var r=this._getNewTargetNode(n.x,n.y);this.body.nodes[r.id]=r,this.body.nodeIndices.push(r.id);var i=this.body.functions.createEdge({id:`connectionEdge`+Qw(),from:n.id,to:r.id,physics:!1,smooth:{enabled:!0,type:`continuous`,roundness:.5}});this.body.edges[i.id]=i,this.body.edgeIndices.push(i.id),this.temporaryIds.nodes.push(r.id),this.temporaryIds.edges.push(i.id)}this.touchTime=new Date().valueOf()}}},{key:`_dragControlNode`,value:function(e){var t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),r=void 0;this.temporaryIds.edges[0]!==void 0&&(r=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var i=this.selectionHandler._getAllNodesOverlappingWith(n),a=void 0,o=i.length-1;o>=0;o--){var s;if(Ih(s=this.temporaryIds.nodes).call(s,i[o])===-1){a=this.body.nodes[i[o]];break}}if(e.controlEdge={from:r,to:a?a.id:void 0},this.selectionHandler.generateClickEvent(`controlNodeDragging`,e,t),this.temporaryIds.nodes[0]!==void 0){var c=this.body.nodes[this.temporaryIds.nodes[0]];c.x=this.canvas._XconvertDOMtoCanvas(t.x),c.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),r=void 0;this.temporaryIds.edges[0]!==void 0&&(r=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var i=this.selectionHandler._getAllNodesOverlappingWith(n),a=void 0,o=i.length-1;o>=0;o--){var s;if(Ih(s=this.temporaryIds.nodes).call(s,i[o])===-1){a=this.body.nodes[i[o]];break}}this._cleanupTemporaryNodesAndEdges(),a!==void 0&&(!0===a.isCluster?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[r]!==void 0&&this.body.nodes[a.id]!==void 0&&this._performAddEdge(r,a.id)),e.controlEdge={from:r,to:a?a.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:Qw(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:`new`};if(typeof this.options.addNode==`function`){if(this.options.addNode.length!==2)throw this.showManipulatorToolbar(),Error(`The function for add does not support two arguments (data,callback)`);this.options.addNode(n,(function(e){e!=null&&t.inMode===`addNode`&&t.body.data.nodes.getDataSet().add(e),t.showManipulatorToolbar()}))}else this.body.data.nodes.getDataSet().add(n),this.showManipulatorToolbar()}},{key:`_performAddEdge`,value:function(e,t){var n=this,r={from:e,to:t};if(typeof this.options.addEdge==`function`){if(this.options.addEdge.length!==2)throw Error(`The function for connect does not support two arguments (data,callback)`);this.options.addEdge(r,(function(e){e!=null&&n.inMode===`addEdge`&&(n.body.data.edges.getDataSet().add(e),n.selectionHandler.unselectAll(),n.showManipulatorToolbar())}))}else this.body.data.edges.getDataSet().add(r),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:`_performEditEdge`,value:function(e,t){var n=this,r={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label},i=this.options.editEdge;if(xf(i)===`object`&&(i=i.editWithoutDrag),typeof i==`function`){if(i.length!==2)throw Error(`The function for edit does not support two arguments (data, callback)`);i(r,(function(e){e==null||n.inMode!==`editEdge`?(n.body.edges[r.id].updateEdgeType(),n.body.emitter.emit(`_redraw`),n.showManipulatorToolbar()):(n.body.data.edges.getDataSet().update(e),n.selectionHandler.unselectAll(),n.showManipulatorToolbar())}))}else this.body.data.edges.getDataSet().update(r),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),e}(),Y=`string`,X=`boolean`,Z=`number`,VD=`array`,Q=`object`,HD=[`arrow`,`bar`,`box`,`circle`,`crow`,`curve`,`diamond`,`image`,`inv_curve`,`inv_triangle`,`triangle`,`vee`],UD={borderWidth:{number:Z},borderWidthSelected:{number:Z,undefined:`undefined`},brokenImage:{string:Y,undefined:`undefined`},chosen:{label:{boolean:X,function:`function`},node:{boolean:X,function:`function`},__type__:{object:Q,boolean:X}},color:{border:{string:Y},background:{string:Y},highlight:{border:{string:Y},background:{string:Y},__type__:{object:Q,string:Y}},hover:{border:{string:Y},background:{string:Y},__type__:{object:Q,string:Y}},__type__:{object:Q,string:Y}},opacity:{number:Z,undefined:`undefined`},fixed:{x:{boolean:X},y:{boolean:X},__type__:{object:Q,boolean:X}},font:{align:{string:Y},color:{string:Y},size:{number:Z},face:{string:Y},background:{string:Y},strokeWidth:{number:Z},strokeColor:{string:Y},vadjust:{number:Z},multi:{boolean:X,string:Y},bold:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},boldital:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},ital:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},mono:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},__type__:{object:Q,string:Y}},group:{string:Y,number:Z,undefined:`undefined`},heightConstraint:{minimum:{number:Z},valign:{string:Y},__type__:{object:Q,boolean:X,number:Z}},hidden:{boolean:X},icon:{face:{string:Y},code:{string:Y},size:{number:Z},color:{string:Y},weight:{string:Y,number:Z},__type__:{object:Q}},id:{string:Y,number:Z},image:{selected:{string:Y,undefined:`undefined`},unselected:{string:Y,undefined:`undefined`},__type__:{object:Q,string:Y}},imagePadding:{top:{number:Z},right:{number:Z},bottom:{number:Z},left:{number:Z},__type__:{object:Q,number:Z}},label:{string:Y,undefined:`undefined`},labelHighlightBold:{boolean:X},level:{number:Z,undefined:`undefined`},margin:{top:{number:Z},right:{number:Z},bottom:{number:Z},left:{number:Z},__type__:{object:Q,number:Z}},mass:{number:Z},physics:{boolean:X},scaling:{min:{number:Z},max:{number:Z},label:{enabled:{boolean:X},min:{number:Z},max:{number:Z},maxVisible:{number:Z},drawThreshold:{number:Z},__type__:{object:Q,boolean:X}},customScalingFunction:{function:`function`},__type__:{object:Q}},shadow:{enabled:{boolean:X},color:{string:Y},size:{number:Z},x:{number:Z},y:{number:Z},__type__:{object:Q,boolean:X}},shape:{string:[`custom`,`ellipse`,`circle`,`database`,`box`,`text`,`image`,`circularImage`,`diamond`,`dot`,`star`,`triangle`,`triangleDown`,`square`,`icon`,`hexagon`]},ctxRenderer:{function:`function`},shapeProperties:{borderDashes:{boolean:X,array:VD},borderRadius:{number:Z},interpolation:{boolean:X},useImageSize:{boolean:X},useBorderWithImage:{boolean:X},coordinateOrigin:{string:[`center`,`top-left`]},__type__:{object:Q}},size:{number:Z},title:{string:Y,dom:`dom`,undefined:`undefined`},value:{number:Z,undefined:`undefined`},widthConstraint:{minimum:{number:Z},maximum:{number:Z},__type__:{object:Q,boolean:X,number:Z}},x:{number:Z},y:{number:Z},__type__:{object:Q}},WD={configure:{enabled:{boolean:X},filter:{boolean:X,string:Y,array:VD,function:`function`},container:{dom:`dom`},showButton:{boolean:X},__type__:{object:Q,boolean:X,string:Y,array:VD,function:`function`}},edges:{arrows:{to:{enabled:{boolean:X},scaleFactor:{number:Z},type:{string:HD},imageHeight:{number:Z},imageWidth:{number:Z},src:{string:Y},__type__:{object:Q,boolean:X}},middle:{enabled:{boolean:X},scaleFactor:{number:Z},type:{string:HD},imageWidth:{number:Z},imageHeight:{number:Z},src:{string:Y},__type__:{object:Q,boolean:X}},from:{enabled:{boolean:X},scaleFactor:{number:Z},type:{string:HD},imageWidth:{number:Z},imageHeight:{number:Z},src:{string:Y},__type__:{object:Q,boolean:X}},__type__:{string:[`from`,`to`,`middle`],object:Q}},endPointOffset:{from:{number:Z},to:{number:Z},__type__:{object:Q,number:Z}},arrowStrikethrough:{boolean:X},background:{enabled:{boolean:X},color:{string:Y},size:{number:Z},dashes:{boolean:X,array:VD},__type__:{object:Q,boolean:X}},chosen:{label:{boolean:X,function:`function`},edge:{boolean:X,function:`function`},__type__:{object:Q,boolean:X}},color:{color:{string:Y},highlight:{string:Y},hover:{string:Y},inherit:{string:[`from`,`to`,`both`],boolean:X},opacity:{number:Z},__type__:{object:Q,string:Y}},dashes:{boolean:X,array:VD},font:{color:{string:Y},size:{number:Z},face:{string:Y},background:{string:Y},strokeWidth:{number:Z},strokeColor:{string:Y},align:{string:[`horizontal`,`top`,`middle`,`bottom`]},vadjust:{number:Z},multi:{boolean:X,string:Y},bold:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},boldital:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},ital:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},mono:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},__type__:{object:Q,string:Y}},hidden:{boolean:X},hoverWidth:{function:`function`,number:Z},label:{string:Y,undefined:`undefined`},labelHighlightBold:{boolean:X},length:{number:Z,undefined:`undefined`},physics:{boolean:X},scaling:{min:{number:Z},max:{number:Z},label:{enabled:{boolean:X},min:{number:Z},max:{number:Z},maxVisible:{number:Z},drawThreshold:{number:Z},__type__:{object:Q,boolean:X}},customScalingFunction:{function:`function`},__type__:{object:Q}},selectionWidth:{function:`function`,number:Z},selfReferenceSize:{number:Z},selfReference:{size:{number:Z},angle:{number:Z},renderBehindTheNode:{boolean:X},__type__:{object:Q}},shadow:{enabled:{boolean:X},color:{string:Y},size:{number:Z},x:{number:Z},y:{number:Z},__type__:{object:Q,boolean:X}},smooth:{enabled:{boolean:X},type:{string:[`dynamic`,`continuous`,`discrete`,`diagonalCross`,`straightCross`,`horizontal`,`vertical`,`curvedCW`,`curvedCCW`,`cubicBezier`]},roundness:{number:Z},forceDirection:{string:[`horizontal`,`vertical`,`none`],boolean:X},__type__:{object:Q,boolean:X}},title:{string:Y,undefined:`undefined`},width:{number:Z},widthConstraint:{maximum:{number:Z},__type__:{object:Q,boolean:X,number:Z}},value:{number:Z,undefined:`undefined`},__type__:{object:Q}},groups:{useDefaultGroups:{boolean:X},__any__:UD,__type__:{object:Q}},interaction:{dragNodes:{boolean:X},dragView:{boolean:X},hideEdgesOnDrag:{boolean:X},hideEdgesOnZoom:{boolean:X},hideNodesOnDrag:{boolean:X},hover:{boolean:X},keyboard:{enabled:{boolean:X},speed:{x:{number:Z},y:{number:Z},zoom:{number:Z},__type__:{object:Q}},bindToWindow:{boolean:X},autoFocus:{boolean:X},__type__:{object:Q,boolean:X}},multiselect:{boolean:X},navigationButtons:{boolean:X},selectable:{boolean:X},selectConnectedEdges:{boolean:X},hoverConnectedEdges:{boolean:X},tooltipDelay:{number:Z},zoomView:{boolean:X},zoomSpeed:{number:Z},__type__:{object:Q}},layout:{randomSeed:{undefined:`undefined`,number:Z,string:Y},improvedLayout:{boolean:X},clusterThreshold:{number:Z},hierarchical:{enabled:{boolean:X},levelSeparation:{number:Z},nodeSpacing:{number:Z},treeSpacing:{number:Z},blockShifting:{boolean:X},edgeMinimization:{boolean:X},parentCentralization:{boolean:X},direction:{string:[`UD`,`DU`,`LR`,`RL`]},sortMethod:{string:[`hubsize`,`directed`]},shakeTowards:{string:[`leaves`,`roots`]},__type__:{object:Q,boolean:X}},__type__:{object:Q}},manipulation:{enabled:{boolean:X},initiallyActive:{boolean:X},addNode:{boolean:X,function:`function`},addEdge:{boolean:X,function:`function`},editNode:{function:`function`},editEdge:{editWithoutDrag:{function:`function`},__type__:{object:Q,boolean:X,function:`function`}},deleteNode:{boolean:X,function:`function`},deleteEdge:{boolean:X,function:`function`},controlNodeStyle:UD,__type__:{object:Q,boolean:X}},nodes:UD,physics:{enabled:{boolean:X},barnesHut:{theta:{number:Z},gravitationalConstant:{number:Z},centralGravity:{number:Z},springLength:{number:Z},springConstant:{number:Z},damping:{number:Z},avoidOverlap:{number:Z},__type__:{object:Q}},forceAtlas2Based:{theta:{number:Z},gravitationalConstant:{number:Z},centralGravity:{number:Z},springLength:{number:Z},springConstant:{number:Z},damping:{number:Z},avoidOverlap:{number:Z},__type__:{object:Q}},repulsion:{centralGravity:{number:Z},springLength:{number:Z},springConstant:{number:Z},nodeDistance:{number:Z},damping:{number:Z},__type__:{object:Q}},hierarchicalRepulsion:{centralGravity:{number:Z},springLength:{number:Z},springConstant:{number:Z},nodeDistance:{number:Z},damping:{number:Z},avoidOverlap:{number:Z},__type__:{object:Q}},maxVelocity:{number:Z},minVelocity:{number:Z},solver:{string:[`barnesHut`,`repulsion`,`hierarchicalRepulsion`,`forceAtlas2Based`]},stabilization:{enabled:{boolean:X},iterations:{number:Z},updateInterval:{number:Z},onlyDynamicEdges:{boolean:X},fit:{boolean:X},__type__:{object:Q,boolean:X}},timestep:{number:Z},adaptiveTimestep:{boolean:X},wind:{x:{number:Z},y:{number:Z},__type__:{object:Q}},__type__:{object:Q,boolean:X}},autoResize:{boolean:X},clickToUse:{boolean:X},locale:{string:Y},locales:{__any__:{any:`any`},__type__:{object:Q}},height:{string:Y},width:{string:Y},__type__:{object:Q}},GD={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]}}},KD=function(e,t,n){var r;return!(!qm(e).call(e,`physics`)||!qm(r=GD.physics.solver).call(r,t)||n.physics.solver===t||t===`wind`)},qD=Object.freeze({__proto__:null,allOptions:WD,configuratorHideOption:KD,configureOptions:GD}),JD=function(){function e(){H(this,e)}return U(e,[{key:`getDistances`,value:function(e,t,n){for(var r={},i=e.edges,a=0;a<t.length;a++){var o={};r[t[a]]=o;for(var s=0;s<t.length;s++)o[t[s]]=a==s?0:1e9}for(var c=0;c<n.length;c++){var l=i[n[c]];!0===l.connected&&r[l.fromId]!==void 0&&r[l.toId]!==void 0&&(r[l.fromId][l.toId]=1,r[l.toId][l.fromId]=1)}for(var u=t.length,d=0;d<u;d++)for(var f=t[d],p=r[f],m=0;m<u-1;m++)for(var h=t[m],g=r[h],_=m+1;_<u;_++){var v=t[_],y=r[v],b=Math.min(g[v],g[f]+p[v]);g[v]=b,y[h]=b}return r}}]),e}(),YD=function(){function e(t,n,r){H(this,e),this.body=t,this.springLength=n,this.springConstant=r,this.distanceSolver=new JD}return U(e,[{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],r=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(r),this._createK_matrix(r),this._createE_matrix();for(var i=0,a=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),o=1e9,s=0,c=0,l=0,u=0,d=0;o>.01&&i<a;){i+=1;var f=up(this._getHighestEnergyNode(n),4);for(s=f[0],o=f[1],c=f[2],l=f[3],u=o,d=0;u>1&&d<5;){d+=1,this._moveNode(s,c,l);var p=up(this._getEnergy(s),3);u=p[0],c=p[1],l=p[2]}}}},{key:`_getHighestEnergyNode`,value:function(e){for(var t=this.body.nodeIndices,n=this.body.nodes,r=0,i=t[0],a=0,o=0,s=0;s<t.length;s++){var c=t[s];if(!0!==n[c].predefinedPosition||!0===n[c].isCluster&&!0===e||!0!==n[c].options.fixed.x||!0!==n[c].options.fixed.y){var l=up(this._getEnergy(c),3),u=l[0],d=l[1],f=l[2];r<u&&(r=u,i=c,a=d,o=f)}}return[i,r,a,o]}},{key:`_getEnergy`,value:function(e){var t=up(this.E_sums[e],2),n=t[0],r=t[1];return[Math.sqrt(n**2+r**2),n,r]}},{key:`_moveNode`,value:function(e,t,n){for(var r=this.body.nodeIndices,i=this.body.nodes,a=0,o=0,s=0,c=i[e].x,l=i[e].y,u=this.K_matrix[e],d=this.L_matrix[e],f=0;f<r.length;f++){var p=r[f];if(p!==e){var m=i[p].x,h=i[p].y,g=u[p],_=d[p],v=1/((c-m)**2+(l-h)**2)**1.5;a+=g*(1-_*(l-h)**2*v),o+=g*(_*(c-m)*(l-h)*v),s+=g*(1-_*(c-m)**2*v)}}var y=(t/a+n/o)/(o/a-s/o),b=-(o*y+t)/a;i[e].x+=b,i[e].y+=y,this._updateE_matrix(e)}},{key:`_createL_matrix`,value:function(e){var t=this.body.nodeIndices,n=this.springLength;this.L_matrix=[];for(var r=0;r<t.length;r++){this.L_matrix[t[r]]={};for(var i=0;i<t.length;i++)this.L_matrix[t[r]][t[i]]=n*e[t[r]][t[i]]}}},{key:`_createK_matrix`,value:function(e){var t=this.body.nodeIndices,n=this.springConstant;this.K_matrix=[];for(var r=0;r<t.length;r++){this.K_matrix[t[r]]={};for(var i=0;i<t.length;i++)this.K_matrix[t[r]][t[i]]=n*e[t[r]][t[i]]**-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 r=0;r<e.length;r++){for(var i=e[r],a=t[i].x,o=t[i].y,s=0,c=0,l=r;l<e.length;l++){var u=e[l];if(u!==i){var d=t[u].x,f=t[u].y,p=1/Math.sqrt((a-d)**2+(o-f)**2);this.E_matrix[i][l]=[this.K_matrix[i][u]*(a-d-this.L_matrix[i][u]*(a-d)*p),this.K_matrix[i][u]*(o-f-this.L_matrix[i][u]*(o-f)*p)],this.E_matrix[u][r]=this.E_matrix[i][l],s+=this.E_matrix[i][l][0],c+=this.E_matrix[i][l][1]}}this.E_sums[i]=[s,c]}}},{key:`_updateE_matrix`,value:function(e){for(var t=this.body.nodeIndices,n=this.body.nodes,r=this.E_matrix[e],i=this.K_matrix[e],a=this.L_matrix[e],o=n[e].x,s=n[e].y,c=0,l=0,u=0;u<t.length;u++){var d=t[u];if(d!==e){var f=r[u],p=f[0],m=f[1],h=n[d].x,g=n[d].y,_=1/Math.sqrt((o-h)**2+(s-g)**2),v=i[d]*(o-h-a[d]*(o-h)*_),y=i[d]*(s-g-a[d]*(s-g)*_);r[u]=[v,y],c+=v,l+=y;var b=this.E_sums[d];b[0]+=v-p,b[1]+=y-m}}this.E_sums[e]=[c,l]}}]),e}();function $(e,t,n){var r,i,a,o,s=this;if(!(this instanceof $))throw SyntaxError(`Constructor must be called with the new operator`);this.options={},this.defaultOptions={locale:`en`,locales:Fy,clickToUse:!1},jr(this.options,this.defaultOptions),this.body={container:e,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:V(r=this.on).call(r,this),off:V(i=this.off).call(i,this),emit:V(a=this.emit).call(a,this),once:V(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 Ly((function(){return s.body.emitter.emit(`_requestRedraw`)})),this.groups=new dx,this.canvas=new sT(this.body),this.selectionHandler=new wE(this.body,this.canvas),this.interactionHandler=new pT(this.body,this.canvas,this.selectionHandler),this.view=new cT(this.body,this.canvas),this.renderer=new rT(this.body,this.canvas),this.physics=new Kw(this.body),this.layoutEngine=new LD(this.body),this.clustering=new nT(this.body),this.manipulation=new BD(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new BC(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new Fw(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new YD(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(n),this.setData(t)}ai($.prototype),$.prototype.setOptions=function(e){var t=this;if(e===null&&(e=void 0),e!==void 0){if(!0===iy.validate(e,WD)&&console.error(`%cErrors have been found in the supplied options object.`,ry),Ev([`locale`,`locales`,`clickToUse`],this.options,e),e.locale!==void 0&&(e.locale=function(e,t){try{var n=up(t.split(/[-_ /]/,2),2),r=n[0],i=n[1],a=r==null?null:r.toLowerCase(),o=i==null?null:i.toUpperCase();if(a&&o){var s,c=a+`-`+o;if(Object.prototype.hasOwnProperty.call(e,c))return c;console.warn(_p(s=`Unknown variant ${o} of language `).call(s,a,`.`))}if(a){var l=a;if(Object.prototype.hasOwnProperty.call(e,l))return l;console.warn(`Unknown language ${a}`)}return console.warn(`Unknown locale ${t}, falling back to English.`),`en`}catch(e){return console.error(e),console.warn(`Unexpected error while normalizing locale ${t}, falling back to English.`),`en`}}(e.locales||this.options.locales,e.locale)),e=this.layoutEngine.setOptions(e.layout,e),this.canvas.setOptions(e),this.groups.setOptions(e.groups),this.nodesHandler.setOptions(e.nodes),this.edgesHandler.setOptions(e.edges),this.physics.setOptions(e.physics),this.manipulation.setOptions(e.manipulation,e,this.options),this.interactionHandler.setOptions(e.interaction),this.renderer.setOptions(e.interaction),this.selectionHandler.setOptions(e.interaction),e.groups!==void 0&&this.body.emitter.emit(`refreshNodes`),`configure`in e&&(this.configurator||=new ey(this,this.body.container,GD,this.canvas.pixelRatio,KD),this.configurator.setOptions(e.configure)),this.configurator&&!0===this.configurator.options.enabled){var n={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};Ov(n.nodes,this.nodesHandler.options),Ov(n.edges,this.edgesHandler.options),Ov(n.layout,this.layoutEngine.options),Ov(n.interaction,this.selectionHandler.options),Ov(n.interaction,this.renderer.options),Ov(n.interaction,this.interactionHandler.options),Ov(n.manipulation,this.manipulation.options),Ov(n.physics,this.physics.options),Ov(n.global,this.canvas.options),Ov(n.global,this.options),this.configurator.setModuleOptions(n)}e.clickToUse===void 0?this.body.emitter.emit(`activate`):!0===e.clickToUse?this.activator===void 0&&(this.activator=new $v(this.canvas.frame),this.activator.on(`change`,(function(){t.body.emitter.emit(`activate`)}))):(this.activator!==void 0&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit(`activate`)),this.canvas.setSize(),this.body.emitter.emit(`startSimulation`)}},$.prototype._updateVisibleIndices=function(){var e=this.body.nodes,t=this.body.edges;for(var n in this.body.nodeIndices=[],this.body.edgeIndices=[],e)Object.prototype.hasOwnProperty.call(e,n)&&(this.clustering._isClusteredNode(n)||!1!==e[n].options.hidden||this.body.nodeIndices.push(e[n].id));for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=t[r],a=e[i.fromId],o=e[i.toId],s=a!==void 0&&o!==void 0;!this.clustering._isClusteredEdge(r)&&!1===i.options.hidden&&s&&!1===a.options.hidden&&!1===o.options.hidden&&this.body.edgeIndices.push(i.id)}},$.prototype.bindEventListeners=function(){var e=this;this.body.emitter.on(`_dataChanged`,(function(){e.edgesHandler._updateState(),e.body.emitter.emit(`_dataUpdated`)})),this.body.emitter.on(`_dataUpdated`,(function(){e.clustering._updateState(),e._updateVisibleIndices(),e._updateValueRange(e.body.nodes),e._updateValueRange(e.body.edges),e.body.emitter.emit(`startSimulation`),e.body.emitter.emit(`_requestRedraw`)}))},$.prototype.setData=function(e){if(this.body.emitter.emit(`resetPhysics`),this.body.emitter.emit(`_resetData`),this.selectionHandler.unselectAll(),e&&e.dot&&(e.nodes||e.edges))throw SyntaxError(`Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.`);if(this.setOptions(e&&e.options),e&&e.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 t=jy(e.dot);this.setData(t)}else if(e&&e.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 n=Ny(e.gephi);this.setData(n)}else this.nodesHandler.setData(e&&e.nodes,!0),this.edgesHandler.setData(e&&e.edges,!0),this.body.emitter.emit(`_dataChanged`),this.body.emitter.emit(`_dataLoaded`),this.body.emitter.emit(`initPhysics`)},$.prototype.destroy=function(){for(var e in 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,this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&delete this.body.nodes[e];for(var t in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,t)&&delete this.body.edges[t];xv(this.body.container)},$.prototype._updateValueRange=function(e){var t,n=void 0,r=void 0,i=0;for(t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var a=e[t].getValue();a!==void 0&&(n=n===void 0?a:Math.min(a,n),r=r===void 0?a:Math.max(a,r),i+=a)}if(n!==void 0&&r!==void 0)for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&e[t].setValueRange(n,r,i)},$.prototype.isActive=function(){return!this.activator||this.activator.active},$.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)},$.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)},$.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)},$.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)},$.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)},$.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)},$.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)},$.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)},$.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)},$.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)},$.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)},$.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)},$.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)},$.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)},$.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)},$.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)},$.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)},$.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)},$.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)},$.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)},$.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)},$.prototype.editNodeMode=function(){return console.warn(`Deprecated: Please use editNode instead of editNodeMode.`),this.manipulation.editNode.apply(this.manipulation,arguments)},$.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)},$.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)},$.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)},$.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)},$.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)},$.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)},$.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)},$.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)},$.prototype.getConnectedNodes=function(e){return this.body.nodes[e]===void 0?this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments):this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments)},$.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)},$.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)},$.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)},$.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)},$.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)},$.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)},$.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)},$.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)},$.prototype.getNodeAt=function(){var e=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return e!==void 0&&e.id!==void 0?e.id:e},$.prototype.getEdgeAt=function(){var e=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return e!==void 0&&e.id!==void 0?e.id:e},$.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)},$.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)},$.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()},$.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)},$.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)},$.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)},$.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)},$.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)},$.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)},$.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)},$.prototype.getOptionsFromConfigurator=function(){var e={};return this.configurator&&(e=this.configurator.getOptions.apply(this.configurator)),e};var XD=jy;e.Network=$,e.NetworkImages=Ly,e.networkDOTParser=My,e.networkGephiParser=Py,e.networkOptions=qD,e.parseDOTNetwork=XD,e.parseGephiNetwork=Ny}))})),oe=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):r((n=typeof globalThis<`u`?globalThis:n||self).vis=n.vis||{})})(e,(function(e){function t(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var n=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var i={exports:{}},a=function(e){return e&&e.Math===Math&&e},o=a(typeof globalThis==`object`&&globalThis)||a(typeof window==`object`&&window)||a(typeof self==`object`&&self)||a(typeof n==`object`&&n)||function(){return this}()||n||Function(`return this`)(),s=function(e){try{return!!e()}catch{return!0}},c=!s((function(){var e=function(){}.bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)})),l=c,u=Function.prototype,d=u.apply,f=u.call,p=typeof Reflect==`object`&&Reflect.apply||(l?f.bind(d):function(){return f.apply(d,arguments)}),m=c,h=Function.prototype,g=h.call,_=m&&h.bind.bind(g,g),v=m?_:function(e){return function(){return g.apply(e,arguments)}},y=v,b=y({}.toString),x=y(``.slice),S=function(e){return x(b(e),8,-1)},ee=S,C=v,te=function(e){if(ee(e)===`Function`)return C(e)},w=typeof document==`object`&&document.all,ne={all:w,IS_HTMLDDA:w===void 0&&w!==void 0},T=ne.all,E=ne.IS_HTMLDDA?function(e){return typeof e==`function`||e===T}:function(e){return typeof e==`function`},D={},O=!s((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})),k=c,re=Function.prototype.call,ie=k?re.bind(re):function(){return re.apply(re,arguments)},A={},ae={}.propertyIsEnumerable,oe=Object.getOwnPropertyDescriptor;A.f=oe&&!ae.call({1:2},1)?function(e){var t=oe(this,e);return!!t&&t.enumerable}:ae;var se,ce,j=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},le=s,ue=S,de=Object,fe=v(``.split),pe=le((function(){return!de(`z`).propertyIsEnumerable(0)}))?function(e){return ue(e)===`String`?fe(e,``):de(e)}:de,me=function(e){return e==null},he=me,ge=TypeError,_e=function(e){if(he(e))throw new ge(`Can't call method on `+e);return e},ve=pe,ye=_e,be=function(e){return ve(ye(e))},xe=E,M=ne.all,N=ne.IS_HTMLDDA?function(e){return typeof e==`object`?e!==null:xe(e)||e===M}:function(e){return typeof e==`object`?e!==null:xe(e)},P={},Se=P,Ce=o,we=E,Te=function(e){return we(e)?e:void 0},F=function(e,t){return arguments.length<2?Te(Se[e])||Te(Ce[e]):Se[e]&&Se[e][t]||Ce[e]&&Ce[e][t]},I=v({}.isPrototypeOf),Ee=typeof navigator<`u`&&String(navigator.userAgent)||``,De=o,Oe=Ee,ke=De.process,Ae=De.Deno,je=ke&&ke.versions||Ae&&Ae.version,Me=je&&je.v8;Me&&(ce=(se=Me.split(`.`))[0]>0&&se[0]<4?1:+(se[0]+se[1])),!ce&&Oe&&(!(se=Oe.match(/Edge\/(\d+)/))||se[1]>=74)&&(se=Oe.match(/Chrome\/(\d+)/))&&(ce=+se[1]);var Ne=ce,Pe=Ne,Fe=s,Ie=o.String,Le=!!Object.getOwnPropertySymbols&&!Fe((function(){var e=Symbol(`symbol detection`);return!Ie(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Pe&&Pe<41})),Re=Le&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,ze=F,Be=E,Ve=I,He=Object,Ue=Re?function(e){return typeof e==`symbol`}:function(e){var t=ze(`Symbol`);return Be(t)&&Ve(t.prototype,He(e))},We=String,Ge=function(e){try{return We(e)}catch{return`Object`}},Ke=E,qe=Ge,Je=TypeError,Ye=function(e){if(Ke(e))return e;throw new Je(qe(e)+` is not a function`)},Xe=Ye,Ze=me,Qe=function(e,t){var n=e[t];return Ze(n)?void 0:Xe(n)},$e=ie,et=E,tt=N,nt=TypeError,rt={exports:{}},it=o,at=Object.defineProperty,ot=function(e,t){try{at(it,e,{value:t,configurable:!0,writable:!0})}catch{it[e]=t}return t},L=`__core-js_shared__`,st=o[L]||ot(L,{}),ct=st;(rt.exports=function(e,t){return ct[e]||(ct[e]=t===void 0?{}:t)})(`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 lt=rt.exports,ut=_e,dt=Object,ft=function(e){return dt(ut(e))},pt=ft,mt=v({}.hasOwnProperty),ht=Object.hasOwn||function(e,t){return mt(pt(e),t)},gt=v,_t=0,vt=Math.random(),yt=gt(1 .toString),bt=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+yt(++_t+vt,36)},xt=lt,St=ht,Ct=bt,wt=Le,Tt=Re,Et=o.Symbol,Dt=xt(`wks`),Ot=Tt?Et.for||Et:Et&&Et.withoutSetter||Ct,kt=function(e){return St(Dt,e)||(Dt[e]=wt&&St(Et,e)?Et[e]:Ot(`Symbol.`+e)),Dt[e]},At=ie,jt=N,Mt=Ue,Nt=Qe,Pt=function(e,t){var n,r;if(t===`string`&&et(n=e.toString)&&!tt(r=$e(n,e))||et(n=e.valueOf)&&!tt(r=$e(n,e))||t!==`string`&&et(n=e.toString)&&!tt(r=$e(n,e)))return r;throw new nt(`Can't convert object to primitive value`)},Ft=TypeError,It=kt(`toPrimitive`),Lt=function(e,t){if(!jt(e)||Mt(e))return e;var n,r=Nt(e,It);if(r){if(t===void 0&&(t=`default`),n=At(r,e,t),!jt(n)||Mt(n))return n;throw new Ft(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),Pt(e,t)},Rt=Ue,zt=function(e){var t=Lt(e,`string`);return Rt(t)?t:t+``},Bt=N,Vt=o.document,Ht=Bt(Vt)&&Bt(Vt.createElement),Ut=function(e){return Ht?Vt.createElement(e):{}},Wt=Ut,Gt=!O&&!s((function(){return Object.defineProperty(Wt(`div`),`a`,{get:function(){return 7}}).a!==7})),Kt=O,qt=ie,Jt=A,Yt=j,Xt=be,Zt=zt,Qt=ht,$t=Gt,en=Object.getOwnPropertyDescriptor;D.f=Kt?en:function(e,t){if(e=Xt(e),t=Zt(t),$t)try{return en(e,t)}catch{}if(Qt(e,t))return Yt(!qt(Jt.f,e,t),e[t])};var tn=s,nn=E,rn=/#|\.prototype\./,an=function(e,t){var n=sn[on(e)];return n===ln||n!==cn&&(nn(t)?tn(t):!!t)},on=an.normalize=function(e){return String(e).replace(rn,`.`).toLowerCase()},sn=an.data={},cn=an.NATIVE=`N`,ln=an.POLYFILL=`P`,un=an,dn=Ye,fn=c,pn=te(te.bind),mn=function(e,t){return dn(e),t===void 0?e:fn?pn(e,t):function(){return e.apply(t,arguments)}},hn={},gn=O&&s((function(){return Object.defineProperty((function(){}),`prototype`,{value:42,writable:!1}).prototype!==42})),_n=N,vn=String,yn=TypeError,bn=function(e){if(_n(e))return e;throw new yn(vn(e)+` is not an object`)},xn=O,Sn=Gt,Cn=gn,wn=bn,Tn=zt,En=TypeError,Dn=Object.defineProperty,On=Object.getOwnPropertyDescriptor,kn=`enumerable`,An=`configurable`,jn=`writable`;hn.f=xn?Cn?function(e,t,n){if(wn(e),t=Tn(t),wn(n),typeof e==`function`&&t===`prototype`&&`value`in n&&jn in n&&!n[jn]){var r=On(e,t);r&&r[jn]&&(e[t]=n.value,n={configurable:An in n?n[An]:r[An],enumerable:kn in n?n[kn]:r[kn],writable:!1})}return Dn(e,t,n)}:Dn:function(e,t,n){if(wn(e),t=Tn(t),wn(n),Sn)try{return Dn(e,t,n)}catch{}if(`get`in n||`set`in n)throw new En(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e};var Mn=hn,Nn=j,Pn=O?function(e,t,n){return Mn.f(e,t,Nn(1,n))}:function(e,t,n){return e[t]=n,e},Fn=o,In=p,Ln=te,Rn=E,zn=D.f,Bn=un,Vn=P,Hn=mn,Un=Pn,Wn=ht,R=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return In(e,this,arguments)};return t.prototype=e.prototype,t},z=function(e,t){var n,r,i,a,o,s,c,l,u,d=e.target,f=e.global,p=e.stat,m=e.proto,h=f?Fn:p?Fn[d]:(Fn[d]||{}).prototype,g=f?Vn:Vn[d]||Un(Vn,d,{})[d],_=g.prototype;for(a in t)r=!(n=Bn(f?a:d+(p?`.`:`#`)+a,e.forced))&&h&&Wn(h,a),s=g[a],r&&(c=e.dontCallGetSet?(u=zn(h,a))&&u.value:h[a]),o=r&&c?c:t[a],r&&typeof s==typeof o||(l=e.bind&&r?Hn(o,Fn):e.wrap&&r?R(o):m&&Rn(o)?Ln(o):o,(e.sham||o&&o.sham||s&&s.sham)&&Un(l,`sham`,!0),Un(g,a,l),m&&(Wn(Vn,i=d+`Prototype`)||Un(Vn,i,{}),Un(Vn[i],a,o),e.real&&_&&(n||!_[a])&&Un(_,a,o)))},Gn=z,Kn=O,qn=hn.f;Gn({target:`Object`,stat:!0,forced:Object.defineProperty!==qn,sham:!Kn},{defineProperty:qn});var Jn=P.Object,Yn=i.exports=function(e,t,n){return Jn.defineProperty(e,t,n)};Jn.defineProperty.sham&&(Yn.sham=!0);var Xn=i.exports,Zn=Xn,Qn=r(Zn),$n=S,er=Array.isArray||function(e){return $n(e)===`Array`},tr=Math.ceil,nr=Math.floor,rr=Math.trunc||function(e){var t=+e;return(t>0?nr:tr)(t)},ir=function(e){var t=+e;return t!=t||t===0?0:rr(t)},ar=ir,B=Math.min,or=function(e){return e>0?B(ar(e),9007199254740991):0},sr=function(e){return or(e.length)},cr=TypeError,lr=function(e){if(e>9007199254740991)throw cr(`Maximum allowed index exceeded`);return e},ur=zt,dr=hn,fr=j,pr=function(e,t,n){var r=ur(t);r in e?dr.f(e,r,fr(0,n)):e[r]=n},mr={};mr[kt(`toStringTag`)]=`z`;var hr=String(mr)===`[object z]`,gr=hr,_r=E,vr=S,yr=kt(`toStringTag`),br=Object,xr=vr(function(){return arguments}())===`Arguments`,Sr=gr?vr:function(e){var t,n,r;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=function(e,t){try{return e[t]}catch{}}(t=br(e),yr))==`string`?n:xr?vr(t):(r=vr(t))===`Object`&&_r(t.callee)?`Arguments`:r},Cr=E,wr=st,Tr=v(Function.toString);Cr(wr.inspectSource)||(wr.inspectSource=function(e){return Tr(e)});var Er=wr.inspectSource,Dr=v,Or=s,kr=E,Ar=Sr,jr=Er,Mr=function(){},Nr=[],Pr=F(`Reflect`,`construct`),Fr=/^\s*(?:class|function)\b/,Ir=Dr(Fr.exec),Lr=!Fr.test(Mr),Rr=function(e){if(!kr(e))return!1;try{return Pr(Mr,Nr,e),!0}catch{return!1}},zr=function(e){if(!kr(e))return!1;switch(Ar(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return Lr||!!Ir(Fr,jr(e))}catch{return!0}};zr.sham=!0;var Br=!Pr||Or((function(){var e;return Rr(Rr.call)||!Rr(Object)||!Rr((function(){e=!0}))||e}))?zr:Rr,Vr=er,Hr=Br,Ur=N,Wr=kt(`species`),Gr=Array,Kr=function(e){var t;return Vr(e)&&(t=e.constructor,(Hr(t)&&(t===Gr||Vr(t.prototype))||Ur(t)&&(t=t[Wr])===null)&&(t=void 0)),t===void 0?Gr:t},qr=function(e,t){return new(Kr(e))(t===0?0:t)},Jr=s,Yr=Ne,Xr=kt(`species`),Zr=function(e){return Yr>=51||!Jr((function(){var t=[];return(t.constructor={})[Xr]=function(){return{foo:1}},t[e](Boolean).foo!==1}))},V=z,Qr=s,$r=er,ei=N,ti=ft,ni=sr,ri=lr,ii=pr,ai=qr,oi=Zr,si=Ne,ci=kt(`isConcatSpreadable`),li=si>=51||!Qr((function(){var e=[];return e[ci]=!1,e.concat()[0]!==e})),ui=function(e){if(!ei(e))return!1;var t=e[ci];return t===void 0?$r(e):!!t};V({target:`Array`,proto:!0,arity:1,forced:!li||!oi(`concat`)},{concat:function(e){var t,n,r,i,a,o=ti(this),s=ai(o,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(ui(a=t===-1?o:arguments[t]))for(i=ni(a),ri(c+i),n=0;n<i;n++,c++)n in a&&ii(s,c,a[n]);else ri(c+1),ii(s,c++,a);return s.length=c,s}});var di=Sr,fi=String,pi=function(e){if(di(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return fi(e)},mi={},hi=ir,gi=Math.max,_i=Math.min,vi=function(e,t){var n=hi(e);return n<0?gi(n+t,0):_i(n,t)},yi=be,bi=vi,xi=sr,Si=function(e){return function(t,n,r){var i,a=yi(t),o=xi(a),s=bi(r,o);if(e&&n!=n){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},Ci={includes:Si(!0),indexOf:Si(!1)},wi={},Ti=ht,Ei=be,Di=Ci.indexOf,Oi=wi,ki=v([].push),Ai=function(e,t){var n,r=Ei(e),i=0,a=[];for(n in r)!Ti(Oi,n)&&Ti(r,n)&&ki(a,n);for(;t.length>i;)Ti(r,n=t[i++])&&(~Di(a,n)||ki(a,n));return a},ji=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],Mi=Ai,Ni=ji,Pi=Object.keys||function(e){return Mi(e,Ni)},Fi=O,Ii=gn,Li=hn,Ri=bn,zi=be,Bi=Pi;mi.f=Fi&&!Ii?Object.defineProperties:function(e,t){Ri(e);for(var n,r=zi(t),i=Bi(t),a=i.length,o=0;a>o;)Li.f(e,n=i[o++],r[n]);return e};var Vi,Hi=F(`document`,`documentElement`),Ui=bt,Wi=lt(`keys`),Gi=function(e){return Wi[e]||(Wi[e]=Ui(e))},Ki=bn,qi=mi,Ji=ji,Yi=wi,Xi=Hi,Zi=Ut,Qi=`prototype`,$i=`script`,ea=Gi(`IE_PROTO`),ta=function(){},na=function(e){return`<`+$i+`>`+e+`</`+$i+`>`},ra=function(e){e.write(na(``)),e.close();var t=e.parentWindow.Object;return e=null,t},ia=function(){try{Vi=new ActiveXObject(`htmlfile`)}catch{}var e,t,n;ia=typeof document<`u`?document.domain&&Vi?ra(Vi):(t=Zi(`iframe`),n=`java`+$i+`:`,t.style.display=`none`,Xi.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(na(`document.F=Object`)),e.close(),e.F):ra(Vi);for(var r=Ji.length;r--;)delete ia[Qi][Ji[r]];return ia()};Yi[ea]=!0;var aa=Object.create||function(e,t){var n;return e===null?n=ia():(ta[Qi]=Ki(e),n=new ta,ta[Qi]=null,n[ea]=e),t===void 0?n:qi.f(n,t)},oa={},sa=Ai,ca=ji.concat(`length`,`prototype`);oa.f=Object.getOwnPropertyNames||function(e){return sa(e,ca)};var la={},ua=vi,da=sr,fa=pr,pa=Array,ma=Math.max,ha=function(e,t,n){for(var r=da(e),i=ua(t,r),a=ua(n===void 0?r:n,r),o=pa(ma(a-i,0)),s=0;i<a;i++,s++)fa(o,s,e[i]);return o.length=s,o},ga=S,_a=be,va=oa.f,ya=ha,ba=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];la.f=function(e){return ba&&ga(e)===`Window`?function(e){try{return va(e)}catch{return ya(ba)}}(e):va(_a(e))};var xa={};xa.f=Object.getOwnPropertySymbols;var Sa=Pn,Ca=function(e,t,n,r){return r&&r.enumerable?e[t]=n:Sa(e,t,n),e},wa=hn,Ta=function(e,t,n){return wa.f(e,t,n)},Ea={};Ea.f=kt;var Da,Oa,ka,Aa=P,ja=ht,Ma=Ea,Na=hn.f,Pa=function(e){var t=Aa.Symbol||={};ja(t,e)||Na(t,e,{value:Ma.f(e)})},Fa=ie,Ia=F,La=kt,Ra=Ca,za=function(){var e=Ia(`Symbol`),t=e&&e.prototype,n=t&&t.valueOf,r=La(`toPrimitive`);t&&!t[r]&&Ra(t,r,(function(e){return Fa(n,this)}),{arity:1})},Ba=Sr,Va=hr?{}.toString:function(){return`[object `+Ba(this)+`]`},Ha=hr,Ua=hn.f,Wa=Pn,Ga=ht,Ka=Va,qa=kt(`toStringTag`),Ja=function(e,t,n,r){if(e){var i=n?e:e.prototype;Ga(i,qa)||Ua(i,qa,{configurable:!0,value:t}),r&&!Ha&&Wa(i,`toString`,Ka)}},Ya=E,Xa=o.WeakMap,Za=Ya(Xa)&&/native code/.test(String(Xa)),Qa=o,$a=N,eo=Pn,to=ht,no=st,ro=Gi,io=wi,ao=`Object already initialized`,oo=Qa.TypeError,so=Qa.WeakMap;if(Za||no.state){var co=no.state||=new so;co.get=co.get,co.has=co.has,co.set=co.set,Da=function(e,t){if(co.has(e))throw new oo(ao);return t.facade=e,co.set(e,t),t},Oa=function(e){return co.get(e)||{}},ka=function(e){return co.has(e)}}else{var lo=ro(`state`);io[lo]=!0,Da=function(e,t){if(to(e,lo))throw new oo(ao);return t.facade=e,eo(e,lo,t),t},Oa=function(e){return to(e,lo)?e[lo]:{}},ka=function(e){return to(e,lo)}}var uo={set:Da,get:Oa,has:ka,enforce:function(e){return ka(e)?Oa(e):Da(e,{})},getterFor:function(e){return function(t){var n;if(!$a(t)||(n=Oa(t)).type!==e)throw new oo(`Incompatible receiver, `+e+` required`);return n}}},fo=mn,po=pe,mo=ft,ho=sr,go=qr,_o=v([].push),vo=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(c,l,u,d){for(var f,p,m=mo(c),h=po(m),g=fo(l,u),_=ho(h),v=0,y=d||go,b=t?y(c,_):n||o?y(c,0):void 0;_>v;v++)if((s||v in h)&&(p=g(f=h[v],v,m),e))if(t)b[v]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return v;case 2:_o(b,f)}else switch(e){case 4:return!1;case 7:_o(b,f)}return a?-1:r||i?i:b}},yo={forEach:vo(0),map:vo(1),filter:vo(2),some:vo(3),every:vo(4),find:vo(5),findIndex:vo(6),filterReject:vo(7)},bo=z,xo=o,So=ie,Co=v,wo=O,To=Le,Eo=s,Do=ht,Oo=I,ko=bn,Ao=be,jo=zt,Mo=pi,No=j,Po=aa,Fo=Pi,Io=oa,Lo=la,Ro=xa,zo=D,Bo=hn,Vo=mi,Ho=A,Uo=Ca,Wo=Ta,Go=lt,Ko=wi,qo=bt,Jo=kt,Yo=Ea,Xo=Pa,Zo=za,Qo=Ja,$o=uo,es=yo.forEach,ts=Gi(`hidden`),ns=`Symbol`,rs=`prototype`,is=$o.set,as=$o.getterFor(ns),os=Object[rs],ss=xo.Symbol,cs=ss&&ss[rs],ls=xo.RangeError,us=xo.TypeError,ds=xo.QObject,fs=zo.f,ps=Bo.f,ms=Lo.f,hs=Ho.f,gs=Co([].push),_s=Go(`symbols`),vs=Go(`op-symbols`),ys=Go(`wks`),bs=!ds||!ds[rs]||!ds[rs].findChild,xs=function(e,t,n){var r=fs(os,t);r&&delete os[t],ps(e,t,n),r&&e!==os&&ps(os,t,r)},Ss=wo&&Eo((function(){return Po(ps({},`a`,{get:function(){return ps(this,`a`,{value:7}).a}})).a!==7}))?xs:ps,Cs=function(e,t){var n=_s[e]=Po(cs);return is(n,{type:ns,tag:e,description:t}),wo||(n.description=t),n},ws=function(e,t,n){e===os&&ws(vs,t,n),ko(e);var r=jo(t);return ko(n),Do(_s,r)?(n.enumerable?(Do(e,ts)&&e[ts][r]&&(e[ts][r]=!1),n=Po(n,{enumerable:No(0,!1)})):(Do(e,ts)||ps(e,ts,No(1,{})),e[ts][r]=!0),Ss(e,r,n)):ps(e,r,n)},Ts=function(e,t){ko(e);var n=Ao(t);return es(Fo(n).concat(ks(n)),(function(t){wo&&!So(Es,n,t)||ws(e,t,n[t])})),e},Es=function(e){var t=jo(e),n=So(hs,this,t);return!(this===os&&Do(_s,t)&&!Do(vs,t))&&(!(n||!Do(this,t)||!Do(_s,t)||Do(this,ts)&&this[ts][t])||n)},Ds=function(e,t){var n=Ao(e),r=jo(t);if(n!==os||!Do(_s,r)||Do(vs,r)){var i=fs(n,r);return!i||!Do(_s,r)||Do(n,ts)&&n[ts][r]||(i.enumerable=!0),i}},Os=function(e){var t=ms(Ao(e)),n=[];return es(t,(function(e){Do(_s,e)||Do(Ko,e)||gs(n,e)})),n},ks=function(e){var t=e===os,n=ms(t?vs:Ao(e)),r=[];return es(n,(function(e){!Do(_s,e)||t&&!Do(os,e)||gs(r,_s[e])})),r};To||(ss=function(){if(Oo(cs,this))throw new us(`Symbol is not a constructor`);var e=arguments.length&&arguments[0]!==void 0?Mo(arguments[0]):void 0,t=qo(e),n=function(e){var r=this===void 0?xo:this;r===os&&So(n,vs,e),Do(r,ts)&&Do(r[ts],t)&&(r[ts][t]=!1);var i=No(1,e);try{Ss(r,t,i)}catch(e){if(!(e instanceof ls))throw e;xs(r,t,i)}};return wo&&bs&&Ss(os,t,{configurable:!0,set:n}),Cs(t,e)},Uo(cs=ss[rs],`toString`,(function(){return as(this).tag})),Uo(ss,`withoutSetter`,(function(e){return Cs(qo(e),e)})),Ho.f=Es,Bo.f=ws,Vo.f=Ts,zo.f=Ds,Io.f=Lo.f=Os,Ro.f=ks,Yo.f=function(e){return Cs(Jo(e),e)},wo&&Wo(cs,`description`,{configurable:!0,get:function(){return as(this).description}})),bo({global:!0,constructor:!0,wrap:!0,forced:!To,sham:!To},{Symbol:ss}),es(Fo(ys),(function(e){Xo(e)})),bo({target:ns,stat:!0,forced:!To},{useSetter:function(){bs=!0},useSimple:function(){bs=!1}}),bo({target:`Object`,stat:!0,forced:!To,sham:!wo},{create:function(e,t){return t===void 0?Po(e):Ts(Po(e),t)},defineProperty:ws,defineProperties:Ts,getOwnPropertyDescriptor:Ds}),bo({target:`Object`,stat:!0,forced:!To},{getOwnPropertyNames:Os}),Zo(),Qo(ss,ns),Ko[ts]=!0;var As=Le&&!!Symbol.for&&!!Symbol.keyFor,js=z,Ms=F,Ns=ht,Ps=pi,Fs=lt,Is=As,Ls=Fs(`string-to-symbol-registry`),Rs=Fs(`symbol-to-string-registry`);js({target:`Symbol`,stat:!0,forced:!Is},{for:function(e){var t=Ps(e);if(Ns(Ls,t))return Ls[t];var n=Ms(`Symbol`)(t);return Ls[t]=n,Rs[n]=t,n}});var zs=z,Bs=ht,Vs=Ue,Hs=Ge,Us=As,Ws=lt(`symbol-to-string-registry`);zs({target:`Symbol`,stat:!0,forced:!Us},{keyFor:function(e){if(!Vs(e))throw TypeError(Hs(e)+` is not a symbol`);if(Bs(Ws,e))return Ws[e]}});var Gs=v([].slice),Ks=er,qs=E,Js=S,Ys=pi,Xs=v([].push),Zs=z,Qs=F,$s=p,ec=ie,tc=v,nc=s,rc=E,ic=Ue,ac=Gs,oc=function(e){if(qs(e))return e;if(Ks(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i==`string`?Xs(n,i):typeof i!=`number`&&Js(i)!==`Number`&&Js(i)!==`String`||Xs(n,Ys(i))}var a=n.length,o=!0;return function(e,t){if(o)return o=!1,t;if(Ks(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},sc=Le,cc=String,lc=Qs(`JSON`,`stringify`),uc=tc(/./.exec),dc=tc(``.charAt),fc=tc(``.charCodeAt),pc=tc(``.replace),mc=tc(1 .toString),hc=/[\uD800-\uDFFF]/g,gc=/^[\uD800-\uDBFF]$/,_c=/^[\uDC00-\uDFFF]$/,vc=!sc||nc((function(){var e=Qs(`Symbol`)(`stringify detection`);return lc([e])!==`[null]`||lc({a:e})!==`{}`||lc(Object(e))!==`{}`})),yc=nc((function(){return lc(`\udf06\ud834`)!==`"\\udf06\\ud834"`||lc(`\udead`)!==`"\\udead"`})),bc=function(e,t){var n=ac(arguments),r=oc(t);if(rc(r)||e!==void 0&&!ic(e))return n[1]=function(e,t){if(rc(r)&&(t=ec(r,this,cc(e),t)),!ic(t))return t},$s(lc,null,n)},H=function(e,t,n){var r=dc(n,t-1),i=dc(n,t+1);return uc(gc,e)&&!uc(_c,i)||uc(_c,e)&&!uc(gc,r)?`\\u`+mc(fc(e,0),16):e};lc&&Zs({target:`JSON`,stat:!0,arity:3,forced:vc||yc},{stringify:function(e,t,n){var r=ac(arguments),i=$s(vc?bc:lc,null,r);return yc&&typeof i==`string`?pc(i,hc,H):i}});var xc=xa,Sc=ft;z({target:`Object`,stat:!0,forced:!Le||s((function(){xc.f(1)}))},{getOwnPropertySymbols:function(e){var t=xc.f;return t?t(Sc(e)):[]}}),Pa(`asyncIterator`),Pa(`hasInstance`),Pa(`isConcatSpreadable`),Pa(`iterator`),Pa(`match`),Pa(`matchAll`),Pa(`replace`),Pa(`search`),Pa(`species`),Pa(`split`);var Cc=za;Pa(`toPrimitive`),Cc();var wc=F,Tc=Ja;Pa(`toStringTag`),Tc(wc(`Symbol`),`Symbol`),Pa(`unscopables`),Ja(o.JSON,`JSON`,!0);var Ec,Dc,Oc,kc=P.Symbol,Ac={},jc=O,Mc=ht,Nc=Function.prototype,Pc=jc&&Object.getOwnPropertyDescriptor,Fc=Mc(Nc,`name`),Ic={EXISTS:Fc,PROPER:Fc&&function(){}.name===`something`,CONFIGURABLE:Fc&&(!jc||jc&&Pc(Nc,`name`).configurable)},Lc=!s((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Rc=ht,zc=E,Bc=ft,Vc=Lc,Hc=Gi(`IE_PROTO`),Uc=Object,Wc=Uc.prototype,Gc=Vc?Uc.getPrototypeOf:function(e){var t=Bc(e);if(Rc(t,Hc))return t[Hc];var n=t.constructor;return zc(n)&&t instanceof n?n.prototype:t instanceof Uc?Wc:null},Kc=s,qc=E,Jc=N,Yc=aa,Xc=Gc,Zc=Ca,Qc=kt(`iterator`),$c=!1;[].keys&&(`next`in(Oc=[].keys())?(Dc=Xc(Xc(Oc)))!==Object.prototype&&(Ec=Dc):$c=!0),qc((Ec=!Jc(Ec)||Kc((function(){var e={};return Ec[Qc].call(e)!==e}))?{}:Yc(Ec))[Qc])||Zc(Ec,Qc,(function(){return this}));var el={IteratorPrototype:Ec,BUGGY_SAFARI_ITERATORS:$c},tl=el.IteratorPrototype,nl=aa,rl=j,il=Ja,al=Ac,ol=function(){return this},sl=v,cl=Ye,ll=E,ul=String,dl=TypeError,fl=function(e,t,n){try{return sl(cl(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},pl=bn,ml=function(e){if(typeof e==`object`||ll(e))return e;throw new dl(`Can't set `+ul(e)+` as a prototype`)},hl=Object.setPrototypeOf||(`__proto__`in{}?function(){var e,t=!1,n={};try{(e=fl(Object.prototype,`__proto__`,`set`))(n,[]),t=n instanceof Array}catch{}return function(n,r){return pl(n),ml(r),t?e(n,r):n.__proto__=r,n}}():void 0),gl=z,_l=ie,vl=Ic,yl=function(e,t,n,r){var i=t+` Iterator`;return e.prototype=nl(tl,{next:rl(+!r,n)}),il(e,i,!1,!0),al[i]=ol,e},bl=Gc,xl=Ja,Sl=Ca,Cl=Ac,wl=el,Tl=vl.PROPER,El=wl.BUGGY_SAFARI_ITERATORS,Dl=kt(`iterator`),Ol=`keys`,kl=`values`,Al=`entries`,jl=function(){return this},Ml=function(e,t,n,r,i,a,o){yl(n,t,r);var s,c,l,u=function(e){if(e===i&&h)return h;if(!El&&e&&e in p)return p[e];switch(e){case Ol:case kl:case Al:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+` Iterator`,f=!1,p=e.prototype,m=p[Dl]||p[`@@iterator`]||i&&p[i],h=!El&&m||u(i),g=t===`Array`&&p.entries||m;if(g&&(s=bl(g.call(new e)))!==Object.prototype&&s.next&&(xl(s,d,!0,!0),Cl[d]=jl),Tl&&i===kl&&m&&m.name!==kl&&(f=!0,h=function(){return _l(m,this)}),i)if(c={values:u(kl),keys:a?h:u(Ol),entries:u(Al)},o)for(l in c)(El||f||!(l in p))&&Sl(p,l,c[l]);else gl({target:t,proto:!0,forced:El||f},c);return o&&p[Dl]!==h&&Sl(p,Dl,h,{name:i}),Cl[t]=h,c},Nl=function(e,t){return{value:e,done:t}},Pl=be,Fl=Ac,Il=uo;hn.f;var Ll=Ml,Rl=Nl,zl=`Array Iterator`,Bl=Il.set,Vl=Il.getterFor(zl);Ll(Array,`Array`,(function(e,t){Bl(this,{type:zl,target:Pl(e),index:0,kind:t})}),(function(){var e=Vl(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,Rl(void 0,!0);switch(e.kind){case`keys`:return Rl(n,!1);case`values`:return Rl(t[n],!1)}return Rl([n,t[n]],!1)}),`values`),Fl.Arguments=Fl.Array;var Hl={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},Ul=o,Wl=Sr,Gl=Pn,Kl=Ac,ql=kt(`toStringTag`);for(var Jl in Hl){var Yl=Ul[Jl],Xl=Yl&&Yl.prototype;Xl&&Wl(Xl)!==ql&&Gl(Xl,ql,Jl),Kl[Jl]=Kl.Array}var Zl=kc,Ql=kt,$l=hn.f,eu=Ql(`metadata`),tu=Function.prototype;tu[eu]===void 0&&$l(tu,eu,{value:null}),Pa(`asyncDispose`),Pa(`dispose`),Pa(`metadata`);var nu=Zl,ru=v,iu=F(`Symbol`),au=iu.keyFor,ou=ru(iu.prototype.valueOf),su=iu.isRegisteredSymbol||function(e){try{return au(ou(e))!==void 0}catch{return!1}};z({target:`Symbol`,stat:!0},{isRegisteredSymbol:su});for(var cu=lt,lu=F,uu=v,du=Ue,fu=kt,pu=lu(`Symbol`),mu=pu.isWellKnownSymbol,hu=lu(`Object`,`getOwnPropertyNames`),gu=uu(pu.prototype.valueOf),_u=cu(`wks`),vu=0,yu=hu(pu),bu=yu.length;vu<bu;vu++)try{var xu=yu[vu];du(pu[xu])&&fu(xu)}catch{}var Su=function(e){if(mu&&mu(e))return!0;try{for(var t=gu(e),n=0,r=hu(_u),i=r.length;n<i;n++)if(_u[r[n]]==t)return!0}catch{}return!1};z({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:Su}),Pa(`matcher`),Pa(`observable`),z({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:su}),z({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:Su}),Pa(`metadataKey`),Pa(`patternMatch`),Pa(`replaceAll`);var Cu=nu,wu=r(Cu),Tu=v,Eu=ir,Du=pi,Ou=_e,ku=Tu(``.charAt),Au=Tu(``.charCodeAt),ju=Tu(``.slice),Mu=function(e){return function(t,n){var r,i,a=Du(Ou(t)),o=Eu(n),s=a.length;return o<0||o>=s?e?``:void 0:(r=Au(a,o))<55296||r>56319||o+1===s||(i=Au(a,o+1))<56320||i>57343?e?ku(a,o):r:e?ju(a,o,o+2):i-56320+(r-55296<<10)+65536}},Nu={codeAt:Mu(!1),charAt:Mu(!0)}.charAt,Pu=pi,Fu=uo,Iu=Ml,Lu=Nl,Ru=`String Iterator`,zu=Fu.set,Bu=Fu.getterFor(Ru);Iu(String,`String`,(function(e){zu(this,{type:Ru,string:Pu(e),index:0})}),(function(){var e,t=Bu(this),n=t.string,r=t.index;return r>=n.length?Lu(void 0,!0):(e=Nu(n,r),t.index+=e.length,Lu(e,!1))}));var Vu=Ea.f(`iterator`),Hu=Vu,Uu=r(Hu);function Wu(e){return Wu=typeof wu==`function`&&typeof Uu==`symbol`?function(e){return typeof e}:function(e){return e&&typeof wu==`function`&&e.constructor===wu&&e!==wu.prototype?`symbol`:typeof e},Wu(e)}var Gu=r(Ea.f(`toPrimitive`));function Ku(e){var t=function(e,t){if(Wu(e)!==`object`||e===null)return e;var n=e[Gu];if(n!==void 0){var r=n.call(e,t||`default`);if(Wu(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return Wu(t)===`symbol`?t:String(t)}function qu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Qn(e,Ku(r.key),r)}}function Ju(e,t,n){return t&&qu(e.prototype,t),n&&qu(e,n),Qn(e,`prototype`,{writable:!1}),e}function Yu(e,t,n){return(t=Ku(t))in e?Qn(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xu=v,Zu=Ye,Qu=N,$u=ht,ed=Gs,td=c,nd=Function,rd=Xu([].concat),id=Xu([].join),ad={},od=td?nd.bind:function(e){var t=Zu(this),n=t.prototype,r=ed(arguments,1),i=function(){var n=rd(r,ed(arguments));return this instanceof i?function(e,t,n){if(!$u(ad,t)){for(var r=[],i=0;i<t;i++)r[i]=`a[`+i+`]`;ad[t]=nd(`C,a`,`return new C(`+id(r,`,`)+`)`)}return ad[t](e,n)}(t,n.length,n):t.apply(e,n)};return Qu(n)&&(i.prototype=n),i},sd=od;z({target:`Function`,proto:!0,forced:Function.bind!==sd},{bind:sd});var cd=o,ld=P,ud=function(e,t){var n=ld[e+`Prototype`],r=n&&n[t];if(r)return r;var i=cd[e],a=i&&i.prototype;return a&&a[t]},dd=ud(`Function`,`bind`),fd=I,pd=dd,md=Function.prototype,hd=function(e){var t=e.bind;return e===md||fd(md,e)&&t===md.bind?pd:t},gd=r(hd),_d=Ye,vd=ft,yd=pe,bd=sr,xd=TypeError,Sd=function(e){return function(t,n,r,i){_d(n);var a=vd(t),o=yd(a),s=bd(a),c=e?s-1:0,l=e?-1:1;if(r<2)for(;;){if(c in o){i=o[c],c+=l;break}if(c+=l,e?c<0:s<=c)throw new xd(`Reduce of empty array with no initial value`)}for(;e?c>=0:s>c;c+=l)c in o&&(i=n(i,o[c],c,a));return i}},Cd={left:Sd(!1),right:Sd(!0)},wd=s,Td=function(e,t){var n=[][e];return!!n&&wd((function(){n.call(null,t||function(){return 1},1)}))},Ed=S(o.process)===`process`,Dd=Cd.left;z({target:`Array`,proto:!0,forced:!Ed&&Ne>79&&Ne<83||!Td(`reduce`)},{reduce:function(e){var t=arguments.length;return Dd(this,e,t,t>1?arguments[1]:void 0)}});var Od=ud(`Array`,`reduce`),kd=I,Ad=Od,jd=Array.prototype,Md=r((function(e){var t=e.reduce;return e===jd||kd(jd,e)&&t===jd.reduce?Ad:t})),Nd=yo.filter;z({target:`Array`,proto:!0,forced:!Zr(`filter`)},{filter:function(e){return Nd(this,e,arguments.length>1?arguments[1]:void 0)}});var Pd=ud(`Array`,`filter`),Fd=I,Id=Pd,Ld=Array.prototype,Rd=r((function(e){var t=e.filter;return e===Ld||Fd(Ld,e)&&t===Ld.filter?Id:t})),zd=yo.map;z({target:`Array`,proto:!0,forced:!Zr(`map`)},{map:function(e){return zd(this,e,arguments.length>1?arguments[1]:void 0)}});var Bd=ud(`Array`,`map`),Vd=I,Hd=Bd,Ud=Array.prototype,Wd=r((function(e){var t=e.map;return e===Ud||Vd(Ud,e)&&t===Ud.map?Hd:t})),Gd=er,Kd=sr,qd=lr,Jd=mn,Yd=function(e,t,n,r,i,a,o,s){for(var c,l,u=i,d=0,f=!!o&&Jd(o,s);d<r;)d in n&&(c=f?f(n[d],d,t):n[d],a>0&&Gd(c)?(l=Kd(c),u=Yd(e,t,c,l,u,a-1)-1):(qd(u+1),e[u]=c),u++),d++;return u},Xd=Yd,Zd=Ye,Qd=ft,$d=sr,ef=qr;z({target:`Array`,proto:!0},{flatMap:function(e){var t,n=Qd(this),r=$d(n);return Zd(e),(t=ef(n,0)).length=Xd(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}});var tf=ud(`Array`,`flatMap`),nf=I,rf=tf,af=Array.prototype,of=r((function(e){var t=e.flatMap;return e===af||nf(af,e)&&t===af.flatMap?rf:t})),sf=function(){function e(n,r,i){var a,o,s;t(this,e),Yu(this,`_listeners`,{add:gd(a=this._add).call(a,this),remove:gd(o=this._remove).call(o,this),update:gd(s=this._update).call(s,this)}),this._source=n,this._transformers=r,this._target=i}return Ju(e,[{key:`all`,value:function(){return this._target.update(this._transformItems(this._source.get())),this}},{key:`start`,value:function(){return this._source.on(`add`,this._listeners.add),this._source.on(`remove`,this._listeners.remove),this._source.on(`update`,this._listeners.update),this}},{key:`stop`,value:function(){return this._source.off(`add`,this._listeners.add),this._source.off(`remove`,this._listeners.remove),this._source.off(`update`,this._listeners.update),this}},{key:`_transformItems`,value:function(e){var t;return Md(t=this._transformers).call(t,(function(e,t){return t(e)}),e)}},{key:`_add`,value:function(e,t){t!=null&&this._target.add(this._transformItems(this._source.get(t.items)))}},{key:`_update`,value:function(e,t){t!=null&&this._target.update(this._transformItems(this._source.get(t.items)))}},{key:`_remove`,value:function(e,t){t!=null&&this._target.remove(this._transformItems(t.oldData))}}]),e}(),cf=function(){function e(n){t(this,e),Yu(this,`_transformers`,[]),this._source=n}return Ju(e,[{key:`filter`,value:function(e){return this._transformers.push((function(t){return Rd(t).call(t,e)})),this}},{key:`map`,value:function(e){return this._transformers.push((function(t){return Wd(t).call(t,e)})),this}},{key:`flatMap`,value:function(e){return this._transformers.push((function(t){return of(t).call(t,e)})),this}},{key:`to`,value:function(e){return new sf(this._source,this._transformers,e)}}]),e}(),lf=ie,uf=bn,df=Qe,ff=function(e,t,n){var r,i;uf(e);try{if(!(r=df(e,`return`))){if(t===`throw`)throw n;return n}r=lf(r,e)}catch(e){i=!0,r=e}if(t===`throw`)throw n;if(i)throw r;return uf(r),n},pf=bn,mf=ff,hf=Ac,gf=kt(`iterator`),_f=Array.prototype,vf=function(e){return e!==void 0&&(hf.Array===e||_f[gf]===e)},yf=Sr,bf=Qe,xf=me,Sf=Ac,Cf=kt(`iterator`),wf=function(e){if(!xf(e))return bf(e,Cf)||bf(e,`@@iterator`)||Sf[yf(e)]},U=ie,Tf=Ye,Ef=bn,Df=Ge,Of=wf,kf=TypeError,Af=function(e,t){var n=arguments.length<2?Of(e):t;if(Tf(n))return Ef(U(n,e));throw new kf(Df(e)+` is not iterable`)},jf=mn,Mf=ie,Nf=ft,Pf=function(e,t,n,r){try{return r?t(pf(n)[0],n[1]):t(n)}catch(t){mf(e,`throw`,t)}},Ff=vf,If=Br,Lf=sr,Rf=pr,zf=Af,Bf=wf,Vf=Array,Hf=kt(`iterator`),Uf=!1;try{var Wf=0,Gf={next:function(){return{done:!!Wf++}},return:function(){Uf=!0}};Gf[Hf]=function(){return this},Array.from(Gf,(function(){throw 2}))}catch{}var Kf=function(e,t){try{if(!t&&!Uf)return!1}catch{return!1}var n=!1;try{var r={};r[Hf]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n};z({target:`Array`,stat:!0,forced:!Kf((function(e){Array.from(e)}))},{from:function(e){var t=Nf(e),n=If(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=i!==void 0;a&&(i=jf(i,r>2?arguments[2]:void 0));var o,s,c,l,u,d,f=Bf(t),p=0;if(!f||this===Vf&&Ff(f))for(o=Lf(t),s=n?new this(o):Vf(o);o>p;p++)d=a?i(t[p],p):t[p],Rf(s,p,d);else for(u=(l=zf(t,f)).next,s=n?new this:[];!(c=Mf(u,l)).done;p++)d=a?Pf(l,i,[c.value,p],!0):c.value,Rf(s,p,d);return s.length=p,s}});var qf=P.Array.from,Jf=r(qf),Yf=wf,Xf=r(Yf),Zf=r(Yf);z({target:`Array`,stat:!0},{isArray:er});var Qf=P.Array.isArray,$f=r(Qf),ep=O,tp=er,np=TypeError,rp=Object.getOwnPropertyDescriptor,ip=ep&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],`length`,{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(tp(e)&&!rp(e,`length`).writable)throw new np(`Cannot set read only .length`);return e.length=t}:function(e,t){return e.length=t},ap=ft,op=sr,sp=ip,cp=lr;z({target:`Array`,proto:!0,arity:1,forced:s((function(){return[].push.call({length:4294967296},1)!==4294967297}))||!function(){try{Object.defineProperty([],`length`,{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=ap(this),n=op(t),r=arguments.length;cp(n+r);for(var i=0;i<r;i++)t[n]=arguments[i],n++;return sp(t,n),n}});var lp=ud(`Array`,`push`),up=I,dp=lp,fp=Array.prototype,pp=function(e){var t=e.push;return e===fp||up(fp,e)&&t===fp.push?dp:t},mp=r(pp),hp=z,gp=er,_p=Br,vp=N,yp=vi,bp=sr,xp=be,Sp=pr,Cp=kt,wp=Gs,Tp=Zr(`slice`),Ep=Cp(`species`),Dp=Array,Op=Math.max;hp({target:`Array`,proto:!0,forced:!Tp},{slice:function(e,t){var n,r,i,a=xp(this),o=bp(a),s=yp(e,o),c=yp(t===void 0?o:t,o);if(gp(a)&&(n=a.constructor,(_p(n)&&(n===Dp||gp(n.prototype))||vp(n)&&(n=n[Ep])===null)&&(n=void 0),n===Dp||n===void 0))return wp(a,s,c);for(r=new(n===void 0?Dp:n)(Op(c-s,0)),i=0;s<c;s++,i++)s in a&&Sp(r,i,a[s]);return r.length=i,r}});var kp=ud(`Array`,`slice`),Ap=I,jp=kp,Mp=Array.prototype,Np=function(e){var t=e.slice;return e===Mp||Ap(Mp,e)&&t===Mp.slice?jp:t},Pp=Np,Fp=r(Pp),Ip=r(qf);function Lp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Rp(e,t){var n;if(e){if(typeof e==`string`)return Lp(e,t);var r=Fp(n=Object.prototype.toString.call(e)).call(n,8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Ip(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Lp(e,t):void 0}}function zp(e,t){return function(e){if($f(e))return e}(e)||function(e,t){var n=e==null?null:wu!==void 0&&Xf(e)||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(mp(s).call(s,r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||Rp(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
42
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Bp(e){return function(e){if($f(e))return Lp(e)}(e)||function(e){if(wu!==void 0&&Xf(e)!=null||e[`@@iterator`]!=null)return Ip(e)}(e)||Rp(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
43
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}var Vp=r(Zl),Hp=ud(`Array`,`concat`),Up=I,Wp=Hp,Gp=Array.prototype,Kp=r((function(e){var t=e.concat;return e===Gp||Up(Gp,e)&&t===Gp.concat?Wp:t})),qp=r(Np),Jp=F,Yp=oa,Xp=xa,Zp=bn,Qp=v([].concat),$p=Jp(`Reflect`,`ownKeys`)||function(e){var t=Yp.f(Zp(e)),n=Xp.f;return n?Qp(t,n(e)):t};z({target:`Reflect`,stat:!0},{ownKeys:$p});var em=r(P.Reflect.ownKeys),tm=r(Qf),nm=ft,rm=Pi;z({target:`Object`,stat:!0,forced:s((function(){rm(1)}))},{keys:function(e){return rm(nm(e))}});var im=r(P.Object.keys),am=yo.forEach,om=Td(`forEach`)?[].forEach:function(e){return am(this,e,arguments.length>1?arguments[1]:void 0)};z({target:`Array`,proto:!0,forced:[].forEach!==om},{forEach:om});var sm=ud(`Array`,`forEach`),cm=Sr,lm=ht,um=I,dm=sm,fm=Array.prototype,pm={DOMTokenList:!0,NodeList:!0},mm=function(e){var t=e.forEach;return e===fm||um(fm,e)&&t===fm.forEach||lm(pm,cm(e))?dm:t},hm=r(mm),gm=z,_m=er,vm=v([].reverse),ym=[1,2];gm({target:`Array`,proto:!0,forced:String(ym)===String(ym.reverse())},{reverse:function(){return _m(this)&&(this.length=this.length),vm(this)}});var bm=ud(`Array`,`reverse`),xm=I,Sm=bm,Cm=Array.prototype,wm=function(e){var t=e.reverse;return e===Cm||xm(Cm,e)&&t===Cm.reverse?Sm:t},Tm=r(wm),Em=Ge,Dm=TypeError,Om=function(e,t){if(!delete e[t])throw new Dm(`Cannot delete property `+Em(t)+` of `+Em(e))},km=z,Am=ft,jm=vi,Mm=ir,Nm=sr,Pm=ip,Fm=lr,Im=qr,Lm=pr,Rm=Om,zm=Zr(`splice`),Bm=Math.max,Vm=Math.min;km({target:`Array`,proto:!0,forced:!zm},{splice:function(e,t){var n,r,i,a,o,s,c=Am(this),l=Nm(c),u=jm(e,l),d=arguments.length;for(d===0?n=r=0:d===1?(n=0,r=l-u):(n=d-2,r=Vm(Bm(Mm(t),0),l-u)),Fm(l+n-r),i=Im(c,r),a=0;a<r;a++)(o=u+a)in c&&Lm(i,a,c[o]);if(i.length=r,n<r){for(a=u;a<l-r;a++)s=a+n,(o=a+r)in c?c[s]=c[o]:Rm(c,s);for(a=l;a>l-r+n;a--)Rm(c,a-1)}else if(n>r)for(a=l-r;a>u;a--)s=a+n-1,(o=a+r-1)in c?c[s]=c[o]:Rm(c,s);for(a=0;a<n;a++)c[a+u]=arguments[a+2];return Pm(c,l-r+n),i}});var Hm=ud(`Array`,`splice`),Um=I,Wm=Hm,Gm=Array.prototype,Km=r((function(e){var t=e.splice;return e===Gm||Um(Gm,e)&&t===Gm.splice?Wm:t})),qm=O,Jm=v,Ym=ie,Xm=s,Zm=Pi,Qm=xa,$m=A,eh=ft,th=pe,nh=Object.assign,rh=Object.defineProperty,ih=Jm([].concat),ah=!nh||Xm((function(){if(qm&&nh({b:1},nh(rh({},`a`,{enumerable:!0,get:function(){rh(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol(`assign detection`),r=`abcdefghijklmnopqrst`;return e[n]=7,r.split(``).forEach((function(e){t[e]=e})),nh({},e)[n]!==7||Zm(nh({},t)).join(``)!==r}))?function(e,t){for(var n=eh(e),r=arguments.length,i=1,a=Qm.f,o=$m.f;r>i;)for(var s,c=th(arguments[i++]),l=a?ih(Zm(c),a(c)):Zm(c),u=l.length,d=0;u>d;)s=l[d++],qm&&!Ym(o,c,s)||(n[s]=c[s]);return n}:nh;z({target:`Object`,stat:!0,arity:2,forced:Object.assign!==ah},{assign:ah});var oh=r(P.Object.assign),sh=ft,ch=Gc,lh=Lc;z({target:`Object`,stat:!0,forced:s((function(){ch(1)})),sham:!lh},{getPrototypeOf:function(e){return ch(sh(e))}});var uh=P.Object.getPrototypeOf;z({target:`Object`,stat:!0,sham:!O},{create:aa});var dh=P.Object,fh=function(e,t){return dh.create(e,t)},ph=r(fh),mh=P,hh=p;mh.JSON||={stringify:JSON.stringify};var gh=r(function(e,t,n){return hh(mh.JSON.stringify,null,arguments)}),_h=typeof Bun==`function`&&Bun&&typeof Bun.version==`string`,vh=TypeError,yh=function(e,t){if(e<t)throw new vh(`Not enough arguments`);return e},bh=o,xh=p,Sh=E,Ch=_h,wh=Ee,Th=Gs,Eh=yh,Dh=bh.Function,Oh=/MSIE .\./.test(wh)||Ch&&function(){var e=bh.Bun.version.split(`.`);return e.length<3||e[0]===`0`&&(e[1]<3||e[1]===`3`&&e[2]===`0`)}(),kh=function(e,t){var n=t?2:1;return Oh?function(r,i){var a=Eh(arguments.length,1)>n,o=Sh(r)?r:Dh(r),s=a?Th(arguments,n):[],c=a?function(){xh(o,this,s)}:o;return t?e(c,i):e(c)}:e},Ah=z,jh=o,Mh=kh(jh.setInterval,!0);Ah({global:!0,bind:!0,forced:jh.setInterval!==Mh},{setInterval:Mh});var Nh=z,Ph=o,Fh=kh(Ph.setTimeout,!0);Nh({global:!0,bind:!0,forced:Ph.setTimeout!==Fh},{setTimeout:Fh});var Ih=r(P.setTimeout),Lh={exports:{}};(function(e){function t(e){if(e)return function(e){return Object.assign(e,t.prototype),e._callbacks=new Map,e}(e);this._callbacks=new Map}t.prototype.on=function(e,t){let n=this._callbacks.get(e)??[];return n.push(t),this._callbacks.set(e,n),this},t.prototype.once=function(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return n.fn=t,this.on(e,n),this},t.prototype.off=function(e,t){if(e===void 0&&t===void 0)return this._callbacks.clear(),this;if(t===void 0)return this._callbacks.delete(e),this;let n=this._callbacks.get(e);if(n){for(let[e,r]of n.entries())if(r===t||r.fn===t){n.splice(e,1);break}n.length===0?this._callbacks.delete(e):this._callbacks.set(e,n)}return this},t.prototype.emit=function(e,...t){let n=this._callbacks.get(e);if(n){let e=[...n];for(let n of e)n.apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks.get(e)??[]},t.prototype.listenerCount=function(e){if(e)return this.listeners(e).length;let t=0;for(let e of this._callbacks.values())t+=e.length;return t},t.prototype.hasListeners=function(e){return this.listenerCount(e)>0},t.prototype.addEventListener=t.prototype.on,t.prototype.removeListener=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,e.exports=t})(Lh);var Rh,zh=r(Lh.exports);function Bh(){return Bh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bh.apply(this,arguments)}function Vh(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Hh(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}Rh=typeof Object.assign==`function`?Object.assign:function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t};var Uh,Wh=Rh,Gh=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],Kh=typeof document>`u`?{style:{}}:document.createElement(`div`),qh=Math.round,Jh=Math.abs,Yh=Date.now;function Xh(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<Gh.length;){if((r=(n=Gh[a])?n+i:t)in e)return r;a++}}Uh=typeof window>`u`?{}:window;var Zh=Xh(Kh.style,`touchAction`),Qh=Zh!==void 0,$h=`compute`,eg=`auto`,tg=`manipulation`,ng=`none`,rg=`pan-x`,ig=`pan-y`,ag=function(){if(!Qh)return!1;var e={},t=Uh.CSS&&Uh.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach((function(n){return e[n]=!t||Uh.CSS.supports(`touch-action`,n)})),e}(),og=`ontouchstart`in Uh,sg=Xh(Uh,`PointerEvent`)!==void 0,cg=og&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),lg=`touch`,ug=`mouse`,dg=25,fg=1,pg=4,mg=8,hg=1,gg=2,_g=4,vg=8,yg=16,bg=gg|_g,xg=vg|yg,Sg=bg|xg,Cg=[`x`,`y`],wg=[`clientX`,`clientY`];function Tg(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==void 0)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function Eg(e,t){return typeof e==`function`?e.apply(t&&t[0]||void 0,t):e}function Dg(e,t){return e.indexOf(t)>-1}var Og=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===$h&&(e=this.compute()),Qh&&this.manager.element.style&&ag[e]&&(this.manager.element.style[Zh]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return Tg(this.manager.recognizers,(function(t){Eg(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(Dg(e,ng))return ng;var t=Dg(e,rg),n=Dg(e,ig);return t&&n?ng:t||n?t?rg:ig:Dg(e,tg)?tg:eg}(e.join(` `))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,i=Dg(r,ng)&&!ag[ng],a=Dg(r,ig)&&!ag[ig],o=Dg(r,rg)&&!ag[rg];if(i){var s=e.pointers.length===1,c=e.distance<2,l=e.deltaTime<250;if(s&&c&&l)return}if(!o||!a)return i||a&&n&bg||o&&n&xg?this.preventSrc(t):void 0}},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function kg(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function Ag(e){var t=e.length;if(t===1)return{x:qh(e[0].clientX),y:qh(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:qh(n/t),y:qh(r/t)}}function jg(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:qh(e.pointers[n].clientX),clientY:qh(e.pointers[n].clientY)},n++;return{timeStamp:Yh(),pointers:t,center:Ag(t),deltaX:e.deltaX,deltaY:e.deltaY}}function Mg(e,t,n){n||=Cg;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function Ng(e,t,n){n||=Cg;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}function Pg(e,t){return e===t?hg:Jh(e)>=Jh(t)?e<0?gg:_g:t<0?vg:yg}function Fg(e,t,n){return{x:t/e||0,y:n/e||0}}function Ig(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||=jg(t),i>1&&!n.firstMultiple?n.firstMultiple=jg(t):i===1&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,c=t.center=Ag(r);t.timeStamp=Yh(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=Ng(s,c),t.distance=Mg(s,c),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};t.eventType!==fg&&a.eventType!==pg||(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=Pg(t.deltaX,t.deltaY);var l,u,d=Fg(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=d.x,t.overallVelocityY=d.y,t.overallVelocity=Jh(d.x)>Jh(d.y)?d.x:d.y,t.scale=o?(l=o.pointers,Mg((u=r)[0],u[1],wg)/Mg(l[0],l[1],wg)):1,t.rotation=o?function(e,t){return Ng(t[1],t[0],wg)+Ng(e[1],e[0],wg)}(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,i,a,o=e.lastInterval||t,s=t.timeStamp-o.timeStamp;if(t.eventType!==mg&&(s>dg||o.velocity===void 0)){var c=t.deltaX-o.deltaX,l=t.deltaY-o.deltaY,u=Fg(s,c,l);r=u.x,i=u.y,n=Jh(u.x)>Jh(u.y)?u.x:u.y,a=Pg(c,l),e.lastInterval=t}else n=o.velocity,r=o.velocityX,i=o.velocityY,a=o.direction;t.velocity=n,t.velocityX=r,t.velocityY=i,t.direction=a}(n,t);var f,p=e.element,m=t.srcEvent;kg(f=m.composedPath?m.composedPath()[0]:m.path?m.path[0]:m.target,p)&&(p=f),t.target=p}function Lg(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=t&fg&&r-i==0,o=t&(pg|mg)&&r-i==0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,Ig(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function Rg(e){return e.trim().split(/\s+/g)}function zg(e,t,n){Tg(Rg(t),(function(t){e.addEventListener(t,n,!1)}))}function Bg(e,t,n){Tg(Rg(t),(function(t){e.removeEventListener(t,n,!1)}))}function Vg(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var Hg=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){Eg(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&zg(this.element,this.evEl,this.domHandler),this.evTarget&&zg(this.target,this.evTarget,this.domHandler),this.evWin&&zg(Vg(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&Bg(this.element,this.evEl,this.domHandler),this.evTarget&&Bg(this.target,this.evTarget,this.domHandler),this.evWin&&Bg(Vg(this.element),this.evWin,this.domHandler)},e}();function Ug(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var Wg={pointerdown:fg,pointermove:2,pointerup:pg,pointercancel:mg,pointerout:mg},Gg={2:lg,3:`pen`,4:ug,5:`kinect`},Kg=`pointerdown`,qg=`pointermove pointerup pointercancel`;Uh.MSPointerEvent&&!Uh.PointerEvent&&(Kg=`MSPointerDown`,qg=`MSPointerMove MSPointerUp MSPointerCancel`);var Jg=function(e){function t(){var n,r=t.prototype;return r.evEl=Kg,r.evWin=qg,(n=e.apply(this,arguments)||this).store=n.manager.session.pointerEvents=[],n}return Vh(t,e),t.prototype.handler=function(e){var t=this.store,n=!1,r=Wg[e.type.toLowerCase().replace(`ms`,``)],i=Gg[e.pointerType]||e.pointerType,a=i===lg,o=Ug(t,e.pointerId,`pointerId`);r&fg&&(e.button===0||a)?o<0&&(t.push(e),o=t.length-1):r&(pg|mg)&&(n=!0),o<0||(t[o]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:i,srcEvent:e}),n&&t.splice(o,1))},t}(Hg);function Yg(e){return Array.prototype.slice.call(e,0)}function Xg(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];Ug(i,o)<0&&r.push(e[a]),i[a]=o,a++}return n&&(r=t?r.sort((function(e,n){return e[t]>n[t]})):r.sort()),r}var Zg={touchstart:fg,touchmove:2,touchend:pg,touchcancel:mg},Qg=function(e){function t(){var n;return t.prototype.evTarget=`touchstart touchmove touchend touchcancel`,(n=e.apply(this,arguments)||this).targetIds={},n}return Vh(t,e),t.prototype.handler=function(e){var t=Zg[e.type],n=$g.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:lg,srcEvent:e})},t}(Hg);function $g(e,t){var n,r,i=Yg(e.touches),a=this.targetIds;if(t&(2|fg)&&i.length===1)return a[i[0].identifier]=!0,[i,i];var o=Yg(e.changedTouches),s=[],c=this.target;if(r=i.filter((function(e){return kg(e.target,c)})),t===fg)for(n=0;n<r.length;)a[r[n].identifier]=!0,n++;for(n=0;n<o.length;)a[o[n].identifier]&&s.push(o[n]),t&(pg|mg)&&delete a[o[n].identifier],n++;return s.length?[Xg(r.concat(s),`identifier`,!0),s]:void 0}var e_={mousedown:fg,mousemove:2,mouseup:pg},t_=function(e){function t(){var n,r=t.prototype;return r.evEl=`mousedown`,r.evWin=`mousemove mouseup`,(n=e.apply(this,arguments)||this).pressed=!1,n}return Vh(t,e),t.prototype.handler=function(e){var t=e_[e.type];t&fg&&e.button===0&&(this.pressed=!0),2&t&&e.which!==1&&(t=pg),this.pressed&&(t&pg&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:ug,srcEvent:e}))},t}(Hg),n_=2500;function r_(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout((function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)}),n_)}}function i_(e,t){e&fg?(this.primaryTouch=t.changedPointers[0].identifier,r_.call(this,t)):e&(pg|mg)&&r_.call(this,t)}function a_(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(t-i.x),o=Math.abs(n-i.y);if(a<=25&&o<=25)return!0}return!1}var o_=function(){return function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handler=function(e,t,n){var i=n.pointerType===lg,a=n.pointerType===ug;if(!(a&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)i_.call(Hh(Hh(r)),t,n);else if(a&&a_.call(Hh(Hh(r)),n))return;r.callback(e,t,n)}},r.touch=new Qg(r.manager,r.handler),r.mouse=new t_(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}return Vh(t,e),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(Hg)}();function s_(e,t,n){return!!Array.isArray(e)&&(Tg(e,n[t],n),!0)}var c_=32,l_=1;function u_(e,t){var n=t.manager;return n?n.get(e):e}function d_(e){return 16&e?`cancel`:8&e?`end`:4&e?`move`:2&e?`start`:``}var f_=function(){function e(e){e===void 0&&(e={}),this.options=Bh({enable:!0},e),this.id=l_++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return Wh(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(s_(e,`recognizeWith`,this))return this;var t=this.simultaneous;return t[(e=u_(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return s_(e,`dropRecognizeWith`,this)||(e=u_(e,this),delete this.simultaneous[e.id]),this},t.requireFailure=function(e){if(s_(e,`requireFailure`,this))return this;var t=this.requireFail;return Ug(t,e=u_(e,this))===-1&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(s_(e,`dropRequireFailure`,this))return this;e=u_(e,this);var t=Ug(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<8&&r(t.options.event+d_(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+d_(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=c_},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},t.recognize=function(e){var t=Wh({},e);if(!Eg(this.options.enable,[this,t]))return this.reset(),void(this.state=c_);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),p_=function(e){function t(t){var n;return t===void 0&&(t={}),(n=e.call(this,Bh({event:`tap`,pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this).pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}Vh(t,e);var n=t.prototype;return n.getTouchAction=function(){return[tg]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime<n.time;if(this.reset(),e.eventType&fg&&this.count===0)return this.failTimeout();if(i&&a&&r){if(e.eventType!==pg)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<n.interval,s=!this.pCenter||Mg(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,s&&o?this.count+=1:this.count=1,this._input=e,this.count%n.taps===0)return this.hasRequireFailures()?(this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),n.interval),2):8}return c_},n.failTimeout=function(){var e=this;return this._timer=setTimeout((function(){e.state=c_}),this.options.interval),c_},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){this.state===8&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(f_),m_=function(e){function t(t){return t===void 0&&(t={}),e.call(this,Bh({pointers:1},t))||this}Vh(t,e);var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return t===0||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=6&t,i=this.attrTest(e);return r&&(n&mg||!i)?16|t:r||i?n&pg?8|t:2&t?4|t:2:c_},t}(f_);function h_(e){return e===yg?`down`:e===vg?`up`:e===gg?`left`:e===_g?`right`:``}var g_=function(e){function t(t){var n;return t===void 0&&(t={}),(n=e.call(this,Bh({event:`pan`,threshold:10,pointers:1,direction:Sg},t))||this).pX=null,n.pY=null,n}Vh(t,e);var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&bg&&t.push(ig),e&xg&&t.push(rg),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,a=e.deltaX,o=e.deltaY;return i&t.direction||(t.direction&bg?(i=a===0?hg:a<0?gg:_g,n=a!==this.pX,r=Math.abs(e.deltaX)):(i=o===0?hg:o<0?vg:yg,n=o!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return m_.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=h_(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(m_),__=function(e){function t(t){return t===void 0&&(t={}),e.call(this,Bh({event:`swipe`,threshold:10,velocity:.3,direction:bg|xg,pointers:1},t))||this}Vh(t,e);var n=t.prototype;return n.getTouchAction=function(){return g_.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n,r=this.options.direction;return r&(bg|xg)?n=t.overallVelocity:r&bg?n=t.overallVelocityX:r&xg&&(n=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&r&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&Jh(n)>this.options.velocity&&t.eventType&pg},n.emit=function(e){var t=h_(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(m_),v_=function(e){function t(t){return t===void 0&&(t={}),e.call(this,Bh({event:`pinch`,threshold:0,pointers:2},t))||this}Vh(t,e);var n=t.prototype;return n.getTouchAction=function(){return[ng]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},n.emit=function(t){if(t.scale!==1){var n=t.scale<1?`in`:`out`;t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(m_),y_=function(e){function t(t){return t===void 0&&(t={}),e.call(this,Bh({event:`rotate`,threshold:0,pointers:2},t))||this}Vh(t,e);var n=t.prototype;return n.getTouchAction=function(){return[ng]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)},t}(m_),b_=function(e){function t(t){var n;return t===void 0&&(t={}),(n=e.call(this,Bh({event:`press`,pointers:1,time:251,threshold:9},t))||this)._timer=null,n._input=null,n}Vh(t,e);var n=t.prototype;return n.getTouchAction=function(){return[eg]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime>n.time;if(this._input=e,!i||!r||e.eventType&(pg|mg)&&!a)this.reset();else if(e.eventType&fg)this.reset(),this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),n.time);else if(e.eventType&pg)return 8;return c_},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){this.state===8&&(e&&e.eventType&pg?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=Yh(),this.manager.emit(this.options.event,this._input)))},t}(f_),x_={domEvents:!1,touchAction:$h,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}},S_=[[y_,{enable:!1}],[v_,{enable:!1},[`rotate`]],[__,{direction:bg}],[g_,{direction:bg},[`swipe`]],[p_],[p_,{event:`doubletap`,taps:2},[`tap`]],[b_]];function C_(e,t){var n,r=e.element;r.style&&(Tg(e.options.cssProps,(function(i,a){n=Xh(r.style,a),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||``})),t||(e.oldCssProps={}))}var w_=function(){function e(e,t){var n,r=this;this.options=Wh({},x_,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((n=this).options.inputClass||(sg?Jg:cg?Qg:og?o_:t_))(n,Lg),this.touchAction=new Og(this,this.options.touchAction),C_(this,!0),Tg(this.options.recognizers,(function(e){var t=r.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}var t=e.prototype;return t.set=function(e){return Wh(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?2:1},t.recognize=function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var r=this.recognizers,i=t.curRecognizer;(!i||i&&8&i.state)&&(t.curRecognizer=null,i=null);for(var a=0;a<r.length;)n=r[a],t.stopped===2||i&&n!==i&&!n.canRecognizeWith(i)?n.reset():n.recognize(e),!i&&14&n.state&&(t.curRecognizer=n,i=n),a++}},t.get=function(e){if(e instanceof f_)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(s_(e,`add`,this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(s_(e,`remove`,this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=Ug(n,t);r!==-1&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(e===void 0||t===void 0)return this;var n=this.handlers;return Tg(Rg(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this},t.off=function(e,t){if(e===void 0)return this;var n=this.handlers;return Tg(Rg(e),(function(e){t?n[e]&&n[e].splice(Ug(n[e],t),1):delete n[e]})),this},t.emit=function(e,t){this.options.domEvents&&function(e,t){var n=document.createEvent(`Event`);n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&C_(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),T_={touchstart:fg,touchmove:2,touchend:pg,touchcancel:mg},E_=function(e){function t(){var n,r=t.prototype;return r.evTarget=`touchstart`,r.evWin=`touchstart touchmove touchend touchcancel`,(n=e.apply(this,arguments)||this).started=!1,n}return Vh(t,e),t.prototype.handler=function(e){var t=T_[e.type];if(t===fg&&(this.started=!0),this.started){var n=D_.call(this,e,t);t&(pg|mg)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:lg,srcEvent:e})}},t}(Hg);function D_(e,t){var n=Yg(e.touches),r=Yg(e.changedTouches);return t&(pg|mg)&&(n=Xg(n.concat(r),`identifier`,!0)),[n,r]}function O_(e,t,n){var r=`DEPRECATED METHOD: `+t+`
|
|
44
|
+
`+n+` AT
|
|
45
|
+
`;return function(){var t=Error(`get-stack-trace`),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,``).replace(/^\s+at\s+/gm,``).replace(/^Object.<anonymous>\s*\(/gm,`{anonymous}()@`):`Unknown Stack Trace`,i=window.console&&(window.console.warn||window.console.log);return i&&i.call(window.console,r,n),e.apply(this,arguments)}}var k_=O_((function(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;)(!n||n&&e[r[i]]===void 0)&&(e[r[i]]=t[r[i]]),i++;return e}),`extend`,"Use `assign`."),A_=O_((function(e,t){return k_(e,t,!0)}),`merge`,"Use `assign`.");function j_(e,t,n){var r,i=t.prototype;(r=e.prototype=Object.create(i)).constructor=e,r._super=i,n&&Wh(r,n)}function M_(e,t){return function(){return e.apply(t,arguments)}}var N_=function(){var e=function(e,t){return t===void 0&&(t={}),new w_(e,Bh({recognizers:S_.concat()},t))};return e.VERSION=`2.0.17-rc`,e.DIRECTION_ALL=Sg,e.DIRECTION_DOWN=yg,e.DIRECTION_LEFT=gg,e.DIRECTION_RIGHT=_g,e.DIRECTION_UP=vg,e.DIRECTION_HORIZONTAL=bg,e.DIRECTION_VERTICAL=xg,e.DIRECTION_NONE=hg,e.DIRECTION_DOWN=yg,e.INPUT_START=fg,e.INPUT_MOVE=2,e.INPUT_END=pg,e.INPUT_CANCEL=mg,e.STATE_POSSIBLE=1,e.STATE_BEGAN=2,e.STATE_CHANGED=4,e.STATE_ENDED=8,e.STATE_RECOGNIZED=8,e.STATE_CANCELLED=16,e.STATE_FAILED=c_,e.Manager=w_,e.Input=Hg,e.TouchAction=Og,e.TouchInput=Qg,e.MouseInput=t_,e.PointerEventInput=Jg,e.TouchMouseInput=o_,e.SingleTouchInput=E_,e.Recognizer=f_,e.AttrRecognizer=m_,e.Tap=p_,e.Pan=g_,e.Swipe=__,e.Pinch=v_,e.Rotate=y_,e.Press=b_,e.on=zg,e.off=Bg,e.each=Tg,e.merge=A_,e.extend=k_,e.bindFn=M_,e.assign=Wh,e.inherit=j_,e.bindFn=M_,e.prefixed=Xh,e.toArray=Yg,e.inArray=Ug,e.uniqueArray=Xg,e.splitStr=Rg,e.boolOrFn=Eg,e.hasParent=kg,e.addEventListeners=zg,e.removeEventListeners=Bg,e.defaults=Wh({},x_,{preset:S_}),e}();function P_(e,t){var n=Vp!==void 0&&Zf(e)||e[`@@iterator`];if(!n){if(tm(e)||(n=function(e,t){var n;if(e){if(typeof e==`string`)return F_(e,t);var r=qp(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return Jf(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return F_(e,t)}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
46
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function F_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var I_=Vp(`DELETE`);function L_(){var e=R_.apply(void 0,arguments);return B_(e),e}function R_(){var e=[...arguments];if(e.length<2)return e[0];var t;if(e.length>2)return R_.apply(void 0,Kp(t=[L_(e[0],e[1])]).call(t,Bp(qp(e).call(e,2))));var n=e[0],r=e[1];if(n instanceof Date&&r instanceof Date)return n.setTime(r.getTime()),n;var i,a=P_(em(r));try{for(a.s();!(i=a.n()).done;){var o=i.value;Object.prototype.propertyIsEnumerable.call(r,o)&&(r[o]===I_?delete n[o]:n[o]===null||r[o]===null||typeof n[o]!=`object`||typeof r[o]!=`object`||tm(n[o])||tm(r[o])?n[o]=z_(r[o]):n[o]=R_(n[o],r[o]))}}catch(e){a.e(e)}finally{a.f()}return n}function z_(e){return tm(e)?Wd(e).call(e,(function(e){return z_(e)})):typeof e==`object`&&e?e instanceof Date?new Date(e.getTime()):R_({},e):e}function B_(e){for(var t=0,n=im(e);t<n.length;t++){var r=n[t];e[r]===I_?delete e[r]:typeof e[r]==`object`&&e[r]!==null&&B_(e[r])}}var V_=typeof window<`u`?window.Hammer||N_:function(){return function(){var e=function(){};return{on:e,off:e,destroy:e,emit:e,get:()=>({set:e})}}()};function H_(e){var t,n=this;this._cleanupQueue=[],this.active=!1,this._dom={container:e,overlay:document.createElement(`div`)},this._dom.overlay.classList.add(`vis-overlay`),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push((function(){n._dom.overlay.parentNode.removeChild(n._dom.overlay)}));var r=V_(this._dom.overlay);r.on(`tap`,gd(t=this._onTapOverlay).call(t,this)),this._cleanupQueue.push((function(){r.destroy()}));var i=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];hm(i).call(i,(function(e){r.on(e,(function(e){e.srcEvent.stopPropagation()}))})),document&&document.body&&(this._onClick=function(t){(function(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1})(t.target,e)||n.deactivate()},document.body.addEventListener(`click`,this._onClick),this._cleanupQueue.push((function(){document.body.removeEventListener(`click`,n._onClick)}))),this._escListener=function(e){(`key`in e?e.key===`Escape`:e.keyCode===27)&&n.deactivate()}}zh(H_.prototype),H_.current=null,H_.prototype.destroy=function(){var e,t;this.deactivate();var n,r=P_(Tm(e=Km(t=this._cleanupQueue).call(t,0)).call(e));try{for(r.s();!(n=r.n()).done;)(0,n.value)()}catch(e){r.e(e)}finally{r.f()}},H_.prototype.activate=function(){H_.current&&H_.current.deactivate(),H_.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)},H_.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`)},H_.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};var U_=Br,W_=Ge,G_=TypeError,K_=function(e){if(U_(e))return e;throw new G_(W_(e)+` is not a constructor`)},q_=z,J_=p,Y_=od,X_=K_,Z_=bn,Q_=N,$_=aa,ev=s,tv=F(`Reflect`,`construct`),nv=Object.prototype,rv=[].push,iv=ev((function(){function e(){}return!(tv((function(){}),[],e)instanceof e)})),av=!ev((function(){tv((function(){}))})),ov=iv||av;q_({target:`Reflect`,stat:!0,forced:ov,sham:ov},{construct:function(e,t){X_(e),Z_(t);var n=arguments.length<3?e:X_(arguments[2]);if(av&&!iv)return tv(e,t,n);if(e===n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return J_(rv,r,t),new(J_(Y_,e,r))}var i=n.prototype,a=$_(Q_(i)?i:nv),o=J_(e,a,t);return Q_(o)?o:a}});var sv=r(P.Reflect.construct),cv=r(P.Object.getOwnPropertySymbols),lv={exports:{}},uv=z,dv=s,fv=be,pv=D.f,mv=O;uv({target:`Object`,stat:!0,forced:!mv||dv((function(){pv(1)})),sham:!mv},{getOwnPropertyDescriptor:function(e,t){return pv(fv(e),t)}});var hv=P.Object,gv=lv.exports=function(e,t){return hv.getOwnPropertyDescriptor(e,t)};hv.getOwnPropertyDescriptor.sham&&(gv.sham=!0);var _v=r(lv.exports),vv=$p,yv=be,bv=D,xv=pr;z({target:`Object`,stat:!0,sham:!O},{getOwnPropertyDescriptors:function(e){for(var t,n,r=yv(e),i=bv.f,a=vv(r),o={},s=0;a.length>s;)(n=i(r,t=a[s++]))!==void 0&&xv(o,t,n);return o}});var Sv=r(P.Object.getOwnPropertyDescriptors),Cv={exports:{}},wv=z,Tv=O,Ev=mi.f;wv({target:`Object`,stat:!0,forced:Object.defineProperties!==Ev,sham:!Tv},{defineProperties:Ev});var Dv=P.Object,Ov=Cv.exports=function(e,t){return Dv.defineProperties(e,t)};Dv.defineProperties.sham&&(Ov.sham=!0);var kv=r(Cv.exports),Av=r(Xn);function W(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var jv=fh,Mv=r(jv);z({target:`Object`,stat:!0},{setPrototypeOf:hl});var Nv=P.Object.setPrototypeOf,Pv=r(Nv),Fv=r(hd);function Iv(e,t){var n;return Iv=Pv?Fv(n=Pv).call(n):function(e,t){return e.__proto__=t,e},Iv(e,t)}function Lv(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Mv(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Qn(e,`prototype`,{writable:!1}),t&&Iv(e,t)}function Rv(e,t){if(t&&(Wu(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return W(e)}var zv=uh,Bv=r(zv);function Vv(e){var t;return Vv=Pv?Fv(t=Bv).call(t):function(e){return e.__proto__||Bv(e)},Vv(e)}var Hv={exports:{}},Uv={exports:{}};(function(e){var t=Cu,n=Hu;function r(i){return e.exports=r=typeof t==`function`&&typeof n==`symbol`?function(e){return typeof e}:function(e){return e&&typeof t==`function`&&e.constructor===t&&e!==t.prototype?`symbol`:typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,r(i)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Uv);var Wv=Uv.exports,Gv=mm,Kv=ht,qv=$p,Jv=D,Yv=hn,Xv=N,Zv=Pn,Qv=Error,$v=v(``.replace),ey=String(new Qv(`zxcasd`).stack),ty=/\n\s*at [^:]*:[^\n]*/,ny=ty.test(ey),ry=j,iy=!s((function(){var e=Error(`a`);return!(`stack`in e)||(Object.defineProperty(e,`stack`,ry(1,7)),e.stack!==7)})),ay=Pn,oy=function(e,t){if(ny&&typeof e==`string`&&!Qv.prepareStackTrace)for(;t--;)e=$v(e,ty,``);return e},sy=iy,cy=Error.captureStackTrace,ly=mn,uy=ie,dy=bn,G=Ge,K=vf,fy=sr,py=I,my=Af,hy=wf,gy=ff,_y=TypeError,vy=function(e,t){this.stopped=e,this.result=t},yy=vy.prototype,by=function(e,t,n){var r,i,a,o,s,c,l,u=n&&n.that,d=!(!n||!n.AS_ENTRIES),f=!(!n||!n.IS_RECORD),p=!(!n||!n.IS_ITERATOR),m=!(!n||!n.INTERRUPTED),h=ly(t,u),g=function(e){return r&&gy(r,`normal`,e),new vy(!0,e)},_=function(e){return d?(dy(e),m?h(e[0],e[1],g):h(e[0],e[1])):m?h(e,g):h(e)};if(f)r=e.iterator;else if(p)r=e;else{if(!(i=hy(e)))throw new _y(G(e)+` is not iterable`);if(K(i)){for(a=0,o=fy(e);o>a;a++)if((s=_(e[a]))&&py(yy,s))return s;return new vy(!1)}r=my(e,i)}for(c=f?e.next:r.next;!(l=uy(c,r)).done;){try{s=_(l.value)}catch(e){gy(r,`throw`,e)}if(typeof s==`object`&&s&&py(yy,s))return s}return new vy(!1)},xy=pi,Sy=z,Cy=I,wy=Gc,Ty=hl,Ey=function(e,t,n){for(var r=qv(t),i=Yv.f,a=Jv.f,o=0;o<r.length;o++){var s=r[o];Kv(e,s)||n&&Kv(n,s)||i(e,s,a(t,s))}},Dy=aa,Oy=Pn,ky=j,Ay=function(e,t){Xv(t)&&`cause`in t&&Zv(e,`cause`,t.cause)},jy=function(e,t,n,r){sy&&(cy?cy(e,t):ay(e,`stack`,oy(n,r)))},My=by,Ny=function(e,t){return e===void 0?arguments.length<2?``:t:xy(e)},Py=kt(`toStringTag`),Fy=Error,Iy=[].push,Ly=function(e,t){var n,r=Cy(Ry,this);Ty?n=Ty(new Fy,r?wy(this):Ry):(n=r?this:Dy(Ry),Oy(n,Py,`Error`)),t!==void 0&&Oy(n,`message`,Ny(t)),jy(n,Ly,n.stack,1),arguments.length>2&&Ay(n,arguments[2]);var i=[];return My(e,Iy,{that:i}),Oy(n,`errors`,i),n};Ty?Ty(Ly,Fy):Ey(Ly,Fy,{name:!0});var Ry=Ly.prototype=Dy(Fy.prototype,{constructor:ky(1,Ly),message:ky(1,``),name:ky(1,`AggregateError`)});Sy({global:!0,constructor:!0,arity:2},{AggregateError:Ly});var zy,By,Vy,Hy,Uy=F,Wy=Ta,Gy=O,Ky=kt(`species`),qy=function(e){var t=Uy(e);Gy&&t&&!t[Ky]&&Wy(t,Ky,{configurable:!0,get:function(){return this}})},Jy=I,Yy=TypeError,Xy=function(e,t){if(Jy(t,e))return e;throw new Yy(`Incorrect invocation`)},Zy=bn,Qy=K_,$y=me,eb=kt(`species`),tb=function(e,t){var n,r=Zy(e).constructor;return r===void 0||$y(n=Zy(r)[eb])?t:Qy(n)},nb=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ee),rb=o,ib=p,ab=mn,ob=E,sb=ht,cb=s,lb=Hi,ub=Gs,db=Ut,fb=yh,pb=nb,mb=Ed,hb=rb.setImmediate,gb=rb.clearImmediate,_b=rb.process,vb=rb.Dispatch,yb=rb.Function,bb=rb.MessageChannel,xb=rb.String,Sb=0,Cb={},wb=`onreadystatechange`;cb((function(){zy=rb.location}));var Tb=function(e){if(sb(Cb,e)){var t=Cb[e];delete Cb[e],t()}},Eb=function(e){return function(){Tb(e)}},Db=function(e){Tb(e.data)},Ob=function(e){rb.postMessage(xb(e),zy.protocol+`//`+zy.host)};hb&&gb||(hb=function(e){fb(arguments.length,1);var t=ob(e)?e:yb(e),n=ub(arguments,1);return Cb[++Sb]=function(){ib(t,void 0,n)},By(Sb),Sb},gb=function(e){delete Cb[e]},mb?By=function(e){_b.nextTick(Eb(e))}:vb&&vb.now?By=function(e){vb.now(Eb(e))}:bb&&!pb?(Hy=(Vy=new bb).port2,Vy.port1.onmessage=Db,By=ab(Hy.postMessage,Hy)):rb.addEventListener&&ob(rb.postMessage)&&!rb.importScripts&&zy&&zy.protocol!==`file:`&&!cb(Ob)?(By=Ob,rb.addEventListener(`message`,Db,!1)):By=wb in db(`script`)?function(e){lb.appendChild(db(`script`))[wb]=function(){lb.removeChild(this),Tb(e)}}:function(e){setTimeout(Eb(e),0)});var kb={set:hb,clear:gb},Ab=function(){this.head=null,this.tail=null};Ab.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return(this.head=e.next)===null&&(this.tail=null),e.item}};var jb,Mb,Nb,Pb,Fb,Ib=Ab,Lb=/ipad|iphone|ipod/i.test(Ee)&&typeof Pebble<`u`,Rb=/web0s(?!.*chrome)/i.test(Ee),zb=o,Bb=mn,Vb=D.f,Hb=kb.set,Ub=Ib,Wb=nb,Gb=Lb,Kb=Rb,qb=Ed,Jb=zb.MutationObserver||zb.WebKitMutationObserver,Yb=zb.document,Xb=zb.process,Zb=zb.Promise,Qb=Vb(zb,`queueMicrotask`),$b=Qb&&Qb.value;if(!$b){var ex=new Ub,tx=function(){var e,t;for(qb&&(e=Xb.domain)&&e.exit();t=ex.get();)try{t()}catch(e){throw ex.head&&jb(),e}e&&e.enter()};Wb||qb||Kb||!Jb||!Yb?!Gb&&Zb&&Zb.resolve?((Pb=Zb.resolve(void 0)).constructor=Zb,Fb=Bb(Pb.then,Pb),jb=function(){Fb(tx)}):qb?jb=function(){Xb.nextTick(tx)}:(Hb=Bb(Hb,zb),jb=function(){Hb(tx)}):(Mb=!0,Nb=Yb.createTextNode(``),new Jb(tx).observe(Nb,{characterData:!0}),jb=function(){Nb.data=Mb=!Mb}),$b=function(e){ex.head||jb(),ex.add(e)}}var nx=$b,rx=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},ix=o.Promise,ax=typeof Deno==`object`&&Deno&&typeof Deno.version==`object`,ox=!ax&&!Ed&&typeof window==`object`&&typeof document==`object`,sx=o,cx=ix,lx=E,ux=un,dx=Er,fx=kt,px=ox,mx=ax,hx=Ne,gx=cx&&cx.prototype,_x=fx(`species`),vx=!1,yx=lx(sx.PromiseRejectionEvent),bx={CONSTRUCTOR:ux(`Promise`,(function(){var e=dx(cx),t=e!==String(cx);if(!t&&hx===66||!gx.catch||!gx.finally)return!0;if(!hx||hx<51||!/native code/.test(e)){var n=new cx((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[_x]=r,!(vx=n.then((function(){}))instanceof r))return!0}return!t&&(px||mx)&&!yx})),REJECTION_EVENT:yx,SUBCLASSING:vx},xx={},Sx=Ye,Cx=TypeError,wx=function(e){var t,n;this.promise=new e((function(e,r){if(t!==void 0||n!==void 0)throw new Cx(`Bad Promise constructor`);t=e,n=r})),this.resolve=Sx(t),this.reject=Sx(n)};xx.f=function(e){return new wx(e)};var Tx,Ex,Dx=z,Ox=Ed,kx=o,Ax=ie,jx=Ca,Mx=Ja,Nx=qy,Px=Ye,Fx=E,Ix=N,Lx=Xy,Rx=tb,zx=kb.set,Bx=nx,Vx=function(e,t){try{arguments.length===1?console.error(e):console.error(e,t)}catch{}},Hx=rx,Ux=Ib,Wx=uo,Gx=ix,Kx=bx,qx=xx,Jx=`Promise`,Yx=Kx.CONSTRUCTOR,Xx=Kx.REJECTION_EVENT,Zx=Wx.getterFor(Jx),Qx=Wx.set,$x=Gx&&Gx.prototype,eS=Gx,tS=$x,nS=kx.TypeError,rS=kx.document,iS=kx.process,aS=qx.f,oS=aS,sS=!!(rS&&rS.createEvent&&kx.dispatchEvent),cS=`unhandledrejection`,lS=function(e){var t;return!(!Ix(e)||!Fx(t=e.then))&&t},uS=function(e,t){var n,r,i,a=t.value,o=t.state===1,s=o?e.ok:e.fail,c=e.resolve,l=e.reject,u=e.domain;try{s?(o||(t.rejection===2&&hS(t),t.rejection=1),!0===s?n=a:(u&&u.enter(),n=s(a),u&&(u.exit(),i=!0)),n===e.promise?l(new nS(`Promise-chain cycle`)):(r=lS(n))?Ax(r,n,c,l):c(n)):l(a)}catch(e){u&&!i&&u.exit(),l(e)}},dS=function(e,t){e.notified||(e.notified=!0,Bx((function(){for(var n,r=e.reactions;n=r.get();)uS(n,e);e.notified=!1,t&&!e.rejection&&pS(e)})))},fS=function(e,t,n){var r,i;sS?((r=rS.createEvent(`Event`)).promise=t,r.reason=n,r.initEvent(e,!1,!0),kx.dispatchEvent(r)):r={promise:t,reason:n},!Xx&&(i=kx[`on`+e])?i(r):e===cS&&Vx(`Unhandled promise rejection`,n)},pS=function(e){Ax(zx,kx,(function(){var t,n=e.facade,r=e.value;if(mS(e)&&(t=Hx((function(){Ox?iS.emit(`unhandledRejection`,r,n):fS(cS,n,r)})),e.rejection=Ox||mS(e)?2:1,t.error))throw t.value}))},mS=function(e){return e.rejection!==1&&!e.parent},hS=function(e){Ax(zx,kx,(function(){var t=e.facade;Ox?iS.emit(`rejectionHandled`,t):fS(`rejectionhandled`,t,e.value)}))},gS=function(e,t,n){return function(r){e(t,r,n)}},_S=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,dS(e,!0))},vS=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new nS(`Promise can't be resolved itself`);var r=lS(t);r?Bx((function(){var n={done:!1};try{Ax(r,t,gS(vS,n,e),gS(_S,n,e))}catch(t){_S(n,t,e)}})):(e.value=t,e.state=1,dS(e,!1))}catch(t){_S({done:!1},t,e)}}};Yx&&(tS=(eS=function(e){Lx(this,tS),Px(e),Ax(Tx,this);var t=Zx(this);try{e(gS(vS,t),gS(_S,t))}catch(e){_S(t,e)}}).prototype,(Tx=function(e){Qx(this,{type:Jx,done:!1,notified:!1,parent:!1,reactions:new Ux,rejection:!1,state:0,value:void 0})}).prototype=jx(tS,`then`,(function(e,t){var n=Zx(this),r=aS(Rx(this,eS));return n.parent=!0,r.ok=!Fx(e)||e,r.fail=Fx(t)&&t,r.domain=Ox?iS.domain:void 0,n.state===0?n.reactions.add(r):Bx((function(){uS(r,n)})),r.promise})),Ex=function(){var e=new Tx,t=Zx(e);this.promise=e,this.resolve=gS(vS,t),this.reject=gS(_S,t)},qx.f=aS=function(e){return e===eS||e===void 0?new Ex(e):oS(e)}),Dx({global:!0,constructor:!0,wrap:!0,forced:Yx},{Promise:eS}),Mx(eS,Jx,!1,!0),Nx(Jx);var yS=ix,bS=bx.CONSTRUCTOR||!Kf((function(e){yS.all(e).then(void 0,(function(){}))})),xS=ie,SS=Ye,CS=xx,wS=rx,TS=by;z({target:`Promise`,stat:!0,forced:bS},{all:function(e){var t=this,n=CS.f(t),r=n.resolve,i=n.reject,a=wS((function(){var n=SS(t.resolve),a=[],o=0,s=1;TS(e,(function(e){var c=o++,l=!1;s++,xS(n,t,e).then((function(e){l||(l=!0,a[c]=e,--s||r(a))}),i)})),--s||r(a)}));return a.error&&i(a.value),n.promise}});var ES=z,DS=bx.CONSTRUCTOR;ix&&ix.prototype,ES({target:`Promise`,proto:!0,forced:DS,real:!0},{catch:function(e){return this.then(void 0,e)}});var OS=ie,kS=Ye,AS=xx,jS=rx,MS=by;z({target:`Promise`,stat:!0,forced:bS},{race:function(e){var t=this,n=AS.f(t),r=n.reject,i=jS((function(){var i=kS(t.resolve);MS(e,(function(e){OS(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var NS=ie,PS=xx;z({target:`Promise`,stat:!0,forced:bx.CONSTRUCTOR},{reject:function(e){var t=PS.f(this);return NS(t.reject,void 0,e),t.promise}});var FS=bn,IS=N,LS=xx,RS=function(e,t){if(FS(e),IS(t)&&t.constructor===e)return t;var n=LS.f(e);return(0,n.resolve)(t),n.promise},zS=z,BS=ix,VS=bx.CONSTRUCTOR,HS=RS,q=F(`Promise`),US=!VS;zS({target:`Promise`,stat:!0,forced:!0},{resolve:function(e){return HS(US&&this===q?BS:this,e)}});var WS=ie,GS=Ye,KS=xx,qS=rx,JS=by;z({target:`Promise`,stat:!0,forced:bS},{allSettled:function(e){var t=this,n=KS.f(t),r=n.resolve,i=n.reject,a=qS((function(){var n=GS(t.resolve),i=[],a=0,o=1;JS(e,(function(e){var s=a++,c=!1;o++,WS(n,t,e).then((function(e){c||(c=!0,i[s]={status:`fulfilled`,value:e},--o||r(i))}),(function(e){c||(c=!0,i[s]={status:`rejected`,reason:e},--o||r(i))}))})),--o||r(i)}));return a.error&&i(a.value),n.promise}});var YS=ie,J=Ye,XS=F,ZS=xx,QS=rx,$S=by,eC=`No one promise resolved`;z({target:`Promise`,stat:!0,forced:bS},{any:function(e){var t=this,n=XS(`AggregateError`),r=ZS.f(t),i=r.resolve,a=r.reject,o=QS((function(){var r=J(t.resolve),o=[],s=0,c=1,l=!1;$S(e,(function(e){var u=s++,d=!1;c++,YS(r,t,e).then((function(e){d||l||(l=!0,i(e))}),(function(e){d||l||(d=!0,o[u]=e,--c||a(new n(o,eC)))}))})),--c||a(new n(o,eC))}));return o.error&&a(o.value),r.promise}});var tC=z,nC=ix,rC=s,iC=F,aC=E,oC=tb,sC=RS,cC=nC&&nC.prototype;tC({target:`Promise`,proto:!0,real:!0,forced:!!nC&&rC((function(){cC.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=oC(this,iC(`Promise`)),n=aC(e);return this.then(n?function(n){return sC(t,e()).then((function(){return n}))}:e,n?function(n){return sC(t,e()).then((function(){throw n}))}:e)}});var lC=P.Promise,uC=xx;z({target:`Promise`,stat:!0},{withResolvers:function(){var e=uC.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}});var dC=lC,fC=xx,pC=rx;z({target:`Promise`,stat:!0,forced:!0},{try:function(e){var t=fC.f(this),n=pC(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var mC=dC,hC=wm;(function(e){var t=Wv.default,n=Zn,r=Cu,i=jv,a=zv,o=Gv,s=pp,c=Nv,l=mC,u=hC,d=Pp;function f(){e.exports=f=function(){return m},e.exports.__esModule=!0,e.exports.default=e.exports;var p,m={},h=Object.prototype,g=h.hasOwnProperty,_=n||function(e,t,n){e[t]=n.value},v=typeof r==`function`?r:{},y=v.iterator||`@@iterator`,b=v.asyncIterator||`@@asyncIterator`,x=v.toStringTag||`@@toStringTag`;function S(e,t,r){return n(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{S({},``)}catch{S=function(e,t,n){return e[t]=n}}function ee(e,t,n,r){var a=i((t&&t.prototype instanceof D?t:D).prototype);return _(a,`_invoke`,{value:se(e,n,new ue(r||[]))}),a}function C(e,t,n){try{return{type:`normal`,arg:e.call(t,n)}}catch(e){return{type:`throw`,arg:e}}}m.wrap=ee;var te=`suspendedStart`,w=`suspendedYield`,ne=`executing`,T=`completed`,E={};function D(){}function O(){}function k(){}var re={};S(re,y,(function(){return this}));var ie=a&&a(a(de([])));ie&&ie!==h&&g.call(ie,y)&&(re=ie);var A=k.prototype=D.prototype=i(re);function ae(e){var t;o(t=[`next`,`throw`,`return`]).call(t,(function(t){S(e,t,(function(e){return this._invoke(t,e)}))}))}function oe(e,n){function r(i,a,o,s){var c=C(e[i],e,a);if(c.type!==`throw`){var l=c.arg,u=l.value;return u&&t(u)==`object`&&g.call(u,`__await`)?n.resolve(u.__await).then((function(e){r(`next`,e,o,s)}),(function(e){r(`throw`,e,o,s)})):n.resolve(u).then((function(e){l.value=e,o(l)}),(function(e){return r(`throw`,e,o,s)}))}s(c.arg)}var i;_(this,`_invoke`,{value:function(e,t){function a(){return new n((function(n,i){r(e,t,n,i)}))}return i=i?i.then(a,a):a()}})}function se(e,t,n){var r=te;return function(i,a){if(r===ne)throw Error(`Generator is already running`);if(r===T){if(i===`throw`)throw a;return{value:p,done:!0}}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=ce(o,n);if(s){if(s===E)continue;return s}}if(n.method===`next`)n.sent=n._sent=n.arg;else if(n.method===`throw`){if(r===te)throw r=T,n.arg;n.dispatchException(n.arg)}else n.method===`return`&&n.abrupt(`return`,n.arg);r=ne;var c=C(e,t,n);if(c.type===`normal`){if(r=n.done?T:w,c.arg===E)continue;return{value:c.arg,done:n.done}}c.type===`throw`&&(r=T,n.method=`throw`,n.arg=c.arg)}}}function ce(e,t){var n=t.method,r=e.iterator[n];if(r===p)return t.delegate=null,n===`throw`&&e.iterator.return&&(t.method=`return`,t.arg=p,ce(e,t),t.method===`throw`)||n!==`return`&&(t.method=`throw`,t.arg=TypeError(`The iterator does not provide a '`+n+`' method`)),E;var i=C(r,e.iterator,t.arg);if(i.type===`throw`)return t.method=`throw`,t.arg=i.arg,t.delegate=null,E;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,t.method!==`return`&&(t.method=`next`,t.arg=p),t.delegate=null,E):a:(t.method=`throw`,t.arg=TypeError(`iterator result is not an object`),t.delegate=null,E)}function j(e){var t,n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),s(t=this.tryEntries).call(t,n)}function le(e){var t=e.completion||{};t.type=`normal`,delete t.arg,e.completion=t}function ue(e){this.tryEntries=[{tryLoc:`root`}],o(e).call(e,j,this),this.reset(!0)}function de(e){if(e||e===``){var n=e[y];if(n)return n.call(e);if(typeof e.next==`function`)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(g.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=p,t.done=!0,t};return i.next=i}}throw TypeError(t(e)+` is not iterable`)}return O.prototype=k,_(A,`constructor`,{value:k,configurable:!0}),_(k,`constructor`,{value:O,configurable:!0}),O.displayName=S(k,x,`GeneratorFunction`),m.isGeneratorFunction=function(e){var t=typeof e==`function`&&e.constructor;return!!t&&(t===O||(t.displayName||t.name)===`GeneratorFunction`)},m.mark=function(e){return c?c(e,k):(e.__proto__=k,S(e,x,`GeneratorFunction`)),e.prototype=i(A),e},m.awrap=function(e){return{__await:e}},ae(oe.prototype),S(oe.prototype,b,(function(){return this})),m.AsyncIterator=oe,m.async=function(e,t,n,r,i){i===void 0&&(i=l);var a=new oe(ee(e,t,n,r),i);return m.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},ae(A),S(A,x,`Generator`),S(A,y,(function(){return this})),S(A,`toString`,(function(){return`[object Generator]`})),m.keys=function(e){var t=Object(e),n=[];for(var r in t)s(n).call(n,r);return u(n).call(n),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},m.values=de,ue.prototype={constructor:ue,reset:function(e){var t;if(this.prev=0,this.next=0,this.sent=this._sent=p,this.done=!1,this.delegate=null,this.method=`next`,this.arg=p,o(t=this.tryEntries).call(t,le),!e)for(var n in this)n.charAt(0)===`t`&&g.call(this,n)&&!isNaN(+d(n).call(n,1))&&(this[n]=p)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type===`throw`)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type=`throw`,a.arg=e,t.next=n,r&&(t.method=`next`,t.arg=p),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if(i.tryLoc===`root`)return n(`end`);if(i.tryLoc<=this.prev){var o=g.call(i,`catchLoc`),s=g.call(i,`finallyLoc`);if(o&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw Error(`try statement without catch or finally`);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,`finallyLoc`)&&this.prev<r.finallyLoc){var i=r;break}}i&&(e===`break`||e===`continue`)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method=`next`,this.next=i.finallyLoc,E):this.complete(a)},complete:function(e,t){if(e.type===`throw`)throw e.arg;return e.type===`break`||e.type===`continue`?this.next=e.arg:e.type===`return`?(this.rval=this.arg=e.arg,this.method=`return`,this.next=`end`):e.type===`normal`&&t&&(this.next=t),E},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),le(n),E}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if(r.type===`throw`){var i=r.arg;le(n)}return i}}throw Error(`illegal catch attempt`)},delegateYield:function(e,t,n){return this.delegate={iterator:de(e),resultName:t,nextLoc:n},this.method===`next`&&(this.arg=p),E}},m}e.exports=f,e.exports.__esModule=!0,e.exports.default=e.exports})(Hv);var gC=(0,Hv.exports)(),_C=gC;try{regeneratorRuntime=gC}catch{typeof globalThis==`object`?globalThis.regeneratorRuntime=gC:Function(`r`,`regeneratorRuntime = r`)(gC)}var vC=r(_C),yC={exports:{}},bC=s((function(){if(typeof ArrayBuffer==`function`){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,`a`,{value:8})}})),xC=s,SC=N,CC=S,wC=bC,TC=Object.isExtensible,EC=xC((function(){TC(1)}))||wC?function(e){return!!SC(e)&&(!wC||CC(e)!==`ArrayBuffer`)&&(!TC||TC(e))}:TC,DC=!s((function(){return Object.isExtensible(Object.preventExtensions({}))})),OC=z,kC=v,AC=wi,jC=N,MC=ht,NC=hn.f,PC=oa,FC=la,IC=EC,LC=DC,RC=!1,zC=bt(`meta`),BC=0,VC=function(e){NC(e,zC,{value:{objectID:`O`+ BC++,weakData:{}}})},HC=yC.exports={enable:function(){HC.enable=function(){},RC=!0;var e=PC.f,t=kC([].splice),n={};n[zC]=1,e(n).length&&(PC.f=function(n){for(var r=e(n),i=0,a=r.length;i<a;i++)if(r[i]===zC){t(r,i,1);break}return r},OC({target:`Object`,stat:!0,forced:!0},{getOwnPropertyNames:FC.f}))},fastKey:function(e,t){if(!jC(e))return typeof e==`symbol`?e:(typeof e==`string`?`S`:`P`)+e;if(!MC(e,zC)){if(!IC(e))return`F`;if(!t)return`E`;VC(e)}return e[zC].objectID},getWeakData:function(e,t){if(!MC(e,zC)){if(!IC(e))return!0;if(!t)return!1;VC(e)}return e[zC].weakData},onFreeze:function(e){return LC&&RC&&IC(e)&&!MC(e,zC)&&VC(e),e}};AC[zC]=!0;var UC=yC.exports,WC=z,GC=o,KC=UC,qC=s,JC=Pn,YC=by,XC=Xy,ZC=E,QC=N,$C=me,ew=Ja,tw=hn.f,nw=yo.forEach,rw=O,iw=uo.set,aw=uo.getterFor,ow=function(e,t,n){var r,i=e.indexOf(`Map`)!==-1,a=e.indexOf(`Weak`)!==-1,o=i?`set`:`add`,s=GC[e],c=s&&s.prototype,l={};if(rw&&ZC(s)&&(a||c.forEach&&!qC((function(){new s().entries().next()})))){var u=(r=t((function(t,n){iw(XC(t,u),{type:e,collection:new s}),$C(n)||YC(n,t[o],{that:t,AS_ENTRIES:i})}))).prototype,d=aw(e);nw([`add`,`clear`,`delete`,`forEach`,`get`,`has`,`set`,`keys`,`values`,`entries`],(function(e){var t=e===`add`||e===`set`;!(e in c)||a&&e===`clear`||JC(u,e,(function(n,r){var i=d(this).collection;if(!t&&a&&!QC(n))return e===`get`&&void 0;var o=i[e](n===0?0:n,r);return t?this:o}))})),a||tw(u,`size`,{configurable:!0,get:function(){return d(this).collection.size}})}else r=n.getConstructor(t,e,i,o),KC.enable();return ew(r,e,!1,!0),l[e]=r,WC({global:!0,forced:!0},l),a||n.setStrong(r,e,i),r},sw=Ca,cw=aa,lw=Ta,uw=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:sw(e,r,t[r],n);return e},dw=mn,fw=Xy,pw=me,mw=by,hw=Ml,gw=Nl,_w=qy,vw=O,yw=UC.fastKey,bw=uo.set,xw=uo.getterFor,Sw={getConstructor:function(e,t,n,r){var i=e((function(e,i){fw(e,a),bw(e,{type:t,index:cw(null),first:void 0,last:void 0,size:0}),vw||(e.size=0),pw(i)||mw(i,e[r],{that:e,AS_ENTRIES:n})})),a=i.prototype,o=xw(t),s=function(e,t,n){var r,i,a=o(e),s=c(e,t);return s?s.value=n:(a.last=s={index:i=yw(t,!0),key:t,value:n,previous:r=a.last,next:void 0,removed:!1},a.first||=s,r&&(r.next=s),vw?a.size++:e.size++,i!==`F`&&(a.index[i]=s)),e},c=function(e,t){var n,r=o(e),i=yw(t);if(i!==`F`)return r.index[i];for(n=r.first;n;n=n.next)if(n.key===t)return n};return uw(a,{clear:function(){for(var e=o(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&=n.previous.next=void 0,delete t[n.index],n=n.next;e.first=e.last=void 0,vw?e.size=0:this.size=0},delete:function(e){var t=this,n=o(t),r=c(t,e);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first===r&&(n.first=i),n.last===r&&(n.last=a),vw?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=o(this),r=dw(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!c(this,e)}}),uw(a,n?{get:function(e){var t=c(this,e);return t&&t.value},set:function(e,t){return s(this,e===0?0:e,t)}}:{add:function(e){return s(this,e=e===0?0:e,e)}}),vw&&lw(a,`size`,{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(e,t,n){var r=t+` Iterator`,i=xw(t),a=xw(r);hw(e,t,(function(e,t){bw(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?gw(t===`keys`?n.key:t===`values`?n.value:[n.key,n.value],!1):(e.target=void 0,gw(void 0,!0))}),n?`entries`:`values`,!n,!0),_w(t)}};ow(`Map`,(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),Sw);var Cw=r(P.Map),ww=yo.some;z({target:`Array`,proto:!0,forced:!Td(`some`)},{some:function(e){return ww(this,e,arguments.length>1?arguments[1]:void 0)}});var Tw=ud(`Array`,`some`),Ew=I,Dw=Tw,Ow=Array.prototype,kw=r((function(e){var t=e.some;return e===Ow||Ew(Ow,e)&&t===Ow.some?Dw:t})),Aw=ud(`Array`,`keys`),jw=Sr,Mw=ht,Nw=I,Pw=Aw,Fw=Array.prototype,Iw={DOMTokenList:!0,NodeList:!0},Lw=r((function(e){var t=e.keys;return e===Fw||Nw(Fw,e)&&t===Fw.keys||Mw(Iw,jw(e))?Pw:t})),Rw=ha,zw=Math.floor,Bw=function(e,t){var n=e.length,r=zw(n/2);return n<8?Vw(e,t):Hw(e,Bw(Rw(e,0,r),t),Bw(Rw(e,r),t),t)},Vw=function(e,t){for(var n,r,i=e.length,a=1;a<i;){for(r=a,n=e[a];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==a++&&(e[r]=n)}return e},Hw=function(e,t,n,r){for(var i=t.length,a=n.length,o=0,s=0;o<i||s<a;)e[o+s]=o<i&&s<a?r(t[o],n[s])<=0?t[o++]:n[s++]:o<i?t[o++]:n[s++];return e},Uw=Bw,Ww=Ee.match(/firefox\/(\d+)/i),Gw=!!Ww&&+Ww[1],Kw=/MSIE|Trident/.test(Ee),qw=Ee.match(/AppleWebKit\/(\d+)\./),Jw=!!qw&&+qw[1],Yw=z,Xw=v,Zw=Ye,Qw=ft,$w=sr,eT=Om,tT=pi,nT=s,rT=Uw,iT=Td,aT=Gw,oT=Kw,sT=Ne,cT=Jw,lT=[],uT=Xw(lT.sort),dT=Xw(lT.push),fT=nT((function(){lT.sort(void 0)})),pT=nT((function(){lT.sort(null)})),mT=iT(`sort`),hT=!nT((function(){if(sT)return sT<70;if(!(aT&&aT>3)){if(oT)return!0;if(cT)return cT<603;var e,t,n,r,i=``;for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)lT.push({k:t+r,v:n})}for(lT.sort((function(e,t){return t.v-e.v})),r=0;r<lT.length;r++)t=lT[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return i!==`DGBEFHACIJK`}}));Yw({target:`Array`,proto:!0,forced:fT||!pT||!mT||!hT},{sort:function(e){e!==void 0&&Zw(e);var t=Qw(this);if(hT)return e===void 0?uT(t):uT(t,e);var n,r,i=[],a=$w(t);for(r=0;r<a;r++)r in t&&dT(i,t[r]);for(rT(i,function(e){return function(t,n){return n===void 0?-1:t===void 0?1:e===void 0?tT(t)>tT(n)?1:-1:+e(t,n)||0}}(e)),n=$w(i),r=0;r<n;)t[r]=i[r++];for(;r<a;)eT(t,r++);return t}});var gT=ud(`Array`,`sort`),_T=I,vT=gT,yT=Array.prototype,bT=r((function(e){var t=e.sort;return e===yT||_T(yT,e)&&t===yT.sort?vT:t})),xT=ud(`Array`,`values`),ST=Sr,CT=ht,wT=I,TT=xT,ET=Array.prototype,DT={DOMTokenList:!0,NodeList:!0},OT=r((function(e){var t=e.values;return e===ET||wT(ET,e)&&t===ET.values||CT(DT,ST(e))?TT:t})),kT=r(Vu),AT=ud(`Array`,`entries`),jT=Sr,MT=ht,NT=I,PT=AT,FT=Array.prototype,IT={DOMTokenList:!0,NodeList:!0},LT=r((function(e){var t=e.entries;return e===FT||NT(FT,e)&&t===FT.entries||MT(IT,jT(e))?PT:t}));let RT,zT=new Uint8Array(16);function BT(){if(!RT&&(RT=typeof crypto<`u`&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!RT))throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);return RT(zT)}let VT=[];for(let e=0;e<256;++e)VT.push((e+256).toString(16).slice(1));var HT={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function UT(e,t,n){if(HT.randomUUID&&!t&&!e)return HT.randomUUID();let r=(e||={}).random||(e.rng||BT)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n||=0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return VT[e[t+0]]+VT[e[t+1]]+VT[e[t+2]]+VT[e[t+3]]+`-`+VT[e[t+4]]+VT[e[t+5]]+`-`+VT[e[t+6]]+VT[e[t+7]]+`-`+VT[e[t+8]]+VT[e[t+9]]+`-`+VT[e[t+10]]+VT[e[t+11]]+VT[e[t+12]]+VT[e[t+13]]+VT[e[t+14]]+VT[e[t+15]]}(r)}function WT(e){return typeof e==`string`||typeof e==`number`}var GT=function(){function e(n){t(this,e),Yu(this,`_queue`,[]),Yu(this,`_timeout`,null),Yu(this,`_extended`,null),this.delay=null,this.max=1/0,this.setOptions(n)}return Ju(e,[{key:`setOptions`,value:function(e){e&&e.delay!==void 0&&(this.delay=e.delay),e&&e.max!==void 0&&(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 r=t[n];r.original?e[r.name]=r.original:delete e[r.name]}this._extended=null}}},{key:`replace`,value:function(e,t){var n=this,r=e[t];if(!r)throw Error(`Method `+t+` undefined`);e[t]=function(){var e=[...arguments];n.queue({args:e,fn:r,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=Ih((function(){e.flush()}),this.delay))}},{key:`flush`,value:function(){var e,t;hm(e=Km(t=this._queue).call(t,0)).call(e,(function(e){e.fn.apply(e.context||e.fn,e.args||[])}))}}],[{key:`extend`,value:function(t,n){var r=new e(n);if(t.flush!==void 0)throw Error(`Target object already has a property flush`);t.flush=function(){r.flush()};var i=[{name:`flush`,original:void 0}];if(n&&n.replace)for(var a=0;a<n.replace.length;a++){var o=n.replace[a];i.push({name:o,original:t[o]}),r.replace(t,o)}return r._extended={object:t,methods:i},r}}]),e}(),KT=function(){function e(){t(this,e),Yu(this,`_subscribers`,{"*":[],add:[],remove:[],update:[]}),Yu(this,`subscribe`,e.prototype.on),Yu(this,`unsubscribe`,e.prototype.off)}return Ju(e,[{key:`_trigger`,value:function(e,t,n){var r,i;if(e===`*`)throw Error(`Cannot trigger event *`);hm(r=Kp(i=[]).call(i,Bp(this._subscribers[e]),Bp(this._subscribers[`*`]))).call(r,(function(r){r(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]=Rd(n=this._subscribers[e]).call(n,(function(e){return e!==t}))}}]),e}();ow(`Set`,(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),Sw);var qT=r(P.Set),JT=r(Af);function YT(e,t){var n=Vp!==void 0&&Zf(e)||e[`@@iterator`];if(!n){if(tm(e)||(n=function(e,t){var n;if(e){if(typeof e==`string`)return XT(e,t);var r=qp(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return Jf(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return XT(e,t)}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
47
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function XT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ZT=function(e){function n(e){t(this,n),this._pairs=e}return Ju(n,[{key:e,value:vC.mark((function e(){var t,n,r,i,a;return vC.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=YT(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=zp(n.value,2),i=r[0],a=r[1],e.next=7,[i,a];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case`end`:return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:`entries`,value:vC.mark((function e(){var t,n,r,i,a;return vC.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=YT(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=zp(n.value,2),i=r[0],a=r[1],e.next=7,[i,a];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case`end`:return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:`keys`,value:vC.mark((function e(){var t,n,r,i;return vC.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=YT(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=zp(n.value,1),i=r[0],e.next=7,i;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case`end`:return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:`values`,value:vC.mark((function e(){var t,n,r,i;return vC.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=YT(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=zp(n.value,2),i=r[1],e.next=7,i;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case`end`:return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:`toIdArray`,value:function(){var e;return Wd(e=Bp(this._pairs)).call(e,(function(e){return e[0]}))}},{key:`toItemArray`,value:function(){var e;return Wd(e=Bp(this._pairs)).call(e,(function(e){return e[1]}))}},{key:`toEntryArray`,value:function(){return Bp(this._pairs)}},{key:`toObjectMap`,value:function(){var e,t=ph(null),n=YT(this._pairs);try{for(n.s();!(e=n.n()).done;){var r=zp(e.value,2),i=r[0];t[i]=r[1]}}catch(e){n.e(e)}finally{n.f()}return t}},{key:`toMap`,value:function(){return new Cw(this._pairs)}},{key:`toIdSet`,value:function(){return new qT(this.toIdArray())}},{key:`toItemSet`,value:function(){return new qT(this.toItemArray())}},{key:`cache`,value:function(){return new n(Bp(this._pairs))}},{key:`distinct`,value:function(e){var t,n=new qT,r=YT(this._pairs);try{for(r.s();!(t=r.n()).done;){var i=zp(t.value,2),a=i[0],o=i[1];n.add(e(o,a))}}catch(e){r.e(e)}finally{r.f()}return n}},{key:`filter`,value:function(e){var t=this._pairs;return new n({[kT]:()=>vC.mark((function n(){var r,i,a,o,s;return vC.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=YT(t),n.prev=1,r.s();case 3:if((i=r.n()).done){n.next=10;break}if(a=zp(i.value,2),o=a[0],s=a[1],!e(s,o)){n.next=8;break}return n.next=8,[o,s];case 8:n.next=3;break;case 10:n.next=15;break;case 12:n.prev=12,n.t0=n.catch(1),r.e(n.t0);case 15:return n.prev=15,r.f(),n.finish(15);case 18:case`end`:return n.stop()}}),n,null,[[1,12,15,18]])}))()})}},{key:`forEach`,value:function(e){var t,n=YT(this._pairs);try{for(n.s();!(t=n.n()).done;){var r=zp(t.value,2),i=r[0];e(r[1],i)}}catch(e){n.e(e)}finally{n.f()}}},{key:`map`,value:function(e){var t=this._pairs;return new n({[kT]:()=>vC.mark((function n(){var r,i,a,o,s;return vC.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=YT(t),n.prev=1,r.s();case 3:if((i=r.n()).done){n.next=9;break}return a=zp(i.value,2),o=a[0],s=a[1],n.next=7,[o,e(s,o)];case 7:n.next=3;break;case 9:n.next=14;break;case 11:n.prev=11,n.t0=n.catch(1),r.e(n.t0);case 14:return n.prev=14,r.f(),n.finish(14);case 17:case`end`:return n.stop()}}),n,null,[[1,11,14,17]])}))()})}},{key:`max`,value:function(e){var t=JT(this._pairs),n=t.next();if(n.done)return null;for(var r=n.value[1],i=e(n.value[1],n.value[0]);!(n=t.next()).done;){var a=zp(n.value,2),o=a[0],s=a[1],c=e(s,o);c>i&&(i=c,r=s)}return r}},{key:`min`,value:function(e){var t=JT(this._pairs),n=t.next();if(n.done)return null;for(var r=n.value[1],i=e(n.value[1],n.value[0]);!(n=t.next()).done;){var a=zp(n.value,2),o=a[0],s=a[1],c=e(s,o);c<i&&(i=c,r=s)}return r}},{key:`reduce`,value:function(e,t){var n,r=YT(this._pairs);try{for(r.s();!(n=r.n()).done;){var i=zp(n.value,2),a=i[0];t=e(t,i[1],a)}}catch(e){r.e(e)}finally{r.f()}return t}},{key:`sort`,value:function(e){var t=this;return new n({[kT]:function(){var n;return JT(bT(n=Bp(t._pairs)).call(n,(function(t,n){var r=zp(t,2),i=r[0],a=r[1],o=zp(n,2),s=o[0],c=o[1];return e(a,c,i,s)})))}})}}]),n}(kT);function QT(e,t){var n=im(e);if(cv){var r=cv(e);t&&(r=Rd(r).call(r,(function(t){return _v(e,t).enumerable}))),n.push.apply(n,r)}return n}function $T(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?hm(n=QT(Object(i),!0)).call(n,(function(t){Yu(e,t,i[t])})):Sv?kv(e,Sv(i)):hm(r=QT(Object(i))).call(r,(function(t){Av(e,t,_v(i,t))}))}return e}function eE(e,t){var n=Vp!==void 0&&Zf(e)||e[`@@iterator`];if(!n){if(tm(e)||(n=function(e,t){var n;if(e){if(typeof e==`string`)return tE(e,t);var r=qp(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return Jf(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tE(e,t)}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
48
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function tE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nE(e){var t=function(){if(typeof Reflect>`u`||!sv||sv.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(sv(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Vv(e);if(t){var i=Vv(this).constructor;n=sv(r,arguments,i)}else n=r.apply(this,arguments);return Rv(this,n)}}var rE=function(e){Lv(r,e);var n=nE(r);function r(e,i){var a;return t(this,r),Yu(W(a=n.call(this)),`_queue`,null),e&&!tm(e)&&(i=e,e=[]),a._options=i||{},a._data=new Cw,a.length=0,a._idProp=a._options.fieldId||`id`,e&&e.length&&a.add(e),a.setOptions(i),a}return Ju(r,[{key:`idProp`,get:function(){return this._idProp}},{key:`setOptions`,value:function(e){e&&e.queue!==void 0&&(!1===e.queue?this._queue&&=(this._queue.destroy(),null):(this._queue||=GT.extend(this,{replace:[`add`,`update`,`remove`]}),e.queue&&typeof e.queue==`object`&&this._queue.setOptions(e.queue)))}},{key:`add`,value:function(e,t){var n,r=this,i=[];if(tm(e)){var a=Wd(e).call(e,(function(e){return e[r._idProp]}));if(kw(a).call(a,(function(e){return r._data.has(e)})))throw Error(`A duplicate id was found in the parameter array.`);for(var o=0,s=e.length;o<s;o++)n=this._addItem(e[o]),i.push(n)}else{if(!e||typeof e!=`object`)throw Error(`Unknown dataType`);n=this._addItem(e),i.push(n)}return i.length&&this._trigger(`add`,{items:i},t),i}},{key:`update`,value:function(e,t){var n=this,r=[],i=[],a=[],o=[],s=this._idProp,c=function(e){var t=e[s];if(t!=null&&n._data.has(t)){var c=e,l=oh({},n._data.get(t)),u=n._updateItem(c);i.push(u),o.push(c),a.push(l)}else{var d=n._addItem(e);r.push(d)}};if(tm(e))for(var l=0,u=e.length;l<u;l++)e[l]&&typeof e[l]==`object`?c(e[l]):console.warn(`Ignoring input item, which is not an object at index `+l);else{if(!e||typeof e!=`object`)throw Error(`Unknown dataType`);c(e)}if(r.length&&this._trigger(`add`,{items:r},t),i.length){var d={items:i,oldData:a,data:o};this._trigger(`update`,d,t)}return Kp(r).call(r,i)}},{key:`updateOnly`,value:function(e,t){var n,r=this;tm(e)||(e=[e]);var i=Wd(n=Wd(e).call(e,(function(e){var t=r._data.get(e[r._idProp]);if(t==null)throw Error(`Updating non-existent items is not allowed.`);return{oldData:t,update:e}}))).call(n,(function(e){var t=e.oldData,n=e.update,i=t[r._idProp],a=function(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return L_.apply(void 0,Kp(t=[{},e]).call(t,r))}(t,n);return r._data.set(i,a),{id:i,oldData:t,updatedData:a}}));if(i.length){var a={items:Wd(i).call(i,(function(e){return e.id})),oldData:Wd(i).call(i,(function(e){return e.oldData})),data:Wd(i).call(i,(function(e){return e.updatedData}))};return this._trigger(`update`,a,t),a.items}return[]}},{key:`get`,value:function(e,t){var n=void 0,r=void 0,i=void 0;WT(e)?(n=e,i=t):tm(e)?(r=e,i=t):i=e;var a=i&&i.returnType===`Object`?`Object`:`Array`,o=i&&Rd(i),s=[],c=void 0,l=void 0,u=void 0;if(n!=null)(c=this._data.get(n))&&o&&!o(c)&&(c=void 0);else if(r!=null)for(var d=0,f=r.length;d<f;d++)(c=this._data.get(r[d]))==null||o&&!o(c)||s.push(c);else for(var p,m=0,h=(l=Bp(Lw(p=this._data).call(p))).length;m<h;m++)u=l[m],(c=this._data.get(u))==null||o&&!o(c)||s.push(c);if(i&&i.order&&n==null&&this._sort(s,i.order),i&&i.fields){var g=i.fields;if(n!=null&&c!=null)c=this._filterFields(c,g);else for(var _=0,v=s.length;_<v;_++)s[_]=this._filterFields(s[_],g)}if(a==`Object`){for(var y={},b=0,x=s.length;b<x;b++){var S=s[b];y[S[this._idProp]]=S}return y}return n==null?s:c??null}},{key:`getIds`,value:function(e){var t=this._data,n=e&&Rd(e),r=e&&e.order,i=Bp(Lw(t).call(t)),a=[];if(n)if(r){for(var o=[],s=0,c=i.length;s<c;s++){var l=i[s],u=this._data.get(l);u!=null&&n(u)&&o.push(u)}this._sort(o,r);for(var d=0,f=o.length;d<f;d++)a.push(o[d][this._idProp])}else for(var p=0,m=i.length;p<m;p++){var h=i[p],g=this._data.get(h);g!=null&&n(g)&&a.push(g[this._idProp])}else if(r){for(var _=[],v=0,y=i.length;v<y;v++){var b=i[v];_.push(t.get(b))}this._sort(_,r);for(var x=0,S=_.length;x<S;x++)a.push(_[x][this._idProp])}else for(var ee=0,C=i.length;ee<C;ee++){var te=i[ee],w=t.get(te);w!=null&&a.push(w[this._idProp])}return a}},{key:`getDataSet`,value:function(){return this}},{key:`forEach`,value:function(e,t){var n=t&&Rd(t),r=this._data,i=Bp(Lw(r).call(r));if(t&&t.order)for(var a=this.get(t),o=0,s=a.length;o<s;o++){var c=a[o];e(c,c[this._idProp])}else for(var l=0,u=i.length;l<u;l++){var d=i[l],f=this._data.get(d);f==null||n&&!n(f)||e(f,d)}}},{key:`map`,value:function(e,t){for(var n=t&&Rd(t),r=[],i=this._data,a=Bp(Lw(i).call(i)),o=0,s=a.length;o<s;o++){var c=a[o],l=this._data.get(c);l==null||n&&!n(l)||r.push(e(l,c))}return t&&t.order&&this._sort(r,t.order),r}},{key:`_filterFields`,value:function(e,t){var n;return e&&Md(n=tm(t)?t:im(t)).call(n,(function(t,n){return t[n]=e[n],t}),{})}},{key:`_sort`,value:function(e,t){if(typeof t==`string`){var n=t;bT(e).call(e,(function(e,t){var r=e[n],i=t[n];return r>i?1:r<i?-1:0}))}else{if(typeof t!=`function`)throw TypeError(`Order must be a function or a string`);bT(e).call(e,t)}}},{key:`remove`,value:function(e,t){for(var n=[],r=[],i=tm(e)?e:[e],a=0,o=i.length;a<o;a++){var s=this._remove(i[a]);if(s){var c=s[this._idProp];c!=null&&(n.push(c),r.push(s))}}return n.length&&this._trigger(`remove`,{items:n,oldData:r},t),n}},{key:`_remove`,value:function(e){var t;if(WT(e)?t=e:e&&typeof e==`object`&&(t=e[this._idProp]),t!=null&&this._data.has(t)){var n=this._data.get(t)||null;return this._data.delete(t),--this.length,n}return null}},{key:`clear`,value:function(e){for(var t,n=Bp(Lw(t=this._data).call(t)),r=[],i=0,a=n.length;i<a;i++)r.push(this._data.get(n[i]));return this._data.clear(),this.length=0,this._trigger(`remove`,{items:n,oldData:r},e),n}},{key:`max`,value:function(e){var t,n,r=null,i=null,a=eE(OT(t=this._data).call(t));try{for(a.s();!(n=a.n()).done;){var o=n.value,s=o[e];typeof s==`number`&&(i==null||s>i)&&(r=o,i=s)}}catch(e){a.e(e)}finally{a.f()}return r||null}},{key:`min`,value:function(e){var t,n,r=null,i=null,a=eE(OT(t=this._data).call(t));try{for(a.s();!(n=a.n()).done;){var o=n.value,s=o[e];typeof s==`number`&&(i==null||s<i)&&(r=o,i=s)}}catch(e){a.e(e)}finally{a.f()}return r||null}},{key:`distinct`,value:function(e){for(var t=this._data,n=Bp(Lw(t).call(t)),r=[],i=0,a=0,o=n.length;a<o;a++){for(var s=n[a],c=t.get(s)[e],l=!1,u=0;u<i;u++)if(r[u]==c){l=!0;break}l||c===void 0||(r[i]=c,i++)}return r}},{key:`_addItem`,value:function(e){var t=function(e,t){return e[t]??(e[t]=UT()),e}(e,this._idProp),n=t[this._idProp];if(this._data.has(n))throw Error(`Cannot add item: item with id `+n+` already exists`);return this._data.set(n,t),++this.length,n}},{key:`_updateItem`,value:function(e){var t=e[this._idProp];if(t==null)throw Error(`Cannot update item: item has no id (item: `+gh(e)+`)`);var n=this._data.get(t);if(!n)throw Error(`Cannot update item: no item with id `+t+` found`);return this._data.set(t,$T($T({},n),e)),t}},{key:`stream`,value:function(e){if(e){var t=this._data;return new ZT({[kT]:()=>vC.mark((function n(){var r,i,a,o;return vC.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=eE(e),n.prev=1,r.s();case 3:if((i=r.n()).done){n.next=11;break}if(a=i.value,(o=t.get(a))==null){n.next=9;break}return n.next=9,[a,o];case 9:n.next=3;break;case 11:n.next=16;break;case 13:n.prev=13,n.t0=n.catch(1),r.e(n.t0);case 16:return n.prev=16,r.f(),n.finish(16);case 19:case`end`:return n.stop()}}),n,null,[[1,13,16,19]])}))()})}var n;return new ZT({[kT]:gd(n=LT(this._data)).call(n,this._data)})}}]),r}(KT);function iE(e,t){var n=Vp!==void 0&&Zf(e)||e[`@@iterator`];if(!n){if(tm(e)||(n=function(e,t){var n;if(e){if(typeof e==`string`)return aE(e,t);var r=qp(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return Jf(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return aE(e,t)}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
49
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function aE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oE(e){var t=function(){if(typeof Reflect>`u`||!sv||sv.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(sv(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Vv(e);if(t){var i=Vv(this).constructor;n=sv(r,arguments,i)}else n=r.apply(this,arguments);return Rv(this,n)}}var sE=function(e){Lv(r,e);var n=oE(r);function r(e,i){var a,o;return t(this,r),Yu(W(o=n.call(this)),`length`,0),Yu(W(o),`_ids`,new qT),o._options=i||{},o._listener=gd(a=o._onEvent).call(a,W(o)),o.setData(e),o}return Ju(r,[{key:`idProp`,get:function(){return this.getDataSet().idProp}},{key:`setData`,value:function(e){if(this._data){this._data.off&&this._data.off(`*`,this._listener);var t=this._data.getIds({filter:Rd(this._options)}),n=this._data.get(t);this._ids.clear(),this.length=0,this._trigger(`remove`,{items:t,oldData:n})}if(e!=null){this._data=e;for(var r=this._data.getIds({filter:Rd(this._options)}),i=0,a=r.length;i<a;i++){var o=r[i];this._ids.add(o)}this.length=r.length,this._trigger(`add`,{items:r})}else this._data=new rE;this._data.on&&this._data.on(`*`,this._listener)}},{key:`refresh`,value:function(){for(var e=this._data.getIds({filter:Rd(this._options)}),t=Bp(this._ids),n={},r=[],i=[],a=[],o=0,s=e.length;o<s;o++){var c=e[o];n[c]=!0,this._ids.has(c)||(r.push(c),this._ids.add(c))}for(var l=0,u=t.length;l<u;l++){var d=t[l],f=this._data.get(d);f==null?console.error(`If you see this, report it please.`):n[d]||(i.push(d),a.push(f),this._ids.delete(d))}this.length+=r.length-i.length,r.length&&this._trigger(`add`,{items:r}),i.length&&this._trigger(`remove`,{items:i,oldData:a})}},{key:`get`,value:function(e,t){if(this._data==null)return null;var n,r=null;WT(e)||tm(e)?(r=e,n=t):n=e;var i=oh({},this._options,n),a=Rd(this._options),o=n&&Rd(n);return a&&o&&(i.filter=function(e){return a(e)&&o(e)}),r==null?this._data.get(i):this._data.get(r,i)}},{key:`getIds`,value:function(e){if(this._data.length){var t,n=Rd(this._options),r=e==null?null:Rd(e);return t=r?n?function(e){return n(e)&&r(e)}:r:n,this._data.getIds({filter:t,order:e&&e.order})}return[]}},{key:`forEach`,value:function(e,t){if(this._data){var n,r,i=Rd(this._options),a=t&&Rd(t);r=a?i?function(e){return i(e)&&a(e)}:a:i,hm(n=this._data).call(n,e,{filter:r,order:t&&t.order})}}},{key:`map`,value:function(e,t){if(this._data){var n,r,i=Rd(this._options),a=t&&Rd(t);return r=a?i?function(e){return i(e)&&a(e)}:a:i,Wd(n=this._data).call(n,e,{filter:r,order:t&&t.order})}return[]}},{key:`getDataSet`,value:function(){return this._data.getDataSet()}},{key:`stream`,value:function(e){var t;return this._data.stream(e||{[kT]:gd(t=Lw(this._ids)).call(t,this._ids)})}},{key:`dispose`,value:function(){var e;(e=this._data)!=null&&e.off&&this._data.off(`*`,this._listener);var t,n=`This data view has already been disposed of.`,i={get:function(){throw Error(n)},set:function(){throw Error(n)},configurable:!1},a=iE(em(r.prototype));try{for(a.s();!(t=a.n()).done;){var o=t.value;Av(this,o,i)}}catch(e){a.e(e)}finally{a.f()}}},{key:`_onEvent`,value:function(e,t,n){if(t&&t.items&&this._data){var r=t.items,i=[],a=[],o=[],s=[],c=[],l=[];switch(e){case`add`:for(var u=0,d=r.length;u<d;u++){var f=r[u];this.get(f)&&(this._ids.add(f),i.push(f))}break;case`update`:for(var p=0,m=r.length;p<m;p++){var h=r[p];this.get(h)?this._ids.has(h)?(a.push(h),c.push(t.data[p]),s.push(t.oldData[p])):(this._ids.add(h),i.push(h)):this._ids.has(h)&&(this._ids.delete(h),o.push(h),l.push(t.oldData[p]))}break;case`remove`:for(var g=0,_=r.length;g<_;g++){var v=r[g];this._ids.has(v)&&(this._ids.delete(v),o.push(v),l.push(t.oldData[g]))}}this.length+=i.length-o.length,i.length&&this._trigger(`add`,{items:i},n),a.length&&this._trigger(`update`,{items:a,oldData:s,data:c},n),o.length&&this._trigger(`remove`,{items:o,oldData:l},n)}}}]),r}(KT);function cE(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof t.add==`function`&&typeof t.clear==`function`&&typeof t.distinct==`function`&&typeof hm(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof Wd(t)==`function`&&typeof t.max==`function`&&typeof t.min==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.remove==`function`&&typeof t.setOptions==`function`&&typeof t.stream==`function`&&typeof t.update==`function`&&typeof t.updateOnly==`function`}e.DELETE=I_,e.DataSet=rE,e.DataStream=ZT,e.DataView=sE,e.Queue=GT,e.createNewDataPipeFrom=function(e){return new cf(e)},e.isDataSetLike=cE,e.isDataViewLike=function(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof hm(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof Wd(t)==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.stream==`function`&&cE(e,t.getDataSet())}}))}))(),se=ae(),ce=c(),j=e(r(),1);function le(e){let t=new Map,n=e=>t.set(e,(t.get(e)??0)+1);for(let t of e)t.from===t.to?n(t.from):(n(t.from),n(t.to));return t}function ue(e,t=14,n=40,r=25){if(e<=0)return t;let i=Math.min(1,Math.sqrt(e/r));return Math.round(t+(n-t)*i)}var de=ne();function fe(e){let t=new Map;for(let n of e){let e=(0,de.pickDisplayLabel)(n.labels);e&&t.set(e,(t.get(e)??0)+1)}return[...t.entries()].map(([e,t])=>({label:e,count:t,colour:(0,de.colourForLabel)(e),shape:(0,de.shapeForLabel)(e)})).sort((e,t)=>e.label.localeCompare(t.label))}var pe=new Set([`Conversation`,`AdminConversation`,`PublicConversation`]),me=/^(\d{4}-\d{2}-\d{2})T/,he=24;function ge(e){let t=e.match(me);return t?t[1]:null}function _e(e,t){if(e.length===0)return``;let n=e.split(/\s+/).filter(e=>e.length>0);if(n.length===0)return``;if(n.length===1){let e=n[0];return e.length<=he?e:e.slice(0,he-1)+`…`}let r=[],i=0;for(;r.length<t&&i<n.length;){let e=``;for(;i<n.length;){let t=e.length===0?n[i]:`${e} ${n[i]}`;if(t.length<=he)e=t,i++;else break}e.length===0&&(e=n[i].slice(0,he-1)+`…`,i++),r.push(e)}if(i<n.length&&r.length>0){let e=n.slice(i).join(` `),t=r.length-1;r[t]=(r[t].length===0?e:`${r[t]} ${e}`).slice(0,he-1)+`…`}return r.join(`
|
|
50
|
+
`)}function ve(e){return _e(e,2)}function ye(e,t){let n=e.labels[0];if(!n||!pe.has(n)||t<.7)return(0,de.pickShortLabel)(e);let r=ve((0,de.pickDisplayName)(e));if(t<1.3)return r;let i=e.properties,a=typeof i.createdAt==`string`?i.createdAt:``,o=typeof i.messageCount==`number`?i.messageCount:null;if(a.length===0||o===null)return r;let s=ge(a);return s===null?r:`${r}\n${s} · ${o} msgs`}var be=new Set([`Person`,`Organization`,`Concept`]),xe=80;function M(e,t){let n=(0,de.pickDisplayName)(e);if(t<1.3)return _e(n,3);let r=n.length<=24?n:n.slice(0,23)+`…`,i=e.properties.compiledTruth;if(typeof i!=`string`||i.length===0)return _e((0,de.pickDisplayName)(e),3);let a=_e(i.length>xe?i.slice(0,xe-1)+`…`:i,2);return a.length===0?r:`${r}\n${a}`}function N(e,t){if(t<.7)return(0,de.pickShortLabel)(e);let n=e.labels[0];return n&&pe.has(n)?ye(e,t):n&&be.has(n)?M(e,t):_e((0,de.pickDisplayName)(e),3)}function P(e){let t=e.properties,n=typeof t.createdAt==`string`?t.createdAt:``,r=typeof t.updatedAt==`string`?t.updatedAt:``,i=e.labels.join(` · `);return[(0,de.pickDisplayName)(e),i,`id: ${e.id}`,n?`createdAt: ${n}`:``,r?`updatedAt: ${r}`:``].filter(e=>e.length>0).join(`
|
|
51
|
+
`)}function Se(e){let{node:t,degree:n,revealed:r}=e,i=e.scale??1,a=t.labels[0]??`Unknown`,o=(0,w.resolveNodeColour)(t.labels),s=o.displayLabel,c=o.colour,l=s??a,u=(0,w.nodeImageDataUri)(l),d=u===null?l:null,f=ue(n),p=r?N(t,i):``,m=P(t),h=e.position?{x:e.position.x,y:e.position.y,physics:!1}:{},g;return g=t.trashed?u===null?{id:t.id,label:p,title:m,color:{background:`${c}40`,border:c},borderWidth:2,shapeProperties:{borderDashes:[6,4]},shape:(0,w.shapeForLabel)(l),size:f,group:a,...h}:{id:t.id,label:p,title:m,shape:`image`,image:u,size:f,opacity:.35,group:a,...h}:u===null?{id:t.id,label:p,title:m,color:c,shape:(0,w.shapeForLabel)(l),size:f,group:a,...h}:{id:t.id,label:p,title:m,shape:`image`,image:u,size:f,group:a,...h},{visNode:g,iconFallbackLabel:d}}function Ce(e,t){let n=Object.keys(e).sort(),r=Object.keys(t).sort();if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(n[i]!==r[i]||JSON.stringify(e[n[i]])!==JSON.stringify(t[r[i]]))return!1;return!0}function we(e,t){if(!!e.trashed!=!!t.trashed||e.labels.length!==t.labels.length)return!1;for(let n=0;n<e.labels.length;n++)if(e.labels[n]!==t.labels[n])return!1;return Ce(e.properties,t.properties)}function Te(e,t){let n=[],r=[],i=new Set;for(let a of t){i.add(a.id);let t=e.get(a.id);t===void 0?n.push(a):we(t,a)||r.push(a)}let a=[];for(let t of e.keys())i.has(t)||a.push(t);return{added:n,updated:r,removed:a}}function F(e,t){let n=[],r=new Set;for(let i of t)r.add(i.id),e.has(i.id)||n.push(i);let i=[];for(let t of e.keys())r.has(t)||i.push(t);return{added:n,removed:i}}function I(e,t){return e.added.length>0||e.updated.length>0||e.removed.length>0||t.added.length>0||t.removed.length>0}function Ee(e){let t=new URLSearchParams(e),n=t.get(`nodeId`);if(n)return{kind:`focus`,nodeId:n,nodeLabel:t.get(`label`)};let r=t.get(`label`);return r?{kind:`labels`,labels:[r]}:null}function De(e){return!e.inNeighbourhood&&!e.searchActive&&e.selectedLabelsCount===0&&e.topLevelTotal!==null&&e.nodeCount>0}function Oe(e,t){let n=t===1?`node`:`nodes`;return`Showing ${e.toLocaleString()} of ${t.toLocaleString()} top-level ${n}`}function ke(e){return typeof e.total==`number`?e.total:null}function Ae(e){return(e.loading||e.rendering)&&!e.searchActive}function je(e){return!e.inNeighbourhood&&!e.searchActive}function Me(e,t){let n=`/api/admin/graph-subgraph`,r=t.includeAgentActions?`&includeAgentActions=1`:``;if(e.kind===`neighbourhood`){let i=t.search&&t.search.q?`&q=${encodeURIComponent(t.search.q)}&limit=${t.search.limit}`:``;return`${n}?mode=neighbourhood&elementId=${encodeURIComponent(e.rootElementId)}${r}${i}`}let i=e.includeTrashed?`&includeTrashed=1`:``;return e.selectedLabels.length===0?`${n}?mode=default&topLevel=1${i}${r}`:`${n}?mode=default&labels=${encodeURIComponent(e.selectedLabels.join(`,`))}${i}${r}`}function Ne(e,t){return e.length<10?[...e,t]:[e[0],...e.slice(e.length-8),t]}function Pe(e){return e.length<=1?e:e.slice(0,-1)}function Fe(e){return[e]}function Ie(e){let t=e[e.length-1];return t.kind===`filter`?`f:${[...t.selectedLabels].sort().join(`,`)}:${t.includeTrashed?1:0}:${t.includeAgentActions?1:0}`:`n:${t.rootElementId}`}function Le(e){let t=e[0];if(t.kind!==`filter`)throw Error(`view-stack invariant: root must be filter view`);return t}var Re=`admin-sessions`;function ze(){if(typeof window>`u`)return null;if(typeof BroadcastChannel>`u`)return console.warn(`[admin-sessions/broadcast] unsupported — manual refresh only`),null;try{return new BroadcastChannel(Re)}catch(e){return console.warn(`[admin-sessions/broadcast] ctor failed: ${e instanceof Error?e.message:String(e)} — manual refresh only`),null}}function Be(e){let t=ze();if(t)try{let n={type:`mutated`,reason:e};t.postMessage(n)}catch(e){console.warn(`[admin-sessions/broadcast] postMessage failed: ${e instanceof Error?e.message:String(e)}`)}finally{try{t.close()}catch{}}}function Ve(e){return e.trashed===!0?`skip-trashed`:`pivot`}function He(e,t,n,r){let i=[],a=[];for(let o of e){let e=t.get(o.nodeId);if(!e)continue;a.push(o.nodeId);let{colour:s}=n(e.labels),c=e.trashed?`${s}40`:s;i.push({id:o.nodeId,borderWidth:3,color:{background:c,border:r}})}return{updates:i,inWindow:a}}function Ue(e,t){let n=t.length>0?new Set(t):null,r=new Map,i=new Set,a=[];for(let t of e)n&&!t.labels.some(e=>n.has(e))||r.set(t.nodeId,{id:t.nodeId,labels:t.labels,properties:t.properties});for(let t of e)if(r.has(t.nodeId))for(let e of t.related){if(n&&!e.labels.some(e=>n.has(e)))continue;r.has(e.nodeId)||r.set(e.nodeId,{id:e.nodeId,labels:e.labels,properties:e.properties});let[o,s]=e.direction===`outgoing`?[t.nodeId,e.nodeId]:[e.nodeId,t.nodeId],c=`${o}|${s}|${e.relationship}`;i.has(c)||(i.add(c),a.push({id:c,from:o,to:s,type:e.relationship}))}return{nodes:[...r.values()],edges:a}}var We=2e3;function Ge(e){let t=typeof e==`number`?e:Number(e);return!Number.isFinite(t)||t<=0?100:Math.min(Math.max(Math.floor(t),1),We)}function Ke(e,t,n,r){let i=encodeURIComponent(t.join(`,`));return`/api/admin/graph-search?q=${encodeURIComponent(e)}&labels=${i}&limit=${n}${r?`&threshold=0`:``}`}var qe={solver:`forceAtlas2Based`,forceAtlas2Based:{gravitationalConstant:-50,centralGravity:.01,springLength:100,springConstant:.08,damping:.4,avoidOverlap:0},stabilization:{iterations:2e3}},Je=220,Ye=3;function Xe(e){if(!(e.nodes.length<=5))return{physics:qe,nodePositions:new Map};let t=new Map,n=(Ye-1)*Je/2,r=(Math.ceil(e.nodes.length/Ye)-1)*Je/2;for(let i=0;i<e.nodes.length;i++){let a=i%Ye,o=Math.floor(i/Ye);t.set(e.nodes[i].id,{x:a*Je-n,y:o*Je-r})}return{physics:!1,nodePositions:t}}function Ze(e,t){let n=(t.t-e.t)/1e3;if(n<=0)return 0;let r=0,i=0;for(let n of Object.keys(t.positions)){let a=e.positions[n];if(!a)continue;let o=t.positions[n];r+=Math.hypot(o.x-a.x,o.y-a.y),i++}return i===0?0:r/i/n}function Qe(e,t,n){if(t>n.threshold)return{belowCount:0,freeze:!1};let r=e+1;return{belowCount:r,freeze:r>=n.needed}}function $e(e,t){let n=Date.now(),r=null,i=0,a=null,o=()=>{a!==null&&(clearInterval(a),a=null)},s=(r,i,a)=>{o();try{e.setOptions({physics:!1})}catch{}t.report?.({avgMotion:r,settleMs:Date.now()-n,capped:a,nodeCount:i})};return a=setInterval(()=>{let t;try{t=e.getPositions()}catch{o();return}let a={t:Date.now(),positions:t},c=Object.keys(t).length;if(r){let e=Ze(r,a),t=Qe(i,e,{threshold:5,needed:2});if(i=t.belowCount,t.freeze){s(e,c,!1);return}if(Date.now()-n>=3e4){s(e,c,!0);return}}r=a},250),o}var et=`graph-side-panel-size`;function tt(e,t){let n=Math.max(280,t.maxWidth),r=Math.max(240,t.maxHeight),i=Math.min(Math.max(e.width,280),n),a=Math.min(Math.max(e.height,240),r);return{width:i,height:a,clampedW:i!==e.width,clampedH:a!==e.height}}function nt(e){try{localStorage.setItem(et,JSON.stringify({width:e.width,height:e.height}))}catch{}}function rt(){try{let e=localStorage.getItem(et);if(!e)return{size:null,source:`default`};let t=JSON.parse(e);return t&&typeof t==`object`&&typeof t.width==`number`&&typeof t.height==`number`&&Number.isFinite(t.width)&&Number.isFinite(t.height)?{size:{width:t.width,height:t.height},source:`storage`}:{size:null,source:`default`}}catch{return{size:null,source:`default`}}}function it(e){return typeof e==`string`?/^https?:\/\/\S+$/i.test(e.trim()):!1}function at(e){let t=t=>{let n=e[t];if(n&&typeof n==`object`&&`low`in n){let e=n.low;return typeof e==`number`?e:null}return null},n=t(`year`),r=t(`month`),i=t(`day`);if(n===null||r===null||i===null)return null;let a=`${String(n).padStart(4,`0`)}-${String(r).padStart(2,`0`)}-${String(i).padStart(2,`0`)}`;if(!(`hour`in e))return a;let o=t(`hour`),s=t(`minute`),c=t(`second`);return o===null||s===null||c===null?a:`${a} ${String(o).padStart(2,`0`)}:${String(s).padStart(2,`0`)}:${String(c).padStart(2,`0`)}`}function ot(e){if(e==null)return``;if(Array.isArray(e))return e.length>8?`[${e.length} items]`:e.map(String).join(`, `);if(typeof e==`object`){if(`year`in e&&`month`in e&&`day`in e&&typeof e.year==`object`){let t=at(e);if(t)return t}return JSON.stringify(e)}return String(e)}var L=s(),st=76,ct=36,lt=16,ut=520;function dt(e){let t=e?.offsetParent??null,n=t?.clientWidth??0,r=t?.clientHeight??0;return{maxWidth:n-ct-lt,maxHeight:r-st-lt}}function ft(e){return typeof e==`string`?e:ot(e)}function pt(e){return it(e)?(0,L.jsx)(`a`,{className:`graph-side-link`,href:e,target:`_blank`,rel:`noopener noreferrer`,children:e}):ot(e)}function mt({value:e,label:t,field:n}){let{status:r,copy:a}=T({onResult:e=>{e?console.log(`[graph-panel] op=copy result=ok field=${n}`):console.warn(`[graph-panel] op=copy result=error field=${n} msg=clipboard-write-failed`)}}),o=r===`ok`?`Copied`:r===`fail`?`Copy failed`:`Copy ${t}`;return(0,L.jsxs)(`button`,{type:`button`,className:`graph-side-copy${r===`ok`?` graph-side-copy-ok`:``}${r===`fail`?` graph-side-copy-fail`:``}`,onClick:()=>a(e),"aria-label":o,title:o,children:[r===`ok`?(0,L.jsx)(i,{size:12}):(0,L.jsx)(S,{size:12}),r!==`idle`&&(0,L.jsx)(`span`,{className:`graph-side-copy-feedback`,children:r===`ok`?`Copied`:`Copy failed`})]})}function ht({node:e,edges:t,nodesById:n,adminFetch:r,onClose:i,onRestored:o,onTrashed:s}){let c=Object.entries(e.properties).filter(([,e])=>e!=null),u=t.filter(t=>t.from===e.id||t.to===e.id),f=u.length>0,[p,m]=(0,j.useState)(!1),[h,g]=(0,j.useState)(null),[v,y]=(0,j.useState)(!1),[b,x]=(0,j.useState)(null),[S,ee]=(0,j.useState)(`properties`),te=_(`(max-width: 640px)`),w=(0,j.useRef)(null),ne=(0,j.useRef)(rt()),[T,E]=(0,j.useState)(()=>ne.current.size??{width:280,height:ut}),D=(0,j.useRef)(!1),O=(0,j.useRef)(null);(0,j.useEffect)(()=>()=>{O.current?.()},[]),(0,j.useEffect)(()=>{m(!1),g(null),y(!1),x(null),ee(`properties`)},[e.id]),(0,j.useLayoutEffect)(()=>{if(D.current)return;D.current=!0;let e=dt(w.current),t=tt(ne.current.size??{width:280,height:ut},e);E({width:t.width,height:t.height}),console.log(`[graph-panel] op=restore-size w=${t.width} h=${t.height} source=${ne.current.source}`)},[]);let k=(0,j.useCallback)(e=>{e.preventDefault();let t=e.clientX,n=e.clientY,r=T.width,i=T.height,a=dt(w.current);try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}let o={width:r,height:i,clampedW:!1,clampedH:!1},s=e=>{o=tt({width:r+(t-e.clientX),height:i+(e.clientY-n)},a),E({width:o.width,height:o.height})},c=()=>{window.removeEventListener(`pointermove`,s),window.removeEventListener(`pointerup`,l),window.removeEventListener(`pointercancel`,l),O.current=null},l=()=>{c(),nt({width:o.width,height:o.height}),console.log(`[graph-panel] op=resize w=${o.width} h=${o.height} clampedW=${o.clampedW} clampedH=${o.clampedH}`)};window.addEventListener(`pointermove`,s),window.addEventListener(`pointerup`,l),window.addEventListener(`pointercancel`,l),O.current=c},[T.width,T.height]),re=(0,j.useCallback)(()=>{m(!0),g(null),r(`/api/admin/graph-restore`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({elementId:e.id})}).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);o()}).catch(e=>{g(e instanceof Error?e.message:String(e)),m(!1)})},[e.id,o,r]),ie=(0,j.useCallback)(()=>{y(!0),x(null),r(`/api/admin/graph-delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({elementId:e.id,by:`graph-side-panel-trash`})}).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);s()}).catch(e=>{x(e instanceof Error?e.message:String(e)),y(!1)})},[e.id,s,r]),A=S===`connections`&&f?`connections`:`properties`,ae=te?void 0:{width:`${T.width}px`,height:`${T.height}px`};return(0,L.jsxs)(`aside`,{ref:w,className:`graph-side-panel${e.trashed?` graph-side-panel-trashed`:``}`,style:ae,children:[!te&&(0,L.jsx)(`div`,{className:`graph-side-resize-handle`,role:`separator`,"aria-label":`Resize panel`,"aria-orientation":`vertical`,onPointerDown:k}),(0,L.jsxs)(`header`,{className:`graph-side-header`,children:[(0,L.jsx)(`div`,{children:(()=>{if(e.labels.some(e=>pe.has(e))){let t=(0,de.pickDisplayName)(e),n=e.properties.createdAt,r=typeof n==`string`?n:``,i=r?(0,de.formatRunTimestamp)(r):null,a=e.labels.join(` · `)+(e.trashed?` · Trashed`:``)+` · ${e.id}`;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`h2`,{className:`graph-side-name`,title:t,children:t}),i&&(0,L.jsx)(`div`,{className:`graph-side-created`,children:i}),(0,L.jsxs)(`div`,{className:`graph-side-meta`,children:[(0,L.jsx)(`span`,{children:a}),(0,L.jsx)(mt,{value:e.id,label:`id`,field:`id`})]})]})}return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`graph-side-labels`,children:[e.labels.join(` · `),e.trashed?` · Trashed`:``]}),(0,L.jsxs)(`div`,{className:`graph-side-id-row`,children:[(0,L.jsx)(`span`,{className:`graph-side-id`,children:e.id}),(0,L.jsx)(mt,{value:e.id,label:`id`,field:`id`})]})]})})()}),(0,L.jsx)(`button`,{type:`button`,className:`graph-side-close`,onClick:i,"aria-label":`Close`,children:(0,L.jsx)(d,{size:14})})]}),e.trashed&&(0,L.jsxs)(`dl`,{className:`graph-side-props graph-side-trash-meta`,children:[(0,L.jsxs)(`div`,{className:`graph-side-prop`,children:[(0,L.jsx)(`dt`,{children:`trashedAt`}),(0,L.jsx)(`dd`,{children:ot(e.properties.trashedAt)})]}),(0,L.jsxs)(`div`,{className:`graph-side-prop`,children:[(0,L.jsx)(`dt`,{children:`trashedBy`}),(0,L.jsx)(`dd`,{children:ot(e.properties.trashedBy)})]})]}),(0,L.jsxs)(`div`,{className:`graph-side-tabs`,role:`tablist`,"aria-label":`Node detail sections`,children:[(0,L.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":A===`properties`,className:`graph-side-tab${A===`properties`?` graph-side-tab-on`:``}`,onClick:()=>ee(`properties`),children:`Properties`}),f&&(0,L.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":A===`connections`,className:`graph-side-tab${A===`connections`?` graph-side-tab-on`:``}`,onClick:()=>ee(`connections`),children:[`Connections (`,u.length,`)`]})]}),(0,L.jsxs)(`div`,{className:`graph-side-body`,children:[A===`properties`&&(0,L.jsxs)(`dl`,{className:`graph-side-props`,children:[c.length===0&&(0,L.jsx)(`div`,{className:`graph-side-empty`,children:`No properties.`}),c.map(([e,t])=>(0,L.jsxs)(`div`,{className:`graph-side-prop`,children:[(0,L.jsx)(`dt`,{children:e}),(0,L.jsxs)(`dd`,{children:[(0,L.jsx)(`span`,{className:`graph-side-prop-value`,children:pt(t)}),(0,L.jsx)(mt,{value:ft(t),label:e,field:`prop`})]})]},e))]}),A===`connections`&&f&&(0,L.jsx)(`section`,{className:`graph-side-edges`,children:u.map(t=>{let r=t.from===e.id,i=r?t.to:t.from,a=n.get(i),o=a?(0,de.pickShortLabel)(a):i,s=r?`→`:`←`,c=Object.entries(t.properties??{}).filter(([,e])=>e!=null&&e!==``);return(0,L.jsxs)(`div`,{className:`graph-side-edge`,children:[(0,L.jsxs)(`div`,{className:`graph-side-edge-header`,children:[(0,L.jsx)(`span`,{className:`graph-side-edge-type`,children:t.type}),(0,L.jsx)(`span`,{className:`graph-side-edge-arrow`,children:s}),(0,L.jsx)(`span`,{className:`graph-side-edge-other`,title:o,children:o})]}),c.length>0&&(0,L.jsx)(`dl`,{className:`graph-side-edge-props`,children:c.map(([e,t])=>(0,L.jsxs)(`div`,{className:`graph-side-prop`,children:[(0,L.jsx)(`dt`,{children:e}),(0,L.jsxs)(`dd`,{children:[(0,L.jsx)(`span`,{className:`graph-side-prop-value`,children:pt(t)}),(0,L.jsx)(mt,{value:ft(t),label:e,field:`edge-prop`})]})]},e))})]},t.id)})})]}),e.trashed&&(0,L.jsxs)(`footer`,{className:`graph-side-footer`,children:[!p&&!h&&(0,L.jsxs)(`button`,{type:`button`,className:`graph-side-restore`,onClick:re,children:[(0,L.jsx)(C,{size:14}),` Restore`]}),p&&(0,L.jsx)(`div`,{className:`graph-delete-confirm`,children:(0,L.jsxs)(`p`,{children:[(0,L.jsx)(a,{size:14,className:`spin`}),` Restoring…`]})}),h&&(0,L.jsxs)(`div`,{className:`graph-delete-confirm graph-delete-confirm-error`,children:[(0,L.jsxs)(`p`,{children:[`Restore failed: `,h]}),(0,L.jsxs)(`div`,{className:`graph-delete-confirm-buttons`,children:[(0,L.jsx)(`button`,{type:`button`,className:`graph-delete-confirm-cancel`,onClick:()=>{g(null)},children:`Close`}),(0,L.jsx)(`button`,{type:`button`,className:`graph-delete-confirm-do`,onClick:re,children:`Retry`})]})]})]}),!e.trashed&&(0,L.jsxs)(`footer`,{className:`graph-side-footer`,children:[!v&&!b&&(0,L.jsxs)(`button`,{type:`button`,className:`graph-side-trash`,onClick:ie,children:[(0,L.jsx)(l,{size:14}),` Trash`]}),v&&(0,L.jsx)(`div`,{className:`graph-delete-confirm`,children:(0,L.jsxs)(`p`,{children:[(0,L.jsx)(a,{size:14,className:`spin`}),` Trashing…`]})}),b&&(0,L.jsxs)(`div`,{className:`graph-delete-confirm graph-delete-confirm-error`,children:[(0,L.jsxs)(`p`,{children:[`Trash failed: `,b]}),(0,L.jsxs)(`div`,{className:`graph-delete-confirm-buttons`,children:[(0,L.jsx)(`button`,{type:`button`,className:`graph-delete-confirm-cancel`,onClick:()=>{x(null)},children:`Close`}),(0,L.jsx)(`button`,{type:`button`,className:`graph-delete-confirm-do`,onClick:ie,children:`Retry`})]})]})]})]})}var gt=`graph-shell`,_t=`graph-shell--fullscreen`;function vt(e,t){return t&&e?`${gt} ${_t}`:gt}function yt(e){return e}function bt(e){return e.isFullscreen&&!e.filterOpen}function xt(e){return e<.7?`compact`:e<1.3?`wrapped`:`detailed`}var St=150,Ct=`#FBBF24`;function wt(e,t,n){let r=getComputedStyle(e).getPropertyValue(t).trim();return r.length>0?r:n}var Tt=`#0F172A`,Et=`#475569`,Dt=`#CBD5E1`;function Ot(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}var kt=`maxy-graph-search-limit-v1`,At=250,jt=12e3,Mt=1200;function Nt(){let[e,t]=(0,j.useState)(null),[n,r]=(0,j.useState)(!1),[i,o]=(0,j.useState)(void 0),[s,c]=(0,j.useState)(null),[l,u]=(0,j.useState)(void 0),[d,p]=(0,j.useState)(null),[g,_]=(0,j.useState)(null),v=(0,j.useMemo)(()=>typeof window>`u`?null:Ee(window.location.search),[]),b=(0,j.useMemo)(()=>v?.kind===`focus`?{nodeId:v.nodeId,nodeLabel:v.nodeLabel}:null,[v]),x=(0,j.useMemo)(()=>v?.kind===`labels`?v.labels:null,[v]);(0,j.useEffect)(()=>{b&&zt(`deep-link`,{nodeId:b.nodeId.length>16?b.nodeId.slice(0,16)+`…`:b.nodeId,label:b.nodeLabel??``})},[b]),(0,j.useEffect)(()=>{!x||x.length===0||zt(`label-seed`,{label:x[0]})},[x]),(0,j.useEffect)(()=>{let e=!1,n=null;try{n=sessionStorage.getItem(`maxy-admin-session-key`)}catch{}if(!n){t(null),r(!0);return}return fetch(`/api/admin/session?session_key=${encodeURIComponent(n)}`).then(async i=>{if(!e){if(i.status===401){try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`;return}if(i.ok)try{let e=await i.json();typeof e.businessName==`string`&&o(e.businessName),e.sessionId!==void 0&&c(e.sessionId??null),_(e.role??null),u(e.userName===void 0?null:e.userName),p(e.avatar??null)}catch{}t(n),r(!0)}}).catch(()=>{e||(t(n),r(!0))}),()=>{e=!0}},[]);let S=(0,j.useCallback)(()=>{try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`},[]),[ee,C]=(0,j.useState)(!1),te=(0,j.useCallback)(async()=>{C(!0);try{let e=await h();if(e){try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`}return e}finally{C(!1)}},[]);return n?e?(0,L.jsx)(f,{cacheKey:e,surface:`graph`,onSessionExpired:({code:e,path:t})=>{console.warn(`[admin-auth] outcome=session-expired-redirect code=${e} path=${t} surface=graph`);try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`},children:(0,L.jsx)(y,{cacheKey:e,businessName:i,sessionId:s,onLogout:S,onDisconnect:te,disconnecting:ee,userName:l,userAvatar:d,role:g,children:(0,L.jsxs)(`div`,{className:`data-page graph-page`,children:[(0,L.jsx)(`header`,{className:`data-header`,children:(0,L.jsxs)(`h1`,{className:`data-title`,children:[(0,L.jsx)(m,{size:18}),` Graph`]})}),(0,L.jsx)(`main`,{className:`graph-main`,children:(0,L.jsx)(It,{cacheKey:e,initialFocus:b,initialLabels:x,allowFullscreen:!0})})]})})}):(0,L.jsxs)(`div`,{className:`data-page`,children:[(0,L.jsx)(`header`,{className:`data-header`,children:(0,L.jsxs)(`h1`,{className:`data-title`,children:[(0,L.jsx)(m,{size:18}),` Graph`]})}),(0,L.jsxs)(`div`,{className:`data-empty`,children:[(0,L.jsx)(`p`,{children:`You are not signed in.`}),(0,L.jsxs)(`p`,{children:[`Open the `,(0,L.jsx)(`a`,{href:`/`,className:`data-link`,children:`main admin page`}),` and log in, then return here.`]})]})]}):(0,L.jsx)(`div`,{className:`data-page`,children:(0,L.jsxs)(`div`,{className:`data-loading`,children:[(0,L.jsx)(a,{size:18,className:`spin`}),` Loading…`]})})}var Pt={triangle:`7,1 13,13 1,13`,triangleDown:`1,1 13,1 7,13`,square:`2,2 12,2 12,12 2,12`,diamond:`7,1 13,7 7,13 1,7`,star:`7,1 8.8,5.2 13,5.2 9.6,8 10.9,12.4 7,9.7 3.1,12.4 4.4,8 1,5.2 5.2,5.2`,hexagon:`4,1.5 10,1.5 13,7 10,12.5 4,12.5 1,7`};function Ft({label:e,shape:t,colour:n}){let r=(0,w.nodeImageDataUri)(e);return r===null?(0,L.jsx)(`svg`,{className:`graph-legend-swatch`,viewBox:`0 0 14 14`,width:`14`,height:`14`,"aria-hidden":`true`,children:t===`dot`?(0,L.jsx)(`circle`,{cx:`7`,cy:`7`,r:`6`,fill:n}):(0,L.jsx)(`polygon`,{points:Pt[t],fill:n})}):(0,L.jsx)(`img`,{className:`graph-legend-swatch`,src:r,width:14,height:14,alt:``,"aria-hidden":`true`})}function It({cacheKey:e,initialFocus:t=null,initialLabels:n=null,allowFullscreen:r=!1}){let{adminFetch:i,cacheKey:s,sessionRefetchNonce:c}=o({initialCacheKey:e,surface:`graph`}),f=(0,j.useRef)(null),m=(0,j.useRef)(null),[h,_]=(0,j.useState)(!1),y=(0,j.useRef)(null),S=(0,j.useRef)(null),C=(0,j.useRef)(null),ne=(0,j.useRef)(null),T=(0,j.useRef)(new Map),A=(0,j.useRef)([]),ae=(0,j.useRef)(null),ce=(0,j.useRef)(null),de=(0,j.useRef)(null),pe=(0,j.useRef)([]),me=(0,j.useRef)(null),he=(0,j.useRef)(null),ge=(0,j.useRef)(null),_e=(0,j.useRef)(null),ve=(0,j.useRef)(!1),ye=(0,j.useRef)(new Set),be=(0,j.useCallback)(e=>{if(e===null)return;let t=ye.current;if(!t.has(e)){t.add(e);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`event`,source:`graph-style`,op:`icon-fallback`,distinctFallback:t.size,labels:Array.from(t).sort().join(`,`)}),keepalive:!0}).catch(()=>{})}catch{}}},[]),xe=(0,j.useRef)(!1),[M,P]=(0,j.useState)([{kind:`filter`,selectedLabels:[],includeTrashed:!1,includeAgentActions:!1}]);(0,j.useEffect)(()=>{t?.nodeId&&P(e=>{let n=e[e.length-1];return n.kind===`neighbourhood`&&n.rootElementId===t.nodeId?e:[e[0],{kind:`neighbourhood`,rootElementId:t.nodeId,rootLabel:t.nodeLabel}]})},[t?.nodeId,t?.nodeLabel]);let Ce=n&&n.length>0?[...n].sort().join(`,`):null;(0,j.useEffect)(()=>{Ce&&(sn.current=!0,P([{kind:`filter`,selectedLabels:Ce.split(`,`),includeTrashed:!1,includeAgentActions:!1}]))},[Ce]);let[we,Ee]=(0,j.useState)(!1),[Re,ze]=(0,j.useState)(!1),[We,qe]=(0,j.useState)(null),[Je,Ye]=(0,j.useState)(null),[Ze,Qe]=(0,j.useState)(0),[et,tt]=(0,j.useState)(null),[nt,rt]=(0,j.useState)(null),[it,at]=(0,j.useState)(!1),[ot,st]=(0,j.useState)(!1),[ct,lt]=(0,j.useState)(null),[ut,dt]=(0,j.useState)(``),[ft,pt]=(0,j.useState)(``),[mt,gt]=(0,j.useState)(null),[_t,Nt]=(0,j.useState)(null),[Pt,It]=(0,j.useState)(()=>{if(typeof window>`u`)return 100;let e=window.localStorage.getItem(kt);return e?Ge(e):100}),[Bt,Vt]=(0,j.useState)(Pt),[Ht,Ut]=(0,j.useState)(`hybrid`),[Wt,Gt]=(0,j.useState)(0),[Kt,qt]=(0,j.useState)(!1),[Jt,Yt]=(0,j.useState)(0),[Xt,Zt]=(0,j.useState)(0),[Qt,$t]=(0,j.useState)([]),[en,tn]=(0,j.useState)({labels:[],includeTrashed:!1}),[nn,rn]=(0,j.useState)(!1),[an,on]=(0,j.useState)(!1),sn=(0,j.useRef)(!1),cn=(0,j.useRef)(null),ln=(0,j.useRef)(null),un=(0,j.useRef)(null),[dn,fn]=(0,j.useState)(null),[pn,mn]=(0,j.useState)(!1),hn=(0,j.useCallback)(e=>{let t=ln.current;if(!t)return;let n=t.getBoundingClientRect();un.current={dx:e.clientX-n.left,dy:e.clientY-n.top};try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}},[]),gn=(0,j.useCallback)(e=>{let t=un.current,n=ln.current,r=n?.offsetParent;if(!t||!n||!r)return;let i=r.getBoundingClientRect(),a=Math.max(0,r.clientWidth-n.offsetWidth),o=Math.max(0,r.clientHeight-n.offsetHeight);fn({x:Math.min(Math.max(0,e.clientX-i.left-t.dx),a),y:Math.min(Math.max(0,e.clientY-i.top-t.dy),o)})},[]),_n=(0,j.useCallback)(e=>{un.current=null;try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}},[]),vn=(0,j.useMemo)(()=>fe(T.current.values()),[Ze]);(0,j.useEffect)(()=>{let e=!1,t=i(`/api/admin/graph-labels-in-graph`).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return await e.json()}).catch(e=>{let t=e instanceof Error?e.message:String(e);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-labels-in-graph`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}return{labels:[]}}),n=i(`/api/admin/graph-default-view`).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return await e.json()}).catch(e=>{let t=e instanceof Error?e.message:String(e);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-default-view`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}return{labels:[],includeTrashed:!1}});return Promise.all([t,n]).then(([t,n])=>{if(!e&&($t(t.labels),tn(n),!sn.current)){sn.current=!0;let e=new Set(t.labels.map(e=>e.label)),r=n.labels.filter(t=>e.has(t));(r.length>0||n.includeTrashed)&&P(e=>[{kind:`filter`,selectedLabels:r,includeTrashed:n.includeTrashed,includeAgentActions:!1},...e.slice(1)])}}),()=>{e=!0}},[s,c,i]);let yn=M[0].kind===`filter`?M[0].includeAgentActions:!1;(0,j.useEffect)(()=>{if(!sn.current)return;let e=!1;return i(`/api/admin/graph-labels-in-graph?includeAgentActions=${yn?`1`:`0`}`).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return await e.json()}).then(t=>{e||$t(t.labels)}).catch(e=>{let t=e instanceof Error?e.message:String(e);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-labels-in-graph-refetch`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}}),()=>{e=!0}},[s,c,yn,Xt,i]),(0,j.useEffect)(()=>{if(!nn)return;let e=e=>{cn.current&&(cn.current.contains(e.target)||rn(!1))},t=e=>{e.key===`Escape`&&rn(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[nn]);let bn=(0,j.useCallback)((e,t)=>{try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:e,msg:t}),keepalive:!0}).catch(()=>{})}catch{}},[]),xn=(0,j.useCallback)(e=>{console.log(`[graph-fullscreen] op=exit reason=${e}`),_(!1)},[]);(0,j.useEffect)(()=>{if(!r||!h)return;let e=e=>{e.key===`Escape`&&bt({isFullscreen:h,filterOpen:nn})&&xn(`escape`)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r,h,nn,xn]);let Sn=(0,j.useRef)(h);(0,j.useEffect)(()=>{if(!r)return;let e=Sn.current!==h;if(Sn.current=h,!e)return;let t=requestAnimationFrame(()=>{let e=m.current;try{e?.redraw()}catch{}if(!h)return;let t=y.current?.getBoundingClientRect(),n=window.innerWidth,r=window.innerHeight,i=t?Math.round(t.width):0,a=t?Math.round(t.height):0;console.log(`[graph-fullscreen] op=enter viewportW=${n} viewportH=${r} overlayW=${i} overlayH=${a}`),t&&(t.width<n-2||t.height<r-2)&&bn(`graph-fullscreen-not-covering`,`op=enter viewportW=${n} viewportH=${r} overlayW=${i} overlayH=${a}`);try{let t=e?.canvas?.frame?.canvas,n=f.current;if(t&&n){let e=t.clientWidth,r=t.clientHeight,i=n.clientWidth,a=n.clientHeight;console.log(`[graph-fullscreen] op=resized canvasW=${e} canvasH=${r} containerW=${i} containerH=${a}`),(Math.abs(e-i)>2||Math.abs(r-a)>2)&&bn(`graph-fullscreen-canvas-mismatch`,`canvasW=${e} canvasH=${r} containerW=${i} containerH=${a}`)}}catch{}});return()=>cancelAnimationFrame(t)},[r,h,bn]);let Cn=(0,j.useCallback)(()=>{if(C.current)try{C.current.clear()}catch{}if(ne.current)try{ne.current.clear()}catch{}},[]),wn=(0,j.useCallback)((e,t)=>{lt(null),i(`/api/admin/graph-delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({elementId:e,by:`graph-drag-trash`})}).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);rt(null);try{m.current?.unselectAll()}catch{}P(e=>[Le(e)]),Yt(e=>e+1),Be(`graph-trash`)}).catch(n=>{let r=n instanceof Error?n.message:String(n);lt(`Failed to delete: ${r}`),st(!0),window.setTimeout(()=>st(!1),Mt);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-drag-delete`,elementId:e,label:t,msg:r}),keepalive:!0}).catch(()=>{})}catch{}})},[i]),Tn=(0,j.useCallback)(e=>{lt(null);let t=e.length;Promise.allSettled(e.map(e=>i(`/api/admin/graph-delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({elementId:e,by:`graph-drag-trash`})}).then(async t=>{let n=await t.json().catch(()=>({error:`HTTP ${t.status}`}));if(!t.ok)throw Error(n.error??`HTTP ${t.status}`);return e}))).then(e=>{let n=e.filter(e=>e.status===`rejected`);rt(null);try{m.current?.unselectAll()}catch{}if(P(e=>[Le(e)]),Yt(e=>e+1),Be(`graph-trash`),n.length>0){let e=t-n.length;lt(e===0?`Failed to delete ${t} node${t===1?``:`s`}.`:`Deleted ${e} of ${t}; ${n.length} failed.`),st(!0),window.setTimeout(()=>st(!1),Mt);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-drag-delete-batch`,total:t,failed:n.length}),keepalive:!0}).catch(()=>{})}catch{}}})},[i]),En=M[M.length-1],Dn=(0,j.useMemo)(()=>Ie(M),[M]),On=(0,j.useRef)(Dn);(0,j.useEffect)(()=>{On.current=Dn},[Dn]);let kn=(0,j.useRef)(M);(0,j.useEffect)(()=>{kn.current=M},[M]),(0,j.useEffect)(()=>{if(ft){ae.current?.abort(),ae.current=null;return}let e=window.setTimeout(()=>{ae.current?.abort();let e=new AbortController;ae.current=e,Ee(!0),console.log(`[graph-page] op=render-spinner state=shown reason=fetch-start`),qe(null),Ye(null),i(Me(En,{includeAgentActions:Le(M).includeAgentActions,search:null}),{signal:e.signal}).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(e.status===413)throw new Lt(t);if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);return t}).then(t=>{e.signal.aborted||(T.current=new Map(t.nodes.map(e=>[e.id,e])),Qe(t.nodes.length),tt(ke(t)),jn(t.nodes,t.edges))}).catch(t=>{if(!e.signal.aborted){if(ze(!1),t instanceof Lt){console.log(`[graph-page] op=render-spinner state=hidden reason=ceiling`),Ye(t.body),Qe(0),T.current=new Map,Cn();return}console.log(`[graph-page] op=render-spinner state=hidden reason=error`),qe(t instanceof Error?t.message:String(t))}}).finally(()=>{e.signal.aborted||Ee(!1)})},At);return()=>{window.clearTimeout(e)}},[s,Dn,Jt,c,ft,Bt]),(0,j.useEffect)(()=>{xe.current=we},[we]);let An=(0,j.useCallback)((e,t)=>{let n=C.current,r=ne.current;if(!n||!r||!m.current)return{added:0,updated:0,removed:0,edgesAdded:0,edgesRemoved:0,maxDegree:0};let i=Te(T.current,e),a=F(new Map(A.current.map(e=>[e.id,e])),t);if(!I(i,a))return{added:0,updated:0,removed:0,edgesAdded:0,edgesRemoved:0,maxDegree:0};let o=le(t),s=0;for(let e of o.values())e>s&&(s=e);let c=(()=>{try{return m.current.getScale()||1}catch{return 1}})();a.removed.length>0&&r.remove(a.removed);let l=new Set(e.map(e=>e.id)),u=a.added.filter(e=>e.type!==`PART_OF`||l.has(e.from)&&l.has(e.to)).map(e=>({id:e.id,from:e.from,to:e.to,label:e.type}));u.length>0&&r.add(u),i.removed.length>0&&n.remove(i.removed);let d=i.updated.map(e=>e.id),f=d.length>0?(()=>{try{return m.current.getPositions(d)}catch{return{}}})():{},p=new Set(i.added.map(e=>e.id)),h=[...i.added,...i.updated];for(let e of h){let{visNode:t,iconFallbackLabel:r}=Se({node:e,degree:o.get(e.id)??0,revealed:ve.current,scale:c,position:p.has(e.id)?void 0:f[e.id]});be(r),n.update(t)}let g=new Set(h.map(e=>e.id));for(let t of e){if(g.has(t.id))continue;let e=ue(o.get(t.id)??0),r=n.get(t.id);r&&r.size!==e&&n.update({id:t.id,size:e})}return T.current=new Map(e.map(e=>[e.id,e])),A.current=t,Qe(e.length),{added:i.added.length,updated:i.updated.length,removed:i.removed.length,edgesAdded:u.length,edgesRemoved:a.removed.length,maxDegree:s}},[Qe]);(0,j.useEffect)(()=>{if(En.kind!==`filter`||ft)return;let e=Me(En,{includeAgentActions:Le(M).includeAgentActions,search:null}),t=!1,n=null,r=(e,t)=>{try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`event`,source:`graph-poll`,op:e,view:En.kind,...t}),keepalive:!0}).catch(()=>{})}catch{}},a=()=>{if(document.hidden||xe.current)return;n?.abort();let a=new AbortController;n=a;let o=Date.now();i(e,{signal:a.signal}).then(e=>e.ok?e.json():null).then(e=>{if(t||a.signal.aborted||!e||!Array.isArray(e.nodes))return;let n=An(e.nodes,e.edges??[]),i=ke(e);tt(i),r(`tick`,{fetchMs:Date.now()-o,total:i,...n})}).catch(e=>{a.signal.aborted||r(`poll-error`,{msg:e instanceof Error?e.message:String(e)})})};r(`start`,{intervalMs:jt});let o=window.setInterval(a,jt),s=()=>{document.visibilityState===`visible`?(r(`resume`,{}),a()):r(`pause`,{})};return document.addEventListener(`visibilitychange`,s),()=>{t=!0,n?.abort(),window.clearInterval(o),document.removeEventListener(`visibilitychange`,s),r(`stop`,{})}},[s,Dn,ft,c,En.kind]),(0,j.useEffect)(()=>()=>{ae.current?.abort(),S.current?.(),S.current=null,m.current?.destroy(),m.current=null,_e.current!==null&&(clearTimeout(_e.current),_e.current=null)},[]);let jn=(0,j.useCallback)((e,t)=>{if(!f.current)return;ze(!0),A.current=t;let n=new Set([`Message`,`UserMessage`,`AssistantMessage`]),r=e=>e.labels.some(e=>n.has(e)),i=new Map,a=e.filter(r);if(a.length>0){let e=new Set(a.map(e=>e.id)),n=new Map,r=new Set;for(let i of t)i.type===`NEXT`&&e.has(i.from)&&e.has(i.to)&&(n.set(i.from,i.to),r.add(i.to));let o=[],s=new Set;for(let e of a){if(r.has(e.id))continue;let t=e.id;for(;t&&!s.has(t);)s.add(t),o.push(t),t=n.get(t)}for(let e of a)s.has(e.id)||(o.push(e.id),s.add(e.id));let c=f.current?.clientWidth??1200,l=Math.max(c-160,300),u=Math.max(Math.floor(l/150),2);o.forEach((e,t)=>{let n=t%u,r=Math.floor(t/u);i.set(e,{x:n*150,y:r*90})})}let o=le(t),s=0,c=e.map(e=>{(0,w.resolveNodeColour)(e.labels).driftCandidates;let t=o.get(e.id)??0;t>s&&(s=t);let{visNode:n,iconFallbackLabel:r}=Se({node:e,degree:t,revealed:ve.current,scale:1,position:i.get(e.id)});return be(r),n}),l=new Set(c.map(e=>e.id)),u=t.filter(e=>e.type!==`PART_OF`||l.has(e.from)&&l.has(e.to)).map(e=>({id:e.id,from:e.from,to:e.to,label:e.type})),d=Xe({nodes:e,edges:t});C.current=new oe.DataSet(d.nodePositions.size>0?c.map(e=>{if(e.x!==void 0||e.y!==void 0)return e;let t=d.nodePositions.get(e.id);return t?{...e,x:t.x,y:t.y,physics:!1}:e}):c),ne.current=new oe.DataSet(u);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`event`,source:`graph-style`,op:`degree-size`,nodes:c.length,maxDegree:s,minPx:14,maxPx:40}),keepalive:!0}).catch(()=>{})}catch{}let p=wt(f.current,`--accent-brand`,Tt),h=wt(f.current,`--border-strong`,Et),g=wt(f.current,`--border`,Dt),_={autoResize:!0,layout:{improvedLayout:!1,randomSeed:Ot(On.current)},physics:d.physics===!1?!1:{solver:d.physics.solver,forceAtlas2Based:d.physics.forceAtlas2Based,stabilization:d.physics.stabilization},nodes:{shape:`dot`,size:18,font:{color:`#1F2937`,size:12,face:`DM Sans, sans-serif`},scaling:{label:{enabled:!0,min:12,max:30,drawThreshold:0}},borderWidth:0,chosen:{node:e=>{e.size=Math.round(e.size*1.2),e.borderWidth=3,e.borderColor=p,e.shadow=!0,e.shadowColor=`rgba(15, 23, 42, 0.55)`,e.shadowSize=8,e.shadowX=0,e.shadowY=0},label:e=>{e.size=14}}},edges:{arrows:{to:{enabled:!0,scaleFactor:.4}},color:{color:g,highlight:h},font:{color:`#64748B`,size:9,face:`DM Sans, sans-serif`,align:`middle`,strokeWidth:0},smooth:{enabled:!0,type:`continuous`,roundness:.4},width:1,chosen:{edge:!0,label:!1}},interaction:{hover:!0,tooltipDelay:150,multiselect:!0}};try{S.current?.(),S.current=null,m.current?.destroy(),_e.current!==null&&(clearTimeout(_e.current),_e.current=null),ge.current=null;let e=new se.Network(f.current,{nodes:C.current,edges:ne.current},_);m.current=e,d.physics===!1?(ze(!1),console.log(`[graph-page] op=render-spinner state=hidden reason=no-physics`)):S.current=$e(e,{report:({avgMotion:e,settleMs:t,capped:n,nodeCount:r})=>{ze(!1),console.log(`[graph-page] op=render-spinner state=hidden reason=${n?`settle-capped`:`settled`}`);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`event`,source:`graph-settle`,avgMotion:Math.round(e*100)/100,settleMs:t,capped:n,nodeCount:r}),keepalive:!0}).catch(()=>{})}catch{}}}),e.on(`zoom`,()=>{_e.current!==null&&clearTimeout(_e.current),_e.current=setTimeout(()=>{_e.current=null;let e=m.current,t=C.current;if(!e||!t)return;let n;try{n=e.getScale()}catch{return}let r=xt(n);if(r===ge.current)return;ge.current=r;let i=[];for(let e of T.current.values()){if(!e.labels[0])continue;let{colour:t}=(0,w.resolveNodeColour)(e.labels),r=e.trashed?{background:`${t}40`,border:t}:t,a=ve.current?N(e,n):``;i.push({id:e.id,label:a,color:r})}i.length>0&&t.update(i),console.error(`[graph-page] zoom-tier scale=${n.toFixed(3)} tier=${r} nodes=${i.length}`)},St)}),e.on(`click`,e=>{let t=e.nodes[0];if(!t)return;let n=T.current.get(t);if(!n)return;if(Ve(n)===`skip-trashed`){rt(n);return}let r=kn.current[kn.current.length-1];if(r.kind===`neighbourhood`&&r.rootElementId===t){rt(e=>e?.id===t?null:n);return}rt(null);let i={kind:`neighbourhood`,rootElementId:t,rootLabel:n.labels[0]??null};P(e=>{let n=Ne(e,i),r=n.length-1;return n.length>e.length&&zt(`nav-push`,{depth:r,kind:i.kind,rootElementId:t}),n.length===10&&e.length===10&&zt(`view-stack-cap-hit`,{depth:10,rootElementId:t}),n})}),e.on(`deselectNode`,()=>{rt(null)});let t=e=>{let t=f.current,n=ce.current;if(!t||!n)return!1;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=r.left+e.x,o=r.top+e.y;return a>=i.left&&a<=i.right&&o>=i.top&&o<=i.bottom},n=f.current?.parentElement??null;e.on(`dragStart`,e=>{if(e.nodes.length===0){de.current=null,pe.current=[];return}pe.current=[...e.nodes],de.current=e.nodes[0],n?.classList.add(`graph-dragging`)}),e.on(`dragging`,e=>{if(pe.current.length===0)return;let n=t(e.pointer.DOM);at(e=>e===n?e:n)}),e.on(`dragEnd`,e=>{let r=pe.current;if(pe.current=[],de.current=null,at(!1),n?.classList.remove(`graph-dragging`),r.length!==0&&t(e.pointer.DOM))if(r.length===1){let e=T.current.get(r[0])?.labels[0]??`Unknown`;wn(r[0],e)}else Tn(r)})}catch(e){ze(!1),console.log(`[graph-page] op=render-spinner state=hidden reason=render-error`);let t=e instanceof Error?e.message:String(e);qe(`Visualisation failed to load: ${t}`);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-render`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}}},[]),Mn=(0,j.useCallback)(()=>{let e=m.current,t=C.current;if(!e||!t)return;let n;try{n=e.getScale()}catch{return}let r=[];for(let e of T.current.values()){if(!e.labels[0])continue;let{colour:t}=(0,w.resolveNodeColour)(e.labels),i=e.trashed?{background:`${t}40`,border:t}:t;r.push({id:e.id,label:ve.current?N(e,n):``,color:i})}r.length>0&&t.update(r)},[]),Nn=(0,j.useCallback)(()=>{ve.current||(ve.current=!0,Mn())},[Mn]);(0,j.useEffect)(()=>{let e=y.current;if(!e)return;let t=()=>Nn();return e.addEventListener(`pointerdown`,t,!0),e.addEventListener(`wheel`,t,!0),e.addEventListener(`keydown`,t,!0),()=>{e.removeEventListener(`pointerdown`,t,!0),e.removeEventListener(`wheel`,t,!0),e.removeEventListener(`keydown`,t,!0)}},[Nn]),(0,j.useEffect)(()=>{let e=f.current;if(!e)return;let t=t=>{let n=he.current,r=me.current,i=e.parentElement;if(!n||!r||!i)return;let a=i.getBoundingClientRect(),o=Math.min(n.clientX,t.clientX)-a.left,s=Math.min(n.clientY,t.clientY)-a.top,c=Math.max(n.clientX,t.clientX)-a.left,l=Math.max(n.clientY,t.clientY)-a.top;r.style.left=`${o}px`,r.style.top=`${s}px`,r.style.width=`${c-o}px`,r.style.height=`${l-s}px`},n=r=>{document.removeEventListener(`mousemove`,t,!0),document.removeEventListener(`mouseup`,n,!0);let i=he.current;he.current=null;let a=me.current;a&&(a.style.display=`none`);let o=m.current;if(!i||!o)return;let s=e.getBoundingClientRect(),c=i.clientX-s.left,l=i.clientY-s.top,u=r.clientX-s.left,d=r.clientY-s.top,f=Math.min(c,u),p=Math.min(l,d),h=Math.max(c,u),g=Math.max(l,d);if(h-f<3&&g-p<3)return;let _=o.getPositions(),v=[];for(let[e,t]of Object.entries(_)){let n=o.canvasToDOM(t);n.x>=f&&n.x<=h&&n.y>=p&&n.y<=g&&v.push(e)}try{o.selectNodes(v,!1)}catch{}},r=r=>{if(!r.shiftKey||r.button!==0)return;let i=m.current,a=e.parentElement;if(!i||!a)return;let o=e.getBoundingClientRect(),s={x:r.clientX-o.left,y:r.clientY-o.top};if(i.getNodeAt(s))return;r.preventDefault(),r.stopImmediatePropagation(),he.current={clientX:r.clientX,clientY:r.clientY};let c=me.current,l=a.getBoundingClientRect();c&&(c.style.display=`block`,c.style.left=`${r.clientX-l.left}px`,c.style.top=`${r.clientY-l.top}px`,c.style.width=`0px`,c.style.height=`0px`),document.addEventListener(`mousemove`,t,!0),document.addEventListener(`mouseup`,n,!0)};return e.addEventListener(`mousedown`,r,!0),()=>{e.removeEventListener(`mousedown`,r,!0),document.removeEventListener(`mousemove`,t,!0),document.removeEventListener(`mouseup`,n,!0)}},[]),(0,j.useEffect)(()=>{let e=ut.trim();if(!e){pt(``),gt(null),Nt(null),Ut(`hybrid`),Gt(0),qt(!1),m.current?.unselectAll();return}qt(!1);let t=setTimeout(()=>pt(e),300);return()=>clearTimeout(t)},[ut]),(0,j.useEffect)(()=>{let e=setTimeout(()=>{let e=Ge(Pt);Vt(e);try{window.localStorage.setItem(kt,String(e))}catch{}},200);return()=>clearTimeout(e)},[Pt]);let Pn=(0,j.useCallback)(e=>{let t=m.current,n=C.current;if(!t||!n)return;let{updates:r,inWindow:i}=He(e,T.current,w.resolveNodeColour,Ct);r.length>0&&(n.update(r),t.fit({nodes:i,animation:{duration:400,easingFunction:`easeInOutQuad`}}))},[]),Fn=Le(M);(0,j.useEffect)(()=>{if(!ft)return;let e=!1;return Nt(null),i(Ke(ft,Fn.selectedLabels,Bt,Kt)).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);return t}).then(t=>{if(e)return;gt(t.results);let n=t.mode===`bm25`?`bm25`:`hybrid`;if(Ut(n),Gt(typeof t.suppressed==`number`?t.suppressed:0),n===`bm25`)try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-page`,msg:`[graph-page] search-result-degraded mode=bm25 query="${ft}"`}),keepalive:!0}).catch(()=>{})}catch{}let{nodes:r,edges:i}=Ue(t.results,Fn.selectedLabels);T.current=new Map(r.map(e=>[e.id,e])),Qe(r.length),Ye(null),jn(r,i),Pn(t.results),console.info(`[graph-page] search-applied view=${En.kind} q="${ft}" labels=${Fn.selectedLabels.join(`|`)} hits=${r.length}`)}).catch(t=>{e||Nt(t instanceof Error?t.message:String(t))}),()=>{e=!0}},[ft,Bt,s,c,i,Pn,En.kind,Fn.selectedLabels,jn,Kt]);let In=(0,j.useCallback)(e=>{P(t=>{let n=Le(t),r=new Set(n.selectedLabels);return r.has(e)?r.delete(e):r.add(e),Fe({kind:`filter`,selectedLabels:[...r].sort(),includeTrashed:n.includeTrashed,includeAgentActions:n.includeAgentActions})})},[]),Ln=(0,j.useCallback)(()=>{P(e=>{let t=Le(e);return Fe({...t,includeTrashed:!t.includeTrashed})})},[]),Rn=(0,j.useCallback)(()=>{P(e=>{let t=Le(e);return Fe({...t,includeAgentActions:!t.includeAgentActions})})},[]),zn=(0,j.useCallback)(()=>{dt(``),pt(``),gt(null),Nt(null),Ut(`hybrid`),Gt(0),qt(!1);try{m.current?.unselectAll()}catch{}},[]),Bn=(0,j.useCallback)(()=>{P(()=>Fe({kind:`filter`,selectedLabels:[],includeTrashed:!1,includeAgentActions:!1}))},[]),Vn=(0,j.useCallback)(()=>{rt(null);try{m.current?.unselectAll()}catch{}P(e=>{let t=Pe(e);return t!==e&&zt(`nav-pop`,{depth:t.length-1}),t})},[]),Hn=(0,j.useCallback)(()=>{rt(null);try{m.current?.unselectAll()}catch{}P(e=>e.length<=1?e:(zt(`nav-home`,{depth:0,popped:e.length-1}),[Le(e)]))},[]),Un=(0,j.useCallback)(()=>{let e=Le(M),t={labels:[...e.selectedLabels].sort(),includeTrashed:e.includeTrashed};on(!0),i(`/api/admin/graph-default-view`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(t)}).then(async e=>{if(!e.ok){let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));throw Error(t.error??`HTTP ${e.status}`)}tn(t)}).catch(e=>{let t=e instanceof Error?e.message:String(e);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-default-view-save`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}}).finally(()=>on(!1))},[i,M]),Wn=(0,j.useCallback)(()=>{rt(null);try{m.current?.unselectAll()}catch{}Yt(e=>e+1),Be(`graph-restore`)},[]),R=(0,j.useCallback)(()=>{rt(null);try{m.current?.unselectAll()}catch{}P(e=>[Le(e)]),Yt(e=>e+1),Be(`graph-trash`)},[]),z=(0,j.useCallback)(()=>{Yt(e=>e+1),Zt(e=>e+1)},[]),Gn=En.kind===`neighbourhood`,Kn=Le(M),qn=Kn.selectedLabels,Jn=Kn.includeTrashed,Yn=Kn.includeAgentActions,Xn=je({inNeighbourhood:Gn,searchActive:!!ft}),Zn=(0,j.useMemo)(()=>{if(Jn!==en.includeTrashed||qn.length!==en.labels.length)return!0;for(let e=0;e<qn.length;e++)if(qn[e]!==en.labels[e])return!0;return!1},[Jn,qn,en]);return(0,L.jsxs)(`div`,{ref:y,className:vt(h,r),children:[(0,L.jsxs)(`div`,{className:`graph-toolbar`,children:[M.length>1&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`button`,{type:`button`,className:`graph-home-to-filter graph-home-desktop`,onClick:Hn,title:`Clear breadcrumb — return to filter root`,children:[(0,L.jsx)(k,{size:12}),` Home`]}),(0,L.jsx)(`button`,{type:`button`,className:`graph-home-to-filter graph-home-mobile`,onClick:Hn,"aria-label":`Home`,title:`Clear breadcrumb — return to filter root`,children:(0,L.jsx)(k,{size:14})}),(0,L.jsx)(`button`,{type:`button`,className:`graph-back-to-filter graph-back-desktop`,onClick:Vn,children:`← Back`}),(0,L.jsx)(`button`,{type:`button`,className:`graph-back-to-filter graph-back-mobile`,onClick:Vn,"aria-label":`Back`,children:(0,L.jsx)(x,{size:16})})]}),(0,L.jsxs)(`div`,{className:`data-search-input graph-search-input`,children:[(0,L.jsx)(te,{size:14}),(0,L.jsx)(`input`,{type:`text`,placeholder:`Search nodes…`,value:ut,onChange:e=>dt(e.target.value),autoComplete:`off`,spellCheck:!1}),ft&&!mt&&!_t&&(0,L.jsx)(a,{size:14,className:`spin`}),ut.length>0&&(0,L.jsx)(`button`,{type:`button`,className:`graph-search-clear`,onClick:zn,"aria-label":`Clear search`,title:`Clear search`,children:(0,L.jsx)(d,{size:14})})]}),ft&&(0,L.jsxs)(`div`,{className:`graph-search-limit`,title:`Show top ${Pt} matches (1-2000)`,children:[(0,L.jsx)(`label`,{htmlFor:`graph-search-limit-input`,className:`graph-search-limit-label`,children:`Top`}),(0,L.jsx)(`button`,{type:`button`,className:`graph-search-limit-step`,onClick:()=>It(Ge(Pt-1)),disabled:Pt<=1,"aria-label":`Decrement search limit`,title:`Decrement`,children:(0,L.jsx)(ie,{size:12})}),(0,L.jsx)(`input`,{id:`graph-search-limit-input`,type:`number`,min:1,max:2e3,step:1,value:Pt,onChange:e=>It(Ge(e.target.value)),className:`graph-search-limit-number`,"aria-label":`Maximum search results to render`}),(0,L.jsx)(`button`,{type:`button`,className:`graph-search-limit-step`,onClick:()=>It(Ge(Pt+1)),disabled:Pt>=2e3,"aria-label":`Increment search limit`,title:`Increment`,children:(0,L.jsx)(p,{size:12})}),(0,L.jsx)(`input`,{id:`graph-search-limit-slider`,type:`range`,min:1,max:2e3,step:1,value:Pt,onChange:e=>It(Ge(e.target.value)),"aria-label":`Maximum search results to render (drag for ballpark)`})]}),(0,L.jsx)(`button`,{type:`button`,className:`graph-refresh-button`,onClick:z,disabled:we,"aria-label":`Refresh graph`,title:`Refresh graph`,children:(0,L.jsx)(u,{size:14,className:we?`spin`:void 0})}),yt(r)&&(0,L.jsx)(`button`,{type:`button`,className:`graph-fullscreen-toggle`,onClick:()=>{h?xn(`button`):_(!0)},"aria-label":h?`Exit full screen`:`Full screen`,title:h?`Exit full screen`:`Full screen`,"aria-pressed":h,children:h?(0,L.jsx)(re,{size:14}):(0,L.jsx)(ee,{size:14})}),!Gn&&(0,L.jsxs)(`div`,{className:`graph-filter-wrap`,ref:cn,children:[(0,L.jsxs)(`button`,{type:`button`,className:`graph-filter-toggle${nn?` is-open`:``}${qn.length>0||Jn||Yn?` has-selection`:``}`,onClick:()=>rn(e=>!e),"aria-haspopup":`true`,"aria-expanded":nn,"aria-label":`Filter node types`,children:[(0,L.jsx)(v,{size:14}),(0,L.jsx)(`span`,{children:`Filter`}),qn.length>0&&(0,L.jsx)(`span`,{className:`graph-filter-count`,children:qn.length})]}),nn&&(0,L.jsxs)(`div`,{className:`graph-filter-popover`,role:`dialog`,"aria-label":`Node type filter`,children:[(0,L.jsxs)(`div`,{className:`graph-filter-popover-header`,children:[(0,L.jsxs)(`button`,{type:`button`,className:`graph-toggle-trashed${Jn?` active`:``}`,onClick:Ln,"aria-pressed":Jn,title:`Show trashed nodes — restored with Restore button on each node`,children:[(0,L.jsx)(D,{size:14}),` Show trashed`]}),(qn.length>0||Jn||Yn)&&(0,L.jsx)(`button`,{type:`button`,className:`graph-filter-clear`,onClick:Bn,"aria-label":`Clear filter selection`,title:`Clear filter selection`,children:(0,L.jsx)(d,{size:14})})]}),(0,L.jsx)(`div`,{className:`graph-toggle-agent-actions`,title:`Hide ToolCall, StepResult, WorkflowStep, WorkflowRun — agent-execution telemetry. Flip on for audit/debug.`,children:(0,L.jsx)(g,{checked:Yn,onChange:Rn,label:`Include agent actions`})}),Qt.length===0&&(0,L.jsx)(`p`,{className:`graph-filter-popover-empty`,children:`No node types in your graph yet.`}),(0,L.jsx)(`div`,{className:`graph-filter-rows`,role:`group`,"aria-label":`Node type filter`,children:Qt.map(({label:e,nodeCount:t})=>{let n=qn.includes(e),r=(0,w.colourForLabel)(e);return(0,L.jsxs)(`button`,{type:`button`,className:`graph-filter-row${n?` active`:``}`,onClick:()=>In(e),"aria-pressed":n,children:[(0,L.jsx)(`span`,{className:`graph-filter-row-swatch`,style:{backgroundColor:r}}),(0,L.jsx)(`span`,{className:`graph-filter-row-label`,children:e}),(0,L.jsx)(`span`,{className:`graph-filter-row-count`,children:t})]},e)})}),(0,L.jsx)(`div`,{className:`graph-filter-popover-footer`,children:(0,L.jsx)(`button`,{type:`button`,className:`graph-filter-set-default`,onClick:Un,disabled:!Zn||an,children:an?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(a,{size:12,className:`spin`}),` Saving…`]}):`Set default view`})})]})]}),(0,L.jsx)(`div`,{className:`graph-meta`,children:De({inNeighbourhood:Gn,searchActive:!!ft,selectedLabelsCount:qn.length,topLevelTotal:et,nodeCount:Ze})?(0,L.jsx)(`span`,{className:`graph-meta-count`,children:Oe(Ze,et)}):Ze>0&&(0,L.jsxs)(`span`,{className:`graph-meta-count`,children:[Ze,` node`,Ze===1?``:`s`]})})]}),M.length>1&&(0,L.jsx)(Rt,{viewStack:M}),ft&&Ht===`bm25`&&!_t&&(0,L.jsx)(`div`,{className:`graph-error-banner graph-search-degraded`,role:`status`,children:`Vector ranking unavailable — showing keyword-only results.`}),_t&&(0,L.jsxs)(`div`,{className:`data-error graph-error-banner`,children:[`Search unavailable: `,_t]}),ft&&Wt>0&&!Kt&&!_t&&(0,L.jsxs)(`button`,{type:`button`,className:`graph-search-suppressed`,onClick:()=>qt(!0),children:[Wt,` low-confidence match`,Wt===1?``:`es`,` hidden — show all`]}),ft&&Kt&&!_t&&(0,L.jsx)(`button`,{type:`button`,className:`graph-search-suppressed`,onClick:()=>qt(!1),children:`Showing all matches — hide low-confidence`}),mt&&mt.length===0&&!_t&&(0,L.jsx)(`div`,{className:`graph-search-status`,children:`No matches in your graph.`}),(0,L.jsxs)(`div`,{className:`graph-canvas-wrap`,children:[Ae({loading:we,rendering:Re,searchActive:!!ft})&&(0,L.jsxs)(`div`,{className:`graph-canvas-overlay`,children:[(0,L.jsx)(a,{size:20,className:`spin`}),` Loading your graph…`]}),We&&!we&&!Re&&(0,L.jsxs)(`div`,{className:`graph-canvas-overlay graph-canvas-error`,children:[(0,L.jsx)(`p`,{children:We}),(0,L.jsx)(`button`,{type:`button`,className:`data-btn`,onClick:()=>{qe(null),Yt(e=>e+1)},children:`Retry`})]}),Je&&!we&&!Re&&(0,L.jsxs)(`div`,{className:`graph-canvas-overlay graph-canvas-error`,children:[(0,L.jsxs)(`p`,{children:[`Refine your filter — `,(0,L.jsx)(`strong`,{children:Je.matched}),` matches exceed the 2000 cap.`]}),(0,L.jsx)(`p`,{className:`graph-canvas-hint`,children:`Pick a more specific label combination, or narrow your brand's data.`})]}),!we&&!Re&&!We&&!Je&&Ze===0&&!Gn&&qn.length===0&&(0,L.jsxs)(`div`,{className:`graph-canvas-overlay`,children:[(0,L.jsx)(v,{size:20}),(0,L.jsx)(`p`,{children:`No nodes in your graph yet.`})]}),!we&&!Re&&!We&&!Je&&Ze===0&&!Gn&&qn.length>0&&(0,L.jsx)(`div`,{className:`graph-canvas-overlay`,children:(0,L.jsxs)(`p`,{children:[`No `,qn.join(`, `),` nodes match this view.`]})}),(0,L.jsx)(`div`,{ref:f,className:`graph-canvas`}),(0,L.jsx)(`div`,{ref:me,className:`graph-marquee`,"aria-hidden":`true`}),Ze>0&&(0,L.jsx)(`div`,{ref:ce,className:`graph-trash-drop-zone${it?` is-hover`:``}${ot?` is-error`:``}`,"aria-hidden":`true`,children:(0,L.jsx)(l,{size:18})}),ct&&(0,L.jsxs)(`div`,{className:`graph-drag-error-banner`,role:`alert`,children:[(0,L.jsx)(`span`,{children:ct}),(0,L.jsx)(`button`,{type:`button`,className:`graph-drag-error-dismiss`,onClick:()=>lt(null),"aria-label":`Dismiss`,children:(0,L.jsx)(d,{size:14})})]}),Ze>0&&vn.length>0&&(0,L.jsxs)(`div`,{ref:ln,className:`graph-legend${pn?` is-collapsed`:``}`,style:dn?{"--legend-x":`${dn.x}px`,"--legend-y":`${dn.y}px`}:void 0,children:[(0,L.jsxs)(`div`,{className:`graph-legend-header`,onPointerDown:hn,onPointerMove:gn,onPointerUp:_n,children:[(0,L.jsx)(O,{size:13,className:`graph-legend-grip`,"aria-hidden":`true`}),(0,L.jsx)(`span`,{className:`graph-legend-title`,children:`Legend`}),(0,L.jsx)(`button`,{type:`button`,className:`graph-legend-collapse`,onPointerDown:e=>e.stopPropagation(),onClick:()=>mn(e=>!e),"aria-label":pn?`Expand legend`:`Collapse legend`,"aria-expanded":!pn,children:pn?(0,L.jsx)(E,{size:14}):(0,L.jsx)(b,{size:14})})]}),(0,L.jsx)(`div`,{className:`graph-legend-body`,children:vn.map(e=>{let t=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Ft,{label:e.label,shape:e.shape,colour:e.colour}),(0,L.jsx)(`span`,{className:`graph-legend-label`,children:e.label}),(0,L.jsx)(`span`,{className:`graph-legend-count`,children:e.count})]});if(!Xn)return(0,L.jsx)(`div`,{className:`graph-legend-item`,children:t},e.label);let n=qn.includes(e.label);return(0,L.jsx)(`button`,{type:`button`,className:`graph-legend-item graph-legend-item--interactive${n?` is-selected`:``}`,"aria-pressed":n,onClick:()=>{let t=n?`remove`:`add`,r=n?qn.length-1:qn.length+1;console.log(`[graph-page] op=legend-filter label=${e.label} action=${t} selected=${r}`),In(e.label)},children:t},e.label)})})]})]}),nt&&(0,L.jsx)(ht,{node:nt,edges:A.current,nodesById:T.current,adminFetch:i,onClose:()=>{rt(null);try{m.current?.unselectAll()}catch{}},onRestored:Wn,onTrashed:R})]})}var Lt=class extends Error{body;constructor(e){super(e.error),this.body=e}};function Rt({viewStack:e}){let t=e.map(e=>e.kind===`filter`?`Filter`:e.rootLabel??`Node`);return(0,L.jsx)(`div`,{className:`graph-breadcrumb`,role:`navigation`,"aria-label":`Graph navigation breadcrumb`,children:t.map((e,n)=>(0,L.jsxs)(`span`,{className:`graph-breadcrumb-item`,children:[n>0&&(0,L.jsx)(`span`,{className:`graph-breadcrumb-separator`,"aria-hidden":`true`,children:`›`}),(0,L.jsx)(`span`,{className:`graph-breadcrumb-label${n===t.length-1?` is-current`:``}`,children:e})]},n))})}function zt(e,t){let n=`[graph-page] ${e} ${Object.entries(t).map(([e,t])=>`${e}=${String(t)}`).join(` `)}`;try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-nav`,msg:n}),keepalive:!0}).catch(()=>{})}catch{}}(0,ce.createRoot)(document.getElementById(`root`)).render((0,L.jsx)(Nt,{}));
|