From 6b18709e61050a39a85a1ce5552feed604e6c4a5 Mon Sep 17 00:00:00 2001 From: Fedorov Vladimir Date: Sat, 13 Dec 2025 21:31:45 +0700 Subject: [PATCH] add crud for node --- ...{index-BkyopZAN.css => index-D8kPNaZP.css} | 2 +- .../static/admin/assets/index-DTvRzGpy.js | 115 ------------------ .../static/admin/assets/index-WLMuUXZt.js | 115 ++++++++++++++++++ cmd/evening_detective/static/admin/index.html | 4 +- internal/services/story_service/service.go | 53 +++++--- 5 files changed, 153 insertions(+), 136 deletions(-) rename cmd/evening_detective/static/admin/assets/{index-BkyopZAN.css => index-D8kPNaZP.css} (56%) delete mode 100644 cmd/evening_detective/static/admin/assets/index-DTvRzGpy.js create mode 100644 cmd/evening_detective/static/admin/assets/index-WLMuUXZt.js diff --git a/cmd/evening_detective/static/admin/assets/index-BkyopZAN.css b/cmd/evening_detective/static/admin/assets/index-D8kPNaZP.css similarity index 56% rename from cmd/evening_detective/static/admin/assets/index-BkyopZAN.css rename to cmd/evening_detective/static/admin/assets/index-D8kPNaZP.css index 4df0c09..a1a3430 100644 --- a/cmd/evening_detective/static/admin/assets/index-BkyopZAN.css +++ b/cmd/evening_detective/static/admin/assets/index-D8kPNaZP.css @@ -1 +1 @@ -:root{--vt-c-white: #ffffff;--vt-c-white-soft: #f8f8f8;--vt-c-white-mute: #f2f2f2;--vt-c-black: #181818;--vt-c-black-soft: #222222;--vt-c-black-mute: #282828;--vt-c-indigo: #2c3e50;--vt-c-divider-light-1: rgba(60, 60, 60, .29);--vt-c-divider-light-2: rgba(60, 60, 60, .12);--vt-c-divider-dark-1: rgba(84, 84, 84, .65);--vt-c-divider-dark-2: rgba(84, 84, 84, .48);--vt-c-text-light-1: var(--vt-c-indigo);--vt-c-text-light-2: rgba(60, 60, 60, .66);--vt-c-text-dark-1: var(--vt-c-white);--vt-c-text-dark-2: rgba(235, 235, 235, .64);--main-color: rgba(34, 50, 60, 1);--second-color: rgb(97, 74, 22);--main-back-color: rgba(240, 240, 240, 1);--main-back-item-color: rgba(254, 254, 254, 1)}:root{--color-background: var(--vt-c-white);--color-background-soft: var(--vt-c-white-soft);--color-background-mute: var(--vt-c-white-mute);--color-border: var(--vt-c-divider-light-2);--color-border-hover: var(--vt-c-divider-light-1);--color-heading: var(--vt-c-text-light-1);--color-text: var(--vt-c-text-light-1);--section-gap: 160px}*,*:before,*:after{box-sizing:border-box;margin:0;font-weight:400}body{min-height:100dvh;color:var(--color-text);background:var(--main-back-color);transition:color .5s,background-color .5s;line-height:1.6;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:15px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.input-custom{width:100%;box-sizing:border-box;margin-bottom:15px}.button-custom{margin-left:auto;background-color:var(--main-color);font-weight:600;color:#fff}.button-custom-inline{margin:10px;background-color:var(--main-color);font-weight:600;color:#fff;padding:6px 8px;border:1px solid #ddd;border-radius:15px;font-size:14px}.button-custom:hover,.button-custom-inline:hover{background-color:var(--second-color)}.input-custom,.button-custom{padding:12px 16px;border:1px solid #ddd;border-radius:15px;font-size:16px}.button-container{display:flex}.center-message{display:flex;justify-content:center;align-items:center;height:calc(100dvh - 100px);text-align:center}.qr[data-v-666b8d35]{position:absolute;top:130px;right:30px;text-align:center;width:120px}.header-block[data-v-5b6894ef]{background-color:var(--main-color);font-size:large;color:#fff;vertical-align:middle;padding:10px 0 10px 16px;font-weight:700}.buttons-block[data-v-27835e5c]{padding-top:5px}.button-menu[data-v-27835e5c]{margin:5px 10px 5px 0}table[data-v-27835e5c]{width:700px;border-collapse:collapse;margin:30px auto;border:1px solid #444444}th[data-v-27835e5c],td[data-v-27835e5c]{padding:12px;text-align:left}th[data-v-27835e5c]{background-color:var(--main-color);color:#fff;font-weight:700}tr[data-v-27835e5c]:nth-child(odd){background-color:#efefef}tr[data-v-27835e5c]:nth-child(2n){background-color:#fff}tr[data-v-27835e5c]:hover{background-color:#cfcfcf}.time[data-v-27835e5c]{white-space:nowrap}.team-name[data-v-27835e5c]{font-weight:600}.link-button[data-v-27835e5c]{display:inline;border:none;background:none;padding:0;margin:0;font:inherit;cursor:pointer;color:var(--main-color);text-decoration:underline;font-weight:600;-webkit-appearance:none;-moz-appearance:none;appearance:none;line-height:inherit;text-align:left}.link-button[data-v-27835e5c]:hover{color:var(--second-color);text-decoration:none}.link-button[data-v-27835e5c]:active{color:#036}.link-button[data-v-27835e5c]:focus{outline:none;text-decoration:none;box-shadow:0 0 0 2px #0066cc4d}.form-block[data-v-27835e5c]{width:700px;margin:0 auto}a[data-v-27835e5c]{color:var(--second-color);text-decoration:none;transition:all .2s ease;cursor:pointer}a[data-v-27835e5c]:hover{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}a[data-v-27835e5c]:focus-visible{outline:2px solid #3182ce;outline-offset:2px;border-radius:2px}a[disabled][data-v-27835e5c]{color:#a0aec0;pointer-events:none;cursor:not-allowed}.button-container[data-v-27835e5c]{margin-bottom:30px}.cell-center[data-v-27835e5c]{text-align:center}.graph-container[data-v-3a21d9bd]{width:100%;height:calc(100vh - 50px);border:1px solid #e0e0e0;border-radius:8px}.nodes-container[data-v-3a21d9bd]{position:fixed;left:5px;top:55px;height:calc(100vh - 100px);padding:3px 10px}.edit-node-container[data-v-3a21d9bd]{position:fixed;right:5px;top:55px;height:calc(100vh - 100px);padding:3px 10px;min-width:350px;max-width:400px}.node-select-button[data-v-3a21d9bd]{color:#373737}.node-select-button[data-v-3a21d9bd]:hover{font-weight:700;cursor:pointer}.selected-node[data-v-3a21d9bd]{font-weight:700;color:#960000;cursor:pointer}.node-text-edit-field[data-v-3a21d9bd]{padding:7px;margin:5px 0;width:100%}.node-edit-save-button[data-v-3a21d9bd]{padding:3px 7px;margin:5px;background-color:#fff;border-radius:7px;border:1px solid #373737}.node-edit-save-button[data-v-3a21d9bd]:hover{background-color:#ddd;cursor:pointer}.hr[data-v-3a21d9bd]{width:250px;margin:10px 0}.copy-node-link[data-v-3a21d9bd]{margin-left:5px}.copy-node-link[data-v-3a21d9bd]:hover{font-weight:700;cursor:pointer}.scroll-y[data-v-3a21d9bd]{overflow-y:auto;max-height:calc(100vh - 200px)}.scroll-y[data-v-3a21d9bd]::-webkit-scrollbar{display:none}.node-code-edit-field[data-v-3a21d9bd]{width:50px}.node-name-edit-field[data-v-3a21d9bd]{width:220px}.checkbox-green[data-v-3a21d9bd]{display:inline-block;height:20px;line-height:28px;margin-right:10px;position:relative;vertical-align:middle;font-size:14px;-webkit-user-select:none;user-select:none}.checkbox-green .checkbox-green-switch[data-v-3a21d9bd]{display:inline-block;height:20px;width:90px;box-sizing:border-box;position:relative;border-radius:2px;background:#848484;transition:background-color .3s cubic-bezier(0,1,.5,1)}.checkbox-green .checkbox-green-switch[data-v-3a21d9bd]:before{content:attr(data-label-on);display:inline-block;box-sizing:border-box;width:45px;padding:0 8px;position:absolute;top:0;left:45px;text-transform:uppercase;text-align:center;color:#ffffff80;font-size:10px;line-height:20px}.checkbox-green .checkbox-green-switch[data-v-3a21d9bd]:after{content:attr(data-label-off);display:inline-block;box-sizing:border-box;width:44px;border-radius:1px;position:absolute;top:1px;left:1px;z-index:5;text-transform:uppercase;text-align:center;background:#fff;line-height:18px;font-size:10px;color:#777;transition:transform .3s cubic-bezier(0,1,.5,1)}.checkbox-green input[type=checkbox][data-v-3a21d9bd]{display:block;width:0;height:0;position:absolute;z-index:-1;opacity:0}.checkbox-green input[type=checkbox]:checked+.checkbox-green-switch[data-v-3a21d9bd]{background-color:#848484}.checkbox-green input[type=checkbox]:checked+.checkbox-green-switch[data-v-3a21d9bd]:before{content:attr(data-label-off);left:0}.checkbox-green input[type=checkbox]:checked+.checkbox-green-switch[data-v-3a21d9bd]:after{content:attr(data-label-on);color:#848484;transform:translate3d(44px,0,0)}.checkbox-green input[type=checkbox]:not(:disabled)+.checkbox-green-switch[data-v-3a21d9bd]:hover{cursor:pointer}.checkbox-green input[type=checkbox]:disabled+.checkbox-green-switch[data-v-3a21d9bd]{opacity:.6;filter:grayscale(50%)}.checkbox-green.focused .checkbox-green-switch[data-v-3a21d9bd]:after{box-shadow:inset 0 0 4px #ff5623} +:root{--vt-c-white: #ffffff;--vt-c-white-soft: #f8f8f8;--vt-c-white-mute: #f2f2f2;--vt-c-black: #181818;--vt-c-black-soft: #222222;--vt-c-black-mute: #282828;--vt-c-indigo: #2c3e50;--vt-c-divider-light-1: rgba(60, 60, 60, .29);--vt-c-divider-light-2: rgba(60, 60, 60, .12);--vt-c-divider-dark-1: rgba(84, 84, 84, .65);--vt-c-divider-dark-2: rgba(84, 84, 84, .48);--vt-c-text-light-1: var(--vt-c-indigo);--vt-c-text-light-2: rgba(60, 60, 60, .66);--vt-c-text-dark-1: var(--vt-c-white);--vt-c-text-dark-2: rgba(235, 235, 235, .64);--main-color: rgba(34, 50, 60, 1);--second-color: rgb(97, 74, 22);--main-back-color: rgba(240, 240, 240, 1);--main-back-item-color: rgba(254, 254, 254, 1)}:root{--color-background: var(--vt-c-white);--color-background-soft: var(--vt-c-white-soft);--color-background-mute: var(--vt-c-white-mute);--color-border: var(--vt-c-divider-light-2);--color-border-hover: var(--vt-c-divider-light-1);--color-heading: var(--vt-c-text-light-1);--color-text: var(--vt-c-text-light-1);--section-gap: 160px}*,*:before,*:after{box-sizing:border-box;margin:0;font-weight:400}body{min-height:100dvh;color:var(--color-text);background:var(--main-back-color);transition:color .5s,background-color .5s;line-height:1.6;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:15px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.input-custom{width:100%;box-sizing:border-box;margin-bottom:15px}.button-custom{margin-left:auto;background-color:var(--main-color);font-weight:600;color:#fff}.button-custom-inline{margin:10px;background-color:var(--main-color);font-weight:600;color:#fff;padding:6px 8px;border:1px solid #ddd;border-radius:15px;font-size:14px}.button-custom:hover,.button-custom-inline:hover{background-color:var(--second-color)}.input-custom,.button-custom{padding:12px 16px;border:1px solid #ddd;border-radius:15px;font-size:16px}.button-container{display:flex}.center-message{display:flex;justify-content:center;align-items:center;height:calc(100dvh - 100px);text-align:center}.qr[data-v-666b8d35]{position:absolute;top:130px;right:30px;text-align:center;width:120px}.header-block[data-v-5b6894ef]{background-color:var(--main-color);font-size:large;color:#fff;vertical-align:middle;padding:10px 0 10px 16px;font-weight:700}.buttons-block[data-v-27835e5c]{padding-top:5px}.button-menu[data-v-27835e5c]{margin:5px 10px 5px 0}table[data-v-27835e5c]{width:700px;border-collapse:collapse;margin:30px auto;border:1px solid #444444}th[data-v-27835e5c],td[data-v-27835e5c]{padding:12px;text-align:left}th[data-v-27835e5c]{background-color:var(--main-color);color:#fff;font-weight:700}tr[data-v-27835e5c]:nth-child(odd){background-color:#efefef}tr[data-v-27835e5c]:nth-child(2n){background-color:#fff}tr[data-v-27835e5c]:hover{background-color:#cfcfcf}.time[data-v-27835e5c]{white-space:nowrap}.team-name[data-v-27835e5c]{font-weight:600}.link-button[data-v-27835e5c]{display:inline;border:none;background:none;padding:0;margin:0;font:inherit;cursor:pointer;color:var(--main-color);text-decoration:underline;font-weight:600;-webkit-appearance:none;-moz-appearance:none;appearance:none;line-height:inherit;text-align:left}.link-button[data-v-27835e5c]:hover{color:var(--second-color);text-decoration:none}.link-button[data-v-27835e5c]:active{color:#036}.link-button[data-v-27835e5c]:focus{outline:none;text-decoration:none;box-shadow:0 0 0 2px #0066cc4d}.form-block[data-v-27835e5c]{width:700px;margin:0 auto}a[data-v-27835e5c]{color:var(--second-color);text-decoration:none;transition:all .2s ease;cursor:pointer}a[data-v-27835e5c]:hover{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}a[data-v-27835e5c]:focus-visible{outline:2px solid #3182ce;outline-offset:2px;border-radius:2px}a[disabled][data-v-27835e5c]{color:#a0aec0;pointer-events:none;cursor:not-allowed}.button-container[data-v-27835e5c]{margin-bottom:30px}.cell-center[data-v-27835e5c]{text-align:center}.graph-container[data-v-fcde91a4]{width:100%;height:calc(100vh - 50px);border:1px solid #e0e0e0;border-radius:8px}.nodes-container[data-v-fcde91a4]{position:fixed;left:5px;top:55px;height:calc(100vh - 100px);padding:3px 10px}.edit-node-container[data-v-fcde91a4]{position:fixed;right:5px;top:55px;height:calc(100vh - 100px);padding:3px 10px;min-width:350px;max-width:400px}.node-select-button[data-v-fcde91a4]{color:#373737}.node-select-button[data-v-fcde91a4]:hover{font-weight:700;cursor:pointer}.selected-node[data-v-fcde91a4]{font-weight:700;color:#960000;cursor:pointer}.node-text-edit-field[data-v-fcde91a4]{padding:7px;margin:5px 0;width:100%}.editor-button[data-v-fcde91a4]{padding:3px 7px;margin:5px 5px 5px 0;background-color:#fff;border-radius:7px;border:1px solid #373737}.editor-button[data-v-fcde91a4]:hover{background-color:#ddd;cursor:pointer}.hr[data-v-fcde91a4]{width:250px;margin:10px 0}.copy-node-link[data-v-fcde91a4]{margin-left:5px}.copy-node-link[data-v-fcde91a4]:hover{font-weight:700;cursor:pointer}.scroll-y[data-v-fcde91a4]{overflow-y:auto;max-height:calc(100vh - 200px)}.scroll-y[data-v-fcde91a4]::-webkit-scrollbar{display:none}.node-code-edit-field[data-v-fcde91a4]{width:50px}.node-name-edit-field[data-v-fcde91a4]{width:220px}.application-add-button[data-v-fcde91a4]{display:inline;margin-left:5px;width:23px;height:23px}.application-remove-button[data-v-fcde91a4]{position:absolute;left:-25px;width:23px;height:23px}.checkbox-green[data-v-fcde91a4]{display:inline-block;height:20px;line-height:28px;margin-right:10px;position:relative;vertical-align:middle;font-size:14px;-webkit-user-select:none;user-select:none}.checkbox-green .checkbox-green-switch[data-v-fcde91a4]{display:inline-block;height:20px;width:90px;box-sizing:border-box;position:relative;border-radius:2px;background:#848484;transition:background-color .3s cubic-bezier(0,1,.5,1)}.checkbox-green .checkbox-green-switch[data-v-fcde91a4]:before{content:attr(data-label-on);display:inline-block;box-sizing:border-box;width:45px;padding:0 8px;position:absolute;top:0;left:45px;text-transform:uppercase;text-align:center;color:#ffffff80;font-size:10px;line-height:20px}.checkbox-green .checkbox-green-switch[data-v-fcde91a4]:after{content:attr(data-label-off);display:inline-block;box-sizing:border-box;width:44px;border-radius:1px;position:absolute;top:1px;left:1px;z-index:5;text-transform:uppercase;text-align:center;background:#fff;line-height:18px;font-size:10px;color:#777;transition:transform .3s cubic-bezier(0,1,.5,1)}.checkbox-green input[type=checkbox][data-v-fcde91a4]{display:block;width:0;height:0;position:absolute;z-index:-1;opacity:0}.checkbox-green input[type=checkbox]:checked+.checkbox-green-switch[data-v-fcde91a4]{background-color:#848484}.checkbox-green input[type=checkbox]:checked+.checkbox-green-switch[data-v-fcde91a4]:before{content:attr(data-label-off);left:0}.checkbox-green input[type=checkbox]:checked+.checkbox-green-switch[data-v-fcde91a4]:after{content:attr(data-label-on);color:#848484;transform:translate3d(44px,0,0)}.checkbox-green input[type=checkbox]:not(:disabled)+.checkbox-green-switch[data-v-fcde91a4]:hover{cursor:pointer}.checkbox-green input[type=checkbox]:disabled+.checkbox-green-switch[data-v-fcde91a4]{opacity:.6;filter:grayscale(50%)}.checkbox-green.focused .checkbox-green-switch[data-v-fcde91a4]:after{box-shadow:inset 0 0 4px #ff5623} diff --git a/cmd/evening_detective/static/admin/assets/index-DTvRzGpy.js b/cmd/evening_detective/static/admin/assets/index-DTvRzGpy.js deleted file mode 100644 index 5a952be..0000000 --- a/cmd/evening_detective/static/admin/assets/index-DTvRzGpy.js +++ /dev/null @@ -1,115 +0,0 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const s of n)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(n){const s={};return n.integrity&&(s.integrity=n.integrity),n.referrerPolicy&&(s.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?s.credentials="include":n.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(n){if(n.ep)return;n.ep=!0;const s=t(n);fetch(n.href,s)}})();/** -* @vue/shared v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function iw(r){const e=Object.create(null);for(const t of r.split(","))e[t]=1;return t=>t in e}const je={},ts=[],Nr=()=>{},G5=()=>!1,mu=r=>r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&(r.charCodeAt(2)>122||r.charCodeAt(2)<97),nw=r=>r.startsWith("onUpdate:"),Mt=Object.assign,sw=(r,e)=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)},Y5=Object.prototype.hasOwnProperty,Ne=(r,e)=>Y5.call(r,e),ge=Array.isArray,rs=r=>yu(r)==="[object Map]",Sj=r=>yu(r)==="[object Set]",be=r=>typeof r=="function",lt=r=>typeof r=="string",si=r=>typeof r=="symbol",Ye=r=>r!==null&&typeof r=="object",Oj=r=>(Ye(r)||be(r))&&be(r.then)&&be(r.catch),Ij=Object.prototype.toString,yu=r=>Ij.call(r),X5=r=>yu(r).slice(8,-1),Tj=r=>yu(r)==="[object Object]",ow=r=>lt(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,co=iw(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),bu=r=>{const e=Object.create(null);return t=>e[t]||(e[t]=r(t))},J5=/-(\w)/g,xi=bu(r=>r.replace(J5,(e,t)=>t?t.toUpperCase():"")),Q5=/\B([A-Z])/g,bn=bu(r=>r.replace(Q5,"-$1").toLowerCase()),$j=bu(r=>r.charAt(0).toUpperCase()+r.slice(1)),fl=bu(r=>r?`on${$j(r)}`:""),Oi=(r,e)=>!Object.is(r,e),za=(r,...e)=>{for(let t=0;t{Object.defineProperty(r,e,{configurable:!0,enumerable:!1,writable:i,value:t})},S_=r=>{const e=parseFloat(r);return isNaN(e)?r:e};let q0;const _u=()=>q0||(q0=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function aw(r){if(ge(r)){const e={};for(let t=0;t{if(t){const i=t.split(eH);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function wu(r){let e="";if(lt(r))e=r;else if(ge(r))for(let t=0;t!!(r&&r.__v_isRef===!0),Ft=r=>lt(r)?r:r==null?"":ge(r)||Ye(r)&&(r.toString===Ij||!be(r.toString))?Cj(r)?Ft(r.value):JSON.stringify(r,xj,2):String(r),xj=(r,e)=>Cj(e)?xj(r,e.value):rs(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[i,n],s)=>(t[vl(i,s)+" =>"]=n,t),{})}:Sj(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>vl(t))}:si(e)?vl(e):Ye(e)&&!ge(e)&&!Tj(e)?String(e):e,vl=(r,e="")=>{var t;return si(r)?`Symbol(${(t=r.description)!=null?t:e})`:r};/** -* @vue/reactivity v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let er;class qj{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=er,!e&&er&&(this.index=(er.scopes||(er.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e0)return;if(fo){let e=fo;for(fo=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let r;for(;ho;){let e=ho;for(ho=void 0;e;){const t=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){r||(r=i)}e=t}}if(r)throw r}function Nj(r){for(let e=r.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Fj(r){let e,t=r.depsTail,i=t;for(;i;){const n=i.prevDep;i.version===-1?(i===t&&(t=n),cw(i),aH(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=n}r.deps=e,r.depsTail=t}function O_(r){for(let e=r.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(kj(e.dep.computed)||e.dep.version!==e.version))return!0;return!!r._dirty}function kj(r){if(r.flags&4&&!(r.flags&16)||(r.flags&=-17,r.globalVersion===To))return;r.globalVersion=To;const e=r.dep;if(r.flags|=2,e.version>0&&!r.isSSR&&r.deps&&!O_(r)){r.flags&=-3;return}const t=He,i=_r;He=r,_r=!0;try{Nj(r);const n=r.fn(r._value);(e.version===0||Oi(n,r._value))&&(r._value=n,e.version++)}catch(n){throw e.version++,n}finally{He=t,_r=i,Fj(r),r.flags&=-3}}function cw(r,e=!1){const{dep:t,prevSub:i,nextSub:n}=r;if(i&&(i.nextSub=n,r.prevSub=void 0),n&&(n.prevSub=i,r.nextSub=void 0),t.subs===r&&(t.subs=i,!i&&t.computed)){t.computed.flags&=-5;for(let s=t.computed.deps;s;s=s.nextDep)cw(s,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function aH(r){const{prevDep:e,nextDep:t}=r;e&&(e.nextDep=t,r.prevDep=void 0),t&&(t.prevDep=e,r.nextDep=void 0)}let _r=!0;const Bj=[];function Fi(){Bj.push(_r),_r=!1}function ki(){const r=Bj.pop();_r=r===void 0?!0:r}function D0(r){const{cleanup:e}=r;if(r.cleanup=void 0,e){const t=He;He=void 0;try{e()}finally{He=t}}}let To=0;class uH{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class dw{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!He||!_r||He===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==He)t=this.activeLink=new uH(He,this),He.deps?(t.prevDep=He.depsTail,He.depsTail.nextDep=t,He.depsTail=t):He.deps=He.depsTail=t,jj(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const i=t.nextDep;i.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=i),t.prevDep=He.depsTail,t.nextDep=void 0,He.depsTail.nextDep=t,He.depsTail=t,He.deps===t&&(He.deps=i)}return t}trigger(e){this.version++,To++,this.notify(e)}notify(e){uw();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{lw()}}}function jj(r){if(r.dep.sc++,r.sub.flags&4){const e=r.dep.computed;if(e&&!r.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)jj(i)}const t=r.dep.subs;t!==r&&(r.prevSub=t,t&&(t.nextSub=r)),r.dep.subs=r}}const I_=new WeakMap,rn=Symbol(""),T_=Symbol(""),$o=Symbol("");function xt(r,e,t){if(_r&&He){let i=I_.get(r);i||I_.set(r,i=new Map);let n=i.get(t);n||(i.set(t,n=new dw),n.map=i,n.key=t),n.track()}}function Vr(r,e,t,i,n,s){const o=I_.get(r);if(!o){To++;return}const a=u=>{u&&u.trigger()};if(uw(),e==="clear")o.forEach(a);else{const u=ge(r),l=u&&ow(t);if(u&&t==="length"){const c=Number(i);o.forEach((d,h)=>{(h==="length"||h===$o||!si(h)&&h>=c)&&a(d)})}else switch((t!==void 0||o.has(void 0))&&a(o.get(t)),l&&a(o.get($o)),e){case"add":u?l&&a(o.get("length")):(a(o.get(rn)),rs(r)&&a(o.get(T_)));break;case"delete":u||(a(o.get(rn)),rs(r)&&a(o.get(T_)));break;case"set":rs(r)&&a(o.get(rn));break}}lw()}function Ln(r){const e=Me(r);return e===r?e:(xt(e,"iterate",$o),ur(r)?e:e.map(qt))}function Eu(r){return xt(r=Me(r),"iterate",$o),r}const lH={__proto__:null,[Symbol.iterator](){return gl(this,Symbol.iterator,qt)},concat(...r){return Ln(this).concat(...r.map(e=>ge(e)?Ln(e):e))},entries(){return gl(this,"entries",r=>(r[1]=qt(r[1]),r))},every(r,e){return Hr(this,"every",r,e,void 0,arguments)},filter(r,e){return Hr(this,"filter",r,e,t=>t.map(qt),arguments)},find(r,e){return Hr(this,"find",r,e,qt,arguments)},findIndex(r,e){return Hr(this,"findIndex",r,e,void 0,arguments)},findLast(r,e){return Hr(this,"findLast",r,e,qt,arguments)},findLastIndex(r,e){return Hr(this,"findLastIndex",r,e,void 0,arguments)},forEach(r,e){return Hr(this,"forEach",r,e,void 0,arguments)},includes(...r){return ml(this,"includes",r)},indexOf(...r){return ml(this,"indexOf",r)},join(r){return Ln(this).join(r)},lastIndexOf(...r){return ml(this,"lastIndexOf",r)},map(r,e){return Hr(this,"map",r,e,void 0,arguments)},pop(){return Js(this,"pop")},push(...r){return Js(this,"push",r)},reduce(r,...e){return A0(this,"reduce",r,e)},reduceRight(r,...e){return A0(this,"reduceRight",r,e)},shift(){return Js(this,"shift")},some(r,e){return Hr(this,"some",r,e,void 0,arguments)},splice(...r){return Js(this,"splice",r)},toReversed(){return Ln(this).toReversed()},toSorted(r){return Ln(this).toSorted(r)},toSpliced(...r){return Ln(this).toSpliced(...r)},unshift(...r){return Js(this,"unshift",r)},values(){return gl(this,"values",qt)}};function gl(r,e,t){const i=Eu(r),n=i[e]();return i!==r&&!ur(r)&&(n._next=n.next,n.next=()=>{const s=n._next();return s.value&&(s.value=t(s.value)),s}),n}const cH=Array.prototype;function Hr(r,e,t,i,n,s){const o=Eu(r),a=o!==r&&!ur(r),u=o[e];if(u!==cH[e]){const d=u.apply(r,s);return a?qt(d):d}let l=t;o!==r&&(a?l=function(d,h){return t.call(this,qt(d),h,r)}:t.length>2&&(l=function(d,h){return t.call(this,d,h,r)}));const c=u.call(o,l,i);return a&&n?n(c):c}function A0(r,e,t,i){const n=Eu(r);let s=t;return n!==r&&(ur(r)?t.length>3&&(s=function(o,a,u){return t.call(this,o,a,u,r)}):s=function(o,a,u){return t.call(this,o,qt(a),u,r)}),n[e](s,...i)}function ml(r,e,t){const i=Me(r);xt(i,"iterate",$o);const n=i[e](...t);return(n===-1||n===!1)&&vw(t[0])?(t[0]=Me(t[0]),i[e](...t)):n}function Js(r,e,t=[]){Fi(),uw();const i=Me(r)[e].apply(r,t);return lw(),ki(),i}const dH=iw("__proto__,__v_isRef,__isVue"),Lj=new Set(Object.getOwnPropertyNames(Symbol).filter(r=>r!=="arguments"&&r!=="caller").map(r=>Symbol[r]).filter(si));function hH(r){si(r)||(r=String(r));const e=Me(this);return xt(e,"has",r),e.hasOwnProperty(r)}class zj{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){if(t==="__v_skip")return e.__v_skip;const n=this._isReadonly,s=this._isShallow;if(t==="__v_isReactive")return!n;if(t==="__v_isReadonly")return n;if(t==="__v_isShallow")return s;if(t==="__v_raw")return i===(n?s?EH:Vj:s?Uj:Wj).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=ge(e);if(!n){let u;if(o&&(u=lH[t]))return u;if(t==="hasOwnProperty")return hH}const a=Reflect.get(e,t,At(e)?e:i);return(si(t)?Lj.has(t):dH(t))||(n||xt(e,"get",t),s)?a:At(a)?o&&ow(t)?a:a.value:Ye(a)?n?Gj(a):Su(a):a}}class Hj extends zj{constructor(e=!1){super(!1,e)}set(e,t,i,n){let s=e[t];if(!this._isShallow){const u=cn(s);if(!ur(i)&&!cn(i)&&(s=Me(s),i=Me(i)),!ge(e)&&At(s)&&!At(i))return u?!1:(s.value=i,!0)}const o=ge(e)&&ow(t)?Number(t)r,Ca=r=>Reflect.getPrototypeOf(r);function mH(r,e,t){return function(...i){const n=this.__v_raw,s=Me(n),o=rs(s),a=r==="entries"||r===Symbol.iterator&&o,u=r==="keys"&&o,l=n[r](...i),c=t?$_:e?P_:qt;return!e&&xt(s,"iterate",u?T_:rn),{next(){const{value:d,done:h}=l.next();return h?{value:d,done:h}:{value:a?[c(d[0]),c(d[1])]:c(d),done:h}},[Symbol.iterator](){return this}}}}function xa(r){return function(...e){return r==="delete"?!1:r==="clear"?void 0:this}}function yH(r,e){const t={get(n){const s=this.__v_raw,o=Me(s),a=Me(n);r||(Oi(n,a)&&xt(o,"get",n),xt(o,"get",a));const{has:u}=Ca(o),l=e?$_:r?P_:qt;if(u.call(o,n))return l(s.get(n));if(u.call(o,a))return l(s.get(a));s!==o&&s.get(n)},get size(){const n=this.__v_raw;return!r&&xt(Me(n),"iterate",rn),Reflect.get(n,"size",n)},has(n){const s=this.__v_raw,o=Me(s),a=Me(n);return r||(Oi(n,a)&&xt(o,"has",n),xt(o,"has",a)),n===a?s.has(n):s.has(n)||s.has(a)},forEach(n,s){const o=this,a=o.__v_raw,u=Me(a),l=e?$_:r?P_:qt;return!r&&xt(u,"iterate",rn),a.forEach((c,d)=>n.call(s,l(c),l(d),o))}};return Mt(t,r?{add:xa("add"),set:xa("set"),delete:xa("delete"),clear:xa("clear")}:{add(n){!e&&!ur(n)&&!cn(n)&&(n=Me(n));const s=Me(this);return Ca(s).has.call(s,n)||(s.add(n),Vr(s,"add",n,n)),this},set(n,s){!e&&!ur(s)&&!cn(s)&&(s=Me(s));const o=Me(this),{has:a,get:u}=Ca(o);let l=a.call(o,n);l||(n=Me(n),l=a.call(o,n));const c=u.call(o,n);return o.set(n,s),l?Oi(s,c)&&Vr(o,"set",n,s):Vr(o,"add",n,s),this},delete(n){const s=Me(this),{has:o,get:a}=Ca(s);let u=o.call(s,n);u||(n=Me(n),u=o.call(s,n)),a&&a.call(s,n);const l=s.delete(n);return u&&Vr(s,"delete",n,void 0),l},clear(){const n=Me(this),s=n.size!==0,o=n.clear();return s&&Vr(n,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(n=>{t[n]=mH(n,r,e)}),t}function hw(r,e){const t=yH(r,e);return(i,n,s)=>n==="__v_isReactive"?!r:n==="__v_isReadonly"?r:n==="__v_raw"?i:Reflect.get(Ne(t,n)&&n in i?t:i,n,s)}const bH={get:hw(!1,!1)},_H={get:hw(!1,!0)},wH={get:hw(!0,!1)};const Wj=new WeakMap,Uj=new WeakMap,Vj=new WeakMap,EH=new WeakMap;function SH(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function OH(r){return r.__v_skip||!Object.isExtensible(r)?0:SH(X5(r))}function Su(r){return cn(r)?r:fw(r,!1,vH,bH,Wj)}function Kj(r){return fw(r,!1,gH,_H,Uj)}function Gj(r){return fw(r,!0,pH,wH,Vj)}function fw(r,e,t,i,n){if(!Ye(r)||r.__v_raw&&!(e&&r.__v_isReactive))return r;const s=n.get(r);if(s)return s;const o=OH(r);if(o===0)return r;const a=new Proxy(r,o===2?i:t);return n.set(r,a),a}function is(r){return cn(r)?is(r.__v_raw):!!(r&&r.__v_isReactive)}function cn(r){return!!(r&&r.__v_isReadonly)}function ur(r){return!!(r&&r.__v_isShallow)}function vw(r){return r?!!r.__v_raw:!1}function Me(r){const e=r&&r.__v_raw;return e?Me(e):r}function Yj(r){return!Ne(r,"__v_skip")&&Object.isExtensible(r)&&Pj(r,"__v_skip",!0),r}const qt=r=>Ye(r)?Su(r):r,P_=r=>Ye(r)?Gj(r):r;function At(r){return r?r.__v_isRef===!0:!1}function $t(r){return Xj(r,!1)}function IH(r){return Xj(r,!0)}function Xj(r,e){return At(r)?r:new TH(r,e)}class TH{constructor(e,t){this.dep=new dw,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Me(e),this._value=t?e:qt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,i=this.__v_isShallow||ur(e)||cn(e);e=i?e:Me(e),Oi(e,t)&&(this._rawValue=e,this._value=i?e:qt(e),this.dep.trigger())}}function tr(r){return At(r)?r.value:r}const $H={get:(r,e,t)=>e==="__v_raw"?r:tr(Reflect.get(r,e,t)),set:(r,e,t,i)=>{const n=r[e];return At(n)&&!At(t)?(n.value=t,!0):Reflect.set(r,e,t,i)}};function Jj(r){return is(r)?r:new Proxy(r,$H)}class PH{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new dw(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=To-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&He!==this)return Mj(this,!0),!0}get value(){const e=this.dep.track();return kj(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function RH(r,e,t=!1){let i,n;return be(r)?i=r:(i=r.get,n=r.set),new PH(i,n,t)}const qa={},Ja=new WeakMap;let Ji;function CH(r,e=!1,t=Ji){if(t){let i=Ja.get(t);i||Ja.set(t,i=[]),i.push(r)}}function xH(r,e,t=je){const{immediate:i,deep:n,once:s,scheduler:o,augmentJob:a,call:u}=t,l=m=>n?m:ur(m)||n===!1||n===0?Kr(m,1):Kr(m);let c,d,h,f,v=!1,p=!1;if(At(r)?(d=()=>r.value,v=ur(r)):is(r)?(d=()=>l(r),v=!0):ge(r)?(p=!0,v=r.some(m=>is(m)||ur(m)),d=()=>r.map(m=>{if(At(m))return m.value;if(is(m))return l(m);if(be(m))return u?u(m,2):m()})):be(r)?e?d=u?()=>u(r,2):r:d=()=>{if(h){Fi();try{h()}finally{ki()}}const m=Ji;Ji=c;try{return u?u(r,3,[f]):r(f)}finally{Ji=m}}:d=Nr,e&&n){const m=d,E=n===!0?1/0:n;d=()=>Kr(m(),E)}const _=oH(),y=()=>{c.stop(),_&&_.active&&sw(_.effects,c)};if(s&&e){const m=e;e=(...E)=>{m(...E),y()}}let g=p?new Array(r.length).fill(qa):qa;const b=m=>{if(!(!(c.flags&1)||!c.dirty&&!m))if(e){const E=c.run();if(n||v||(p?E.some((O,I)=>Oi(O,g[I])):Oi(E,g))){h&&h();const O=Ji;Ji=c;try{const I=[E,g===qa?void 0:p&&g[0]===qa?[]:g,f];u?u(e,3,I):e(...I),g=E}finally{Ji=O}}}else c.run()};return a&&a(b),c=new Dj(d),c.scheduler=o?()=>o(b,!1):b,f=m=>CH(m,!1,c),h=c.onStop=()=>{const m=Ja.get(c);if(m){if(u)u(m,4);else for(const E of m)E();Ja.delete(c)}},e?i?b(!0):g=c.run():o?o(b.bind(null,!0),!0):c.run(),y.pause=c.pause.bind(c),y.resume=c.resume.bind(c),y.stop=y,y}function Kr(r,e=1/0,t){if(e<=0||!Ye(r)||r.__v_skip||(t=t||new Set,t.has(r)))return r;if(t.add(r),e--,At(r))Kr(r.value,e,t);else if(ge(r))for(let i=0;i{Kr(i,e,t)});else if(Tj(r)){for(const i in r)Kr(r[i],e,t);for(const i of Object.getOwnPropertySymbols(r))Object.prototype.propertyIsEnumerable.call(r,i)&&Kr(r[i],e,t)}return r}/** -* @vue/runtime-core v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Vo(r,e,t,i){try{return i?r(...i):r()}catch(n){Ou(n,e,t)}}function Br(r,e,t,i){if(be(r)){const n=Vo(r,e,t,i);return n&&Oj(n)&&n.catch(s=>{Ou(s,e,t)}),n}if(ge(r)){const n=[];for(let s=0;s>>1,n=jt[i],s=Po(n);s=Po(t)?jt.push(r):jt.splice(DH(e),0,r),r.flags|=1,eL()}}function eL(){Qa||(Qa=Qj.then(rL))}function AH(r){ge(r)?ns.push(...r):mi&&r.id===-1?mi.splice(Vn+1,0,r):r.flags&1||(ns.push(r),r.flags|=1),eL()}function M0(r,e,t=Rr+1){for(;tPo(t)-Po(i));if(ns.length=0,mi){mi.push(...e);return}for(mi=e,Vn=0;Vnr.id==null?r.flags&2?-1:1/0:r.id;function rL(r){try{for(Rr=0;Rr{i._d&&W0(-1);const s=Za(e);let o;try{o=r(...n)}finally{Za(s),i._d&&W0(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function so(r,e){if(Dt===null)return r;const t=Ru(Dt),i=r.dirs||(r.dirs=[]);for(let n=0;nr.__isTeleport;function gw(r,e){r.shapeFlag&6&&r.component?(r.transition=e,gw(r.component.subTree,e)):r.shapeFlag&128?(r.ssContent.transition=e.clone(r.ssContent),r.ssFallback.transition=e.clone(r.ssFallback)):r.transition=e}/*! #__NO_SIDE_EFFECTS__ */function Or(r,e){return be(r)?Mt({name:r.name},e,{setup:r}):r}function nL(r){r.ids=[r.ids[0]+r.ids[2]+++"-",0,0]}function eu(r,e,t,i,n=!1){if(ge(r)){r.forEach((v,p)=>eu(v,e&&(ge(e)?e[p]:e),t,i,n));return}if(ss(i)&&!n){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&eu(r,e,t,i.component.subTree);return}const s=i.shapeFlag&4?Ru(i.component):i.el,o=n?null:s,{i:a,r:u}=r,l=e&&e.r,c=a.refs===je?a.refs={}:a.refs,d=a.setupState,h=Me(d),f=d===je?()=>!1:v=>Ne(h,v);if(l!=null&&l!==u&&(lt(l)?(c[l]=null,f(l)&&(d[l]=null)):At(l)&&(l.value=null)),be(u))Vo(u,a,12,[o,c]);else{const v=lt(u),p=At(u);if(v||p){const _=()=>{if(r.f){const y=v?f(u)?d[u]:c[u]:u.value;n?ge(y)&&sw(y,s):ge(y)?y.includes(s)||y.push(s):v?(c[u]=[s],f(u)&&(d[u]=c[u])):(u.value=[s],r.k&&(c[r.k]=u.value))}else v?(c[u]=o,f(u)&&(d[u]=o)):p&&(u.value=o,r.k&&(c[r.k]=o))};o?(_.id=-1,Zt(_,t)):_()}}}_u().requestIdleCallback;_u().cancelIdleCallback;const ss=r=>!!r.type.__asyncLoader,sL=r=>r.type.__isKeepAlive;function FH(r,e){oL(r,"a",e)}function kH(r,e){oL(r,"da",e)}function oL(r,e,t=zt){const i=r.__wdc||(r.__wdc=()=>{let n=t;for(;n;){if(n.isDeactivated)return;n=n.parent}return r()});if(Tu(e,i,t),t){let n=t.parent;for(;n&&n.parent;)sL(n.parent.vnode)&&BH(i,e,t,n),n=n.parent}}function BH(r,e,t,i){const n=Tu(e,r,i,!0);aL(()=>{sw(i[e],n)},t)}function Tu(r,e,t=zt,i=!1){if(t){const n=t[r]||(t[r]=[]),s=e.__weh||(e.__weh=(...o)=>{Fi();const a=Ko(t),u=Br(e,t,r,o);return a(),ki(),u});return i?n.unshift(s):n.push(s),s}}const oi=r=>(e,t=zt)=>{(!xo||r==="sp")&&Tu(r,(...i)=>e(...i),t)},jH=oi("bm"),mw=oi("m"),LH=oi("bu"),zH=oi("u"),HH=oi("bum"),aL=oi("um"),WH=oi("sp"),UH=oi("rtg"),VH=oi("rtc");function KH(r,e=zt){Tu("ec",r,e)}const GH=Symbol.for("v-ndc");function vo(r,e,t,i){let n;const s=t,o=ge(r);if(o||lt(r)){const a=o&&is(r);let u=!1;a&&(u=!ur(r),r=Eu(r)),n=new Array(r.length);for(let l=0,c=r.length;le(a,u,void 0,s));else{const a=Object.keys(r);n=new Array(a.length);for(let u=0,l=a.length;uCo(e)?!(e.type===qi||e.type===pt&&!uL(e.children)):!0)?r:null}const R_=r=>r?RL(r)?Ru(r):R_(r.parent):null,po=Mt(Object.create(null),{$:r=>r,$el:r=>r.vnode.el,$data:r=>r.data,$props:r=>r.props,$attrs:r=>r.attrs,$slots:r=>r.slots,$refs:r=>r.refs,$parent:r=>R_(r.parent),$root:r=>R_(r.root),$host:r=>r.ce,$emit:r=>r.emit,$options:r=>cL(r),$forceUpdate:r=>r.f||(r.f=()=>{pw(r.update)}),$nextTick:r=>r.n||(r.n=Zj.bind(r.proxy)),$watch:r=>gW.bind(r)}),yl=(r,e)=>r!==je&&!r.__isScriptSetup&&Ne(r,e),XH={get({_:r},e){if(e==="__v_skip")return!0;const{ctx:t,setupState:i,data:n,props:s,accessCache:o,type:a,appContext:u}=r;let l;if(e[0]!=="$"){const f=o[e];if(f!==void 0)switch(f){case 1:return i[e];case 2:return n[e];case 4:return t[e];case 3:return s[e]}else{if(yl(i,e))return o[e]=1,i[e];if(n!==je&&Ne(n,e))return o[e]=2,n[e];if((l=r.propsOptions[0])&&Ne(l,e))return o[e]=3,s[e];if(t!==je&&Ne(t,e))return o[e]=4,t[e];C_&&(o[e]=0)}}const c=po[e];let d,h;if(c)return e==="$attrs"&&xt(r.attrs,"get",""),c(r);if((d=a.__cssModules)&&(d=d[e]))return d;if(t!==je&&Ne(t,e))return o[e]=4,t[e];if(h=u.config.globalProperties,Ne(h,e))return h[e]},set({_:r},e,t){const{data:i,setupState:n,ctx:s}=r;return yl(n,e)?(n[e]=t,!0):i!==je&&Ne(i,e)?(i[e]=t,!0):Ne(r.props,e)||e[0]==="$"&&e.slice(1)in r?!1:(s[e]=t,!0)},has({_:{data:r,setupState:e,accessCache:t,ctx:i,appContext:n,propsOptions:s}},o){let a;return!!t[o]||r!==je&&Ne(r,o)||yl(e,o)||(a=s[0])&&Ne(a,o)||Ne(i,o)||Ne(po,o)||Ne(n.config.globalProperties,o)},defineProperty(r,e,t){return t.get!=null?r._.accessCache[e]=0:Ne(t,"value")&&this.set(r,e,t.value,null),Reflect.defineProperty(r,e,t)}};function N0(r){return ge(r)?r.reduce((e,t)=>(e[t]=null,e),{}):r}let C_=!0;function JH(r){const e=cL(r),t=r.proxy,i=r.ctx;C_=!1,e.beforeCreate&&F0(e.beforeCreate,r,"bc");const{data:n,computed:s,methods:o,watch:a,provide:u,inject:l,created:c,beforeMount:d,mounted:h,beforeUpdate:f,updated:v,activated:p,deactivated:_,beforeDestroy:y,beforeUnmount:g,destroyed:b,unmounted:m,render:E,renderTracked:O,renderTriggered:I,errorCaptured:w,serverPrefetch:S,expose:T,inheritAttrs:R,components:x,directives:C,filters:D}=e;if(l&&QH(l,i,null),o)for(const H in o){const Z=o[H];be(Z)&&(i[H]=Z.bind(t))}if(n){const H=n.call(t,t);Ye(H)&&(r.data=Su(H))}if(C_=!0,s)for(const H in s){const Z=s[H],ve=be(Z)?Z.bind(t,t):be(Z.get)?Z.get.bind(t,t):Nr,we=!be(Z)&&be(Z.set)?Z.set.bind(t):Nr,te=br({get:ve,set:we});Object.defineProperty(i,H,{enumerable:!0,configurable:!0,get:()=>te.value,set:me=>te.value=me})}if(a)for(const H in a)lL(a[H],i,t,H);if(u){const H=be(u)?u.call(t):u;Reflect.ownKeys(H).forEach(Z=>{Ha(Z,H[Z])})}c&&F0(c,r,"c");function ee(H,Z){ge(Z)?Z.forEach(ve=>H(ve.bind(t))):Z&&H(Z.bind(t))}if(ee(jH,d),ee(mw,h),ee(LH,f),ee(zH,v),ee(FH,p),ee(kH,_),ee(KH,w),ee(VH,O),ee(UH,I),ee(HH,g),ee(aL,m),ee(WH,S),ge(T))if(T.length){const H=r.exposed||(r.exposed={});T.forEach(Z=>{Object.defineProperty(H,Z,{get:()=>t[Z],set:ve=>t[Z]=ve})})}else r.exposed||(r.exposed={});E&&r.render===Nr&&(r.render=E),R!=null&&(r.inheritAttrs=R),x&&(r.components=x),C&&(r.directives=C),S&&nL(r)}function QH(r,e,t=Nr){ge(r)&&(r=x_(r));for(const i in r){const n=r[i];let s;Ye(n)?"default"in n?s=Xr(n.from||i,n.default,!0):s=Xr(n.from||i):s=Xr(n),At(s)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>s.value,set:o=>s.value=o}):e[i]=s}}function F0(r,e,t){Br(ge(r)?r.map(i=>i.bind(e.proxy)):r.bind(e.proxy),e,t)}function lL(r,e,t,i){let n=i.includes(".")?OL(t,i):()=>t[i];if(lt(r)){const s=e[r];be(s)&&Wa(n,s)}else if(be(r))Wa(n,r.bind(t));else if(Ye(r))if(ge(r))r.forEach(s=>lL(s,e,t,i));else{const s=be(r.handler)?r.handler.bind(t):e[r.handler];be(s)&&Wa(n,s,r)}}function cL(r){const e=r.type,{mixins:t,extends:i}=e,{mixins:n,optionsCache:s,config:{optionMergeStrategies:o}}=r.appContext,a=s.get(e);let u;return a?u=a:!n.length&&!t&&!i?u=e:(u={},n.length&&n.forEach(l=>tu(u,l,o,!0)),tu(u,e,o)),Ye(e)&&s.set(e,u),u}function tu(r,e,t,i=!1){const{mixins:n,extends:s}=e;s&&tu(r,s,t,!0),n&&n.forEach(o=>tu(r,o,t,!0));for(const o in e)if(!(i&&o==="expose")){const a=ZH[o]||t&&t[o];r[o]=a?a(r[o],e[o]):e[o]}return r}const ZH={data:k0,props:B0,emits:B0,methods:oo,computed:oo,beforeCreate:Nt,created:Nt,beforeMount:Nt,mounted:Nt,beforeUpdate:Nt,updated:Nt,beforeDestroy:Nt,beforeUnmount:Nt,destroyed:Nt,unmounted:Nt,activated:Nt,deactivated:Nt,errorCaptured:Nt,serverPrefetch:Nt,components:oo,directives:oo,watch:tW,provide:k0,inject:eW};function k0(r,e){return e?r?function(){return Mt(be(r)?r.call(this,this):r,be(e)?e.call(this,this):e)}:e:r}function eW(r,e){return oo(x_(r),x_(e))}function x_(r){if(ge(r)){const e={};for(let t=0;t1)return t&&be(e)?e.call(i&&i.proxy):e}}const hL={},fL=()=>Object.create(hL),vL=r=>Object.getPrototypeOf(r)===hL;function nW(r,e,t,i=!1){const n={},s=fL();r.propsDefaults=Object.create(null),pL(r,e,n,s);for(const o in r.propsOptions[0])o in n||(n[o]=void 0);t?r.props=i?n:Kj(n):r.type.props?r.props=n:r.props=s,r.attrs=s}function sW(r,e,t,i){const{props:n,attrs:s,vnode:{patchFlag:o}}=r,a=Me(n),[u]=r.propsOptions;let l=!1;if((i||o>0)&&!(o&16)){if(o&8){const c=r.vnode.dynamicProps;for(let d=0;d{u=!0;const[h,f]=gL(d,e,!0);Mt(o,h),f&&a.push(...f)};!t&&e.mixins.length&&e.mixins.forEach(c),r.extends&&c(r.extends),r.mixins&&r.mixins.forEach(c)}if(!s&&!u)return Ye(r)&&i.set(r,ts),ts;if(ge(s))for(let c=0;cr[0]==="_"||r==="$stable",yw=r=>ge(r)?r.map(xr):[xr(r)],aW=(r,e,t)=>{if(e._n)return e;const i=Iu((...n)=>yw(e(...n)),t);return i._c=!1,i},yL=(r,e,t)=>{const i=r._ctx;for(const n in r){if(mL(n))continue;const s=r[n];if(be(s))e[n]=aW(n,s,i);else if(s!=null){const o=yw(s);e[n]=()=>o}}},bL=(r,e)=>{const t=yw(e);r.slots.default=()=>t},_L=(r,e,t)=>{for(const i in e)(t||i!=="_")&&(r[i]=e[i])},uW=(r,e,t)=>{const i=r.slots=fL();if(r.vnode.shapeFlag&32){const n=e._;n?(_L(i,e,t),t&&Pj(i,"_",n,!0)):yL(e,i)}else e&&bL(r,e)},lW=(r,e,t)=>{const{vnode:i,slots:n}=r;let s=!0,o=je;if(i.shapeFlag&32){const a=e._;a?t&&a===1?s=!1:_L(n,e,t):(s=!e.$stable,yL(e,n)),o=e}else e&&(bL(r,e),o={default:1});if(s)for(const a in n)!mL(a)&&o[a]==null&&delete n[a]},Zt=SW;function cW(r){return dW(r)}function dW(r,e){const t=_u();t.__VUE__=!0;const{insert:i,remove:n,patchProp:s,createElement:o,createText:a,createComment:u,setText:l,setElementText:c,parentNode:d,nextSibling:h,setScopeId:f=Nr,insertStaticContent:v}=r,p=($,P,q,F=null,k=null,N=null,K=void 0,X=null,U=!!P.dynamicChildren)=>{if($===P)return;$&&!Qs($,P)&&(F=A($),me($,k,N,!0),$=null),P.patchFlag===-2&&(U=!1,P.dynamicChildren=null);const{type:B,ref:ce,shapeFlag:J}=P;switch(B){case Pu:_($,P,q,F);break;case qi:y($,P,q,F);break;case _l:$==null&&g(P,q,F,K);break;case pt:x($,P,q,F,k,N,K,X,U);break;default:J&1?E($,P,q,F,k,N,K,X,U):J&6?C($,P,q,F,k,N,K,X,U):(J&64||J&128)&&B.process($,P,q,F,k,N,K,X,U,ie)}ce!=null&&k&&eu(ce,$&&$.ref,N,P||$,!P)},_=($,P,q,F)=>{if($==null)i(P.el=a(P.children),q,F);else{const k=P.el=$.el;P.children!==$.children&&l(k,P.children)}},y=($,P,q,F)=>{$==null?i(P.el=u(P.children||""),q,F):P.el=$.el},g=($,P,q,F)=>{[$.el,$.anchor]=v($.children,P,q,F,$.el,$.anchor)},b=({el:$,anchor:P},q,F)=>{let k;for(;$&&$!==P;)k=h($),i($,q,F),$=k;i(P,q,F)},m=({el:$,anchor:P})=>{let q;for(;$&&$!==P;)q=h($),n($),$=q;n(P)},E=($,P,q,F,k,N,K,X,U)=>{P.type==="svg"?K="svg":P.type==="math"&&(K="mathml"),$==null?O(P,q,F,k,N,K,X,U):S($,P,k,N,K,X,U)},O=($,P,q,F,k,N,K,X)=>{let U,B;const{props:ce,shapeFlag:J,transition:oe,dirs:he}=$;if(U=$.el=o($.type,N,ce&&ce.is,ce),J&8?c(U,$.children):J&16&&w($.children,U,null,F,k,bl($,N),K,X),he&&Ki($,null,F,"created"),I(U,$,$.scopeId,K,F),ce){for(const qe in ce)qe!=="value"&&!co(qe)&&s(U,qe,null,ce[qe],N,F);"value"in ce&&s(U,"value",null,ce.value,N),(B=ce.onVnodeBeforeMount)&&$r(B,F,$)}he&&Ki($,null,F,"beforeMount");const Oe=hW(k,oe);Oe&&oe.beforeEnter(U),i(U,P,q),((B=ce&&ce.onVnodeMounted)||Oe||he)&&Zt(()=>{B&&$r(B,F,$),Oe&&oe.enter(U),he&&Ki($,null,F,"mounted")},k)},I=($,P,q,F,k)=>{if(q&&f($,q),F)for(let N=0;N{for(let B=U;B<$.length;B++){const ce=$[B]=X?yi($[B]):xr($[B]);p(null,ce,P,q,F,k,N,K,X)}},S=($,P,q,F,k,N,K)=>{const X=P.el=$.el;let{patchFlag:U,dynamicChildren:B,dirs:ce}=P;U|=$.patchFlag&16;const J=$.props||je,oe=P.props||je;let he;if(q&&Gi(q,!1),(he=oe.onVnodeBeforeUpdate)&&$r(he,q,P,$),ce&&Ki(P,$,q,"beforeUpdate"),q&&Gi(q,!0),(J.innerHTML&&oe.innerHTML==null||J.textContent&&oe.textContent==null)&&c(X,""),B?T($.dynamicChildren,B,X,q,F,bl(P,k),N):K||Z($,P,X,null,q,F,bl(P,k),N,!1),U>0){if(U&16)R(X,J,oe,q,k);else if(U&2&&J.class!==oe.class&&s(X,"class",null,oe.class,k),U&4&&s(X,"style",J.style,oe.style,k),U&8){const Oe=P.dynamicProps;for(let qe=0;qe{he&&$r(he,q,P,$),ce&&Ki(P,$,q,"updated")},F)},T=($,P,q,F,k,N,K)=>{for(let X=0;X{if(P!==q){if(P!==je)for(const N in P)!co(N)&&!(N in q)&&s($,N,P[N],null,k,F);for(const N in q){if(co(N))continue;const K=q[N],X=P[N];K!==X&&N!=="value"&&s($,N,X,K,k,F)}"value"in q&&s($,"value",P.value,q.value,k)}},x=($,P,q,F,k,N,K,X,U)=>{const B=P.el=$?$.el:a(""),ce=P.anchor=$?$.anchor:a("");let{patchFlag:J,dynamicChildren:oe,slotScopeIds:he}=P;he&&(X=X?X.concat(he):he),$==null?(i(B,q,F),i(ce,q,F),w(P.children||[],q,ce,k,N,K,X,U)):J>0&&J&64&&oe&&$.dynamicChildren?(T($.dynamicChildren,oe,q,k,N,K,X),(P.key!=null||k&&P===k.subTree)&&wL($,P,!0)):Z($,P,q,ce,k,N,K,X,U)},C=($,P,q,F,k,N,K,X,U)=>{P.slotScopeIds=X,$==null?P.shapeFlag&512?k.ctx.activate(P,q,F,K,U):D(P,q,F,k,N,K,U):j($,P,U)},D=($,P,q,F,k,N,K)=>{const X=$.component=CW($,F,k);if(sL($)&&(X.ctx.renderer=ie),xW(X,!1,K),X.asyncDep){if(k&&k.registerDep(X,ee,K),!$.el){const U=X.subTree=yt(qi);y(null,U,P,q)}}else ee(X,$,P,q,k,N,K)},j=($,P,q)=>{const F=P.component=$.component;if(wW($,P,q))if(F.asyncDep&&!F.asyncResolved){H(F,P,q);return}else F.next=P,F.update();else P.el=$.el,F.vnode=P},ee=($,P,q,F,k,N,K)=>{const X=()=>{if($.isMounted){let{next:J,bu:oe,u:he,parent:Oe,vnode:qe}=$;{const V=EL($);if(V){J&&(J.el=qe.el,H($,J,K)),V.asyncDep.then(()=>{$.isUnmounted||X()});return}}let Re=J,vt;Gi($,!1),J?(J.el=qe.el,H($,J,K)):J=qe,oe&&za(oe),(vt=J.props&&J.props.onVnodeBeforeUpdate)&&$r(vt,Oe,J,qe),Gi($,!0);const st=z0($),ae=$.subTree;$.subTree=st,p(ae,st,d(ae.el),A(ae),$,k,N),J.el=st.el,Re===null&&EW($,st.el),he&&Zt(he,k),(vt=J.props&&J.props.onVnodeUpdated)&&Zt(()=>$r(vt,Oe,J,qe),k)}else{let J;const{el:oe,props:he}=P,{bm:Oe,m:qe,parent:Re,root:vt,type:st}=$,ae=ss(P);Gi($,!1),Oe&&za(Oe),!ae&&(J=he&&he.onVnodeBeforeMount)&&$r(J,Re,P),Gi($,!0);{vt.ce&&vt.ce._injectChildStyle(st);const V=$.subTree=z0($);p(null,V,q,F,$,k,N),P.el=V.el}if(qe&&Zt(qe,k),!ae&&(J=he&&he.onVnodeMounted)){const V=P;Zt(()=>$r(J,Re,V),k)}(P.shapeFlag&256||Re&&ss(Re.vnode)&&Re.vnode.shapeFlag&256)&&$.a&&Zt($.a,k),$.isMounted=!0,P=q=F=null}};$.scope.on();const U=$.effect=new Dj(X);$.scope.off();const B=$.update=U.run.bind(U),ce=$.job=U.runIfDirty.bind(U);ce.i=$,ce.id=$.uid,U.scheduler=()=>pw(ce),Gi($,!0),B()},H=($,P,q)=>{P.component=$;const F=$.vnode.props;$.vnode=P,$.next=null,sW($,P.props,F,q),lW($,P.children,q),Fi(),M0($),ki()},Z=($,P,q,F,k,N,K,X,U=!1)=>{const B=$&&$.children,ce=$?$.shapeFlag:0,J=P.children,{patchFlag:oe,shapeFlag:he}=P;if(oe>0){if(oe&128){we(B,J,q,F,k,N,K,X,U);return}else if(oe&256){ve(B,J,q,F,k,N,K,X,U);return}}he&8?(ce&16&&_e(B,k,N),J!==B&&c(q,J)):ce&16?he&16?we(B,J,q,F,k,N,K,X,U):_e(B,k,N,!0):(ce&8&&c(q,""),he&16&&w(J,q,F,k,N,K,X,U))},ve=($,P,q,F,k,N,K,X,U)=>{$=$||ts,P=P||ts;const B=$.length,ce=P.length,J=Math.min(B,ce);let oe;for(oe=0;oece?_e($,k,N,!0,!1,J):w(P,q,F,k,N,K,X,U,J)},we=($,P,q,F,k,N,K,X,U)=>{let B=0;const ce=P.length;let J=$.length-1,oe=ce-1;for(;B<=J&&B<=oe;){const he=$[B],Oe=P[B]=U?yi(P[B]):xr(P[B]);if(Qs(he,Oe))p(he,Oe,q,null,k,N,K,X,U);else break;B++}for(;B<=J&&B<=oe;){const he=$[J],Oe=P[oe]=U?yi(P[oe]):xr(P[oe]);if(Qs(he,Oe))p(he,Oe,q,null,k,N,K,X,U);else break;J--,oe--}if(B>J){if(B<=oe){const he=oe+1,Oe=heoe)for(;B<=J;)me($[B],k,N,!0),B++;else{const he=B,Oe=B,qe=new Map;for(B=Oe;B<=oe;B++){const ne=P[B]=U?yi(P[B]):xr(P[B]);ne.key!=null&&qe.set(ne.key,B)}let Re,vt=0;const st=oe-Oe+1;let ae=!1,V=0;const Q=new Array(st);for(B=0;B=st){me(ne,k,N,!0);continue}let Ee;if(ne.key!=null)Ee=qe.get(ne.key);else for(Re=Oe;Re<=oe;Re++)if(Q[Re-Oe]===0&&Qs(ne,P[Re])){Ee=Re;break}Ee===void 0?me(ne,k,N,!0):(Q[Ee-Oe]=B+1,Ee>=V?V=Ee:ae=!0,p(ne,P[Ee],q,null,k,N,K,X,U),vt++)}const re=ae?fW(Q):ts;for(Re=re.length-1,B=st-1;B>=0;B--){const ne=Oe+B,Ee=P[ne],vi=ne+1{const{el:N,type:K,transition:X,children:U,shapeFlag:B}=$;if(B&6){te($.component.subTree,P,q,F);return}if(B&128){$.suspense.move(P,q,F);return}if(B&64){K.move($,P,q,ie);return}if(K===pt){i(N,P,q);for(let J=0;JX.enter(N),k);else{const{leave:J,delayLeave:oe,afterLeave:he}=X,Oe=()=>i(N,P,q),qe=()=>{J(N,()=>{Oe(),he&&he()})};oe?oe(N,Oe,qe):qe()}else i(N,P,q)},me=($,P,q,F=!1,k=!1)=>{const{type:N,props:K,ref:X,children:U,dynamicChildren:B,shapeFlag:ce,patchFlag:J,dirs:oe,cacheIndex:he}=$;if(J===-2&&(k=!1),X!=null&&eu(X,null,q,$,!0),he!=null&&(P.renderCache[he]=void 0),ce&256){P.ctx.deactivate($);return}const Oe=ce&1&&oe,qe=!ss($);let Re;if(qe&&(Re=K&&K.onVnodeBeforeUnmount)&&$r(Re,P,$),ce&6)nt($.component,q,F);else{if(ce&128){$.suspense.unmount(q,F);return}Oe&&Ki($,null,P,"beforeUnmount"),ce&64?$.type.remove($,P,q,ie,F):B&&!B.hasOnce&&(N!==pt||J>0&&J&64)?_e(B,P,q,!1,!0):(N===pt&&J&384||!k&&ce&16)&&_e(U,P,q),F&&xe($)}(qe&&(Re=K&&K.onVnodeUnmounted)||Oe)&&Zt(()=>{Re&&$r(Re,P,$),Oe&&Ki($,null,P,"unmounted")},q)},xe=$=>{const{type:P,el:q,anchor:F,transition:k}=$;if(P===pt){De(q,F);return}if(P===_l){m($);return}const N=()=>{n(q),k&&!k.persisted&&k.afterLeave&&k.afterLeave()};if($.shapeFlag&1&&k&&!k.persisted){const{leave:K,delayLeave:X}=k,U=()=>K(q,N);X?X($.el,N,U):U()}else N()},De=($,P)=>{let q;for(;$!==P;)q=h($),n($),$=q;n(P)},nt=($,P,q)=>{const{bum:F,scope:k,job:N,subTree:K,um:X,m:U,a:B}=$;L0(U),L0(B),F&&za(F),k.stop(),N&&(N.flags|=8,me(K,$,P,q)),X&&Zt(X,P),Zt(()=>{$.isUnmounted=!0},P),P&&P.pendingBranch&&!P.isUnmounted&&$.asyncDep&&!$.asyncResolved&&$.suspenseId===P.pendingId&&(P.deps--,P.deps===0&&P.resolve())},_e=($,P,q,F=!1,k=!1,N=0)=>{for(let K=N;K<$.length;K++)me($[K],P,q,F,k)},A=$=>{if($.shapeFlag&6)return A($.component.subTree);if($.shapeFlag&128)return $.suspense.next();const P=h($.anchor||$.el),q=P&&P[MH];return q?h(q):P};let W=!1;const Y=($,P,q)=>{$==null?P._vnode&&me(P._vnode,null,null,!0):p(P._vnode||null,$,P,null,null,null,q),P._vnode=$,W||(W=!0,M0(),tL(),W=!1)},ie={p,um:me,m:te,r:xe,mt:D,mc:w,pc:Z,pbc:T,n:A,o:r};return{render:Y,hydrate:void 0,createApp:iW(Y)}}function bl({type:r,props:e},t){return t==="svg"&&r==="foreignObject"||t==="mathml"&&r==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:t}function Gi({effect:r,job:e},t){t?(r.flags|=32,e.flags|=4):(r.flags&=-33,e.flags&=-5)}function hW(r,e){return(!r||r&&!r.pendingBranch)&&e&&!e.persisted}function wL(r,e,t=!1){const i=r.children,n=e.children;if(ge(i)&&ge(n))for(let s=0;s>1,r[t[a]]0&&(e[i]=t[s-1]),t[s]=i)}}for(s=t.length,o=t[s-1];s-- >0;)t[s]=o,o=e[o];return t}function EL(r){const e=r.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:EL(e)}function L0(r){if(r)for(let e=0;eXr(vW);function Wa(r,e,t){return SL(r,e,t)}function SL(r,e,t=je){const{immediate:i,deep:n,flush:s,once:o}=t,a=Mt({},t),u=e&&i||!e&&s!=="post";let l;if(xo){if(s==="sync"){const f=pW();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!u){const f=()=>{};return f.stop=Nr,f.resume=Nr,f.pause=Nr,f}}const c=zt;a.call=(f,v,p)=>Br(f,c,v,p);let d=!1;s==="post"?a.scheduler=f=>{Zt(f,c&&c.suspense)}:s!=="sync"&&(d=!0,a.scheduler=(f,v)=>{v?f():pw(f)}),a.augmentJob=f=>{e&&(f.flags|=4),d&&(f.flags|=2,c&&(f.id=c.uid,f.i=c))};const h=xH(r,e,a);return xo&&(l?l.push(h):u&&h()),h}function gW(r,e,t){const i=this.proxy,n=lt(r)?r.includes(".")?OL(i,r):()=>i[r]:r.bind(i,i);let s;be(e)?s=e:(s=e.handler,t=e);const o=Ko(this),a=SL(n,s.bind(i),t);return o(),a}function OL(r,e){const t=e.split(".");return()=>{let i=r;for(let n=0;ne==="modelValue"||e==="model-value"?r.modelModifiers:r[`${e}Modifiers`]||r[`${xi(e)}Modifiers`]||r[`${bn(e)}Modifiers`];function yW(r,e,...t){if(r.isUnmounted)return;const i=r.vnode.props||je;let n=t;const s=e.startsWith("update:"),o=s&&mW(i,e.slice(7));o&&(o.trim&&(n=t.map(c=>lt(c)?c.trim():c)),o.number&&(n=t.map(S_)));let a,u=i[a=fl(e)]||i[a=fl(xi(e))];!u&&s&&(u=i[a=fl(bn(e))]),u&&Br(u,r,6,n);const l=i[a+"Once"];if(l){if(!r.emitted)r.emitted={};else if(r.emitted[a])return;r.emitted[a]=!0,Br(l,r,6,n)}}function IL(r,e,t=!1){const i=e.emitsCache,n=i.get(r);if(n!==void 0)return n;const s=r.emits;let o={},a=!1;if(!be(r)){const u=l=>{const c=IL(l,e,!0);c&&(a=!0,Mt(o,c))};!t&&e.mixins.length&&e.mixins.forEach(u),r.extends&&u(r.extends),r.mixins&&r.mixins.forEach(u)}return!s&&!a?(Ye(r)&&i.set(r,null),null):(ge(s)?s.forEach(u=>o[u]=null):Mt(o,s),Ye(r)&&i.set(r,o),o)}function $u(r,e){return!r||!mu(e)?!1:(e=e.slice(2).replace(/Once$/,""),Ne(r,e[0].toLowerCase()+e.slice(1))||Ne(r,bn(e))||Ne(r,e))}function z0(r){const{type:e,vnode:t,proxy:i,withProxy:n,propsOptions:[s],slots:o,attrs:a,emit:u,render:l,renderCache:c,props:d,data:h,setupState:f,ctx:v,inheritAttrs:p}=r,_=Za(r);let y,g;try{if(t.shapeFlag&4){const m=n||i,E=m;y=xr(l.call(E,m,c,d,f,h,v)),g=a}else{const m=e;y=xr(m.length>1?m(d,{attrs:a,slots:o,emit:u}):m(d,null)),g=e.props?a:bW(a)}}catch(m){go.length=0,Ou(m,r,1),y=yt(qi)}let b=y;if(g&&p!==!1){const m=Object.keys(g),{shapeFlag:E}=b;m.length&&E&7&&(s&&m.some(nw)&&(g=_W(g,s)),b=hs(b,g,!1,!0))}return t.dirs&&(b=hs(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(t.dirs):t.dirs),t.transition&&gw(b,t.transition),y=b,Za(_),y}const bW=r=>{let e;for(const t in r)(t==="class"||t==="style"||mu(t))&&((e||(e={}))[t]=r[t]);return e},_W=(r,e)=>{const t={};for(const i in r)(!nw(i)||!(i.slice(9)in e))&&(t[i]=r[i]);return t};function wW(r,e,t){const{props:i,children:n,component:s}=r,{props:o,children:a,patchFlag:u}=e,l=s.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&u>=0){if(u&1024)return!0;if(u&16)return i?H0(i,o,l):!!o;if(u&8){const c=e.dynamicProps;for(let d=0;dr.__isSuspense;function SW(r,e){e&&e.pendingBranch?ge(r)?e.effects.push(...r):e.effects.push(r):AH(r)}const pt=Symbol.for("v-fgt"),Pu=Symbol.for("v-txt"),qi=Symbol.for("v-cmt"),_l=Symbol.for("v-stc"),go=[];let rr=null;function Ge(r=!1){go.push(rr=r?null:[])}function OW(){go.pop(),rr=go[go.length-1]||null}let Ro=1;function W0(r,e=!1){Ro+=r,r<0&&rr&&e&&(rr.hasOnce=!0)}function $L(r){return r.dynamicChildren=Ro>0?rr||ts:null,OW(),Ro>0&&rr&&rr.push(r),r}function Ct(r,e,t,i,n,s){return $L(se(r,e,t,i,n,s,!0))}function Di(r,e,t,i,n){return $L(yt(r,e,t,i,n,!0))}function Co(r){return r?r.__v_isVNode===!0:!1}function Qs(r,e){return r.type===e.type&&r.key===e.key}const PL=({key:r})=>r??null,Ua=({ref:r,ref_key:e,ref_for:t})=>(typeof r=="number"&&(r=""+r),r!=null?lt(r)||At(r)||be(r)?{i:Dt,r,k:e,f:!!t}:r:null);function se(r,e=null,t=null,i=0,n=null,s=r===pt?0:1,o=!1,a=!1){const u={__v_isVNode:!0,__v_skip:!0,type:r,props:e,key:e&&PL(e),ref:e&&Ua(e),scopeId:iL,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:i,dynamicProps:n,dynamicChildren:null,appContext:null,ctx:Dt};return a?(bw(u,t),s&128&&r.normalize(u)):t&&(u.shapeFlag|=lt(t)?8:16),Ro>0&&!o&&rr&&(u.patchFlag>0||s&6)&&u.patchFlag!==32&&rr.push(u),u}const yt=IW;function IW(r,e=null,t=null,i=0,n=null,s=!1){if((!r||r===GH)&&(r=qi),Co(r)){const a=hs(r,e,!0);return t&&bw(a,t),Ro>0&&!s&&rr&&(a.shapeFlag&6?rr[rr.indexOf(r)]=a:rr.push(a)),a.patchFlag=-2,a}if(MW(r)&&(r=r.__vccOpts),e){e=TW(e);let{class:a,style:u}=e;a&&!lt(a)&&(e.class=wu(a)),Ye(u)&&(vw(u)&&!ge(u)&&(u=Mt({},u)),e.style=aw(u))}const o=lt(r)?1:TL(r)?128:NH(r)?64:Ye(r)?4:be(r)?2:0;return se(r,e,t,i,n,o,s,!0)}function TW(r){return r?vw(r)||vL(r)?Mt({},r):r:null}function hs(r,e,t=!1,i=!1){const{props:n,ref:s,patchFlag:o,children:a,transition:u}=r,l=e?$W(n||{},e):n,c={__v_isVNode:!0,__v_skip:!0,type:r.type,props:l,key:l&&PL(l),ref:e&&e.ref?t&&s?ge(s)?s.concat(Ua(e)):[s,Ua(e)]:Ua(e):s,scopeId:r.scopeId,slotScopeIds:r.slotScopeIds,children:a,target:r.target,targetStart:r.targetStart,targetAnchor:r.targetAnchor,staticCount:r.staticCount,shapeFlag:r.shapeFlag,patchFlag:e&&r.type!==pt?o===-1?16:o|16:o,dynamicProps:r.dynamicProps,dynamicChildren:r.dynamicChildren,appContext:r.appContext,dirs:r.dirs,transition:u,component:r.component,suspense:r.suspense,ssContent:r.ssContent&&hs(r.ssContent),ssFallback:r.ssFallback&&hs(r.ssFallback),el:r.el,anchor:r.anchor,ctx:r.ctx,ce:r.ce};return u&&i&&gw(c,u.clone(c)),c}function as(r=" ",e=0){return yt(Pu,null,r,e)}function D_(r="",e=!1){return e?(Ge(),Di(qi,null,r)):yt(qi,null,r)}function xr(r){return r==null||typeof r=="boolean"?yt(qi):ge(r)?yt(pt,null,r.slice()):Co(r)?yi(r):yt(Pu,null,String(r))}function yi(r){return r.el===null&&r.patchFlag!==-1||r.memo?r:hs(r)}function bw(r,e){let t=0;const{shapeFlag:i}=r;if(e==null)e=null;else if(ge(e))t=16;else if(typeof e=="object")if(i&65){const n=e.default;n&&(n._c&&(n._d=!1),bw(r,n()),n._c&&(n._d=!0));return}else{t=32;const n=e._;!n&&!vL(e)?e._ctx=Dt:n===3&&Dt&&(Dt.slots._===1?e._=1:(e._=2,r.patchFlag|=1024))}else be(e)?(e={default:e,_ctx:Dt},t=32):(e=String(e),i&64?(t=16,e=[as(e)]):t=8);r.children=e,r.shapeFlag|=t}function $W(...r){const e={};for(let t=0;t{let n;return(n=r[t])||(n=r[t]=[]),n.push(i),s=>{n.length>1?n.forEach(o=>o(s)):n[0](s)}};ru=e("__VUE_INSTANCE_SETTERS__",t=>zt=t),A_=e("__VUE_SSR_SETTERS__",t=>xo=t)}const Ko=r=>{const e=zt;return ru(r),r.scope.on(),()=>{r.scope.off(),ru(e)}},U0=()=>{zt&&zt.scope.off(),ru(null)};function RL(r){return r.vnode.shapeFlag&4}let xo=!1;function xW(r,e=!1,t=!1){e&&A_(e);const{props:i,children:n}=r.vnode,s=RL(r);nW(r,i,s,e),uW(r,n,t);const o=s?qW(r,e):void 0;return e&&A_(!1),o}function qW(r,e){const t=r.type;r.accessCache=Object.create(null),r.proxy=new Proxy(r.ctx,XH);const{setup:i}=t;if(i){Fi();const n=r.setupContext=i.length>1?AW(r):null,s=Ko(r),o=Vo(i,r,0,[r.props,n]),a=Oj(o);if(ki(),s(),(a||r.sp)&&!ss(r)&&nL(r),a){if(o.then(U0,U0),e)return o.then(u=>{V0(r,u)}).catch(u=>{Ou(u,r,0)});r.asyncDep=o}else V0(r,o)}else CL(r)}function V0(r,e,t){be(e)?r.type.__ssrInlineRender?r.ssrRender=e:r.render=e:Ye(e)&&(r.setupState=Jj(e)),CL(r)}function CL(r,e,t){const i=r.type;r.render||(r.render=i.render||Nr);{const n=Ko(r);Fi();try{JH(r)}finally{ki(),n()}}}const DW={get(r,e){return xt(r,"get",""),r[e]}};function AW(r){const e=t=>{r.exposed=t||{}};return{attrs:new Proxy(r.attrs,DW),slots:r.slots,emit:r.emit,expose:e}}function Ru(r){return r.exposed?r.exposeProxy||(r.exposeProxy=new Proxy(Jj(Yj(r.exposed)),{get(e,t){if(t in e)return e[t];if(t in po)return po[t](r)},has(e,t){return t in e||t in po}})):r.proxy}function MW(r){return be(r)&&"__vccOpts"in r}const br=(r,e)=>RH(r,e,xo);function _w(r,e,t){const i=arguments.length;return i===2?Ye(e)&&!ge(e)?Co(e)?yt(r,null,[e]):yt(r,e):yt(r,null,e):(i>3?t=Array.prototype.slice.call(arguments,2):i===3&&Co(t)&&(t=[t]),yt(r,e,t))}const NW="3.5.13";/** -* @vue/runtime-dom v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let M_;const K0=typeof window<"u"&&window.trustedTypes;if(K0)try{M_=K0.createPolicy("vue",{createHTML:r=>r})}catch{}const xL=M_?r=>M_.createHTML(r):r=>r,FW="http://www.w3.org/2000/svg",kW="http://www.w3.org/1998/Math/MathML",Ur=typeof document<"u"?document:null,G0=Ur&&Ur.createElement("template"),BW={insert:(r,e,t)=>{e.insertBefore(r,t||null)},remove:r=>{const e=r.parentNode;e&&e.removeChild(r)},createElement:(r,e,t,i)=>{const n=e==="svg"?Ur.createElementNS(FW,r):e==="mathml"?Ur.createElementNS(kW,r):t?Ur.createElement(r,{is:t}):Ur.createElement(r);return r==="select"&&i&&i.multiple!=null&&n.setAttribute("multiple",i.multiple),n},createText:r=>Ur.createTextNode(r),createComment:r=>Ur.createComment(r),setText:(r,e)=>{r.nodeValue=e},setElementText:(r,e)=>{r.textContent=e},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>Ur.querySelector(r),setScopeId(r,e){r.setAttribute(e,"")},insertStaticContent(r,e,t,i,n,s){const o=t?t.previousSibling:e.lastChild;if(n&&(n===s||n.nextSibling))for(;e.insertBefore(n.cloneNode(!0),t),!(n===s||!(n=n.nextSibling)););else{G0.innerHTML=xL(i==="svg"?`${r}`:i==="mathml"?`${r}`:r);const a=G0.content;if(i==="svg"||i==="mathml"){const u=a.firstChild;for(;u.firstChild;)a.appendChild(u.firstChild);a.removeChild(u)}e.insertBefore(a,t)}return[o?o.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},jW=Symbol("_vtc");function LW(r,e,t){const i=r[jW];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?r.removeAttribute("class"):t?r.setAttribute("class",e):r.className=e}const Y0=Symbol("_vod"),zW=Symbol("_vsh"),HW=Symbol(""),WW=/(^|;)\s*display\s*:/;function UW(r,e,t){const i=r.style,n=lt(t);let s=!1;if(t&&!n){if(e)if(lt(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();t[a]==null&&Va(i,a,"")}else for(const o in e)t[o]==null&&Va(i,o,"");for(const o in t)o==="display"&&(s=!0),Va(i,o,t[o])}else if(n){if(e!==t){const o=i[HW];o&&(t+=";"+o),i.cssText=t,s=WW.test(t)}}else e&&r.removeAttribute("style");Y0 in r&&(r[Y0]=s?i.display:"",r[zW]&&(i.display="none"))}const X0=/\s*!important$/;function Va(r,e,t){if(ge(t))t.forEach(i=>Va(r,e,i));else if(t==null&&(t=""),e.startsWith("--"))r.setProperty(e,t);else{const i=VW(r,e);X0.test(t)?r.setProperty(bn(i),t.replace(X0,""),"important"):r[i]=t}}const J0=["Webkit","Moz","ms"],wl={};function VW(r,e){const t=wl[e];if(t)return t;let i=xi(e);if(i!=="filter"&&i in r)return wl[e]=i;i=$j(i);for(let n=0;nEl||(XW.then(()=>El=0),El=Date.now());function QW(r,e){const t=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=t.attached)return;Br(ZW(i,t.value),e,5,[i])};return t.value=r,t.attached=JW(),t}function ZW(r,e){if(ge(e)){const t=r.stopImmediatePropagation;return r.stopImmediatePropagation=()=>{t.call(r),r._stopped=!0},e.map(i=>n=>!n._stopped&&i&&i(n))}else return e}const iE=r=>r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r.charCodeAt(2)>96&&r.charCodeAt(2)<123,e4=(r,e,t,i,n,s)=>{const o=n==="svg";e==="class"?LW(r,i,o):e==="style"?UW(r,t,i):mu(e)?nw(e)||GW(r,e,t,i,s):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):t4(r,e,i,o))?(eE(r,e,i),!r.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&Z0(r,e,i,o,s,e!=="value")):r._isVueCE&&(/[A-Z]/.test(e)||!lt(i))?eE(r,xi(e),i,s,e):(e==="true-value"?r._trueValue=i:e==="false-value"&&(r._falseValue=i),Z0(r,e,i,o))};function t4(r,e,t,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in r&&iE(e)&&be(t));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&r.tagName==="INPUT"||e==="type"&&r.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const n=r.tagName;if(n==="IMG"||n==="VIDEO"||n==="CANVAS"||n==="SOURCE")return!1}return iE(e)&<(t)?!1:e in r}const nE=r=>{const e=r.props["onUpdate:modelValue"]||!1;return ge(e)?t=>za(e,t):e};function r4(r){r.target.composing=!0}function sE(r){const e=r.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Sl=Symbol("_assign"),ao={created(r,{modifiers:{lazy:e,trim:t,number:i}},n){r[Sl]=nE(n);const s=i||n.props&&n.props.type==="number";Kn(r,e?"change":"input",o=>{if(o.target.composing)return;let a=r.value;t&&(a=a.trim()),s&&(a=S_(a)),r[Sl](a)}),t&&Kn(r,"change",()=>{r.value=r.value.trim()}),e||(Kn(r,"compositionstart",r4),Kn(r,"compositionend",sE),Kn(r,"change",sE))},mounted(r,{value:e}){r.value=e??""},beforeUpdate(r,{value:e,oldValue:t,modifiers:{lazy:i,trim:n,number:s}},o){if(r[Sl]=nE(o),r.composing)return;const a=(s||r.type==="number")&&!/^0\d/.test(r.value)?S_(r.value):r.value,u=e??"";a!==u&&(document.activeElement===r&&r.type!=="range"&&(i&&e===t||n&&r.value.trim()===u)||(r.value=u))}},i4=["ctrl","shift","alt","meta"],n4={stop:r=>r.stopPropagation(),prevent:r=>r.preventDefault(),self:r=>r.target!==r.currentTarget,ctrl:r=>!r.ctrlKey,shift:r=>!r.shiftKey,alt:r=>!r.altKey,meta:r=>!r.metaKey,left:r=>"button"in r&&r.button!==0,middle:r=>"button"in r&&r.button!==1,right:r=>"button"in r&&r.button!==2,exact:(r,e)=>i4.some(t=>r[`${t}Key`]&&!e.includes(t))},s4=(r,e)=>{const t=r._withMods||(r._withMods={}),i=e.join(".");return t[i]||(t[i]=(n,...s)=>{for(let o=0;o{const e=a4().createApp(...r),{mount:t}=e;return e.mount=i=>{const n=c4(i);if(!n)return;const s=e._component;!be(s)&&!s.render&&!s.template&&(s.template=n.innerHTML),n.nodeType===1&&(n.textContent="");const o=t(n,!1,l4(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),o},e};function l4(r){if(r instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&r instanceof MathMLElement)return"mathml"}function c4(r){return lt(r)?document.querySelector(r):r}/*! - * pinia v3.0.2 - * (c) 2025 Eduardo San Martin Morote - * @license MIT - */const d4=Symbol();var aE;(function(r){r.direct="direct",r.patchObject="patch object",r.patchFunction="patch function"})(aE||(aE={}));function h4(){const r=sH(!0),e=r.run(()=>$t({}));let t=[],i=[];const n=Yj({install(s){n._a=s,s.provide(d4,n),s.config.globalProperties.$pinia=n,i.forEach(o=>t.push(o)),i=[]},use(s){return this._a?t.push(s):i.push(s),this},_p:t,_a:null,_e:r,_s:new Map,state:e});return n}/*! - * vue-router v4.5.1 - * (c) 2025 Eduardo San Martin Morote - * @license MIT - */const Gn=typeof document<"u";function qL(r){return typeof r=="object"||"displayName"in r||"props"in r||"__vccOpts"in r}function f4(r){return r.__esModule||r[Symbol.toStringTag]==="Module"||r.default&&qL(r.default)}const Ae=Object.assign;function Ol(r,e){const t={};for(const i in e){const n=e[i];t[i]=wr(n)?n.map(r):r(n)}return t}const mo=()=>{},wr=Array.isArray,DL=/#/g,v4=/&/g,p4=/\//g,g4=/=/g,m4=/\?/g,AL=/\+/g,y4=/%5B/g,b4=/%5D/g,ML=/%5E/g,_4=/%60/g,NL=/%7B/g,w4=/%7C/g,FL=/%7D/g,E4=/%20/g;function ww(r){return encodeURI(""+r).replace(w4,"|").replace(y4,"[").replace(b4,"]")}function S4(r){return ww(r).replace(NL,"{").replace(FL,"}").replace(ML,"^")}function N_(r){return ww(r).replace(AL,"%2B").replace(E4,"+").replace(DL,"%23").replace(v4,"%26").replace(_4,"`").replace(NL,"{").replace(FL,"}").replace(ML,"^")}function O4(r){return N_(r).replace(g4,"%3D")}function I4(r){return ww(r).replace(DL,"%23").replace(m4,"%3F")}function T4(r){return r==null?"":I4(r).replace(p4,"%2F")}function qo(r){try{return decodeURIComponent(""+r)}catch{}return""+r}const $4=/\/$/,P4=r=>r.replace($4,"");function Il(r,e,t="/"){let i,n={},s="",o="";const a=e.indexOf("#");let u=e.indexOf("?");return a=0&&(u=-1),u>-1&&(i=e.slice(0,u),s=e.slice(u+1,a>-1?a:e.length),n=r(s)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=q4(i??e,t),{fullPath:i+(s&&"?")+s+o,path:i,query:n,hash:qo(o)}}function R4(r,e){const t=e.query?r(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function uE(r,e){return!e||!r.toLowerCase().startsWith(e.toLowerCase())?r:r.slice(e.length)||"/"}function C4(r,e,t){const i=e.matched.length-1,n=t.matched.length-1;return i>-1&&i===n&&fs(e.matched[i],t.matched[n])&&kL(e.params,t.params)&&r(e.query)===r(t.query)&&e.hash===t.hash}function fs(r,e){return(r.aliasOf||r)===(e.aliasOf||e)}function kL(r,e){if(Object.keys(r).length!==Object.keys(e).length)return!1;for(const t in r)if(!x4(r[t],e[t]))return!1;return!0}function x4(r,e){return wr(r)?lE(r,e):wr(e)?lE(e,r):r===e}function lE(r,e){return wr(e)?r.length===e.length&&r.every((t,i)=>t===e[i]):r.length===1&&r[0]===e}function q4(r,e){if(r.startsWith("/"))return r;if(!r)return e;const t=e.split("/"),i=r.split("/"),n=i[i.length-1];(n===".."||n===".")&&i.push("");let s=t.length-1,o,a;for(o=0;o1&&s--;else break;return t.slice(0,s).join("/")+"/"+i.slice(o).join("/")}const pi={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Do;(function(r){r.pop="pop",r.push="push"})(Do||(Do={}));var yo;(function(r){r.back="back",r.forward="forward",r.unknown=""})(yo||(yo={}));function D4(r){if(!r)if(Gn){const e=document.querySelector("base");r=e&&e.getAttribute("href")||"/",r=r.replace(/^\w+:\/\/[^\/]+/,"")}else r="/";return r[0]!=="/"&&r[0]!=="#"&&(r="/"+r),P4(r)}const A4=/^[^#]+#/;function M4(r,e){return r.replace(A4,"#")+e}function N4(r,e){const t=document.documentElement.getBoundingClientRect(),i=r.getBoundingClientRect();return{behavior:e.behavior,left:i.left-t.left-(e.left||0),top:i.top-t.top-(e.top||0)}}const Cu=()=>({left:window.scrollX,top:window.scrollY});function F4(r){let e;if("el"in r){const t=r.el,i=typeof t=="string"&&t.startsWith("#"),n=typeof t=="string"?i?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!n)return;e=N4(n,r)}else e=r;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function cE(r,e){return(history.state?history.state.position-e:-1)+r}const F_=new Map;function k4(r,e){F_.set(r,e)}function B4(r){const e=F_.get(r);return F_.delete(r),e}let j4=()=>location.protocol+"//"+location.host;function BL(r,e){const{pathname:t,search:i,hash:n}=e,s=r.indexOf("#");if(s>-1){let a=n.includes(r.slice(s))?r.slice(s).length:1,u=n.slice(a);return u[0]!=="/"&&(u="/"+u),uE(u,"")}return uE(t,r)+i+n}function L4(r,e,t,i){let n=[],s=[],o=null;const a=({state:h})=>{const f=BL(r,location),v=t.value,p=e.value;let _=0;if(h){if(t.value=f,e.value=h,o&&o===v){o=null;return}_=p?h.position-p.position:0}else i(f);n.forEach(y=>{y(t.value,v,{delta:_,type:Do.pop,direction:_?_>0?yo.forward:yo.back:yo.unknown})})};function u(){o=t.value}function l(h){n.push(h);const f=()=>{const v=n.indexOf(h);v>-1&&n.splice(v,1)};return s.push(f),f}function c(){const{history:h}=window;h.state&&h.replaceState(Ae({},h.state,{scroll:Cu()}),"")}function d(){for(const h of s)h();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:u,listen:l,destroy:d}}function dE(r,e,t,i=!1,n=!1){return{back:r,current:e,forward:t,replaced:i,position:window.history.length,scroll:n?Cu():null}}function z4(r){const{history:e,location:t}=window,i={value:BL(r,t)},n={value:e.state};n.value||s(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function s(u,l,c){const d=r.indexOf("#"),h=d>-1?(t.host&&document.querySelector("base")?r:r.slice(d))+u:j4()+r+u;try{e[c?"replaceState":"pushState"](l,"",h),n.value=l}catch(f){console.error(f),t[c?"replace":"assign"](h)}}function o(u,l){const c=Ae({},e.state,dE(n.value.back,u,n.value.forward,!0),l,{position:n.value.position});s(u,c,!0),i.value=u}function a(u,l){const c=Ae({},n.value,e.state,{forward:u,scroll:Cu()});s(c.current,c,!0);const d=Ae({},dE(i.value,u,null),{position:c.position+1},l);s(u,d,!1),i.value=u}return{location:i,state:n,push:a,replace:o}}function H4(r){r=D4(r);const e=z4(r),t=L4(r,e.state,e.location,e.replace);function i(s,o=!0){o||t.pauseListeners(),history.go(s)}const n=Ae({location:"",base:r,go:i,createHref:M4.bind(null,r)},e,t);return Object.defineProperty(n,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(n,"state",{enumerable:!0,get:()=>e.state.value}),n}function W4(r){return typeof r=="string"||r&&typeof r=="object"}function jL(r){return typeof r=="string"||typeof r=="symbol"}const LL=Symbol("");var hE;(function(r){r[r.aborted=4]="aborted",r[r.cancelled=8]="cancelled",r[r.duplicated=16]="duplicated"})(hE||(hE={}));function vs(r,e){return Ae(new Error,{type:r,[LL]:!0},e)}function Wr(r,e){return r instanceof Error&&LL in r&&(e==null||!!(r.type&e))}const fE="[^/]+?",U4={sensitive:!1,strict:!1,start:!0,end:!0},V4=/[.+*?^${}()[\]/\\]/g;function K4(r,e){const t=Ae({},U4,e),i=[];let n=t.start?"^":"";const s=[];for(const l of r){const c=l.length?[]:[90];t.strict&&!l.length&&(n+="/");for(let d=0;de.length?e.length===1&&e[0]===80?1:-1:0}function zL(r,e){let t=0;const i=r.score,n=e.score;for(;t0&&e[e.length-1]<0}const Y4={type:0,value:""},X4=/[a-zA-Z0-9_]/;function J4(r){if(!r)return[[]];if(r==="/")return[[Y4]];if(!r.startsWith("/"))throw new Error(`Invalid path "${r}"`);function e(f){throw new Error(`ERR (${t})/"${l}": ${f}`)}let t=0,i=t;const n=[];let s;function o(){s&&n.push(s),s=[]}let a=0,u,l="",c="";function d(){l&&(t===0?s.push({type:0,value:l}):t===1||t===2||t===3?(s.length>1&&(u==="*"||u==="+")&&e(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:l,regexp:c,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):e("Invalid state to consume buffer"),l="")}function h(){l+=u}for(;a{o(b)}:mo}function o(d){if(jL(d)){const h=i.get(d);h&&(i.delete(d),t.splice(t.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=t.indexOf(d);h>-1&&(t.splice(h,1),d.record.name&&i.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function a(){return t}function u(d){const h=rU(d,t);t.splice(h,0,d),d.record.name&&!mE(d)&&i.set(d.record.name,d)}function l(d,h){let f,v={},p,_;if("name"in d&&d.name){if(f=i.get(d.name),!f)throw vs(1,{location:d});_=f.record.name,v=Ae(pE(h.params,f.keys.filter(b=>!b.optional).concat(f.parent?f.parent.keys.filter(b=>b.optional):[]).map(b=>b.name)),d.params&&pE(d.params,f.keys.map(b=>b.name))),p=f.stringify(v)}else if(d.path!=null)p=d.path,f=t.find(b=>b.re.test(p)),f&&(v=f.parse(p),_=f.record.name);else{if(f=h.name?i.get(h.name):t.find(b=>b.re.test(h.path)),!f)throw vs(1,{location:d,currentLocation:h});_=f.record.name,v=Ae({},h.params,d.params),p=f.stringify(v)}const y=[];let g=f;for(;g;)y.unshift(g.record),g=g.parent;return{name:_,path:p,params:v,matched:y,meta:tU(y)}}r.forEach(d=>s(d));function c(){t.length=0,i.clear()}return{addRoute:s,resolve:l,removeRoute:o,clearRoutes:c,getRoutes:a,getRecordMatcher:n}}function pE(r,e){const t={};for(const i of e)i in r&&(t[i]=r[i]);return t}function gE(r){const e={path:r.path,redirect:r.redirect,name:r.name,meta:r.meta||{},aliasOf:r.aliasOf,beforeEnter:r.beforeEnter,props:eU(r),children:r.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in r?r.components||null:r.component&&{default:r.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function eU(r){const e={},t=r.props||!1;if("component"in r)e.default=t;else for(const i in r.components)e[i]=typeof t=="object"?t[i]:t;return e}function mE(r){for(;r;){if(r.record.aliasOf)return!0;r=r.parent}return!1}function tU(r){return r.reduce((e,t)=>Ae(e,t.meta),{})}function yE(r,e){const t={};for(const i in r)t[i]=i in e?e[i]:r[i];return t}function rU(r,e){let t=0,i=e.length;for(;t!==i;){const s=t+i>>1;zL(r,e[s])<0?i=s:t=s+1}const n=iU(r);return n&&(i=e.lastIndexOf(n,i-1)),i}function iU(r){let e=r;for(;e=e.parent;)if(HL(e)&&zL(r,e)===0)return e}function HL({record:r}){return!!(r.name||r.components&&Object.keys(r.components).length||r.redirect)}function nU(r){const e={};if(r===""||r==="?")return e;const i=(r[0]==="?"?r.slice(1):r).split("&");for(let n=0;ns&&N_(s)):[i&&N_(i)]).forEach(s=>{s!==void 0&&(e+=(e.length?"&":"")+t,s!=null&&(e+="="+s))})}return e}function sU(r){const e={};for(const t in r){const i=r[t];i!==void 0&&(e[t]=wr(i)?i.map(n=>n==null?null:""+n):i==null?i:""+i)}return e}const oU=Symbol(""),_E=Symbol(""),Ew=Symbol(""),WL=Symbol(""),k_=Symbol("");function Zs(){let r=[];function e(i){return r.push(i),()=>{const n=r.indexOf(i);n>-1&&r.splice(n,1)}}function t(){r=[]}return{add:e,list:()=>r.slice(),reset:t}}function bi(r,e,t,i,n,s=o=>o()){const o=i&&(i.enterCallbacks[n]=i.enterCallbacks[n]||[]);return()=>new Promise((a,u)=>{const l=h=>{h===!1?u(vs(4,{from:t,to:e})):h instanceof Error?u(h):W4(h)?u(vs(2,{from:e,to:h})):(o&&i.enterCallbacks[n]===o&&typeof h=="function"&&o.push(h),a())},c=s(()=>r.call(i&&i.instances[n],e,t,l));let d=Promise.resolve(c);r.length<3&&(d=d.then(l)),d.catch(h=>u(h))})}function Tl(r,e,t,i,n=s=>s()){const s=[];for(const o of r)for(const a in o.components){let u=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(qL(u)){const c=(u.__vccOpts||u)[e];c&&s.push(bi(c,t,i,o,a,n))}else{let l=u();s.push(()=>l.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=f4(c)?c.default:c;o.mods[a]=c,o.components[a]=d;const f=(d.__vccOpts||d)[e];return f&&bi(f,t,i,o,a,n)()}))}}return s}function wE(r){const e=Xr(Ew),t=Xr(WL),i=br(()=>{const u=tr(r.to);return e.resolve(u)}),n=br(()=>{const{matched:u}=i.value,{length:l}=u,c=u[l-1],d=t.matched;if(!c||!d.length)return-1;const h=d.findIndex(fs.bind(null,c));if(h>-1)return h;const f=EE(u[l-2]);return l>1&&EE(c)===f&&d[d.length-1].path!==f?d.findIndex(fs.bind(null,u[l-2])):h}),s=br(()=>n.value>-1&&dU(t.params,i.value.params)),o=br(()=>n.value>-1&&n.value===t.matched.length-1&&kL(t.params,i.value.params));function a(u={}){if(cU(u)){const l=e[tr(r.replace)?"replace":"push"](tr(r.to)).catch(mo);return r.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>l),l}return Promise.resolve()}return{route:i,href:br(()=>i.value.href),isActive:s,isExactActive:o,navigate:a}}function aU(r){return r.length===1?r[0]:r}const uU=Or({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:wE,setup(r,{slots:e}){const t=Su(wE(r)),{options:i}=Xr(Ew),n=br(()=>({[SE(r.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[SE(r.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const s=e.default&&aU(e.default(t));return r.custom?s:_w("a",{"aria-current":t.isExactActive?r.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:n.value},s)}}}),lU=uU;function cU(r){if(!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)&&!r.defaultPrevented&&!(r.button!==void 0&&r.button!==0)){if(r.currentTarget&&r.currentTarget.getAttribute){const e=r.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return r.preventDefault&&r.preventDefault(),!0}}function dU(r,e){for(const t in e){const i=e[t],n=r[t];if(typeof i=="string"){if(i!==n)return!1}else if(!wr(n)||n.length!==i.length||i.some((s,o)=>s!==n[o]))return!1}return!0}function EE(r){return r?r.aliasOf?r.aliasOf.path:r.path:""}const SE=(r,e,t)=>r??e??t,hU=Or({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(r,{attrs:e,slots:t}){const i=Xr(k_),n=br(()=>r.route||i.value),s=Xr(_E,0),o=br(()=>{let l=tr(s);const{matched:c}=n.value;let d;for(;(d=c[l])&&!d.components;)l++;return l}),a=br(()=>n.value.matched[o.value]);Ha(_E,br(()=>o.value+1)),Ha(oU,a),Ha(k_,n);const u=$t();return Wa(()=>[u.value,a.value,r.name],([l,c,d],[h,f,v])=>{c&&(c.instances[d]=l,f&&f!==c&&l&&l===h&&(c.leaveGuards.size||(c.leaveGuards=f.leaveGuards),c.updateGuards.size||(c.updateGuards=f.updateGuards))),l&&c&&(!f||!fs(c,f)||!h)&&(c.enterCallbacks[d]||[]).forEach(p=>p(l))},{flush:"post"}),()=>{const l=n.value,c=r.name,d=a.value,h=d&&d.components[c];if(!h)return OE(t.default,{Component:h,route:l});const f=d.props[c],v=f?f===!0?l.params:typeof f=="function"?f(l):f:null,_=_w(h,Ae({},v,e,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[c]=null)},ref:u}));return OE(t.default,{Component:_,route:l})||_}}});function OE(r,e){if(!r)return null;const t=r(e);return t.length===1?t[0]:t}const UL=hU;function fU(r){const e=Z4(r.routes,r),t=r.parseQuery||nU,i=r.stringifyQuery||bE,n=r.history,s=Zs(),o=Zs(),a=Zs(),u=IH(pi);let l=pi;Gn&&r.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=Ol.bind(null,A=>""+A),d=Ol.bind(null,T4),h=Ol.bind(null,qo);function f(A,W){let Y,ie;return jL(A)?(Y=e.getRecordMatcher(A),ie=W):ie=A,e.addRoute(ie,Y)}function v(A){const W=e.getRecordMatcher(A);W&&e.removeRoute(W)}function p(){return e.getRoutes().map(A=>A.record)}function _(A){return!!e.getRecordMatcher(A)}function y(A,W){if(W=Ae({},W||u.value),typeof A=="string"){const q=Il(t,A,W.path),F=e.resolve({path:q.path},W),k=n.createHref(q.fullPath);return Ae(q,F,{params:h(F.params),hash:qo(q.hash),redirectedFrom:void 0,href:k})}let Y;if(A.path!=null)Y=Ae({},A,{path:Il(t,A.path,W.path).path});else{const q=Ae({},A.params);for(const F in q)q[F]==null&&delete q[F];Y=Ae({},A,{params:d(q)}),W.params=d(W.params)}const ie=e.resolve(Y,W),Pe=A.hash||"";ie.params=c(h(ie.params));const $=R4(i,Ae({},A,{hash:S4(Pe),path:ie.path})),P=n.createHref($);return Ae({fullPath:$,hash:Pe,query:i===bE?sU(A.query):A.query||{}},ie,{redirectedFrom:void 0,href:P})}function g(A){return typeof A=="string"?Il(t,A,u.value.path):Ae({},A)}function b(A,W){if(l!==A)return vs(8,{from:W,to:A})}function m(A){return I(A)}function E(A){return m(Ae(g(A),{replace:!0}))}function O(A){const W=A.matched[A.matched.length-1];if(W&&W.redirect){const{redirect:Y}=W;let ie=typeof Y=="function"?Y(A):Y;return typeof ie=="string"&&(ie=ie.includes("?")||ie.includes("#")?ie=g(ie):{path:ie},ie.params={}),Ae({query:A.query,hash:A.hash,params:ie.path!=null?{}:A.params},ie)}}function I(A,W){const Y=l=y(A),ie=u.value,Pe=A.state,$=A.force,P=A.replace===!0,q=O(Y);if(q)return I(Ae(g(q),{state:typeof q=="object"?Ae({},Pe,q.state):Pe,force:$,replace:P}),W||Y);const F=Y;F.redirectedFrom=W;let k;return!$&&C4(i,ie,Y)&&(k=vs(16,{to:F,from:ie}),te(ie,ie,!0,!1)),(k?Promise.resolve(k):T(F,ie)).catch(N=>Wr(N)?Wr(N,2)?N:we(N):Z(N,F,ie)).then(N=>{if(N){if(Wr(N,2))return I(Ae({replace:P},g(N.to),{state:typeof N.to=="object"?Ae({},Pe,N.to.state):Pe,force:$}),W||F)}else N=x(F,ie,!0,P,Pe);return R(F,ie,N),N})}function w(A,W){const Y=b(A,W);return Y?Promise.reject(Y):Promise.resolve()}function S(A){const W=De.values().next().value;return W&&typeof W.runWithContext=="function"?W.runWithContext(A):A()}function T(A,W){let Y;const[ie,Pe,$]=vU(A,W);Y=Tl(ie.reverse(),"beforeRouteLeave",A,W);for(const q of ie)q.leaveGuards.forEach(F=>{Y.push(bi(F,A,W))});const P=w.bind(null,A,W);return Y.push(P),_e(Y).then(()=>{Y=[];for(const q of s.list())Y.push(bi(q,A,W));return Y.push(P),_e(Y)}).then(()=>{Y=Tl(Pe,"beforeRouteUpdate",A,W);for(const q of Pe)q.updateGuards.forEach(F=>{Y.push(bi(F,A,W))});return Y.push(P),_e(Y)}).then(()=>{Y=[];for(const q of $)if(q.beforeEnter)if(wr(q.beforeEnter))for(const F of q.beforeEnter)Y.push(bi(F,A,W));else Y.push(bi(q.beforeEnter,A,W));return Y.push(P),_e(Y)}).then(()=>(A.matched.forEach(q=>q.enterCallbacks={}),Y=Tl($,"beforeRouteEnter",A,W,S),Y.push(P),_e(Y))).then(()=>{Y=[];for(const q of o.list())Y.push(bi(q,A,W));return Y.push(P),_e(Y)}).catch(q=>Wr(q,8)?q:Promise.reject(q))}function R(A,W,Y){a.list().forEach(ie=>S(()=>ie(A,W,Y)))}function x(A,W,Y,ie,Pe){const $=b(A,W);if($)return $;const P=W===pi,q=Gn?history.state:{};Y&&(ie||P?n.replace(A.fullPath,Ae({scroll:P&&q&&q.scroll},Pe)):n.push(A.fullPath,Pe)),u.value=A,te(A,W,Y,P),we()}let C;function D(){C||(C=n.listen((A,W,Y)=>{if(!nt.listening)return;const ie=y(A),Pe=O(ie);if(Pe){I(Ae(Pe,{replace:!0,force:!0}),ie).catch(mo);return}l=ie;const $=u.value;Gn&&k4(cE($.fullPath,Y.delta),Cu()),T(ie,$).catch(P=>Wr(P,12)?P:Wr(P,2)?(I(Ae(g(P.to),{force:!0}),ie).then(q=>{Wr(q,20)&&!Y.delta&&Y.type===Do.pop&&n.go(-1,!1)}).catch(mo),Promise.reject()):(Y.delta&&n.go(-Y.delta,!1),Z(P,ie,$))).then(P=>{P=P||x(ie,$,!1),P&&(Y.delta&&!Wr(P,8)?n.go(-Y.delta,!1):Y.type===Do.pop&&Wr(P,20)&&n.go(-1,!1)),R(ie,$,P)}).catch(mo)}))}let j=Zs(),ee=Zs(),H;function Z(A,W,Y){we(A);const ie=ee.list();return ie.length?ie.forEach(Pe=>Pe(A,W,Y)):console.error(A),Promise.reject(A)}function ve(){return H&&u.value!==pi?Promise.resolve():new Promise((A,W)=>{j.add([A,W])})}function we(A){return H||(H=!A,D(),j.list().forEach(([W,Y])=>A?Y(A):W()),j.reset()),A}function te(A,W,Y,ie){const{scrollBehavior:Pe}=r;if(!Gn||!Pe)return Promise.resolve();const $=!Y&&B4(cE(A.fullPath,0))||(ie||!Y)&&history.state&&history.state.scroll||null;return Zj().then(()=>Pe(A,W,$)).then(P=>P&&F4(P)).catch(P=>Z(P,A,W))}const me=A=>n.go(A);let xe;const De=new Set,nt={currentRoute:u,listening:!0,addRoute:f,removeRoute:v,clearRoutes:e.clearRoutes,hasRoute:_,getRoutes:p,resolve:y,options:r,push:m,replace:E,go:me,back:()=>me(-1),forward:()=>me(1),beforeEach:s.add,beforeResolve:o.add,afterEach:a.add,onError:ee.add,isReady:ve,install(A){const W=this;A.component("RouterLink",lU),A.component("RouterView",UL),A.config.globalProperties.$router=W,Object.defineProperty(A.config.globalProperties,"$route",{enumerable:!0,get:()=>tr(u)}),Gn&&!xe&&u.value===pi&&(xe=!0,m(n.location).catch(Pe=>{}));const Y={};for(const Pe in pi)Object.defineProperty(Y,Pe,{get:()=>u.value[Pe],enumerable:!0});A.provide(Ew,W),A.provide(WL,Kj(Y)),A.provide(k_,u);const ie=A.unmount;De.add(A),A.unmount=function(){De.delete(A),De.size<1&&(l=pi,C&&C(),C=null,u.value=pi,xe=!1,H=!1),ie()}}};function _e(A){return A.reduce((W,Y)=>W.then(()=>S(Y)),Promise.resolve())}return nt}function vU(r,e){const t=[],i=[],n=[],s=Math.max(e.matched.length,r.matched.length);for(let o=0;ofs(l,a))?i.push(a):t.push(a));const u=r.matched[o];u&&(e.matched.find(l=>fs(l,u))||n.push(u))}return[t,i,n]}const pU=Or({__name:"App",setup(r){return(e,t)=>(Ge(),Di(tr(UL)))}}),gU=$t({width:100,margin:1,color:{dark:"#000000",light:"f0f0f0"}}),mU=r=>{const e=yU(r);bU(e,"teams_qr_code.pdf","application/pdf;teams_qr_code.pdf")},yU=r=>{const e=atob(r),t=new Uint8Array(e.length);for(let i=0;i{const i=new Blob([r],{type:t}),n=URL.createObjectURL(i),s=document.createElement("a");s.href=n,s.download=e,s.click(),URL.revokeObjectURL(n)},IE=async()=>{try{const r=await fetch(ai("/teams"));if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiGetTeams] error:",r),r}},_U=async r=>{try{const e=await fetch(ai("/teams"),{method:"POST",body:JSON.stringify({teams:[{name:r}]})});if(!e.ok)throw new Error(`http error status: ${e.status}`)}catch(e){throw console.error("[apiAddTeam] error:",e),e}},wU=async()=>{try{const r=await fetch(ai("/game"));if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiGetGame] error:",r),r}},EU=async()=>{try{const r=await fetch(ai("/game/start"),{method:"POST"});if(!r.ok)throw new Error(`http error status: ${r.status}`)}catch(r){throw console.error("[apiStartGame] error:",r),r}},SU=async()=>{try{const r=await fetch(ai("/game/stop"),{method:"POST"});if(!r.ok)throw new Error(`http error status: ${r.status}`)}catch(r){throw console.error("[apiStopGame] error:",r),r}},OU=async(r,e)=>{try{const t=await fetch(ai("/teams/"+r+"/applications"),{method:"POST",body:JSON.stringify({applications:[{id:e}]})});if(!t.ok)throw new Error(`http error status: ${t.status}`)}catch(t){throw console.error("[apiGaveApplication] error:",t),t}},TE=async()=>{try{const r=await fetch(ai("/teams/pdf"));if(!r.ok)throw new Error(`http error status: ${r.status}`);const e=await r.json();mU(e.result)}catch(r){throw console.error("[apiDownloadQrCodesFile] error:",r),r}},IU=async()=>{try{const r=await fetch(ai("/graph"));if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiDownloadQrCodesFile] error:",r),r}},TU=async(r,e)=>{try{const t=await fetch(ai("/graph/nodes"),{method:"PUT",body:JSON.stringify({code:r,node:e})});if(!t.ok)throw new Error(`http error status: ${t.status}`);return await t.json()}catch(t){throw console.error("[apiDownloadQrCodesFile] error:",t),t}};function ai(r){return"http://"+window.location.host.split(":")[0]+":8090"+r}var zn={},$l,$E;function $U(){return $E||($E=1,$l=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),$l}var Pl={},gi={},PE;function _n(){if(PE)return gi;PE=1;let r;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return gi.getSymbolSize=function(i){if(!i)throw new Error('"version" cannot be null or undefined');if(i<1||i>40)throw new Error('"version" should be in range from 1 to 40');return i*4+17},gi.getSymbolTotalCodewords=function(i){return e[i]},gi.getBCHDigit=function(t){let i=0;for(;t!==0;)i++,t>>>=1;return i},gi.setToSJISFunction=function(i){if(typeof i!="function")throw new Error('"toSJISFunc" is not a valid function.');r=i},gi.isKanjiModeEnabled=function(){return typeof r<"u"},gi.toSJIS=function(i){return r(i)},gi}var Rl={},RE;function Sw(){return RE||(RE=1,function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function e(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}r.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},r.from=function(i,n){if(r.isValid(i))return i;try{return e(i)}catch{return n}}}(Rl)),Rl}var Cl,CE;function PU(){if(CE)return Cl;CE=1;function r(){this.buffer=[],this.length=0}return r.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let i=0;i>>t-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},Cl=r,Cl}var xl,xE;function RU(){if(xE)return xl;xE=1;function r(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return r.prototype.set=function(e,t,i,n){const s=e*this.size+t;this.data[s]=i,n&&(this.reservedBit[s]=!0)},r.prototype.get=function(e,t){return this.data[e*this.size+t]},r.prototype.xor=function(e,t,i){this.data[e*this.size+t]^=i},r.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},xl=r,xl}var ql={},qE;function CU(){return qE||(qE=1,function(r){const e=_n().getSymbolSize;r.getRowColCoords=function(i){if(i===1)return[];const n=Math.floor(i/7)+2,s=e(i),o=s===145?26:Math.ceil((s-13)/(2*n-2))*2,a=[s-7];for(let u=1;u=0&&n<=7},r.from=function(n){return r.isValid(n)?parseInt(n,10):void 0},r.getPenaltyN1=function(n){const s=n.size;let o=0,a=0,u=0,l=null,c=null;for(let d=0;d=5&&(o+=e.N1+(a-5)),l=f,a=1),f=n.get(h,d),f===c?u++:(u>=5&&(o+=e.N1+(u-5)),c=f,u=1)}a>=5&&(o+=e.N1+(a-5)),u>=5&&(o+=e.N1+(u-5))}return o},r.getPenaltyN2=function(n){const s=n.size;let o=0;for(let a=0;a=10&&(a===1488||a===93)&&o++,u=u<<1&2047|n.get(c,l),c>=10&&(u===1488||u===93)&&o++}return o*e.N3},r.getPenaltyN4=function(n){let s=0;const o=n.data.length;for(let u=0;u=0;){const o=s[0];for(let u=0;u0){const a=new Uint8Array(this.degree);return a.set(s,o),a}return s},Nl=e,Nl}var Fl={},kl={},Bl={},BE;function KL(){return BE||(BE=1,Bl.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),Bl}var Pr={},jE;function GL(){if(jE)return Pr;jE=1;const r="[0-9]+",e="[A-Z $%*+\\-./:]+";let t="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";t=t.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+t+`)(?:.|[\r -]))+`;Pr.KANJI=new RegExp(t,"g"),Pr.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Pr.BYTE=new RegExp(i,"g"),Pr.NUMERIC=new RegExp(r,"g"),Pr.ALPHANUMERIC=new RegExp(e,"g");const n=new RegExp("^"+t+"$"),s=new RegExp("^"+r+"$"),o=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Pr.testKanji=function(u){return n.test(u)},Pr.testNumeric=function(u){return s.test(u)},Pr.testAlphanumeric=function(u){return o.test(u)},Pr}var LE;function wn(){return LE||(LE=1,function(r){const e=KL(),t=GL();r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(s,o){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!e.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?s.ccBits[0]:o<27?s.ccBits[1]:s.ccBits[2]},r.getBestModeForData=function(s){return t.testNumeric(s)?r.NUMERIC:t.testAlphanumeric(s)?r.ALPHANUMERIC:t.testKanji(s)?r.KANJI:r.BYTE},r.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},r.isValid=function(s){return s&&s.bit&&s.ccBits};function i(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+n)}}r.from=function(s,o){if(r.isValid(s))return s;try{return i(s)}catch{return o}}}(kl)),kl}var zE;function NU(){return zE||(zE=1,function(r){const e=_n(),t=VL(),i=Sw(),n=wn(),s=KL(),o=7973,a=e.getBCHDigit(o);function u(h,f,v){for(let p=1;p<=40;p++)if(f<=r.getCapacity(p,v,h))return p}function l(h,f){return n.getCharCountIndicator(h,f)+4}function c(h,f){let v=0;return h.forEach(function(p){const _=l(p.mode,f);v+=_+p.getBitsLength()}),v}function d(h,f){for(let v=1;v<=40;v++)if(c(h,v)<=r.getCapacity(v,f,n.MIXED))return v}r.from=function(f,v){return s.isValid(f)?parseInt(f,10):v},r.getCapacity=function(f,v,p){if(!s.isValid(f))throw new Error("Invalid QR Code version");typeof p>"u"&&(p=n.BYTE);const _=e.getSymbolTotalCodewords(f),y=t.getTotalCodewordsCount(f,v),g=(_-y)*8;if(p===n.MIXED)return g;const b=g-l(p,f);switch(p){case n.NUMERIC:return Math.floor(b/10*3);case n.ALPHANUMERIC:return Math.floor(b/11*2);case n.KANJI:return Math.floor(b/13);case n.BYTE:default:return Math.floor(b/8)}},r.getBestVersionForData=function(f,v){let p;const _=i.from(v,i.M);if(Array.isArray(f)){if(f.length>1)return d(f,_);if(f.length===0)return 1;p=f[0]}else p=f;return u(p.mode,p.getLength(),_)},r.getEncodedBits=function(f){if(!s.isValid(f)||f<7)throw new Error("Invalid QR Code version");let v=f<<12;for(;e.getBCHDigit(v)-a>=0;)v^=o<=0;)u^=e<0&&(s=this.data.substr(n),o=parseInt(s,10),i.put(o,a*3+1))},zl=e,zl}var Hl,UE;function BU(){if(UE)return Hl;UE=1;const r=wn(),e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function t(i){this.mode=r.ALPHANUMERIC,this.data=i}return t.getBitsLength=function(n){return 11*Math.floor(n/2)+6*(n%2)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){let s;for(s=0;s+2<=this.data.length;s+=2){let o=e.indexOf(this.data[s])*45;o+=e.indexOf(this.data[s+1]),n.put(o,11)}this.data.length%2&&n.put(e.indexOf(this.data[s]),6)},Hl=t,Hl}var Wl,VE;function jU(){if(VE)return Wl;VE=1;const r=wn();function e(t){this.mode=r.BYTE,typeof t=="string"?this.data=new TextEncoder().encode(t):this.data=new Uint8Array(t)}return e.getBitsLength=function(i){return i*8},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(t){for(let i=0,n=this.data.length;i=33088&&s<=40956)s-=33088;else if(s>=57408&&s<=60351)s-=49472;else throw new Error("Invalid SJIS character: "+this.data[n]+` -Make sure your charset is UTF-8`);s=(s>>>8&255)*192+(s&255),i.put(s,13)}},Ul=t,Ul}var Vl={exports:{}},GE;function zU(){return GE||(GE=1,function(r){var e={single_source_shortest_paths:function(t,i,n){var s={},o={};o[i]=0;var a=e.PriorityQueue.make();a.push(i,0);for(var u,l,c,d,h,f,v,p,_;!a.empty();){u=a.pop(),l=u.value,d=u.cost,h=t[l]||{};for(c in h)h.hasOwnProperty(c)&&(f=h[c],v=d+f,p=o[c],_=typeof o[c]>"u",(_||p>v)&&(o[c]=v,a.push(c,v),s[c]=l))}if(typeof n<"u"&&typeof o[n]>"u"){var y=["Could not find a path from ",i," to ",n,"."].join("");throw new Error(y)}return s},extract_shortest_path_from_predecessor_list:function(t,i){for(var n=[],s=i;s;)n.push(s),t[s],s=t[s];return n.reverse(),n},find_path:function(t,i,n){var s=e.single_source_shortest_paths(t,i,n);return e.extract_shortest_path_from_predecessor_list(s,n)},PriorityQueue:{make:function(t){var i=e.PriorityQueue,n={},s;t=t||{};for(s in i)i.hasOwnProperty(s)&&(n[s]=i[s]);return n.queue=[],n.sorter=t.sorter||i.default_sorter,n},default_sorter:function(t,i){return t.cost-i.cost},push:function(t,i){var n={value:t,cost:i};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};r.exports=e}(Vl)),Vl.exports}var YE;function HU(){return YE||(YE=1,function(r){const e=wn(),t=kU(),i=BU(),n=jU(),s=LU(),o=GL(),a=_n(),u=zU();function l(y){return unescape(encodeURIComponent(y)).length}function c(y,g,b){const m=[];let E;for(;(E=y.exec(b))!==null;)m.push({data:E[0],index:E.index,mode:g,length:E[0].length});return m}function d(y){const g=c(o.NUMERIC,e.NUMERIC,y),b=c(o.ALPHANUMERIC,e.ALPHANUMERIC,y);let m,E;return a.isKanjiModeEnabled()?(m=c(o.BYTE,e.BYTE,y),E=c(o.KANJI,e.KANJI,y)):(m=c(o.BYTE_KANJI,e.BYTE,y),E=[]),g.concat(b,m,E).sort(function(I,w){return I.index-w.index}).map(function(I){return{data:I.data,mode:I.mode,length:I.length}})}function h(y,g){switch(g){case e.NUMERIC:return t.getBitsLength(y);case e.ALPHANUMERIC:return i.getBitsLength(y);case e.KANJI:return s.getBitsLength(y);case e.BYTE:return n.getBitsLength(y)}}function f(y){return y.reduce(function(g,b){const m=g.length-1>=0?g[g.length-1]:null;return m&&m.mode===b.mode?(g[g.length-1].data+=b.data,g):(g.push(b),g)},[])}function v(y){const g=[];for(let b=0;b=0&&C<=6&&(D===0||D===6)||D>=0&&D<=6&&(C===0||C===6)||C>=2&&C<=4&&D>=2&&D<=4?O.set(R+C,x+D,!0,!0):O.set(R+C,x+D,!1,!0))}}function v(O){const I=O.size;for(let w=8;w>C&1)===1,O.set(T,R,x,!0),O.set(R,T,x,!0)}function y(O,I,w){const S=O.size,T=c.getEncodedBits(I,w);let R,x;for(R=0;R<15;R++)x=(T>>R&1)===1,R<6?O.set(R,8,x,!0):R<8?O.set(R+1,8,x,!0):O.set(S-15+R,8,x,!0),R<8?O.set(8,S-R-1,x,!0):R<9?O.set(8,15-R-1+1,x,!0):O.set(8,15-R-1,x,!0);O.set(S-8,8,1,!0)}function g(O,I){const w=O.size;let S=-1,T=w-1,R=7,x=0;for(let C=w-1;C>0;C-=2)for(C===6&&C--;;){for(let D=0;D<2;D++)if(!O.isReserved(T,C-D)){let j=!1;x>>R&1)===1),O.set(T,C-D,j),R--,R===-1&&(x++,R=7)}if(T+=S,T<0||w<=T){T-=S,S=-S;break}}}function b(O,I,w){const S=new t;w.forEach(function(D){S.put(D.mode.bit,4),S.put(D.getLength(),d.getCharCountIndicator(D.mode,O)),D.write(S)});const T=r.getSymbolTotalCodewords(O),R=a.getTotalCodewordsCount(O,I),x=(T-R)*8;for(S.getLengthInBits()+4<=x&&S.put(0,4);S.getLengthInBits()%8!==0;)S.putBit(0);const C=(x-S.getLengthInBits())/8;for(let D=0;D=7&&_(D,I),g(D,x),isNaN(S)&&(S=o.getBestMask(D,y.bind(null,D,w))),o.applyMask(S,D),y(D,w,S),{modules:D,version:I,errorCorrectionLevel:w,maskPattern:S,segments:T}}return Pl.create=function(I,w){if(typeof I>"u"||I==="")throw new Error("No input text");let S=e.M,T,R;return typeof w<"u"&&(S=e.from(w.errorCorrectionLevel,e.M),T=l.from(w.version),R=o.from(w.maskPattern),w.toSJISFunc&&r.setToSJISFunction(w.toSJISFunc)),E(I,T,S,R)},Pl}var Kl={},Gl={},JE;function YL(){return JE||(JE=1,function(r){function e(t){if(typeof t=="number"&&(t=t.toString()),typeof t!="string")throw new Error("Color should be defined as hex string");let i=t.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+t);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(s){return[s,s]}))),i.length===6&&i.push("F","F");const n=parseInt(i.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+i.slice(0,6).join("")}}r.getOptions=function(i){i||(i={}),i.color||(i.color={});const n=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,s=i.width&&i.width>=21?i.width:void 0,o=i.scale||4;return{width:s,scale:s?4:o,margin:n,color:{dark:e(i.color.dark||"#000000ff"),light:e(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},r.getScale=function(i,n){return n.width&&n.width>=i+n.margin*2?n.width/(i+n.margin*2):n.scale},r.getImageWidth=function(i,n){const s=r.getScale(i,n);return Math.floor((i+n.margin*2)*s)},r.qrToImageData=function(i,n,s){const o=n.modules.size,a=n.modules.data,u=r.getScale(o,s),l=Math.floor((o+s.margin*2)*u),c=s.margin*u,d=[s.color.light,s.color.dark];for(let h=0;h=c&&f>=c&&h"u"&&(!o||!o.getContext)&&(u=o,o=void 0),o||(l=i()),u=e.getOptions(u);const c=e.getImageWidth(s.modules.size,u),d=l.getContext("2d"),h=d.createImageData(c,c);return e.qrToImageData(h.data,s,u),t(d,l,c),d.putImageData(h,0,0),l},r.renderToDataURL=function(s,o,a){let u=a;typeof u>"u"&&(!o||!o.getContext)&&(u=o,o=void 0),u||(u={});const l=r.render(s,o,u),c=u.type||"image/png",d=u.rendererOpts||{};return l.toDataURL(c,d.quality)}}(Kl)),Kl}var Yl={},ZE;function VU(){if(ZE)return Yl;ZE=1;const r=YL();function e(n,s){const o=n.a/255,a=s+'="'+n.hex+'"';return o<1?a+" "+s+'-opacity="'+o.toFixed(2).slice(1)+'"':a}function t(n,s,o){let a=n+s;return typeof o<"u"&&(a+=" "+o),a}function i(n,s,o){let a="",u=0,l=!1,c=0;for(let d=0;d0&&h>0&&n[d-1]||(a+=l?t("M",h+o,.5+f+o):t("m",u,0),u=0,l=!1),h+1':"",f="',v='viewBox="0 0 '+d+" "+d+'"',_=''+h+f+` -`;return typeof a=="function"&&a(null,_),_},Yl}var eS;function KU(){if(eS)return zn;eS=1;const r=$U(),e=WU(),t=UU(),i=VU();function n(s,o,a,u,l){const c=[].slice.call(arguments,1),d=c.length,h=typeof c[d-1]=="function";if(!h&&!r())throw new Error("Callback required as last argument");if(h){if(d<2)throw new Error("Too few arguments provided");d===2?(l=a,a=o,o=u=void 0):d===3&&(o.getContext&&typeof l>"u"?(l=u,u=void 0):(l=u,u=a,a=o,o=void 0))}else{if(d<1)throw new Error("Too few arguments provided");return d===1?(a=o,o=u=void 0):d===2&&!o.getContext&&(u=a,a=o,o=void 0),new Promise(function(f,v){try{const p=e.create(a,u);f(s(p,o,u))}catch(p){v(p)}})}try{const f=e.create(a,u);l(null,s(f,o,u))}catch(f){l(f)}}return zn.create=e.create,zn.toCanvas=n.bind(null,t.render),zn.toDataURL=n.bind(null,t.renderToDataURL),zn.toString=n.bind(null,function(s,o,a){return i.render(s,a)}),zn}var Xl=KU();/*! vue-qrcode v2.0.0 | (c) 2018-present Chen Fengyuan | MIT */const tS="ready";var GU=Or({name:"VueQrcode",props:{value:{type:String,default:void 0},options:{type:Object,default:void 0},tag:{type:String,default:"canvas"}},emits:[tS],watch:{$props:{deep:!0,immediate:!0,handler(){this.$el&&this.generate()}}},mounted(){this.generate()},methods:{generate(){const r=this.options||{},e=String(this.value),t=()=>{this.$emit(tS,this.$el)};switch(this.tag){case"canvas":Xl.toCanvas(this.$el,e,r,i=>{if(i)throw i;t()});break;case"img":Xl.toDataURL(e,r,(i,n)=>{if(i)throw i;this.$el.src=n,this.$el.onload=t});break;case"svg":Xl.toString(e,r,(i,n)=>{if(i)throw i;const s=document.createElement("div");s.innerHTML=n;const o=s.querySelector("svg");if(o){const{attributes:a,childNodes:u}=o;Object.keys(a).forEach(l=>{const c=a[Number(l)];this.$el.setAttribute(c.name,c.value)}),Object.keys(u).forEach(l=>{const c=u[Number(l)];this.$el.appendChild(c.cloneNode(!0))}),t()}});break}}},render(){return _w(this.tag,this.$slots.default)}});const YU={key:0,class:"qr"},XU=Or({__name:"TeamQRCode",props:{data:String,title:String},setup(r){return(e,t)=>{var i;return(((i=r.data)==null?void 0:i.length)??0)>1?(Ge(),Ct("div",YU,[yt(tr(GU),{value:r.data,options:tr(gU),tag:"svg"},null,8,["value","options"]),se("div",null,Ft(r.title),1)])):D_("",!0)}}}),xu=(r,e)=>{const t=r.__vccOpts||r;for(const[i,n]of e)t[i]=n;return t},JU=xu(XU,[["__scopeId","data-v-666b8d35"]]),QU={},ZU={class:"header-block"};function eV(r,e){return Ge(),Ct("div",ZU,[YH(r.$slots,"default",{},void 0)])}const Ow=xu(QU,[["render",eV],["__scopeId","data-v-5b6894ef"]]),tV={class:"buttons-block"},rV={class:"team-name"},iV=["href"],nV={class:"cell-center"},sV=["onClick"],oV={class:"cell-center"},aV=["onClick"],uV={class:"form-custom form-block"},lV={class:"center-block-custom"},cV=Or({__name:"AdminWindow",setup(r){const e=$t("-"),t=$t("-"),i=$t(""),n=$t(),s=$t({teams:[]}),o=$t("");async function a(){await _U(o.value),o.value=""}async function u(){i.value="Загрузка...",await EU()}async function l(){i.value="Загрузка...",await SU()}async function c(){var f,v,p;n.value=await wU(),n.value.state==="NEW"&&(i.value="Игра ещё не началась"),n.value.state==="RUN"&&(i.value="Игра идет с "+((f=n.value)==null?void 0:f.startAt.substring(11))),n.value.state==="STOP"&&(i.value="Игра остановлена "+((v=n.value)==null?void 0:v.startAt.substring(11))+" - "+((p=n.value)==null?void 0:p.endAt.substring(11)))}function d(f,v){return v.applications.length-f.applications.length}let h=0;return mw(async()=>{s.value=await IE(),h=setInterval(async()=>{s.value=await IE(),s.value.teams.sort(d),await c()},2e3),rw.beforeEach((f,v,p)=>{clearInterval(h),p()})}),(f,v)=>(Ge(),Ct(pt,null,[yt(Ow,null,{default:Iu(()=>[se("div",null," Вечерний детектив - "+Ft(i.value),1),se("div",tV,[se("button",{onClick:v[0]||(v[0]=p=>tr(rw).push("/editor")),class:"button-menu button-custom-inline"},"Граф"),se("button",{onClick:u,class:"button-menu button-custom-inline"},"Начать"),se("button",{onClick:l,class:"button-menu button-custom-inline"},"Остановить"),se("button",{onClick:v[1]||(v[1]=(...p)=>tr(TE)&&tr(TE)(...p)),class:"button-menu button-custom-inline"},"Скачать qr‑ы")])]),_:1}),yt(JU,{data:e.value,title:t.value},null,8,["data","title"]),se("table",null,[v[3]||(v[3]=se("thead",null,[se("tr",null,[se("th",null,"№"),se("th",null,"Название команды"),se("th",null,"Поездки"),se("th",null,"Приложения"),se("th",null,"Qr")])],-1)),se("tbody",null,[(Ge(!0),Ct(pt,null,vo(s.value.teams,(p,_)=>(Ge(),Ct("tr",{key:p.name},[se("td",null,Ft(_+1),1),se("td",rV,[as(Ft(p.name)+" ",1),se("a",{href:p.url,target:"_blank"},"[url]",8,iV)]),se("td",nV,Ft(p.spendTime),1),se("td",null,[(Ge(!0),Ct(pt,null,vo(p.applications,y=>(Ge(),Ct("div",{key:y.id},[as(Ft(y.name)+" ",1),se("button",{class:"link-button",onClick:g=>tr(OU)(p.id,y.id)},"Выдано",8,sV)]))),128))]),se("td",oV,[se("a",{onClick:y=>(e.value=p.url,t.value=p.name)},"QR",8,aV)])]))),128))])]),se("div",uV,[se("div",lV,[se("form",{onSubmit:s4(a,["prevent"])},[se("div",null,[so(se("input",{class:"input-custom","onUpdate:modelValue":v[2]||(v[2]=p=>o.value=p),type:"text",placeholder:"Название команды"},null,512),[[ao,o.value]])]),v[4]||(v[4]=se("div",{class:"button-container"},[se("button",{class:"button-custom",type:"submit"},"Добавить")],-1))],32)])])],64))}}),dV=xu(cV,[["__scopeId","data-v-27835e5c"]]),hV=Or({__name:"HomeView",setup(r){return(e,t)=>(Ge(),Di(dV))}});/** - * vis-data - * http://visjs.org/ - * - * Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data. - * - * @version 8.0.3 - * @date 2025-09-10T16:22:00.613Z - * - * @copyright (c) 2011-2017 Almende B.V, http://almende.com - * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs - * - * @license - * vis.js is dual licensed under both - * - * 1. The Apache 2.0 License - * http://www.apache.org/licenses/LICENSE-2.0 - * - * and - * - * 2. The MIT License - * http://opensource.org/licenses/MIT - * - * vis.js may be distributed under either license. - */var rS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Te(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Jl={exports:{}},iS={},to,nS;function ct(){if(nS)return to;nS=1;var r=function(e){return e&&e.Math===Math&&e};return to=r(typeof globalThis=="object"&&globalThis)||r(typeof window=="object"&&window)||r(typeof self=="object"&&self)||r(typeof rS=="object"&&rS)||r(typeof to=="object"&&to)||function(){return this}()||Function("return this")(),to}var Ql,sS;function ke(){return sS||(sS=1,Ql=function(r){try{return!!r()}catch{return!0}}),Ql}var Zl,oS;function Go(){if(oS)return Zl;oS=1;var r=ke();return Zl=!r(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Zl}var ec,aS;function qu(){if(aS)return ec;aS=1;var r=Go(),e=Function.prototype,t=e.apply,i=e.call;return ec=typeof Reflect=="object"&&Reflect.apply||(r?i.bind(t):function(){return i.apply(t,arguments)}),ec}var tc,uS;function ze(){if(uS)return tc;uS=1;var r=Go(),e=Function.prototype,t=e.call,i=r&&e.bind.bind(t,t);return tc=r?i:function(n){return function(){return t.apply(n,arguments)}},tc}var rc,lS;function ui(){if(lS)return rc;lS=1;var r=ze(),e=r({}.toString),t=r("".slice);return rc=function(i){return t(e(i),8,-1)},rc}var ic,cS;function XL(){if(cS)return ic;cS=1;var r=ui(),e=ze();return ic=function(t){if(r(t)==="Function")return e(t)},ic}var nc,dS;function bt(){if(dS)return nc;dS=1;var r=typeof document=="object"&&document.all;return nc=typeof r>"u"&&r!==void 0?function(e){return typeof e=="function"||e===r}:function(e){return typeof e=="function"},nc}var sc={},oc,hS;function dt(){if(hS)return oc;hS=1;var r=ke();return oc=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),oc}var ac,fS;function Xt(){if(fS)return ac;fS=1;var r=Go(),e=Function.prototype.call;return ac=r?e.bind(e):function(){return e.apply(e,arguments)},ac}var uc={},vS;function Iw(){if(vS)return uc;vS=1;var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!r.call({1:2},1);return uc.f=t?function(n){var s=e(this,n);return!!s&&s.enumerable}:r,uc}var lc,pS;function Yo(){return pS||(pS=1,lc=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}),lc}var cc,gS;function Du(){if(gS)return cc;gS=1;var r=ze(),e=ke(),t=ui(),i=Object,n=r("".split);return cc=e(function(){return!i("z").propertyIsEnumerable(0)})?function(s){return t(s)==="String"?n(s,""):i(s)}:i,cc}var dc,mS;function Xo(){return mS||(mS=1,dc=function(r){return r==null}),dc}var hc,yS;function En(){if(yS)return hc;yS=1;var r=Xo(),e=TypeError;return hc=function(t){if(r(t))throw new e("Can't call method on "+t);return t},hc}var fc,bS;function jr(){if(bS)return fc;bS=1;var r=Du(),e=En();return fc=function(t){return r(e(t))},fc}var vc,_S;function Ut(){if(_S)return vc;_S=1;var r=bt();return vc=function(e){return typeof e=="object"?e!==null:r(e)},vc}var pc,wS;function gt(){return wS||(wS=1,pc={}),pc}var gc,ES;function ir(){if(ES)return gc;ES=1;var r=gt(),e=ct(),t=bt(),i=function(n){return t(n)?n:void 0};return gc=function(n,s){return arguments.length<2?i(r[n])||i(e[n]):r[n]&&r[n][s]||e[n]&&e[n][s]},gc}var mc,SS;function _t(){if(SS)return mc;SS=1;var r=ze();return mc=r({}.isPrototypeOf),mc}var yc,OS;function Ss(){if(OS)return yc;OS=1;var r=ct(),e=r.navigator,t=e&&e.userAgent;return yc=t?String(t):"",yc}var bc,IS;function Jo(){if(IS)return bc;IS=1;var r=ct(),e=Ss(),t=r.process,i=r.Deno,n=t&&t.versions||i&&i.version,s=n&&n.v8,o,a;return s&&(o=s.split("."),a=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!a&&e&&(o=e.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=e.match(/Chrome\/(\d+)/),o&&(a=+o[1]))),bc=a,bc}var _c,TS;function Os(){if(TS)return _c;TS=1;var r=Jo(),e=ke(),t=ct(),i=t.String;return _c=!!Object.getOwnPropertySymbols&&!e(function(){var n=Symbol("symbol detection");return!i(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&r&&r<41}),_c}var wc,$S;function JL(){if($S)return wc;$S=1;var r=Os();return wc=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol",wc}var Ec,PS;function Qo(){if(PS)return Ec;PS=1;var r=ir(),e=bt(),t=_t(),i=JL(),n=Object;return Ec=i?function(s){return typeof s=="symbol"}:function(s){var o=r("Symbol");return e(o)&&t(o.prototype,n(s))},Ec}var Sc,RS;function Is(){if(RS)return Sc;RS=1;var r=String;return Sc=function(e){try{return r(e)}catch{return"Object"}},Sc}var Oc,CS;function li(){if(CS)return Oc;CS=1;var r=bt(),e=Is(),t=TypeError;return Oc=function(i){if(r(i))return i;throw new t(e(i)+" is not a function")},Oc}var Ic,xS;function Tw(){if(xS)return Ic;xS=1;var r=li(),e=Xo();return Ic=function(t,i){var n=t[i];return e(n)?void 0:r(n)},Ic}var Tc,qS;function fV(){if(qS)return Tc;qS=1;var r=Xt(),e=bt(),t=Ut(),i=TypeError;return Tc=function(n,s){var o,a;if(s==="string"&&e(o=n.toString)&&!t(a=r(o,n))||e(o=n.valueOf)&&!t(a=r(o,n))||s!=="string"&&e(o=n.toString)&&!t(a=r(o,n)))return a;throw new i("Can't convert object to primitive value")},Tc}var $c={exports:{}},Pc,DS;function Ts(){return DS||(DS=1,Pc=!0),Pc}var Rc,AS;function vV(){if(AS)return Rc;AS=1;var r=ct(),e=Object.defineProperty;return Rc=function(t,i){try{e(r,t,{value:i,configurable:!0,writable:!0})}catch{r[t]=i}return i},Rc}var MS;function $w(){if(MS)return $c.exports;MS=1;var r=Ts(),e=ct(),t=vV(),i="__core-js_shared__",n=$c.exports=e[i]||t(i,{});return(n.versions||(n.versions=[])).push({version:"3.44.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"}),$c.exports}var Cc,NS;function $s(){if(NS)return Cc;NS=1;var r=$w();return Cc=function(e,t){return r[e]||(r[e]=t||{})},Cc}var xc,FS;function Ir(){if(FS)return xc;FS=1;var r=En(),e=Object;return xc=function(t){return e(r(t))},xc}var qc,kS;function wt(){if(kS)return qc;kS=1;var r=ze(),e=Ir(),t=r({}.hasOwnProperty);return qc=Object.hasOwn||function(n,s){return t(e(n),s)},qc}var Dc,BS;function Au(){if(BS)return Dc;BS=1;var r=ze(),e=0,t=Math.random(),i=r(1.1.toString);return Dc=function(n){return"Symbol("+(n===void 0?"":n)+")_"+i(++e+t,36)},Dc}var Ac,jS;function Et(){if(jS)return Ac;jS=1;var r=ct(),e=$s(),t=wt(),i=Au(),n=Os(),s=JL(),o=r.Symbol,a=e("wks"),u=s?o.for||o:o&&o.withoutSetter||i;return Ac=function(l){return t(a,l)||(a[l]=n&&t(o,l)?o[l]:u("Symbol."+l)),a[l]},Ac}var Mc,LS;function QL(){if(LS)return Mc;LS=1;var r=Xt(),e=Ut(),t=Qo(),i=Tw(),n=fV(),s=Et(),o=TypeError,a=s("toPrimitive");return Mc=function(u,l){if(!e(u)||t(u))return u;var c=i(u,a),d;if(c){if(l===void 0&&(l="default"),d=r(c,u,l),!e(d)||t(d))return d;throw new o("Can't convert object to primitive value")}return l===void 0&&(l="number"),n(u,l)},Mc}var Nc,zS;function Pw(){if(zS)return Nc;zS=1;var r=QL(),e=Qo();return Nc=function(t){var i=r(t,"string");return e(i)?i:i+""},Nc}var Fc,HS;function ZL(){if(HS)return Fc;HS=1;var r=ct(),e=Ut(),t=r.document,i=e(t)&&e(t.createElement);return Fc=function(n){return i?t.createElement(n):{}},Fc}var kc,WS;function ez(){if(WS)return kc;WS=1;var r=dt(),e=ke(),t=ZL();return kc=!r&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),kc}var US;function Mu(){if(US)return sc;US=1;var r=dt(),e=Xt(),t=Iw(),i=Yo(),n=jr(),s=Pw(),o=wt(),a=ez(),u=Object.getOwnPropertyDescriptor;return sc.f=r?u:function(c,d){if(c=n(c),d=s(d),a)try{return u(c,d)}catch{}if(o(c,d))return i(!e(t.f,c,d),c[d])},sc}var Bc,VS;function pV(){if(VS)return Bc;VS=1;var r=ke(),e=bt(),t=/#|\.prototype\./,i=function(u,l){var c=s[n(u)];return c===a?!0:c===o?!1:e(l)?r(l):!!l},n=i.normalize=function(u){return String(u).replace(t,".").toLowerCase()},s=i.data={},o=i.NATIVE="N",a=i.POLYFILL="P";return Bc=i,Bc}var jc,KS;function Nu(){if(KS)return jc;KS=1;var r=XL(),e=li(),t=Go(),i=r(r.bind);return jc=function(n,s){return e(n),s===void 0?n:t?i(n,s):function(){return n.apply(s,arguments)}},jc}var Lc={},zc,GS;function tz(){if(GS)return zc;GS=1;var r=dt(),e=ke();return zc=r&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),zc}var Hc,YS;function ci(){if(YS)return Hc;YS=1;var r=Ut(),e=String,t=TypeError;return Hc=function(i){if(r(i))return i;throw new t(e(i)+" is not an object")},Hc}var XS;function dr(){if(XS)return Lc;XS=1;var r=dt(),e=ez(),t=tz(),i=ci(),n=Pw(),s=TypeError,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Lc.f=r?t?function(h,f,v){if(i(h),f=n(f),i(v),typeof h=="function"&&f==="prototype"&&"value"in v&&c in v&&!v[c]){var p=a(h,f);p&&p[c]&&(h[f]=v.value,v={configurable:l in v?v[l]:p[l],enumerable:u in v?v[u]:p[u],writable:!1})}return o(h,f,v)}:o:function(h,f,v){if(i(h),f=n(f),i(v),e)try{return o(h,f,v)}catch{}if("get"in v||"set"in v)throw new s("Accessors not supported");return"value"in v&&(h[f]=v.value),h},Lc}var Wc,JS;function Ps(){if(JS)return Wc;JS=1;var r=dt(),e=dr(),t=Yo();return Wc=r?function(i,n,s){return e.f(i,n,t(1,s))}:function(i,n,s){return i[n]=s,i},Wc}var Uc,QS;function ye(){if(QS)return Uc;QS=1;var r=ct(),e=qu(),t=XL(),i=bt(),n=Mu().f,s=pV(),o=gt(),a=Nu(),u=Ps(),l=wt(),c=function(d){var h=function(f,v,p){if(this instanceof h){switch(arguments.length){case 0:return new d;case 1:return new d(f);case 2:return new d(f,v)}return new d(f,v,p)}return e(d,this,arguments)};return h.prototype=d.prototype,h};return Uc=function(d,h){var f=d.target,v=d.global,p=d.stat,_=d.proto,y=v?r:p?r[f]:r[f]&&r[f].prototype,g=v?o:o[f]||u(o,f,{})[f],b=g.prototype,m,E,O,I,w,S,T,R,x;for(I in h)m=s(v?I:f+(p?".":"#")+I,d.forced),E=!m&&y&&l(y,I),S=g[I],E&&(d.dontCallGetSet?(x=n(y,I),T=x&&x.value):T=y[I]),w=E&&T?T:h[I],!(!m&&!_&&typeof S==typeof w)&&(d.bind&&E?R=a(w,r):d.wrap&&E?R=c(w):_&&i(w)?R=t(w):R=w,(d.sham||w&&w.sham||S&&S.sham)&&u(R,"sham",!0),u(g,I,R),_&&(O=f+"Prototype",l(o,O)||u(o,O,{}),u(o[O],I,w),d.real&&b&&(m||!b[I])&&u(b,I,w)))},Uc}var ZS;function gV(){if(ZS)return iS;ZS=1;var r=ye(),e=dt(),t=dr().f;return r({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),iS}var eO;function mV(){if(eO)return Jl.exports;eO=1,gV();var r=gt(),e=r.Object,t=Jl.exports=function(n,s,o){return e.defineProperty(n,s,o)};return e.defineProperty.sham&&(t.sham=!0),Jl.exports}var Vc,tO;function rz(){if(tO)return Vc;tO=1;var r=mV();return Vc=r,Vc}var Kc,rO;function yV(){if(rO)return Kc;rO=1;var r=rz();return Kc=r,Kc}var Gc,iO;function bV(){if(iO)return Gc;iO=1;var r=yV();return Gc=r,Gc}var Yc,nO;function _V(){return nO||(nO=1,Yc=bV()),Yc}var wV=_V(),EV=Te(wV),sO={},Xc,oO;function Sn(){if(oO)return Xc;oO=1;var r=ui();return Xc=Array.isArray||function(t){return r(t)==="Array"},Xc}var Jc,aO;function SV(){if(aO)return Jc;aO=1;var r=Math.ceil,e=Math.floor;return Jc=Math.trunc||function(i){var n=+i;return(n>0?e:r)(n)},Jc}var Qc,uO;function Rs(){if(uO)return Qc;uO=1;var r=SV();return Qc=function(e){var t=+e;return t!==t||t===0?0:r(t)},Qc}var Zc,lO;function iz(){if(lO)return Zc;lO=1;var r=Rs(),e=Math.min;return Zc=function(t){var i=r(t);return i>0?e(i,9007199254740991):0},Zc}var ed,cO;function Bi(){if(cO)return ed;cO=1;var r=iz();return ed=function(e){return r(e.length)},ed}var td,dO;function nz(){if(dO)return td;dO=1;var r=TypeError,e=9007199254740991;return td=function(t){if(t>e)throw r("Maximum allowed index exceeded");return t},td}var rd,hO;function Fu(){if(hO)return rd;hO=1;var r=dt(),e=dr(),t=Yo();return rd=function(i,n,s){r?e.f(i,n,t(0,s)):i[n]=s},rd}var id,fO;function Rw(){if(fO)return id;fO=1;var r=Et(),e=r("toStringTag"),t={};return t[e]="z",id=String(t)==="[object z]",id}var nd,vO;function ji(){if(vO)return nd;vO=1;var r=Rw(),e=bt(),t=ui(),i=Et(),n=i("toStringTag"),s=Object,o=t(function(){return arguments}())==="Arguments",a=function(u,l){try{return u[l]}catch{}};return nd=r?t:function(u){var l,c,d;return u===void 0?"Undefined":u===null?"Null":typeof(c=a(l=s(u),n))=="string"?c:o?t(l):(d=t(l))==="Object"&&e(l.callee)?"Arguments":d},nd}var sd,pO;function OV(){if(pO)return sd;pO=1;var r=ze(),e=bt(),t=$w(),i=r(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(n){return i(n)}),sd=t.inspectSource,sd}var od,gO;function sz(){if(gO)return od;gO=1;var r=ze(),e=ke(),t=bt(),i=ji(),n=ir(),s=OV(),o=function(){},a=n("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=r(u.exec),c=!u.test(o),d=function(v){if(!t(v))return!1;try{return a(o,[],v),!0}catch{return!1}},h=function(v){if(!t(v))return!1;switch(i(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,s(v))}catch{return!0}};return h.sham=!0,od=!a||e(function(){var f;return d(d.call)||!d(Object)||!d(function(){f=!0})||f})?h:d,od}var ad,mO;function IV(){if(mO)return ad;mO=1;var r=Sn(),e=sz(),t=Ut(),i=Et(),n=i("species"),s=Array;return ad=function(o){var a;return r(o)&&(a=o.constructor,e(a)&&(a===s||r(a.prototype))?a=void 0:t(a)&&(a=a[n],a===null&&(a=void 0))),a===void 0?s:a},ad}var ud,yO;function Cw(){if(yO)return ud;yO=1;var r=IV();return ud=function(e,t){return new(r(e))(t===0?0:t)},ud}var ld,bO;function Zo(){if(bO)return ld;bO=1;var r=ke(),e=Et(),t=Jo(),i=e("species");return ld=function(n){return t>=51||!r(function(){var s=[],o=s.constructor={};return o[i]=function(){return{foo:1}},s[n](Boolean).foo!==1})},ld}var _O;function oz(){if(_O)return sO;_O=1;var r=ye(),e=ke(),t=Sn(),i=Ut(),n=Ir(),s=Bi(),o=nz(),a=Fu(),u=Cw(),l=Zo(),c=Et(),d=Jo(),h=c("isConcatSpreadable"),f=d>=51||!e(function(){var _=[];return _[h]=!1,_.concat()[0]!==_}),v=function(_){if(!i(_))return!1;var y=_[h];return y!==void 0?!!y:t(_)},p=!f||!l("concat");return r({target:"Array",proto:!0,arity:1,forced:p},{concat:function(y){var g=n(this),b=u(g,0),m=0,E,O,I,w,S;for(E=-1,I=arguments.length;Ec;)if(d=u[c++],d!==d)return!0}else for(;l>c;c++)if((n||c in u)&&u[c]===o)return n||c||0;return!n&&-1}};return fd={includes:i(!0),indexOf:i(!1)},fd}var vd,TO;function ea(){return TO||(TO=1,vd={}),vd}var pd,$O;function az(){if($O)return pd;$O=1;var r=ze(),e=wt(),t=jr(),i=TV().indexOf,n=ea(),s=r([].push);return pd=function(o,a){var u=t(o),l=0,c=[],d;for(d in u)!e(n,d)&&e(u,d)&&s(c,d);for(;a.length>l;)e(u,d=a[l++])&&(~i(c,d)||s(c,d));return c},pd}var gd,PO;function qw(){return PO||(PO=1,gd=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),gd}var md,RO;function ku(){if(RO)return md;RO=1;var r=az(),e=qw();return md=Object.keys||function(i){return r(i,e)},md}var CO;function Dw(){if(CO)return dd;CO=1;var r=dt(),e=tz(),t=dr(),i=ci(),n=jr(),s=ku();return dd.f=r&&!e?Object.defineProperties:function(a,u){i(a);for(var l=n(u),c=s(u),d=c.length,h=0,f;d>h;)t.f(a,f=c[h++],l[f]);return a},dd}var yd,xO;function $V(){if(xO)return yd;xO=1;var r=ir();return yd=r("document","documentElement"),yd}var bd,qO;function Bu(){if(qO)return bd;qO=1;var r=$s(),e=Au(),t=r("keys");return bd=function(i){return t[i]||(t[i]=e(i))},bd}var _d,DO;function ta(){if(DO)return _d;DO=1;var r=ci(),e=Dw(),t=qw(),i=ea(),n=$V(),s=ZL(),o=Bu(),a=">",u="<",l="prototype",c="script",d=o("IE_PROTO"),h=function(){},f=function(g){return u+c+a+g+u+"/"+c+a},v=function(g){g.write(f("")),g.close();var b=g.parentWindow.Object;return g=null,b},p=function(){var g=s("iframe"),b="java"+c+":",m;return g.style.display="none",n.appendChild(g),g.src=String(b),m=g.contentWindow.document,m.open(),m.write(f("document.F=Object")),m.close(),m.F},_,y=function(){try{_=new ActiveXObject("htmlfile")}catch{}y=typeof document<"u"?document.domain&&_?v(_):p():v(_);for(var g=t.length;g--;)delete y[l][t[g]];return y()};return i[d]=!0,_d=Object.create||function(b,m){var E;return b!==null?(h[l]=r(b),E=new h,h[l]=null,E[d]=b):E=y(),m===void 0?E:e.f(E,m)},_d}var wd={},AO;function ju(){if(AO)return wd;AO=1;var r=az(),e=qw(),t=e.concat("length","prototype");return wd.f=Object.getOwnPropertyNames||function(n){return r(n,t)},wd}var Ed={},Sd,MO;function Cs(){if(MO)return Sd;MO=1;var r=ze();return Sd=r([].slice),Sd}var NO;function uz(){if(NO)return Ed;NO=1;var r=ui(),e=jr(),t=ju().f,i=Cs(),n=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(o){try{return t(o)}catch{return i(n)}};return Ed.f=function(a){return n&&r(a)==="Window"?s(a):t(e(a))},Ed}var Od={},FO;function Lu(){return FO||(FO=1,Od.f=Object.getOwnPropertySymbols),Od}var Id,kO;function ra(){if(kO)return Id;kO=1;var r=Ps();return Id=function(e,t,i,n){return n&&n.enumerable?e[t]=i:r(e,t,i),e},Id}var Td,BO;function Aw(){if(BO)return Td;BO=1;var r=dr();return Td=function(e,t,i){return r.f(e,t,i)},Td}var $d={},jO;function zu(){if(jO)return $d;jO=1;var r=Et();return $d.f=r,$d}var Pd,LO;function Je(){if(LO)return Pd;LO=1;var r=gt(),e=wt(),t=zu(),i=dr().f;return Pd=function(n){var s=r.Symbol||(r.Symbol={});e(s,n)||i(s,n,{value:t.f(n)})},Pd}var Rd,zO;function lz(){if(zO)return Rd;zO=1;var r=Xt(),e=ir(),t=Et(),i=ra();return Rd=function(){var n=e("Symbol"),s=n&&n.prototype,o=s&&s.valueOf,a=t("toPrimitive");s&&!s[a]&&i(s,a,function(u){return r(o,this)},{arity:1})},Rd}var Cd,HO;function PV(){if(HO)return Cd;HO=1;var r=Rw(),e=ji();return Cd=r?{}.toString:function(){return"[object "+e(this)+"]"},Cd}var xd,WO;function On(){if(WO)return xd;WO=1;var r=Rw(),e=dr().f,t=Ps(),i=wt(),n=PV(),s=Et(),o=s("toStringTag");return xd=function(a,u,l,c){var d=l?a:a&&a.prototype;d&&(i(d,o)||e(d,o,{configurable:!0,value:u}),c&&!r&&t(d,"toString",n))},xd}var qd,UO;function RV(){if(UO)return qd;UO=1;var r=ct(),e=bt(),t=r.WeakMap;return qd=e(t)&&/native code/.test(String(t)),qd}var Dd,VO;function ia(){if(VO)return Dd;VO=1;var r=RV(),e=ct(),t=Ut(),i=Ps(),n=wt(),s=$w(),o=Bu(),a=ea(),u="Object already initialized",l=e.TypeError,c=e.WeakMap,d,h,f,v=function(g){return f(g)?h(g):d(g,{})},p=function(g){return function(b){var m;if(!t(b)||(m=h(b)).type!==g)throw new l("Incompatible receiver, "+g+" required");return m}};if(r||s.state){var _=s.state||(s.state=new c);_.get=_.get,_.has=_.has,_.set=_.set,d=function(g,b){if(_.has(g))throw new l(u);return b.facade=g,_.set(g,b),b},h=function(g){return _.get(g)||{}},f=function(g){return _.has(g)}}else{var y=o("state");a[y]=!0,d=function(g,b){if(n(g,y))throw new l(u);return b.facade=g,i(g,y,b),b},h=function(g){return n(g,y)?g[y]:{}},f=function(g){return n(g,y)}}return Dd={set:d,get:h,has:f,enforce:v,getterFor:p},Dd}var Ad,KO;function xs(){if(KO)return Ad;KO=1;var r=Nu(),e=ze(),t=Du(),i=Ir(),n=Bi(),s=Cw(),o=e([].push),a=function(u){var l=u===1,c=u===2,d=u===3,h=u===4,f=u===6,v=u===7,p=u===5||f;return function(_,y,g,b){for(var m=i(_),E=t(m),O=n(E),I=r(y,g),w=0,S=b||s,T=l?S(_,O):c||v?S(_,0):void 0,R,x;O>w;w++)if((p||w in E)&&(R=E[w],x=I(R,w,m),u))if(l)T[w]=x;else if(x)switch(u){case 3:return!0;case 5:return R;case 6:return w;case 2:o(T,R)}else switch(u){case 4:return!1;case 7:o(T,R)}return f?-1:d||h?h:T}};return Ad={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},Ad}var GO;function CV(){if(GO)return EO;GO=1;var r=ye(),e=ct(),t=Xt(),i=ze(),n=Ts(),s=dt(),o=Os(),a=ke(),u=wt(),l=_t(),c=ci(),d=jr(),h=Pw(),f=Li(),v=Yo(),p=ta(),_=ku(),y=ju(),g=uz(),b=Lu(),m=Mu(),E=dr(),O=Dw(),I=Iw(),w=ra(),S=Aw(),T=$s(),R=Bu(),x=ea(),C=Au(),D=Et(),j=zu(),ee=Je(),H=lz(),Z=On(),ve=ia(),we=xs().forEach,te=R("hidden"),me="Symbol",xe="prototype",De=ve.set,nt=ve.getterFor(me),_e=Object[xe],A=e.Symbol,W=A&&A[xe],Y=e.RangeError,ie=e.TypeError,Pe=e.QObject,$=m.f,P=E.f,q=g.f,F=I.f,k=i([].push),N=T("symbols"),K=T("op-symbols"),X=T("wks"),U=!Pe||!Pe[xe]||!Pe[xe].findChild,B=function(ae,V,Q){var re=$(_e,V);re&&delete _e[V],P(ae,V,Q),re&&ae!==_e&&P(_e,V,re)},ce=s&&a(function(){return p(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a!==7})?B:P,J=function(ae,V){var Q=N[ae]=p(W);return De(Q,{type:me,tag:ae,description:V}),s||(Q.description=V),Q},oe=function(V,Q,re){V===_e&&oe(K,Q,re),c(V);var ne=h(Q);return c(re),u(N,ne)?(re.enumerable?(u(V,te)&&V[te][ne]&&(V[te][ne]=!1),re=p(re,{enumerable:v(0,!1)})):(u(V,te)||P(V,te,v(1,p(null))),V[te][ne]=!0),ce(V,ne,re)):P(V,ne,re)},he=function(V,Q){c(V);var re=d(Q),ne=_(re).concat(st(re));return we(ne,function(Ee){(!s||t(qe,re,Ee))&&oe(V,Ee,re[Ee])}),V},Oe=function(V,Q){return Q===void 0?p(V):he(p(V),Q)},qe=function(V){var Q=h(V),re=t(F,this,Q);return this===_e&&u(N,Q)&&!u(K,Q)?!1:re||!u(this,Q)||!u(N,Q)||u(this,te)&&this[te][Q]?re:!0},Re=function(V,Q){var re=d(V),ne=h(Q);if(!(re===_e&&u(N,ne)&&!u(K,ne))){var Ee=$(re,ne);return Ee&&u(N,ne)&&!(u(re,te)&&re[te][ne])&&(Ee.enumerable=!0),Ee}},vt=function(V){var Q=q(d(V)),re=[];return we(Q,function(ne){!u(N,ne)&&!u(x,ne)&&k(re,ne)}),re},st=function(ae){var V=ae===_e,Q=q(V?K:d(ae)),re=[];return we(Q,function(ne){u(N,ne)&&(!V||u(_e,ne))&&k(re,N[ne])}),re};return o||(A=function(){if(l(W,this))throw new ie("Symbol is not a constructor");var V=!arguments.length||arguments[0]===void 0?void 0:f(arguments[0]),Q=C(V),re=function(ne){var Ee=this===void 0?e:this;Ee===_e&&t(re,K,ne),u(Ee,te)&&u(Ee[te],Q)&&(Ee[te][Q]=!1);var vi=v(1,ne);try{ce(Ee,Q,vi)}catch(Xs){if(!(Xs instanceof Y))throw Xs;B(Ee,Q,vi)}};return s&&U&&ce(_e,Q,{configurable:!0,set:re}),J(Q,V)},W=A[xe],w(W,"toString",function(){return nt(this).tag}),w(A,"withoutSetter",function(ae){return J(C(ae),ae)}),I.f=qe,E.f=oe,O.f=he,m.f=Re,y.f=g.f=vt,b.f=st,j.f=function(ae){return J(D(ae),ae)},s&&(S(W,"description",{configurable:!0,get:function(){return nt(this).description}}),n||w(_e,"propertyIsEnumerable",qe,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:A}),we(_(X),function(ae){ee(ae)}),r({target:me,stat:!0,forced:!o},{useSetter:function(){U=!0},useSimple:function(){U=!1}}),r({target:"Object",stat:!0,forced:!o,sham:!s},{create:Oe,defineProperty:oe,defineProperties:he,getOwnPropertyDescriptor:Re}),r({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:vt}),H(),Z(A,me),x[te]=!0,EO}var YO={},Md,XO;function cz(){if(XO)return Md;XO=1;var r=Os();return Md=r&&!!Symbol.for&&!!Symbol.keyFor,Md}var JO;function xV(){if(JO)return YO;JO=1;var r=ye(),e=ir(),t=wt(),i=Li(),n=$s(),s=cz(),o=n("string-to-symbol-registry"),a=n("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!s},{for:function(u){var l=i(u);if(t(o,l))return o[l];var c=e("Symbol")(l);return o[l]=c,a[c]=l,c}}),YO}var QO={},ZO;function qV(){if(ZO)return QO;ZO=1;var r=ye(),e=wt(),t=Qo(),i=Is(),n=$s(),s=cz(),o=n("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!s},{keyFor:function(u){if(!t(u))throw new TypeError(i(u)+" is not a symbol");if(e(o,u))return o[u]}}),QO}var eI={},Nd,tI;function DV(){if(tI)return Nd;tI=1;var r=ze(),e=Sn(),t=bt(),i=ui(),n=Li(),s=r([].push);return Nd=function(o){if(t(o))return o;if(e(o)){for(var a=o.length,u=[],l=0;l=v.length)return f.target=null,o(void 0,!0);switch(f.kind){case"keys":return o(p,!1);case"values":return o(v[p],!1)}return o([p,v[p]],!1)},"values");var h=t.Arguments=t.Array;if(e("keys"),e("values"),e("entries"),!a&&u&&h.name!=="values")try{n(h,"name",{value:"values"})}catch{}return Jd}var Qd,eT;function rK(){return eT||(eT=1,Qd={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}),Qd}var tT;function Hi(){if(tT)return BI;tT=1,zi();var r=rK(),e=ct(),t=On(),i=qs();for(var n in r)t(e[n],n),i[n]=i.Array;return BI}var Zd,rT;function bz(){if(rT)return Zd;rT=1;var r=KV();return Hi(),Zd=r,Zd}var iT={},nT;function iK(){if(nT)return iT;nT=1;var r=Et(),e=dr().f,t=r("metadata"),i=Function.prototype;return i[t]===void 0&&e(i,t,{value:null}),iT}var sT={},oT;function nK(){return oT||(oT=1,fz()),sT}var aT={},uT;function sK(){return uT||(uT=1,vz()),aT}var lT={},cT;function oK(){if(cT)return lT;cT=1;var r=Je();return r("metadata"),lT}var eh,dT;function aK(){if(dT)return eh;dT=1;var r=bz();return iK(),nK(),sK(),oK(),eh=r,eh}var hT={},th,fT;function _z(){if(fT)return th;fT=1;var r=ir(),e=ze(),t=r("Symbol"),i=t.keyFor,n=e(t.prototype.valueOf);return th=t.isRegisteredSymbol||function(o){try{return i(n(o))!==void 0}catch{return!1}},th}var vT;function uK(){if(vT)return hT;vT=1;var r=ye(),e=_z();return r({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),hT}var pT={},rh,gT;function wz(){if(gT)return rh;gT=1;for(var r=$s(),e=ir(),t=ze(),i=Qo(),n=Et(),s=e("Symbol"),o=s.isWellKnownSymbol,a=e("Object","getOwnPropertyNames"),u=t(s.prototype.valueOf),l=r("wks"),c=0,d=a(s),h=d.length;c=f?u?"":void 0:(v=s(d,h),v<55296||v>56319||h+1===f||(p=s(d,h+1))<56320||p>57343?u?n(d,h):v:u?o(d,h,h+2):(v-55296<<10)+(p-56320)+65536)}};return sh={codeAt:a(!1),charAt:a(!0)},sh}var kT;function Hu(){if(kT)return NT;kT=1;var r=wK().charAt,e=Li(),t=ia(),i=Mw(),n=Nw(),s="String Iterator",o=t.set,a=t.getterFor(s);return i(String,"String",function(u){o(this,{type:s,string:e(u),index:0})},function(){var l=a(this),c=l.string,d=l.index,h;return d>=c.length?n(void 0,!0):(h=r(c,d),l.index+=h.length,n(h,!1))}),NT}var oh,BT;function EK(){if(BT)return oh;BT=1,zi(),Hu(),pz();var r=zu();return oh=r.f("iterator"),oh}var ah,jT;function Ez(){if(jT)return ah;jT=1;var r=EK();return Hi(),ah=r,ah}var uh,LT;function SK(){if(LT)return uh;LT=1;var r=Ez();return uh=r,uh}var lh,zT;function OK(){if(zT)return lh;zT=1;var r=SK();return lh=r,lh}var ch,HT;function IK(){return HT||(HT=1,ch=OK()),ch}var TK=IK(),$K=Te(TK);function Ao(r){"@babel/helpers - typeof";return Ao=typeof Aa=="function"&&typeof $K=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Aa=="function"&&e.constructor===Aa&&e!==Aa.prototype?"symbol":typeof e},Ao(r)}var dh,WT;function PK(){if(WT)return dh;WT=1,gz();var r=zu();return dh=r.f("toPrimitive"),dh}var hh,UT;function RK(){if(UT)return hh;UT=1;var r=PK();return hh=r,hh}var fh,VT;function CK(){if(VT)return fh;VT=1;var r=RK();return fh=r,fh}var vh,KT;function xK(){if(KT)return vh;KT=1;var r=CK();return vh=r,vh}var ph,GT;function qK(){return GT||(GT=1,ph=xK()),ph}var DK=qK(),AK=Te(DK);function MK(r,e){if(Ao(r)!="object"||!r)return r;var t=r[AK];if(t!==void 0){var i=t.call(r,e);if(Ao(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function NK(r){var e=MK(r,"string");return Ao(e)=="symbol"?e:e+""}function Ii(r,e,t){return(e=NK(e))in r?EV(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var YT={},gh,XT;function FK(){if(XT)return gh;XT=1;var r=ze(),e=li(),t=Ut(),i=wt(),n=Cs(),s=Go(),o=Function,a=r([].concat),u=r([].join),l={},c=function(d,h,f){if(!i(l,h)){for(var v=[],p=0;p=0:v>p;p+=_)p in f&&(d=l(d,f[p],p,h));return d}};return Eh={left:o(!1),right:o(!0)},Eh}var Sh,s$;function Wu(){if(s$)return Sh;s$=1;var r=ke();return Sh=function(e,t){var i=[][e];return!!i&&r(function(){i.call(null,t||function(){return 1},1)})},Sh}var Oh,o$;function Oz(){if(o$)return Oh;o$=1;var r=ct(),e=Ss(),t=ui(),i=function(n){return e.slice(0,n.length)===n};return Oh=function(){return i("Bun/")?"BUN":i("Cloudflare-Workers")?"CLOUDFLARE":i("Deno/")?"DENO":i("Node.js/")?"NODE":r.Bun&&typeof Bun.version=="string"?"BUN":r.Deno&&typeof Deno.version=="object"?"DENO":t(r.process)==="process"?"NODE":r.window&&r.document?"BROWSER":"REST"}(),Oh}var Ih,a$;function UK(){if(a$)return Ih;a$=1;var r=Oz();return Ih=r==="NODE",Ih}var u$;function VK(){if(u$)return i$;u$=1;var r=ye(),e=WK().left,t=Wu(),i=Jo(),n=UK(),s=!n&&i>79&&i<83,o=s||!t("reduce");return r({target:"Array",proto:!0,forced:o},{reduce:function(u){var l=arguments.length;return e(this,u,l,l>1?arguments[1]:void 0)}}),i$}var Th,l$;function KK(){if(l$)return Th;l$=1,VK();var r=Jt();return Th=r("Array","reduce"),Th}var $h,c$;function GK(){if(c$)return $h;c$=1;var r=_t(),e=KK(),t=Array.prototype;return $h=function(i){var n=i.reduce;return i===t||r(t,i)&&n===t.reduce?e:n},$h}var Ph,d$;function YK(){if(d$)return Ph;d$=1;var r=GK();return Ph=r,Ph}var Rh,h$;function XK(){return h$||(h$=1,Rh=YK()),Rh}var JK=XK(),QK=Te(JK),f$={},v$;function ZK(){if(v$)return f$;v$=1;var r=ye(),e=xs().filter,t=Zo(),i=t("filter");return r({target:"Array",proto:!0,forced:!i},{filter:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),f$}var Ch,p$;function eG(){if(p$)return Ch;p$=1,ZK();var r=Jt();return Ch=r("Array","filter"),Ch}var xh,g$;function tG(){if(g$)return xh;g$=1;var r=_t(),e=eG(),t=Array.prototype;return xh=function(i){var n=i.filter;return i===t||r(t,i)&&n===t.filter?e:n},xh}var qh,m$;function rG(){if(m$)return qh;m$=1;var r=tG();return qh=r,qh}var Dh,y$;function iG(){return y$||(y$=1,Dh=rG()),Dh}var nG=iG(),Yn=Te(nG),b$={},_$;function sG(){if(_$)return b$;_$=1;var r=ye(),e=xs().map,t=Zo(),i=t("map");return r({target:"Array",proto:!0,forced:!i},{map:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),b$}var Ah,w$;function oG(){if(w$)return Ah;w$=1,sG();var r=Jt();return Ah=r("Array","map"),Ah}var Mh,E$;function aG(){if(E$)return Mh;E$=1;var r=_t(),e=oG(),t=Array.prototype;return Mh=function(i){var n=i.map;return i===t||r(t,i)&&n===t.map?e:n},Mh}var Nh,S$;function uG(){if(S$)return Nh;S$=1;var r=aG();return Nh=r,Nh}var Fh,O$;function lG(){return O$||(O$=1,Fh=uG()),Fh}var cG=lG(),mr=Te(cG),kh,I$;function dG(){return I$||(I$=1,kh=bz()),kh}var hG=dG(),fG=Te(hG),T$={},$$;function vG(){if($$)return T$;$$=1;var r=ye(),e=Sn(),t=sz(),i=Ut(),n=xw(),s=Bi(),o=jr(),a=Fu(),u=Et(),l=Zo(),c=Cs(),d=l("slice"),h=u("species"),f=Array,v=Math.max;return r({target:"Array",proto:!0,forced:!d},{slice:function(_,y){var g=o(this),b=s(g),m=n(_,b),E=n(y===void 0?b:y,b),O,I,w;if(e(g)&&(O=g.constructor,t(O)&&(O===f||e(O.prototype))?O=void 0:i(O)&&(O=O[h],O===null&&(O=void 0)),O===f||O===void 0))return c(g,m,E);for(I=new(O===void 0?f:O)(v(E-m,0)),w=0;m1?arguments[1]:void 0)},Zh}var X$;function kG(){if(X$)return G$;X$=1;var r=ye(),e=FG();return r({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),G$}var ef,J$;function BG(){if(J$)return ef;J$=1,kG();var r=Jt();return ef=r("Array","forEach"),ef}var tf,Q$;function jG(){if(Q$)return tf;Q$=1;var r=BG();return tf=r,tf}var rf,Z$;function LG(){if(Z$)return rf;Z$=1;var r=ji(),e=wt(),t=_t(),i=jG(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return rf=function(o){var a=o.forEach;return o===n||t(n,o)&&a===n.forEach||e(s,r(o))?i:a},rf}var nf,eP;function zG(){return eP||(eP=1,nf=LG()),nf}var HG=zG(),dn=Te(HG),tP={},rP;function WG(){if(rP)return tP;rP=1;var r=ye(),e=ze(),t=Sn(),i=e([].reverse),n=[1,2];return r({target:"Array",proto:!0,forced:String(n)===String(n.reverse())},{reverse:function(){return t(this)&&(this.length=this.length),i(this)}}),tP}var sf,iP;function UG(){if(iP)return sf;iP=1,WG();var r=Jt();return sf=r("Array","reverse"),sf}var of,nP;function VG(){if(nP)return of;nP=1;var r=_t(),e=UG(),t=Array.prototype;return of=function(i){var n=i.reverse;return i===t||r(t,i)&&n===t.reverse?e:n},of}var af,sP;function KG(){if(sP)return af;sP=1;var r=VG();return af=r,af}var uf,oP;function GG(){return oP||(oP=1,uf=KG()),uf}var YG=GG(),XG=Te(YG),aP={},lf,uP;function JG(){if(uP)return lf;uP=1;var r=dt(),e=Sn(),t=TypeError,i=Object.getOwnPropertyDescriptor,n=r&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(s){return s instanceof TypeError}}();return lf=n?function(s,o){if(e(s)&&!i(s,"length").writable)throw new t("Cannot set read only .length");return s.length=o}:function(s,o){return s.length=o},lf}var cf,lP;function Tz(){if(lP)return cf;lP=1;var r=Is(),e=TypeError;return cf=function(t,i){if(!delete t[i])throw new e("Cannot delete property "+r(i)+" of "+r(t))},cf}var cP;function QG(){if(cP)return aP;cP=1;var r=ye(),e=Ir(),t=xw(),i=Rs(),n=Bi(),s=JG(),o=nz(),a=Cw(),u=Fu(),l=Tz(),c=Zo(),d=c("splice"),h=Math.max,f=Math.min;return r({target:"Array",proto:!0,forced:!d},{splice:function(p,_){var y=e(this),g=n(y),b=t(p,g),m=arguments.length,E,O,I,w,S,T;for(m===0?E=O=0:m===1?(E=0,O=g-b):(E=m-2,O=f(h(i(_),0),g-b)),o(g+E-O),I=a(y,O),w=0;wg-O+E;w--)l(y,w-1)}else if(E>O)for(w=g-O;w>b;w--)S=w+O-1,T=w+E-1,S in y?y[T]=y[S]:l(y,T);for(w=0;wy;)for(var m=u(arguments[y++]),E=g?d(n(m),g(m)):n(m),O=E.length,I=0,w;O>I;)w=E[I++],(!r||t(b,m,w))&&(p[w]=m[w]);return p}:l,pf}var mP;function s6(){if(mP)return pP;mP=1;var r=ye(),e=n6();return r({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e}),pP}var gf,yP;function o6(){if(yP)return gf;yP=1,s6();var r=gt();return gf=r.Object.assign,gf}var mf,bP;function a6(){if(bP)return mf;bP=1;var r=o6();return mf=r,mf}var yf,_P;function u6(){return _P||(_P=1,yf=a6()),yf}var l6=u6(),c6=Te(l6),bf,wP;function d6(){if(wP)return bf;wP=1,oz();var r=Jt();return bf=r("Array","concat"),bf}var _f,EP;function h6(){if(EP)return _f;EP=1;var r=_t(),e=d6(),t=Array.prototype;return _f=function(i){var n=i.concat;return i===t||r(t,i)&&n===t.concat?e:n},_f}var wf,SP;function f6(){if(SP)return wf;SP=1;var r=h6();return wf=r,wf}var Ef,OP;function v6(){return OP||(OP=1,Ef=f6()),Ef}var p6=v6(),g6=Te(p6),IP={},TP;function m6(){if(TP)return IP;TP=1;var r=ye(),e=dt(),t=ta();return r({target:"Object",stat:!0,sham:!e},{create:t}),IP}var Sf,$P;function y6(){if($P)return Sf;$P=1,m6();var r=gt(),e=r.Object;return Sf=function(i,n){return e.create(i,n)},Sf}var Of,PP;function b6(){if(PP)return Of;PP=1;var r=y6();return Of=r,Of}var If,RP;function _6(){return RP||(RP=1,If=b6()),If}var w6=_6(),E6=Te(w6),CP={},Tf,xP;function S6(){if(xP)return Tf;xP=1;var r=Rs(),e=Li(),t=En(),i=RangeError;return Tf=function(s){var o=e(t(this)),a="",u=r(s);if(u<0||u===1/0)throw new i("Wrong number of repetitions");for(;u>0;(u>>>=1)&&(o+=o))u&1&&(a+=o);return a},Tf}var $f,qP;function O6(){if(qP)return $f;qP=1;var r=ze(),e=iz(),t=Li(),i=S6(),n=En(),s=r(i),o=r("".slice),a=Math.ceil,u=function(l){return function(c,d,h){var f=t(n(c)),v=e(d),p=f.length,_=h===void 0?" ":t(h),y,g;return v<=p||_===""?f:(y=v-p,g=s(_,a(y/_.length)),g.length>y&&(g=o(g,0,y)),l?f+g:g+f)}};return $f={start:u(!1),end:u(!0)},$f}var Pf,DP;function I6(){if(DP)return Pf;DP=1;var r=ze(),e=ke(),t=O6().start,i=RangeError,n=isFinite,s=Math.abs,o=Date.prototype,a=o.toISOString,u=r(o.getTime),l=r(o.getUTCDate),c=r(o.getUTCFullYear),d=r(o.getUTCHours),h=r(o.getUTCMilliseconds),f=r(o.getUTCMinutes),v=r(o.getUTCMonth),p=r(o.getUTCSeconds);return Pf=e(function(){return a.call(new Date(-5e13-1))!=="0385-07-25T07:06:39.999Z"})||!e(function(){a.call(new Date(NaN))})?function(){if(!n(u(this)))throw new i("Invalid time value");var y=this,g=c(y),b=h(y),m=g<0?"-":g>9999?"+":"";return m+t(s(g),m?6:4,0)+"-"+t(v(y)+1,2,0)+"-"+t(l(y),2,0)+"T"+t(d(y),2,0)+":"+t(f(y),2,0)+":"+t(p(y),2,0)+"."+t(b,3,0)+"Z"}:a,Pf}var AP;function T6(){if(AP)return CP;AP=1;var r=ye(),e=Xt(),t=Ir(),i=QL(),n=I6(),s=ui(),o=ke(),a=o(function(){return new Date(NaN).toJSON()!==null||e(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1});return r({target:"Date",proto:!0,forced:a},{toJSON:function(l){var c=t(this),d=i(c,"number");return typeof d=="number"&&!isFinite(d)?null:!("toISOString"in c)&&s(c)==="Date"?e(n,c):c.toISOString()}}),CP}var Rf,MP;function $6(){if(MP)return Rf;MP=1,T6(),dz();var r=gt(),e=qu();return r.JSON||(r.JSON={stringify:JSON.stringify}),Rf=function(i,n,s){return e(r.JSON.stringify,null,arguments)},Rf}var Cf,NP;function P6(){if(NP)return Cf;NP=1;var r=$6();return Cf=r,Cf}var xf,FP;function R6(){return FP||(FP=1,xf=P6()),xf}var C6=R6(),x6=Te(C6),kP={},BP={},qf,jP;function q6(){if(jP)return qf;jP=1;var r=TypeError;return qf=function(e,t){if(ed,p=t(h)?h:a(h),_=v?s(arguments,d):[],y=v?function(){e(p,this,_)}:p;return c?l(y,f):l(y)}:l},Df}var zP;function D6(){if(zP)return BP;zP=1;var r=ye(),e=ct(),t=Pz(),i=t(e.setInterval,!0);return r({global:!0,bind:!0,forced:e.setInterval!==i},{setInterval:i}),BP}var HP={},WP;function A6(){if(WP)return HP;WP=1;var r=ye(),e=ct(),t=Pz(),i=t(e.setTimeout,!0);return r({global:!0,bind:!0,forced:e.setTimeout!==i},{setTimeout:i}),HP}var UP;function M6(){return UP||(UP=1,D6(),A6()),kP}var Af,VP;function N6(){if(VP)return Af;VP=1,M6();var r=gt();return Af=r.setTimeout,Af}var Mf,KP;function F6(){return KP||(KP=1,Mf=N6()),Mf}var k6=F6(),B6=Te(k6),Nf={exports:{}},GP;function j6(){return GP||(GP=1,function(r){function e(i){if(i)return t(i);this._callbacks=new Map}function t(i){return Object.assign(i,e.prototype),i._callbacks=new Map,i}e.prototype.on=function(i,n){const s=this._callbacks.get(i)??[];return s.push(n),this._callbacks.set(i,s),this},e.prototype.once=function(i,n){const s=(...o)=>{this.off(i,s),n.apply(this,o)};return s.fn=n,this.on(i,s),this},e.prototype.off=function(i,n){if(i===void 0&&n===void 0)return this._callbacks.clear(),this;if(n===void 0)return this._callbacks.delete(i),this;const s=this._callbacks.get(i);if(s){for(const[o,a]of s.entries())if(a===n||a.fn===n){s.splice(o,1);break}s.length===0?this._callbacks.delete(i):this._callbacks.set(i,s)}return this},e.prototype.emit=function(i,...n){const s=this._callbacks.get(i);if(s){const o=[...s];for(const a of o)a.apply(this,n)}return this},e.prototype.listeners=function(i){return this._callbacks.get(i)??[]},e.prototype.listenerCount=function(i){if(i)return this.listeners(i).length;let n=0;for(const s of this._callbacks.values())n+=s.length;return n},e.prototype.hasListeners=function(i){return this.listenerCount(i)>0},e.prototype.addEventListener=e.prototype.on,e.prototype.removeListener=e.prototype.off,e.prototype.removeEventListener=e.prototype.off,e.prototype.removeAllListeners=e.prototype.off,r.exports=e}(Nf)),Nf.exports}var L6=j6(),z6=Te(L6);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 - * http://naver.github.io/egjs - * - * Forked By Naver egjs - * Copyright (c) hammerjs - * Licensed under the MIT license */function Er(){return Er=Object.assign||function(r){for(var e=1;e"u"?{style:{}}:document.createElement("div"),W6="function",Xn=Math.round,fn=Math.abs,kw=Date.now;function Uu(r,e){for(var t,i,n=e[0].toUpperCase()+e.slice(1),s=0;s"u"?Jr={}:Jr=window;var Rz=Uu(H6.style,"touchAction"),Cz=Rz!==void 0;function U6(){if(!Cz)return!1;var r={},e=Jr.CSS&&Jr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return r[t]=e?Jr.CSS.supports("touch-action",t):!0}),r}var xz="compute",qz="auto",j_="manipulation",nn="none",Mo="pan-x",No="pan-y",Na=U6(),V6=/mobile|tablet|ip(ad|hone|od)|android/i,Dz="ontouchstart"in Jr,K6=Uu(Jr,"PointerEvent")!==void 0,G6=Dz&&V6.test(navigator.userAgent),na="touch",Y6="pen",Bw="mouse",X6="kinect",J6=25,Ht=1,In=2,ot=4,Gt=8,iu=1,sa=2,oa=4,aa=8,ps=16,Fr=sa|oa,sn=aa|ps,Az=Fr|sn,Mz=["x","y"],nu=["clientX","clientY"];function Qr(r,e,t){var i;if(r)if(r.forEach)r.forEach(e,t);else if(r.length!==void 0)for(i=0;i-1}function Q6(r){if(Qi(r,nn))return nn;var e=Qi(r,Mo),t=Qi(r,No);return e&&t?nn:e||t?e?Mo:No:Qi(r,j_)?j_:qz}var Nz=function(){function r(t,i){this.manager=t,this.set(i)}var e=r.prototype;return e.set=function(i){i===xz&&(i=this.compute()),Cz&&this.manager.element.style&&Na[i]&&(this.manager.element.style[Rz]=i),this.actions=i.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var i=[];return Qr(this.manager.recognizers,function(n){Vu(n.options.enable,[n])&&(i=i.concat(n.getTouchAction()))}),Q6(i.join(" "))},e.preventDefaults=function(i){var n=i.srcEvent,s=i.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,a=Qi(o,nn)&&!Na[nn],u=Qi(o,No)&&!Na[No],l=Qi(o,Mo)&&!Na[Mo];if(a){var c=i.pointers.length===1,d=i.distance<2,h=i.deltaTime<250;if(c&&d&&h)return}if(!(l&&u)&&(a||u&&s&Fr||l&&s&sn))return this.preventSrc(n)},e.preventSrc=function(i){this.manager.session.prevented=!0,i.preventDefault()},r}();function jw(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}function Fz(r){var e=r.length;if(e===1)return{x:Xn(r[0].clientX),y:Xn(r[0].clientY)};for(var t=0,i=0,n=0;n=fn(e)?r<0?sa:oa:e<0?aa:ps}function Z6(r,e){var t=e.center,i=r.offsetDelta||{},n=r.prevDelta||{},s=r.prevInput||{};(e.eventType===Ht||s.eventType===ot)&&(n=r.prevDelta={x:s.deltaX||0,y:s.deltaY||0},i=r.offsetDelta={x:t.x,y:t.y}),e.deltaX=n.x+(t.x-i.x),e.deltaY=n.y+(t.y-i.y)}function Bz(r,e,t){return{x:e/r||0,y:t/r||0}}function e8(r,e){return su(e[0],e[1],nu)/su(r[0],r[1],nu)}function t8(r,e){return L_(e[1],e[0],nu)+L_(r[1],r[0],nu)}function r8(r,e){var t=r.lastInterval||e,i=e.timeStamp-t.timeStamp,n,s,o,a;if(e.eventType!==Gt&&(i>J6||t.velocity===void 0)){var u=e.deltaX-t.deltaX,l=e.deltaY-t.deltaY,c=Bz(i,u,l);s=c.x,o=c.y,n=fn(c.x)>fn(c.y)?c.x:c.y,a=kz(u,l),r.lastInterval=e}else n=t.velocity,s=t.velocityX,o=t.velocityY,a=t.direction;e.velocity=n,e.velocityX=s,e.velocityY=o,e.direction=a}function i8(r,e){var t=r.session,i=e.pointers,n=i.length;t.firstInput||(t.firstInput=XP(e)),n>1&&!t.firstMultiple?t.firstMultiple=XP(e):n===1&&(t.firstMultiple=!1);var s=t.firstInput,o=t.firstMultiple,a=o?o.center:s.center,u=e.center=Fz(i);e.timeStamp=kw(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=L_(a,u),e.distance=su(a,u),Z6(t,e),e.offsetDirection=kz(e.deltaX,e.deltaY);var l=Bz(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=fn(l.x)>fn(l.y)?l.x:l.y,e.scale=o?e8(o.pointers,i):1,e.rotation=o?t8(o.pointers,i):0,e.maxPointers=t.prevInput?e.pointers.length>t.prevInput.maxPointers?e.pointers.length:t.prevInput.maxPointers:e.pointers.length,r8(t,e);var c=r.element,d=e.srcEvent,h;d.composedPath?h=d.composedPath()[0]:d.path?h=d.path[0]:h=d.target,jw(h,c)&&(c=h),e.target=c}function n8(r,e,t){var i=t.pointers.length,n=t.changedPointers.length,s=e&Ht&&i-n===0,o=e&(ot|Gt)&&i-n===0;t.isFirst=!!s,t.isFinal=!!o,s&&(r.session={}),t.eventType=e,i8(r,t),r.emit("hammer.input",t),r.recognize(t),r.session.prevInput=t}function Fo(r){return r.trim().split(/\s+/g)}function bo(r,e,t){Qr(Fo(e),function(i){r.addEventListener(i,t,!1)})}function _o(r,e,t){Qr(Fo(e),function(i){r.removeEventListener(i,t,!1)})}function JP(r){var e=r.ownerDocument||r;return e.defaultView||e.parentWindow||window}var Ds=function(){function r(t,i){var n=this;this.manager=t,this.callback=i,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(s){Vu(t.options.enable,[t])&&n.handler(s)},this.init()}var e=r.prototype;return e.handler=function(){},e.init=function(){this.evEl&&bo(this.element,this.evEl,this.domHandler),this.evTarget&&bo(this.target,this.evTarget,this.domHandler),this.evWin&&bo(JP(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&_o(this.element,this.evEl,this.domHandler),this.evTarget&&_o(this.target,this.evTarget,this.domHandler),this.evWin&&_o(JP(this.element),this.evWin,this.domHandler)},r}();function vn(r,e,t){if(r.indexOf&&!t)return r.indexOf(e);for(var i=0;iu[e]}):i=i.sort()),i}var a8={touchstart:Ht,touchmove:In,touchend:ot,touchcancel:Gt},u8="touchstart touchmove touchend touchcancel",zw=function(r){hr(e,r);function e(){var i;return e.prototype.evTarget=u8,i=r.apply(this,arguments)||this,i.targetIds={},i}var t=e.prototype;return t.handler=function(n){var s=a8[n.type],o=l8.call(this,n,s);o&&this.callback(this.manager,s,{pointers:o[0],changedPointers:o[1],pointerType:na,srcEvent:n})},e}(Ds);function l8(r,e){var t=ko(r.touches),i=this.targetIds;if(e&(Ht|In)&&t.length===1)return i[t[0].identifier]=!0,[t,t];var n,s,o=ko(r.changedTouches),a=[],u=this.target;if(s=t.filter(function(l){return jw(l.target,u)}),e===Ht)for(n=0;n-1&&n.splice(a,1)};setTimeout(s,f8)}}function v8(r,e){r&Ht?(this.primaryTouch=e.changedPointers[0].identifier,ZP.call(this,e)):r&(ot|Gt)&&ZP.call(this,e)}function p8(r){for(var e=r.srcEvent.clientX,t=r.srcEvent.clientY,i=0;i-1&&this.requireFail.splice(n,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(i){return!!this.simultaneous[i.id]},e.emit=function(i){var n=this,s=this.state;function o(a){n.manager.emit(a,i)}s=Ti&&o(n.options.event+eR(s))},e.tryEmit=function(i){if(this.canEmit())return this.emit(i);this.state=Dr},e.canEmit=function(){for(var i=0;is.threshold&&u&s.direction},t.attrTest=function(n){return ms.prototype.attrTest.call(this,n)&&(this.state&lr||!(this.state&lr)&&this.directionTest(n))},t.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var s=Wz(n.direction);s&&(n.additionalEvent=this.options.event+s),r.prototype.emit.call(this,n)},e}(ms),Uz=function(r){hr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Er({event:"swipe",threshold:10,velocity:.3,direction:Fr|sn,pointers:1},i))||this}var t=e.prototype;return t.getTouchAction=function(){return Ww.prototype.getTouchAction.call(this)},t.attrTest=function(n){var s=this.options.direction,o;return s&(Fr|sn)?o=n.overallVelocity:s&Fr?o=n.overallVelocityX:s&sn&&(o=n.overallVelocityY),r.prototype.attrTest.call(this,n)&&s&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&fn(o)>this.options.velocity&&n.eventType&ot},t.emit=function(n){var s=Wz(n.offsetDirection);s&&this.manager.emit(this.options.event+s,n),this.manager.emit(this.options.event,n)},e}(ms),Vz=function(r){hr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Er({event:"pinch",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[nn]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&lr)},t.emit=function(n){if(n.scale!==1){var s=n.scale<1?"in":"out";n.additionalEvent=this.options.event+s}r.prototype.emit.call(this,n)},e}(ms),Kz=function(r){hr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Er({event:"rotate",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[nn]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&lr)},e}(ms),Gz=function(r){hr(e,r);function e(i){var n;return i===void 0&&(i={}),n=r.call(this,Er({event:"press",pointers:1,time:251,threshold:9},i))||this,n._timer=null,n._input=null,n}var t=e.prototype;return t.getTouchAction=function(){return[qz]},t.process=function(n){var s=this,o=this.options,a=n.pointers.length===o.pointers,u=n.distanceo.time;if(this._input=n,!u||!a||n.eventType&(ot|Gt)&&!l)this.reset();else if(n.eventType&Ht)this.reset(),this._timer=setTimeout(function(){s.state=Zr,s.tryEmit()},o.time);else if(n.eventType&ot)return Zr;return Dr},t.reset=function(){clearTimeout(this._timer)},t.emit=function(n){this.state===Zr&&(n&&n.eventType&ot?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=kw(),this.manager.emit(this.options.event,this._input)))},e}(ua),Yz={domEvents:!1,touchAction:xz,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},tR=[[Kz,{enable:!1}],[Vz,{enable:!1},["rotate"]],[Uz,{direction:Fr}],[Ww,{direction:Fr},["swipe"]],[z_],[z_,{event:"doubletap",taps:2},["tap"]],[Gz]],b8=1,rR=2;function iR(r,e){var t=r.element;if(t.style){var i;Qr(r.options.cssProps,function(n,s){i=Uu(t.style,s),e?(r.oldCssProps[i]=t.style[i],t.style[i]=n):t.style[i]=r.oldCssProps[i]||""}),e||(r.oldCssProps={})}}function _8(r,e){var t=document.createEvent("Event");t.initEvent(r,!0,!0),t.gesture=e,e.target.dispatchEvent(t)}var nR=function(){function r(t,i){var n=this;this.options=hn({},Yz,i||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=g8(this),this.touchAction=new Nz(this,this.options.touchAction),iR(this,!0),Qr(this.options.recognizers,function(s){var o=n.add(new s[0](s[1]));s[2]&&o.recognizeWith(s[2]),s[3]&&o.requireFailure(s[3])},this)}var e=r.prototype;return e.set=function(i){return hn(this.options,i),i.touchAction&&this.touchAction.update(),i.inputTarget&&(this.input.destroy(),this.input.target=i.inputTarget,this.input.init()),this},e.stop=function(i){this.session.stopped=i?rR:b8},e.recognize=function(i){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(i);var s,o=this.recognizers,a=n.curRecognizer;(!a||a&&a.state&Zr)&&(n.curRecognizer=null,a=null);for(var u=0;u\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,i,s),r.apply(this,arguments)}}var Jz=Xz(function(r,e,t){for(var i=Object.keys(e),n=0;n1?e-1:0),i=1;i2)return ou(Zz(e[0],e[1]),..._G(e).call(e,2));const i=e[0],n=e[1];if(i instanceof Date&&n instanceof Date)return i.setTime(n.getTime()),i;for(const s of TG(n))Object.prototype.propertyIsEnumerable.call(n,s)&&(n[s]===Qz?delete i[s]:i[s]!==null&&n[s]!==null&&typeof i[s]=="object"&&typeof n[s]=="object"&&!Cr(i[s])&&!Cr(n[s])?i[s]=ou(i[s],n[s]):i[s]=e3(n[s]));return i}function e3(r){return Cr(r)?mr(r).call(r,e=>e3(e)):typeof r=="object"&&r!==null?r instanceof Date?new Date(r.getTime()):ou({},r):r}function t3(r){for(const e of Fw(r))r[e]===Qz?delete r[e]:typeof r[e]=="object"&&r[e]!==null&&t3(r[e])}function C8(){const r=()=>{};return{on:r,off:r,destroy:r,emit:r,get(){return{set:r}}}}const x8=typeof window<"u"?window.Hammer||P8:function(){return C8()};function Gr(r){var e;this._cleanupQueue=[],this.active=!1,this._dom={container:r,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});const t=x8(this._dom.overlay);t.on("tap",Sz(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{t.destroy()});const i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];dn(i).call(i,n=>{t.on(n,s=>{s.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=n=>{q8(n.target,r)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=n=>{("key"in n?n.key==="Escape":n.keyCode===27)&&this.deactivate()}}z6(Gr.prototype);Gr.current=null;Gr.prototype.destroy=function(){this.deactivate();for(const t of XG(r=$z(e=this._cleanupQueue).call(e,0)).call(r)){var r,e;t()}};Gr.prototype.activate=function(){Gr.current&&Gr.current.deactivate(),Gr.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)};Gr.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")};Gr.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function q8(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}var Ff,oR;function D8(){if(oR)return Ff;oR=1,hz();var r=gt();return Ff=r.Object.getOwnPropertySymbols,Ff}var kf,aR;function A8(){if(aR)return kf;aR=1;var r=D8();return kf=r,kf}var Bf,uR;function M8(){return uR||(uR=1,Bf=A8()),Bf}var N8=M8(),lR=Te(N8),jf={exports:{}},cR={},dR;function F8(){if(dR)return cR;dR=1;var r=ye(),e=ke(),t=jr(),i=Mu().f,n=dt(),s=!n||e(function(){i(1)});return r({target:"Object",stat:!0,forced:s,sham:!n},{getOwnPropertyDescriptor:function(a,u){return i(t(a),u)}}),cR}var hR;function k8(){if(hR)return jf.exports;hR=1,F8();var r=gt(),e=r.Object,t=jf.exports=function(n,s){return e.getOwnPropertyDescriptor(n,s)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),jf.exports}var Lf,fR;function B8(){if(fR)return Lf;fR=1;var r=k8();return Lf=r,Lf}var zf,vR;function j8(){return vR||(vR=1,zf=B8()),zf}var L8=j8(),r3=Te(L8),pR={},gR;function z8(){if(gR)return pR;gR=1;var r=ye(),e=dt(),t=Iz(),i=jr(),n=Mu(),s=Fu();return r({target:"Object",stat:!0,sham:!e},{getOwnPropertyDescriptors:function(a){for(var u=i(a),l=n.f,c=t(u),d={},h=0,f,v;c.length>h;)v=l(u,f=c[h++]),v!==void 0&&s(d,f,v);return d}}),pR}var Hf,mR;function H8(){if(mR)return Hf;mR=1,z8();var r=gt();return Hf=r.Object.getOwnPropertyDescriptors,Hf}var Wf,yR;function W8(){if(yR)return Wf;yR=1;var r=H8();return Wf=r,Wf}var Uf,bR;function U8(){return bR||(bR=1,Uf=W8()),Uf}var V8=U8(),_R=Te(V8),Vf={exports:{}},wR={},ER;function K8(){if(ER)return wR;ER=1;var r=ye(),e=dt(),t=Dw().f;return r({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),wR}var SR;function G8(){if(SR)return Vf.exports;SR=1,K8();var r=gt(),e=r.Object,t=Vf.exports=function(n,s){return e.defineProperties(n,s)};return e.defineProperties.sham&&(t.sham=!0),Vf.exports}var Kf,OR;function Y8(){if(OR)return Kf;OR=1;var r=G8();return Kf=r,Kf}var Gf,IR;function X8(){return IR||(IR=1,Gf=Y8()),Gf}var J8=X8(),Q8=Te(J8),Yf,TR;function Z8(){return TR||(TR=1,Yf=rz()),Yf}var e9=Z8(),t9=Te(e9),$R={},PR={},Xf={exports:{}},Jf,RR;function r9(){if(RR)return Jf;RR=1;var r=ke();return Jf=r(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),Jf}var Qf,CR;function i9(){if(CR)return Qf;CR=1;var r=ke(),e=Ut(),t=ui(),i=r9(),n=Object.isExtensible,s=r(function(){});return Qf=s||i?function(a){return!e(a)||i&&t(a)==="ArrayBuffer"?!1:n?n(a):!0}:n,Qf}var Zf,xR;function n9(){if(xR)return Zf;xR=1;var r=ke();return Zf=!r(function(){return Object.isExtensible(Object.preventExtensions({}))}),Zf}var qR;function i3(){if(qR)return Xf.exports;qR=1;var r=ye(),e=ze(),t=ea(),i=Ut(),n=wt(),s=dr().f,o=ju(),a=uz(),u=i9(),l=Au(),c=n9(),d=!1,h=l("meta"),f=0,v=function(m){s(m,h,{value:{objectID:"O"+f++,weakData:{}}})},p=function(m,E){if(!i(m))return typeof m=="symbol"?m:(typeof m=="string"?"S":"P")+m;if(!n(m,h)){if(!u(m))return"F";if(!E)return"E";v(m)}return m[h].objectID},_=function(m,E){if(!n(m,h)){if(!u(m))return!0;if(!E)return!1;v(m)}return m[h].weakData},y=function(m){return c&&d&&u(m)&&!n(m,h)&&v(m),m},g=function(){b.enable=function(){},d=!0;var m=o.f,E=e([].splice),O={};O[h]=1,m(O).length&&(o.f=function(I){for(var w=m(I),S=0,T=w.length;Sw;w++)if(T=D(f[w]),T&&o(h,T))return T;return new d(!1)}O=a(f,I)}for(R=g?f.next:O.next;!(x=e(R,O)).done;){try{T=D(x.value)}catch(j){l(O,"throw",j)}if(typeof T=="object"&&T&&o(h,T))return T}return new d(!1)},nv}var sv,kR;function o3(){if(kR)return sv;kR=1;var r=_t(),e=TypeError;return sv=function(t,i){if(r(i,t))return t;throw new e("Incorrect invocation")},sv}var ov,BR;function a3(){if(BR)return ov;BR=1;var r=ye(),e=ct(),t=i3(),i=ke(),n=Ps(),s=Vw(),o=o3(),a=bt(),u=Ut(),l=Xo(),c=On(),d=dr().f,h=xs().forEach,f=dt(),v=ia(),p=v.set,_=v.getterFor;return ov=function(y,g,b){var m=y.indexOf("Map")!==-1,E=y.indexOf("Weak")!==-1,O=m?"set":"add",I=e[y],w=I&&I.prototype,S={},T;if(!f||!a(I)||!(E||w.forEach&&!i(function(){new I().entries().next()})))T=b.getConstructor(g,y,m,O),t.enable();else{T=g(function(C,D){p(o(C,R),{type:y,collection:new I}),l(D)||s(D,C[O],{that:C,AS_ENTRIES:m})});var R=T.prototype,x=_(y);h(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(C){var D=C==="add"||C==="set";C in w&&!(E&&C==="clear")&&n(R,C,function(j,ee){var H=x(this).collection;if(!D&&E&&!u(j))return C==="get"?void 0:!1;var Z=H[C](j===0?0:j,ee);return D?this:Z})}),E||d(R,"size",{configurable:!0,get:function(){return x(this).collection.size}})}return c(T,y,!1,!0),S[y]=T,r({global:!0,forced:!0},S),E||b.setStrong(T,y,m),T},ov}var av,jR;function o9(){if(jR)return av;jR=1;var r=ra();return av=function(e,t,i){for(var n in t)i&&i.unsafe&&e[n]?e[n]=t[n]:r(e,n,t[n],i);return e},av}var uv,LR;function a9(){if(LR)return uv;LR=1;var r=ir(),e=Aw(),t=Et(),i=dt(),n=t("species");return uv=function(s){var o=r(s);i&&o&&!o[n]&&e(o,n,{configurable:!0,get:function(){return this}})},uv}var lv,zR;function u3(){if(zR)return lv;zR=1;var r=ta(),e=Aw(),t=o9(),i=Nu(),n=o3(),s=Xo(),o=Vw(),a=Mw(),u=Nw(),l=a9(),c=dt(),d=i3().fastKey,h=ia(),f=h.set,v=h.getterFor;return lv={getConstructor:function(p,_,y,g){var b=p(function(w,S){n(w,m),f(w,{type:_,index:r(null),first:null,last:null,size:0}),c||(w.size=0),s(S)||o(S,w[g],{that:w,AS_ENTRIES:y})}),m=b.prototype,E=v(_),O=function(w,S,T){var R=E(w),x=I(w,S),C,D;return x?x.value=T:(R.last=x={index:D=d(S,!0),key:S,value:T,previous:C=R.last,next:null,removed:!1},R.first||(R.first=x),C&&(C.next=x),c?R.size++:w.size++,D!=="F"&&(R.index[D]=x)),w},I=function(w,S){var T=E(w),R=d(S),x;if(R!=="F")return T.index[R];for(x=T.first;x;x=x.next)if(x.key===S)return x};return t(m,{clear:function(){for(var S=this,T=E(S),R=T.first;R;)R.removed=!0,R.previous&&(R.previous=R.previous.next=null),R=R.next;T.first=T.last=null,T.index=r(null),c?T.size=0:S.size=0},delete:function(w){var S=this,T=E(S),R=I(S,w);if(R){var x=R.next,C=R.previous;delete T.index[R.index],R.removed=!0,C&&(C.next=x),x&&(x.previous=C),T.first===R&&(T.first=x),T.last===R&&(T.last=C),c?T.size--:S.size--}return!!R},forEach:function(S){for(var T=E(this),R=i(S,arguments.length>1?arguments[1]:void 0),x;x=x?x.next:T.first;)for(R(x.value,x.key,this);x&&x.removed;)x=x.previous},has:function(S){return!!I(this,S)}}),t(m,y?{get:function(S){var T=I(this,S);return T&&T.value},set:function(S,T){return O(this,S===0?0:S,T)}}:{add:function(S){return O(this,S=S===0?0:S,S)}}),c&&e(m,"size",{configurable:!0,get:function(){return E(this).size}}),b},setStrong:function(p,_,y){var g=_+" Iterator",b=v(_),m=v(g);a(p,_,function(E,O){f(this,{type:g,target:E,state:b(E),kind:O,last:null})},function(){for(var E=m(this),O=E.kind,I=E.last;I&&I.removed;)I=I.previous;return!E.target||!(E.last=I=I?I.next:E.state.first)?(E.target=null,u(void 0,!0)):u(O==="keys"?I.key:O==="values"?I.value:[I.key,I.value],!1)},y?"entries":"values",!y,!0),l(_)}},lv}var HR;function u9(){if(HR)return PR;HR=1;var r=a3(),e=u3();return r("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),PR}var WR;function l9(){return WR||(WR=1,u9()),$R}var UR={},cv,VR;function l3(){return VR||(VR=1,cv=function(r,e){return e===1?function(t,i){return t[r](i)}:function(t,i,n){return t[r](i,n)}}),cv}var dv,KR;function c9(){if(KR)return dv;KR=1;var r=ir(),e=l3(),t=r("Map");return dv={Map:t,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:t.prototype},dv}var GR;function d9(){if(GR)return UR;GR=1;var r=ye(),e=ze(),t=li(),i=En(),n=Vw(),s=c9(),o=Ts(),a=ke(),u=s.Map,l=s.has,c=s.get,d=s.set,h=e([].push),f=o||a(function(){return u.groupBy("ab",function(v){return v}).get("a").length!==1});return r({target:"Map",stat:!0,forced:o||f},{groupBy:function(p,_){i(p),t(_);var y=new u,g=0;return n(p,function(b){var m=_(b,g++);l(y,m)?h(c(y,m),b):d(y,m,[b])}),y}}),UR}var hv,YR;function h9(){if(YR)return hv;YR=1,zi(),l9(),d9(),Hu();var r=gt();return hv=r.Map,hv}var fv,XR;function f9(){if(XR)return fv;XR=1;var r=h9();return Hi(),fv=r,fv}var vv,JR;function v9(){return JR||(JR=1,vv=f9()),vv}var p9=v9(),c3=Te(p9),QR={},ZR;function g9(){if(ZR)return QR;ZR=1;var r=ye(),e=xs().some,t=Wu(),i=t("some");return r({target:"Array",proto:!0,forced:!i},{some:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),QR}var pv,eC;function m9(){if(eC)return pv;eC=1,g9();var r=Jt();return pv=r("Array","some"),pv}var gv,tC;function y9(){if(tC)return gv;tC=1;var r=_t(),e=m9(),t=Array.prototype;return gv=function(i){var n=i.some;return i===t||r(t,i)&&n===t.some?e:n},gv}var mv,rC;function b9(){if(rC)return mv;rC=1;var r=y9();return mv=r,mv}var yv,iC;function _9(){return iC||(iC=1,yv=b9()),yv}var w9=_9(),E9=Te(w9),bv,nC;function S9(){if(nC)return bv;nC=1,zi();var r=Jt();return bv=r("Array","keys"),bv}var _v,sC;function O9(){if(sC)return _v;sC=1;var r=S9();return _v=r,_v}var wv,oC;function I9(){if(oC)return wv;oC=1,Hi();var r=ji(),e=wt(),t=_t(),i=O9(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return wv=function(o){var a=o.keys;return o===n||t(n,o)&&a===n.keys||e(s,r(o))?i:a},wv}var Ev,aC;function T9(){return aC||(aC=1,Ev=I9()),Ev}var $9=T9(),Hn=Te($9),uC={},Sv,lC;function P9(){if(lC)return Sv;lC=1;var r=Cs(),e=Math.floor,t=function(i,n){var s=i.length;if(s<8)for(var o=1,a,u;o0;)i[u]=i[--u];u!==o++&&(i[u]=a)}else for(var l=e(s/2),c=t(r(i,0,l),n),d=t(r(i,l),n),h=c.length,f=d.length,v=0,p=0;v3)){if(d)return!0;if(f)return f<603;var I="",w,S,T,R;for(w=65;w<76;w++){switch(S=String.fromCharCode(w),w){case 66:case 69:case 70:case 72:T=3;break;case 68:case 71:T=4;break;default:T=2}for(R=0;R<47;R++)v.push({k:S+R,v:T})}for(v.sort(function(x,C){return C.v-x.v}),R=0;Ro(S)?1:-1}};return r({target:"Array",proto:!0,forced:E},{sort:function(w){w!==void 0&&t(w);var S=i(this);if(m)return w===void 0?p(S):p(S,w);var T=[],R=n(S),x,C;for(C=0;C"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");jv=crypto.getRandomValues.bind(crypto)}return jv(Q9)}const eY=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var PC={randomUUID:eY};function tY(r,e,t){var n;r=r||{};const i=r.random??((n=r.rng)==null?void 0:n.call(r))??Z9();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,J9(i)}function rY(r,e,t){return PC.randomUUID?PC.randomUUID():tY(r)}function RC(r){return typeof r=="string"||typeof r=="number"}class Kw{constructor(e){Ii(this,"_queue",[]),Ii(this,"_timeout",null),Ii(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(e)}setOptions(e){e&&typeof e.delay<"u"&&(this.delay=e.delay),e&&typeof e.max<"u"&&(this.max=e.max),this._flushIfNeeded()}static extend(e,t){const i=new Kw(t);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=()=>{i.flush()};const n=[{name:"flush",original:void 0}];if(t&&t.replace)for(let s=0;sthis.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=B6(()=>{this.flush()},this.delay))}flush(){var e,t;dn(e=$z(t=this._queue).call(t,0)).call(e,i=>{i.fn.apply(i.context||i.fn,i.args||[])})}}class au{constructor(){Ii(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),Ii(this,"subscribe",au.prototype.on),Ii(this,"unsubscribe",au.prototype.off)}_trigger(e,t,i){var n;if(e==="*")throw new Error("Cannot trigger event *");dn(n=[...this._subscribers[e],...this._subscribers["*"]]).call(n,s=>{s(e,t,i??null)})}on(e,t){typeof t=="function"&&this._subscribers[e].push(t)}off(e,t){var i;this._subscribers[e]=Yn(i=this._subscribers[e]).call(i,n=>n!==t)}}var CC={},xC={},qC;function iY(){if(qC)return xC;qC=1;var r=a3(),e=u3();return r("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),xC}var DC;function nY(){return DC||(DC=1,iY()),CC}var AC={},Lv,MC;function Tn(){if(MC)return Lv;MC=1;var r=Is(),e=TypeError;return Lv=function(t){if(typeof t=="object"&&"size"in t&&"has"in t&&"add"in t&&"delete"in t&&"keys"in t)return t;throw new e(r(t)+" is not a set")},Lv}var zv,NC;function $n(){if(NC)return zv;NC=1;var r=ir(),e=l3(),t=r("Set"),i=t.prototype;return zv={Set:t,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:i},zv}var Hv,FC;function Pn(){if(FC)return Hv;FC=1;var r=Xt();return Hv=function(e,t,i){for(var n=i?e:e.iterator,s=e.next,o,a;!(o=r(s,n)).done;)if(a=t(o.value),a!==void 0)return a},Hv}var Wv,kC;function la(){if(kC)return Wv;kC=1;var r=Pn();return Wv=function(e,t,i){return i?r(e.keys(),t,!0):e.forEach(t)},Wv}var Uv,BC;function Gw(){if(BC)return Uv;BC=1;var r=$n(),e=la(),t=r.Set,i=r.add;return Uv=function(n){var s=new t;return e(n,function(o){i(s,o)}),s},Uv}var Vv,jC;function ca(){return jC||(jC=1,Vv=function(r){return r.size}),Vv}var Kv,LC;function sY(){return LC||(LC=1,Kv=function(r){return{iterator:r,next:r.next,done:!1}}),Kv}var Gv,zC;function Rn(){if(zC)return Gv;zC=1;var r=li(),e=ci(),t=Xt(),i=Rs(),n=sY(),s="Invalid size",o=RangeError,a=TypeError,u=Math.max,l=function(c,d){this.set=c,this.size=u(d,0),this.has=r(c.has),this.keys=r(c.keys)};return l.prototype={getIterator:function(){return n(e(t(this.keys,this.set)))},includes:function(c){return t(this.has,this.set,c)}},Gv=function(c){e(c);var d=+c.size;if(d!==d)throw new a(s);var h=i(d);if(h<0)throw new o(s);return new l(c,h)},Gv}var Yv,HC;function oY(){if(HC)return Yv;HC=1;var r=Tn(),e=$n(),t=Gw(),i=ca(),n=Rn(),s=la(),o=Pn(),a=e.has,u=e.remove;return Yv=function(c){var d=r(this),h=n(c),f=t(d);return i(d)<=h.size?s(d,function(v){h.includes(v)&&u(f,v)}):o(h.getIterator(),function(v){a(f,v)&&u(f,v)}),f},Yv}var Xv,WC;function Cn(){return WC||(WC=1,Xv=function(){return!1}),Xv}var UC;function aY(){if(UC)return AC;UC=1;var r=ye(),e=oY(),t=ke(),i=Cn(),n=!i("difference",function(o){return o.size===0}),s=n||t(function(){var o={size:1,has:function(){return!0},keys:function(){var u=0;return{next:function(){var l=u++>1;return a.has(1)&&a.clear(),{done:l,value:2}}}}},a=new Set([1,2,3,4]);return a.difference(o).size!==3});return r({target:"Set",proto:!0,real:!0,forced:s},{difference:e}),AC}var VC={},Jv,KC;function uY(){if(KC)return Jv;KC=1;var r=Tn(),e=$n(),t=ca(),i=Rn(),n=la(),s=Pn(),o=e.Set,a=e.add,u=e.has;return Jv=function(c){var d=r(this),h=i(c),f=new o;return t(d)>h.size?s(h.getIterator(),function(v){u(d,v)&&a(f,v)}):n(d,function(v){h.includes(v)&&a(f,v)}),f},Jv}var GC;function lY(){if(GC)return VC;GC=1;var r=ye(),e=ke(),t=uY(),i=Cn(),n=!i("intersection",function(s){return s.size===2&&s.has(1)&&s.has(2)})||e(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});return r({target:"Set",proto:!0,real:!0,forced:n},{intersection:t}),VC}var YC={},Qv,XC;function cY(){if(XC)return Qv;XC=1;var r=Tn(),e=$n().has,t=ca(),i=Rn(),n=la(),s=Pn(),o=Uw();return Qv=function(u){var l=r(this),c=i(u);if(t(l)<=c.size)return n(l,function(h){if(c.includes(h))return!1},!0)!==!1;var d=c.getIterator();return s(d,function(h){if(e(l,h))return o(d,"normal",!1)})!==!1},Qv}var JC;function dY(){if(JC)return YC;JC=1;var r=ye(),e=cY(),t=Cn(),i=!t("isDisjointFrom",function(n){return!n});return r({target:"Set",proto:!0,real:!0,forced:i},{isDisjointFrom:e}),YC}var QC={},Zv,ZC;function hY(){if(ZC)return Zv;ZC=1;var r=Tn(),e=ca(),t=la(),i=Rn();return Zv=function(s){var o=r(this),a=i(s);return e(o)>a.size?!1:t(o,function(u){if(!a.includes(u))return!1},!0)!==!1},Zv}var ex;function fY(){if(ex)return QC;ex=1;var r=ye(),e=hY(),t=Cn(),i=!t("isSubsetOf",function(n){return n});return r({target:"Set",proto:!0,real:!0,forced:i},{isSubsetOf:e}),QC}var tx={},ep,rx;function vY(){if(rx)return ep;rx=1;var r=Tn(),e=$n().has,t=ca(),i=Rn(),n=Pn(),s=Uw();return ep=function(a){var u=r(this),l=i(a);if(t(u)t[0])}toItemArray(){var e;return mr(e=[...this._pairs]).call(e,t=>t[1])}toEntryArray(){return[...this._pairs]}toObjectMap(){const e=E6(null);for(const[t,i]of this._pairs)e[t]=i;return e}toMap(){return new c3(this._pairs)}toIdSet(){return new ap(this.toIdArray())}toItemSet(){return new ap(this.toItemArray())}cache(){return new Zi([...this._pairs])}distinct(e){const t=new ap;for(const[i,n]of this._pairs)t.add(e(n,i));return t}filter(e){const t=this._pairs;return new Zi({*[Qn](){for(const[i,n]of t)e(n,i)&&(yield[i,n])}})}forEach(e){for(const[t,i]of this._pairs)e(i,t)}map(e){const t=this._pairs;return new Zi({*[Qn](){for(const[i,n]of t)yield[i,e(n,i)]}})}max(e){const t=vp(this._pairs);let i=t.next();if(i.done)return null;let n=i.value[1],s=e(i.value[1],i.value[0]);for(;!(i=t.next()).done;){const[o,a]=i.value,u=e(a,o);u>s&&(s=u,n=a)}return n}min(e){const t=vp(this._pairs);let i=t.next();if(i.done)return null;let n=i.value[1],s=e(i.value[1],i.value[0]);for(;!(i=t.next()).done;){const[o,a]=i.value,u=e(a,o);u{var t;return vp(H_(t=[...this._pairs]).call(t,(i,n)=>{let[s,o]=i,[a,u]=n;return e(o,u,s,a)}))}})}}function _x(r,e){var t=Fw(r);if(lR){var i=lR(r);e&&(i=Yn(i).call(i,function(n){return r3(r,n).enumerable})),t.push.apply(t,i)}return t}function wx(r){for(var e=1;eo[this._idProp]);if(E9(s).call(s,o=>this._data.has(o)))throw new Error("A duplicate id was found in the parameter array.");for(let o=0,a=e.length;o{const c=l[a];if(c!=null&&this._data.has(c)){const d=l,h=c6({},this._data.get(c)),f=this._updateItem(d);n.push(f),o.push(d),s.push(h)}else{const d=this._addItem(l);i.push(d)}};if(Cr(e))for(let l=0,c=e.length;l{const o=this._data.get(s[this._idProp]);if(o==null)throw new Error("Updating non-existent items is not allowed.");return{oldData:o,update:s}})).call(i,s=>{let{oldData:o,update:a}=s;const u=o[this._idProp],l=R8(o,a);return this._data.set(u,l),{id:u,oldData:o,updatedData:l}});if(n.length){const s={items:mr(n).call(n,o=>o.id),oldData:mr(n).call(n,o=>o.oldData),data:mr(n).call(n,o=>o.updatedData)};return this._trigger("update",s,t),s.items}else return[]}get(e,t){let i,n,s;RC(e)?(i=e,s=t):Cr(e)?(n=e,s=t):s=e;const o=s&&s.returnType==="Object"?"Object":"Array",a=s&&Yn(s),u=[];let l,c,d;if(i!=null)l=this._data.get(i),l&&a&&!a(l)&&(l=void 0);else if(n!=null)for(let f=0,v=n.length;f(n[s]=e[s],n),{})}_sort(e,t){if(typeof t=="string"){const i=t;H_(e).call(e,(n,s)=>{const o=n[i],a=s[i];return o>a?1:oi)&&(t=s,i=o)}return t||null}min(e){let t=null,i=null;for(const s of EC(n=this._data).call(n)){var n;const o=s[e];typeof o=="number"&&(i==null||o"u"&&r!==void 0?function(e){return typeof e=="function"||e===r}:function(e){return typeof e=="function"},wp}var Ep={},Sp,qx;function it(){if(qx)return Sp;qx=1;var r=$e();return Sp=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Sp}var Op,Dx;function Qt(){if(Dx)return Op;Dx=1;var r=da(),e=Function.prototype.call;return Op=r?e.bind(e):function(){return e.apply(e,arguments)},Op}var Ip={},Ax;function Gu(){if(Ax)return Ip;Ax=1;var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!r.call({1:2},1);return Ip.f=t?function(n){var s=e(this,n);return!!s&&s.enumerable}:r,Ip}var Tp,Mx;function ha(){return Mx||(Mx=1,Tp=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}),Tp}var $p,Nx;function Yu(){if(Nx)return $p;Nx=1;var r=Ce(),e=$e(),t=Lr(),i=Object,n=r("".split);return $p=e(function(){return!i("z").propertyIsEnumerable(0)})?function(s){return t(s)==="String"?n(s,""):i(s)}:i,$p}var Pp,Fx;function As(){return Fx||(Fx=1,Pp=function(r){return r==null}),Pp}var Rp,kx;function di(){if(kx)return Rp;kx=1;var r=As(),e=TypeError;return Rp=function(t){if(r(t))throw new e("Can't call method on "+t);return t},Rp}var Cp,Bx;function Tr(){if(Bx)return Cp;Bx=1;var r=Yu(),e=di();return Cp=function(t){return r(e(t))},Cp}var xp,jx;function Ot(){if(jx)return xp;jx=1;var r=St();return xp=function(e){return typeof e=="object"?e!==null:r(e)},xp}var qp,Lx;function Be(){return Lx||(Lx=1,qp={}),qp}var Dp,zx;function nr(){if(zx)return Dp;zx=1;var r=Be(),e=Xe(),t=St(),i=function(n){return t(n)?n:void 0};return Dp=function(n,s){return arguments.length<2?i(r[n])||i(e[n]):r[n]&&r[n][s]||e[n]&&e[n][s]},Dp}var Ap,Hx;function ht(){if(Hx)return Ap;Hx=1;var r=Ce();return Ap=r({}.isPrototypeOf),Ap}var Mp,Wx;function Ms(){if(Wx)return Mp;Wx=1;var r=Xe(),e=r.navigator,t=e&&e.userAgent;return Mp=t?String(t):"",Mp}var Np,Ux;function fa(){if(Ux)return Np;Ux=1;var r=Xe(),e=Ms(),t=r.process,i=r.Deno,n=t&&t.versions||i&&i.version,s=n&&n.v8,o,a;return s&&(o=s.split("."),a=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!a&&e&&(o=e.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=e.match(/Chrome\/(\d+)/),o&&(a=+o[1]))),Np=a,Np}var Fp,Vx;function Ns(){if(Vx)return Fp;Vx=1;var r=fa(),e=$e(),t=Xe(),i=t.String;return Fp=!!Object.getOwnPropertySymbols&&!e(function(){var n=Symbol("symbol detection");return!i(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&r&&r<41}),Fp}var kp,Kx;function f3(){if(Kx)return kp;Kx=1;var r=Ns();return kp=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol",kp}var Bp,Gx;function va(){if(Gx)return Bp;Gx=1;var r=nr(),e=St(),t=ht(),i=f3(),n=Object;return Bp=i?function(s){return typeof s=="symbol"}:function(s){var o=r("Symbol");return e(o)&&t(o.prototype,n(s))},Bp}var jp,Yx;function Fs(){if(Yx)return jp;Yx=1;var r=String;return jp=function(e){try{return r(e)}catch{return"Object"}},jp}var Lp,Xx;function hi(){if(Xx)return Lp;Xx=1;var r=St(),e=Fs(),t=TypeError;return Lp=function(i){if(r(i))return i;throw new t(e(i)+" is not a function")},Lp}var zp,Jx;function Xw(){if(Jx)return zp;Jx=1;var r=hi(),e=As();return zp=function(t,i){var n=t[i];return e(n)?void 0:r(n)},zp}var Hp,Qx;function DY(){if(Qx)return Hp;Qx=1;var r=Qt(),e=St(),t=Ot(),i=TypeError;return Hp=function(n,s){var o,a;if(s==="string"&&e(o=n.toString)&&!t(a=r(o,n))||e(o=n.valueOf)&&!t(a=r(o,n))||s!=="string"&&e(o=n.toString)&&!t(a=r(o,n)))return a;throw new i("Can't convert object to primitive value")},Hp}var Wp={exports:{}},Up,Zx;function ks(){return Zx||(Zx=1,Up=!0),Up}var Vp,eq;function AY(){if(eq)return Vp;eq=1;var r=Xe(),e=Object.defineProperty;return Vp=function(t,i){try{e(r,t,{value:i,configurable:!0,writable:!0})}catch{r[t]=i}return i},Vp}var tq;function Jw(){if(tq)return Wp.exports;tq=1;var r=ks(),e=Xe(),t=AY(),i="__core-js_shared__",n=Wp.exports=e[i]||t(i,{});return(n.versions||(n.versions=[])).push({version:"3.44.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Wp.exports}var Kp,rq;function Bs(){if(rq)return Kp;rq=1;var r=Jw();return Kp=function(e,t){return r[e]||(r[e]=t||{})},Kp}var Gp,iq;function sr(){if(iq)return Gp;iq=1;var r=di(),e=Object;return Gp=function(t){return e(r(t))},Gp}var Yp,nq;function Pt(){if(nq)return Yp;nq=1;var r=Ce(),e=sr(),t=r({}.hasOwnProperty);return Yp=Object.hasOwn||function(n,s){return t(e(n),s)},Yp}var Xp,sq;function Xu(){if(sq)return Xp;sq=1;var r=Ce(),e=0,t=Math.random(),i=r(1.1.toString);return Xp=function(n){return"Symbol("+(n===void 0?"":n)+")_"+i(++e+t,36)},Xp}var Jp,oq;function ft(){if(oq)return Jp;oq=1;var r=Xe(),e=Bs(),t=Pt(),i=Xu(),n=Ns(),s=f3(),o=r.Symbol,a=e("wks"),u=s?o.for||o:o&&o.withoutSetter||i;return Jp=function(l){return t(a,l)||(a[l]=n&&t(o,l)?o[l]:u("Symbol."+l)),a[l]},Jp}var Qp,aq;function v3(){if(aq)return Qp;aq=1;var r=Qt(),e=Ot(),t=va(),i=Xw(),n=DY(),s=ft(),o=TypeError,a=s("toPrimitive");return Qp=function(u,l){if(!e(u)||t(u))return u;var c=i(u,a),d;if(c){if(l===void 0&&(l="default"),d=r(c,u,l),!e(d)||t(d))return d;throw new o("Can't convert object to primitive value")}return l===void 0&&(l="number"),n(u,l)},Qp}var Zp,uq;function Qw(){if(uq)return Zp;uq=1;var r=v3(),e=va();return Zp=function(t){var i=r(t,"string");return e(i)?i:i+""},Zp}var eg,lq;function p3(){if(lq)return eg;lq=1;var r=Xe(),e=Ot(),t=r.document,i=e(t)&&e(t.createElement);return eg=function(n){return i?t.createElement(n):{}},eg}var tg,cq;function g3(){if(cq)return tg;cq=1;var r=it(),e=$e(),t=p3();return tg=!r&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),tg}var dq;function Ju(){if(dq)return Ep;dq=1;var r=it(),e=Qt(),t=Gu(),i=ha(),n=Tr(),s=Qw(),o=Pt(),a=g3(),u=Object.getOwnPropertyDescriptor;return Ep.f=r?u:function(c,d){if(c=n(c),d=s(d),a)try{return u(c,d)}catch{}if(o(c,d))return i(!e(t.f,c,d),c[d])},Ep}var rg,hq;function MY(){if(hq)return rg;hq=1;var r=$e(),e=St(),t=/#|\.prototype\./,i=function(u,l){var c=s[n(u)];return c===a?!0:c===o?!1:e(l)?r(l):!!l},n=i.normalize=function(u){return String(u).replace(t,".").toLowerCase()},s=i.data={},o=i.NATIVE="N",a=i.POLYFILL="P";return rg=i,rg}var ig,fq;function Qu(){if(fq)return ig;fq=1;var r=Yw(),e=hi(),t=da(),i=r(r.bind);return ig=function(n,s){return e(n),s===void 0?n:t?i(n,s):function(){return n.apply(s,arguments)}},ig}var ng={},sg,vq;function m3(){if(vq)return sg;vq=1;var r=it(),e=$e();return sg=r&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),sg}var og,pq;function zr(){if(pq)return og;pq=1;var r=Ot(),e=String,t=TypeError;return og=function(i){if(r(i))return i;throw new t(e(i)+" is not an object")},og}var gq;function fr(){if(gq)return ng;gq=1;var r=it(),e=g3(),t=m3(),i=zr(),n=Qw(),s=TypeError,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return ng.f=r?t?function(h,f,v){if(i(h),f=n(f),i(v),typeof h=="function"&&f==="prototype"&&"value"in v&&c in v&&!v[c]){var p=a(h,f);p&&p[c]&&(h[f]=v.value,v={configurable:l in v?v[l]:p[l],enumerable:u in v?v[u]:p[u],writable:!1})}return o(h,f,v)}:o:function(h,f,v){if(i(h),f=n(f),i(v),e)try{return o(h,f,v)}catch{}if("get"in v||"set"in v)throw new s("Accessors not supported");return"value"in v&&(h[f]=v.value),h},ng}var ag,mq;function js(){if(mq)return ag;mq=1;var r=it(),e=fr(),t=ha();return ag=r?function(i,n,s){return e.f(i,n,t(1,s))}:function(i,n,s){return i[n]=s,i},ag}var ug,yq;function de(){if(yq)return ug;yq=1;var r=Xe(),e=Ku(),t=Yw(),i=St(),n=Ju().f,s=MY(),o=Be(),a=Qu(),u=js(),l=Pt(),c=function(d){var h=function(f,v,p){if(this instanceof h){switch(arguments.length){case 0:return new d;case 1:return new d(f);case 2:return new d(f,v)}return new d(f,v,p)}return e(d,this,arguments)};return h.prototype=d.prototype,h};return ug=function(d,h){var f=d.target,v=d.global,p=d.stat,_=d.proto,y=v?r:p?r[f]:r[f]&&r[f].prototype,g=v?o:o[f]||u(o,f,{})[f],b=g.prototype,m,E,O,I,w,S,T,R,x;for(I in h)m=s(v?I:f+(p?".":"#")+I,d.forced),E=!m&&y&&l(y,I),S=g[I],E&&(d.dontCallGetSet?(x=n(y,I),T=x&&x.value):T=y[I]),w=E&&T?T:h[I],!(!m&&!_&&typeof S==typeof w)&&(d.bind&&E?R=a(w,r):d.wrap&&E?R=c(w):_&&i(w)?R=t(w):R=w,(d.sham||w&&w.sham||S&&S.sham)&&u(R,"sham",!0),u(g,I,R),_&&(O=f+"Prototype",l(o,O)||u(o,O,{}),u(o[O],I,w),d.real&&b&&(m||!b[I])&&u(b,I,w)))},ug}var lg,bq;function NY(){if(bq)return lg;bq=1;var r=Math.ceil,e=Math.floor;return lg=Math.trunc||function(i){var n=+i;return(n>0?e:r)(n)},lg}var cg,_q;function Ls(){if(_q)return cg;_q=1;var r=NY();return cg=function(e){var t=+e;return t!==t||t===0?0:r(t)},cg}var dg,wq;function Zu(){if(wq)return dg;wq=1;var r=Ls(),e=Math.max,t=Math.min;return dg=function(i,n){var s=r(i);return s<0?e(s+n,0):t(s,n)},dg}var hg,Eq;function y3(){if(Eq)return hg;Eq=1;var r=Ls(),e=Math.min;return hg=function(t){var i=r(t);return i>0?e(i,9007199254740991):0},hg}var fg,Sq;function fi(){if(Sq)return fg;Sq=1;var r=y3();return fg=function(e){return r(e.length)},fg}var vg,Oq;function Zw(){if(Oq)return vg;Oq=1;var r=Tr(),e=Zu(),t=fi(),i=function(n){return function(s,o,a){var u=r(s),l=t(u);if(l===0)return!n&&-1;var c=e(a,l),d;if(n&&o!==o){for(;l>c;)if(d=u[c++],d!==d)return!0}else for(;l>c;c++)if((n||c in u)&&u[c]===o)return n||c||0;return!n&&-1}};return vg={includes:i(!0),indexOf:i(!1)},vg}var pg,Iq;function pa(){return Iq||(Iq=1,pg={}),pg}var gg,Tq;function b3(){if(Tq)return gg;Tq=1;var r=Ce(),e=Pt(),t=Tr(),i=Zw().indexOf,n=pa(),s=r([].push);return gg=function(o,a){var u=t(o),l=0,c=[],d;for(d in u)!e(n,d)&&e(u,d)&&s(c,d);for(;a.length>l;)e(u,d=a[l++])&&(~i(c,d)||s(c,d));return c},gg}var mg,$q;function e0(){return $q||($q=1,mg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),mg}var yg,Pq;function ga(){if(Pq)return yg;Pq=1;var r=b3(),e=e0();return yg=Object.keys||function(i){return r(i,e)},yg}var bg={},Rq;function el(){return Rq||(Rq=1,bg.f=Object.getOwnPropertySymbols),bg}var _g,Cq;function FY(){if(Cq)return _g;Cq=1;var r=it(),e=Ce(),t=Qt(),i=$e(),n=ga(),s=el(),o=Gu(),a=sr(),u=Yu(),l=Object.assign,c=Object.defineProperty,d=e([].concat);return _g=!l||i(function(){if(r&&l({b:1},l(c({},"a",{enumerable:!0,get:function(){c(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var h={},f={},v=Symbol("assign detection"),p="abcdefghijklmnopqrst";return h[v]=7,p.split("").forEach(function(_){f[_]=_}),l({},h)[v]!==7||n(l({},f)).join("")!==p})?function(f,v){for(var p=a(f),_=arguments.length,y=1,g=s.f,b=o.f;_>y;)for(var m=u(arguments[y++]),E=g?d(n(m),g(m)):n(m),O=E.length,I=0,w;O>I;)w=E[I++],(!r||t(b,m,w))&&(p[w]=m[w]);return p}:l,_g}var xq;function kY(){if(xq)return Sx;xq=1;var r=de(),e=FY();return r({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e}),Sx}var wg,qq;function BY(){if(qq)return wg;qq=1,kY();var r=Be();return wg=r.Object.assign,wg}var Eg,Dq;function jY(){if(Dq)return Eg;Dq=1;var r=BY();return Eg=r,Eg}var Sg,Aq;function LY(){return Aq||(Aq=1,Sg=jY()),Sg}var zY=LY(),at=pe(zY),Mq={},Og,Nq;function zs(){if(Nq)return Og;Nq=1;var r=Ce();return Og=r([].slice),Og}var Ig,Fq;function HY(){if(Fq)return Ig;Fq=1;var r=Ce(),e=hi(),t=Ot(),i=Pt(),n=zs(),s=da(),o=Function,a=r([].concat),u=r([].join),l={},c=function(d,h,f){if(!i(l,h)){for(var v=[],p=0;p=.1;)v=+s[d++%o],v>c&&(v=c),f=Math.sqrt(v*v/(1+l*l)),f=a<0?-f:f,e+=f,t+=l*f,h===!0?r.lineTo(e,t):r.moveTo(e,t),c-=v,h=!h}function t7(r,e,t,i){r.beginPath();const n=6,s=Math.PI*2/n;r.moveTo(e+i,t);for(let o=1;o1?t-1:0),n=1;ne)throw r("Maximum allowed index exceeded");return t},Dg}var Ag,Yq;function tl(){if(Yq)return Ag;Yq=1;var r=it(),e=fr(),t=ha();return Ag=function(i,n,s){r?e.f(i,n,t(0,s)):i[n]=s},Ag}var Mg,Xq;function r0(){if(Xq)return Mg;Xq=1;var r=ft(),e=r("toStringTag"),t={};return t[e]="z",Mg=String(t)==="[object z]",Mg}var Ng,Jq;function Hs(){if(Jq)return Ng;Jq=1;var r=r0(),e=St(),t=Lr(),i=ft(),n=i("toStringTag"),s=Object,o=t(function(){return arguments}())==="Arguments",a=function(u,l){try{return u[l]}catch{}};return Ng=r?t:function(u){var l,c,d;return u===void 0?"Undefined":u===null?"Null":typeof(c=a(l=s(u),n))=="string"?c:o?t(l):(d=t(l))==="Object"&&e(l.callee)?"Arguments":d},Ng}var Fg,Qq;function s7(){if(Qq)return Fg;Qq=1;var r=Ce(),e=St(),t=Jw(),i=r(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(n){return i(n)}),Fg=t.inspectSource,Fg}var kg,Zq;function I3(){if(Zq)return kg;Zq=1;var r=Ce(),e=$e(),t=St(),i=Hs(),n=nr(),s=s7(),o=function(){},a=n("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=r(u.exec),c=!u.test(o),d=function(v){if(!t(v))return!1;try{return a(o,[],v),!0}catch{return!1}},h=function(v){if(!t(v))return!1;switch(i(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,s(v))}catch{return!0}};return h.sham=!0,kg=!a||e(function(){var f;return d(d.call)||!d(Object)||!d(function(){f=!0})||f})?h:d,kg}var Bg,eD;function o7(){if(eD)return Bg;eD=1;var r=xn(),e=I3(),t=Ot(),i=ft(),n=i("species"),s=Array;return Bg=function(o){var a;return r(o)&&(a=o.constructor,e(a)&&(a===s||r(a.prototype))?a=void 0:t(a)&&(a=a[n],a===null&&(a=void 0))),a===void 0?s:a},Bg}var jg,tD;function i0(){if(tD)return jg;tD=1;var r=o7();return jg=function(e,t){return new(r(e))(t===0?0:t)},jg}var Lg,rD;function ma(){if(rD)return Lg;rD=1;var r=$e(),e=ft(),t=fa(),i=e("species");return Lg=function(n){return t>=51||!r(function(){var s=[],o=s.constructor={};return o[i]=function(){return{foo:1}},s[n](Boolean).foo!==1})},Lg}var iD;function T3(){if(iD)return Vq;iD=1;var r=de(),e=$e(),t=xn(),i=Ot(),n=sr(),s=fi(),o=O3(),a=tl(),u=i0(),l=ma(),c=ft(),d=fa(),h=c("isConcatSpreadable"),f=d>=51||!e(function(){var _=[];return _[h]=!1,_.concat()[0]!==_}),v=function(_){if(!i(_))return!1;var y=_[h];return y!==void 0?!!y:t(_)},p=!f||!l("concat");return r({target:"Array",proto:!0,arity:1,forced:p},{concat:function(y){var g=n(this),b=u(g,0),m=0,E,O,I,w,S;for(E=-1,I=arguments.length;Eh;)t.f(a,f=c[h++],l[f]);return a},Hg}var Wg,uD;function a7(){if(uD)return Wg;uD=1;var r=nr();return Wg=r("document","documentElement"),Wg}var Ug,lD;function rl(){if(lD)return Ug;lD=1;var r=Bs(),e=Xu(),t=r("keys");return Ug=function(i){return t[i]||(t[i]=e(i))},Ug}var Vg,cD;function ya(){if(cD)return Vg;cD=1;var r=zr(),e=n0(),t=e0(),i=pa(),n=a7(),s=p3(),o=rl(),a=">",u="<",l="prototype",c="script",d=o("IE_PROTO"),h=function(){},f=function(g){return u+c+a+g+u+"/"+c+a},v=function(g){g.write(f("")),g.close();var b=g.parentWindow.Object;return g=null,b},p=function(){var g=s("iframe"),b="java"+c+":",m;return g.style.display="none",n.appendChild(g),g.src=String(b),m=g.contentWindow.document,m.open(),m.write(f("document.F=Object")),m.close(),m.F},_,y=function(){try{_=new ActiveXObject("htmlfile")}catch{}y=typeof document<"u"?document.domain&&_?v(_):p():v(_);for(var g=t.length;g--;)delete y[l][t[g]];return y()};return i[d]=!0,Vg=Object.create||function(b,m){var E;return b!==null?(h[l]=r(b),E=new h,h[l]=null,E[d]=b):E=y(),m===void 0?E:e.f(E,m)},Vg}var Kg={},dD;function il(){if(dD)return Kg;dD=1;var r=b3(),e=e0(),t=e.concat("length","prototype");return Kg.f=Object.getOwnPropertyNames||function(n){return r(n,t)},Kg}var Gg={},hD;function s0(){if(hD)return Gg;hD=1;var r=Lr(),e=Tr(),t=il().f,i=zs(),n=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(o){try{return t(o)}catch{return i(n)}};return Gg.f=function(a){return n&&r(a)==="Window"?s(a):t(e(a))},Gg}var Yg,fD;function ba(){if(fD)return Yg;fD=1;var r=js();return Yg=function(e,t,i,n){return n&&n.enumerable?e[t]=i:r(e,t,i),e},Yg}var Xg,vD;function o0(){if(vD)return Xg;vD=1;var r=fr();return Xg=function(e,t,i){return r.f(e,t,i)},Xg}var Jg={},pD;function nl(){if(pD)return Jg;pD=1;var r=ft();return Jg.f=r,Jg}var Qg,gD;function Qe(){if(gD)return Qg;gD=1;var r=Be(),e=Pt(),t=nl(),i=fr().f;return Qg=function(n){var s=r.Symbol||(r.Symbol={});e(s,n)||i(s,n,{value:t.f(n)})},Qg}var Zg,mD;function $3(){if(mD)return Zg;mD=1;var r=Qt(),e=nr(),t=ft(),i=ba();return Zg=function(){var n=e("Symbol"),s=n&&n.prototype,o=s&&s.valueOf,a=t("toPrimitive");s&&!s[a]&&i(s,a,function(u){return r(o,this)},{arity:1})},Zg}var em,yD;function u7(){if(yD)return em;yD=1;var r=r0(),e=Hs();return em=r?{}.toString:function(){return"[object "+e(this)+"]"},em}var tm,bD;function qn(){if(bD)return tm;bD=1;var r=r0(),e=fr().f,t=js(),i=Pt(),n=u7(),s=ft(),o=s("toStringTag");return tm=function(a,u,l,c){var d=l?a:a&&a.prototype;d&&(i(d,o)||e(d,o,{configurable:!0,value:u}),c&&!r&&t(d,"toString",n))},tm}var rm,_D;function P3(){if(_D)return rm;_D=1;var r=Xe(),e=St(),t=r.WeakMap;return rm=e(t)&&/native code/.test(String(t)),rm}var im,wD;function Dn(){if(wD)return im;wD=1;var r=P3(),e=Xe(),t=Ot(),i=js(),n=Pt(),s=Jw(),o=rl(),a=pa(),u="Object already initialized",l=e.TypeError,c=e.WeakMap,d,h,f,v=function(g){return f(g)?h(g):d(g,{})},p=function(g){return function(b){var m;if(!t(b)||(m=h(b)).type!==g)throw new l("Incompatible receiver, "+g+" required");return m}};if(r||s.state){var _=s.state||(s.state=new c);_.get=_.get,_.has=_.has,_.set=_.set,d=function(g,b){if(_.has(g))throw new l(u);return b.facade=g,_.set(g,b),b},h=function(g){return _.get(g)||{}},f=function(g){return _.has(g)}}else{var y=o("state");a[y]=!0,d=function(g,b){if(n(g,y))throw new l(u);return b.facade=g,i(g,y,b),b},h=function(g){return n(g,y)?g[y]:{}},f=function(g){return n(g,y)}}return im={set:d,get:h,has:f,enforce:v,getterFor:p},im}var nm,ED;function Wi(){if(ED)return nm;ED=1;var r=Qu(),e=Ce(),t=Yu(),i=sr(),n=fi(),s=i0(),o=e([].push),a=function(u){var l=u===1,c=u===2,d=u===3,h=u===4,f=u===6,v=u===7,p=u===5||f;return function(_,y,g,b){for(var m=i(_),E=t(m),O=n(E),I=r(y,g),w=0,S=b||s,T=l?S(_,O):c||v?S(_,0):void 0,R,x;O>w;w++)if((p||w in E)&&(R=E[w],x=I(R,w,m),u))if(l)T[w]=x;else if(x)switch(u){case 3:return!0;case 5:return R;case 6:return w;case 2:o(T,R)}else switch(u){case 4:return!1;case 7:o(T,R)}return f?-1:d||h?h:T}};return nm={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},nm}var SD;function l7(){if(SD)return sD;SD=1;var r=de(),e=Xe(),t=Qt(),i=Ce(),n=ks(),s=it(),o=Ns(),a=$e(),u=Pt(),l=ht(),c=zr(),d=Tr(),h=Qw(),f=vr(),v=ha(),p=ya(),_=ga(),y=il(),g=s0(),b=el(),m=Ju(),E=fr(),O=n0(),I=Gu(),w=ba(),S=o0(),T=Bs(),R=rl(),x=pa(),C=Xu(),D=ft(),j=nl(),ee=Qe(),H=$3(),Z=qn(),ve=Dn(),we=Wi().forEach,te=R("hidden"),me="Symbol",xe="prototype",De=ve.set,nt=ve.getterFor(me),_e=Object[xe],A=e.Symbol,W=A&&A[xe],Y=e.RangeError,ie=e.TypeError,Pe=e.QObject,$=m.f,P=E.f,q=g.f,F=I.f,k=i([].push),N=T("symbols"),K=T("op-symbols"),X=T("wks"),U=!Pe||!Pe[xe]||!Pe[xe].findChild,B=function(ae,V,Q){var re=$(_e,V);re&&delete _e[V],P(ae,V,Q),re&&ae!==_e&&P(_e,V,re)},ce=s&&a(function(){return p(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a!==7})?B:P,J=function(ae,V){var Q=N[ae]=p(W);return De(Q,{type:me,tag:ae,description:V}),s||(Q.description=V),Q},oe=function(V,Q,re){V===_e&&oe(K,Q,re),c(V);var ne=h(Q);return c(re),u(N,ne)?(re.enumerable?(u(V,te)&&V[te][ne]&&(V[te][ne]=!1),re=p(re,{enumerable:v(0,!1)})):(u(V,te)||P(V,te,v(1,p(null))),V[te][ne]=!0),ce(V,ne,re)):P(V,ne,re)},he=function(V,Q){c(V);var re=d(Q),ne=_(re).concat(st(re));return we(ne,function(Ee){(!s||t(qe,re,Ee))&&oe(V,Ee,re[Ee])}),V},Oe=function(V,Q){return Q===void 0?p(V):he(p(V),Q)},qe=function(V){var Q=h(V),re=t(F,this,Q);return this===_e&&u(N,Q)&&!u(K,Q)?!1:re||!u(this,Q)||!u(N,Q)||u(this,te)&&this[te][Q]?re:!0},Re=function(V,Q){var re=d(V),ne=h(Q);if(!(re===_e&&u(N,ne)&&!u(K,ne))){var Ee=$(re,ne);return Ee&&u(N,ne)&&!(u(re,te)&&re[te][ne])&&(Ee.enumerable=!0),Ee}},vt=function(V){var Q=q(d(V)),re=[];return we(Q,function(ne){!u(N,ne)&&!u(x,ne)&&k(re,ne)}),re},st=function(ae){var V=ae===_e,Q=q(V?K:d(ae)),re=[];return we(Q,function(ne){u(N,ne)&&(!V||u(_e,ne))&&k(re,N[ne])}),re};return o||(A=function(){if(l(W,this))throw new ie("Symbol is not a constructor");var V=!arguments.length||arguments[0]===void 0?void 0:f(arguments[0]),Q=C(V),re=function(ne){var Ee=this===void 0?e:this;Ee===_e&&t(re,K,ne),u(Ee,te)&&u(Ee[te],Q)&&(Ee[te][Q]=!1);var vi=v(1,ne);try{ce(Ee,Q,vi)}catch(Xs){if(!(Xs instanceof Y))throw Xs;B(Ee,Q,vi)}};return s&&U&&ce(_e,Q,{configurable:!0,set:re}),J(Q,V)},W=A[xe],w(W,"toString",function(){return nt(this).tag}),w(A,"withoutSetter",function(ae){return J(C(ae),ae)}),I.f=qe,E.f=oe,O.f=he,m.f=Re,y.f=g.f=vt,b.f=st,j.f=function(ae){return J(D(ae),ae)},s&&(S(W,"description",{configurable:!0,get:function(){return nt(this).description}}),n||w(_e,"propertyIsEnumerable",qe,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:A}),we(_(X),function(ae){ee(ae)}),r({target:me,stat:!0,forced:!o},{useSetter:function(){U=!0},useSimple:function(){U=!1}}),r({target:"Object",stat:!0,forced:!o,sham:!s},{create:Oe,defineProperty:oe,defineProperties:he,getOwnPropertyDescriptor:Re}),r({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:vt}),H(),Z(A,me),x[te]=!0,sD}var OD={},sm,ID;function R3(){if(ID)return sm;ID=1;var r=Ns();return sm=r&&!!Symbol.for&&!!Symbol.keyFor,sm}var TD;function c7(){if(TD)return OD;TD=1;var r=de(),e=nr(),t=Pt(),i=vr(),n=Bs(),s=R3(),o=n("string-to-symbol-registry"),a=n("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!s},{for:function(u){var l=i(u);if(t(o,l))return o[l];var c=e("Symbol")(l);return o[l]=c,a[c]=l,c}}),OD}var $D={},PD;function d7(){if(PD)return $D;PD=1;var r=de(),e=Pt(),t=va(),i=Fs(),n=Bs(),s=R3(),o=n("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!s},{keyFor:function(u){if(!t(u))throw new TypeError(i(u)+" is not a symbol");if(e(o,u))return o[u]}}),$D}var RD={},om,CD;function h7(){if(CD)return om;CD=1;var r=Ce(),e=xn(),t=St(),i=Lr(),n=vr(),s=r([].push);return om=function(o){if(t(o))return o;if(e(o)){for(var a=o.length,u=[],l=0;l=v.length)return f.target=null,o(void 0,!0);switch(f.kind){case"keys":return o(p,!1);case"values":return o(v[p],!1)}return o([p,v[p]],!1)},"values");var h=t.Arguments=t.Array;if(e("keys"),e("values"),e("entries"),!a&&u&&h.name!=="values")try{n(h,"name",{value:"values"})}catch{}return wm}var Em,RA;function D7(){return RA||(RA=1,Em={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}),Em}var CA;function Vs(){if(CA)return vA;CA=1,Us();var r=D7(),e=Xe(),t=qn(),i=Ws();for(var n in r)t(e[n],n),i[n]=i.Array;return vA}var Sm,xA;function k3(){if(xA)return Sm;xA=1;var r=T7();return Vs(),Sm=r,Sm}var Om,qA;function A7(){return qA||(qA=1,Om=k3()),Om}var M7=A7(),N7=pe(M7),DA={},AA;function F7(){if(AA)return DA;AA=1;var r=de(),e=xn(),t=I3(),i=Ot(),n=Zu(),s=fi(),o=Tr(),a=tl(),u=ft(),l=ma(),c=zs(),d=l("slice"),h=u("species"),f=Array,v=Math.max;return r({target:"Array",proto:!0,forced:!d},{slice:function(_,y){var g=o(this),b=s(g),m=n(_,b),E=n(y===void 0?b:y,b),O,I,w;if(e(g)&&(O=g.constructor,t(O)&&(O===f||e(O.prototype))?O=void 0:i(O)&&(O=O[h],O===null&&(O=void 0)),O===f||O===void 0))return c(g,m,E);for(I=new(O===void 0?f:O)(v(E-m,0)),w=0;m1?arguments[1]:void 0)}}),UA}var Dm,KA;function X7(){if(KA)return Dm;KA=1,Y7();var r=Rt();return Dm=r("Array","map"),Dm}var Am,GA;function J7(){if(GA)return Am;GA=1;var r=ht(),e=X7(),t=Array.prototype;return Am=function(i){var n=i.map;return i===t||r(t,i)&&n===t.map?e:n},Am}var Mm,YA;function Q7(){if(YA)return Mm;YA=1;var r=J7();return Mm=r,Mm}var Nm,XA;function Z7(){return XA||(XA=1,Nm=Q7()),Nm}var eX=Z7(),ys=pe(eX),JA={},QA;function tX(){if(QA)return JA;QA=1;var r=de(),e=sr(),t=ga(),i=$e(),n=i(function(){t(1)});return r({target:"Object",stat:!0,forced:n},{keys:function(o){return t(e(o))}}),JA}var Fm,ZA;function rX(){if(ZA)return Fm;ZA=1,tX();var r=Be();return Fm=r.Object.keys,Fm}var km,eM;function iX(){if(eM)return km;eM=1;var r=rX();return km=r,km}var Bm,tM;function nX(){return tM||(tM=1,Bm=iX()),Bm}var sX=nX(),et=pe(sX),rM={},iM;function oX(){if(iM)return rM;iM=1;var r=de(),e=Ce(),t=Date,i=e(t.prototype.getTime);return r({target:"Date",stat:!0},{now:function(){return i(new t)}}),rM}var jm,nM;function aX(){if(nM)return jm;nM=1,oX();var r=Be();return jm=r.Date.now,jm}var Lm,sM;function uX(){if(sM)return Lm;sM=1;var r=aX();return Lm=r,Lm}var zm,oM;function lX(){return oM||(oM=1,zm=uX()),zm}var cX=lX(),lu=pe(cX),aM={},Hm,uM;function Ks(){if(uM)return Hm;uM=1;var r=$e();return Hm=function(e,t){var i=[][e];return!!i&&r(function(){i.call(null,t||function(){return 1},1)})},Hm}var Wm,lM;function dX(){if(lM)return Wm;lM=1;var r=Wi().forEach,e=Ks(),t=e("forEach");return Wm=t?[].forEach:function(n){return r(this,n,arguments.length>1?arguments[1]:void 0)},Wm}var cM;function hX(){if(cM)return aM;cM=1;var r=de(),e=dX();return r({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),aM}var Um,dM;function fX(){if(dM)return Um;dM=1,hX();var r=Rt();return Um=r("Array","forEach"),Um}var Vm,hM;function vX(){if(hM)return Vm;hM=1;var r=fX();return Vm=r,Vm}var Km,fM;function pX(){if(fM)return Km;fM=1;var r=Hs(),e=Pt(),t=ht(),i=vX(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return Km=function(o){var a=o.forEach;return o===n||t(n,o)&&a===n.forEach||e(s,r(o))?i:a},Km}var Gm,vM;function gX(){return vM||(vM=1,Gm=pX()),Gm}var mX=gX(),Le=pe(mX),pM={},gM;function yX(){if(gM)return pM;gM=1;var r=de(),e=Ce(),t=xn(),i=e([].reverse),n=[1,2];return r({target:"Array",proto:!0,forced:String(n)===String(n.reverse())},{reverse:function(){return t(this)&&(this.length=this.length),i(this)}}),pM}var Ym,mM;function bX(){if(mM)return Ym;mM=1,yX();var r=Rt();return Ym=r("Array","reverse"),Ym}var Xm,yM;function _X(){if(yM)return Xm;yM=1;var r=ht(),e=bX(),t=Array.prototype;return Xm=function(i){var n=i.reverse;return i===t||r(t,i)&&n===t.reverse?e:n},Xm}var Jm,bM;function wX(){if(bM)return Jm;bM=1;var r=_X();return Jm=r,Jm}var Qm,_M;function EX(){return _M||(_M=1,Qm=wX()),Qm}var SX=EX(),on=pe(SX),wM={},Zm,EM;function OX(){if(EM)return Zm;EM=1;var r=it(),e=xn(),t=TypeError,i=Object.getOwnPropertyDescriptor,n=r&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(s){return s instanceof TypeError}}();return Zm=n?function(s,o){if(e(s)&&!i(s,"length").writable)throw new t("Cannot set read only .length");return s.length=o}:function(s,o){return s.length=o},Zm}var ey,SM;function B3(){if(SM)return ey;SM=1;var r=Fs(),e=TypeError;return ey=function(t,i){if(!delete t[i])throw new e("Cannot delete property "+r(i)+" of "+r(t))},ey}var OM;function IX(){if(OM)return wM;OM=1;var r=de(),e=sr(),t=Zu(),i=Ls(),n=fi(),s=OX(),o=O3(),a=i0(),u=tl(),l=B3(),c=ma(),d=c("splice"),h=Math.max,f=Math.min;return r({target:"Array",proto:!0,forced:!d},{splice:function(p,_){var y=e(this),g=n(y),b=t(p,g),m=arguments.length,E,O,I,w,S,T;for(m===0?E=O=0:m===1?(E=0,O=g-b):(E=m-2,O=f(h(i(_),0),g-b)),o(g+E-O),I=a(y,O),w=0;wg-O+E;w--)l(y,w-1)}else if(E>O)for(w=g-O;w>b;w--)S=w+O-1,T=w+E-1,S in y?y[T]=y[S]:l(y,T);for(w=0;w1?arguments[1]:void 0)}}),i("includes"),RM}var sy,xM;function qX(){if(xM)return sy;xM=1,xX();var r=Rt();return sy=r("Array","includes"),sy}var qM={},oy,DM;function DX(){if(DM)return oy;DM=1;var r=Ot(),e=Lr(),t=ft(),i=t("match");return oy=function(n){var s;return r(n)&&((s=n[i])!==void 0?!!s:e(n)==="RegExp")},oy}var ay,AM;function AX(){if(AM)return ay;AM=1;var r=DX(),e=TypeError;return ay=function(t){if(r(t))throw new e("The method doesn't accept regular expressions");return t},ay}var uy,MM;function MX(){if(MM)return uy;MM=1;var r=ft(),e=r("match");return uy=function(t){var i=/./;try{"/./"[t](i)}catch{try{return i[e]=!1,"/./"[t](i)}catch{}}return!1},uy}var NM;function NX(){if(NM)return qM;NM=1;var r=de(),e=Ce(),t=AX(),i=di(),n=vr(),s=MX(),o=e("".indexOf);return r({target:"String",proto:!0,forced:!s("includes")},{includes:function(u){return!!~o(n(i(this)),n(t(u)),arguments.length>1?arguments[1]:void 0)}}),qM}var ly,FM;function FX(){if(FM)return ly;FM=1,NX();var r=Rt();return ly=r("String","includes"),ly}var cy,kM;function kX(){if(kM)return cy;kM=1;var r=ht(),e=qX(),t=FX(),i=Array.prototype,n=String.prototype;return cy=function(s){var o=s.includes;return s===i||r(i,s)&&o===i.includes?e:typeof s=="string"||s===n||r(n,s)&&o===n.includes?t:o},cy}var dy,BM;function BX(){if(BM)return dy;BM=1;var r=kX();return dy=r,dy}var hy,jM;function jX(){return jM||(jM=1,hy=BX()),hy}var LX=jX(),$i=pe(LX),LM={},zM;function zX(){if(zM)return LM;zM=1;var r=de(),e=$e(),t=sr(),i=sl(),n=N3(),s=e(function(){i(1)});return r({target:"Object",stat:!0,forced:s,sham:!n},{getPrototypeOf:function(a){return i(t(a))}}),LM}var fy,HM;function HX(){if(HM)return fy;HM=1,zX();var r=Be();return fy=r.Object.getPrototypeOf,fy}var vy,WM;function WX(){if(WM)return vy;WM=1;var r=HX();return vy=r,vy}var py,UM;function UX(){return UM||(UM=1,py=WX()),py}var VX=UX(),VM=pe(VX),gy,KM;function KX(){if(KM)return gy;KM=1,T3();var r=Rt();return gy=r("Array","concat"),gy}var my,GM;function GX(){if(GM)return my;GM=1;var r=ht(),e=KX(),t=Array.prototype;return my=function(i){var n=i.concat;return i===t||r(t,i)&&n===t.concat?e:n},my}var yy,YM;function YX(){if(YM)return yy;YM=1;var r=GX();return yy=r,yy}var by,XM;function XX(){return XM||(XM=1,by=YX()),by}var JX=XX(),QX=pe(JX),JM={},QM;function ZX(){if(QM)return JM;QM=1;var r=de(),e=Wi().filter,t=ma(),i=t("filter");return r({target:"Array",proto:!0,forced:!i},{filter:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),JM}var _y,ZM;function eJ(){if(ZM)return _y;ZM=1,ZX();var r=Rt();return _y=r("Array","filter"),_y}var wy,eN;function tJ(){if(eN)return wy;eN=1;var r=ht(),e=eJ(),t=Array.prototype;return wy=function(i){var n=i.filter;return i===t||r(t,i)&&n===t.filter?e:n},wy}var Ey,tN;function rJ(){if(tN)return Ey;tN=1;var r=tJ();return Ey=r,Ey}var Sy,rN;function iJ(){return rN||(rN=1,Sy=rJ()),Sy}var nJ=iJ(),Kt=pe(nJ),iN={},Oy,nN;function sJ(){if(nN)return Oy;nN=1;var r=it(),e=$e(),t=Ce(),i=sl(),n=ga(),s=Tr(),o=Gu().f,a=t(o),u=t([].push),l=r&&e(function(){var d=Object.create(null);return d[2]=2,!a(d,2)}),c=function(d){return function(h){for(var f=s(h),v=n(f),p=l&&i(f)===null,_=v.length,y=0,g=[],b;_>y;)b=v[y++],(!r||(p?b in f:a(f,b)))&&u(g,d?[b,f[b]]:f[b]);return g}};return Oy={entries:c(!0),values:c(!1)},Oy}var sN;function oJ(){if(sN)return iN;sN=1;var r=de(),e=sJ().values;return r({target:"Object",stat:!0},{values:function(i){return e(i)}}),iN}var Iy,oN;function aJ(){if(oN)return Iy;oN=1,oJ();var r=Be();return Iy=r.Object.values,Iy}var Ty,aN;function uJ(){if(aN)return Ty;aN=1;var r=aJ();return Ty=r,Ty}var $y,uN;function lJ(){return uN||(uN=1,$y=uJ()),$y}var cJ=lJ(),dJ=pe(cJ),lN={},Py,cN;function c0(){return cN||(cN=1,Py=` -\v\f\r                 \u2028\u2029\uFEFF`),Py}var Ry,dN;function j3(){if(dN)return Ry;dN=1;var r=Ce(),e=di(),t=vr(),i=c0(),n=r("".replace),s=RegExp("^["+i+"]+"),o=RegExp("(^|[^"+i+"])["+i+"]+$"),a=function(u){return function(l){var c=t(e(l));return u&1&&(c=n(c,s,"")),u&2&&(c=n(c,o,"$1")),c}};return Ry={start:a(1),end:a(2),trim:a(3)},Ry}var Cy,hN;function hJ(){if(hN)return Cy;hN=1;var r=Xe(),e=$e(),t=Ce(),i=vr(),n=j3().trim,s=c0(),o=r.parseInt,a=r.Symbol,u=a&&a.iterator,l=/^[+-]?0x/i,c=t(l.exec),d=o(s+"08")!==8||o(s+"0x16")!==22||u&&!e(function(){o(Object(u))});return Cy=d?function(f,v){var p=n(i(f));return o(p,v>>>0||(c(l,p)?16:10))}:o,Cy}var fN;function fJ(){if(fN)return lN;fN=1;var r=de(),e=hJ();return r({global:!0,forced:parseInt!==e},{parseInt:e}),lN}var xy,vN;function vJ(){if(vN)return xy;vN=1,fJ();var r=Be();return xy=r.parseInt,xy}var qy,pN;function pJ(){if(pN)return qy;pN=1;var r=vJ();return qy=r,qy}var Dy,gN;function gJ(){return gN||(gN=1,Dy=pJ()),Dy}var mJ=gJ(),yr=pe(mJ),mN={},yN;function yJ(){if(yN)return mN;yN=1;var r=de(),e=Yw(),t=Zw().indexOf,i=Ks(),n=e([].indexOf),s=!!n&&1/n([1],1,-0)<0,o=s||!i("indexOf");return r({target:"Array",proto:!0,forced:o},{indexOf:function(u){var l=arguments.length>1?arguments[1]:void 0;return s?n(this,u,l)||0:t(this,u,l)}}),mN}var Ay,bN;function bJ(){if(bN)return Ay;bN=1,yJ();var r=Rt();return Ay=r("Array","indexOf"),Ay}var My,_N;function _J(){if(_N)return My;_N=1;var r=ht(),e=bJ(),t=Array.prototype;return My=function(i){var n=i.indexOf;return i===t||r(t,i)&&n===t.indexOf?e:n},My}var Ny,wN;function wJ(){if(wN)return Ny;wN=1;var r=_J();return Ny=r,Ny}var Fy,EN;function EJ(){return EN||(EN=1,Fy=wJ()),Fy}var SJ=EJ(),Fe=pe(SJ),SN={},ON;function OJ(){if(ON)return SN;ON=1;var r=de(),e=it(),t=ya();return r({target:"Object",stat:!0,sham:!e},{create:t}),SN}var ky,IN;function IJ(){if(IN)return ky;IN=1,OJ();var r=Be(),e=r.Object;return ky=function(i,n){return e.create(i,n)},ky}var By,TN;function TJ(){if(TN)return By;TN=1;var r=IJ();return By=r,By}var jy,$N;function $J(){return $N||($N=1,jy=TJ()),jy}var PJ=$J(),an=pe(PJ),PN={},Ly,RN;function RJ(){if(RN)return Ly;RN=1;var r=Ls(),e=vr(),t=di(),i=RangeError;return Ly=function(s){var o=e(t(this)),a="",u=r(s);if(u<0||u===1/0)throw new i("Wrong number of repetitions");for(;u>0;(u>>>=1)&&(o+=o))u&1&&(a+=o);return a},Ly}var zy,CN;function CJ(){if(CN)return zy;CN=1;var r=Ce(),e=y3(),t=vr(),i=RJ(),n=di(),s=r(i),o=r("".slice),a=Math.ceil,u=function(l){return function(c,d,h){var f=t(n(c)),v=e(d),p=f.length,_=h===void 0?" ":t(h),y,g;return v<=p||_===""?f:(y=v-p,g=s(_,a(y/_.length)),g.length>y&&(g=o(g,0,y)),l?f+g:g+f)}};return zy={start:u(!1),end:u(!0)},zy}var Hy,xN;function xJ(){if(xN)return Hy;xN=1;var r=Ce(),e=$e(),t=CJ().start,i=RangeError,n=isFinite,s=Math.abs,o=Date.prototype,a=o.toISOString,u=r(o.getTime),l=r(o.getUTCDate),c=r(o.getUTCFullYear),d=r(o.getUTCHours),h=r(o.getUTCMilliseconds),f=r(o.getUTCMinutes),v=r(o.getUTCMonth),p=r(o.getUTCSeconds);return Hy=e(function(){return a.call(new Date(-5e13-1))!=="0385-07-25T07:06:39.999Z"})||!e(function(){a.call(new Date(NaN))})?function(){if(!n(u(this)))throw new i("Invalid time value");var y=this,g=c(y),b=h(y),m=g<0?"-":g>9999?"+":"";return m+t(s(g),m?6:4,0)+"-"+t(v(y)+1,2,0)+"-"+t(l(y),2,0)+"T"+t(d(y),2,0)+":"+t(f(y),2,0)+":"+t(p(y),2,0)+"."+t(b,3,0)+"Z"}:a,Hy}var qN;function qJ(){if(qN)return PN;qN=1;var r=de(),e=Qt(),t=sr(),i=v3(),n=xJ(),s=Lr(),o=$e(),a=o(function(){return new Date(NaN).toJSON()!==null||e(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1});return r({target:"Date",proto:!0,forced:a},{toJSON:function(l){var c=t(this),d=i(c,"number");return typeof d=="number"&&!isFinite(d)?null:!("toISOString"in c)&&s(c)==="Date"?e(n,c):c.toISOString()}}),PN}var Wy,DN;function DJ(){if(DN)return Wy;DN=1,qJ(),C3();var r=Be(),e=Ku();return r.JSON||(r.JSON={stringify:JSON.stringify}),Wy=function(i,n,s){return e(r.JSON.stringify,null,arguments)},Wy}var Uy,AN;function AJ(){if(AN)return Uy;AN=1;var r=DJ();return Uy=r,Uy}var Vy,MN;function MJ(){return MN||(MN=1,Vy=AJ()),Vy}var NJ=MJ(),_a=pe(NJ),NN={},FN={},Ky,kN;function L3(){if(kN)return Ky;kN=1;var r=Xe(),e=Ms(),t=Lr(),i=function(n){return e.slice(0,n.length)===n};return Ky=function(){return i("Bun/")?"BUN":i("Cloudflare-Workers")?"CLOUDFLARE":i("Deno/")?"DENO":i("Node.js/")?"NODE":r.Bun&&typeof Bun.version=="string"?"BUN":r.Deno&&typeof Deno.version=="object"?"DENO":t(r.process)==="process"?"NODE":r.window&&r.document?"BROWSER":"REST"}(),Ky}var Gy,BN;function FJ(){if(BN)return Gy;BN=1;var r=TypeError;return Gy=function(e,t){if(ed,p=t(h)?h:a(h),_=v?s(arguments,d):[],y=v?function(){e(p,this,_)}:p;return c?l(y,f):l(y)}:l},Yy}var LN;function kJ(){if(LN)return FN;LN=1;var r=de(),e=Xe(),t=z3(),i=t(e.setInterval,!0);return r({global:!0,bind:!0,forced:e.setInterval!==i},{setInterval:i}),FN}var zN={},HN;function BJ(){if(HN)return zN;HN=1;var r=de(),e=Xe(),t=z3(),i=t(e.setTimeout,!0);return r({global:!0,bind:!0,forced:e.setTimeout!==i},{setTimeout:i}),zN}var WN;function H3(){return WN||(WN=1,kJ(),BJ()),NN}var Xy,UN;function jJ(){if(UN)return Xy;UN=1,H3();var r=Be();return Xy=r.setTimeout,Xy}var Jy,VN;function LJ(){return VN||(VN=1,Jy=jJ()),Jy}var zJ=LJ(),ti=pe(zJ),KN={},Qy,GN;function HJ(){if(GN)return Qy;GN=1;var r=sr(),e=Zu(),t=fi();return Qy=function(n){for(var s=r(this),o=t(s),a=arguments.length,u=e(a>1?arguments[1]:void 0,o),l=a>2?arguments[2]:void 0,c=l===void 0?o:e(l,o);c>u;)s[u++]=n;return s},Qy}var YN;function WJ(){if(YN)return KN;YN=1;var r=de(),e=HJ(),t=a0();return r({target:"Array",proto:!0},{fill:e}),t("fill"),KN}var Zy,XN;function UJ(){if(XN)return Zy;XN=1,WJ();var r=Rt();return Zy=r("Array","fill"),Zy}var eb,JN;function VJ(){if(JN)return eb;JN=1;var r=ht(),e=UJ(),t=Array.prototype;return eb=function(i){var n=i.fill;return i===t||r(t,i)&&n===t.fill?e:n},eb}var tb,QN;function KJ(){if(QN)return tb;QN=1;var r=VJ();return tb=r,tb}var rb,ZN;function GJ(){return ZN||(ZN=1,rb=KJ()),rb}var YJ=GJ(),wa=pe(YJ);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 - * http://naver.github.io/egjs - * - * Forked By Naver egjs - * Copyright (c) hammerjs - * Licensed under the MIT license */function Sr(){return Sr=Object.assign||function(r){for(var e=1;e"u"?{style:{}}:document.createElement("div"),JJ="function",Zn=Math.round,gn=Math.abs,d0=Date.now;function ol(r,e){for(var t,i,n=e[0].toUpperCase()+e.slice(1),s=0;s"u"?ri={}:ri=window;var W3=ol(XJ.style,"touchAction"),U3=W3!==void 0;function QJ(){if(!U3)return!1;var r={},e=ri.CSS&&ri.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return r[t]=e?ri.CSS.supports("touch-action",t):!0}),r}var V3="compute",K3="auto",V_="manipulation",un="none",jo="pan-x",Lo="pan-y",Ba=QJ(),ZJ=/mobile|tablet|ip(ad|hone|od)|android/i,G3="ontouchstart"in ri,eQ=ol(ri,"PointerEvent")!==void 0,tQ=G3&&ZJ.test(navigator.userAgent),Ea="touch",rQ="pen",h0="mouse",iQ="kinect",nQ=25,Wt=1,An=2,ut=4,Yt=8,cu=1,Sa=2,Oa=4,Ia=8,bs=16,kr=Sa|Oa,ln=Ia|bs,Y3=kr|ln,X3=["x","y"],du=["clientX","clientY"];function ii(r,e,t){var i;if(r)if(r.forEach)r.forEach(e,t);else if(r.length!==void 0)for(i=0;i-1}function sQ(r){if(en(r,un))return un;var e=en(r,jo),t=en(r,Lo);return e&&t?un:e||t?e?jo:Lo:en(r,V_)?V_:K3}var J3=function(){function r(t,i){this.manager=t,this.set(i)}var e=r.prototype;return e.set=function(i){i===V3&&(i=this.compute()),U3&&this.manager.element.style&&Ba[i]&&(this.manager.element.style[W3]=i),this.actions=i.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var i=[];return ii(this.manager.recognizers,function(n){al(n.options.enable,[n])&&(i=i.concat(n.getTouchAction()))}),sQ(i.join(" "))},e.preventDefaults=function(i){var n=i.srcEvent,s=i.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,a=en(o,un)&&!Ba[un],u=en(o,Lo)&&!Ba[Lo],l=en(o,jo)&&!Ba[jo];if(a){var c=i.pointers.length===1,d=i.distance<2,h=i.deltaTime<250;if(c&&d&&h)return}if(!(l&&u)&&(a||u&&s&kr||l&&s&ln))return this.preventSrc(n)},e.preventSrc=function(i){this.manager.session.prevented=!0,i.preventDefault()},r}();function f0(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}function Q3(r){var e=r.length;if(e===1)return{x:Zn(r[0].clientX),y:Zn(r[0].clientY)};for(var t=0,i=0,n=0;n=gn(e)?r<0?Sa:Oa:e<0?Ia:bs}function oQ(r,e){var t=e.center,i=r.offsetDelta||{},n=r.prevDelta||{},s=r.prevInput||{};(e.eventType===Wt||s.eventType===ut)&&(n=r.prevDelta={x:s.deltaX||0,y:s.deltaY||0},i=r.offsetDelta={x:t.x,y:t.y}),e.deltaX=n.x+(t.x-i.x),e.deltaY=n.y+(t.y-i.y)}function e5(r,e,t){return{x:e/r||0,y:t/r||0}}function aQ(r,e){return hu(e[0],e[1],du)/hu(r[0],r[1],du)}function uQ(r,e){return K_(e[1],e[0],du)+K_(r[1],r[0],du)}function lQ(r,e){var t=r.lastInterval||e,i=e.timeStamp-t.timeStamp,n,s,o,a;if(e.eventType!==Yt&&(i>nQ||t.velocity===void 0)){var u=e.deltaX-t.deltaX,l=e.deltaY-t.deltaY,c=e5(i,u,l);s=c.x,o=c.y,n=gn(c.x)>gn(c.y)?c.x:c.y,a=Z3(u,l),r.lastInterval=e}else n=t.velocity,s=t.velocityX,o=t.velocityY,a=t.direction;e.velocity=n,e.velocityX=s,e.velocityY=o,e.direction=a}function cQ(r,e){var t=r.session,i=e.pointers,n=i.length;t.firstInput||(t.firstInput=tF(e)),n>1&&!t.firstMultiple?t.firstMultiple=tF(e):n===1&&(t.firstMultiple=!1);var s=t.firstInput,o=t.firstMultiple,a=o?o.center:s.center,u=e.center=Q3(i);e.timeStamp=d0(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=K_(a,u),e.distance=hu(a,u),oQ(t,e),e.offsetDirection=Z3(e.deltaX,e.deltaY);var l=e5(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=gn(l.x)>gn(l.y)?l.x:l.y,e.scale=o?aQ(o.pointers,i):1,e.rotation=o?uQ(o.pointers,i):0,e.maxPointers=t.prevInput?e.pointers.length>t.prevInput.maxPointers?e.pointers.length:t.prevInput.maxPointers:e.pointers.length,lQ(t,e);var c=r.element,d=e.srcEvent,h;d.composedPath?h=d.composedPath()[0]:d.path?h=d.path[0]:h=d.target,f0(h,c)&&(c=h),e.target=c}function dQ(r,e,t){var i=t.pointers.length,n=t.changedPointers.length,s=e&Wt&&i-n===0,o=e&(ut|Yt)&&i-n===0;t.isFirst=!!s,t.isFinal=!!o,s&&(r.session={}),t.eventType=e,cQ(r,t),r.emit("hammer.input",t),r.recognize(t),r.session.prevInput=t}function zo(r){return r.trim().split(/\s+/g)}function wo(r,e,t){ii(zo(e),function(i){r.addEventListener(i,t,!1)})}function Eo(r,e,t){ii(zo(e),function(i){r.removeEventListener(i,t,!1)})}function rF(r){var e=r.ownerDocument||r;return e.defaultView||e.parentWindow||window}var Gs=function(){function r(t,i){var n=this;this.manager=t,this.callback=i,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(s){al(t.options.enable,[t])&&n.handler(s)},this.init()}var e=r.prototype;return e.handler=function(){},e.init=function(){this.evEl&&wo(this.element,this.evEl,this.domHandler),this.evTarget&&wo(this.target,this.evTarget,this.domHandler),this.evWin&&wo(rF(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&Eo(this.element,this.evEl,this.domHandler),this.evTarget&&Eo(this.target,this.evTarget,this.domHandler),this.evWin&&Eo(rF(this.element),this.evWin,this.domHandler)},r}();function mn(r,e,t){if(r.indexOf&&!t)return r.indexOf(e);for(var i=0;iu[e]}):i=i.sort()),i}var vQ={touchstart:Wt,touchmove:An,touchend:ut,touchcancel:Yt},pQ="touchstart touchmove touchend touchcancel",p0=function(r){pr(e,r);function e(){var i;return e.prototype.evTarget=pQ,i=r.apply(this,arguments)||this,i.targetIds={},i}var t=e.prototype;return t.handler=function(n){var s=vQ[n.type],o=gQ.call(this,n,s);o&&this.callback(this.manager,s,{pointers:o[0],changedPointers:o[1],pointerType:Ea,srcEvent:n})},e}(Gs);function gQ(r,e){var t=Ho(r.touches),i=this.targetIds;if(e&(Wt|An)&&t.length===1)return i[t[0].identifier]=!0,[t,t];var n,s,o=Ho(r.changedTouches),a=[],u=this.target;if(s=t.filter(function(l){return f0(l.target,u)}),e===Wt)for(n=0;n-1&&n.splice(a,1)};setTimeout(s,_Q)}}function wQ(r,e){r&Wt?(this.primaryTouch=e.changedPointers[0].identifier,nF.call(this,e)):r&(ut|Yt)&&nF.call(this,e)}function EQ(r){for(var e=r.srcEvent.clientX,t=r.srcEvent.clientY,i=0;i-1&&this.requireFail.splice(n,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(i){return!!this.simultaneous[i.id]},e.emit=function(i){var n=this,s=this.state;function o(a){n.manager.emit(a,i)}s=Pi&&o(n.options.event+sF(s))},e.tryEmit=function(i){if(this.canEmit())return this.emit(i);this.state=Ar},e.canEmit=function(){for(var i=0;is.threshold&&u&s.direction},t.attrTest=function(n){return ws.prototype.attrTest.call(this,n)&&(this.state&cr||!(this.state&cr)&&this.directionTest(n))},t.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var s=s5(n.direction);s&&(n.additionalEvent=this.options.event+s),r.prototype.emit.call(this,n)},e}(ws),o5=function(r){pr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Sr({event:"swipe",threshold:10,velocity:.3,direction:kr|ln,pointers:1},i))||this}var t=e.prototype;return t.getTouchAction=function(){return m0.prototype.getTouchAction.call(this)},t.attrTest=function(n){var s=this.options.direction,o;return s&(kr|ln)?o=n.overallVelocity:s&kr?o=n.overallVelocityX:s&ln&&(o=n.overallVelocityY),r.prototype.attrTest.call(this,n)&&s&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&gn(o)>this.options.velocity&&n.eventType&ut},t.emit=function(n){var s=s5(n.offsetDirection);s&&this.manager.emit(this.options.event+s,n),this.manager.emit(this.options.event,n)},e}(ws),a5=function(r){pr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Sr({event:"pinch",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[un]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&cr)},t.emit=function(n){if(n.scale!==1){var s=n.scale<1?"in":"out";n.additionalEvent=this.options.event+s}r.prototype.emit.call(this,n)},e}(ws),u5=function(r){pr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Sr({event:"rotate",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[un]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&cr)},e}(ws),l5=function(r){pr(e,r);function e(i){var n;return i===void 0&&(i={}),n=r.call(this,Sr({event:"press",pointers:1,time:251,threshold:9},i))||this,n._timer=null,n._input=null,n}var t=e.prototype;return t.getTouchAction=function(){return[K3]},t.process=function(n){var s=this,o=this.options,a=n.pointers.length===o.pointers,u=n.distanceo.time;if(this._input=n,!u||!a||n.eventType&(ut|Yt)&&!l)this.reset();else if(n.eventType&Wt)this.reset(),this._timer=setTimeout(function(){s.state=ni,s.tryEmit()},o.time);else if(n.eventType&ut)return ni;return Ar},t.reset=function(){clearTimeout(this._timer)},t.emit=function(n){this.state===ni&&(n&&n.eventType&ut?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=d0(),this.manager.emit(this.options.event,this._input)))},e}(Ta),c5={domEvents:!1,touchAction:V3,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},oF=[[u5,{enable:!1}],[a5,{enable:!1},["rotate"]],[o5,{direction:kr}],[m0,{direction:kr},["swipe"]],[G_],[G_,{event:"doubletap",taps:2},["tap"]],[l5]],TQ=1,aF=2;function uF(r,e){var t=r.element;if(t.style){var i;ii(r.options.cssProps,function(n,s){i=ol(t.style,s),e?(r.oldCssProps[i]=t.style[i],t.style[i]=n):t.style[i]=r.oldCssProps[i]||""}),e||(r.oldCssProps={})}}function $Q(r,e){var t=document.createEvent("Event");t.initEvent(r,!0,!0),t.gesture=e,e.target.dispatchEvent(t)}var lF=function(){function r(t,i){var n=this;this.options=pn({},c5,i||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=SQ(this),this.touchAction=new J3(this,this.options.touchAction),uF(this,!0),ii(this.options.recognizers,function(s){var o=n.add(new s[0](s[1]));s[2]&&o.recognizeWith(s[2]),s[3]&&o.requireFailure(s[3])},this)}var e=r.prototype;return e.set=function(i){return pn(this.options,i),i.touchAction&&this.touchAction.update(),i.inputTarget&&(this.input.destroy(),this.input.target=i.inputTarget,this.input.init()),this},e.stop=function(i){this.session.stopped=i?aF:TQ},e.recognize=function(i){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(i);var s,o=this.recognizers,a=n.curRecognizer;(!a||a&&a.state&ni)&&(n.curRecognizer=null,a=null);for(var u=0;u\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,i,s),r.apply(this,arguments)}}var h5=d5(function(r,e,t){for(var i=Object.keys(e),n=0;n{const o=2091639*e+n*23283064365386963e-26;return e=t,t=i,i=o-(n=o|0)};return s.uint32=()=>s()*4294967296,s.fract53=()=>s()+(s()*2097152|0)*11102230246251565e-32,s.algorithm="Alea",s.seed=r,s.version="0.9",s}function NQ(){const r=FQ();let e=r(" "),t=r(" "),i=r(" ");for(let n=0;n>>0,n-=r,n*=r,r=n>>>0,n-=r,r+=n*4294967296}return(r>>>0)*23283064365386963e-26}}function kQ(){const r=()=>{};return{on:r,off:r,destroy:r,emit:r,get(){return{set:r}}}}const y0=typeof window<"u"?window.Hammer||f5:function(){return kQ()};function Mr(r){var e;this._cleanupQueue=[],this.active=!1,this._dom={container:r,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});const t=y0(this._dom.overlay);t.on("tap",z(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{t.destroy()});const i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Le(i).call(i,n=>{t.on(n,s=>{s.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=n=>{BQ(n.target,r)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=n=>{("key"in n?n.key==="Escape":n.keyCode===27)&&this.deactivate()}}S3(Mr.prototype);Mr.current=null;Mr.prototype.destroy=function(){this.deactivate();for(const t of on(r=ei(e=this._cleanupQueue).call(e,0)).call(r)){var r,e;t()}};Mr.prototype.activate=function(){Mr.current&&Mr.current.deactivate(),Mr.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)};Mr.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")};Mr.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function BQ(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}const jQ=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,LQ=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,zQ=/^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,HQ=/^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 _i(r){if(r)for(;r.hasChildNodes()===!0;){const e=r.firstChild;e&&(_i(e),r.removeChild(e))}}function us(r){return r instanceof String||typeof r=="string"}function dF(r){return typeof r=="object"&&r!==null}function yn(r,e,t,i){let n=!1;i===!0&&(n=e[t]===null&&r[t]!==void 0),n?delete r[t]:r[t]=e[t]}function v5(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(const i in r)if(e[i]!==void 0)if(e[i]===null||typeof e[i]!="object")yn(r,e,i,t);else{const n=r[i],s=e[i];dF(n)&&dF(s)&&v5(n,s,t)}}function Ys(r,e,t){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(tt(t))throw new TypeError("Arrays are not supported by deepExtend");for(let n=0;n3&&arguments[3]!==void 0?arguments[3]:!1;if(tt(t))throw new TypeError("Arrays are not supported by deepExtend");for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&!$i(r).call(r,n))if(t[n]&&t[n].constructor===Object)e[n]===void 0&&(e[n]={}),e[n].constructor===Object?Ue(e[n],t[n]):yn(e,t,n,i);else if(tt(t[n])){e[n]=[];for(let s=0;s2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)||t===!0)if(typeof e[s]=="object"&&e[s]!==null&&VM(e[s])===Object.prototype)r[s]===void 0?r[s]=Ue({},e[s],t):typeof r[s]=="object"&&r[s]!==null&&VM(r[s])===Object.prototype?Ue(r[s],e[s],t):yn(r,e,s,i);else if(tt(e[s])){var n;r[s]=qr(n=e[s]).call(n)}else yn(r,e,s,i);return r}function vu(r,e){return[...r,e]}function WQ(r){return qr(r).call(r)}function UQ(r){return r.getBoundingClientRect().left}function VQ(r){return r.getBoundingClientRect().top}function Ie(r,e){if(tt(r)){const t=r.length;for(let i=0;i3&&arguments[3]!==void 0?arguments[3]:{};const n=function(f){return f!=null},s=function(f){return f!==null&&typeof f=="object"},o=function(f){for(const v in f)if(Object.prototype.hasOwnProperty.call(f,v))return!1;return!0};if(!s(r))throw new Error("Parameter mergeTarget must be an object");if(!s(e))throw new Error("Parameter options must be an object");if(!n(t))throw new Error("Parameter option must have a value");if(!s(i))throw new Error("Parameter globalOptions must be an object");const a=function(f,v,p){s(f[p])||(f[p]={});const _=v[p],y=f[p];for(const g in _)Object.prototype.hasOwnProperty.call(_,g)&&(y[g]=_[g])},u=e[t],c=s(i)&&!o(i)?i[t]:void 0,d=c?c.enabled:void 0;if(u===void 0)return;if(typeof u=="boolean"){s(r[t])||(r[t]={}),r[t].enabled=u;return}if(u===null&&!s(r[t]))if(n(c))r[t]=an(c);else return;if(!s(u))return;let h=!0;u.enabled!==void 0?h=u.enabled:d!==void 0&&(h=c.enabled),a(r,e,t),r[t].enabled=h}const YQ={linear(r){return r},easeInQuad(r){return r*r},easeOutQuad(r){return r*(2-r)},easeInOutQuad(r){return r<.5?2*r*r:-1+(4-2*r)*r},easeInCubic(r){return r*r*r},easeOutCubic(r){return--r*r*r+1},easeInOutCubic(r){return r<.5?4*r*r*r:(r-1)*(2*r-2)*(2*r-2)+1},easeInQuart(r){return r*r*r*r},easeOutQuart(r){return 1- --r*r*r*r},easeInOutQuart(r){return r<.5?8*r*r*r*r:1-8*--r*r*r*r},easeInQuint(r){return r*r*r*r*r},easeOutQuint(r){return 1+--r*r*r*r*r},easeInOutQuint(r){return r<.5?16*r*r*r*r*r:1+16*--r*r*r*r*r}};function wi(r,e){let t;tt(e)||(e=[e]);for(const i of r)if(i){t=i[e[0]];for(let n=1;n0&&arguments[0]!==void 0?arguments[0]:1;this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(e){if(typeof e=="function")this.updateCallback=e;else throw new Error("Function attempted to set as colorPicker update callback is not a function.")}setCloseCallback(e){if(typeof e=="function")this.closeCallback=e;else throw new Error("Function attempted to set as colorPicker closing callback is not a function.")}_isColorString(e){if(typeof e=="string")return XQ[e]}setColor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e==="none")return;let i;const n=this._isColorString(e);if(n!==void 0&&(e=n),us(e)===!0){if(m5(e)===!0){const s=e.substr(4).substr(0,e.length-5).split(",");i={r:s[0],g:s[1],b:s[2],a:1}}else if(GQ(e)===!0){const s=e.substr(5).substr(0,e.length-6).split(",");i={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(g5(e)===!0){const s=b0(e);i={r:s.r,g:s.g,b:s.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){const s=e.a!==void 0?e.a:"1.0";i={r:e.r,g:e.g,b:e.b,a:s}}if(i===void 0)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+_a(e));this._setColor(i,t)}show(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}_hide(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)===!0&&(this.previousColor=at({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",ti(()=>{this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){this.previousColor!==void 0?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}_setColor(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)===!0&&(this.initialColor=at({},e)),this.color=e;const i=uo(e.r,e.g,e.b),n=2*Math.PI,s=this.r*i.s,o=this.centerCoordinates.x+s*Math.sin(n*i.h),a=this.centerCoordinates.y+s*Math.cos(n*i.h);this.colorPickerSelector.style.left=o-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=a-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(e)}_setOpacity(e){this.color.a=e/100,this._updatePicker(this.color)}_setBrightness(e){const t=uo(this.color.r,this.color.g,this.color.b);t.v=e/100;const i=Ya(t.h,t.s,t.v);i.a=this.color.a,this.color=i,this._updatePicker()}_updatePicker(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color;const t=uo(e.r,e.g,e.b),i=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);const n=this.colorPickerCanvas.clientWidth,s=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,n,s),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-t.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),wa(i).call(i),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}_setSize(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){var e,t,i,n;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){const o=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(o.webkitBackingStorePixelRatio||o.mozBackingStorePixelRatio||o.msBackingStorePixelRatio||o.oBackingStorePixelRatio||o.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{const o=document.createElement("DIV");o.style.color="red",o.style.fontWeight="bold",o.style.padding="10px",o.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(o)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch{}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch{}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);const s=this;this.opacityRange.onchange=function(){s._setOpacity(this.value)},this.opacityRange.oninput=function(){s._setOpacity(this.value)},this.brightnessRange.onchange=function(){s._setBrightness(this.value)},this.brightnessRange.oninput=function(){s._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=z(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=z(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=z(i=this._save).call(i,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=z(n=this._loadLast).call(n,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)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new y0(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",e=>{e.isFirst&&this._moveSelector(e)}),this.hammer.on("tap",e=>{this._moveSelector(e)}),this.hammer.on("panstart",e=>{this._moveSelector(e)}),this.hammer.on("panmove",e=>{this._moveSelector(e)}),this.hammer.on("panend",e=>{this._moveSelector(e)})}_generateHueCircle(){if(this.generated===!1){const 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);const t=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,i);let n,s,o,a;this.centerCoordinates={x:t*.5,y:i*.5},this.r=.49*t;const u=2*Math.PI/360,l=1/360,c=1/this.r;let d;for(o=0;o<360;o++)for(a=0;a3&&arguments[3]!==void 0?arguments[3]:1,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:()=>!1;this.parent=e,this.changedOptions=[],this.container=t,this.allowCreation=!1,this.hideOption=s,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},at(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new JQ(n),this.wrapper=void 0}setOptions(e){if(e!==void 0){this.popupHistory={},this._removePopup();let t=!0;if(typeof e=="string")this.options.filter=e;else if(tt(e))this.options.filter=e.join();else if(typeof e=="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),Kt(e)!==void 0&&(this.options.filter=Kt(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);Kt(this.options)===!1&&(t=!1),this.options.enabled=t}this._clean()}setModuleOptions(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];const e=Kt(this.options);let t=0,i=!1;for(const n in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,n)&&(this.allowCreation=!1,i=!1,typeof e=="function"?(i=e(n,[]),i=i||this._handleObject(this.configureOptions[n],[n],!0)):(e===!0||Fe(e).call(e,n)!==-1)&&(i=!0),i!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),t++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(let e=0;e1?t-1:0),n=1;n{s.appendChild(o)}),this.domElements.push(s),this.domElements.length}return 0}_makeHeader(e){const t=document.createElement("div");t.className="vis-configuration vis-config-header",t.innerText=e,this._makeItem([],t)}_makeLabel(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const n=document.createElement("div");if(n.className="vis-configuration vis-config-label vis-config-s"+t.length,i===!0){for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(J_("i","b",e))}else n.innerText=e+":";return n}_makeDropdown(e,t,i){const n=document.createElement("select");n.className="vis-configuration vis-config-select";let s=0;t!==void 0&&Fe(e).call(e,t)!==-1&&(s=Fe(e).call(e,t));for(let u=0;uo&&o!==1&&(u.max=Math.ceil(t*1.2),c=u.max,l="range increased"),u.value=t):u.value=n;const d=document.createElement("input");d.className="vis-configuration vis-config-rangeinput",d.value=u.value;const h=this;u.onchange=function(){d.value=this.value,h._update(Number(this.value),i)},u.oninput=function(){d.value=this.value};const f=this._makeLabel(i[i.length-1],i),v=this._makeItem(i,f,u,d);l!==""&&this.popupHistory[v]!==c&&(this.popupHistory[v]=c,this._setupPopup(l,v))}_makeButton(){if(this.options.showButton===!0){const e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerText="generate options",e.onclick=()=>{this._printOptions()},e.onmouseover=()=>{e.className="vis-configuration vis-config-button hover"},e.onmouseout=()=>{e.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(e)}}_setupPopup(e,t){if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:i,index:t}}}_removePopup(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(this.popupDiv.html!==void 0){const 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=ti(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=ti(()=>{this._removePopup()},1800)}}_makeCheckbox(e,t,i){const n=document.createElement("input");n.type="checkbox",n.className="vis-configuration vis-config-checkbox",n.checked=e,t!==void 0&&(n.checked=t,t!==e&&(typeof e=="object"?t!==e.enabled&&this.changedOptions.push({path:i,value:t}):this.changedOptions.push({path:i,value:t})));const s=this;n.onchange=function(){s._update(this.checked,i)};const o=this._makeLabel(i[i.length-1],i);this._makeItem(i,o,n)}_makeTextInput(e,t,i){const n=document.createElement("input");n.type="text",n.className="vis-configuration vis-config-text",n.value=t,t!==e&&this.changedOptions.push({path:i,value:t});const s=this;n.onchange=function(){s._update(this.value,i)};const o=this._makeLabel(i[i.length-1],i);this._makeItem(i,o,n)}_makeColorField(e,t,i){const n=e[1],s=document.createElement("div");t=t===void 0?n:t,t!=="none"?(s.className="vis-configuration vis-config-colorBlock",s.style.backgroundColor=t):s.className="vis-configuration vis-config-colorBlock none",t=t===void 0?n:t,s.onclick=()=>{this._showColorPicker(t,s,i)};const o=this._makeLabel(i[i.length-1],i);this._makeItem(i,o,s)}_showColorPicker(e,t,i){t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(n=>{const s="rgba("+n.r+","+n.g+","+n.b+","+n.a+")";t.style.backgroundColor=s,this._update(s,i)}),this.colorPicker.setCloseCallback(()=>{t.onclick=()=>{this._showColorPicker(e,t,i)}})}_handleObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=!1;const s=Kt(this.options);let o=!1;for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){n=!0;const u=e[a],l=vu(t,a);if(typeof s=="function"&&(n=s(a,t),n===!1&&!tt(u)&&typeof u!="string"&&typeof u!="boolean"&&u instanceof Object&&(this.allowCreation=!1,n=this._handleObject(u,l,!0),this.allowCreation=i===!1)),n!==!1){o=!0;const c=this._getValue(l);if(tt(u))this._handleArray(u,c,l);else if(typeof u=="string")this._makeTextInput(u,c,l);else if(typeof u=="boolean")this._makeCheckbox(u,c,l);else if(u instanceof Object){if(!this.hideOption(t,a,this.moduleOptions))if(u.enabled!==void 0){const d=vu(l,"enabled"),h=this._getValue(d);if(h===!0){const f=this._makeLabel(a,l,!0);this._makeItem(l,f),o=this._handleObject(u,l)||o}else this._makeCheckbox(u,h,l)}else{const d=this._makeLabel(a,l,!0);this._makeItem(l,d),o=this._handleObject(u,l)||o}}else console.error("dont know how to handle",u,a,l)}}return o}_handleArray(e,t,i){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,t,i),e[1]!==t&&this.changedOptions.push({path:i,value:t})):typeof e[0]=="string"?(this._makeDropdown(e,t,i),e[0]!==t&&this.changedOptions.push({path:i,value:t})):typeof e[0]=="number"&&(this._makeRange(e,t,i),e[0]!==t&&this.changedOptions.push({path:i,value:Number(t)}))}_update(e,t){const i=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}_constructOptions(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=i;e=e==="true"?!0:e,e=e==="false"?!1:e;for(let s=0;ss-this.padding&&(u=!0),u?o=this.x-i:o=this.x,l?a=this.y-t:a=this.y}else a=this.y-t,a+t+this.padding>n&&(a=n-t-this.padding),as&&(o=s-i-this.padding),os.distance?u=" in "+Ze.printLocation(n.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+Ze.printLocation(s.path,s.closestMatch,""):n.distance<=o?u='. Did you mean "'+n.closestMatch+'"?'+Ze.printLocation(n.path,e):u=". Did you mean one of these: "+Ze.print(et(t))+Ze.printLocation(i,e),console.error('%cUnknown option detected: "'+e+'"'+u,Q_),io=!0}static findInOptions(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,s=1e9,o="",a=[];const u=e.toLowerCase();let l;for(const d in t){let h;if(t[d].__type__!==void 0&&n===!0){const f=Ze.findInOptions(e,t[d],vu(i,d));s>f.distance&&(o=f.closestMatch,a=f.path,s=f.distance,l=f.indexMatch)}else{var c;Fe(c=d.toLowerCase()).call(c,u)!==-1&&(l=d),h=Ze.levenshteinDistance(e,d),s>h&&(o=d,a=WQ(i),s=h)}}return{closestMatch:o,path:a,distance:s,indexMatch:l}}static printLocation(e,t){let n=` - -`+(arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at: -`)+`options = { -`;for(let s=0;s":!0,"--":!0},Si="",Es=0,Se="",fe="",Vt=kt.NULL;function oZ(){Es=0,Se=Si.charAt(0)}function mt(){Es++,Se=Si.charAt(Es)}function Wn(){return Si.charAt(Es+1)}function vF(r){var e=r.charCodeAt(0);return e<47?e===35||e===46:e<59?e>47:e<91?e>64:e<96?e===95:e<123?e>96:!1}function Ai(r,e){if(r||(r={}),e)for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}function aZ(r,e,t){for(var i=e.split("."),n=r;i.length;){var s=i.shift();i.length?(n[s]||(n[s]={}),n=n[s]):n[s]=t}}function _5(r,e){for(var t,i,n=null,s=[r],o=r;o.parent;)s.push(o.parent),o=o.parent;if(o.nodes){for(t=0,i=o.nodes.length;t=0;t--){var a,u=s[t];u.nodes||(u.nodes=[]),Fe(a=u.nodes).call(a,n)===-1&&u.nodes.push(n)}e.attr&&(n.attr=Ai(n.attr,e.attr))}function uZ(r,e){if(r.edges||(r.edges=[]),r.edges.push(e),r.edge){var t=Ai({},r.edge);e.attr=Ai(t,e.attr)}}function w5(r,e,t,i,n){var s={from:e,to:t,type:i};return r.edge&&(s.attr=Ai({},r.edge)),s.attr=Ai(s.attr||{},n),n!=null&&n.hasOwnProperty("arrows")&&n.arrows!=null&&(s.arrows={to:{enabled:!0,type:n.arrows.type}},n.arrows=null),s}function Ve(){for(Vt=kt.NULL,fe="";Se===" "||Se===" "||Se===` -`||Se==="\r";)mt();do{var r=!1;if(Se==="#"){for(var e=Es-1;Si.charAt(e)===" "||Si.charAt(e)===" ";)e--;if(Si.charAt(e)===` -`||Si.charAt(e)===""){for(;Se!=""&&Se!=` -`;)mt();r=!0}}if(Se==="/"&&Wn()==="/"){for(;Se!=""&&Se!=` -`;)mt();r=!0}if(Se==="/"&&Wn()==="*"){for(;Se!="";)if(Se==="*"&&Wn()==="/"){mt(),mt();break}else mt();r=!0}for(;Se===" "||Se===" "||Se===` -`||Se==="\r";)mt()}while(r);if(Se===""){Vt=kt.DELIMITER;return}var t=Se+Wn();if(fF[t]){Vt=kt.DELIMITER,fe=t,mt(),mt();return}if(fF[Se]){Vt=kt.DELIMITER,fe=Se,mt();return}if(vF(Se)||Se==="-"){for(fe+=Se,mt();vF(Se);)fe+=Se,mt();fe==="false"?fe=!1:fe==="true"?fe=!0:isNaN(Number(fe))||(fe=Number(fe)),Vt=kt.IDENTIFIER;return}if(Se==='"'){for(mt();Se!=""&&(Se!='"'||Se==='"'&&Wn()==='"');)Se==='"'?(fe+=Se,mt()):Se==="\\"&&Wn()==="n"?(fe+=` -`,mt()):fe+=Se,mt();if(Se!='"')throw Bt('End of string " expected');mt(),Vt=kt.IDENTIFIER;return}for(Vt=kt.UNKNOWN;Se!="";)fe+=Se,mt();throw new SyntaxError('Syntax error in part "'+I5(fe,30)+'"')}function lZ(){var r={};if(oZ(),Ve(),fe==="strict"&&(r.strict=!0,Ve()),(fe==="graph"||fe==="digraph")&&(r.type=fe,Ve()),Vt===kt.IDENTIFIER&&(r.id=fe,Ve()),fe!="{")throw Bt("Angle bracket { expected");if(Ve(),E5(r),fe!="}")throw Bt("Angle bracket } expected");if(Ve(),fe!=="")throw Bt("End of file expected");return Ve(),delete r.node,delete r.edge,delete r.graph,r}function E5(r){for(;fe!==""&&fe!="}";)cZ(r),fe===";"&&Ve()}function cZ(r){var e=S5(r);if(e){O5(r,e);return}var t=dZ(r);if(!t){if(Vt!=kt.IDENTIFIER)throw Bt("Identifier expected");var i=fe;if(Ve(),fe==="="){if(Ve(),Vt!=kt.IDENTIFIER)throw Bt("Identifier expected");r[i]=fe,Ve()}else hZ(r,i)}}function S5(r){var e=null;if(fe==="subgraph"&&(e={},e.type="subgraph",Ve(),Vt===kt.IDENTIFIER&&(e.id=fe,Ve())),fe==="{"){if(Ve(),e||(e={}),e.parent=r,e.node=r.node,e.edge=r.edge,e.graph=r.graph,E5(e),fe!="}")throw Bt("Angle bracket } expected");Ve(),delete e.node,delete e.edge,delete e.graph,delete e.parent,r.subgraphs||(r.subgraphs=[]),r.subgraphs.push(e)}return e}function dZ(r){return fe==="node"?(Ve(),r.node=So(),"node"):fe==="edge"?(Ve(),r.edge=So(),"edge"):fe==="graph"?(Ve(),r.graph=So(),"graph"):null}function hZ(r,e){var t={id:e},i=So();i&&(t.attr=i),_5(r,t),O5(r,e)}function O5(r,e){for(;fe==="->"||fe==="--";){var t,i=fe;Ve();var n=S5(r);if(n)t=n;else{if(Vt!=kt.IDENTIFIER)throw Bt("Identifier or subgraph expected");t=fe,_5(r,{id:t}),Ve()}var s=So(),o=w5(r,e,t,i,s);uZ(r,o),e=t}}function So(){for(var r,e=null,t={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"},n=new Array,s=new Array;fe==="[";){for(Ve(),e={};fe!==""&&fe!="]";){if(Vt!=kt.IDENTIFIER)throw Bt("Attribute name expected");var o=fe;if(Ve(),fe!="=")throw Bt("Equal sign = expected");if(Ve(),Vt!=kt.IDENTIFIER)throw Bt("Attribute value expected");var a=fe;o==="style"&&(a=t[a]);var u;o==="arrowhead"&&(u=i[a],o="arrows",a={to:{enabled:!0,type:u}}),o==="arrowtail"&&(u=i[a],o="arrows",a={from:{enabled:!0,type:u}}),n.push({attr:e,name:o,value:a}),s.push(o),Ve(),fe==","&&Ve()}if(fe!="]")throw Bt("Bracket ] expected");Ve()}if($i(s).call(s,"dir")){var l={};for(l.arrows={},r=0;r"&&(a.arrows="to"),a};Le(n=e.edges).call(n,function(o){var a,u;if(o.from instanceof Object?a=o.from.nodes:a={id:o.from},o.to instanceof Object?u=o.to.nodes:u={id:o.to},o.from instanceof Object&&o.from.edges){var l;Le(l=o.from.edges).call(l,function(d){var h=s(d);t.edges.push(h)})}if(fZ(a,u,function(d,h){var f=w5(t,d.id,h.id,o.type,o.attr),v=s(f);t.edges.push(v)}),o.to instanceof Object&&o.to.edges){var c;Le(c=o.to.edges).call(c,function(d){var h=s(d);t.edges.push(h)})}})}return e.attr&&(t.options=e.attr),t}function pZ(r,e){var t;const i={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};e!=null&&(e.fixed!=null&&(i.nodes.fixed=e.fixed),e.parseColor!=null&&(i.nodes.parseColor=e.parseColor),e.inheritColor!=null&&(i.edges.inheritColor=e.inheritColor));const n=r.edges,s=ys(n).call(n,a=>{const u={from:a.source,id:a.id,to:a.target};return a.attributes!=null&&(u.attributes=a.attributes),a.label!=null&&(u.label=a.label),a.attributes!=null&&a.attributes.title!=null&&(u.title=a.attributes.title),a.type==="Directed"&&(u.arrows="to"),a.color&&i.edges.inheritColor===!1&&(u.color=a.color),u});return{nodes:ys(t=r.nodes).call(t,a=>{const u={id:a.id,fixed:i.nodes.fixed&&a.x!=null&&a.y!=null};return a.attributes!=null&&(u.attributes=a.attributes),a.label!=null&&(u.label=a.label),a.size!=null&&(u.size=a.size),a.attributes!=null&&a.attributes.title!=null&&(u.title=a.attributes.title),a.title!=null&&(u.title=a.title),a.x!=null&&(u.x=a.x),a.y!=null&&(u.y=a.y),a.color!=null&&(i.nodes.parseColor===!0?u.color=a.color:u.color={background:a.color,border:a.color,highlight:{background:a.color,border:a.color},hover:{background:a.color,border:a.color}}),u}),edges:s}}const gZ={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"},mZ={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"},yZ={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"},bZ={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"},_Z={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"},wZ={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ó"},EZ={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},SZ={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},OZ={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},IZ={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"},TZ={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"};var $Z=Object.freeze({__proto__:null,cn:SZ,cs:TZ,de:mZ,en:gZ,es:yZ,fr:IZ,it:bZ,nl:_Z,pt:wZ,ru:EZ,uk:OZ});function PZ(r,e){try{const[i,n]=e.split(/[-_ /]/,2),s=i!=null?i.toLowerCase():null,o=n!=null?n.toUpperCase():null;if(s&&o){const a=s+"-"+o;if(Object.prototype.hasOwnProperty.call(r,a))return a;var t;console.warn(QX(t="Unknown variant ".concat(o," of language ")).call(t,s,"."))}if(s){const a=s;if(Object.prototype.hasOwnProperty.call(r,a))return a;console.warn("Unknown language ".concat(s))}return console.warn("Unknown locale ".concat(e,", falling back to English.")),"en"}catch(i){return console.error(i),console.warn("Unexpected error while normalizing locale ".concat(e,", falling back to English.")),"en"}}class RZ{constructor(){this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}init(){if(this.initialized())return;this.src=this.image.src;const e=this.image.width,t=this.image.height;this.width=e,this.height=t;const i=Math.floor(t/2),n=Math.floor(t/4),s=Math.floor(t/8),o=Math.floor(t/16),a=Math.floor(e/2),u=Math.floor(e/4),l=Math.floor(e/8),c=Math.floor(e/16);this.canvas.width=3*u,this.canvas.height=i,this.coordinates=[[0,0,a,i],[a,0,u,n],[a,n,l,s],[5*l,n,c,o]],this._fillMipMap()}initialized(){return this.coordinates!==void 0}_fillMipMap(){const e=this.canvas.getContext("2d"),t=this.coordinates[0];e.drawImage(this.image,t[0],t[1],t[2],t[3]);for(let i=1;i2){t*=.5;let a=0;for(;t>2&&a=this.NUM_ITERATIONS&&(a=this.NUM_ITERATIONS-1);const u=this.coordinates[a];e.drawImage(this.canvas,u[0],u[1],u[2],u[3],i,n,s,o)}else e.drawImage(this.image,i,n,s,o)}}class CZ{constructor(e){this.images={},this.imageBroken={},this.callback=e}_tryloadBrokenUrl(e,t,i){if(!(e===void 0||i===void 0)){if(t===void 0){console.warn("No broken url image defined");return}i.image.onerror=()=>{console.error("Could not load brokenImage:",t)},i.image.src=t}}_redrawWithImage(e){this.callback&&this.callback(e)}load(e,t){const i=this.images[e];if(i)return i;const n=new RZ;return this.images[e]=n,n.image.onload=()=>{this._fixImageCoordinates(n.image),n.init(),this._redrawWithImage(n)},n.image.onerror=()=>{console.error("Could not load image:",e),this._tryloadBrokenUrl(e,t,n)},n.image.src=e,n}_fixImageCoordinates(e){e.width===0&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}var gF={},mF={},nb={exports:{}},sb,yF;function xZ(){if(yF)return sb;yF=1;var r=$e();return sb=r(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),sb}var ob,bF;function qZ(){if(bF)return ob;bF=1;var r=$e(),e=Ot(),t=Lr(),i=xZ(),n=Object.isExtensible,s=r(function(){});return ob=s||i?function(a){return!e(a)||i&&t(a)==="ArrayBuffer"?!1:n?n(a):!0}:n,ob}var ab,_F;function T5(){if(_F)return ab;_F=1;var r=$e();return ab=!r(function(){return Object.isExtensible(Object.preventExtensions({}))}),ab}var wF;function ll(){if(wF)return nb.exports;wF=1;var r=de(),e=Ce(),t=pa(),i=Ot(),n=Pt(),s=fr().f,o=il(),a=s0(),u=qZ(),l=Xu(),c=T5(),d=!1,h=l("meta"),f=0,v=function(m){s(m,h,{value:{objectID:"O"+f++,weakData:{}}})},p=function(m,E){if(!i(m))return typeof m=="symbol"?m:(typeof m=="string"?"S":"P")+m;if(!n(m,h)){if(!u(m))return"F";if(!E)return"E";v(m)}return m[h].objectID},_=function(m,E){if(!n(m,h)){if(!u(m))return!0;if(!E)return!1;v(m)}return m[h].weakData},y=function(m){return c&&d&&u(m)&&!n(m,h)&&v(m),m},g=function(){b.enable=function(){},d=!0;var m=o.f,E=e([].splice),O={};O[h]=1,m(O).length&&(o.f=function(I){for(var w=m(I),S=0,T=w.length;Sw;w++)if(T=D(f[w]),T&&o(h,T))return T;return new d(!1)}O=a(f,I)}for(R=g?f.next:O.next;!(x=e(R,O)).done;){try{T=D(x.value)}catch(j){l(O,"throw",j)}if(typeof T=="object"&&T&&o(h,T))return T}return new d(!1)},hb}var fb,$F;function E0(){if($F)return fb;$F=1;var r=ht(),e=TypeError;return fb=function(t,i){if(r(i,t))return t;throw new e("Incorrect invocation")},fb}var vb,PF;function S0(){if(PF)return vb;PF=1;var r=de(),e=Xe(),t=ll(),i=$e(),n=js(),s=cl(),o=E0(),a=St(),u=Ot(),l=As(),c=qn(),d=fr().f,h=Wi().forEach,f=it(),v=Dn(),p=v.set,_=v.getterFor;return vb=function(y,g,b){var m=y.indexOf("Map")!==-1,E=y.indexOf("Weak")!==-1,O=m?"set":"add",I=e[y],w=I&&I.prototype,S={},T;if(!f||!a(I)||!(E||w.forEach&&!i(function(){new I().entries().next()})))T=b.getConstructor(g,y,m,O),t.enable();else{T=g(function(C,D){p(o(C,R),{type:y,collection:new I}),l(D)||s(D,C[O],{that:C,AS_ENTRIES:m})});var R=T.prototype,x=_(y);h(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(C){var D=C==="add"||C==="set";C in w&&!(E&&C==="clear")&&n(R,C,function(j,ee){var H=x(this).collection;if(!D&&E&&!u(j))return C==="get"?void 0:!1;var Z=H[C](j===0?0:j,ee);return D?this:Z})}),E||d(R,"size",{configurable:!0,get:function(){return x(this).collection.size}})}return c(T,y,!1,!0),S[y]=T,r({global:!0,forced:!0},S),E||b.setStrong(T,y,m),T},vb}var pb,RF;function O0(){if(RF)return pb;RF=1;var r=ba();return pb=function(e,t,i){for(var n in t)i&&i.unsafe&&e[n]?e[n]=t[n]:r(e,n,t[n],i);return e},pb}var gb,CF;function MZ(){if(CF)return gb;CF=1;var r=nr(),e=o0(),t=ft(),i=it(),n=t("species");return gb=function(s){var o=r(s);i&&o&&!o[n]&&e(o,n,{configurable:!0,get:function(){return this}})},gb}var mb,xF;function P5(){if(xF)return mb;xF=1;var r=ya(),e=o0(),t=O0(),i=Qu(),n=E0(),s=As(),o=cl(),a=u0(),u=l0(),l=MZ(),c=it(),d=ll().fastKey,h=Dn(),f=h.set,v=h.getterFor;return mb={getConstructor:function(p,_,y,g){var b=p(function(w,S){n(w,m),f(w,{type:_,index:r(null),first:null,last:null,size:0}),c||(w.size=0),s(S)||o(S,w[g],{that:w,AS_ENTRIES:y})}),m=b.prototype,E=v(_),O=function(w,S,T){var R=E(w),x=I(w,S),C,D;return x?x.value=T:(R.last=x={index:D=d(S,!0),key:S,value:T,previous:C=R.last,next:null,removed:!1},R.first||(R.first=x),C&&(C.next=x),c?R.size++:w.size++,D!=="F"&&(R.index[D]=x)),w},I=function(w,S){var T=E(w),R=d(S),x;if(R!=="F")return T.index[R];for(x=T.first;x;x=x.next)if(x.key===S)return x};return t(m,{clear:function(){for(var S=this,T=E(S),R=T.first;R;)R.removed=!0,R.previous&&(R.previous=R.previous.next=null),R=R.next;T.first=T.last=null,T.index=r(null),c?T.size=0:S.size=0},delete:function(w){var S=this,T=E(S),R=I(S,w);if(R){var x=R.next,C=R.previous;delete T.index[R.index],R.removed=!0,C&&(C.next=x),x&&(x.previous=C),T.first===R&&(T.first=x),T.last===R&&(T.last=C),c?T.size--:S.size--}return!!R},forEach:function(S){for(var T=E(this),R=i(S,arguments.length>1?arguments[1]:void 0),x;x=x?x.next:T.first;)for(R(x.value,x.key,this);x&&x.removed;)x=x.previous},has:function(S){return!!I(this,S)}}),t(m,y?{get:function(S){var T=I(this,S);return T&&T.value},set:function(S,T){return O(this,S===0?0:S,T)}}:{add:function(S){return O(this,S=S===0?0:S,S)}}),c&&e(m,"size",{configurable:!0,get:function(){return E(this).size}}),b},setStrong:function(p,_,y){var g=_+" Iterator",b=v(_),m=v(g);a(p,_,function(E,O){f(this,{type:g,target:E,state:b(E),kind:O,last:null})},function(){for(var E=m(this),O=E.kind,I=E.last;I&&I.removed;)I=I.previous;return!E.target||!(E.last=I=I?I.next:E.state.first)?(E.target=null,u(void 0,!0)):u(O==="keys"?I.key:O==="values"?I.value:[I.key,I.value],!1)},y?"entries":"values",!y,!0),l(_)}},mb}var qF;function NZ(){if(qF)return mF;qF=1;var r=S0(),e=P5();return r("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),mF}var DF;function FZ(){return DF||(DF=1,NZ()),gF}var AF={},yb,MF;function R5(){return MF||(MF=1,yb=function(r,e){return e===1?function(t,i){return t[r](i)}:function(t,i,n){return t[r](i,n)}}),yb}var bb,NF;function kZ(){if(NF)return bb;NF=1;var r=nr(),e=R5(),t=r("Map");return bb={Map:t,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:t.prototype},bb}var FF;function BZ(){if(FF)return AF;FF=1;var r=de(),e=Ce(),t=hi(),i=di(),n=cl(),s=kZ(),o=ks(),a=$e(),u=s.Map,l=s.has,c=s.get,d=s.set,h=e([].push),f=o||a(function(){return u.groupBy("ab",function(v){return v}).get("a").length!==1});return r({target:"Map",stat:!0,forced:o||f},{groupBy:function(p,_){i(p),t(_);var y=new u,g=0;return n(p,function(b){var m=_(b,g++);l(y,m)?h(c(y,m),b):d(y,m,[b])}),y}}),AF}var kF={},_b,BF;function jZ(){if(BF)return _b;BF=1;var r=Ce(),e=Ls(),t=vr(),i=di(),n=r("".charAt),s=r("".charCodeAt),o=r("".slice),a=function(u){return function(l,c){var d=t(i(l)),h=e(c),f=d.length,v,p;return h<0||h>=f?u?"":void 0:(v=s(d,h),v<55296||v>56319||h+1===f||(p=s(d,h+1))<56320||p>57343?u?n(d,h):v:u?o(d,h,h+2):(v-55296<<10)+(p-56320)+65536)}};return _b={codeAt:a(!1),charAt:a(!0)},_b}var jF;function I0(){if(jF)return kF;jF=1;var r=jZ().charAt,e=vr(),t=Dn(),i=u0(),n=l0(),s="String Iterator",o=t.set,a=t.getterFor(s);return i(String,"String",function(u){o(this,{type:s,string:e(u),index:0})},function(){var l=a(this),c=l.string,d=l.index,h;return d>=c.length?n(void 0,!0):(h=r(c,d),l.index+=h.length,n(h,!1))}),kF}var wb,LF;function LZ(){if(LF)return wb;LF=1,Us(),FZ(),BZ(),I0();var r=Be();return wb=r.Map,wb}var Eb,zF;function zZ(){if(zF)return Eb;zF=1;var r=LZ();return Vs(),Eb=r,Eb}var Sb,HF;function HZ(){return HF||(HF=1,Sb=zZ()),Sb}var WZ=HZ(),T0=pe(WZ);class UZ{constructor(){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},at(this.options,this.defaultOptions)}setOptions(e){const t=["useDefaultGroups"];if(e!==void 0){for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&Fe(t).call(t,i)===-1){const n=e[i];this.add(i,n)}}}clear(){this._groups=new T0,this._groupNames=[]}get(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this._groups.get(e);if(i===void 0&&t)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){const n=this._groupIndex%this._groupNames.length;++this._groupIndex,i={},i.color=this._groups.get(this._groupNames[n]),this._groups.set(e,i)}else{const n=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,i={},i.color=this._defaultGroups[n],this._groups.set(e,i)}return i}add(e,t){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,t),t}}var WF={},UF;function VZ(){if(UF)return WF;UF=1;var r=de();return r({target:"Number",stat:!0},{isNaN:function(t){return t!==t}}),WF}var Ob,VF;function KZ(){if(VF)return Ob;VF=1,VZ();var r=Be();return Ob=r.Number.isNaN,Ob}var Ib,KF;function GZ(){if(KF)return Ib;KF=1;var r=KZ();return Ib=r,Ib}var Tb,GF;function YZ(){return GF||(GF=1,Tb=GZ()),Tb}var XZ=YZ(),Z_=pe(XZ),YF={},$b,XF;function JZ(){if(XF)return $b;XF=1;var r=Xe(),e=r.isFinite;return $b=Number.isFinite||function(i){return typeof i=="number"&&e(i)},$b}var JF;function QZ(){if(JF)return YF;JF=1;var r=de(),e=JZ();return r({target:"Number",stat:!0},{isFinite:e}),YF}var Pb,QF;function ZZ(){if(QF)return Pb;QF=1,QZ();var r=Be();return Pb=r.Number.isFinite,Pb}var Rb,ZF;function eee(){if(ZF)return Rb;ZF=1;var r=ZZ();return Rb=r,Rb}var Cb,ek;function tee(){return ek||(ek=1,Cb=eee()),Cb}var ree=tee(),tn=pe(ree),tk={},rk;function iee(){if(rk)return tk;rk=1;var r=de(),e=Wi().some,t=Ks(),i=t("some");return r({target:"Array",proto:!0,forced:!i},{some:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),tk}var xb,ik;function nee(){if(ik)return xb;ik=1,iee();var r=Rt();return xb=r("Array","some"),xb}var qb,nk;function see(){if(nk)return qb;nk=1;var r=ht(),e=nee(),t=Array.prototype;return qb=function(i){var n=i.some;return i===t||r(t,i)&&n===t.some?e:n},qb}var Db,sk;function oee(){if(sk)return Db;sk=1;var r=see();return Db=r,Db}var Ab,ok;function aee(){return ok||(ok=1,Ab=oee()),Ab}var uee=aee(),lee=pe(uee),Mb={exports:{}},ak={},uk;function cee(){if(uk)return ak;uk=1;var r=de(),e=it(),t=fr().f;return r({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),ak}var lk;function dee(){if(lk)return Mb.exports;lk=1,cee();var r=Be(),e=r.Object,t=Mb.exports=function(n,s,o){return e.defineProperty(n,s,o)};return e.defineProperty.sham&&(t.sham=!0),Mb.exports}var Nb,ck;function C5(){if(ck)return Nb;ck=1;var r=dee();return Nb=r,Nb}var Fb,dk;function hee(){if(dk)return Fb;dk=1;var r=C5();return Fb=r,Fb}var kb,hk;function fee(){if(hk)return kb;hk=1;var r=hee();return kb=r,kb}var Bb,fk;function vee(){return fk||(fk=1,Bb=fee()),Bb}var pee=vee(),gee=pe(pee),vk={},pk;function mee(){if(pk)return vk;pk=1;var r=ft(),e=fr().f,t=r("metadata"),i=Function.prototype;return i[t]===void 0&&e(i,t,{value:null}),vk}var gk={},mk;function yee(){return mk||(mk=1,q3()),gk}var yk={},bk;function bee(){return bk||(bk=1,D3()),yk}var _k={},wk;function _ee(){if(wk)return _k;wk=1;var r=Qe();return r("metadata"),_k}var jb,Ek;function wee(){if(Ek)return jb;Ek=1;var r=k3();return mee(),yee(),bee(),_ee(),jb=r,jb}var Sk={},Lb,Ok;function x5(){if(Ok)return Lb;Ok=1;var r=nr(),e=Ce(),t=r("Symbol"),i=t.keyFor,n=e(t.prototype.valueOf);return Lb=t.isRegisteredSymbol||function(o){try{return i(n(o))!==void 0}catch{return!1}},Lb}var Ik;function Eee(){if(Ik)return Sk;Ik=1;var r=de(),e=x5();return r({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),Sk}var Tk={},zb,$k;function q5(){if($k)return zb;$k=1;for(var r=Bs(),e=nr(),t=Ce(),i=va(),n=ft(),s=e("Symbol"),o=s.isWellKnownSymbol,a=e("Object","getOwnPropertyNames"),u=t(s.prototype.valueOf),l=r("wks"),c=0,d=a(s),h=d.length;ch;)v=l(u,f=c[h++]),v!==void 0&&s(d,f,v);return d}}),E2}var v1,O2;function bte(){if(O2)return v1;O2=1,yte();var r=Be();return v1=r.Object.getOwnPropertyDescriptors,v1}var p1,I2;function _te(){if(I2)return p1;I2=1;var r=bte();return p1=r,p1}var g1,T2;function wte(){return T2||(T2=1,g1=_te()),g1}var Ete=wte(),Ni=pe(Ete),m1={exports:{}},$2={},P2;function Ste(){if(P2)return $2;P2=1;var r=de(),e=it(),t=n0().f;return r({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),$2}var R2;function Ote(){if(R2)return m1.exports;R2=1,Ste();var r=Be(),e=r.Object,t=m1.exports=function(n,s){return e.defineProperties(n,s)};return e.defineProperties.sham&&(t.sham=!0),m1.exports}var y1,C2;function Ite(){if(C2)return y1;C2=1;var r=Ote();return y1=r,y1}var b1,x2;function Tte(){return x2||(x2=1,b1=Ite()),b1}var $te=Tte(),dl=pe($te),_1,q2;function Pte(){return q2||(q2=1,_1=C5()),_1}var Rte=Pte(),hl=pe(Rte);function $0(r,e){const t=["node","edge","label"];let i=!0;const n=wi(e,"chosen");if(typeof n=="boolean")i=n;else if(typeof n=="object"){if(Fe(t).call(t,r)===-1)throw new Error("choosify: subOption '"+r+"' should be one of '"+t.join("', '")+"'");const s=wi(e,["chosen",r]);(typeof s=="boolean"||typeof s=="function")&&(i=s)}return i}function ew(r,e,t){if(r.width<=0||r.height<=0)return!1;if(t!==void 0){const s={x:e.x-t.x,y:e.y-t.y};if(t.angle!==0){const o=-t.angle;e={x:Math.cos(o)*s.x-Math.sin(o)*s.y,y:Math.sin(o)*s.x+Math.cos(o)*s.y}}else e=s}const i=r.x+r.width,n=r.y+r.width;return r.lefte.x&&r.tope.y}function pu(r){return typeof r=="string"&&r!==""}function A5(r,e,t,i){let n=i.x,s=i.y;if(typeof i.distanceToBorder=="function"){const o=i.distanceToBorder(r,e),a=Math.sin(e)*o,u=Math.cos(e)*o;u===o?(n+=o,s=i.y):a===o?(n=i.x,s-=o):(n+=u,s-=a)}else i.shape.width>i.shape.height?(n=i.x+i.shape.width*.5,s=i.y-t):(n=i.x+t,s=i.y-i.shape.height*.5);return{x:n,y:s}}var w1,D2;function Cte(){if(D2)return w1;D2=1,Us();var r=Rt();return w1=r("Array","values"),w1}var E1,A2;function xte(){if(A2)return E1;A2=1;var r=Cte();return E1=r,E1}var S1,M2;function qte(){if(M2)return S1;M2=1,Vs();var r=Hs(),e=Pt(),t=ht(),i=xte(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return S1=function(o){var a=o.values;return o===n||t(n,o)&&a===n.values||e(s,r(o))?i:a},S1}var O1,N2;function Dte(){return N2||(N2=1,O1=qte()),O1}var Ate=Dte(),M5=pe(Ate);class Mte{constructor(e){this.measureText=e,this.current=0,this.width=0,this.height=0,this.lines=[]}_add(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"normal";this.lines[e]===void 0&&(this.lines[e]={width:0,height:0,blocks:[]});let n=t;(t===void 0||t==="")&&(n=" ");const s=this.measureText(n,i),o=at({},M5(s));o.text=t,o.width=s.width,o.mod=i,(t===void 0||t==="")&&(o.width=0),this.lines[e].blocks.push(o),this.lines[e].width+=o.width}curWidth(){const e=this.lines[this.current];return e===void 0?0:e.width}append(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t)}newLine(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t),this.current++}determineLineHeights(){for(let e=0;ee&&(e=n.width),t+=n.height}this.width=e,this.height=t}removeEmptyBlocks(){const e=[];for(let t=0;t"://,""://,""://,"":/<\/b>/,"":/<\/i>/,"":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/};class F2{constructor(e){this.text=e,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}mod(){return this.modStack.length===0?"normal":this.modStack[0]}modName(){if(this.modStack.length===0)return"normal";if(this.modStack[0]==="mono")return"mono";if(this.bold&&this.ital)return"boldital";if(this.bold)return"bold";if(this.ital)return"ital"}emitBlock(){this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}add(e){e===" "&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1),e!=" "&&(this.buffer+=e)}parseWS(e){return/[ \t]/.test(e)?(this.mono?this.add(e):this.spacing=!0,!0):!1}setTag(e){this.emitBlock(),this[e]=!0,this.modStack.unshift(e)}unsetTag(e){this.emitBlock(),this[e]=!1,this.modStack.shift()}parseStartTag(e,t){return!this.mono&&!this[e]&&this.match(t)?(this.setTag(e),!0):!1}match(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const[i,n]=this.prepareRegExp(e),s=i.test(this.text.substr(this.position,n));return s&&t&&(this.position+=n-1),s}parseEndTag(e,t,i){let n=this.mod()===e;return e==="mono"?n=n&&this.mono:n=n&&!this.mono,n&&this.match(t)?(i!==void 0?(this.position===this.text.length-1||this.match(i,!1))&&this.unsetTag(e):this.unsetTag(e),!0):!1}replace(e,t){return this.match(e)?(this.add(t),this.position+=length-1,!0):!1}prepareRegExp(e){let t,i;if(e instanceof RegExp)i=e,t=1;else{const n=Nte[e];n!==void 0?i=n:i=new RegExp(e),t=e.length}return[i,t]}}class Fte{constructor(e,t,i,n){this.ctx=e,this.parent=t,this.selected=i,this.hover=n;const s=(o,a)=>{if(o===void 0)return 0;const u=this.parent.getFormattingValues(e,i,n,a);let l=0;return o!==""&&(l=this.ctx.measureText(o).width),{width:l,values:u}};this.lines=new Mte(s)}process(e){if(!pu(e))return this.lines.finalize();const t=this.parent.fontOptions;e=e.replace(/\r\n/g,` -`),e=e.replace(/\r/g,` -`);const i=String(e).split(` -`),n=i.length;if(t.multi)for(let s=0;s0)for(let a=0;a0)for(let s=0;s/&/.test(n)?(t.replace(t.text,"<","<")||t.replace(t.text,"&","&")||t.add("&"),!0):!1;for(;t.position")||t.parseStartTag("ital","")||t.parseStartTag("mono","")||t.parseEndTag("bold","")||t.parseEndTag("ital","")||t.parseEndTag("mono",""))||i(n)||t.add(n),t.position++}return t.emitBlock(),t.blocks}splitMarkdownBlocks(e){const t=new F2(e);let i=!0;const n=s=>/\\/.test(s)?(t.positionthis.parent.fontOptions.maxWdt}getLongestFit(e){let t="",i=0;for(;i1&&arguments[1]!==void 0?arguments[1]:"normal",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");let n=e.split("\r");for(;n.length>0;){let s=this.getLongestFit(n);if(s===0){const o=n[0],a=this.getLongestFitWord(o);this.lines.newLine(qr(o).call(o,0,a),t),n[0]=qr(o).call(o,a)}else{let o=s;n[s-1]===" "?s--:n[o]===" "&&o++;const a=qr(n).call(n,0,s).join("");s==n.length&&i?this.lines.append(a,t):this.lines.newLine(a,t),n=qr(n).call(n,o)}}}}const no=["bold","ital","boldital","mono"];class cs{constructor(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(t),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=i}setOptions(e){if(this.elementOptions=e,this.initFontOptions(e.font),pu(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(typeof e.font=="object"){const t=e.font.size;t!==void 0&&(this.baseSize=t)}}}initFontOptions(e){if(Ie(no,t=>{this.fontOptions[t]={}}),cs.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}Ie(e,(t,i)=>{t!=null&&typeof t!="object"&&(this.fontOptions[i]=t)})}static parseFontString(e,t){if(!t||typeof t!="string")return!1;const i=t.split(" ");return e.size=+i[0].replace("px",""),e.face=i[1],e.color=i[2],!0}constrain(e){const t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},i=wi(e,"widthConstraint");if(typeof i=="number")t.maxWdt=Number(i),t.minWdt=Number(i);else if(typeof i=="object"){const s=wi(e,["widthConstraint","maximum"]);typeof s=="number"&&(t.maxWdt=Number(s));const o=wi(e,["widthConstraint","minimum"]);typeof o=="number"&&(t.minWdt=Number(o))}const n=wi(e,"heightConstraint");if(typeof n=="number")t.minHgt=Number(n);else if(typeof n=="object"){const s=wi(e,["heightConstraint","minimum"]);typeof s=="number"&&(t.minHgt=Number(s));const o=wi(e,["heightConstraint","valign"]);typeof o=="string"&&(o==="top"||o==="bottom")&&(t.valign=o)}return t}update(e,t){this.setOptions(e,!0),this.propagateFonts(t),Ue(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=$0("label",t)}adjustSizes(e){const t=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t);const i=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=i)}addFontOptionsToPile(e,t){for(let i=0;i{o!==void 0&&(Object.prototype.hasOwnProperty.call(t,a)||(Fe(no).call(no,a)!==-1?t[a]={}:t[a]=o))})}return t}getFontOption(e,t,i){let n;for(let s=0;s{s[u]=a}),s.size=Number(s.size),s.vadjust=Number(s.vadjust)}}draw(e,t,i,n,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label===void 0)return;let a=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&a=this.elementOptions.scaling.label.maxVisible&&(a=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,n,s,t,i,o),this._drawBackground(e),this._drawText(e,t,this.size.yLine,o,a))}_drawBackground(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){e.fillStyle=this.fontOptions.background;const t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}_drawText(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",s=arguments.length>4?arguments[4]:void 0;[t,i]=this._setAlignment(e,t,i,n),e.textAlign="left",t=t-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(i-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(i+=(this.size.height-this.size.labelHeight)/2));for(let o=0;o0&&(e.lineWidth=c.strokeWidth,e.strokeStyle=h,e.lineJoin="round"),e.fillStyle=d,c.strokeWidth>0&&e.strokeText(c.text,t+u,i+c.vadjust),e.fillText(c.text,t+u,i+c.vadjust),u+=c.width}i+=a.height}}}_setAlignment(e,t,i,n){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){t=0,i=0;const s=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",i-=2*s):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",i+=2*s):e.textBaseline="middle"}else e.textBaseline=n;return[t,i]}_getColor(e,t,i){let n=e||"#000000",s=i||"#ffffff";if(t<=this.elementOptions.scaling.label.drawThreshold){const o=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)));n=ar(n,o),s=ar(s,o)}return[n,s]}getTextSize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,t,i),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}getSize(){let t=this.size.left,i=this.size.top-.5*2;if(this.isEdgeLabel){const s=-this.size.width*.5;switch(this.fontOptions.align){case"middle":t=s,i=-this.size.height*.5;break;case"top":t=s,i=-(this.size.height+2);break;case"bottom":t=s,i=2;break}}return{left:t,top:i,width:this.size.width,height:this.size.height}}calculateLabelSize(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(e,t,i),this.size.left=n-this.size.width*.5,this.size.top=s-this.size.height*.5,this.size.yLine=s+(1-this.lineCount)*.5*this.fontOptions.size,o==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}getFormattingValues(e,t,i,n){const s=function(u,l,c){return l==="normal"?c==="mod"?"":u[c]:u[l][c]!==void 0?u[l][c]:u[c]},o={color:s(this.fontOptions,n,"color"),size:s(this.fontOptions,n,"size"),face:s(this.fontOptions,n,"face"),mod:s(this.fontOptions,n,"mod"),vadjust:s(this.fontOptions,n,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(t||i)&&(n==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?o.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(o,this.elementOptions.id,t,i));let a="";return o.mod!==void 0&&o.mod!==""&&(a+=o.mod+" "),a+=o.size+"px "+o.face,e.font=a.replace(/"/g,""),o.font=e.font,o.height=o.size,o}differentState(e,t){return e!==this.selectedState||t!==this.hoverState}_processLabelText(e,t,i,n){return new Fte(e,this,t,i).process(n)}_processLabel(e,t,i){if(this.labelDirty===!1&&!this.differentState(t,i))return;const n=this._processLabelText(e,t,i,this.elementOptions.label);this.fontOptions.minWdt>0&&n.width0&&n.height0&&(this.enableBorderDashes(e,t),e.stroke(),this.disableBorderDashes(e,t)),e.restore()}performFill(e,t){e.save(),e.fillStyle=t.color,this.enableShadow(e,t),wa(e).call(e),this.disableShadow(e,t),e.restore(),this.performStroke(e,t)}_addBoundingBoxMargin(e){this.boundingBox.left-=e,this.boundingBox.top-=e,this.boundingBox.bottom+=e,this.boundingBox.right+=e}_updateBoundingBox(e,t,i,n,s){i!==void 0&&this.resize(i,n,s),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}updateBoundingBox(e,t,i,n,s){this._updateBoundingBox(e,t,i,n,s)}getDimensionsFromLabel(e,t,i){this.textSize=this.labelModule.getTextSize(e,t,i);let n=this.textSize.width,s=this.textSize.height;const o=14;return n===0&&(n=o,s=o),{width:n,height:s}}}let kte=class extends Mn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,i)){const n=this.getDimensionsFromLabel(e,t,i);this.width=n.width+this.margin.right+this.margin.left,this.height=n.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this.initContextForDraw(e,o),_3(e,this.left,this.top,this.width,this.height,o.borderRadius),this.performFill(e,o),this.updateBoundingBox(t,i,e,n,s),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,s)}updateBoundingBox(e,t,i,n,s){this._updateBoundingBox(e,t,i,n,s);const o=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(o)}distanceToBorder(e,t){e&&this.resize(e);const i=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+i}};class P0 extends Mn{constructor(e,t,i){super(e,t,i),this.labelOffset=0,this.selected=!1}setOptions(e,t,i){this.options=e,t===void 0&&i===void 0||this.setImages(t,i)}setImages(e,t){t&&this.selected?(this.imageObj=t,this.imageObjAlt=e):(this.imageObj=e,this.imageObjAlt=t)}switchImages(e){const t=e&&!this.selected||!e&&this.selected;if(this.selected=e,this.imageObjAlt!==void 0&&t){const i=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=i}}_getImagePadding(){const e={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){const t=this.options.imagePadding;typeof 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}_resizeImage(){let e,t;if(this.options.shapeProperties.useImageSize===!1){let i=1,n=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?i=this.imageObj.width/this.imageObj.height:n=this.imageObj.height/this.imageObj.width),e=this.options.size*2*i,t=this.options.size*2*n}else{const 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}_drawRawCircle(e,t,i,n){this.initContextForDraw(e,n),t0(e,t,i,n.size),this.performFill(e,n)}_drawImageAtPosition(e,t){if(this.imageObj.width!=0){e.globalAlpha=t.opacity!==void 0?t.opacity:1,this.enableShadow(e,t);let i=1;this.options.shapeProperties.interpolation===!0&&(i=this.imageObj.width/this.width/this.body.view.scale);const n=this._getImagePadding(),s=this.left+n.left,o=this.top+n.top,a=this.width-n.left-n.right,u=this.height-n.top-n.bottom;this.imageObj.drawImageAtPosition(e,i,s,o,a,u),this.disableShadow(e,t)}}_drawImageLabel(e,t,i,n,s){let o=0;if(this.height!==void 0){o=this.height*.5;const u=this.labelModule.getTextSize(e,n,s);u.lineCount>=1&&(o+=u.height/2)}const a=i+o;this.options.label&&(this.labelOffset=o),this.labelModule.draw(e,t,a,n,s,"hanging")}}let Bte=class extends P0{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,i)){const n=this.getDimensionsFromLabel(e,t,i),s=Math.max(n.width+this.margin.right+this.margin.left,n.height+this.margin.top+this.margin.bottom);this.options.size=s/2,this.width=s,this.height=s,this.radius=this.width/2}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this._drawRawCircle(e,t,i,o),this.updateBoundingBox(t,i),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,i,n,s)}updateBoundingBox(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}distanceToBorder(e){return e&&this.resize(e),this.width*.5}};class jte extends P0{constructor(e,t,i,n,s){super(e,t,i),this.setImages(n,s)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=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){const s=this.options.size*2;this.width=s,this.height=s,this.radius=.5*this.width;return}this.needsRefresh(t,i)&&this._resizeImage()}draw(e,t,i,n,s,o){this.switchImages(n),this.resize();let a=t,u=i;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=t,this.top=i,a+=this.width/2,u+=this.height/2):(this.left=t-this.width/2,this.top=i-this.height/2),this._drawRawCircle(e,a,u,o),e.save(),e.clip(),this._drawImageAtPosition(e,o),e.restore(),this._drawImageLabel(e,a,u,n,s),this.updateBoundingBox(t,i)}updateBoundingBox(e,t){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=t,this.boundingBox.left=e,this.boundingBox.right=e+this.options.size*2,this.boundingBox.bottom=t+this.options.size*2):(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)}distanceToBorder(e){return e&&this.resize(e),this.width*.5}}class Vi extends Mn{constructor(e,t,i){super(e,t,i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(t,i)){var s,o;this.labelModule.getTextSize(e,t,i);const a=2*n.size;this.width=(s=this.customSizeWidth)!==null&&s!==void 0?s:a,this.height=(o=this.customSizeHeight)!==null&&o!==void 0?o:a,this.radius=.5*this.width}}_drawShape(e,t,i,n,s,o,a,u){return this.resize(e,o,a,u),this.left=n-this.width/2,this.top=s-this.height/2,this.initContextForDraw(e,u),r7(t)(e,n,s,u.size),this.performFill(e,u),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(e.font=(o?"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,n,s)),{drawExternalLabel:()=>{if(this.options.label!==void 0){this.labelModule.calculateLabelSize(e,o,a,n,s,"hanging");const l=s+.5*this.height+.5*this.labelModule.size.height;this.labelModule.draw(e,n,l,o,a,"hanging")}this.updateBoundingBox(n,s)}}}updateBoundingBox(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))}}function k2(r,e){var t=et(r);if(Mi){var i=Mi(r);e&&(i=Kt(i).call(i,function(n){return Ui(r,n).enumerable})),t.push.apply(t,i)}return t}function Lte(r){for(var e=1;e{e.save(),u(),e.restore()}}return a.nodeDimensions&&(this.customSizeWidth=a.nodeDimensions.width,this.customSizeHeight=a.nodeDimensions.height),a}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Hte extends Mn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e,t,i){if(this.needsRefresh(t,i)){const s=this.getDimensionsFromLabel(e,t,i).width+this.margin.right+this.margin.left;this.width=s,this.height=s,this.radius=this.width/2}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this.initContextForDraw(e,o),w3(e,t-this.width/2,i-this.height/2,this.width,this.height),this.performFill(e,o),this.updateBoundingBox(t,i,e,n,s),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let Wte=class extends Vi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"diamond",4,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class Ute extends Vi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"circle",2,t,i,n,s,o)}distanceToBorder(e){return e&&this.resize(e),this.options.size}}class B2 extends Mn{constructor(e,t,i){super(e,t,i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,i)){const n=this.getDimensionsFromLabel(e,t,i);this.height=n.height*2,this.width=n.width+n.height,this.radius=.5*this.width}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width*.5,this.top=i-this.height*.5,this.initContextForDraw(e,o),W_(e,this.left,this.top,this.width,this.height),this.performFill(e,o),this.updateBoundingBox(t,i,e,n,s),this.labelModule.draw(e,t,i,n,s)}distanceToBorder(e,t){e&&this.resize(e);const i=this.width*.5,n=this.height*.5,s=Math.sin(t)*i,o=Math.cos(t)*n;return i*n/Math.sqrt(s*s+o*o)}}class Vte extends Mn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e,t,i){this.needsRefresh(t,i)&&(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)}draw(e,t,i,n,s,o){return this.resize(e,n,s),this.options.icon.size=this.options.icon.size||50,this.left=t-this.width/2,this.top=i-this.height/2,this._icon(e,t,i,n,s,o),{drawExternalLabel:()=>{this.options.label!==void 0&&this.labelModule.draw(e,this.left+this.iconSize.width/2+this.margin.left,i+this.height/2+5,n),this.updateBoundingBox(t,i)}}}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.icon.size*.5,this.boundingBox.left=e-this.options.icon.size*.5,this.boundingBox.right=e+this.options.icon.size*.5,this.boundingBox.bottom=t+this.options.icon.size*.5,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))}_icon(e,t,i,n,s,o){const a=Number(this.options.icon.size);this.options.icon.code!==void 0?(e.font=[this.options.icon.weight!=null?this.options.icon.weight:n?"bold":"",(this.options.icon.weight!=null&&n?5:0)+a+"px",this.options.icon.face].join(" "),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",this.enableShadow(e,o),e.fillText(this.options.icon.code,t,i),this.disableShadow(e,o)):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.")}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let Kte=class extends P0{constructor(e,t,i,n,s){super(e,t,i),this.setImages(n,s)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=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){const s=this.options.size*2;this.width=s,this.height=s;return}this.needsRefresh(t,i)&&this._resizeImage()}draw(e,t,i,n,s,o){e.save(),this.switchImages(n),this.resize();let a=t,u=i;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=t,this.top=i,a+=this.width/2,u+=this.height/2):(this.left=t-this.width/2,this.top=i-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){const l=this.options.borderWidth,c=this.options.borderWidthSelected||2*this.options.borderWidth,d=(n?c:l)/this.body.view.scale;e.lineWidth=Math.min(this.width,d),e.beginPath();let h=n?this.options.color.highlight.border:s?this.options.color.hover.border:this.options.color.border,f=n?this.options.color.highlight.background:s?this.options.color.hover.background:this.options.color.background;o.opacity!==void 0&&(h=ar(h,o.opacity),f=ar(f,o.opacity)),e.strokeStyle=h,e.fillStyle=f,e.rect(this.left-.5*e.lineWidth,this.top-.5*e.lineWidth,this.width+e.lineWidth,this.height+e.lineWidth),wa(e).call(e),this.performStroke(e,o),e.closePath()}this._drawImageAtPosition(e,o),this._drawImageLabel(e,a,u,n,s),this.updateBoundingBox(t,i),e.restore()}updateBoundingBox(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))}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class Gte extends Vi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"square",2,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Yte extends Vi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"hexagon",4,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Xte extends Vi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"star",4,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Jte extends Mn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e,t,i){this.needsRefresh(t,i)&&(this.textSize=this.labelModule.getTextSize(e,t,i),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)}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this.enableShadow(e,o),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,s),this.disableShadow(e,o),this.updateBoundingBox(t,i,e,n,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let Qte=class extends Vi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"triangle",3,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class Zte extends Vi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"triangleDown",3,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}function j2(r,e){var t=et(r);if(Mi){var i=Mi(r);e&&(i=Kt(i).call(i,function(n){return Ui(r,n).enumerable})),t.push.apply(t,i)}return t}function L2(r){for(var e=1;et[l]!=null);u.push("font"),fu(u,e,a),e.color=Y_(e.color)}static parseOptions(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=arguments.length>4?arguments[4]:void 0;if(fu(["color","fixed","shadow"],e,t,i),Ke.checkMass(t),e.opacity!==void 0&&(Ke.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),t.opacity!==void 0&&(Ke.checkOpacity(t.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+t.opacity),t.opacity=void 0)),t.shapeProperties&&!Ke.checkCoordinateOrigin(t.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+t.shapeProperties.coordinateOrigin),or(e,t,"shadow",n),t.color!==void 0&&t.color!==null){const a=Y_(t.color);v5(e.color,a)}else i===!0&&t.color===null&&(e.color=Ri(n.color));t.fixed!==void 0&&t.fixed!==null&&(typeof t.fixed=="boolean"?(e.fixed.x=t.fixed,e.fixed.y=t.fixed):(t.fixed.x!==void 0&&typeof t.fixed.x=="boolean"&&(e.fixed.x=t.fixed.x),t.fixed.y!==void 0&&typeof t.fixed.y=="boolean"&&(e.fixed.y=t.fixed.y))),i===!0&&t.font===null&&(e.font=Ri(n.font)),Ke.updateGroupOptions(e,t,s),t.scaling!==void 0&&or(e.scaling,t.scaling,"label",n.scaling)}getFormattingValues(){const e={color:this.options.color.background,opacity:this.options.opacity,borderWidth:this.options.borderWidth,borderColor:this.options.color.border,size:this.options.size,borderDashes:this.options.shapeProperties.borderDashes,borderRadius:this.options.shapeProperties.borderRadius,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y};if(this.selected||this.hover?this.chooser===!0?this.selected?(this.options.borderWidthSelected!=null?e.borderWidth=this.options.borderWidthSelected:e.borderWidth*=2,e.color=this.options.color.highlight.background,e.borderColor=this.options.color.highlight.border,e.shadow=this.options.shadow.enabled):this.hover&&(e.color=this.options.color.hover.background,e.borderColor=this.options.color.hover.border,e.shadow=this.options.shadow.enabled):typeof this.chooser=="function"&&(this.chooser(e,this.options.id,this.selected,this.hover),e.shadow===!1&&(e.shadowColor!==this.options.shadow.color||e.shadowSize!==this.options.shadow.size||e.shadowX!==this.options.shadow.x||e.shadowY!==this.options.shadow.y)&&(e.shadow=!0)):e.shadow=this.options.shadow.enabled,this.options.opacity!==void 0){const t=this.options.opacity;e.borderColor=ar(e.borderColor,t),e.color=ar(e.color,t),e.shadowColor=ar(e.shadowColor,t)}return e}updateLabelModule(e){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),Ke.updateGroupOptions(this.options,L2(L2({},e),{},{color:e&&e.color||this._localColor||void 0}),this.grouplist);const t=this.grouplist.get(this.options.group,!1),i=[e,this.options,t,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,i),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateShape(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 kte(this.options,this.body,this.labelModule);break;case"circle":this.shape=new Bte(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new jte(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new zte(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new Hte(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new Wte(this.options,this.body,this.labelModule);break;case"dot":this.shape=new Ute(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new B2(this.options,this.body,this.labelModule);break;case"icon":this.shape=new Vte(this.options,this.body,this.labelModule);break;case"image":this.shape=new Kte(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new Gte(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new Yte(this.options,this.body,this.labelModule);break;case"star":this.shape=new Xte(this.options,this.body,this.labelModule);break;case"text":this.shape=new Jte(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new Qte(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new Zte(this.options,this.body,this.labelModule);break;default:this.shape=new B2(this.options,this.body,this.labelModule);break}this.needsRefresh()}select(){this.selected=!0,this.needsRefresh()}unselect(){this.selected=!1,this.needsRefresh()}needsRefresh(){this.shape.refreshNeeded=!0}getTitle(){return this.options.title}distanceToBorder(e,t){return this.shape.distanceToBorder(e,t)}isFixed(){return this.options.fixed.x&&this.options.fixed.y}isSelected(){return this.selected}getValue(){return this.options.value}getLabelSize(){return this.labelModule.size()}setValueRange(e,t,i){if(this.options.value!==void 0){const n=this.options.scaling.customScalingFunction(e,t,i,this.options.value),s=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const o=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+n*o}this.options.size=this.options.scaling.min+n*s}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}draw(e){const t=this.getFormattingValues();return this.shape.draw(e,this.x,this.y,this.selected,this.hover,t)||{}}updateBoundingBox(e){this.shape.updateBoundingBox(this.x,this.y,e)}resize(e){const t=this.getFormattingValues();this.shape.resize(e,this.selected,this.hover,t)}getItemsOnPoint(e){const t=[];return this.labelModule.visible()&&ew(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),ew(this.shape.boundingBox,e)&&t.push({nodeId:this.id}),t}isOverlappingWith(e){return this.shape.lefte.left&&this.shape.tope.top}isBoundingBoxOverlappingWith(e){return this.shape.boundingBox.lefte.left&&this.shape.boundingBox.tope.top}static checkMass(e,t){if(e.mass!==void 0&&e.mass<=0){let i="";t!==void 0&&(i=" in node id: "+t),console.error("%cNegative or zero mass disallowed"+i+", setting mass to 1.",y5),e.mass=1}}}class ere{constructor(e,t,i,n){var s;if(this.body=e,this.images=t,this.groups=i,this.layoutEngine=n,this.body.functions.createNode=z(s=this.create).call(s,this),this.nodesListeners={add:(o,a)=>{this.add(a.items)},update:(o,a)=>{this.update(a.items,a.data,a.oldData)},remove:(o,a)=>{this.remove(a.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(o,a,u,l){if(a===o)return .5;{const c=1/(a-o);return Math.max(0,(l-o)*c)}}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1,coordinateOrigin:"center"},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=Ri(this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e,t;this.body.emitter.on("refreshNodes",z(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",z(t=this.refresh).call(t,this)),this.body.emitter.on("destroy",()=>{Ie(this.nodesListeners,(i,n)=>{this.body.data.nodes&&this.body.data.nodes.off(n,i)}),delete this.body.functions.createNode,delete this.nodesListeners.add,delete this.nodesListeners.update,delete this.nodesListeners.remove,delete this.nodesListeners})}setOptions(e){if(e!==void 0){if(Ke.parseOptions(this.options,e),e.opacity!==void 0&&(Z_(e.opacity)||!tn(e.opacity)||e.opacity<0||e.opacity>1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity):this.options.opacity=e.opacity),e.shape!==void 0)for(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(const t of et(this.body.nodes))this.body.nodes[t].updateLabelModule(),this.body.nodes[t].needsRefresh();if(e.size!==void 0)for(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].needsRefresh();(e.hidden!==void 0||e.physics!==void 0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.data.nodes;if(h3("id",e))this.body.data.nodes=e;else if(tt(e))this.body.data.nodes=new uu,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new uu;else throw new TypeError("Array or DataSet expected");if(i&&Ie(this.nodesListeners,function(n,s){i.off(s,n)}),this.body.nodes={},this.body.data.nodes){const n=this;Ie(this.nodesListeners,function(o,a){n.body.data.nodes.on(a,o)});const s=this.body.data.nodes.getIds();this.add(s,!0)}t===!1&&this.body.emitter.emit("_dataChanged")}add(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i;const n=[];for(let s=0;s1&&arguments[1]!==void 0?arguments[1]:Ke;return new t(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}refresh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ie(this.body.nodes,(t,i)=>{const n=this.body.data.nodes.get(i);n!==void 0&&(e===!0&&t.setOptions({x:null,y:null}),t.setOptions({fixed:!1}),t.setOptions(n))})}getPositions(e){const t={};if(e!==void 0){if(tt(e)===!0){for(let i=0;i{this.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}}var z2={},H2;function tre(){if(H2)return z2;H2=1;var r=de(),e=Math.hypot,t=Math.abs,i=Math.sqrt,n=!!e&&e(1/0,NaN)!==1/0;return r({target:"Math",stat:!0,arity:2,forced:n},{hypot:function(o,a){for(var u=0,l=0,c=arguments.length,d=0,h,f;l0?(f=h/d,u+=f*f):u+=h;return d===1/0?1/0:d*i(u)}}),z2}var I1,W2;function rre(){if(W2)return I1;W2=1,tre();var r=Be();return I1=r.Math.hypot,I1}var T1,U2;function ire(){if(U2)return T1;U2=1;var r=rre();return T1=r,T1}var $1,V2;function nre(){return V2||(V2=1,$1=ire()),$1}var sre=nre(),ore=pe(sre);class rt{static transform(e,t){tt(e)||(e=[e]);const i=t.point.x,n=t.point.y,s=t.angle,o=t.length;for(let a=0;a4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,t),e.lineWidth=t.width,t.dashes!==!1?this._drawDashedLine(e,t,s):this._drawLine(e,t,s)}_drawLine(e,t,i,n,s){if(this.from!=this.to)this._line(e,t,i,n,s);else{const[o,a,u]=this._getCircleData(e);this._circle(e,t,o,a,u)}}_drawDashedLine(e,t,i,n,s){e.lineCap="round";const o=tt(t.dashes)?t.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(o),e.lineDashOffset=0,this.from!=this.to)this._line(e,t,i);else{const[a,u,l]=this._getCircleData(e);this._circle(e,t,a,u,l)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)E3(e,this.from.x,this.from.y,this.to.x,this.to.y,o);else{const[a,u,l]=this._getCircleData(e);this._circle(e,t,a,u,l)}this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}}findBorderPosition(e,t,i){return this.from!=this.to?this._findBorderPosition(e,t,i):this._findBorderPositionCircle(e,t,i)}findBorderPositions(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};{var t;const[i,n]=qr(t=this._getCircleData(e)).call(t,0,2);return{from:this._findBorderPositionCircle(this.from,e,{x:i,y:n,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:i,y:n,low:.6,high:.8,direction:1})}}}_getCircleData(e){const t=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);const i=A5(e,this.options.selfReference.angle,t,this.from);return[i.x,i.y,t]}_pointOnCircle(e,t,i,n){const s=n*2*Math.PI;return{x:e+i*Math.cos(s),y:t-i*Math.sin(s)}}_findBorderPositionCircle(e,t,i){const n=i.x,s=i.y;let o=i.low,a=i.high;const u=i.direction,l=10,c=this.options.selfReference.size,d=.05;let h,f=(o+a)*.5,v=0;this.options.arrowStrikethrough===!0&&(u===-1?v=this.options.endPointOffset.from:u===1&&(v=this.options.endPointOffset.to));let p=0;do{f=(o+a)*.5,h=this._pointOnCircle(n,s,c,f);const _=Math.atan2(e.y-h.y,e.x-h.x),y=e.distanceToBorder(t,_)+v,g=Math.sqrt(Math.pow(h.x-e.x,2)+Math.pow(h.y-e.y,2)),b=y-g;if(Math.abs(b)0?u>0?o=f:a=f:u>0?a=f:o=f,++p}while(o<=a&&p1?c=1:c<0&&(c=0);const d=e+c*a,h=t+c*u,f=d-s,v=h-o;return Math.sqrt(f*f+v*v)}getArrowData(e,t,i,n,s,o){let a,u,l,c,d,h,f;const v=o.width;t==="from"?(l=this.from,c=this.to,d=o.fromArrowScale<0,h=Math.abs(o.fromArrowScale),f=o.fromArrowType):t==="to"?(l=this.to,c=this.from,d=o.toArrowScale<0,h=Math.abs(o.toArrowScale),f=o.toArrowType):(l=this.to,c=this.from,d=o.middleArrowScale<0,h=Math.abs(o.middleArrowScale),f=o.middleArrowType);const p=15*h+3*v;if(l!=c){const b=ore(l.x-c.x,l.y-c.y),m=p/b;if(t!=="middle")if(this.options.smooth.enabled===!0){const E=this._findBorderPosition(l,e,{via:i}),O=this.getPoint(E.t+m*(t==="from"?1:-1),i);a=Math.atan2(E.y-O.y,E.x-O.x),u=E}else a=Math.atan2(l.y-c.y,l.x-c.x),u=this._findBorderPosition(l,e);else{const E=(d?-m:m)/2,O=this.getPoint(.5+E,i),I=this.getPoint(.5-E,i);a=Math.atan2(O.y-I.y,O.x-I.x),u=this.getPoint(.5,i)}}else{const[b,m,E]=this._getCircleData(e);if(t==="from"){const O=this.options.selfReference.angle,I=this.options.selfReference.angle+Math.PI,w=this._findBorderPositionCircle(this.from,e,{x:b,y:m,low:O,high:I,direction:-1});a=w.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,u=w}else if(t==="to"){const O=this.options.selfReference.angle,I=this.options.selfReference.angle+Math.PI,w=this._findBorderPositionCircle(this.from,e,{x:b,y:m,low:O,high:I,direction:1});a=w.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,u=w}else{const O=this.options.selfReference.angle/(2*Math.PI);u=this._pointOnCircle(b,m,E,O),a=O*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}const _=u.x-p*.9*Math.cos(a),y=u.y-p*.9*Math.sin(a);return{point:u,core:{x:_,y},angle:a,length:p,type:f}}drawArrowHead(e,t,i,n,s){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width,N5.draw(e,s)&&(this.enableShadow(e,t),wa(e).call(e),this.disableShadow(e,t))}enableShadow(e,t){t.shadow===!0&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}disableShadow(e,t){t.shadow===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}drawBackground(e,t){if(t.background!==!1){const i={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=t.backgroundColor,e.lineWidth=t.backgroundSize,this.setStrokeDashed(e,t.backgroundDashes),e.stroke(),e.strokeStyle=i.strokeStyle,e.lineWidth=i.lineWidth,e.dashes=i.dashes,this.setStrokeDashed(e,t.dashes)}}setStrokeDashed(e,t){if(t!==!1)if(e.setLineDash!==void 0){const i=tt(t)?t:[5,5];e.setLineDash(i)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else e.setLineDash!==void 0?e.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}function Y2(r,e){var t=et(r);if(Mi){var i=Mi(r);e&&(i=Kt(i).call(i,function(n){return Ui(r,n).enumerable})),t.push.apply(t,i)}return t}function X2(r){for(var e=1;e2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates();const n=10,s=.2;let o=!1,a=1,u=0,l=this.to,c,d,h=this.options.endPointOffset?this.options.endPointOffset.to:0;e.id===this.from.id&&(l=this.from,o=!0,h=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(h=0);let f=0;do{d=(u+a)*.5,c=this.getPoint(d,i);const v=Math.atan2(l.y-c.y,l.x-c.x),p=l.distanceToBorder(t,v)+h,_=Math.sqrt(Math.pow(c.x-l.x,2)+Math.pow(c.y-l.y,2)),y=p-_;if(Math.abs(y)0&&(l=this._getDistanceToLine(v,p,h,f,s,o),u=l{this.positionBezierNode()},this._body.emitter.on("_repositionBezierNodes",this._boundFunction)}setOptions(e){super.setOptions(e);let 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(),t===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}connect(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}cleanup(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),this.via!==void 0?(delete this._body.nodes[this.via.id],this.via=void 0,!0):!1}setupSupportNode(){if(this.via===void 0){const 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()}}positionBezierNode(){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)}_line(e,t,i){this._bezierCurve(e,t,i)}_getViaCoordinates(){return this.via}getViaNode(){return this.via}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){const[i,n,s]=this._getCircleData(),o=2*Math.PI*(1-e);return{x:i+s*Math.sin(o),y:n+s-s*(1-Math.cos(o))}}else return{x:Math.pow(1-e,2)*this.fromPoint.x+2*e*(1-e)*t.x+Math.pow(e,2)*this.toPoint.x,y:Math.pow(1-e,2)*this.fromPoint.y+2*e*(1-e)*t.y+Math.pow(e,2)*this.toPoint.y}}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t,this.via)}_getDistanceToEdge(e,t,i,n,s,o){return this._getDistanceToBezierEdge(e,t,i,n,s,o,this.via)}}class Q2 extends R0{constructor(e,t,i){super(e,t,i)}_line(e,t,i){this._bezierCurve(e,t,i)}getViaNode(){return this._getViaCoordinates()}_getViaCoordinates(){const e=this.options.smooth.roundness,t=this.options.smooth.type;let i=Math.abs(this.from.x-this.to.x),n=Math.abs(this.from.y-this.to.y);if(t==="discrete"||t==="diagonalCross"){let s,o;i<=n?s=o=e*n:s=o=e*i,this.from.x>this.to.x&&(s=-s),this.from.y>=this.to.y&&(o=-o);let a=this.from.x+s,u=this.from.y+o;return t==="discrete"&&(i<=n?a=ithis.to.x&&(s=-s),this.from.y>=this.to.y&&(o=-o);let a=this.from.x+s,u=this.from.y+o;return i<=n?this.from.x<=this.to.x?a=this.to.xa?this.to.x:a:this.from.y>=this.to.y?u=this.to.y>u?this.to.y:u:u=this.to.y2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(e,t,i.via)}_getDistanceToEdge(e,t,i,n,s,o){let a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(e,t,i,n,s,o,a)}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const i=e,n=Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*t.x+Math.pow(i,2)*this.toPoint.x,s=Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*t.y+Math.pow(i,2)*this.toPoint.y;return{x:n,y:s}}}class bre extends R0{constructor(e,t,i){super(e,t,i)}_getDistanceToBezierEdge2(e,t,i,n,s,o,a,u){let l=1e9,c=e,d=t;const h=[0,0,0,0];for(let f=1;f<10;f++){const v=.1*f;h[0]=Math.pow(1-v,3),h[1]=3*v*Math.pow(1-v,2),h[2]=3*Math.pow(v,2)*(1-v),h[3]=Math.pow(v,3);const p=h[0]*e+h[1]*a.x+h[2]*u.x+h[3]*i,_=h[0]*t+h[1]*a.y+h[2]*u.y+h[3]*n;if(f>0){const y=this._getDistanceToLine(c,d,p,_,s,o);l=yMath.abs(t)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(n=this.from.y,o=this.to.y,i=this.from.x-a*e,s=this.to.x+a*e):(n=this.from.y-a*t,o=this.to.y+a*t,i=this.from.x,s=this.to.x),[{x:i,y:n},{x:s,y:o}]}getViaNode(){return this._getViaCoordinates()}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t)}_getDistanceToEdge(e,t,i,n,s,o){let[a,u]=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge2(e,t,i,n,s,o,a,u)}getPoint(e){let[t,i]=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const n=e,s=[Math.pow(1-n,3),3*n*Math.pow(1-n,2),3*Math.pow(n,2)*(1-n),Math.pow(n,3)],o=s[0]*this.fromPoint.x+s[1]*t.x+s[2]*i.x+s[3]*this.toPoint.x,a=s[0]*this.fromPoint.y+s[1]*t.y+s[2]*i.y+s[3]*this.toPoint.y;return{x:o,y:a}}}class eB extends F5{constructor(e,t,i){super(e,t,i)}_line(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)}getViaNode(){}getPoint(e){return{x:(1-e)*this.fromPoint.x+e*this.toPoint.x,y:(1-e)*this.fromPoint.y+e*this.toPoint.y}}_findBorderPosition(e,t){let i=this.to,n=this.from;e.id===this.from.id&&(i=this.from,n=this.to);const s=Math.atan2(i.y-n.y,i.x-n.x),o=i.x-n.x,a=i.y-n.y,u=Math.sqrt(o*o+a*a),l=e.distanceToBorder(t,s),c=(u-l)/u;return{x:(1-c)*n.x+c*i.x,y:(1-c)*n.y+c*i.y,t:0}}_getDistanceToEdge(e,t,i,n,s,o){return this._getDistanceToLine(e,t,i,n,s,o)}}class Ci{constructor(e,t,i,n,s){if(t===void 0)throw new Error("No body provided");this.options=Ri(n),this.globalOptions=n,this.defaultOptions=s,this.body=t,this.imagelist=i,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 cs(this.body,this.options,!0),this.setOptions(e)}setOptions(e){if(!e)return;let t=typeof e.physics<"u"&&this.options.physics!==e.physics||typeof e.hidden<"u"&&(this.options.hidden||!1)!==(e.hidden||!1)||typeof e.from<"u"&&this.options.from!==e.from||typeof e.to<"u"&&this.options.to!==e.to;Ci.parseOptions(this.options,e,!0,this.globalOptions),e.id!==void 0&&(this.id=e.id),e.from!==void 0&&(this.fromId=e.from),e.to!==void 0&&(this.toId=e.to),e.title!==void 0&&(this.title=e.title),e.value!==void 0&&(e.value=D5(e.value));const i=[e,this.options,this.defaultOptions];return this.chooser=$0("edge",i),this.updateLabelModule(e),t=this.updateEdgeType()||t,this._setInteractionWidths(),this.connect(),t}static parseOptions(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Ys(["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"],e,t,i),t.endPointOffset!==void 0&&t.endPointOffset.from!==void 0&&(tn(t.endPointOffset.from)?e.endPointOffset.from=t.endPointOffset.from:(e.endPointOffset.from=n.endPointOffset.from!==void 0?n.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),t.endPointOffset!==void 0&&t.endPointOffset.to!==void 0&&(tn(t.endPointOffset.to)?e.endPointOffset.to=t.endPointOffset.to:(e.endPointOffset.to=n.endPointOffset.to!==void 0?n.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),pu(t.label)?e.label=t.label:pu(e.label)||(e.label=void 0),or(e,t,"smooth",n),or(e,t,"shadow",n),or(e,t,"background",n),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:i===!0&&t.dashes===null&&(e.dashes=an(n.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),or(e.scaling,t.scaling,"label",n.scaling)):i===!0&&t.scaling===null&&(e.scaling=an(n.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows=="string"){const a=t.arrows.toLowerCase();e.arrows.to.enabled=Fe(a).call(a,"to")!=-1,e.arrows.middle.enabled=Fe(a).call(a,"middle")!=-1,e.arrows.from.enabled=Fe(a).call(a,"from")!=-1}else if(typeof t.arrows=="object")or(e.arrows,t.arrows,"to",n.arrows),or(e.arrows,t.arrows,"middle",n.arrows),or(e.arrows,t.arrows,"from",n.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+_a(t.arrows));else i===!0&&t.arrows===null&&(e.arrows=an(n.arrows));if(t.color!==void 0&&t.color!==null){const a=us(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,u=e.color;if(s)Ue(u,n.color,!1,i);else for(const l in u)Object.prototype.hasOwnProperty.call(u,l)&&delete u[l];if(us(u))u.color=u,u.highlight=u,u.hover=u,u.inherit=!1,a.opacity===void 0&&(u.opacity=1);else{let l=!1;a.color!==void 0&&(u.color=a.color,l=!0),a.highlight!==void 0&&(u.highlight=a.highlight,l=!0),a.hover!==void 0&&(u.hover=a.hover,l=!0),a.inherit!==void 0&&(u.inherit=a.inherit),a.opacity!==void 0&&(u.opacity=Math.min(1,Math.max(0,a.opacity))),l===!0?u.inherit=!1:u.inherit===void 0&&(u.inherit="from")}}else i===!0&&t.color===null&&(e.color=Ri(n.color));i===!0&&t.font===null&&(e.font=Ri(n.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)}getFormattingValues(){const e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,t=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,i=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,n=this.options.color.inherit,s={toArrow:e,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:i,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:t,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:n?void 0:this.options.color.color,inheritsColor:n,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(this.chooser===!0){if(this.selected){const o=this.options.selectionWidth;typeof o=="function"?s.width=o(s.width):typeof o=="number"&&(s.width+=o),s.width=Math.max(s.width,.3/this.body.view.scale),s.color=this.options.color.highlight,s.shadow=this.options.shadow.enabled}else if(this.hover){const o=this.options.hoverWidth;typeof o=="function"?s.width=o(s.width):typeof o=="number"&&(s.width+=o),s.width=Math.max(s.width,.3/this.body.view.scale),s.color=this.options.color.hover,s.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(s,this.options.id,this.selected,this.hover),s.color!==void 0&&(s.inheritsColor=!1),s.shadow===!1&&(s.shadowColor!==this.options.shadow.color||s.shadowSize!==this.options.shadow.size||s.shadowX!==this.options.shadow.x||s.shadowY!==this.options.shadow.y)&&(s.shadow=!0));else s.shadow=this.options.shadow.enabled,s.width=Math.max(s.width,.3/this.body.view.scale);return s}updateLabelModule(e){const t=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,t),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateEdgeType(){const e=this.options.smooth;let t=!1,i=!0;return this.edgeType!==void 0&&((this.edgeType instanceof J2&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof Z2&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof Q2&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof eB&&e.type.enabled===!1)&&(i=!1),i===!0&&(t=this.cleanup())),i===!0?e.enabled===!0?e.type==="dynamic"?(t=!0,this.edgeType=new J2(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new Z2(this.options,this.body,this.labelModule):this.edgeType=new Q2(this.options,this.body,this.labelModule):this.edgeType=new eB(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),t}connect(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=this.from!==void 0&&this.to!==void 0,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}disconnect(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}getTitle(){return this.title}isSelected(){return this.selected}getValue(){return this.options.value}setValueRange(e,t,i){if(this.options.value!==void 0){const n=this.options.scaling.customScalingFunction(e,t,i,this.options.value),s=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const o=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+n*o}this.options.width=this.options.scaling.min+n*s}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}_setInteractionWidths(){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}draw(e){const t=this.getFormattingValues();if(t.hidden)return;const i=this.edgeType.getViaNode();this.edgeType.drawLine(e,t,this.selected,this.hover,i),this.drawLabel(e,i)}drawArrows(e){const t=this.getFormattingValues();if(t.hidden)return;const i=this.edgeType.getViaNode(),n={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,t.fromArrow&&(n.from=this.edgeType.getArrowData(e,"from",i,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.fromPoint=n.from.core),t.fromArrowSrc&&(n.from.image=this.imagelist.load(t.fromArrowSrc)),t.fromArrowImageWidth&&(n.from.imageWidth=t.fromArrowImageWidth),t.fromArrowImageHeight&&(n.from.imageHeight=t.fromArrowImageHeight)),t.toArrow&&(n.to=this.edgeType.getArrowData(e,"to",i,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.toPoint=n.to.core),t.toArrowSrc&&(n.to.image=this.imagelist.load(t.toArrowSrc)),t.toArrowImageWidth&&(n.to.imageWidth=t.toArrowImageWidth),t.toArrowImageHeight&&(n.to.imageHeight=t.toArrowImageHeight)),t.middleArrow&&(n.middle=this.edgeType.getArrowData(e,"middle",i,this.selected,this.hover,t),t.middleArrowSrc&&(n.middle.image=this.imagelist.load(t.middleArrowSrc)),t.middleArrowImageWidth&&(n.middle.imageWidth=t.middleArrowImageWidth),t.middleArrowImageHeight&&(n.middle.imageHeight=t.middleArrowImageHeight)),t.fromArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,n.from),t.middleArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,n.middle),t.toArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,n.to)}drawLabel(e,t){if(this.options.label!==void 0){const i=this.from,n=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);let s;if(i.id!=n.id){this.labelModule.pointToSelf=!1,s=this.edgeType.getPoint(.5,t),e.save();const o=this._getRotation(e);o.angle!=0&&(e.translate(o.x,o.y),e.rotate(o.angle)),this.labelModule.draw(e,s.x,s.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;const o=A5(e,this.options.selfReference.angle,this.options.selfReference.size,i);s=this._pointOnCircle(o.x,o.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,s.x,s.y,this.selected,this.hover)}}}getItemsOnPoint(e){const t=[];if(this.labelModule.visible()){const n=this._getRotation();ew(this.labelModule.getSize(),e,n)&&t.push({edgeId:this.id,labelId:0})}const i={left:e.x,top:e.y};return this.isOverlappingWith(i)&&t.push({edgeId:this.id}),t}isOverlappingWith(e){if(this.connected){const i=this.from.x,n=this.from.y,s=this.to.x,o=this.to.y,a=e.left,u=e.top;return this.edgeType.getDistanceToEdge(i,n,s,o,a,u)<10}else return!1}_getRotation(e){const t=this.edgeType.getViaNode(),i=this.edgeType.getPoint(.5,t);e!==void 0&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,i.x,i.y);const n={x:i.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible()||this.options.font.align==="horizontal")return n;const s=this.from.y-this.to.y,o=this.from.x-this.to.x;let a=Math.atan2(s,o);return(a<-1&&o<0||a>0&&o<0)&&(a+=Math.PI),n.angle=a,n}_pointOnCircle(e,t,i,n){return{x:e+i*Math.cos(n),y:t-i*Math.sin(n)}}select(){this.selected=!0}unselect(){this.selected=!1}cleanup(){return this.edgeType.cleanup()}remove(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}endPointsValid(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}}class _re{constructor(e,t,i){var n;this.body=e,this.images=t,this.groups=i,this.body.functions.createEdge=z(n=this.create).call(n,this),this.edgesListeners={add:(s,o)=>{this.add(o.items)},update:(s,o)=>{this.update(o.items)},remove:(s,o)=>{this.remove(o.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(s,o,a,u){if(o===s)return .5;{const l=1/(o-s);return Math.max(0,(u-s)*l)}}},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},Ue(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e=this,t,i;this.body.emitter.on("_forceDisableDynamicCurves",function(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;n==="dynamic"&&(n="continuous");let o=!1;for(const a in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,a)){const u=e.body.edges[a],l=e.body.data.edges.get(a);if(l!=null){const c=l.smooth;c!==void 0&&c.enabled===!0&&c.type==="dynamic"&&(n===void 0?u.setOptions({smooth:!1}):u.setOptions({smooth:{type:n}}),o=!0)}}s===!0&&o===!0&&e.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",()=>{this.reconnectEdges()}),this.body.emitter.on("refreshEdges",z(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",z(i=this.refresh).call(i,this)),this.body.emitter.on("destroy",()=>{Ie(this.edgesListeners,(n,s)=>{this.body.data.edges&&this.body.data.edges.off(s,n)}),delete this.body.functions.createEdge,delete this.edgesListeners.add,delete this.edgesListeners.update,delete this.edgesListeners.remove,delete this.edgesListeners})}setOptions(e){if(e!==void 0){Ci.parseOptions(this.options,e,!0,this.defaultOptions,!0);let t=!1;if(e.smooth!==void 0)for(const i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&(t=this.body.edges[i].updateEdgeType()||t);if(e.font!==void 0)for(const i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&this.body.edges[i].updateLabelModule();(e.hidden!==void 0||e.physics!==void 0||t===!0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.data.edges;if(h3("id",e))this.body.data.edges=e;else if(tt(e))this.body.data.edges=new uu,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new uu;else throw new TypeError("Array or DataSet expected");if(i&&Ie(this.edgesListeners,(n,s)=>{i.off(s,n)}),this.body.edges={},this.body.data.edges){Ie(this.edgesListeners,(s,o)=>{this.body.data.edges.on(o,s)});const n=this.body.data.edges.getIds();this.add(n,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),t===!1&&this.body.emitter.emit("_dataChanged")}add(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.edges,n=this.body.data.edges;for(let s=0;s1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length===0)return;const i=this.body.edges;Ie(e,n=>{const s=i[n];s!==void 0&&s.remove()}),t&&this.body.emitter.emit("_dataChanged")}refresh(){Ie(this.body.edges,(e,t)=>{const i=this.body.data.edges.get(t);i!==void 0&&e.setOptions(i)})}create(e){return new Ci(e,this.body,this.images,this.options,this.defaultOptions)}reconnectEdges(){let e;const t=this.body.nodes,i=this.body.edges;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].edges=[]);for(e in i)if(Object.prototype.hasOwnProperty.call(i,e)){const n=i[e];n.from=null,n.to=null,n.connect()}}getConnectedNodes(e){const t=[];if(this.body.edges[e]!==void 0){const i=this.body.edges[e];i.fromId!==void 0&&t.push(i.fromId),i.toId!==void 0&&t.push(i.toId)}return t}_updateState(){this._addMissingEdges(),this._removeInvalidEdges()}_removeInvalidEdges(){const e=[];Ie(this.body.edges,(t,i)=>{const n=this.body.nodes[t.toId],s=this.body.nodes[t.fromId];n!==void 0&&n.isCluster===!0||s!==void 0&&s.isCluster===!0||(n===void 0||s===void 0)&&e.push(i)}),this.remove(e,!1)}_addMissingEdges(){const e=this.body.data.edges;if(e==null)return;const t=this.body.edges,i=[];Le(e).call(e,(n,s)=>{t[s]===void 0&&i.push(s)}),this.add(i,!0)}}class k5{constructor(e,t,i){this.body=e,this.physicsBody=t,this.barnesHutTree,this.setOptions(i),this._rng=ul("BARNES HUT SOLVER")}setOptions(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}solve(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){let e;const t=this.body.nodes,i=this.physicsBody.physicsNodeIndices,n=i.length,s=this._formBarnesHutTree(t,i);this.barnesHutTree=s;for(let o=0;o0&&this._getForceContributions(s.root,e)}}_getForceContributions(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)}_getForceContribution(e,t){if(e.childrenCount>0){const i=e.centerOfMass.x-t.x,n=e.centerOfMass.y-t.y,s=Math.sqrt(i*i+n*n);s*e.calcSize>this.thetaInversed?this._calculateForces(s,i,n,t,e):e.childrenCount===4?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(s,i,n,t,e)}}_calculateForces(e,t,i,n,s){e===0&&(e=.1,t=e),this.overlapAvoidanceFactor<1&&n.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*n.shape.radius,e-n.shape.radius));const o=this.options.gravitationalConstant*s.mass*n.options.mass/Math.pow(e,3),a=t*o,u=i*o;this.physicsBody.forces[n.id].x+=a,this.physicsBody.forces[n.id].y+=u}_formBarnesHutTree(e,t){let i;const n=t.length;let s=e[t[0]].x,o=e[t[0]].y,a=e[t[0]].x,u=e[t[0]].y;for(let _=1;_0&&(ga&&(a=g),bu&&(u=b))}const l=Math.abs(a-s)-Math.abs(u-o);l>0?(o-=.5*l,u+=.5*l):(s+=.5*l,a-=.5*l);const d=Math.max(1e-5,Math.abs(a-s)),h=.5*d,f=.5*(s+a),v=.5*(o+u),p={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:f-h,maxX:f+h,minY:v-h,maxY:v+h},size:d,calcSize:1/d,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(p.root);for(let _=0;_0&&this._placeInTree(p.root,i);return p}_updateBranchMass(e,t){const i=e.centerOfMass,n=e.mass+t.options.mass,s=1/n;i.x=i.x*e.mass+t.x*t.options.mass,i.x*=s,i.y=i.y*e.mass+t.y*t.options.mass,i.y*=s,e.mass=n;const o=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidtht.x?n.maxY>t.y?s="NW":s="SW":n.maxY>t.y?s="NE":s="SE",this._placeInRegion(e,t,s)}_placeInRegion(e,t,i){const n=e.children[i];switch(n.childrenCount){case 0:n.children.data=t,n.childrenCount=1,this._updateBranchMass(n,t);break;case 1:n.children.data.x===t.x&&n.children.data.y===t.y?(t.x+=this._rng(),t.y+=this._rng()):(this._splitBranch(n),this._placeInTree(n,t));break;case 4:this._placeInTree(n,t);break}}_splitBranch(e){let 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)}_insertRegion(e,t){let i,n,s,o;const a=.5*e.size;switch(t){case"NW":i=e.range.minX,n=e.range.minX+a,s=e.range.minY,o=e.range.minY+a;break;case"NE":i=e.range.minX+a,n=e.range.maxX,s=e.range.minY,o=e.range.minY+a;break;case"SW":i=e.range.minX,n=e.range.minX+a,s=e.range.minY+a,o=e.range.maxY;break;case"SE":i=e.range.minX+a,n=e.range.maxX,s=e.range.minY+a,o=e.range.maxY;break}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:n,minY:s,maxY:o},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}_debug(e,t){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}_drawBranch(e,t,i){i===void 0&&(i="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=i,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}}class wre{constructor(e,t,i){this._rng=ul("REPULSION SOLVER"),this.body=e,this.physicsBody=t,this.setOptions(i)}setOptions(e){this.options=e}solve(){let e,t,i,n,s,o,a,u;const l=this.body.nodes,c=this.physicsBody.physicsNodeIndices,d=this.physicsBody.forces,h=this.options.nodeDistance,f=-2/3/h,v=4/3;for(let p=0;p0){const o=s.edges.length+1,a=this.options.centralGravity*o*s.options.mass;n[s.id].x=t*a,n[s.id].y=i*a}}}class Tre{constructor(e){this.body=e,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}},at(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("initPhysics",()=>{this.initPhysics()}),this.body.emitter.on("_layoutFailed",()=>{this.layoutFailed=!0}),this.body.emitter.on("resetPhysics",()=>{this.stopSimulation(),this.ready=!1}),this.body.emitter.on("disablePhysics",()=>{this.physicsEnabled=!1,this.stopSimulation()}),this.body.emitter.on("restorePhysics",()=>{this.setOptions(this.options),this.ready===!0&&this.startSimulation()}),this.body.emitter.on("startSimulation",()=>{this.ready===!0&&this.startSimulation()}),this.body.emitter.on("stopSimulation",()=>{this.stopSimulation()}),this.body.emitter.on("destroy",()=>{this.stopSimulation(!1),this.body.emitter.off()}),this.body.emitter.on("_dataChanged",()=>{this.updatePhysicsData()})}setOptions(e){if(e!==void 0)if(e===!1)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(e===!0)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,fu(["stabilization"],this.options,e),or(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());const t=this.options.wind;t&&((typeof t.x!="number"||Z_(t.x))&&(t.x=0),(typeof t.y!="number"||Z_(t.y))&&(t.y=0)),this.timestep=this.options.timestep}this.init()}init(){let e;this.options.solver==="forceAtlas2Based"?(e=this.options.forceAtlas2Based,this.nodesSolver=new Ore(this.body,this.physicsBody,e),this.edgesSolver=new P1(this.body,this.physicsBody,e),this.gravitySolver=new Ire(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new wre(this.body,this.physicsBody,e),this.edgesSolver=new P1(this.body,this.physicsBody,e),this.gravitySolver=new Xa(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new Ere(this.body,this.physicsBody,e),this.edgesSolver=new Sre(this.body,this.physicsBody,e),this.gravitySolver=new Xa(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new k5(this.body,this.physicsBody,e),this.edgesSolver=new P1(this.body,this.physicsBody,e),this.gravitySolver=new Xa(this.body,this.physicsBody,e)),this.modelOptions=e}initPhysics(){this.physicsEnabled===!0&&this.options.enabled===!0?this.options.stabilization.enabled===!0?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}startSimulation(){if(this.physicsEnabled===!0&&this.options.enabled===!0){if(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),this.viewFunction===void 0){var e;this.viewFunction=z(e=this.simulationStep).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}else this.body.emitter.emit("_redraw")}stopSimulation(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.stabilized=!0,e===!0&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,e===!0&&this.body.emitter.emit("_stopRendering"))}simulationStep(){const e=lu();this.physicsTick(),(lu()-e<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}_emitStabilized(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&ti(()=>{this.body.emitter.emit("stabilized",{iterations:e}),this.startedStabilization=!1,this.stabilizationIterations=0},0)}physicsStep(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}adjustTimeStep(){this._evaluateStepQuality()===!0?this.timestep=1.2*this.timestep:this.timestep/1.2o))return!1;return!0}moveNodes(){const e=this.physicsBody.physicsNodeIndices;let t=0,i=0;const n=5;for(let s=0;so&&(e=e>0?o:-o),e}_performStep(e){const t=this.body.nodes[e],i=this.physicsBody.forces[e];this.options.wind&&(i.x+=this.options.wind.x,i.y+=this.options.wind.y);const n=this.physicsBody.velocities[e];return this.previousStates[e]={x:t.x,y:t.y,vx:n.x,vy:n.y},t.options.fixed.x===!1?(n.x=this.calculateComponentVelocity(n.x,i.x,t.options.mass),t.x+=n.x*this.timestep):(i.x=0,n.x=0),t.options.fixed.y===!1?(n.y=this.calculateComponentVelocity(n.y,i.y,t.options.mass),t.y+=n.y*this.timestep):(i.y=0,n.y=0),Math.sqrt(Math.pow(n.x,2)+Math.pow(n.y,2))}_freezeNodes(){const e=this.body.nodes;for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].x&&e[t].y){const i=e[t].options.fixed;this.freezeCache[t]={x:i.x,y:i.y},i.x=!0,i.y=!0}}_restoreFrozenNodes(){const e=this.body.nodes;for(const 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={}}stabilize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof e!="number"&&(e=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",e)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,ti(()=>this._stabilizationBatch(),0)}_startStabilizing(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}_stabilizationBatch(){const e=()=>this.stabilized===!1&&this.stabilizationIterations{this.body.emitter.emit("stabilizationProgress",{iterations:this.stabilizationIterations,total:this.targetIterations})};this._startStabilizing()&&t();let i=0;for(;e()&&i"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");R1=crypto.getRandomValues.bind(crypto)}return R1(Pre)}const Cre=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var tB={randomUUID:Cre};function xre(r,e,t){var n;r=r||{};const i=r.random??((n=r.rng)==null?void 0:n.call(r))??Rre();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,$re(i)}function Oo(r,e,t){return tB.randomUUID?tB.randomUUID():xre(r)}class Lt{constructor(){}static getRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,n=-1e9,s=1e9,o=-1e9,a;if(t.length>0)for(let u=0;ua.shape.boundingBox.left&&(s=a.shape.boundingBox.left),oa.shape.boundingBox.top&&(i=a.shape.boundingBox.top),n1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,n=-1e9,s=1e9,o=-1e9,a;if(t.length>0)for(let u=0;ua.x&&(s=a.x),oa.y&&(i=a.y),n{delete this.containedEdges[i.id]}),Ie(t.containedNodes,(i,n)=>{this.containedNodes[n]=i}),t.containedNodes={},Ie(t.containedEdges,(i,n)=>{this.containedEdges[n]=i}),t.containedEdges={},Ie(t.edges,i=>{Ie(this.edges,n=>{var s,o;const a=Fe(s=n.clusteringEdgeReplacingIds).call(s,i.id);a!==-1&&(Ie(i.clusteringEdgeReplacingIds,u=>{n.clusteringEdgeReplacingIds.push(u),this.body.edges[u].edgeReplacedById=n.id}),ei(o=n.clusteringEdgeReplacingIds).call(o,a,1))})}),t.edges=[]}}class Dre{constructor(e){this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},at(this.options,this.defaultOptions),this.body.emitter.on("_resetData",()=>{this.clusteredNodes={},this.clusteredEdges={}})}clusterByHubsize(e,t){e===void 0?e=this._getHubSize():typeof e=="object"&&(t=this._checkOptions(e),e=this._getHubSize());const i=[];for(let n=0;n=e&&i.push(s.id)}for(let n=0;n0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");e=this._checkOptions(e);const i={},n={};Ie(this.body.nodes,(s,o)=>{s.options&&e.joinCondition(s.options)===!0&&(i[o]=s,Ie(s.edges,a=>{this.clusteredEdges[a.id]===void 0&&(n[a.id]=a)}))}),this._cluster(i,n,e,t)}clusterByEdgeCount(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;t=this._checkOptions(t);const n=[],s={};let o,a,u;for(let l=0;l0&&et(d).length>0&&p===!0){const y=function(){for(let g=0;g1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,t)}clusterBridges(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,t)}clusterByConnection(e,t){var i;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[e]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");const s=this.body.nodes[e];t=this._checkOptions(t,s),t.clusterNodeProperties.x===void 0&&(t.clusterNodeProperties.x=s.x),t.clusterNodeProperties.y===void 0&&(t.clusterNodeProperties.y=s.y),t.clusterNodeProperties.fixed===void 0&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=s.options.fixed.x,t.clusterNodeProperties.fixed.y=s.options.fixed.y);const o={},a={},u=s.id,l=Lt.cloneOptions(s);o[u]=s;for(let d=0;d-1&&(a[v.id]=v)}}this._cluster(o,a,t,n)}_createClusterEdges(e,t,i,n){let s,o,a,u,l,c;const d=et(e),h=[];for(let p=0;p0&&arguments[0]!==void 0?arguments[0]:{};return e.clusterEdgeProperties===void 0&&(e.clusterEdgeProperties={}),e.clusterNodeProperties===void 0&&(e.clusterNodeProperties={}),e}_cluster(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;const s=[];for(const c in e)Object.prototype.hasOwnProperty.call(e,c)&&this.clusteredNodes[c]!==void 0&&s.push(c);for(let c=0;cn?a.x:n,s=a.yo?a.y:o;return{x:.5*(i+n),y:.5*(s+o)}}openCluster(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No clusterNodeId supplied to openCluster.");const n=this.body.nodes[e];if(n===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(n.isCluster!==!0||n.containedNodes===void 0||n.containedEdges===void 0)throw new Error("The node:"+e+" is not a valid cluster.");const s=this.findNode(e),o=Fe(s).call(s,e)-1;if(o>=0){const c=s[o];this.body.nodes[c]._openChildCluster(e),delete this.body.nodes[e],i===!0&&this.body.emitter.emit("_dataChanged");return}const a=n.containedNodes,u=n.containedEdges;if(t!==void 0&&t.releaseFunction!==void 0&&typeof t.releaseFunction=="function"){const c={},d={x:n.x,y:n.y};for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)){const v=this.body.nodes[f];c[f]={x:v.x,y:v.y}}const h=t.releaseFunction(d,c);for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)){const v=this.body.nodes[f];h[f]!==void 0&&(v.x=h[f].x===void 0?n.x:h[f].x,v.y=h[f].y===void 0?n.y:h[f].y)}}else Ie(a,function(c){c.options.fixed.x===!1&&(c.x=n.x),c.options.fixed.y===!1&&(c.y=n.y)});for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c)){const d=this.body.nodes[c];d.vx=n.vx,d.vy=n.vy,d.setOptions({physics:!0}),delete this.clusteredNodes[c]}const l=[];for(let c=0;c0&&on&&(n=l.edges.length),e+=l.edges.length,t+=Math.pow(l.edges.length,2),i+=1}e=e/i,t=t/i;const s=t-Math.pow(e,2),o=Math.sqrt(s);let a=Math.floor(e+2*o);return a>n&&(a=n),a}_createClusteredEdge(e,t,i,n,s){const o=Lt.cloneOptions(i,"edge");Ue(o,n),o.from=e,o.to=t,o.id="clusterEdge:"+Oo(),s!==void 0&&Ue(o,s);const a=this.body.functions.createEdge(o);return a.clusteringEdgeReplacingIds=[i.id],a.connect(),this.body.edges[a.id]=a,a}_clusterEdges(e,t,i,n){if(t instanceof Ci){const s=t,o={};o[s.id]=s,t=o}if(e instanceof Ke){const s=e,o={};o[s.id]=s,e=o}if(i==null)throw new Error("_clusterEdges: parameter clusterNode required");n===void 0&&(n=i.clusterEdgeProperties),this._createClusterEdges(e,t,i,n);for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&this.body.edges[s]!==void 0){const o=this.body.edges[s];this._backupEdgeOptions(o),o.setOptions({physics:!1})}for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(this.clusteredNodes[s]={clusterId:i.id,node:this.body.nodes[s]},this.body.nodes[s].setOptions({physics:!1}))}_getClusterNodeForNode(e){if(e===void 0)return;const t=this.clusteredNodes[e];if(t===void 0)return;const i=t.clusterId;if(i!==void 0)return this.body.nodes[i]}_filter(e,t){const i=[];return Ie(e,n=>{t(n)&&i.push(n)}),i}_updateState(){let e;const t=[],i={},n=u=>{Ie(this.body.nodes,l=>{l.isCluster===!0&&u(l)})};for(e in this.clusteredNodes){if(!Object.prototype.hasOwnProperty.call(this.clusteredNodes,e))continue;this.body.nodes[e]===void 0&&t.push(e)}n(function(u){for(let l=0;l{const l=this.body.edges[u];(l===void 0||!l.endPointsValid())&&(i[u]=u)}),n(function(u){Ie(u.containedEdges,(l,c)=>{!l.endPointsValid()&&!i[c]&&(i[c]=c)})}),Ie(this.body.edges,(u,l)=>{let c=!0;const d=u.clusteringEdgeReplacingIds;if(d!==void 0){let h=0;Ie(d,f=>{const v=this.body.edges[f];v!==void 0&&v.endPointsValid()&&(h+=1)}),c=h>0}(!u.endPointsValid()||!c)&&(i[l]=l)}),n(u=>{Ie(i,l=>{delete u.containedEdges[l],Ie(u.edges,(c,d)=>{if(c.id===l){u.edges[d]=null;return}c.clusteringEdgeReplacingIds=this._filter(c.clusteringEdgeReplacingIds,function(h){return!i[h]})}),u.edges=this._filter(u.edges,function(c){return c!==null})})}),Ie(i,u=>{delete this.clusteredEdges[u]}),Ie(i,u=>{delete this.body.edges[u]});const s=et(this.body.edges);Ie(s,u=>{const l=this.body.edges[u],c=this._isClusteredNode(l.fromId)||this._isClusteredNode(l.toId);if(c!==this._isClusteredEdge(l.id))if(c){const d=this._getClusterNodeForNode(l.fromId);d!==void 0&&this._clusterEdges(this.body.nodes[l.fromId],l,d);const h=this._getClusterNodeForNode(l.toId);h!==void 0&&this._clusterEdges(this.body.nodes[l.toId],l,h)}else delete this._clusterEdges[u],this._restoreEdge(l)});let o=!1,a=!0;for(;a;){const u=[];n(function(l){const c=et(l.containedNodes).length,d=l.options.allowSingleNodeCluster===!0;(d&&c<1||!d&&c<2)&&u.push(l.id)});for(let l=0;l0,o=o||a}o&&this._updateState()}_isClusteredNode(e){return this.clusteredNodes[e]!==void 0}_isClusteredEdge(e){return this.clusteredEdges[e]!==void 0}}class Are{constructor(e,t){this.body=e,this.canvas=t,this.redrawRequested=!1,this.requestAnimationFrameRequestId=void 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},at(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e;this.body.emitter.on("dragStart",()=>{this.dragging=!0}),this.body.emitter.on("dragEnd",()=>{this.dragging=!1}),this.body.emitter.on("zoom",()=>{this.zooming=!0,window.clearTimeout(this.zoomTimeoutId),this.zoomTimeoutId=ti(()=>{var t;this.zooming=!1,z(t=this._requestRedraw).call(t,this)()},250)}),this.body.emitter.on("_resizeNodes",()=>{this._resizeNodes()}),this.body.emitter.on("_redraw",()=>{this.renderingActive===!1&&this._redraw()}),this.body.emitter.on("_blockRedraw",()=>{this.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",()=>{this.allowRedraw=!0,this.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",z(e=this._requestRedraw).call(e,this)),this.body.emitter.on("_startRendering",()=>{this.renderRequests+=1,this.renderingActive=!0,this._startRendering()}),this.body.emitter.on("_stopRendering",()=>{this.renderRequests-=1,this.renderingActive=this.renderRequests>0,this.requestAnimationFrameRequestId=void 0}),this.body.emitter.on("destroy",()=>{this.renderRequests=0,this.allowRedraw=!1,this.renderingActive=!1,window.cancelAnimationFrame(this.requestAnimationFrameRequestId),this.body.emitter.off()})}setOptions(e){e!==void 0&&Ys(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"],this.options,e)}_startRendering(){if(this.renderingActive===!0&&this.requestAnimationFrameRequestId===void 0){var e;this.requestAnimationFrameRequestId=window.requestAnimationFrame(z(e=this._renderStep).call(e,this),this.simulationInterval)}}_renderStep(){this.renderingActive===!0&&(this.requestAnimationFrameRequestId=void 0,this._startRendering(),this._redraw())}redraw(){this.body.emitter.emit("setSize"),this._redraw()}_requestRedraw(){this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,window.requestAnimationFrame(()=>{this._redraw(!1)}))}_redraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;const t={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();const i=this.canvas.getContext(),n=this.canvas.frame.canvas.clientWidth,s=this.canvas.frame.canvas.clientHeight;if(i.clearRect(0,0,n,s),this.canvas.frame.clientWidth===0)return;if(i.save(),i.translate(this.body.view.translation.x,this.body.view.translation.y),i.scale(this.body.view.scale,this.body.view.scale),i.beginPath(),this.body.emitter.emit("beforeDrawing",i),i.closePath(),e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(i),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){const{drawExternalLabels:o}=this._drawNodes(i,e);t.drawExternalLabels=o}e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(i),t.drawExternalLabels!=null&&t.drawExternalLabels(),e===!1&&this._drawSelectionBox(i),i.beginPath(),this.body.emitter.emit("afterDrawing",i),i.closePath(),i.restore(),e===!0&&i.clearRect(0,0,n,s)}}_resizeNodes(){this.canvas.setTransform();const 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);const t=this.body.nodes;let i;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i=t[n],i.resize(e),i.updateBoundingBox(e,i.selected));e.restore()}_drawNodes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.nodes,n=this.body.nodeIndices;let s;const o=[],a=[],u=20,l=this.canvas.DOMtoCanvas({x:-20,y:-20}),c=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+u,y:this.canvas.frame.canvas.clientHeight+u}),d={top:l.y,left:l.x,bottom:c.y,right:c.x},h=[];for(let _=0;_{for(const _ of h)_()}}}_drawEdges(e){const t=this.body.edges,i=this.body.edgeIndices;for(let n=0;n{t.width!==0&&(this.body.view.translation.x=t.width*.5),t.height!==0&&(this.body.view.translation.y=t.height*.5)}),this.body.emitter.on("setSize",z(e=this.setSize).call(e,this)),this.body.emitter.on("destroy",()=>{this.hammerFrame.destroy(),this.hammer.destroy(),this._cleanUp()})}setOptions(e){if(e!==void 0&&Ys(["width","height","autoResize"],this.options,e),this._cleanUp(),this.options.autoResize===!0){var t;if(window.ResizeObserver){const n=new ResizeObserver(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")}),{frame:s}=this;n.observe(s),this._cleanupCallbacks.push(()=>{n.unobserve(s)})}else{const n=kre(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(()=>{clearInterval(n)})}const i=z(t=this._onResize).call(t,this);window.addEventListener("resize",i),this._cleanupCallbacks.push(()=>{window.removeEventListener("resize",i)})}}_cleanUp(){var e,t,i;Le(e=on(t=ei(i=this._cleanupCallbacks).call(i,0)).call(t)).call(e,n=>{try{n()}catch(s){console.error(s)}})}_onResize(){this.setSize(),this.body.emitter.emit("_redraw")}_getCameraState(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/e,this.cameraState.previousHeight=this.frame.canvas.height/e,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/e,y:.5*this.frame.canvas.height/e}))}_setCameraState(){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){const e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight;let i=this.cameraState.scale;e!=1&&t!=1?i=this.cameraState.scale*.5*(e+t):e!=1?i=this.cameraState.scale*e:t!=1&&(i=this.cameraState.scale*t),this.body.view.scale=i;const n=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),s={x:n.x-this.cameraState.position.x,y:n.y-this.cameraState.position.y};this.body.view.translation.x+=s.x*this.body.view.scale,this.body.view.translation.y+=s.y*this.body.view.scale}}_prepareValue(e){if(typeof e=="number")return e+"px";if(typeof e=="string"){if(Fe(e).call(e,"%")!==-1||Fe(e).call(e,"px")!==-1)return e;if(Fe(e).call(e,"%")===-1)return e+"px"}throw new Error("Could not use the value supplied for width or height:"+e)}_create(){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{const 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()}_bindHammer(){this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new ls(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:ls.DIRECTION_ALL}),gu(this.hammer,e=>{this.body.eventListeners.onTouch(e)}),this.hammer.on("tap",e=>{this.body.eventListeners.onTap(e)}),this.hammer.on("doubletap",e=>{this.body.eventListeners.onDoubleTap(e)}),this.hammer.on("press",e=>{this.body.eventListeners.onHold(e)}),this.hammer.on("panstart",e=>{this.body.eventListeners.onDragStart(e)}),this.hammer.on("panmove",e=>{this.body.eventListeners.onDrag(e)}),this.hammer.on("panend",e=>{this.body.eventListeners.onDragEnd(e)}),this.hammer.on("pinch",e=>{this.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener("wheel",e=>{this.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("mousemove",e=>{this.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener("contextmenu",e=>{this.body.eventListeners.onContext(e)}),this.hammerFrame=new ls(this.frame),B5(this.hammerFrame,e=>{this.body.eventListeners.onRelease(e)})}setSize(){let 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);let i=!1;const n=this.frame.canvas.width,s=this.frame.canvas.height,o=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(o),this.frame.style.width=e,this.frame.style.height=t,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=t,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},i=!0;else{const a=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),u=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==a||this.frame.canvas.height!==u)&&this._getCameraState(o),this.frame.canvas.width!==a&&(this.frame.canvas.width=a,i=!0),this.frame.canvas.height!==u&&(this.frame.canvas.height=u,i=!0)}return i===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(n/this.pixelRatio),oldHeight:Math.round(s/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}getContext(){return this.frame.canvas.getContext("2d")}_determinePixelRatio(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");let t=1;typeof window<"u"&&(t=window.devicePixelRatio||1);const i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/i}_setPixelRatio(){this.pixelRatio=this._determinePixelRatio()}setTransform(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}_XconvertDOMtoCanvas(e){return(e-this.body.view.translation.x)/this.body.view.scale}_XconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.x}_YconvertDOMtoCanvas(e){return(e-this.body.view.translation.y)/this.body.view.scale}_YconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.y}canvasToDOM(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}DOMtoCanvas(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}}function jre(r,e){const t=at({nodes:e,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},r??{});if(!tt(t.nodes))throw new TypeError("Nodes has to be an array of ids.");if(t.nodes.length===0&&(t.nodes=e),!(typeof t.minZoomLevel=="number"&&t.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof t.maxZoomLevel=="number"&&t.minZoomLevel<=t.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return t}class Lre{constructor(e,t){var i,n;this.body=e,this.canvas=t,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",z(i=this.fit).call(i,this)),this.body.emitter.on("animationFinished",()=>{this.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",z(n=this.releaseNode).call(n,this))}setOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}fit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;e=jre(e,this.body.nodeIndices);const i=this.canvas.frame.canvas.clientWidth,n=this.canvas.frame.canvas.clientHeight;let s,o;if(i===0||n===0)o=1,s=Lt.getRange(this.body.nodes,e.nodes);else if(t===!0){let l=0;for(const h in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,h)&&this.body.nodes[h].predefinedPosition===!0&&(l+=1);if(l>.5*this.body.nodeIndices.length){this.fit(e,!1);return}s=Lt.getRange(this.body.nodes,e.nodes),o=12.662/(this.body.nodeIndices.length+7.4147)+.0964822;const d=Math.min(i/600,n/600);o*=d}else{this.body.emitter.emit("_resizeNodes"),s=Lt.getRange(this.body.nodes,e.nodes);const l=Math.abs(s.maxX-s.minX)*1.1,c=Math.abs(s.maxY-s.minY)*1.1,d=i/l,h=n/c;o=d<=h?d:h}o>e.maxZoomLevel?o=e.maxZoomLevel:o1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){const i={x:this.body.nodes[e].x,y:this.body.nodes[e].y};t.position=i,t.lockedOnNode=e,this.moveTo(t)}else console.error("Node: "+e+" cannot be found.")}moveTo(e){if(e===void 0){e={};return}if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!tn(e.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else e.offset.x=0;if(e.offset.y!=null){if(e.offset.y=+e.offset.y,!tn(e.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else e.offset.x=0}else e.offset={x:0,y:0};if(e.position!=null){if(e.position.x!=null){if(e.position.x=+e.position.x,!tn(e.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else e.position.x=0;if(e.position.y!=null){if(e.position.y=+e.position.y,!tn(e.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else e.position.x=0}else e.position=this.getViewPosition();if(e.scale!=null){if(e.scale=+e.scale,!(e.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else e.scale=this.body.view.scale;e.animation===void 0&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),e.animation.duration===void 0&&(e.animation.duration=1e3),e.animation.easingFunction===void 0&&(e.animation.easingFunction="easeInOutQuad"),this.animateView(e)}animateView(e){if(e===void 0)return;this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),e.locked===!0&&(this.lockedOnNodeId=e.lockedOnNode,this.lockedOnNodeOffset=e.offset),this.easingTime!=0&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=e.scale,this.body.view.scale=this.targetScale;const t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:t.x-e.position.x,y:t.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var n;this.viewFunction=z(n=this._lockedRedraw).call(n,this),this.body.emitter.on("initRedraw",this.viewFunction)}else this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw");else{var s;this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=z(s=this._transitionRedraw).call(s,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}_lockedRedraw(){const e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:t.x-e.x,y:t.y-e.y},n=this.body.view.translation,s={x:n.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:n.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=s}releaseNode(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}_transitionRedraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;const t=YQ[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*t,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*t,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*t},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var i;this.viewFunction=z(i=this._lockedRedraw).call(i,this),this.body.emitter.on("initRedraw",this.viewFunction)}this.body.emitter.emit("animationFinished")}}getScale(){return this.body.view.scale}getViewPosition(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}function nB(r){var e=r&&r.preventDefault||!1,t=r&&r.container||window,i={},n={keydown:{},keyup:{}},s={},o;for(o=97;o<=122;o++)s[String.fromCharCode(o)]={code:65+(o-97),shift:!1};for(o=65;o<=90;o++)s[String.fromCharCode(o)]={code:o,shift:!0};for(o=0;o<=9;o++)s[""+o]={code:48+o,shift:!1};for(o=1;o<=12;o++)s["F"+o]={code:111+o,shift:!1};for(o=0;o<=9;o++)s["num"+o]={code:96+o,shift:!1};s["num*"]={code:106,shift:!1},s["num+"]={code:107,shift:!1},s["num-"]={code:109,shift:!1},s["num/"]={code:111,shift:!1},s["num."]={code:110,shift:!1},s.left={code:37,shift:!1},s.up={code:38,shift:!1},s.right={code:39,shift:!1},s.down={code:40,shift:!1},s.space={code:32,shift:!1},s.enter={code:13,shift:!1},s.shift={code:16,shift:void 0},s.esc={code:27,shift:!1},s.backspace={code:8,shift:!1},s.tab={code:9,shift:!1},s.ctrl={code:17,shift:!1},s.alt={code:18,shift:!1},s.delete={code:46,shift:!1},s.pageup={code:33,shift:!1},s.pagedown={code:34,shift:!1},s["="]={code:187,shift:!1},s["-"]={code:189,shift:!1},s["]"]={code:221,shift:!1},s["["]={code:219,shift:!1};var a=function(c){l(c,"keydown")},u=function(c){l(c,"keyup")},l=function(c,d){if(n[d][c.keyCode]!==void 0){for(var h=n[d][c.keyCode],f=0;f{this.activated=!0,this.configureKeyboardBindings()}),this.body.emitter.on("deactivate",()=>{this.activated=!1,this.configureKeyboardBindings()}),this.body.emitter.on("destroy",()=>{this.keycharm!==void 0&&this.keycharm.destroy()}),this.options={}}setOptions(e){e!==void 0&&(this.options=e,this.create())}create(){this.options.navigationButtons===!0?this.iconsCreated===!1&&this.loadNavigationElements():this.iconsCreated===!0&&this.cleanNavigation(),this.configureKeyboardBindings()}cleanNavigation(){if(this.navigationHammers.length!=0){for(let e=0;e{this._stopMovement()}),this.navigationHammers.push(s),this.iconsCreated=!0}bindToRedraw(e){if(this.boundFunctions[e]===void 0){var t;this.boundFunctions[e]=z(t=this[e]).call(t,this),this.body.emitter.on("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_startRendering")}}unbindFromRedraw(e){this.boundFunctions[e]!==void 0&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"),delete this.boundFunctions[e])}_fit(){new Date().valueOf()-this.touchTime>700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=new Date().valueOf())}_stopMovement(){for(const 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={}}_moveUp(){this.body.view.translation.y+=this.options.keyboard.speed.y}_moveDown(){this.body.view.translation.y-=this.options.keyboard.speed.y}_moveLeft(){this.body.view.translation.x+=this.options.keyboard.speed.x}_moveRight(){this.body.view.translation.x-=this.options.keyboard.speed.x}_zoomIn(){const e=this.body.view.scale,t=this.body.view.scale*(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,n=t/e,s=(1-n)*this.canvas.canvasViewCenter.x+i.x*n,o=(1-n)*this.canvas.canvasViewCenter.y+i.y*n;this.body.view.scale=t,this.body.view.translation={x:s,y:o},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}_zoomOut(){const e=this.body.view.scale,t=this.body.view.scale/(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,n=t/e,s=(1-n)*this.canvas.canvasViewCenter.x+i.x*n,o=(1-n)*this.canvas.canvasViewCenter.y+i.y*n;this.body.view.scale=t,this.body.view.translation={x:s,y:o},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}configureKeyboardBindings(){if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=nB({container:window,preventDefault:!0}):this.keycharm=nB({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var e,t,i,n,s,o,a,u,l,c,d,h,f,v,p,_,y,g,b,m,E,O,I,w;z(e=this.keycharm).call(e,"up",()=>{this.bindToRedraw("_moveUp")},"keydown"),z(t=this.keycharm).call(t,"down",()=>{this.bindToRedraw("_moveDown")},"keydown"),z(i=this.keycharm).call(i,"left",()=>{this.bindToRedraw("_moveLeft")},"keydown"),z(n=this.keycharm).call(n,"right",()=>{this.bindToRedraw("_moveRight")},"keydown"),z(s=this.keycharm).call(s,"=",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(o=this.keycharm).call(o,"num+",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(a=this.keycharm).call(a,"num-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(u=this.keycharm).call(u,"-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(l=this.keycharm).call(l,"[",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(c=this.keycharm).call(c,"]",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(d=this.keycharm).call(d,"pageup",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(h=this.keycharm).call(h,"pagedown",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(f=this.keycharm).call(f,"up",()=>{this.unbindFromRedraw("_moveUp")},"keyup"),z(v=this.keycharm).call(v,"down",()=>{this.unbindFromRedraw("_moveDown")},"keyup"),z(p=this.keycharm).call(p,"left",()=>{this.unbindFromRedraw("_moveLeft")},"keyup"),z(_=this.keycharm).call(_,"right",()=>{this.unbindFromRedraw("_moveRight")},"keyup"),z(y=this.keycharm).call(y,"=",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(g=this.keycharm).call(g,"num+",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(b=this.keycharm).call(b,"num-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),z(m=this.keycharm).call(m,"-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),z(E=this.keycharm).call(E,"[",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),z(O=this.keycharm).call(O,"]",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(I=this.keycharm).call(I,"pageup",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(w=this.keycharm).call(w,"pagedown",()=>{this.unbindFromRedraw("_zoomOut")},"keyup")}}}class Hre{constructor(e,t,i){var n,s,o,a,u,l,c,d,h,f,v,p,_;this.body=e,this.canvas=t,this.selectionHandler=i,this.navigationHandler=new zre(e,t),this.body.eventListeners.onTap=z(n=this.onTap).call(n,this),this.body.eventListeners.onTouch=z(s=this.onTouch).call(s,this),this.body.eventListeners.onDoubleTap=z(o=this.onDoubleTap).call(o,this),this.body.eventListeners.onHold=z(a=this.onHold).call(a,this),this.body.eventListeners.onDragStart=z(u=this.onDragStart).call(u,this),this.body.eventListeners.onDrag=z(l=this.onDrag).call(l,this),this.body.eventListeners.onDragEnd=z(c=this.onDragEnd).call(c,this),this.body.eventListeners.onMouseWheel=z(d=this.onMouseWheel).call(d,this),this.body.eventListeners.onPinch=z(h=this.onPinch).call(h,this),this.body.eventListeners.onMouseMove=z(f=this.onMouseMove).call(f,this),this.body.eventListeners.onRelease=z(v=this.onRelease).call(v,this),this.body.eventListeners.onContext=z(p=this.onContext).call(p,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=z(_=this.getPointer).call(_,this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0,autoFocus:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0,zoomSpeed:1},at(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("destroy",()=>{clearTimeout(this.popupTimer),delete this.body.functions.getPointer})}setOptions(e){e!==void 0&&(fu(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"],this.options,e),or(this.options,e,"keyboard"),e.tooltip&&(at(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=Y_(e.tooltip.color)))),this.navigationHandler.setOptions(this.options)}getPointer(e){return{x:e.x-UQ(this.canvas.frame.canvas),y:e.y-VQ(this.canvas.frame.canvas)}}onTouch(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())}onTap(e){const t=this.getPointer(e.center),i=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,i),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t)}onDoubleTap(e){const t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,t)}onHold(e){const t=this.getPointer(e.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,i),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t),this.selectionHandler.generateClickEvent("hold",e,t)}onRelease(e){if(new Date().valueOf()-this.touchTime>10){const t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,t),this.touchTime=new Date().valueOf()}}onContext(e){const t=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,t)}checkSelectionChanges(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1)===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}_determineDifference(e,t){const i=function(n,s){const o=[];for(let a=0;a{const a=o.node;o.xFixed===!1&&(a.x=this.canvas._XconvertDOMtoCanvas(this.canvas._XconvertCanvasToDOM(o.x)+n)),o.yFixed===!1&&(a.y=this.canvas._YconvertDOMtoCanvas(this.canvas._YconvertCanvasToDOM(o.y)+s))}),this.body.emitter.emit("startSimulation")}else{if(e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(t.x),y:this.canvas._YconvertDOMtoCanvas(t.y)},this.body.emitter.emit("_requestRedraw")}if(this.options.dragView===!0&&!e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}const n=t.x-this.drag.pointer.x,s=t.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+n,y:this.drag.translation.y+s},this.body.emitter.emit("_requestRedraw")}}}onDragEnd(e){if(this.drag.dragging=!1,this.body.selectionBox.show){var t;this.body.selectionBox.show=!1;const i=this.body.selectionBox.position,n={minX:Math.min(i.start.x,i.end.x),minY:Math.min(i.start.y,i.end.y),maxX:Math.max(i.start.x,i.end.x),maxY:Math.max(i.start.y,i.end.y)},s=Kt(t=this.body.nodeIndices).call(t,a=>{const u=this.body.nodes[a];return u.x>=n.minX&&u.x<=n.maxX&&u.y>=n.minY&&u.y<=n.maxY});Le(s).call(s,a=>this.selectionHandler.selectObject(this.body.nodes[a]));const 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{const i=this.drag.selection;i&&i.length?(Le(i).call(i,function(n){n.node.options.fixed.x=n.xFixed,n.node.options.fixed.y=n.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"))}}onPinch(e){const t=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);const i=this.pinch.scale*e.scale;this.zoom(i,t)}zoom(e,t){if(this.options.zoomView===!0){const i=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);let n;this.drag!==void 0&&this.drag.dragging===!0&&(n=this.canvas.DOMtoCanvas(this.drag.pointer));const s=this.body.view.translation,o=e/i,a=(1-o)*t.x+s.x*o,u=(1-o)*t.y+s.y*o;if(this.body.view.scale=e,this.body.view.translation={x:a,y:u},n!=null){const l=this.canvas.canvasToDOM(n);this.drag.pointer.x=l.x,this.drag.pointer.y=l.y}this.body.emitter.emit("_requestRedraw"),ithis._checkShowPopup(t),this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(e,t)}_checkShowPopup(e){const t=this.canvas._XconvertDOMtoCanvas(e.x),i=this.canvas._YconvertDOMtoCanvas(e.y),n={left:t,top:i,right:t,bottom:i},s=this.popupObj===void 0?void 0:this.popupObj.id;let o=!1,a="node";if(this.popupObj===void 0){const u=this.body.nodeIndices,l=this.body.nodes;let c;const d=[];for(let h=0;h0&&(this.popupObj=l[d[d.length-1]],o=!0)}if(this.popupObj===void 0&&o===!1){const u=this.body.edgeIndices,l=this.body.edges;let c;const d=[];for(let h=0;h0&&(this.popupObj=l[d[d.length-1]],a="edge")}this.popupObj!==void 0?this.popupObj.id!==s&&(this.popup===void 0&&(this.popup=new iZ(this.canvas.frame)),this.popup.popupTargetType=a,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}_checkHidePopup(e){const t=this.selectionHandler._pointerToPositionObject(e);let i=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t),i===!0)){const n=this.selectionHandler.getNodeAt(e);i=n===void 0?!1:n.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));i===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}var sB={},oB={},aB;function Wre(){if(aB)return oB;aB=1;var r=S0(),e=P5();return r("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),oB}var uB;function Ure(){return uB||(uB=1,Wre()),sB}var lB={},q1,cB;function Nn(){if(cB)return q1;cB=1;var r=Fs(),e=TypeError;return q1=function(t){if(typeof t=="object"&&"size"in t&&"has"in t&&"add"in t&&"delete"in t&&"keys"in t)return t;throw new e(r(t)+" is not a set")},q1}var D1,dB;function Fn(){if(dB)return D1;dB=1;var r=nr(),e=R5(),t=r("Set"),i=t.prototype;return D1={Set:t,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:i},D1}var A1,hB;function kn(){if(hB)return A1;hB=1;var r=Qt();return A1=function(e,t,i){for(var n=i?e:e.iterator,s=e.next,o,a;!(o=r(s,n)).done;)if(a=t(o.value),a!==void 0)return a},A1}var M1,fB;function $a(){if(fB)return M1;fB=1;var r=kn();return M1=function(e,t,i){return i?r(e.keys(),t,!0):e.forEach(t)},M1}var N1,vB;function C0(){if(vB)return N1;vB=1;var r=Fn(),e=$a(),t=r.Set,i=r.add;return N1=function(n){var s=new t;return e(n,function(o){i(s,o)}),s},N1}var F1,pB;function Pa(){return pB||(pB=1,F1=function(r){return r.size}),F1}var k1,gB;function Vre(){return gB||(gB=1,k1=function(r){return{iterator:r,next:r.next,done:!1}}),k1}var B1,mB;function Bn(){if(mB)return B1;mB=1;var r=hi(),e=zr(),t=Qt(),i=Ls(),n=Vre(),s="Invalid size",o=RangeError,a=TypeError,u=Math.max,l=function(c,d){this.set=c,this.size=u(d,0),this.has=r(c.has),this.keys=r(c.keys)};return l.prototype={getIterator:function(){return n(e(t(this.keys,this.set)))},includes:function(c){return t(this.has,this.set,c)}},B1=function(c){e(c);var d=+c.size;if(d!==d)throw new a(s);var h=i(d);if(h<0)throw new o(s);return new l(c,h)},B1}var j1,yB;function Kre(){if(yB)return j1;yB=1;var r=Nn(),e=Fn(),t=C0(),i=Pa(),n=Bn(),s=$a(),o=kn(),a=e.has,u=e.remove;return j1=function(c){var d=r(this),h=n(c),f=t(d);return i(d)<=h.size?s(d,function(v){h.includes(v)&&u(f,v)}):o(h.getIterator(),function(v){a(f,v)&&u(f,v)}),f},j1}var L1,bB;function jn(){return bB||(bB=1,L1=function(){return!1}),L1}var _B;function Gre(){if(_B)return lB;_B=1;var r=de(),e=Kre(),t=$e(),i=jn(),n=!i("difference",function(o){return o.size===0}),s=n||t(function(){var o={size:1,has:function(){return!0},keys:function(){var u=0;return{next:function(){var l=u++>1;return a.has(1)&&a.clear(),{done:l,value:2}}}}},a=new Set([1,2,3,4]);return a.difference(o).size!==3});return r({target:"Set",proto:!0,real:!0,forced:s},{difference:e}),lB}var wB={},z1,EB;function Yre(){if(EB)return z1;EB=1;var r=Nn(),e=Fn(),t=Pa(),i=Bn(),n=$a(),s=kn(),o=e.Set,a=e.add,u=e.has;return z1=function(c){var d=r(this),h=i(c),f=new o;return t(d)>h.size?s(h.getIterator(),function(v){u(d,v)&&a(f,v)}):n(d,function(v){h.includes(v)&&a(f,v)}),f},z1}var SB;function Xre(){if(SB)return wB;SB=1;var r=de(),e=$e(),t=Yre(),i=jn(),n=!i("intersection",function(s){return s.size===2&&s.has(1)&&s.has(2)})||e(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});return r({target:"Set",proto:!0,real:!0,forced:n},{intersection:t}),wB}var OB={},H1,IB;function Jre(){if(IB)return H1;IB=1;var r=Nn(),e=Fn().has,t=Pa(),i=Bn(),n=$a(),s=kn(),o=w0();return H1=function(u){var l=r(this),c=i(u);if(t(l)<=c.size)return n(l,function(h){if(c.includes(h))return!1},!0)!==!1;var d=c.getIterator();return s(d,function(h){if(e(l,h))return o(d,"normal",!1)})!==!1},H1}var TB;function Qre(){if(TB)return OB;TB=1;var r=de(),e=Jre(),t=jn(),i=!t("isDisjointFrom",function(n){return!n});return r({target:"Set",proto:!0,real:!0,forced:i},{isDisjointFrom:e}),OB}var $B={},W1,PB;function Zre(){if(PB)return W1;PB=1;var r=Nn(),e=Pa(),t=$a(),i=Bn();return W1=function(s){var o=r(this),a=i(s);return e(o)>a.size?!1:t(o,function(u){if(!a.includes(u))return!1},!0)!==!1},W1}var RB;function eie(){if(RB)return $B;RB=1;var r=de(),e=Zre(),t=jn(),i=!t("isSubsetOf",function(n){return n});return r({target:"Set",proto:!0,real:!0,forced:i},{isSubsetOf:e}),$B}var CB={},U1,xB;function tie(){if(xB)return U1;xB=1;var r=Nn(),e=Fn().has,t=Pa(),i=Bn(),n=kn(),s=w0();return U1=function(a){var u=r(this),l=i(a);if(t(u)0&&arguments[0]!==void 0?arguments[0]:()=>{};Io(this,Yi,new QB),Io(this,Xi,new QB),Io(this,r_,void 0),tw(r_,this,e)}get sizeNodes(){return We(Yi,this).size}get sizeEdges(){return We(Xi,this).size}getNodes(){return We(Yi,this).getSelection()}getEdges(){return We(Xi,this).getSelection()}addNodes(){We(Yi,this).add(...arguments)}addEdges(){We(Xi,this).add(...arguments)}deleteNodes(e){We(Yi,this).delete(e)}deleteEdges(e){We(Xi,this).delete(e)}clear(){We(Yi,this).clear(),We(Xi,this).clear()}commit(){const e={nodes:We(Yi,this).commit(),edges:We(Xi,this).commit()};for(var t=arguments.length,i=new Array(t),n=0;n{this.updateSelection()})}setOptions(e){e!==void 0&&Ys(["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"],this.options,e)}selectOnPoint(e){let t=!1;if(this.options.selectable===!0){const i=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),i!==void 0&&(t=this.selectObject(i)),this.body.emitter.emit("_requestRedraw")}return t}selectAdditionalOnPoint(e){let t=!1;if(this.options.selectable===!0){const i=this.getNodeAt(e)||this.getEdgeAt(e);i!==void 0&&(t=!0,i.isSelected()===!0?this.deselectObject(i):this.selectObject(i),this.body.emitter.emit("_requestRedraw"))}return t}_initBaseEvent(e,t){const i={};return i.pointer={DOM:{x:t.x,y:t.y},canvas:this.canvas.DOMtoCanvas(t)},i.event=e,i}generateClickEvent(e,t,i,n){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;const o=this._initBaseEvent(t,i);if(s===!0)o.nodes=[],o.edges=[];else{const a=this.getSelection();o.nodes=a.nodes,o.edges=a.edges}n!==void 0&&(o.previousSelection=n),e=="click"&&(o.items=this.getClickedItems(i)),t.controlEdge!==void 0&&(o.controlEdge=t.controlEdge),this.body.emitter.emit(e,o)}selectObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;return e!==void 0?(e instanceof Ke?(t===!0&&this._selectionAccumulator.addEdges(...e.edges),this._selectionAccumulator.addNodes(e)):this._selectionAccumulator.addEdges(e),!0):!1}deselectObject(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}_getAllNodesOverlappingWith(e){const t=[],i=this.body.nodes;for(let n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;const i=this._pointerToPositionObject(e),n=this._getAllNodesOverlappingWith(i);if(n.length>0)return t===!0?this.body.nodes[n[n.length-1]]:n[n.length-1]}_getEdgesOverlappingWith(e,t){const i=this.body.edges;for(let n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;const i=this.canvas.DOMtoCanvas(e);let n=10,s=null;const o=this.body.edges;for(let a=0;a0&&(this.generateClickEvent("deselectEdge",t,e,s),i=!0),n.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",t,e,s),i=!0),n.nodes.added.length>0&&(this.generateClickEvent("selectNode",t,e),i=!0),n.edges.added.length>0&&(this.generateClickEvent("selectEdge",t,e),i=!0),i===!0&&this.generateClickEvent("select",t,e)}getSelection(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}getSelectedNodes(){return this._selectionAccumulator.getNodes()}getSelectedEdges(){return this._selectionAccumulator.getEdges()}getSelectedNodeIds(){var e;return ys(e=this._selectionAccumulator.getNodes()).call(e,t=>t.id)}getSelectedEdgeIds(){var e;return ys(e=this._selectionAccumulator.getEdges()).call(e,t=>t.id)}setSelection(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((t.unselectAll||t.unselectAll===void 0)&&this.unselectAll(),e.nodes)for(const i of e.nodes){const n=this.body.nodes[i];if(!n)throw new RangeError('Node with id "'+i+'" not found');this.selectObject(n,t.highlightEdges)}if(e.edges)for(const i of e.edges){const n=this.body.edges[i];if(!n)throw new RangeError('Edge with id "'+i+'" not found');this.selectObject(n)}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}selectNodes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({nodes:e},{highlightEdges:t})}selectEdges(e){if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({edges:e})}updateSelection(){for(const e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(const e in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,e.id)||this._selectionAccumulator.deleteEdges(e)}getClickedItems(e){const t=this.canvas.DOMtoCanvas(e),i=[],n=this.body.nodeIndices,s=this.body.nodes;for(let u=n.length-1;u>=0;u--){const c=s[n[u]].getItemsOnPoint(t);i.push.apply(i,c)}const o=this.body.edgeIndices,a=this.body.edges;for(let u=o.length-1;u>=0;u--){const c=a[o[u]].getItemsOnPoint(t);i.push.apply(i,c)}return i}}var ZB={},i_,ej;function wie(){if(ej)return i_;ej=1;var r=zs(),e=Math.floor,t=function(i,n){var s=i.length;if(s<8)for(var o=1,a,u;o0;)i[u]=i[--u];u!==o++&&(i[u]=a)}else for(var l=e(s/2),c=t(r(i,0,l),n),d=t(r(i,l),n),h=c.length,f=d.length,v=0,p=0;v3)){if(d)return!0;if(f)return f<603;var I="",w,S,T,R;for(w=65;w<76;w++){switch(S=String.fromCharCode(w),w){case 66:case 69:case 70:case 72:T=3;break;case 68:case 71:T=4;break;default:T=2}for(R=0;R<47;R++)v.push({k:S+R,v:T})}for(v.sort(function(x,C){return C.v-x.v}),R=0;Ro(S)?1:-1}};return r({target:"Array",proto:!0,forced:E},{sort:function(w){w!==void 0&&t(w);var S=i(this);if(m)return w===void 0?p(S):p(S,w);var T=[],R=n(S),x,C;for(C=0;C=0:v>p;p+=_)p in f&&(d=l(d,f[p],p,h));return d}};return d_={left:o(!1),right:o(!0)},d_}var h_,dj;function qie(){if(dj)return h_;dj=1;var r=L3();return h_=r==="NODE",h_}var hj;function Die(){if(hj)return lj;hj=1;var r=de(),e=xie().left,t=Ks(),i=fa(),n=qie(),s=!n&&i>79&&i<83,o=s||!t("reduce");return r({target:"Array",proto:!0,forced:o},{reduce:function(u){var l=arguments.length;return e(this,u,l,l>1?arguments[1]:void 0)}}),lj}var f_,fj;function Aie(){if(fj)return f_;fj=1,Die();var r=Rt();return f_=r("Array","reduce"),f_}var v_,vj;function Mie(){if(vj)return v_;vj=1;var r=ht(),e=Aie(),t=Array.prototype;return v_=function(i){var n=i.reduce;return i===t||r(t,i)&&n===t.reduce?e:n},v_}var p_,pj;function Nie(){if(pj)return p_;pj=1;var r=Mie();return p_=r,p_}var g_,gj;function Fie(){return gj||(gj=1,g_=Nie()),g_}var kie=Fie(),z5=pe(kie);class H5{abstract(){throw new Error("Can't instantiate abstract class!")}fake_use(){}curveType(){return this.abstract()}getPosition(e){return this.fake_use(e),this.abstract()}setPosition(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,t,i),this.abstract()}getTreeSize(e){return this.fake_use(e),this.abstract()}sort(e){this.fake_use(e),this.abstract()}fix(e,t){this.fake_use(e,t),this.abstract()}shift(e,t){this.fake_use(e,t),this.abstract()}}class Bie extends H5{constructor(e){super(),this.layout=e}curveType(){return"horizontal"}getPosition(e){return e.x}setPosition(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;i!==void 0&&this.layout.hierarchical.addToOrdering(e,i),e.x=t}getTreeSize(e){const t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_x,max:t.max_x}}sort(e){ds(e).call(e,function(t,i){return t.x-i.x})}fix(e,t){e.y=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.y=!0}shift(e,t){this.layout.body.nodes[e].x+=t}}class jie extends H5{constructor(e){super(),this.layout=e}curveType(){return"vertical"}getPosition(e){return e.y}setPosition(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;i!==void 0&&this.layout.hierarchical.addToOrdering(e,i),e.y=t}getTreeSize(e){const t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_y,max:t.max_y}}sort(e){ds(e).call(e,function(t,i){return t.y-i.y})}fix(e,t){e.x=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.x=!0}shift(e,t){this.layout.body.nodes[e].y+=t}}var mj={},yj;function Lie(){if(yj)return mj;yj=1;var r=de(),e=Wi().every,t=Ks(),i=t("every");return r({target:"Array",proto:!0,forced:!i},{every:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),mj}var m_,bj;function zie(){if(bj)return m_;bj=1,Lie();var r=Rt();return m_=r("Array","every"),m_}var y_,_j;function Hie(){if(_j)return y_;_j=1;var r=ht(),e=zie(),t=Array.prototype;return y_=function(i){var n=i.every;return i===t||r(t,i)&&n===t.every?e:n},y_}var b_,wj;function Wie(){if(wj)return b_;wj=1;var r=Hie();return b_=r,b_}var __,Ej;function Uie(){return Ej||(Ej=1,__=Wie()),__}var Vie=Uie(),W5=pe(Vie);function Kie(r,e){const t=new Ei;return Le(r).call(r,i=>{var n;Le(n=i.edges).call(n,s=>{s.connected&&t.add(s)})}),Le(t).call(t,i=>{const n=i.from.id,s=i.to.id;e[n]==null&&(e[n]=0),(e[s]==null||e[n]>=e[s])&&(e[s]=e[n]+1)}),e}function Gie(r){return U5(e=>{var t,i;return W5(t=Kt(i=e.edges).call(i,n=>r.has(n.toId))).call(t,n=>n.to===e)},(e,t)=>t>e,"from",r)}function Yie(r){return U5(e=>{var t,i;return W5(t=Kt(i=e.edges).call(i,n=>r.has(n.toId))).call(t,n=>n.from===e)},(e,t)=>td+1+h.edges.length,0),a=t+"Id",u=t==="to"?1:-1;for(const[d,h]of i){if(!i.has(d)||!r(h))continue;s[d]=0;const f=[h];let v=0,p;for(;p=f.pop();){var l,c;if(!i.has(d))continue;const _=s[p.id]+u;if(Le(l=Kt(c=p.edges).call(c,y=>y.connected&&y.to!==y.from&&y[t]!==p&&i.has(y.toId)&&i.has(y.fromId))).call(l,y=>{const g=y[a],b=s[g];(b==null||e(_,b))&&(s[g]=_,f.push(y[t]))}),v>o)return Kie(i,s);++v}}return s}class Xie{constructor(){this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}addRelation(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)}checkIfTree(){for(const e in this.parentReference)if(this.parentReference[e].length>1){this.isTree=!1;return}this.isTree=!0}numTrees(){return this.treeIndex+1}setTreeIndex(e,t){t!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=t,this.treeIndex=Math.max(t,this.treeIndex))}ensureLevel(e){this.levels[e]===void 0&&(this.levels[e]=0)}getMaxLevel(e){const t={},i=n=>{if(t[n]!==void 0)return t[n];let s=this.levels[n];if(this.childrenReference[n]){const o=this.childrenReference[n];if(o.length>0)for(let a=0;as-o);for(const s of n)t.set(s,i++);for(const s in this.levels)Object.prototype.hasOwnProperty.call(this.levels,s)&&(this.levels[s]=t.get(this.levels[s]))}getTreeSize(e,t){let i=1e9,n=-1e9,s=1e9,o=-1e9;for(const a in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,a)&&this.trees[a]===t){const u=e[a];i=Math.min(u.x,i),n=Math.max(u.x,n),s=Math.min(u.y,s),o=Math.max(u.y,o)}return{min_x:i,max_x:n,min_y:s,max_y:o}}hasSameParent(e,t){const i=this.parentReference[e.id],n=this.parentReference[t.id];if(i===void 0||n===void 0)return!1;for(let s=0;s{this.setupHierarchicalLayout()}),this.body.emitter.on("_dataLoaded",()=>{this.layoutNetwork()}),this.body.emitter.on("_resetHierarchicalLayout",()=>{this.setupHierarchicalLayout()}),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",()=>{if(this.options.hierarchical.enabled!==!0)return;const e=this.direction.curveType();this.body.emitter.emit("_forceDisableDynamicCurves",e,!1)})}setOptions(e,t){if(e!==void 0){const i=this.options.hierarchical,n=i.enabled;if(Ys(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),or(this.options,e,"hierarchical"),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),i.enabled===!0)return n===!0&&this.body.emitter.emit("refresh",!0),i.direction==="RL"||i.direction==="DU"?i.levelSeparation>0&&(i.levelSeparation*=-1):i.levelSeparation<0&&(i.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(n===!0)return this.body.emitter.emit("refresh"),Ue(t,this.optionsBackup)}return t}_resetRNG(e){this.initialRandomSeed=e,this._rng=ul(this.initialRandomSeed)}adaptAllOptionsForHierarchicalLayout(e){if(this.options.hierarchical.enabled===!0){const t=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:t.enabled===void 0?!0:t.enabled,solver:"hierarchicalRepulsion"},t.enabled=t.enabled===void 0?!0:t.enabled,t.solver=t.solver||"barnesHut"):typeof e.physics=="object"?(t.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,t.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(t.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});let i=this.direction.curveType();if(e.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1};else if(e.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1;else if(typeof e.edges.smooth=="boolean")this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:i};else{const n=e.edges.smooth;n.type!==void 0&&n.type!=="dynamic"&&(i=n.type),this.optionsBackup.edges={smooth:{enabled:n.enabled===void 0?!0:n.enabled,type:n.type===void 0?"dynamic":n.type,roundness:n.roundness===void 0?.5:n.roundness,forceDirection:n.forceDirection===void 0?!1:n.forceDirection}},e.edges.smooth={enabled:n.enabled===void 0?!0:n.enabled,type:i,roundness:n.roundness===void 0?.5:n.roundness,forceDirection:n.forceDirection===void 0?!1:n.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",i)}return e}positionInitially(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);const t=e.length+50;for(let i=0;is){const u=e.length;for(;e.length>s&&n<=10;){n+=1;const l=e.length;n%3===0?this.body.modules.clustering.clusterBridges(o):this.body.modules.clustering.clusterOutliers(o);const c=e.length;if(l==c&&n%3!==0){this._declusterAll(),this.body.emitter.emit("_layoutFailed"),console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.");return}}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*u)})}n>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();const a=70;for(let u=0;u0){let e,t,i=!1,n=!1;this.lastNodeOnLevel={},this.hierarchical=new Xie;for(t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&(e=this.body.nodes[t],e.options.level!==void 0?(i=!0,this.hierarchical.levels[t]=e.options.level):n=!0);if(n===!0&&i===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");{if(n===!0){const o=this.options.hierarchical.sortMethod;o==="hubsize"?this._determineLevelsByHubsize():o==="directed"?this._determineLevelsDirected():o==="custom"&&this._determineLevelsCustomCallback()}for(const o in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,o)&&this.hierarchical.ensureLevel(o);const s=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(s),this._condenseHierarchy(),this._shiftToCenter()}}}_condenseHierarchy(){var e=this;let t=!1;const i={},n=()=>{const y=o();let g=0;for(let b=0;b{const b=this.hierarchical.trees;for(const m in b)Object.prototype.hasOwnProperty.call(b,m)&&b[m]===y&&this.direction.shift(m,g)},o=()=>{const y=[];for(let g=0;g{if(!g[y.id]&&(g[y.id]=!0,this.hierarchical.childrenReference[y.id])){const b=this.hierarchical.childrenReference[y.id];if(b.length>0)for(let m=0;m1&&arguments[1]!==void 0?arguments[1]:1e9,b=1e9,m=1e9,E=1e9,O=-1e9;for(const I in y)if(Object.prototype.hasOwnProperty.call(y,I)){const w=e.body.nodes[I],S=e.hierarchical.levels[w.id],T=e.direction.getPosition(w),[R,x]=e._getSpaceAroundNode(w,y);b=Math.min(R,b),m=Math.min(x,m),S<=g&&(E=Math.min(T,E),O=Math.max(T,O))}return[E,O,b,m]},l=(y,g)=>{const b=this.hierarchical.getMaxLevel(y.id),m=this.hierarchical.getMaxLevel(g.id);return Math.min(b,m)},c=(y,g,b)=>{const m=this.hierarchical;for(let E=0;E1)for(let w=0;w2&&arguments[2]!==void 0?arguments[2]:!1;const m=e.direction.getPosition(y),E=e.direction.getPosition(g),O=Math.abs(E-m),I=e.options.hierarchical.nodeSpacing;if(O>I){const w={},S={};a(y,w),a(g,S);const T=l(y,g),R=u(w,T),x=u(S,T),C=R[1],D=x[0],j=x[2];if(Math.abs(C-D)>I){let H=C-D+I;H<-j+I&&(H=-j+I),H<0&&(e._shiftBlock(g.id,H),t=!0,b===!0&&e._centerParent(g))}}},h=(y,g)=>{const b=g.id,m=g.edges,E=this.hierarchical.levels[g.id],O=this.options.hierarchical.levelSeparation*this.options.hierarchical.levelSeparation,I={},w=[];for(let j=0;j{let H=0;for(let Z=0;Z{let H=0;for(let Z=0;Z{let H=this.direction.getPosition(g);const Z={};for(let ve=0;ve{const ee=this.direction.getPosition(g);if(i[g.id]===void 0){const me={};a(g,me),i[g.id]=me}const H=u(i[g.id]),Z=H[2],ve=H[3],we=j-ee;let te=0;we>0?te=Math.min(we,ve-this.options.hierarchical.nodeSpacing):we<0&&(te=-Math.min(-we,Z-this.options.hierarchical.nodeSpacing)),te!=0&&(this._shiftBlock(g.id,te),t=!0)},C=j=>{const ee=this.direction.getPosition(g),[H,Z]=this._getSpaceAroundNode(g),ve=j-ee;let we=ee;ve>0?we=Math.min(ee+(Z-this.options.hierarchical.nodeSpacing),j):ve<0&&(we=Math.max(ee-(H-this.options.hierarchical.nodeSpacing),j)),we!==ee&&(this.direction.setPosition(g,we),t=!0)};let D=R(y,w);x(D),D=R(y,m),C(D)},f=y=>{let g=this.hierarchical.getLevels();g=on(g).call(g);for(let b=0;b{let g=this.hierarchical.getLevels();g=on(g).call(g);for(let b=0;b{for(const y in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,y)&&this._centerParent(this.body.nodes[y])},_=()=>{let y=this.hierarchical.getLevels();y=on(y).call(y);for(let g=0;g0&&Math.abs(d)0&&(l=this.direction.getPosition(n[o-1])+u),this.direction.setPosition(a,l,i),this._validatePositionAndContinue(a,i,l),s++}}}}_placeBranchNodes(e,t){var i;const n=this.hierarchical.childrenReference[e];if(n===void 0)return;const s=[];for(let a=0;at&&this.positionedNodes[u.id]===void 0){const c=this.options.hierarchical.nodeSpacing;let d;a===0?d=this.direction.getPosition(this.body.nodes[e]):d=this.direction.getPosition(s[a-1])+c,this.direction.setPosition(u,d,l),this._validatePositionAndContinue(u,l,d)}else return}const o=this._getCenterPosition(s);this.direction.setPosition(this.body.nodes[e],o,t)}_validatePositionAndContinue(e,t,i){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[t]!==void 0){const n=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(i-n{var n;Fe(n=this.body.edgeIndices).call(n,i.id)!==-1&&t.push(i)}),t}_getHubSizes(){const e={},t=this.body.nodeIndices;Ie(t,n=>{const s=this.body.nodes[n],o=this._getActiveEdges(s).length;e[o]=!0});const i=[];return Ie(e,n=>{i.push(Number(n))}),ds(i).call(i,function(n,s){return s-n}),i}_determineLevelsByHubsize(){const e=(i,n)=>{this.hierarchical.levelDownstream(i,n)},t=this._getHubSizes();for(let i=0;i{const o=this.body.nodes[s];n===this._getActiveEdges(o).length&&this._crawlNetwork(e,s)})}}_determineLevelsCustomCallback(){const t=function(n,s,o){},i=(n,s,o)=>{let a=this.hierarchical.levels[n.id];a===void 0&&(a=this.hierarchical.levels[n.id]=1e5);const u=t(Lt.cloneOptions(n,"node"),Lt.cloneOptions(s,"node"),Lt.cloneOptions(o,"edge"));this.hierarchical.levels[s.id]=a+u};this._crawlNetwork(i),this.hierarchical.setMinLevelToZero()}_determineLevelsDirected(){var e;const t=z5(e=this.body.nodeIndices).call(e,(i,n)=>(i.set(n,this.body.nodes[n]),i),new T0);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=Yie(t):this.hierarchical.levels=Gie(t),this.hierarchical.setMinLevelToZero()}_generateMap(){const e=(t,i)=>{this.hierarchical.levels[i.id]>this.hierarchical.levels[t.id]&&this.hierarchical.addRelation(t.id,i.id)};this._crawlNetwork(e),this.hierarchical.checkIfTree()}_crawlNetwork(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},t=arguments.length>1?arguments[1]:void 0;const i={},n=(s,o)=>{if(i[s.id]===void 0){this.hierarchical.setTreeIndex(s,o),i[s.id]=!0;let a;const u=this._getActiveEdges(s);for(let l=0;l{if(i[s])return;i[s]=!0,this.direction.shift(s,t);const o=this.hierarchical.childrenReference[s];if(o!==void 0)for(let a=0;a{const u=this.hierarchical.parentReference[a];if(u!==void 0)for(let l=0;l{const u=this.hierarchical.parentReference[a];if(u!==void 0)for(let l=0;l{this._clean()}),this.body.emitter.on("_dataChanged",z(s=this._restore).call(s,this)),this.body.emitter.on("_resetData",z(o=this._restore).call(o,this))}_restore(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}setOptions(e,t,i){t!==void 0&&(t.locale!==void 0?this.options.locale=t.locale:this.options.locale=i.locale,t.locales!==void 0?this.options.locales=t.locales:this.options.locales=i.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,Ue(this.options,e)),this.options.initiallyActive===!0&&(this.editMode=!0),this._setup())}toggleEditMode(){this.editMode===!0?this.disableEditMode():this.enableEditMode()}enableEditMode(){this.editMode=!0,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}disableEditMode(){this.editMode=!1,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}showManipulatorToolbar(){if(this._clean(),this.manipulationDOM={},this.guiEnabled===!0){var e,t;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";const i=this.selectionHandler.getSelectedNodeCount(),n=this.selectionHandler.getSelectedEdgeCount(),s=i+n,o=this.options.locales[this.options.locale];let a=!1;this.options.addNode!==!1&&(this._createAddNodeButton(o),a=!0),this.options.addEdge!==!1&&(a===!0?this._createSeperator(1):a=!0,this._createAddEdgeButton(o)),i===1&&typeof this.options.editNode=="function"?(a===!0?this._createSeperator(2):a=!0,this._createEditNodeButton(o)):n===1&&i===0&&this.options.editEdge!==!1&&(a===!0?this._createSeperator(3):a=!0,this._createEditEdgeButton(o)),s!==0&&(i>0&&this.options.deleteNode!==!1?(a===!0&&this._createSeperator(4),this._createDeleteButton(o)):i===0&&this.options.deleteEdge!==!1&&(a===!0&&this._createSeperator(4),this._createDeleteButton(o))),this._bindElementEvents(this.closeDiv,z(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",z(t=this.showManipulatorToolbar).call(t,this))}this.body.emitter.emit("_redraw")}addNodeMode(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var t;const i=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(i),this._createSeperator(),this._createDescription(i.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,z(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent("click",z(e=this._performAddNode).call(e,this))}editNode(){this.editMode!==!0&&this.enableEditMode(),this._clean();const e=this.selectionHandler.getSelectedNodes()[0];if(e!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(e.isCluster!==!0){const t=Ue({},e.options,!1);if(t.x=e.x,t.y=e.y,this.options.editNode.length===2)this.options.editNode(t,i=>{i!=null&&this.inMode==="editNode"&&this.body.data.nodes.getDataSet().update(i),this.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}addEdgeMode(){var e,t,i,n,s;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var o;const a=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(a),this._createSeperator(),this._createDescription(a.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,z(o=this.toggleEditMode).call(o,this))}this._temporaryBindUI("onTouch",z(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",z(t=this._finishConnect).call(t,this)),this._temporaryBindUI("onDrag",z(i=this._dragControlNode).call(i,this)),this._temporaryBindUI("onRelease",z(n=this._finishConnect).call(n,this)),this._temporaryBindUI("onDragStart",z(s=this._dragStartEdge).call(s,this)),this._temporaryBindUI("onHold",()=>{})}editEdgeMode(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",typeof this.options.editEdge=="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){const o=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(o.from.id,o.to.id);return}if(this.guiEnabled===!0){var e;const o=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(o),this._createSeperator(),this._createDescription(o.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,z(e=this.toggleEditMode).call(e,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var t,i,n,s;const o=this.body.edges[this.edgeBeingEditedId],a=this._getNewTargetNode(o.from.x,o.from.y),u=this._getNewTargetNode(o.to.x,o.to.y);this.temporaryIds.nodes.push(a.id),this.temporaryIds.nodes.push(u.id),this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id),this.body.nodes[u.id]=u,this.body.nodeIndices.push(u.id),this._temporaryBindUI("onTouch",z(t=this._controlNodeTouch).call(t,this)),this._temporaryBindUI("onTap",()=>{}),this._temporaryBindUI("onHold",()=>{}),this._temporaryBindUI("onDragStart",z(i=this._controlNodeDragStart).call(i,this)),this._temporaryBindUI("onDrag",z(n=this._controlNodeDrag).call(n,this)),this._temporaryBindUI("onDragEnd",z(s=this._controlNodeDragEnd).call(s,this)),this._temporaryBindUI("onMouseMove",()=>{}),this._temporaryBindEvent("beforeDrawing",l=>{const c=o.edgeType.findBorderPositions(l);a.selected===!1&&(a.x=c.from.x,a.y=c.from.y),u.selected===!1&&(u.x=c.to.x,u.y=c.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}deleteSelected(){this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";const e=this.selectionHandler.getSelectedNodeIds(),t=this.selectionHandler.getSelectedEdgeIds();let i;if(e.length>0){for(let n=0;n0&&typeof this.options.deleteEdge=="function"&&(i=this.options.deleteEdge);if(typeof i=="function"){const n={nodes:e,edges:t};if(i.length===2)i(n,s=>{s!=null&&this.inMode==="delete"?(this.body.data.edges.getDataSet().remove(s.edges),this.body.data.nodes.getDataSet().remove(s.nodes),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()):(this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(t),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}_setup(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}_createWrappers(){if(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0){var e,t;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(t=this.options.locales[this.options.locale])===null||t===void 0?void 0:t.close)!==null&&e!==void 0?e:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}_getNewTargetNode(e,t){const i=Ue({},this.options.controlNodeStyle);i.id="targetNode"+Oo(),i.hidden=!1,i.physics=!1,i.x=e,i.y=t;const n=this.body.functions.createNode(i);return n.shape.boundingBox={left:e,right:e,top:t,bottom:t},n}_createEditButton(){var e;this._clean(),this.manipulationDOM={},_i(this.editModeDiv);const t=this.options.locales[this.options.locale],i=this._createButton("editMode","vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(i),this._bindElementEvents(i,z(e=this.toggleEditMode).call(e,this))}_clean(){this.inMode=!1,this.guiEnabled===!0&&(_i(this.editModeDiv),_i(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}_cleanupDOMEventListeners(){for(const t of ei(e=this._domEventListenerCleanupQueue).call(e,0)){var e;t()}}_removeManipulationDOM(){this._clean(),_i(this.manipulationDiv),_i(this.editModeDiv),_i(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}_createSeperator(){let 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])}_createAddNodeButton(e){var t;const i=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.addNodeMode).call(t,this))}_createAddEdgeButton(e){var t;const i=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.addEdgeMode).call(t,this))}_createEditNodeButton(e){var t;const i=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.editNode).call(t,this))}_createEditEdgeButton(e){var t;const i=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.editEdgeMode).call(t,this))}_createDeleteButton(e){var t;let i;this.options.rtl?i="vis-delete-rtl":i="vis-delete";const n=this._createButton("delete",i,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,z(t=this.deleteSelected).call(t,this))}_createBackButton(e){var t;const i=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.showManipulatorToolbar).call(t,this))}_createButton(e,t,i){let n=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=n,this.manipulationDOM[e+"Label"].innerText=i,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}_createDescription(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}_temporaryBindEvent(e,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}_temporaryBindUI(e,t){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+_a(et(this.body.eventListeners)))}_unbindTemporaryUIs(){for(const e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}_unbindTemporaryEvents(){for(let e=0;e{i.destroy()});const n=s=>{let{keyCode:o,key:a}=s;(a==="Enter"||a===" "||o===13||o===32)&&t()};e.addEventListener("keyup",n,!1),this._domEventListenerCleanupQueue.push(()=>{e.removeEventListener("keyup",n,!1)})}_cleanupTemporaryNodesAndEdges(){for(let s=0;s=0;a--)if(s[a]!==this.selectedControlNode.id){o=this.body.nodes[s[a]];break}if(o!==void 0&&this.selectedControlNode!==void 0)if(o.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(o.id,n.to.id):this._performEditEdge(n.from.id,o.id)}else n.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}_handleConnect(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=at({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;const t=this.lastTouch,i=this.selectionHandler.getNodeAt(t);if(i!==void 0)if(i.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const n=this._getNewTargetNode(i.x,i.y);this.body.nodes[n.id]=n,this.body.nodeIndices.push(n.id);const s=this.body.functions.createEdge({id:"connectionEdge"+Oo(),from:i.id,to:n.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[s.id]=s,this.body.edgeIndices.push(s.id),this.temporaryIds.nodes.push(n.id),this.temporaryIds.edges.push(s.id)}this.touchTime=new Date().valueOf()}}_dragControlNode(e){const t=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(t);let n;this.temporaryIds.edges[0]!==void 0&&(n=this.body.edges[this.temporaryIds.edges[0]].fromId);const s=this.selectionHandler._getAllNodesOverlappingWith(i);let o;for(let u=s.length-1;u>=0;u--){var a;if(Fe(a=this.temporaryIds.nodes).call(a,s[u])===-1){o=this.body.nodes[s[u]];break}}if(e.controlEdge={from:n,to:o?o.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,t),this.temporaryIds.nodes[0]!==void 0){const u=this.body.nodes[this.temporaryIds.nodes[0]];u.x=this.canvas._XconvertDOMtoCanvas(t.x),u.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}_finishConnect(e){const t=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(t);let n;this.temporaryIds.edges[0]!==void 0&&(n=this.body.edges[this.temporaryIds.edges[0]].fromId);const s=this.selectionHandler._getAllNodesOverlappingWith(i);let o;for(let u=s.length-1;u>=0;u--){var a;if(Fe(a=this.temporaryIds.nodes).call(a,s[u])===-1){o=this.body.nodes[s[u]];break}}this._cleanupTemporaryNodesAndEdges(),o!==void 0&&(o.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[n]!==void 0&&this.body.nodes[o.id]!==void 0&&this._performAddEdge(n,o.id)),e.controlEdge={from:n,to:o?o.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,t),this.body.emitter.emit("_redraw")}_dragStartEdge(e){const t=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,t,void 0,!0)}_performAddNode(e){const t={id:Oo(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(t,i=>{i!=null&&this.inMode==="addNode"&&this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(t),this.showManipulatorToolbar()}_performAddEdge(e,t){const i={from:e,to:t};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(i,n=>{n!=null&&this.inMode==="addEdge"&&(this.body.data.edges.getDataSet().add(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(i),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}_performEditEdge(e,t){const i={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label};let n=this.options.editEdge;if(typeof n=="object"&&(n=n.editWithoutDrag),typeof n=="function")if(n.length===2)n(i,s=>{s==null||this.inMode!=="editEdge"?(this.body.edges[i.id].updateEdgeType(),this.body.emitter.emit("_redraw"),this.showManipulatorToolbar()):(this.body.data.edges.getDataSet().update(s),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(i),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}const G="string",L="boolean",M="number",lo="array",le="object",V5="dom",Zie="any",w_=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],E_={borderWidth:{number:M},borderWidthSelected:{number:M,undefined:"undefined"},brokenImage:{string:G,undefined:"undefined"},chosen:{label:{boolean:L,function:"function"},node:{boolean:L,function:"function"},__type__:{object:le,boolean:L}},color:{border:{string:G},background:{string:G},highlight:{border:{string:G},background:{string:G},__type__:{object:le,string:G}},hover:{border:{string:G},background:{string:G},__type__:{object:le,string:G}},__type__:{object:le,string:G}},opacity:{number:M,undefined:"undefined"},fixed:{x:{boolean:L},y:{boolean:L},__type__:{object:le,boolean:L}},font:{align:{string:G},color:{string:G},size:{number:M},face:{string:G},background:{string:G},strokeWidth:{number:M},strokeColor:{string:G},vadjust:{number:M},multi:{boolean:L,string:G},bold:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:le,string:G}},boldital:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:le,string:G}},ital:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:le,string:G}},mono:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:le,string:G}},__type__:{object:le,string:G}},group:{string:G,number:M,undefined:"undefined"},heightConstraint:{minimum:{number:M},valign:{string:G},__type__:{object:le,boolean:L,number:M}},hidden:{boolean:L},icon:{face:{string:G},code:{string:G},size:{number:M},color:{string:G},weight:{string:G,number:M},__type__:{object:le}},id:{string:G,number:M},image:{selected:{string:G,undefined:"undefined"},unselected:{string:G,undefined:"undefined"},__type__:{object:le,string:G}},imagePadding:{top:{number:M},right:{number:M},bottom:{number:M},left:{number:M},__type__:{object:le,number:M}},label:{string:G,undefined:"undefined"},labelHighlightBold:{boolean:L},level:{number:M,undefined:"undefined"},margin:{top:{number:M},right:{number:M},bottom:{number:M},left:{number:M},__type__:{object:le,number:M}},mass:{number:M},physics:{boolean:L},scaling:{min:{number:M},max:{number:M},label:{enabled:{boolean:L},min:{number:M},max:{number:M},maxVisible:{number:M},drawThreshold:{number:M},__type__:{object:le,boolean:L}},customScalingFunction:{function:"function"},__type__:{object:le}},shadow:{enabled:{boolean:L},color:{string:G},size:{number:M},x:{number:M},y:{number:M},__type__:{object:le,boolean:L}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:L,array:lo},borderRadius:{number:M},interpolation:{boolean:L},useImageSize:{boolean:L},useBorderWithImage:{boolean:L},coordinateOrigin:{string:["center","top-left"]},__type__:{object:le}},size:{number:M},title:{string:G,dom:V5,undefined:"undefined"},value:{number:M,undefined:"undefined"},widthConstraint:{minimum:{number:M},maximum:{number:M},__type__:{object:le,boolean:L,number:M}},x:{number:M},y:{number:M},__type__:{object:le}},ene={configure:{enabled:{boolean:L},filter:{boolean:L,string:G,array:lo,function:"function"},container:{dom:V5},showButton:{boolean:L},__type__:{object:le,boolean:L,string:G,array:lo,function:"function"}},edges:{arrows:{to:{enabled:{boolean:L},scaleFactor:{number:M},type:{string:w_},imageHeight:{number:M},imageWidth:{number:M},src:{string:G},__type__:{object:le,boolean:L}},middle:{enabled:{boolean:L},scaleFactor:{number:M},type:{string:w_},imageWidth:{number:M},imageHeight:{number:M},src:{string:G},__type__:{object:le,boolean:L}},from:{enabled:{boolean:L},scaleFactor:{number:M},type:{string:w_},imageWidth:{number:M},imageHeight:{number:M},src:{string:G},__type__:{object:le,boolean:L}},__type__:{string:["from","to","middle"],object:le}},endPointOffset:{from:{number:M},to:{number:M},__type__:{object:le,number:M}},arrowStrikethrough:{boolean:L},background:{enabled:{boolean:L},color:{string:G},size:{number:M},dashes:{boolean:L,array:lo},__type__:{object:le,boolean:L}},chosen:{label:{boolean:L,function:"function"},edge:{boolean:L,function:"function"},__type__:{object:le,boolean:L}},color:{color:{string:G},highlight:{string:G},hover:{string:G},inherit:{string:["from","to","both"],boolean:L},opacity:{number:M},__type__:{object:le,string:G}},dashes:{boolean:L,array:lo},font:{color:{string:G},size:{number:M},face:{string:G},background:{string:G},strokeWidth:{number:M},strokeColor:{string:G},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:M},multi:{boolean:L,string:G},bold:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:le,string:G}},boldital:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:le,string:G}},ital:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:le,string:G}},mono:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:le,string:G}},__type__:{object:le,string:G}},hidden:{boolean:L},hoverWidth:{function:"function",number:M},label:{string:G,undefined:"undefined"},labelHighlightBold:{boolean:L},length:{number:M,undefined:"undefined"},physics:{boolean:L},scaling:{min:{number:M},max:{number:M},label:{enabled:{boolean:L},min:{number:M},max:{number:M},maxVisible:{number:M},drawThreshold:{number:M},__type__:{object:le,boolean:L}},customScalingFunction:{function:"function"},__type__:{object:le}},selectionWidth:{function:"function",number:M},selfReferenceSize:{number:M},selfReference:{size:{number:M},angle:{number:M},renderBehindTheNode:{boolean:L},__type__:{object:le}},shadow:{enabled:{boolean:L},color:{string:G},size:{number:M},x:{number:M},y:{number:M},__type__:{object:le,boolean:L}},smooth:{enabled:{boolean:L},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:M},forceDirection:{string:["horizontal","vertical","none"],boolean:L},__type__:{object:le,boolean:L}},title:{string:G,undefined:"undefined"},width:{number:M},widthConstraint:{maximum:{number:M},__type__:{object:le,boolean:L,number:M}},value:{number:M,undefined:"undefined"},__type__:{object:le}},groups:{useDefaultGroups:{boolean:L},__any__:E_,__type__:{object:le}},interaction:{dragNodes:{boolean:L},dragView:{boolean:L},hideEdgesOnDrag:{boolean:L},hideEdgesOnZoom:{boolean:L},hideNodesOnDrag:{boolean:L},hover:{boolean:L},keyboard:{enabled:{boolean:L},speed:{x:{number:M},y:{number:M},zoom:{number:M},__type__:{object:le}},bindToWindow:{boolean:L},autoFocus:{boolean:L},__type__:{object:le,boolean:L}},multiselect:{boolean:L},navigationButtons:{boolean:L},selectable:{boolean:L},selectConnectedEdges:{boolean:L},hoverConnectedEdges:{boolean:L},tooltipDelay:{number:M},zoomView:{boolean:L},zoomSpeed:{number:M},__type__:{object:le}},layout:{randomSeed:{undefined:"undefined",number:M,string:G},improvedLayout:{boolean:L},clusterThreshold:{number:M},hierarchical:{enabled:{boolean:L},levelSeparation:{number:M},nodeSpacing:{number:M},treeSpacing:{number:M},blockShifting:{boolean:L},edgeMinimization:{boolean:L},parentCentralization:{boolean:L},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:le,boolean:L}},__type__:{object:le}},manipulation:{enabled:{boolean:L},initiallyActive:{boolean:L},addNode:{boolean:L,function:"function"},addEdge:{boolean:L,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:le,boolean:L,function:"function"}},deleteNode:{boolean:L,function:"function"},deleteEdge:{boolean:L,function:"function"},controlNodeStyle:E_,__type__:{object:le,boolean:L}},nodes:E_,physics:{enabled:{boolean:L},barnesHut:{theta:{number:M},gravitationalConstant:{number:M},centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},damping:{number:M},avoidOverlap:{number:M},__type__:{object:le}},forceAtlas2Based:{theta:{number:M},gravitationalConstant:{number:M},centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},damping:{number:M},avoidOverlap:{number:M},__type__:{object:le}},repulsion:{centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},nodeDistance:{number:M},damping:{number:M},__type__:{object:le}},hierarchicalRepulsion:{centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},nodeDistance:{number:M},damping:{number:M},avoidOverlap:{number:M},__type__:{object:le}},maxVelocity:{number:M},minVelocity:{number:M},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:L},iterations:{number:M},updateInterval:{number:M},onlyDynamicEdges:{boolean:L},fit:{boolean:L},__type__:{object:le,boolean:L}},timestep:{number:M},adaptiveTimestep:{boolean:L},wind:{x:{number:M},y:{number:M},__type__:{object:le}},__type__:{object:le,boolean:L}},autoResize:{boolean:L},clickToUse:{boolean:L},locale:{string:G},locales:{__any__:{any:Zie},__type__:{object:le}},height:{string:G},width:{string:G},__type__:{object:le}},K5={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]}}},tne=(r,e,t)=>{var i;return!!($i(r).call(r,"physics")&&$i(i=K5.physics.solver).call(i,e)&&t.physics.solver!==e&&e!=="wind")};class rne{constructor(){}getDistances(e,t,i){const n={},s=e.edges;for(let a=0;a2&&arguments[2]!==void 0?arguments[2]:!1;const n=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(n),this._createK_matrix(n),this._createE_matrix();const s=.01,o=1;let a=0;const u=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),l=5;let c=1e9,d=0,h=0,f=0,v=0,p=0;for(;c>s&&ao&&pthis.body.emitter.emit("_requestRedraw")),this.groups=new UZ,this.canvas=new Bre(this.body),this.selectionHandler=new _ie(this.body,this.canvas),this.interactionHandler=new Hre(this.body,this.canvas,this.selectionHandler),this.view=new Lre(this.body,this.canvas),this.renderer=new Are(this.body,this.canvas),this.physics=new Tre(this.body),this.layoutEngine=new Jie(this.body),this.clustering=new Dre(this.body),this.manipulation=new Qie(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new ere(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new _re(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new ine(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(t),this.setData(e)}S3(ue.prototype);ue.prototype.setOptions=function(r){if(r===null&&(r=void 0),r!==void 0){if(nZ.validate(r,ene)===!0&&console.error("%cErrors have been found in the supplied options object.",y5),Ys(["locale","locales","clickToUse"],this.options,r),r.locale!==void 0&&(r.locale=PZ(r.locales||this.options.locales,r.locale)),r=this.layoutEngine.setOptions(r.layout,r),this.canvas.setOptions(r),this.groups.setOptions(r.groups),this.nodesHandler.setOptions(r.nodes),this.edgesHandler.setOptions(r.edges),this.physics.setOptions(r.physics),this.manipulation.setOptions(r.manipulation,r,this.options),this.interactionHandler.setOptions(r.interaction),this.renderer.setOptions(r.interaction),this.selectionHandler.setOptions(r.interaction),r.groups!==void 0&&this.body.emitter.emit("refreshNodes"),"configure"in r&&(this.configurator||(this.configurator=new rZ(this,this.body.container,K5,this.canvas.pixelRatio,tne)),this.configurator.setOptions(r.configure)),this.configurator&&this.configurator.options.enabled===!0){const i={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};Ue(i.nodes,this.nodesHandler.options),Ue(i.edges,this.edgesHandler.options),Ue(i.layout,this.layoutEngine.options),Ue(i.interaction,this.selectionHandler.options),Ue(i.interaction,this.renderer.options),Ue(i.interaction,this.interactionHandler.options),Ue(i.manipulation,this.manipulation.options),Ue(i.physics,this.physics.options),Ue(i.global,this.canvas.options),Ue(i.global,this.options),this.configurator.setModuleOptions(i)}r.clickToUse!==void 0?r.clickToUse===!0?this.activator===void 0&&(this.activator=new tZ(this.canvas.frame),this.activator.on("change",()=>{this.body.emitter.emit("activate")})):(this.activator!==void 0&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}};ue.prototype._updateVisibleIndices=function(){const r=this.body.nodes,e=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&!this.clustering._isClusteredNode(t)&&r[t].options.hidden===!1&&this.body.nodeIndices.push(r[t].id);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const i=e[t],n=r[i.fromId],s=r[i.toId],o=n!==void 0&&s!==void 0;!this.clustering._isClusteredEdge(t)&&i.options.hidden===!1&&o&&n.options.hidden===!1&&s.options.hidden===!1&&this.body.edgeIndices.push(i.id)}};ue.prototype.bindEventListeners=function(){this.body.emitter.on("_dataChanged",()=>{this.edgesHandler._updateState(),this.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",()=>{this.clustering._updateState(),this._updateVisibleIndices(),this._updateValueRange(this.body.nodes),this._updateValueRange(this.body.edges),this.body.emitter.emit("startSimulation"),this.body.emitter.emit("_requestRedraw")})};ue.prototype.setData=function(r){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),r&&r.dot&&(r.nodes||r.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(r&&r.options),r&&r.dot){console.warn("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");const e=vZ(r.dot);this.setData(e);return}else if(r&&r.gephi){console.warn("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");const e=pZ(r.gephi);this.setData(e);return}else this.nodesHandler.setData(r&&r.nodes,!0),this.edgesHandler.setData(r&&r.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")};ue.prototype.destroy=function(){this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images;for(const r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&delete this.body.nodes[r];for(const r in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,r)&&delete this.body.edges[r];_i(this.body.container)};ue.prototype._updateValueRange=function(r){let e,t,i,n=0;for(e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const s=r[e].getValue();s!==void 0&&(t=t===void 0?s:Math.min(s,t),i=i===void 0?s:Math.max(s,i),n+=s)}if(t!==void 0&&i!==void 0)for(e in r)Object.prototype.hasOwnProperty.call(r,e)&&r[e].setValueRange(t,i,n)};ue.prototype.isActive=function(){return!this.activator||this.activator.active};ue.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};ue.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};ue.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};ue.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};ue.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};ue.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};ue.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};ue.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};ue.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};ue.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};ue.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};ue.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};ue.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};ue.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};ue.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};ue.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};ue.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};ue.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};ue.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};ue.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};ue.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};ue.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};ue.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};ue.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};ue.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};ue.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};ue.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};ue.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};ue.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};ue.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};ue.prototype.getConnectedNodes=function(r){return this.body.nodes[r]!==void 0?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)};ue.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};ue.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};ue.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};ue.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};ue.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};ue.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};ue.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};ue.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};ue.prototype.getNodeAt=function(){const r=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};ue.prototype.getEdgeAt=function(){const r=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};ue.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};ue.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};ue.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};ue.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};ue.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};ue.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};ue.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};ue.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};ue.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};ue.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};ue.prototype.getOptionsFromConfigurator=function(){let r={};return this.configurator&&(r=this.configurator.getOptions.apply(this.configurator)),r};const nne={class:"nodes-container"},sne={class:"checkbox-green"},one={class:"scroll-y"},ane=["onMouseenter"],une=["onClick"],lne={key:0},cne=["onClick"],dne={class:"edit-node-container"},hne=["onUpdate:modelValue"],fne=["onClick"],vne=Or({__name:"EditorWindow",setup(r){const e=$t(),t=$t({nodes:[],edges:[]}),i={code:"",name:"",text:"",applications:[],id:"",label:"",links:[]},n=$t(""),s=$t({code:"",name:"",text:"",applications:[],id:"",label:"",links:[]}),o=$t({code:"",name:"",text:"",applications:[],id:"",label:"",links:[]});let a={},u={};const l=$t(0),c=$t(0),d=$t(!0);async function h(){t.value=await IU(),c.value=t.value.edges.length,d.value&&(t.value.edges=t.value.edges.filter(function(g){return g.type!=="application"})),t.value.edges.map(function(g){g.type=="application"&&(g.color="#cccccc")}),t.value.nodes=t.value.nodes.map(function(g){return g.id=g.code,g.label=g.name,g}),l.value=t.value.edges.length,u={nodes:t.value.nodes,edges:t.value.edges.sort(function(g,b){return g.type=="application"?1:b.type=="application"?-1:0})},a.setData(u),console.log(t.value.edges)}mw(async()=>{if(!e.value)return;const g={interaction:{selectable:!0},nodes:{color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#960000",background:"#ff9494"},hover:{border:"#2B7CE9",background:"#D2E5FF"}}}};a=new ue(e.value,u,g),a.on("click",function(b){if(console.log("click graph:",b),b.nodes.length>0){const m=t.value.nodes.find(function(E){return E.code==b.nodes[0]});m!==void 0&&f(m)}else b.edges.length>0&&console.log("Clicked edge:",b.edges[0])}),await h(),f(t.value.nodes[0])});function f(g){console.log("Select node:",g),n.value=g.code,s.value=g;const b=t.value.edges.filter(function(m){return m.from==g.code}).map(function(m){const E=m.to;return t.value.nodes.filter(function(I){return I.code==E})[0]});s.value.links=b,a.selectNodes([s.value.code])}function v(g){console.log("Focus node:",g.code),o.value=g}function p(g){console.log("Focus node:",g.code),navigator.clipboard.writeText("(["+g.code+"])"),o.value=i}async function _(){console.log("Update node:",s.value),await TU(n.value,s.value),await h();const g=t.value.nodes.filter(function(b){return b.code==s.value.code});f(g[0])}function y(g){return"["+g.code+"] - "+g.name}return(g,b)=>(Ge(),Ct(pt,null,[yt(Ow,null,{default:Iu(()=>b[6]||(b[6]=[se("div",null," Редактор сценариев ",-1)])),_:1}),se("div",{ref_key:"network",ref:e,class:"graph-container"},null,512),se("div",nne,[b[9]||(b[9]=se("h2",null,"Точки",-1)),se("div",null,"Всего точек: "+Ft(t.value.nodes.length),1),se("div",null,[as(" Всего связей: "+Ft(c.value)+", показано: "+Ft(l.value)+" ",1),se("div",null,[b[8]||(b[8]=as(" Показать все связи: ")),se("label",sne,[se("input",{type:"checkbox",onClick:b[0]||(b[0]=m=>(d.value=!d.value,h()))}),b[7]||(b[7]=se("span",{class:"checkbox-green-switch","data-label-on":"Вкл","data-label-off":"Выкл"},null,-1))])])]),b[10]||(b[10]=se("hr",{class:"hr"},null,-1)),se("div",one,[(Ge(!0),Ct(pt,null,vo(t.value.nodes,m=>(Ge(),Ct("div",{key:m.code},[se("span",{onMouseenter:E=>v(m),onMouseleave:b[1]||(b[1]=E=>v(i))},[se("span",{class:wu([[m.code==s.value.code?"selected-node":""],"node-select-button"]),onClick:E=>f(m)},Ft(y(m)),11,une),m.applications.length>0?(Ge(),Ct("span",lne," ("+Ft(m.applications.length)+")",1)):D_("",!0),m.code==o.value.code?(Ge(),Ct("span",{key:1,class:"copy-node-link",onClick:E=>p(m)}," Ссылка ",8,cne)):D_("",!0)],40,ane)]))),128))])]),se("div",dne,[b[12]||(b[12]=se("h2",null,"Редактирование точки",-1)),se("div",null,[so(se("input",{"onUpdate:modelValue":b[2]||(b[2]=m=>n.value=m),type:"text",class:"node-code-edit-field",maxlength:"3"},null,512),[[ao,n.value]]),b[11]||(b[11]=as(" - ")),so(se("input",{"onUpdate:modelValue":b[3]||(b[3]=m=>s.value.name=m),type:"text",class:"node-name-edit-field"},null,512),[[ao,s.value.name]])]),se("div",null,[so(se("textarea",{class:"node-text-edit-field",rows:"25","onUpdate:modelValue":b[4]||(b[4]=m=>s.value.text=m)},null,512),[[ao,s.value.text]])]),se("div",null,[se("h3",null,"Приложения: "+Ft(s.value.applications.length),1),(Ge(!0),Ct(pt,null,vo(s.value.applications,(m,E)=>(Ge(),Ct("div",{key:E},[so(se("textarea",{class:"node-text-edit-field",rows:"5","onUpdate:modelValue":O=>m.name=O},null,8,hne),[[ao,m.name]])]))),128))]),se("div",null,[se("h3",null,"Ссылки: "+Ft(s.value.links.length),1),(Ge(!0),Ct(pt,null,vo(s.value.links,m=>(Ge(),Ct("div",{key:m.code},[se("div",{class:"node-select-button",onClick:E=>f(m)}," - "+Ft(y(m)),9,fne)]))),128))]),se("div",null,[se("button",{class:"node-edit-save-button",onClick:b[5]||(b[5]=m=>_())},"Сохранить")])])],64))}}),pne=xu(vne,[["__scopeId","data-v-3a21d9bd"]]),gne=Or({__name:"EditorView",setup(r){return(e,t)=>(Ge(),Di(pne))}}),mne=Or({__name:"GamesWindow",setup(r){return(e,t)=>(Ge(),Di(Ow,null,{default:Iu(()=>t[0]||(t[0]=[se("div",null," Каталог игр ",-1)])),_:1}))}}),yne=Or({__name:"GamesView",setup(r){return(e,t)=>(Ge(),Di(mne))}}),rw=fU({history:H4("/"),routes:[{path:"/",name:"home",component:hV},{path:"/editor",name:"editor",component:gne},{path:"/games",name:"games",component:yne}]}),x0=u4(pU);x0.use(h4());x0.use(rw);x0.mount("#app"); diff --git a/cmd/evening_detective/static/admin/assets/index-WLMuUXZt.js b/cmd/evening_detective/static/admin/assets/index-WLMuUXZt.js new file mode 100644 index 0000000..767047f --- /dev/null +++ b/cmd/evening_detective/static/admin/assets/index-WLMuUXZt.js @@ -0,0 +1,115 @@ +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const s of n)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(n){const s={};return n.integrity&&(s.integrity=n.integrity),n.referrerPolicy&&(s.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?s.credentials="include":n.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(n){if(n.ep)return;n.ep=!0;const s=t(n);fetch(n.href,s)}})();/** +* @vue/shared v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function nw(r){const e=Object.create(null);for(const t of r.split(","))e[t]=1;return t=>t in e}const je={},rs=[],Nr=()=>{},Y5=()=>!1,mu=r=>r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&(r.charCodeAt(2)>122||r.charCodeAt(2)<97),sw=r=>r.startsWith("onUpdate:"),Mt=Object.assign,ow=(r,e)=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)},X5=Object.prototype.hasOwnProperty,Ne=(r,e)=>X5.call(r,e),ge=Array.isArray,is=r=>yu(r)==="[object Map]",Oj=r=>yu(r)==="[object Set]",be=r=>typeof r=="function",lt=r=>typeof r=="string",si=r=>typeof r=="symbol",Ye=r=>r!==null&&typeof r=="object",Ij=r=>(Ye(r)||be(r))&&be(r.then)&&be(r.catch),Tj=Object.prototype.toString,yu=r=>Tj.call(r),J5=r=>yu(r).slice(8,-1),$j=r=>yu(r)==="[object Object]",aw=r=>lt(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,co=nw(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),bu=r=>{const e=Object.create(null);return t=>e[t]||(e[t]=r(t))},Q5=/-(\w)/g,xi=bu(r=>r.replace(Q5,(e,t)=>t?t.toUpperCase():"")),Z5=/\B([A-Z])/g,_n=bu(r=>r.replace(Z5,"-$1").toLowerCase()),Pj=bu(r=>r.charAt(0).toUpperCase()+r.slice(1)),fl=bu(r=>r?`on${Pj(r)}`:""),Oi=(r,e)=>!Object.is(r,e),za=(r,...e)=>{for(let t=0;t{Object.defineProperty(r,e,{configurable:!0,enumerable:!1,writable:i,value:t})},O_=r=>{const e=parseFloat(r);return isNaN(e)?r:e};let D0;const _u=()=>D0||(D0=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function uw(r){if(ge(r)){const e={};for(let t=0;t{if(t){const i=t.split(tH);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function wu(r){let e="";if(lt(r))e=r;else if(ge(r))for(let t=0;t!!(r&&r.__v_isRef===!0),Ft=r=>lt(r)?r:r==null?"":ge(r)||Ye(r)&&(r.toString===Tj||!be(r.toString))?xj(r)?Ft(r.value):JSON.stringify(r,qj,2):String(r),qj=(r,e)=>xj(e)?qj(r,e.value):is(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[i,n],s)=>(t[vl(i,s)+" =>"]=n,t),{})}:Oj(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>vl(t))}:si(e)?vl(e):Ye(e)&&!ge(e)&&!$j(e)?String(e):e,vl=(r,e="")=>{var t;return si(r)?`Symbol(${(t=r.description)!=null?t:e})`:r};/** +* @vue/reactivity v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let er;class Dj{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=er,!e&&er&&(this.index=(er.scopes||(er.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e0)return;if(fo){let e=fo;for(fo=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let r;for(;ho;){let e=ho;for(ho=void 0;e;){const t=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){r||(r=i)}e=t}}if(r)throw r}function Fj(r){for(let e=r.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function kj(r){let e,t=r.depsTail,i=t;for(;i;){const n=i.prevDep;i.version===-1?(i===t&&(t=n),dw(i),uH(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=n}r.deps=e,r.depsTail=t}function I_(r){for(let e=r.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Bj(e.dep.computed)||e.dep.version!==e.version))return!0;return!!r._dirty}function Bj(r){if(r.flags&4&&!(r.flags&16)||(r.flags&=-17,r.globalVersion===To))return;r.globalVersion=To;const e=r.dep;if(r.flags|=2,e.version>0&&!r.isSSR&&r.deps&&!I_(r)){r.flags&=-3;return}const t=He,i=_r;He=r,_r=!0;try{Fj(r);const n=r.fn(r._value);(e.version===0||Oi(n,r._value))&&(r._value=n,e.version++)}catch(n){throw e.version++,n}finally{He=t,_r=i,kj(r),r.flags&=-3}}function dw(r,e=!1){const{dep:t,prevSub:i,nextSub:n}=r;if(i&&(i.nextSub=n,r.prevSub=void 0),n&&(n.prevSub=i,r.nextSub=void 0),t.subs===r&&(t.subs=i,!i&&t.computed)){t.computed.flags&=-5;for(let s=t.computed.deps;s;s=s.nextDep)dw(s,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function uH(r){const{prevDep:e,nextDep:t}=r;e&&(e.nextDep=t,r.prevDep=void 0),t&&(t.prevDep=e,r.nextDep=void 0)}let _r=!0;const jj=[];function Fi(){jj.push(_r),_r=!1}function ki(){const r=jj.pop();_r=r===void 0?!0:r}function A0(r){const{cleanup:e}=r;if(r.cleanup=void 0,e){const t=He;He=void 0;try{e()}finally{He=t}}}let To=0;class lH{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class hw{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!He||!_r||He===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==He)t=this.activeLink=new lH(He,this),He.deps?(t.prevDep=He.depsTail,He.depsTail.nextDep=t,He.depsTail=t):He.deps=He.depsTail=t,Lj(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const i=t.nextDep;i.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=i),t.prevDep=He.depsTail,t.nextDep=void 0,He.depsTail.nextDep=t,He.depsTail=t,He.deps===t&&(He.deps=i)}return t}trigger(e){this.version++,To++,this.notify(e)}notify(e){lw();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{cw()}}}function Lj(r){if(r.dep.sc++,r.sub.flags&4){const e=r.dep.computed;if(e&&!r.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)Lj(i)}const t=r.dep.subs;t!==r&&(r.prevSub=t,t&&(t.nextSub=r)),r.dep.subs=r}}const T_=new WeakMap,nn=Symbol(""),$_=Symbol(""),$o=Symbol("");function xt(r,e,t){if(_r&&He){let i=T_.get(r);i||T_.set(r,i=new Map);let n=i.get(t);n||(i.set(t,n=new hw),n.map=i,n.key=t),n.track()}}function Vr(r,e,t,i,n,s){const o=T_.get(r);if(!o){To++;return}const a=u=>{u&&u.trigger()};if(lw(),e==="clear")o.forEach(a);else{const u=ge(r),l=u&&aw(t);if(u&&t==="length"){const c=Number(i);o.forEach((d,h)=>{(h==="length"||h===$o||!si(h)&&h>=c)&&a(d)})}else switch((t!==void 0||o.has(void 0))&&a(o.get(t)),l&&a(o.get($o)),e){case"add":u?l&&a(o.get("length")):(a(o.get(nn)),is(r)&&a(o.get($_)));break;case"delete":u||(a(o.get(nn)),is(r)&&a(o.get($_)));break;case"set":is(r)&&a(o.get(nn));break}}cw()}function zn(r){const e=Me(r);return e===r?e:(xt(e,"iterate",$o),ur(r)?e:e.map(qt))}function Eu(r){return xt(r=Me(r),"iterate",$o),r}const cH={__proto__:null,[Symbol.iterator](){return gl(this,Symbol.iterator,qt)},concat(...r){return zn(this).concat(...r.map(e=>ge(e)?zn(e):e))},entries(){return gl(this,"entries",r=>(r[1]=qt(r[1]),r))},every(r,e){return Hr(this,"every",r,e,void 0,arguments)},filter(r,e){return Hr(this,"filter",r,e,t=>t.map(qt),arguments)},find(r,e){return Hr(this,"find",r,e,qt,arguments)},findIndex(r,e){return Hr(this,"findIndex",r,e,void 0,arguments)},findLast(r,e){return Hr(this,"findLast",r,e,qt,arguments)},findLastIndex(r,e){return Hr(this,"findLastIndex",r,e,void 0,arguments)},forEach(r,e){return Hr(this,"forEach",r,e,void 0,arguments)},includes(...r){return ml(this,"includes",r)},indexOf(...r){return ml(this,"indexOf",r)},join(r){return zn(this).join(r)},lastIndexOf(...r){return ml(this,"lastIndexOf",r)},map(r,e){return Hr(this,"map",r,e,void 0,arguments)},pop(){return Js(this,"pop")},push(...r){return Js(this,"push",r)},reduce(r,...e){return M0(this,"reduce",r,e)},reduceRight(r,...e){return M0(this,"reduceRight",r,e)},shift(){return Js(this,"shift")},some(r,e){return Hr(this,"some",r,e,void 0,arguments)},splice(...r){return Js(this,"splice",r)},toReversed(){return zn(this).toReversed()},toSorted(r){return zn(this).toSorted(r)},toSpliced(...r){return zn(this).toSpliced(...r)},unshift(...r){return Js(this,"unshift",r)},values(){return gl(this,"values",qt)}};function gl(r,e,t){const i=Eu(r),n=i[e]();return i!==r&&!ur(r)&&(n._next=n.next,n.next=()=>{const s=n._next();return s.value&&(s.value=t(s.value)),s}),n}const dH=Array.prototype;function Hr(r,e,t,i,n,s){const o=Eu(r),a=o!==r&&!ur(r),u=o[e];if(u!==dH[e]){const d=u.apply(r,s);return a?qt(d):d}let l=t;o!==r&&(a?l=function(d,h){return t.call(this,qt(d),h,r)}:t.length>2&&(l=function(d,h){return t.call(this,d,h,r)}));const c=u.call(o,l,i);return a&&n?n(c):c}function M0(r,e,t,i){const n=Eu(r);let s=t;return n!==r&&(ur(r)?t.length>3&&(s=function(o,a,u){return t.call(this,o,a,u,r)}):s=function(o,a,u){return t.call(this,o,qt(a),u,r)}),n[e](s,...i)}function ml(r,e,t){const i=Me(r);xt(i,"iterate",$o);const n=i[e](...t);return(n===-1||n===!1)&&pw(t[0])?(t[0]=Me(t[0]),i[e](...t)):n}function Js(r,e,t=[]){Fi(),lw();const i=Me(r)[e].apply(r,t);return cw(),ki(),i}const hH=nw("__proto__,__v_isRef,__isVue"),zj=new Set(Object.getOwnPropertyNames(Symbol).filter(r=>r!=="arguments"&&r!=="caller").map(r=>Symbol[r]).filter(si));function fH(r){si(r)||(r=String(r));const e=Me(this);return xt(e,"has",r),e.hasOwnProperty(r)}class Hj{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){if(t==="__v_skip")return e.__v_skip;const n=this._isReadonly,s=this._isShallow;if(t==="__v_isReactive")return!n;if(t==="__v_isReadonly")return n;if(t==="__v_isShallow")return s;if(t==="__v_raw")return i===(n?s?SH:Kj:s?Vj:Uj).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=ge(e);if(!n){let u;if(o&&(u=cH[t]))return u;if(t==="hasOwnProperty")return fH}const a=Reflect.get(e,t,At(e)?e:i);return(si(t)?zj.has(t):hH(t))||(n||xt(e,"get",t),s)?a:At(a)?o&&aw(t)?a:a.value:Ye(a)?n?Yj(a):Su(a):a}}class Wj extends Hj{constructor(e=!1){super(!1,e)}set(e,t,i,n){let s=e[t];if(!this._isShallow){const u=dn(s);if(!ur(i)&&!dn(i)&&(s=Me(s),i=Me(i)),!ge(e)&&At(s)&&!At(i))return u?!1:(s.value=i,!0)}const o=ge(e)&&aw(t)?Number(t)r,Ca=r=>Reflect.getPrototypeOf(r);function yH(r,e,t){return function(...i){const n=this.__v_raw,s=Me(n),o=is(s),a=r==="entries"||r===Symbol.iterator&&o,u=r==="keys"&&o,l=n[r](...i),c=t?P_:e?R_:qt;return!e&&xt(s,"iterate",u?$_:nn),{next(){const{value:d,done:h}=l.next();return h?{value:d,done:h}:{value:a?[c(d[0]),c(d[1])]:c(d),done:h}},[Symbol.iterator](){return this}}}}function xa(r){return function(...e){return r==="delete"?!1:r==="clear"?void 0:this}}function bH(r,e){const t={get(n){const s=this.__v_raw,o=Me(s),a=Me(n);r||(Oi(n,a)&&xt(o,"get",n),xt(o,"get",a));const{has:u}=Ca(o),l=e?P_:r?R_:qt;if(u.call(o,n))return l(s.get(n));if(u.call(o,a))return l(s.get(a));s!==o&&s.get(n)},get size(){const n=this.__v_raw;return!r&&xt(Me(n),"iterate",nn),Reflect.get(n,"size",n)},has(n){const s=this.__v_raw,o=Me(s),a=Me(n);return r||(Oi(n,a)&&xt(o,"has",n),xt(o,"has",a)),n===a?s.has(n):s.has(n)||s.has(a)},forEach(n,s){const o=this,a=o.__v_raw,u=Me(a),l=e?P_:r?R_:qt;return!r&&xt(u,"iterate",nn),a.forEach((c,d)=>n.call(s,l(c),l(d),o))}};return Mt(t,r?{add:xa("add"),set:xa("set"),delete:xa("delete"),clear:xa("clear")}:{add(n){!e&&!ur(n)&&!dn(n)&&(n=Me(n));const s=Me(this);return Ca(s).has.call(s,n)||(s.add(n),Vr(s,"add",n,n)),this},set(n,s){!e&&!ur(s)&&!dn(s)&&(s=Me(s));const o=Me(this),{has:a,get:u}=Ca(o);let l=a.call(o,n);l||(n=Me(n),l=a.call(o,n));const c=u.call(o,n);return o.set(n,s),l?Oi(s,c)&&Vr(o,"set",n,s):Vr(o,"add",n,s),this},delete(n){const s=Me(this),{has:o,get:a}=Ca(s);let u=o.call(s,n);u||(n=Me(n),u=o.call(s,n)),a&&a.call(s,n);const l=s.delete(n);return u&&Vr(s,"delete",n,void 0),l},clear(){const n=Me(this),s=n.size!==0,o=n.clear();return s&&Vr(n,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(n=>{t[n]=yH(n,r,e)}),t}function fw(r,e){const t=bH(r,e);return(i,n,s)=>n==="__v_isReactive"?!r:n==="__v_isReadonly"?r:n==="__v_raw"?i:Reflect.get(Ne(t,n)&&n in i?t:i,n,s)}const _H={get:fw(!1,!1)},wH={get:fw(!1,!0)},EH={get:fw(!0,!1)};const Uj=new WeakMap,Vj=new WeakMap,Kj=new WeakMap,SH=new WeakMap;function OH(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function IH(r){return r.__v_skip||!Object.isExtensible(r)?0:OH(J5(r))}function Su(r){return dn(r)?r:vw(r,!1,pH,_H,Uj)}function Gj(r){return vw(r,!1,mH,wH,Vj)}function Yj(r){return vw(r,!0,gH,EH,Kj)}function vw(r,e,t,i,n){if(!Ye(r)||r.__v_raw&&!(e&&r.__v_isReactive))return r;const s=n.get(r);if(s)return s;const o=IH(r);if(o===0)return r;const a=new Proxy(r,o===2?i:t);return n.set(r,a),a}function ns(r){return dn(r)?ns(r.__v_raw):!!(r&&r.__v_isReactive)}function dn(r){return!!(r&&r.__v_isReadonly)}function ur(r){return!!(r&&r.__v_isShallow)}function pw(r){return r?!!r.__v_raw:!1}function Me(r){const e=r&&r.__v_raw;return e?Me(e):r}function Xj(r){return!Ne(r,"__v_skip")&&Object.isExtensible(r)&&Rj(r,"__v_skip",!0),r}const qt=r=>Ye(r)?Su(r):r,R_=r=>Ye(r)?Yj(r):r;function At(r){return r?r.__v_isRef===!0:!1}function $t(r){return Jj(r,!1)}function TH(r){return Jj(r,!0)}function Jj(r,e){return At(r)?r:new $H(r,e)}class $H{constructor(e,t){this.dep=new hw,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Me(e),this._value=t?e:qt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,i=this.__v_isShallow||ur(e)||dn(e);e=i?e:Me(e),Oi(e,t)&&(this._rawValue=e,this._value=i?e:qt(e),this.dep.trigger())}}function tr(r){return At(r)?r.value:r}const PH={get:(r,e,t)=>e==="__v_raw"?r:tr(Reflect.get(r,e,t)),set:(r,e,t,i)=>{const n=r[e];return At(n)&&!At(t)?(n.value=t,!0):Reflect.set(r,e,t,i)}};function Qj(r){return ns(r)?r:new Proxy(r,PH)}class RH{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new hw(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=To-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&He!==this)return Nj(this,!0),!0}get value(){const e=this.dep.track();return Bj(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function CH(r,e,t=!1){let i,n;return be(r)?i=r:(i=r.get,n=r.set),new RH(i,n,t)}const qa={},Ja=new WeakMap;let Ji;function xH(r,e=!1,t=Ji){if(t){let i=Ja.get(t);i||Ja.set(t,i=[]),i.push(r)}}function qH(r,e,t=je){const{immediate:i,deep:n,once:s,scheduler:o,augmentJob:a,call:u}=t,l=y=>n?y:ur(y)||n===!1||n===0?Kr(y,1):Kr(y);let c,d,h,f,v=!1,p=!1;if(At(r)?(d=()=>r.value,v=ur(r)):ns(r)?(d=()=>l(r),v=!0):ge(r)?(p=!0,v=r.some(y=>ns(y)||ur(y)),d=()=>r.map(y=>{if(At(y))return y.value;if(ns(y))return l(y);if(be(y))return u?u(y,2):y()})):be(r)?e?d=u?()=>u(r,2):r:d=()=>{if(h){Fi();try{h()}finally{ki()}}const y=Ji;Ji=c;try{return u?u(r,3,[f]):r(f)}finally{Ji=y}}:d=Nr,e&&n){const y=d,O=n===!0?1/0:n;d=()=>Kr(y(),O)}const _=aH(),m=()=>{c.stop(),_&&_.active&&ow(_.effects,c)};if(s&&e){const y=e;e=(...O)=>{y(...O),m()}}let g=p?new Array(r.length).fill(qa):qa;const E=y=>{if(!(!(c.flags&1)||!c.dirty&&!y))if(e){const O=c.run();if(n||v||(p?O.some((I,S)=>Oi(I,g[S])):Oi(O,g))){h&&h();const I=Ji;Ji=c;try{const S=[O,g===qa?void 0:p&&g[0]===qa?[]:g,f];u?u(e,3,S):e(...S),g=O}finally{Ji=I}}}else c.run()};return a&&a(E),c=new Aj(d),c.scheduler=o?()=>o(E,!1):E,f=y=>xH(y,!1,c),h=c.onStop=()=>{const y=Ja.get(c);if(y){if(u)u(y,4);else for(const O of y)O();Ja.delete(c)}},e?i?E(!0):g=c.run():o?o(E.bind(null,!0),!0):c.run(),m.pause=c.pause.bind(c),m.resume=c.resume.bind(c),m.stop=m,m}function Kr(r,e=1/0,t){if(e<=0||!Ye(r)||r.__v_skip||(t=t||new Set,t.has(r)))return r;if(t.add(r),e--,At(r))Kr(r.value,e,t);else if(ge(r))for(let i=0;i{Kr(i,e,t)});else if($j(r)){for(const i in r)Kr(r[i],e,t);for(const i of Object.getOwnPropertySymbols(r))Object.prototype.propertyIsEnumerable.call(r,i)&&Kr(r[i],e,t)}return r}/** +* @vue/runtime-core v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Vo(r,e,t,i){try{return i?r(...i):r()}catch(n){Ou(n,e,t)}}function Br(r,e,t,i){if(be(r)){const n=Vo(r,e,t,i);return n&&Ij(n)&&n.catch(s=>{Ou(s,e,t)}),n}if(ge(r)){const n=[];for(let s=0;s>>1,n=jt[i],s=Po(n);s=Po(t)?jt.push(r):jt.splice(AH(e),0,r),r.flags|=1,tL()}}function tL(){Qa||(Qa=Zj.then(iL))}function MH(r){ge(r)?ss.push(...r):mi&&r.id===-1?mi.splice(Kn+1,0,r):r.flags&1||(ss.push(r),r.flags|=1),tL()}function N0(r,e,t=Rr+1){for(;tPo(t)-Po(i));if(ss.length=0,mi){mi.push(...e);return}for(mi=e,Kn=0;Knr.id==null?r.flags&2?-1:1/0:r.id;function iL(r){try{for(Rr=0;Rr{i._d&&U0(-1);const s=Za(e);let o;try{o=r(...n)}finally{Za(s),i._d&&U0(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function so(r,e){if(Dt===null)return r;const t=Ru(Dt),i=r.dirs||(r.dirs=[]);for(let n=0;nr.__isTeleport;function mw(r,e){r.shapeFlag&6&&r.component?(r.transition=e,mw(r.component.subTree,e)):r.shapeFlag&128?(r.ssContent.transition=e.clone(r.ssContent),r.ssFallback.transition=e.clone(r.ssFallback)):r.transition=e}/*! #__NO_SIDE_EFFECTS__ */function Or(r,e){return be(r)?Mt({name:r.name},e,{setup:r}):r}function sL(r){r.ids=[r.ids[0]+r.ids[2]+++"-",0,0]}function eu(r,e,t,i,n=!1){if(ge(r)){r.forEach((v,p)=>eu(v,e&&(ge(e)?e[p]:e),t,i,n));return}if(os(i)&&!n){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&eu(r,e,t,i.component.subTree);return}const s=i.shapeFlag&4?Ru(i.component):i.el,o=n?null:s,{i:a,r:u}=r,l=e&&e.r,c=a.refs===je?a.refs={}:a.refs,d=a.setupState,h=Me(d),f=d===je?()=>!1:v=>Ne(h,v);if(l!=null&&l!==u&&(lt(l)?(c[l]=null,f(l)&&(d[l]=null)):At(l)&&(l.value=null)),be(u))Vo(u,a,12,[o,c]);else{const v=lt(u),p=At(u);if(v||p){const _=()=>{if(r.f){const m=v?f(u)?d[u]:c[u]:u.value;n?ge(m)&&ow(m,s):ge(m)?m.includes(s)||m.push(s):v?(c[u]=[s],f(u)&&(d[u]=c[u])):(u.value=[s],r.k&&(c[r.k]=u.value))}else v?(c[u]=o,f(u)&&(d[u]=o)):p&&(u.value=o,r.k&&(c[r.k]=o))};o?(_.id=-1,Zt(_,t)):_()}}}_u().requestIdleCallback;_u().cancelIdleCallback;const os=r=>!!r.type.__asyncLoader,oL=r=>r.type.__isKeepAlive;function kH(r,e){aL(r,"a",e)}function BH(r,e){aL(r,"da",e)}function aL(r,e,t=zt){const i=r.__wdc||(r.__wdc=()=>{let n=t;for(;n;){if(n.isDeactivated)return;n=n.parent}return r()});if(Tu(e,i,t),t){let n=t.parent;for(;n&&n.parent;)oL(n.parent.vnode)&&jH(i,e,t,n),n=n.parent}}function jH(r,e,t,i){const n=Tu(e,r,i,!0);uL(()=>{ow(i[e],n)},t)}function Tu(r,e,t=zt,i=!1){if(t){const n=t[r]||(t[r]=[]),s=e.__weh||(e.__weh=(...o)=>{Fi();const a=Ko(t),u=Br(e,t,r,o);return a(),ki(),u});return i?n.unshift(s):n.push(s),s}}const oi=r=>(e,t=zt)=>{(!xo||r==="sp")&&Tu(r,(...i)=>e(...i),t)},LH=oi("bm"),yw=oi("m"),zH=oi("bu"),HH=oi("u"),WH=oi("bum"),uL=oi("um"),UH=oi("sp"),VH=oi("rtg"),KH=oi("rtc");function GH(r,e=zt){Tu("ec",r,e)}const YH=Symbol.for("v-ndc");function vo(r,e,t,i){let n;const s=t,o=ge(r);if(o||lt(r)){const a=o&&ns(r);let u=!1;a&&(u=!ur(r),r=Eu(r)),n=new Array(r.length);for(let l=0,c=r.length;le(a,u,void 0,s));else{const a=Object.keys(r);n=new Array(a.length);for(let u=0,l=a.length;uCo(e)?!(e.type===qi||e.type===pt&&!lL(e.children)):!0)?r:null}const C_=r=>r?CL(r)?Ru(r):C_(r.parent):null,po=Mt(Object.create(null),{$:r=>r,$el:r=>r.vnode.el,$data:r=>r.data,$props:r=>r.props,$attrs:r=>r.attrs,$slots:r=>r.slots,$refs:r=>r.refs,$parent:r=>C_(r.parent),$root:r=>C_(r.root),$host:r=>r.ce,$emit:r=>r.emit,$options:r=>dL(r),$forceUpdate:r=>r.f||(r.f=()=>{gw(r.update)}),$nextTick:r=>r.n||(r.n=eL.bind(r.proxy)),$watch:r=>mW.bind(r)}),yl=(r,e)=>r!==je&&!r.__isScriptSetup&&Ne(r,e),JH={get({_:r},e){if(e==="__v_skip")return!0;const{ctx:t,setupState:i,data:n,props:s,accessCache:o,type:a,appContext:u}=r;let l;if(e[0]!=="$"){const f=o[e];if(f!==void 0)switch(f){case 1:return i[e];case 2:return n[e];case 4:return t[e];case 3:return s[e]}else{if(yl(i,e))return o[e]=1,i[e];if(n!==je&&Ne(n,e))return o[e]=2,n[e];if((l=r.propsOptions[0])&&Ne(l,e))return o[e]=3,s[e];if(t!==je&&Ne(t,e))return o[e]=4,t[e];x_&&(o[e]=0)}}const c=po[e];let d,h;if(c)return e==="$attrs"&&xt(r.attrs,"get",""),c(r);if((d=a.__cssModules)&&(d=d[e]))return d;if(t!==je&&Ne(t,e))return o[e]=4,t[e];if(h=u.config.globalProperties,Ne(h,e))return h[e]},set({_:r},e,t){const{data:i,setupState:n,ctx:s}=r;return yl(n,e)?(n[e]=t,!0):i!==je&&Ne(i,e)?(i[e]=t,!0):Ne(r.props,e)||e[0]==="$"&&e.slice(1)in r?!1:(s[e]=t,!0)},has({_:{data:r,setupState:e,accessCache:t,ctx:i,appContext:n,propsOptions:s}},o){let a;return!!t[o]||r!==je&&Ne(r,o)||yl(e,o)||(a=s[0])&&Ne(a,o)||Ne(i,o)||Ne(po,o)||Ne(n.config.globalProperties,o)},defineProperty(r,e,t){return t.get!=null?r._.accessCache[e]=0:Ne(t,"value")&&this.set(r,e,t.value,null),Reflect.defineProperty(r,e,t)}};function F0(r){return ge(r)?r.reduce((e,t)=>(e[t]=null,e),{}):r}let x_=!0;function QH(r){const e=dL(r),t=r.proxy,i=r.ctx;x_=!1,e.beforeCreate&&k0(e.beforeCreate,r,"bc");const{data:n,computed:s,methods:o,watch:a,provide:u,inject:l,created:c,beforeMount:d,mounted:h,beforeUpdate:f,updated:v,activated:p,deactivated:_,beforeDestroy:m,beforeUnmount:g,destroyed:E,unmounted:y,render:O,renderTracked:I,renderTriggered:S,errorCaptured:b,serverPrefetch:w,expose:T,inheritAttrs:R,components:x,directives:C,filters:D}=e;if(l&&ZH(l,i,null),o)for(const H in o){const ee=o[H];be(ee)&&(i[H]=ee.bind(t))}if(n){const H=n.call(t,t);Ye(H)&&(r.data=Su(H))}if(x_=!0,s)for(const H in s){const ee=s[H],ve=be(ee)?ee.bind(t,t):be(ee.get)?ee.get.bind(t,t):Nr,we=!be(ee)&&be(ee.set)?ee.set.bind(t):Nr,re=br({get:ve,set:we});Object.defineProperty(i,H,{enumerable:!0,configurable:!0,get:()=>re.value,set:me=>re.value=me})}if(a)for(const H in a)cL(a[H],i,t,H);if(u){const H=be(u)?u.call(t):u;Reflect.ownKeys(H).forEach(ee=>{Ha(ee,H[ee])})}c&&k0(c,r,"c");function te(H,ee){ge(ee)?ee.forEach(ve=>H(ve.bind(t))):ee&&H(ee.bind(t))}if(te(LH,d),te(yw,h),te(zH,f),te(HH,v),te(kH,p),te(BH,_),te(GH,b),te(KH,I),te(VH,S),te(WH,g),te(uL,y),te(UH,w),ge(T))if(T.length){const H=r.exposed||(r.exposed={});T.forEach(ee=>{Object.defineProperty(H,ee,{get:()=>t[ee],set:ve=>t[ee]=ve})})}else r.exposed||(r.exposed={});O&&r.render===Nr&&(r.render=O),R!=null&&(r.inheritAttrs=R),x&&(r.components=x),C&&(r.directives=C),w&&sL(r)}function ZH(r,e,t=Nr){ge(r)&&(r=q_(r));for(const i in r){const n=r[i];let s;Ye(n)?"default"in n?s=Xr(n.from||i,n.default,!0):s=Xr(n.from||i):s=Xr(n),At(s)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>s.value,set:o=>s.value=o}):e[i]=s}}function k0(r,e,t){Br(ge(r)?r.map(i=>i.bind(e.proxy)):r.bind(e.proxy),e,t)}function cL(r,e,t,i){let n=i.includes(".")?IL(t,i):()=>t[i];if(lt(r)){const s=e[r];be(s)&&Wa(n,s)}else if(be(r))Wa(n,r.bind(t));else if(Ye(r))if(ge(r))r.forEach(s=>cL(s,e,t,i));else{const s=be(r.handler)?r.handler.bind(t):e[r.handler];be(s)&&Wa(n,s,r)}}function dL(r){const e=r.type,{mixins:t,extends:i}=e,{mixins:n,optionsCache:s,config:{optionMergeStrategies:o}}=r.appContext,a=s.get(e);let u;return a?u=a:!n.length&&!t&&!i?u=e:(u={},n.length&&n.forEach(l=>tu(u,l,o,!0)),tu(u,e,o)),Ye(e)&&s.set(e,u),u}function tu(r,e,t,i=!1){const{mixins:n,extends:s}=e;s&&tu(r,s,t,!0),n&&n.forEach(o=>tu(r,o,t,!0));for(const o in e)if(!(i&&o==="expose")){const a=eW[o]||t&&t[o];r[o]=a?a(r[o],e[o]):e[o]}return r}const eW={data:B0,props:j0,emits:j0,methods:oo,computed:oo,beforeCreate:Nt,created:Nt,beforeMount:Nt,mounted:Nt,beforeUpdate:Nt,updated:Nt,beforeDestroy:Nt,beforeUnmount:Nt,destroyed:Nt,unmounted:Nt,activated:Nt,deactivated:Nt,errorCaptured:Nt,serverPrefetch:Nt,components:oo,directives:oo,watch:rW,provide:B0,inject:tW};function B0(r,e){return e?r?function(){return Mt(be(r)?r.call(this,this):r,be(e)?e.call(this,this):e)}:e:r}function tW(r,e){return oo(q_(r),q_(e))}function q_(r){if(ge(r)){const e={};for(let t=0;t1)return t&&be(e)?e.call(i&&i.proxy):e}}const fL={},vL=()=>Object.create(fL),pL=r=>Object.getPrototypeOf(r)===fL;function sW(r,e,t,i=!1){const n={},s=vL();r.propsDefaults=Object.create(null),gL(r,e,n,s);for(const o in r.propsOptions[0])o in n||(n[o]=void 0);t?r.props=i?n:Gj(n):r.type.props?r.props=n:r.props=s,r.attrs=s}function oW(r,e,t,i){const{props:n,attrs:s,vnode:{patchFlag:o}}=r,a=Me(n),[u]=r.propsOptions;let l=!1;if((i||o>0)&&!(o&16)){if(o&8){const c=r.vnode.dynamicProps;for(let d=0;d{u=!0;const[h,f]=mL(d,e,!0);Mt(o,h),f&&a.push(...f)};!t&&e.mixins.length&&e.mixins.forEach(c),r.extends&&c(r.extends),r.mixins&&r.mixins.forEach(c)}if(!s&&!u)return Ye(r)&&i.set(r,rs),rs;if(ge(s))for(let c=0;cr[0]==="_"||r==="$stable",bw=r=>ge(r)?r.map(xr):[xr(r)],uW=(r,e,t)=>{if(e._n)return e;const i=Iu((...n)=>bw(e(...n)),t);return i._c=!1,i},bL=(r,e,t)=>{const i=r._ctx;for(const n in r){if(yL(n))continue;const s=r[n];if(be(s))e[n]=uW(n,s,i);else if(s!=null){const o=bw(s);e[n]=()=>o}}},_L=(r,e)=>{const t=bw(e);r.slots.default=()=>t},wL=(r,e,t)=>{for(const i in e)(t||i!=="_")&&(r[i]=e[i])},lW=(r,e,t)=>{const i=r.slots=vL();if(r.vnode.shapeFlag&32){const n=e._;n?(wL(i,e,t),t&&Rj(i,"_",n,!0)):bL(e,i)}else e&&_L(r,e)},cW=(r,e,t)=>{const{vnode:i,slots:n}=r;let s=!0,o=je;if(i.shapeFlag&32){const a=e._;a?t&&a===1?s=!1:wL(n,e,t):(s=!e.$stable,bL(e,n)),o=e}else e&&(_L(r,e),o={default:1});if(s)for(const a in n)!yL(a)&&o[a]==null&&delete n[a]},Zt=OW;function dW(r){return hW(r)}function hW(r,e){const t=_u();t.__VUE__=!0;const{insert:i,remove:n,patchProp:s,createElement:o,createText:a,createComment:u,setText:l,setElementText:c,parentNode:d,nextSibling:h,setScopeId:f=Nr,insertStaticContent:v}=r,p=($,P,q,F=null,k=null,N=null,K=void 0,X=null,U=!!P.dynamicChildren)=>{if($===P)return;$&&!Qs($,P)&&(F=A($),me($,k,N,!0),$=null),P.patchFlag===-2&&(U=!1,P.dynamicChildren=null);const{type:B,ref:ce,shapeFlag:J}=P;switch(B){case Pu:_($,P,q,F);break;case qi:m($,P,q,F);break;case _l:$==null&&g(P,q,F,K);break;case pt:x($,P,q,F,k,N,K,X,U);break;default:J&1?O($,P,q,F,k,N,K,X,U):J&6?C($,P,q,F,k,N,K,X,U):(J&64||J&128)&&B.process($,P,q,F,k,N,K,X,U,ne)}ce!=null&&k&&eu(ce,$&&$.ref,N,P||$,!P)},_=($,P,q,F)=>{if($==null)i(P.el=a(P.children),q,F);else{const k=P.el=$.el;P.children!==$.children&&l(k,P.children)}},m=($,P,q,F)=>{$==null?i(P.el=u(P.children||""),q,F):P.el=$.el},g=($,P,q,F)=>{[$.el,$.anchor]=v($.children,P,q,F,$.el,$.anchor)},E=({el:$,anchor:P},q,F)=>{let k;for(;$&&$!==P;)k=h($),i($,q,F),$=k;i(P,q,F)},y=({el:$,anchor:P})=>{let q;for(;$&&$!==P;)q=h($),n($),$=q;n(P)},O=($,P,q,F,k,N,K,X,U)=>{P.type==="svg"?K="svg":P.type==="math"&&(K="mathml"),$==null?I(P,q,F,k,N,K,X,U):w($,P,k,N,K,X,U)},I=($,P,q,F,k,N,K,X)=>{let U,B;const{props:ce,shapeFlag:J,transition:oe,dirs:he}=$;if(U=$.el=o($.type,N,ce&&ce.is,ce),J&8?c(U,$.children):J&16&&b($.children,U,null,F,k,bl($,N),K,X),he&&Ki($,null,F,"created"),S(U,$,$.scopeId,K,F),ce){for(const qe in ce)qe!=="value"&&!co(qe)&&s(U,qe,null,ce[qe],N,F);"value"in ce&&s(U,"value",null,ce.value,N),(B=ce.onVnodeBeforeMount)&&$r(B,F,$)}he&&Ki($,null,F,"beforeMount");const Oe=fW(k,oe);Oe&&oe.beforeEnter(U),i(U,P,q),((B=ce&&ce.onVnodeMounted)||Oe||he)&&Zt(()=>{B&&$r(B,F,$),Oe&&oe.enter(U),he&&Ki($,null,F,"mounted")},k)},S=($,P,q,F,k)=>{if(q&&f($,q),F)for(let N=0;N{for(let B=U;B<$.length;B++){const ce=$[B]=X?yi($[B]):xr($[B]);p(null,ce,P,q,F,k,N,K,X)}},w=($,P,q,F,k,N,K)=>{const X=P.el=$.el;let{patchFlag:U,dynamicChildren:B,dirs:ce}=P;U|=$.patchFlag&16;const J=$.props||je,oe=P.props||je;let he;if(q&&Gi(q,!1),(he=oe.onVnodeBeforeUpdate)&&$r(he,q,P,$),ce&&Ki(P,$,q,"beforeUpdate"),q&&Gi(q,!0),(J.innerHTML&&oe.innerHTML==null||J.textContent&&oe.textContent==null)&&c(X,""),B?T($.dynamicChildren,B,X,q,F,bl(P,k),N):K||ee($,P,X,null,q,F,bl(P,k),N,!1),U>0){if(U&16)R(X,J,oe,q,k);else if(U&2&&J.class!==oe.class&&s(X,"class",null,oe.class,k),U&4&&s(X,"style",J.style,oe.style,k),U&8){const Oe=P.dynamicProps;for(let qe=0;qe{he&&$r(he,q,P,$),ce&&Ki(P,$,q,"updated")},F)},T=($,P,q,F,k,N,K)=>{for(let X=0;X{if(P!==q){if(P!==je)for(const N in P)!co(N)&&!(N in q)&&s($,N,P[N],null,k,F);for(const N in q){if(co(N))continue;const K=q[N],X=P[N];K!==X&&N!=="value"&&s($,N,X,K,k,F)}"value"in q&&s($,"value",P.value,q.value,k)}},x=($,P,q,F,k,N,K,X,U)=>{const B=P.el=$?$.el:a(""),ce=P.anchor=$?$.anchor:a("");let{patchFlag:J,dynamicChildren:oe,slotScopeIds:he}=P;he&&(X=X?X.concat(he):he),$==null?(i(B,q,F),i(ce,q,F),b(P.children||[],q,ce,k,N,K,X,U)):J>0&&J&64&&oe&&$.dynamicChildren?(T($.dynamicChildren,oe,q,k,N,K,X),(P.key!=null||k&&P===k.subTree)&&EL($,P,!0)):ee($,P,q,ce,k,N,K,X,U)},C=($,P,q,F,k,N,K,X,U)=>{P.slotScopeIds=X,$==null?P.shapeFlag&512?k.ctx.activate(P,q,F,K,U):D(P,q,F,k,N,K,U):j($,P,U)},D=($,P,q,F,k,N,K)=>{const X=$.component=xW($,F,k);if(oL($)&&(X.ctx.renderer=ne),qW(X,!1,K),X.asyncDep){if(k&&k.registerDep(X,te,K),!$.el){const U=X.subTree=yt(qi);m(null,U,P,q)}}else te(X,$,P,q,k,N,K)},j=($,P,q)=>{const F=P.component=$.component;if(EW($,P,q))if(F.asyncDep&&!F.asyncResolved){H(F,P,q);return}else F.next=P,F.update();else P.el=$.el,F.vnode=P},te=($,P,q,F,k,N,K)=>{const X=()=>{if($.isMounted){let{next:J,bu:oe,u:he,parent:Oe,vnode:qe}=$;{const V=SL($);if(V){J&&(J.el=qe.el,H($,J,K)),V.asyncDep.then(()=>{$.isUnmounted||X()});return}}let Re=J,vt;Gi($,!1),J?(J.el=qe.el,H($,J,K)):J=qe,oe&&za(oe),(vt=J.props&&J.props.onVnodeBeforeUpdate)&&$r(vt,Oe,J,qe),Gi($,!0);const st=H0($),ae=$.subTree;$.subTree=st,p(ae,st,d(ae.el),A(ae),$,k,N),J.el=st.el,Re===null&&SW($,st.el),he&&Zt(he,k),(vt=J.props&&J.props.onVnodeUpdated)&&Zt(()=>$r(vt,Oe,J,qe),k)}else{let J;const{el:oe,props:he}=P,{bm:Oe,m:qe,parent:Re,root:vt,type:st}=$,ae=os(P);Gi($,!1),Oe&&za(Oe),!ae&&(J=he&&he.onVnodeBeforeMount)&&$r(J,Re,P),Gi($,!0);{vt.ce&&vt.ce._injectChildStyle(st);const V=$.subTree=H0($);p(null,V,q,F,$,k,N),P.el=V.el}if(qe&&Zt(qe,k),!ae&&(J=he&&he.onVnodeMounted)){const V=P;Zt(()=>$r(J,Re,V),k)}(P.shapeFlag&256||Re&&os(Re.vnode)&&Re.vnode.shapeFlag&256)&&$.a&&Zt($.a,k),$.isMounted=!0,P=q=F=null}};$.scope.on();const U=$.effect=new Aj(X);$.scope.off();const B=$.update=U.run.bind(U),ce=$.job=U.runIfDirty.bind(U);ce.i=$,ce.id=$.uid,U.scheduler=()=>gw(ce),Gi($,!0),B()},H=($,P,q)=>{P.component=$;const F=$.vnode.props;$.vnode=P,$.next=null,oW($,P.props,F,q),cW($,P.children,q),Fi(),N0($),ki()},ee=($,P,q,F,k,N,K,X,U=!1)=>{const B=$&&$.children,ce=$?$.shapeFlag:0,J=P.children,{patchFlag:oe,shapeFlag:he}=P;if(oe>0){if(oe&128){we(B,J,q,F,k,N,K,X,U);return}else if(oe&256){ve(B,J,q,F,k,N,K,X,U);return}}he&8?(ce&16&&_e(B,k,N),J!==B&&c(q,J)):ce&16?he&16?we(B,J,q,F,k,N,K,X,U):_e(B,k,N,!0):(ce&8&&c(q,""),he&16&&b(J,q,F,k,N,K,X,U))},ve=($,P,q,F,k,N,K,X,U)=>{$=$||rs,P=P||rs;const B=$.length,ce=P.length,J=Math.min(B,ce);let oe;for(oe=0;oece?_e($,k,N,!0,!1,J):b(P,q,F,k,N,K,X,U,J)},we=($,P,q,F,k,N,K,X,U)=>{let B=0;const ce=P.length;let J=$.length-1,oe=ce-1;for(;B<=J&&B<=oe;){const he=$[B],Oe=P[B]=U?yi(P[B]):xr(P[B]);if(Qs(he,Oe))p(he,Oe,q,null,k,N,K,X,U);else break;B++}for(;B<=J&&B<=oe;){const he=$[J],Oe=P[oe]=U?yi(P[oe]):xr(P[oe]);if(Qs(he,Oe))p(he,Oe,q,null,k,N,K,X,U);else break;J--,oe--}if(B>J){if(B<=oe){const he=oe+1,Oe=heoe)for(;B<=J;)me($[B],k,N,!0),B++;else{const he=B,Oe=B,qe=new Map;for(B=Oe;B<=oe;B++){const se=P[B]=U?yi(P[B]):xr(P[B]);se.key!=null&&qe.set(se.key,B)}let Re,vt=0;const st=oe-Oe+1;let ae=!1,V=0;const Z=new Array(st);for(B=0;B=st){me(se,k,N,!0);continue}let Ee;if(se.key!=null)Ee=qe.get(se.key);else for(Re=Oe;Re<=oe;Re++)if(Z[Re-Oe]===0&&Qs(se,P[Re])){Ee=Re;break}Ee===void 0?me(se,k,N,!0):(Z[Ee-Oe]=B+1,Ee>=V?V=Ee:ae=!0,p(se,P[Ee],q,null,k,N,K,X,U),vt++)}const ie=ae?vW(Z):rs;for(Re=ie.length-1,B=st-1;B>=0;B--){const se=Oe+B,Ee=P[se],vi=se+1{const{el:N,type:K,transition:X,children:U,shapeFlag:B}=$;if(B&6){re($.component.subTree,P,q,F);return}if(B&128){$.suspense.move(P,q,F);return}if(B&64){K.move($,P,q,ne);return}if(K===pt){i(N,P,q);for(let J=0;JX.enter(N),k);else{const{leave:J,delayLeave:oe,afterLeave:he}=X,Oe=()=>i(N,P,q),qe=()=>{J(N,()=>{Oe(),he&&he()})};oe?oe(N,Oe,qe):qe()}else i(N,P,q)},me=($,P,q,F=!1,k=!1)=>{const{type:N,props:K,ref:X,children:U,dynamicChildren:B,shapeFlag:ce,patchFlag:J,dirs:oe,cacheIndex:he}=$;if(J===-2&&(k=!1),X!=null&&eu(X,null,q,$,!0),he!=null&&(P.renderCache[he]=void 0),ce&256){P.ctx.deactivate($);return}const Oe=ce&1&&oe,qe=!os($);let Re;if(qe&&(Re=K&&K.onVnodeBeforeUnmount)&&$r(Re,P,$),ce&6)nt($.component,q,F);else{if(ce&128){$.suspense.unmount(q,F);return}Oe&&Ki($,null,P,"beforeUnmount"),ce&64?$.type.remove($,P,q,ne,F):B&&!B.hasOnce&&(N!==pt||J>0&&J&64)?_e(B,P,q,!1,!0):(N===pt&&J&384||!k&&ce&16)&&_e(U,P,q),F&&xe($)}(qe&&(Re=K&&K.onVnodeUnmounted)||Oe)&&Zt(()=>{Re&&$r(Re,P,$),Oe&&Ki($,null,P,"unmounted")},q)},xe=$=>{const{type:P,el:q,anchor:F,transition:k}=$;if(P===pt){De(q,F);return}if(P===_l){y($);return}const N=()=>{n(q),k&&!k.persisted&&k.afterLeave&&k.afterLeave()};if($.shapeFlag&1&&k&&!k.persisted){const{leave:K,delayLeave:X}=k,U=()=>K(q,N);X?X($.el,N,U):U()}else N()},De=($,P)=>{let q;for(;$!==P;)q=h($),n($),$=q;n(P)},nt=($,P,q)=>{const{bum:F,scope:k,job:N,subTree:K,um:X,m:U,a:B}=$;z0(U),z0(B),F&&za(F),k.stop(),N&&(N.flags|=8,me(K,$,P,q)),X&&Zt(X,P),Zt(()=>{$.isUnmounted=!0},P),P&&P.pendingBranch&&!P.isUnmounted&&$.asyncDep&&!$.asyncResolved&&$.suspenseId===P.pendingId&&(P.deps--,P.deps===0&&P.resolve())},_e=($,P,q,F=!1,k=!1,N=0)=>{for(let K=N;K<$.length;K++)me($[K],P,q,F,k)},A=$=>{if($.shapeFlag&6)return A($.component.subTree);if($.shapeFlag&128)return $.suspense.next();const P=h($.anchor||$.el),q=P&&P[NH];return q?h(q):P};let W=!1;const Y=($,P,q)=>{$==null?P._vnode&&me(P._vnode,null,null,!0):p(P._vnode||null,$,P,null,null,null,q),P._vnode=$,W||(W=!0,N0(),rL(),W=!1)},ne={p,um:me,m:re,r:xe,mt:D,mc:b,pc:ee,pbc:T,n:A,o:r};return{render:Y,hydrate:void 0,createApp:nW(Y)}}function bl({type:r,props:e},t){return t==="svg"&&r==="foreignObject"||t==="mathml"&&r==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:t}function Gi({effect:r,job:e},t){t?(r.flags|=32,e.flags|=4):(r.flags&=-33,e.flags&=-5)}function fW(r,e){return(!r||r&&!r.pendingBranch)&&e&&!e.persisted}function EL(r,e,t=!1){const i=r.children,n=e.children;if(ge(i)&&ge(n))for(let s=0;s>1,r[t[a]]0&&(e[i]=t[s-1]),t[s]=i)}}for(s=t.length,o=t[s-1];s-- >0;)t[s]=o,o=e[o];return t}function SL(r){const e=r.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:SL(e)}function z0(r){if(r)for(let e=0;eXr(pW);function Wa(r,e,t){return OL(r,e,t)}function OL(r,e,t=je){const{immediate:i,deep:n,flush:s,once:o}=t,a=Mt({},t),u=e&&i||!e&&s!=="post";let l;if(xo){if(s==="sync"){const f=gW();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!u){const f=()=>{};return f.stop=Nr,f.resume=Nr,f.pause=Nr,f}}const c=zt;a.call=(f,v,p)=>Br(f,c,v,p);let d=!1;s==="post"?a.scheduler=f=>{Zt(f,c&&c.suspense)}:s!=="sync"&&(d=!0,a.scheduler=(f,v)=>{v?f():gw(f)}),a.augmentJob=f=>{e&&(f.flags|=4),d&&(f.flags|=2,c&&(f.id=c.uid,f.i=c))};const h=qH(r,e,a);return xo&&(l?l.push(h):u&&h()),h}function mW(r,e,t){const i=this.proxy,n=lt(r)?r.includes(".")?IL(i,r):()=>i[r]:r.bind(i,i);let s;be(e)?s=e:(s=e.handler,t=e);const o=Ko(this),a=OL(n,s.bind(i),t);return o(),a}function IL(r,e){const t=e.split(".");return()=>{let i=r;for(let n=0;ne==="modelValue"||e==="model-value"?r.modelModifiers:r[`${e}Modifiers`]||r[`${xi(e)}Modifiers`]||r[`${_n(e)}Modifiers`];function bW(r,e,...t){if(r.isUnmounted)return;const i=r.vnode.props||je;let n=t;const s=e.startsWith("update:"),o=s&&yW(i,e.slice(7));o&&(o.trim&&(n=t.map(c=>lt(c)?c.trim():c)),o.number&&(n=t.map(O_)));let a,u=i[a=fl(e)]||i[a=fl(xi(e))];!u&&s&&(u=i[a=fl(_n(e))]),u&&Br(u,r,6,n);const l=i[a+"Once"];if(l){if(!r.emitted)r.emitted={};else if(r.emitted[a])return;r.emitted[a]=!0,Br(l,r,6,n)}}function TL(r,e,t=!1){const i=e.emitsCache,n=i.get(r);if(n!==void 0)return n;const s=r.emits;let o={},a=!1;if(!be(r)){const u=l=>{const c=TL(l,e,!0);c&&(a=!0,Mt(o,c))};!t&&e.mixins.length&&e.mixins.forEach(u),r.extends&&u(r.extends),r.mixins&&r.mixins.forEach(u)}return!s&&!a?(Ye(r)&&i.set(r,null),null):(ge(s)?s.forEach(u=>o[u]=null):Mt(o,s),Ye(r)&&i.set(r,o),o)}function $u(r,e){return!r||!mu(e)?!1:(e=e.slice(2).replace(/Once$/,""),Ne(r,e[0].toLowerCase()+e.slice(1))||Ne(r,_n(e))||Ne(r,e))}function H0(r){const{type:e,vnode:t,proxy:i,withProxy:n,propsOptions:[s],slots:o,attrs:a,emit:u,render:l,renderCache:c,props:d,data:h,setupState:f,ctx:v,inheritAttrs:p}=r,_=Za(r);let m,g;try{if(t.shapeFlag&4){const y=n||i,O=y;m=xr(l.call(O,y,c,d,f,h,v)),g=a}else{const y=e;m=xr(y.length>1?y(d,{attrs:a,slots:o,emit:u}):y(d,null)),g=e.props?a:_W(a)}}catch(y){go.length=0,Ou(y,r,1),m=yt(qi)}let E=m;if(g&&p!==!1){const y=Object.keys(g),{shapeFlag:O}=E;y.length&&O&7&&(s&&y.some(sw)&&(g=wW(g,s)),E=hs(E,g,!1,!0))}return t.dirs&&(E=hs(E,null,!1,!0),E.dirs=E.dirs?E.dirs.concat(t.dirs):t.dirs),t.transition&&mw(E,t.transition),m=E,Za(_),m}const _W=r=>{let e;for(const t in r)(t==="class"||t==="style"||mu(t))&&((e||(e={}))[t]=r[t]);return e},wW=(r,e)=>{const t={};for(const i in r)(!sw(i)||!(i.slice(9)in e))&&(t[i]=r[i]);return t};function EW(r,e,t){const{props:i,children:n,component:s}=r,{props:o,children:a,patchFlag:u}=e,l=s.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&u>=0){if(u&1024)return!0;if(u&16)return i?W0(i,o,l):!!o;if(u&8){const c=e.dynamicProps;for(let d=0;dr.__isSuspense;function OW(r,e){e&&e.pendingBranch?ge(r)?e.effects.push(...r):e.effects.push(r):MH(r)}const pt=Symbol.for("v-fgt"),Pu=Symbol.for("v-txt"),qi=Symbol.for("v-cmt"),_l=Symbol.for("v-stc"),go=[];let rr=null;function Ge(r=!1){go.push(rr=r?null:[])}function IW(){go.pop(),rr=go[go.length-1]||null}let Ro=1;function U0(r,e=!1){Ro+=r,r<0&&rr&&e&&(rr.hasOnce=!0)}function PL(r){return r.dynamicChildren=Ro>0?rr||rs:null,IW(),Ro>0&&rr&&rr.push(r),r}function Ct(r,e,t,i,n,s){return PL(Q(r,e,t,i,n,s,!0))}function Di(r,e,t,i,n){return PL(yt(r,e,t,i,n,!0))}function Co(r){return r?r.__v_isVNode===!0:!1}function Qs(r,e){return r.type===e.type&&r.key===e.key}const RL=({key:r})=>r??null,Ua=({ref:r,ref_key:e,ref_for:t})=>(typeof r=="number"&&(r=""+r),r!=null?lt(r)||At(r)||be(r)?{i:Dt,r,k:e,f:!!t}:r:null);function Q(r,e=null,t=null,i=0,n=null,s=r===pt?0:1,o=!1,a=!1){const u={__v_isVNode:!0,__v_skip:!0,type:r,props:e,key:e&&RL(e),ref:e&&Ua(e),scopeId:nL,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:i,dynamicProps:n,dynamicChildren:null,appContext:null,ctx:Dt};return a?(_w(u,t),s&128&&r.normalize(u)):t&&(u.shapeFlag|=lt(t)?8:16),Ro>0&&!o&&rr&&(u.patchFlag>0||s&6)&&u.patchFlag!==32&&rr.push(u),u}const yt=TW;function TW(r,e=null,t=null,i=0,n=null,s=!1){if((!r||r===YH)&&(r=qi),Co(r)){const a=hs(r,e,!0);return t&&_w(a,t),Ro>0&&!s&&rr&&(a.shapeFlag&6?rr[rr.indexOf(r)]=a:rr.push(a)),a.patchFlag=-2,a}if(NW(r)&&(r=r.__vccOpts),e){e=$W(e);let{class:a,style:u}=e;a&&!lt(a)&&(e.class=wu(a)),Ye(u)&&(pw(u)&&!ge(u)&&(u=Mt({},u)),e.style=uw(u))}const o=lt(r)?1:$L(r)?128:FH(r)?64:Ye(r)?4:be(r)?2:0;return Q(r,e,t,i,n,o,s,!0)}function $W(r){return r?pw(r)||pL(r)?Mt({},r):r:null}function hs(r,e,t=!1,i=!1){const{props:n,ref:s,patchFlag:o,children:a,transition:u}=r,l=e?PW(n||{},e):n,c={__v_isVNode:!0,__v_skip:!0,type:r.type,props:l,key:l&&RL(l),ref:e&&e.ref?t&&s?ge(s)?s.concat(Ua(e)):[s,Ua(e)]:Ua(e):s,scopeId:r.scopeId,slotScopeIds:r.slotScopeIds,children:a,target:r.target,targetStart:r.targetStart,targetAnchor:r.targetAnchor,staticCount:r.staticCount,shapeFlag:r.shapeFlag,patchFlag:e&&r.type!==pt?o===-1?16:o|16:o,dynamicProps:r.dynamicProps,dynamicChildren:r.dynamicChildren,appContext:r.appContext,dirs:r.dirs,transition:u,component:r.component,suspense:r.suspense,ssContent:r.ssContent&&hs(r.ssContent),ssFallback:r.ssFallback&&hs(r.ssFallback),el:r.el,anchor:r.anchor,ctx:r.ctx,ce:r.ce};return u&&i&&mw(c,u.clone(c)),c}function Qi(r=" ",e=0){return yt(Pu,null,r,e)}function A_(r="",e=!1){return e?(Ge(),Di(qi,null,r)):yt(qi,null,r)}function xr(r){return r==null||typeof r=="boolean"?yt(qi):ge(r)?yt(pt,null,r.slice()):Co(r)?yi(r):yt(Pu,null,String(r))}function yi(r){return r.el===null&&r.patchFlag!==-1||r.memo?r:hs(r)}function _w(r,e){let t=0;const{shapeFlag:i}=r;if(e==null)e=null;else if(ge(e))t=16;else if(typeof e=="object")if(i&65){const n=e.default;n&&(n._c&&(n._d=!1),_w(r,n()),n._c&&(n._d=!0));return}else{t=32;const n=e._;!n&&!pL(e)?e._ctx=Dt:n===3&&Dt&&(Dt.slots._===1?e._=1:(e._=2,r.patchFlag|=1024))}else be(e)?(e={default:e,_ctx:Dt},t=32):(e=String(e),i&64?(t=16,e=[Qi(e)]):t=8);r.children=e,r.shapeFlag|=t}function PW(...r){const e={};for(let t=0;t{let n;return(n=r[t])||(n=r[t]=[]),n.push(i),s=>{n.length>1?n.forEach(o=>o(s)):n[0](s)}};ru=e("__VUE_INSTANCE_SETTERS__",t=>zt=t),M_=e("__VUE_SSR_SETTERS__",t=>xo=t)}const Ko=r=>{const e=zt;return ru(r),r.scope.on(),()=>{r.scope.off(),ru(e)}},V0=()=>{zt&&zt.scope.off(),ru(null)};function CL(r){return r.vnode.shapeFlag&4}let xo=!1;function qW(r,e=!1,t=!1){e&&M_(e);const{props:i,children:n}=r.vnode,s=CL(r);sW(r,i,s,e),lW(r,n,t);const o=s?DW(r,e):void 0;return e&&M_(!1),o}function DW(r,e){const t=r.type;r.accessCache=Object.create(null),r.proxy=new Proxy(r.ctx,JH);const{setup:i}=t;if(i){Fi();const n=r.setupContext=i.length>1?MW(r):null,s=Ko(r),o=Vo(i,r,0,[r.props,n]),a=Ij(o);if(ki(),s(),(a||r.sp)&&!os(r)&&sL(r),a){if(o.then(V0,V0),e)return o.then(u=>{K0(r,u)}).catch(u=>{Ou(u,r,0)});r.asyncDep=o}else K0(r,o)}else xL(r)}function K0(r,e,t){be(e)?r.type.__ssrInlineRender?r.ssrRender=e:r.render=e:Ye(e)&&(r.setupState=Qj(e)),xL(r)}function xL(r,e,t){const i=r.type;r.render||(r.render=i.render||Nr);{const n=Ko(r);Fi();try{QH(r)}finally{ki(),n()}}}const AW={get(r,e){return xt(r,"get",""),r[e]}};function MW(r){const e=t=>{r.exposed=t||{}};return{attrs:new Proxy(r.attrs,AW),slots:r.slots,emit:r.emit,expose:e}}function Ru(r){return r.exposed?r.exposeProxy||(r.exposeProxy=new Proxy(Qj(Xj(r.exposed)),{get(e,t){if(t in e)return e[t];if(t in po)return po[t](r)},has(e,t){return t in e||t in po}})):r.proxy}function NW(r){return be(r)&&"__vccOpts"in r}const br=(r,e)=>CH(r,e,xo);function ww(r,e,t){const i=arguments.length;return i===2?Ye(e)&&!ge(e)?Co(e)?yt(r,null,[e]):yt(r,e):yt(r,null,e):(i>3?t=Array.prototype.slice.call(arguments,2):i===3&&Co(t)&&(t=[t]),yt(r,e,t))}const FW="3.5.13";/** +* @vue/runtime-dom v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let N_;const G0=typeof window<"u"&&window.trustedTypes;if(G0)try{N_=G0.createPolicy("vue",{createHTML:r=>r})}catch{}const qL=N_?r=>N_.createHTML(r):r=>r,kW="http://www.w3.org/2000/svg",BW="http://www.w3.org/1998/Math/MathML",Ur=typeof document<"u"?document:null,Y0=Ur&&Ur.createElement("template"),jW={insert:(r,e,t)=>{e.insertBefore(r,t||null)},remove:r=>{const e=r.parentNode;e&&e.removeChild(r)},createElement:(r,e,t,i)=>{const n=e==="svg"?Ur.createElementNS(kW,r):e==="mathml"?Ur.createElementNS(BW,r):t?Ur.createElement(r,{is:t}):Ur.createElement(r);return r==="select"&&i&&i.multiple!=null&&n.setAttribute("multiple",i.multiple),n},createText:r=>Ur.createTextNode(r),createComment:r=>Ur.createComment(r),setText:(r,e)=>{r.nodeValue=e},setElementText:(r,e)=>{r.textContent=e},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>Ur.querySelector(r),setScopeId(r,e){r.setAttribute(e,"")},insertStaticContent(r,e,t,i,n,s){const o=t?t.previousSibling:e.lastChild;if(n&&(n===s||n.nextSibling))for(;e.insertBefore(n.cloneNode(!0),t),!(n===s||!(n=n.nextSibling)););else{Y0.innerHTML=qL(i==="svg"?`${r}`:i==="mathml"?`${r}`:r);const a=Y0.content;if(i==="svg"||i==="mathml"){const u=a.firstChild;for(;u.firstChild;)a.appendChild(u.firstChild);a.removeChild(u)}e.insertBefore(a,t)}return[o?o.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},LW=Symbol("_vtc");function zW(r,e,t){const i=r[LW];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?r.removeAttribute("class"):t?r.setAttribute("class",e):r.className=e}const X0=Symbol("_vod"),HW=Symbol("_vsh"),WW=Symbol(""),UW=/(^|;)\s*display\s*:/;function VW(r,e,t){const i=r.style,n=lt(t);let s=!1;if(t&&!n){if(e)if(lt(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();t[a]==null&&Va(i,a,"")}else for(const o in e)t[o]==null&&Va(i,o,"");for(const o in t)o==="display"&&(s=!0),Va(i,o,t[o])}else if(n){if(e!==t){const o=i[WW];o&&(t+=";"+o),i.cssText=t,s=UW.test(t)}}else e&&r.removeAttribute("style");X0 in r&&(r[X0]=s?i.display:"",r[HW]&&(i.display="none"))}const J0=/\s*!important$/;function Va(r,e,t){if(ge(t))t.forEach(i=>Va(r,e,i));else if(t==null&&(t=""),e.startsWith("--"))r.setProperty(e,t);else{const i=KW(r,e);J0.test(t)?r.setProperty(_n(i),t.replace(J0,""),"important"):r[i]=t}}const Q0=["Webkit","Moz","ms"],wl={};function KW(r,e){const t=wl[e];if(t)return t;let i=xi(e);if(i!=="filter"&&i in r)return wl[e]=i;i=Pj(i);for(let n=0;nEl||(JW.then(()=>El=0),El=Date.now());function ZW(r,e){const t=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=t.attached)return;Br(e4(i,t.value),e,5,[i])};return t.value=r,t.attached=QW(),t}function e4(r,e){if(ge(e)){const t=r.stopImmediatePropagation;return r.stopImmediatePropagation=()=>{t.call(r),r._stopped=!0},e.map(i=>n=>!n._stopped&&i&&i(n))}else return e}const nE=r=>r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r.charCodeAt(2)>96&&r.charCodeAt(2)<123,t4=(r,e,t,i,n,s)=>{const o=n==="svg";e==="class"?zW(r,i,o):e==="style"?VW(r,t,i):mu(e)?sw(e)||YW(r,e,t,i,s):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):r4(r,e,i,o))?(tE(r,e,i),!r.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&eE(r,e,i,o,s,e!=="value")):r._isVueCE&&(/[A-Z]/.test(e)||!lt(i))?tE(r,xi(e),i,s,e):(e==="true-value"?r._trueValue=i:e==="false-value"&&(r._falseValue=i),eE(r,e,i,o))};function r4(r,e,t,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in r&&nE(e)&&be(t));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&r.tagName==="INPUT"||e==="type"&&r.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const n=r.tagName;if(n==="IMG"||n==="VIDEO"||n==="CANVAS"||n==="SOURCE")return!1}return nE(e)&<(t)?!1:e in r}const sE=r=>{const e=r.props["onUpdate:modelValue"]||!1;return ge(e)?t=>za(e,t):e};function i4(r){r.target.composing=!0}function oE(r){const e=r.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Sl=Symbol("_assign"),ao={created(r,{modifiers:{lazy:e,trim:t,number:i}},n){r[Sl]=sE(n);const s=i||n.props&&n.props.type==="number";Gn(r,e?"change":"input",o=>{if(o.target.composing)return;let a=r.value;t&&(a=a.trim()),s&&(a=O_(a)),r[Sl](a)}),t&&Gn(r,"change",()=>{r.value=r.value.trim()}),e||(Gn(r,"compositionstart",i4),Gn(r,"compositionend",oE),Gn(r,"change",oE))},mounted(r,{value:e}){r.value=e??""},beforeUpdate(r,{value:e,oldValue:t,modifiers:{lazy:i,trim:n,number:s}},o){if(r[Sl]=sE(o),r.composing)return;const a=(s||r.type==="number")&&!/^0\d/.test(r.value)?O_(r.value):r.value,u=e??"";a!==u&&(document.activeElement===r&&r.type!=="range"&&(i&&e===t||n&&r.value.trim()===u)||(r.value=u))}},n4=["ctrl","shift","alt","meta"],s4={stop:r=>r.stopPropagation(),prevent:r=>r.preventDefault(),self:r=>r.target!==r.currentTarget,ctrl:r=>!r.ctrlKey,shift:r=>!r.shiftKey,alt:r=>!r.altKey,meta:r=>!r.metaKey,left:r=>"button"in r&&r.button!==0,middle:r=>"button"in r&&r.button!==1,right:r=>"button"in r&&r.button!==2,exact:(r,e)=>n4.some(t=>r[`${t}Key`]&&!e.includes(t))},o4=(r,e)=>{const t=r._withMods||(r._withMods={}),i=e.join(".");return t[i]||(t[i]=(n,...s)=>{for(let o=0;o{const e=u4().createApp(...r),{mount:t}=e;return e.mount=i=>{const n=d4(i);if(!n)return;const s=e._component;!be(s)&&!s.render&&!s.template&&(s.template=n.innerHTML),n.nodeType===1&&(n.textContent="");const o=t(n,!1,c4(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),o},e};function c4(r){if(r instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&r instanceof MathMLElement)return"mathml"}function d4(r){return lt(r)?document.querySelector(r):r}/*! + * pinia v3.0.2 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */const h4=Symbol();var uE;(function(r){r.direct="direct",r.patchObject="patch object",r.patchFunction="patch function"})(uE||(uE={}));function f4(){const r=oH(!0),e=r.run(()=>$t({}));let t=[],i=[];const n=Xj({install(s){n._a=s,s.provide(h4,n),s.config.globalProperties.$pinia=n,i.forEach(o=>t.push(o)),i=[]},use(s){return this._a?t.push(s):i.push(s),this},_p:t,_a:null,_e:r,_s:new Map,state:e});return n}/*! + * vue-router v4.5.1 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */const Yn=typeof document<"u";function DL(r){return typeof r=="object"||"displayName"in r||"props"in r||"__vccOpts"in r}function v4(r){return r.__esModule||r[Symbol.toStringTag]==="Module"||r.default&&DL(r.default)}const Ae=Object.assign;function Ol(r,e){const t={};for(const i in e){const n=e[i];t[i]=wr(n)?n.map(r):r(n)}return t}const mo=()=>{},wr=Array.isArray,AL=/#/g,p4=/&/g,g4=/\//g,m4=/=/g,y4=/\?/g,ML=/\+/g,b4=/%5B/g,_4=/%5D/g,NL=/%5E/g,w4=/%60/g,FL=/%7B/g,E4=/%7C/g,kL=/%7D/g,S4=/%20/g;function Ew(r){return encodeURI(""+r).replace(E4,"|").replace(b4,"[").replace(_4,"]")}function O4(r){return Ew(r).replace(FL,"{").replace(kL,"}").replace(NL,"^")}function F_(r){return Ew(r).replace(ML,"%2B").replace(S4,"+").replace(AL,"%23").replace(p4,"%26").replace(w4,"`").replace(FL,"{").replace(kL,"}").replace(NL,"^")}function I4(r){return F_(r).replace(m4,"%3D")}function T4(r){return Ew(r).replace(AL,"%23").replace(y4,"%3F")}function $4(r){return r==null?"":T4(r).replace(g4,"%2F")}function qo(r){try{return decodeURIComponent(""+r)}catch{}return""+r}const P4=/\/$/,R4=r=>r.replace(P4,"");function Il(r,e,t="/"){let i,n={},s="",o="";const a=e.indexOf("#");let u=e.indexOf("?");return a=0&&(u=-1),u>-1&&(i=e.slice(0,u),s=e.slice(u+1,a>-1?a:e.length),n=r(s)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=D4(i??e,t),{fullPath:i+(s&&"?")+s+o,path:i,query:n,hash:qo(o)}}function C4(r,e){const t=e.query?r(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function lE(r,e){return!e||!r.toLowerCase().startsWith(e.toLowerCase())?r:r.slice(e.length)||"/"}function x4(r,e,t){const i=e.matched.length-1,n=t.matched.length-1;return i>-1&&i===n&&fs(e.matched[i],t.matched[n])&&BL(e.params,t.params)&&r(e.query)===r(t.query)&&e.hash===t.hash}function fs(r,e){return(r.aliasOf||r)===(e.aliasOf||e)}function BL(r,e){if(Object.keys(r).length!==Object.keys(e).length)return!1;for(const t in r)if(!q4(r[t],e[t]))return!1;return!0}function q4(r,e){return wr(r)?cE(r,e):wr(e)?cE(e,r):r===e}function cE(r,e){return wr(e)?r.length===e.length&&r.every((t,i)=>t===e[i]):r.length===1&&r[0]===e}function D4(r,e){if(r.startsWith("/"))return r;if(!r)return e;const t=e.split("/"),i=r.split("/"),n=i[i.length-1];(n===".."||n===".")&&i.push("");let s=t.length-1,o,a;for(o=0;o1&&s--;else break;return t.slice(0,s).join("/")+"/"+i.slice(o).join("/")}const pi={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Do;(function(r){r.pop="pop",r.push="push"})(Do||(Do={}));var yo;(function(r){r.back="back",r.forward="forward",r.unknown=""})(yo||(yo={}));function A4(r){if(!r)if(Yn){const e=document.querySelector("base");r=e&&e.getAttribute("href")||"/",r=r.replace(/^\w+:\/\/[^\/]+/,"")}else r="/";return r[0]!=="/"&&r[0]!=="#"&&(r="/"+r),R4(r)}const M4=/^[^#]+#/;function N4(r,e){return r.replace(M4,"#")+e}function F4(r,e){const t=document.documentElement.getBoundingClientRect(),i=r.getBoundingClientRect();return{behavior:e.behavior,left:i.left-t.left-(e.left||0),top:i.top-t.top-(e.top||0)}}const Cu=()=>({left:window.scrollX,top:window.scrollY});function k4(r){let e;if("el"in r){const t=r.el,i=typeof t=="string"&&t.startsWith("#"),n=typeof t=="string"?i?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!n)return;e=F4(n,r)}else e=r;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function dE(r,e){return(history.state?history.state.position-e:-1)+r}const k_=new Map;function B4(r,e){k_.set(r,e)}function j4(r){const e=k_.get(r);return k_.delete(r),e}let L4=()=>location.protocol+"//"+location.host;function jL(r,e){const{pathname:t,search:i,hash:n}=e,s=r.indexOf("#");if(s>-1){let a=n.includes(r.slice(s))?r.slice(s).length:1,u=n.slice(a);return u[0]!=="/"&&(u="/"+u),lE(u,"")}return lE(t,r)+i+n}function z4(r,e,t,i){let n=[],s=[],o=null;const a=({state:h})=>{const f=jL(r,location),v=t.value,p=e.value;let _=0;if(h){if(t.value=f,e.value=h,o&&o===v){o=null;return}_=p?h.position-p.position:0}else i(f);n.forEach(m=>{m(t.value,v,{delta:_,type:Do.pop,direction:_?_>0?yo.forward:yo.back:yo.unknown})})};function u(){o=t.value}function l(h){n.push(h);const f=()=>{const v=n.indexOf(h);v>-1&&n.splice(v,1)};return s.push(f),f}function c(){const{history:h}=window;h.state&&h.replaceState(Ae({},h.state,{scroll:Cu()}),"")}function d(){for(const h of s)h();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:u,listen:l,destroy:d}}function hE(r,e,t,i=!1,n=!1){return{back:r,current:e,forward:t,replaced:i,position:window.history.length,scroll:n?Cu():null}}function H4(r){const{history:e,location:t}=window,i={value:jL(r,t)},n={value:e.state};n.value||s(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function s(u,l,c){const d=r.indexOf("#"),h=d>-1?(t.host&&document.querySelector("base")?r:r.slice(d))+u:L4()+r+u;try{e[c?"replaceState":"pushState"](l,"",h),n.value=l}catch(f){console.error(f),t[c?"replace":"assign"](h)}}function o(u,l){const c=Ae({},e.state,hE(n.value.back,u,n.value.forward,!0),l,{position:n.value.position});s(u,c,!0),i.value=u}function a(u,l){const c=Ae({},n.value,e.state,{forward:u,scroll:Cu()});s(c.current,c,!0);const d=Ae({},hE(i.value,u,null),{position:c.position+1},l);s(u,d,!1),i.value=u}return{location:i,state:n,push:a,replace:o}}function W4(r){r=A4(r);const e=H4(r),t=z4(r,e.state,e.location,e.replace);function i(s,o=!0){o||t.pauseListeners(),history.go(s)}const n=Ae({location:"",base:r,go:i,createHref:N4.bind(null,r)},e,t);return Object.defineProperty(n,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(n,"state",{enumerable:!0,get:()=>e.state.value}),n}function U4(r){return typeof r=="string"||r&&typeof r=="object"}function LL(r){return typeof r=="string"||typeof r=="symbol"}const zL=Symbol("");var fE;(function(r){r[r.aborted=4]="aborted",r[r.cancelled=8]="cancelled",r[r.duplicated=16]="duplicated"})(fE||(fE={}));function vs(r,e){return Ae(new Error,{type:r,[zL]:!0},e)}function Wr(r,e){return r instanceof Error&&zL in r&&(e==null||!!(r.type&e))}const vE="[^/]+?",V4={sensitive:!1,strict:!1,start:!0,end:!0},K4=/[.+*?^${}()[\]/\\]/g;function G4(r,e){const t=Ae({},V4,e),i=[];let n=t.start?"^":"";const s=[];for(const l of r){const c=l.length?[]:[90];t.strict&&!l.length&&(n+="/");for(let d=0;de.length?e.length===1&&e[0]===80?1:-1:0}function HL(r,e){let t=0;const i=r.score,n=e.score;for(;t0&&e[e.length-1]<0}const X4={type:0,value:""},J4=/[a-zA-Z0-9_]/;function Q4(r){if(!r)return[[]];if(r==="/")return[[X4]];if(!r.startsWith("/"))throw new Error(`Invalid path "${r}"`);function e(f){throw new Error(`ERR (${t})/"${l}": ${f}`)}let t=0,i=t;const n=[];let s;function o(){s&&n.push(s),s=[]}let a=0,u,l="",c="";function d(){l&&(t===0?s.push({type:0,value:l}):t===1||t===2||t===3?(s.length>1&&(u==="*"||u==="+")&&e(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:l,regexp:c,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):e("Invalid state to consume buffer"),l="")}function h(){l+=u}for(;a{o(E)}:mo}function o(d){if(LL(d)){const h=i.get(d);h&&(i.delete(d),t.splice(t.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=t.indexOf(d);h>-1&&(t.splice(h,1),d.record.name&&i.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function a(){return t}function u(d){const h=iU(d,t);t.splice(h,0,d),d.record.name&&!yE(d)&&i.set(d.record.name,d)}function l(d,h){let f,v={},p,_;if("name"in d&&d.name){if(f=i.get(d.name),!f)throw vs(1,{location:d});_=f.record.name,v=Ae(gE(h.params,f.keys.filter(E=>!E.optional).concat(f.parent?f.parent.keys.filter(E=>E.optional):[]).map(E=>E.name)),d.params&&gE(d.params,f.keys.map(E=>E.name))),p=f.stringify(v)}else if(d.path!=null)p=d.path,f=t.find(E=>E.re.test(p)),f&&(v=f.parse(p),_=f.record.name);else{if(f=h.name?i.get(h.name):t.find(E=>E.re.test(h.path)),!f)throw vs(1,{location:d,currentLocation:h});_=f.record.name,v=Ae({},h.params,d.params),p=f.stringify(v)}const m=[];let g=f;for(;g;)m.unshift(g.record),g=g.parent;return{name:_,path:p,params:v,matched:m,meta:rU(m)}}r.forEach(d=>s(d));function c(){t.length=0,i.clear()}return{addRoute:s,resolve:l,removeRoute:o,clearRoutes:c,getRoutes:a,getRecordMatcher:n}}function gE(r,e){const t={};for(const i of e)i in r&&(t[i]=r[i]);return t}function mE(r){const e={path:r.path,redirect:r.redirect,name:r.name,meta:r.meta||{},aliasOf:r.aliasOf,beforeEnter:r.beforeEnter,props:tU(r),children:r.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in r?r.components||null:r.component&&{default:r.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function tU(r){const e={},t=r.props||!1;if("component"in r)e.default=t;else for(const i in r.components)e[i]=typeof t=="object"?t[i]:t;return e}function yE(r){for(;r;){if(r.record.aliasOf)return!0;r=r.parent}return!1}function rU(r){return r.reduce((e,t)=>Ae(e,t.meta),{})}function bE(r,e){const t={};for(const i in r)t[i]=i in e?e[i]:r[i];return t}function iU(r,e){let t=0,i=e.length;for(;t!==i;){const s=t+i>>1;HL(r,e[s])<0?i=s:t=s+1}const n=nU(r);return n&&(i=e.lastIndexOf(n,i-1)),i}function nU(r){let e=r;for(;e=e.parent;)if(WL(e)&&HL(r,e)===0)return e}function WL({record:r}){return!!(r.name||r.components&&Object.keys(r.components).length||r.redirect)}function sU(r){const e={};if(r===""||r==="?")return e;const i=(r[0]==="?"?r.slice(1):r).split("&");for(let n=0;ns&&F_(s)):[i&&F_(i)]).forEach(s=>{s!==void 0&&(e+=(e.length?"&":"")+t,s!=null&&(e+="="+s))})}return e}function oU(r){const e={};for(const t in r){const i=r[t];i!==void 0&&(e[t]=wr(i)?i.map(n=>n==null?null:""+n):i==null?i:""+i)}return e}const aU=Symbol(""),wE=Symbol(""),Sw=Symbol(""),UL=Symbol(""),B_=Symbol("");function Zs(){let r=[];function e(i){return r.push(i),()=>{const n=r.indexOf(i);n>-1&&r.splice(n,1)}}function t(){r=[]}return{add:e,list:()=>r.slice(),reset:t}}function bi(r,e,t,i,n,s=o=>o()){const o=i&&(i.enterCallbacks[n]=i.enterCallbacks[n]||[]);return()=>new Promise((a,u)=>{const l=h=>{h===!1?u(vs(4,{from:t,to:e})):h instanceof Error?u(h):U4(h)?u(vs(2,{from:e,to:h})):(o&&i.enterCallbacks[n]===o&&typeof h=="function"&&o.push(h),a())},c=s(()=>r.call(i&&i.instances[n],e,t,l));let d=Promise.resolve(c);r.length<3&&(d=d.then(l)),d.catch(h=>u(h))})}function Tl(r,e,t,i,n=s=>s()){const s=[];for(const o of r)for(const a in o.components){let u=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(DL(u)){const c=(u.__vccOpts||u)[e];c&&s.push(bi(c,t,i,o,a,n))}else{let l=u();s.push(()=>l.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=v4(c)?c.default:c;o.mods[a]=c,o.components[a]=d;const f=(d.__vccOpts||d)[e];return f&&bi(f,t,i,o,a,n)()}))}}return s}function EE(r){const e=Xr(Sw),t=Xr(UL),i=br(()=>{const u=tr(r.to);return e.resolve(u)}),n=br(()=>{const{matched:u}=i.value,{length:l}=u,c=u[l-1],d=t.matched;if(!c||!d.length)return-1;const h=d.findIndex(fs.bind(null,c));if(h>-1)return h;const f=SE(u[l-2]);return l>1&&SE(c)===f&&d[d.length-1].path!==f?d.findIndex(fs.bind(null,u[l-2])):h}),s=br(()=>n.value>-1&&hU(t.params,i.value.params)),o=br(()=>n.value>-1&&n.value===t.matched.length-1&&BL(t.params,i.value.params));function a(u={}){if(dU(u)){const l=e[tr(r.replace)?"replace":"push"](tr(r.to)).catch(mo);return r.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>l),l}return Promise.resolve()}return{route:i,href:br(()=>i.value.href),isActive:s,isExactActive:o,navigate:a}}function uU(r){return r.length===1?r[0]:r}const lU=Or({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:EE,setup(r,{slots:e}){const t=Su(EE(r)),{options:i}=Xr(Sw),n=br(()=>({[OE(r.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[OE(r.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const s=e.default&&uU(e.default(t));return r.custom?s:ww("a",{"aria-current":t.isExactActive?r.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:n.value},s)}}}),cU=lU;function dU(r){if(!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)&&!r.defaultPrevented&&!(r.button!==void 0&&r.button!==0)){if(r.currentTarget&&r.currentTarget.getAttribute){const e=r.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return r.preventDefault&&r.preventDefault(),!0}}function hU(r,e){for(const t in e){const i=e[t],n=r[t];if(typeof i=="string"){if(i!==n)return!1}else if(!wr(n)||n.length!==i.length||i.some((s,o)=>s!==n[o]))return!1}return!0}function SE(r){return r?r.aliasOf?r.aliasOf.path:r.path:""}const OE=(r,e,t)=>r??e??t,fU=Or({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(r,{attrs:e,slots:t}){const i=Xr(B_),n=br(()=>r.route||i.value),s=Xr(wE,0),o=br(()=>{let l=tr(s);const{matched:c}=n.value;let d;for(;(d=c[l])&&!d.components;)l++;return l}),a=br(()=>n.value.matched[o.value]);Ha(wE,br(()=>o.value+1)),Ha(aU,a),Ha(B_,n);const u=$t();return Wa(()=>[u.value,a.value,r.name],([l,c,d],[h,f,v])=>{c&&(c.instances[d]=l,f&&f!==c&&l&&l===h&&(c.leaveGuards.size||(c.leaveGuards=f.leaveGuards),c.updateGuards.size||(c.updateGuards=f.updateGuards))),l&&c&&(!f||!fs(c,f)||!h)&&(c.enterCallbacks[d]||[]).forEach(p=>p(l))},{flush:"post"}),()=>{const l=n.value,c=r.name,d=a.value,h=d&&d.components[c];if(!h)return IE(t.default,{Component:h,route:l});const f=d.props[c],v=f?f===!0?l.params:typeof f=="function"?f(l):f:null,_=ww(h,Ae({},v,e,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(d.instances[c]=null)},ref:u}));return IE(t.default,{Component:_,route:l})||_}}});function IE(r,e){if(!r)return null;const t=r(e);return t.length===1?t[0]:t}const VL=fU;function vU(r){const e=eU(r.routes,r),t=r.parseQuery||sU,i=r.stringifyQuery||_E,n=r.history,s=Zs(),o=Zs(),a=Zs(),u=TH(pi);let l=pi;Yn&&r.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=Ol.bind(null,A=>""+A),d=Ol.bind(null,$4),h=Ol.bind(null,qo);function f(A,W){let Y,ne;return LL(A)?(Y=e.getRecordMatcher(A),ne=W):ne=A,e.addRoute(ne,Y)}function v(A){const W=e.getRecordMatcher(A);W&&e.removeRoute(W)}function p(){return e.getRoutes().map(A=>A.record)}function _(A){return!!e.getRecordMatcher(A)}function m(A,W){if(W=Ae({},W||u.value),typeof A=="string"){const q=Il(t,A,W.path),F=e.resolve({path:q.path},W),k=n.createHref(q.fullPath);return Ae(q,F,{params:h(F.params),hash:qo(q.hash),redirectedFrom:void 0,href:k})}let Y;if(A.path!=null)Y=Ae({},A,{path:Il(t,A.path,W.path).path});else{const q=Ae({},A.params);for(const F in q)q[F]==null&&delete q[F];Y=Ae({},A,{params:d(q)}),W.params=d(W.params)}const ne=e.resolve(Y,W),Pe=A.hash||"";ne.params=c(h(ne.params));const $=C4(i,Ae({},A,{hash:O4(Pe),path:ne.path})),P=n.createHref($);return Ae({fullPath:$,hash:Pe,query:i===_E?oU(A.query):A.query||{}},ne,{redirectedFrom:void 0,href:P})}function g(A){return typeof A=="string"?Il(t,A,u.value.path):Ae({},A)}function E(A,W){if(l!==A)return vs(8,{from:W,to:A})}function y(A){return S(A)}function O(A){return y(Ae(g(A),{replace:!0}))}function I(A){const W=A.matched[A.matched.length-1];if(W&&W.redirect){const{redirect:Y}=W;let ne=typeof Y=="function"?Y(A):Y;return typeof ne=="string"&&(ne=ne.includes("?")||ne.includes("#")?ne=g(ne):{path:ne},ne.params={}),Ae({query:A.query,hash:A.hash,params:ne.path!=null?{}:A.params},ne)}}function S(A,W){const Y=l=m(A),ne=u.value,Pe=A.state,$=A.force,P=A.replace===!0,q=I(Y);if(q)return S(Ae(g(q),{state:typeof q=="object"?Ae({},Pe,q.state):Pe,force:$,replace:P}),W||Y);const F=Y;F.redirectedFrom=W;let k;return!$&&x4(i,ne,Y)&&(k=vs(16,{to:F,from:ne}),re(ne,ne,!0,!1)),(k?Promise.resolve(k):T(F,ne)).catch(N=>Wr(N)?Wr(N,2)?N:we(N):ee(N,F,ne)).then(N=>{if(N){if(Wr(N,2))return S(Ae({replace:P},g(N.to),{state:typeof N.to=="object"?Ae({},Pe,N.to.state):Pe,force:$}),W||F)}else N=x(F,ne,!0,P,Pe);return R(F,ne,N),N})}function b(A,W){const Y=E(A,W);return Y?Promise.reject(Y):Promise.resolve()}function w(A){const W=De.values().next().value;return W&&typeof W.runWithContext=="function"?W.runWithContext(A):A()}function T(A,W){let Y;const[ne,Pe,$]=pU(A,W);Y=Tl(ne.reverse(),"beforeRouteLeave",A,W);for(const q of ne)q.leaveGuards.forEach(F=>{Y.push(bi(F,A,W))});const P=b.bind(null,A,W);return Y.push(P),_e(Y).then(()=>{Y=[];for(const q of s.list())Y.push(bi(q,A,W));return Y.push(P),_e(Y)}).then(()=>{Y=Tl(Pe,"beforeRouteUpdate",A,W);for(const q of Pe)q.updateGuards.forEach(F=>{Y.push(bi(F,A,W))});return Y.push(P),_e(Y)}).then(()=>{Y=[];for(const q of $)if(q.beforeEnter)if(wr(q.beforeEnter))for(const F of q.beforeEnter)Y.push(bi(F,A,W));else Y.push(bi(q.beforeEnter,A,W));return Y.push(P),_e(Y)}).then(()=>(A.matched.forEach(q=>q.enterCallbacks={}),Y=Tl($,"beforeRouteEnter",A,W,w),Y.push(P),_e(Y))).then(()=>{Y=[];for(const q of o.list())Y.push(bi(q,A,W));return Y.push(P),_e(Y)}).catch(q=>Wr(q,8)?q:Promise.reject(q))}function R(A,W,Y){a.list().forEach(ne=>w(()=>ne(A,W,Y)))}function x(A,W,Y,ne,Pe){const $=E(A,W);if($)return $;const P=W===pi,q=Yn?history.state:{};Y&&(ne||P?n.replace(A.fullPath,Ae({scroll:P&&q&&q.scroll},Pe)):n.push(A.fullPath,Pe)),u.value=A,re(A,W,Y,P),we()}let C;function D(){C||(C=n.listen((A,W,Y)=>{if(!nt.listening)return;const ne=m(A),Pe=I(ne);if(Pe){S(Ae(Pe,{replace:!0,force:!0}),ne).catch(mo);return}l=ne;const $=u.value;Yn&&B4(dE($.fullPath,Y.delta),Cu()),T(ne,$).catch(P=>Wr(P,12)?P:Wr(P,2)?(S(Ae(g(P.to),{force:!0}),ne).then(q=>{Wr(q,20)&&!Y.delta&&Y.type===Do.pop&&n.go(-1,!1)}).catch(mo),Promise.reject()):(Y.delta&&n.go(-Y.delta,!1),ee(P,ne,$))).then(P=>{P=P||x(ne,$,!1),P&&(Y.delta&&!Wr(P,8)?n.go(-Y.delta,!1):Y.type===Do.pop&&Wr(P,20)&&n.go(-1,!1)),R(ne,$,P)}).catch(mo)}))}let j=Zs(),te=Zs(),H;function ee(A,W,Y){we(A);const ne=te.list();return ne.length?ne.forEach(Pe=>Pe(A,W,Y)):console.error(A),Promise.reject(A)}function ve(){return H&&u.value!==pi?Promise.resolve():new Promise((A,W)=>{j.add([A,W])})}function we(A){return H||(H=!A,D(),j.list().forEach(([W,Y])=>A?Y(A):W()),j.reset()),A}function re(A,W,Y,ne){const{scrollBehavior:Pe}=r;if(!Yn||!Pe)return Promise.resolve();const $=!Y&&j4(dE(A.fullPath,0))||(ne||!Y)&&history.state&&history.state.scroll||null;return eL().then(()=>Pe(A,W,$)).then(P=>P&&k4(P)).catch(P=>ee(P,A,W))}const me=A=>n.go(A);let xe;const De=new Set,nt={currentRoute:u,listening:!0,addRoute:f,removeRoute:v,clearRoutes:e.clearRoutes,hasRoute:_,getRoutes:p,resolve:m,options:r,push:y,replace:O,go:me,back:()=>me(-1),forward:()=>me(1),beforeEach:s.add,beforeResolve:o.add,afterEach:a.add,onError:te.add,isReady:ve,install(A){const W=this;A.component("RouterLink",cU),A.component("RouterView",VL),A.config.globalProperties.$router=W,Object.defineProperty(A.config.globalProperties,"$route",{enumerable:!0,get:()=>tr(u)}),Yn&&!xe&&u.value===pi&&(xe=!0,y(n.location).catch(Pe=>{}));const Y={};for(const Pe in pi)Object.defineProperty(Y,Pe,{get:()=>u.value[Pe],enumerable:!0});A.provide(Sw,W),A.provide(UL,Gj(Y)),A.provide(B_,u);const ne=A.unmount;De.add(A),A.unmount=function(){De.delete(A),De.size<1&&(l=pi,C&&C(),C=null,u.value=pi,xe=!1,H=!1),ne()}}};function _e(A){return A.reduce((W,Y)=>W.then(()=>w(Y)),Promise.resolve())}return nt}function pU(r,e){const t=[],i=[],n=[],s=Math.max(e.matched.length,r.matched.length);for(let o=0;ofs(l,a))?i.push(a):t.push(a));const u=r.matched[o];u&&(e.matched.find(l=>fs(l,u))||n.push(u))}return[t,i,n]}const gU=Or({__name:"App",setup(r){return(e,t)=>(Ge(),Di(tr(VL)))}}),mU=$t({width:100,margin:1,color:{dark:"#000000",light:"f0f0f0"}}),yU=r=>{const e=bU(r);_U(e,"teams_qr_code.pdf","application/pdf;teams_qr_code.pdf")},bU=r=>{const e=atob(r),t=new Uint8Array(e.length);for(let i=0;i{const i=new Blob([r],{type:t}),n=URL.createObjectURL(i),s=document.createElement("a");s.href=n,s.download=e,s.click(),URL.revokeObjectURL(n)},TE=async()=>{try{const r=await fetch(ai("/teams"));if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiGetTeams] error:",r),r}},wU=async r=>{try{const e=await fetch(ai("/teams"),{method:"POST",body:JSON.stringify({teams:[{name:r}]})});if(!e.ok)throw new Error(`http error status: ${e.status}`)}catch(e){throw console.error("[apiAddTeam] error:",e),e}},EU=async()=>{try{const r=await fetch(ai("/game"));if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiGetGame] error:",r),r}},SU=async()=>{try{const r=await fetch(ai("/game/start"),{method:"POST"});if(!r.ok)throw new Error(`http error status: ${r.status}`)}catch(r){throw console.error("[apiStartGame] error:",r),r}},OU=async()=>{try{const r=await fetch(ai("/game/stop"),{method:"POST"});if(!r.ok)throw new Error(`http error status: ${r.status}`)}catch(r){throw console.error("[apiStopGame] error:",r),r}},IU=async(r,e)=>{try{const t=await fetch(ai("/teams/"+r+"/applications"),{method:"POST",body:JSON.stringify({applications:[{id:e}]})});if(!t.ok)throw new Error(`http error status: ${t.status}`)}catch(t){throw console.error("[apiGaveApplication] error:",t),t}},$E=async()=>{try{const r=await fetch(ai("/teams/pdf"));if(!r.ok)throw new Error(`http error status: ${r.status}`);const e=await r.json();yU(e.result)}catch(r){throw console.error("[apiDownloadQrCodesFile] error:",r),r}},TU=async()=>{try{const r=await fetch(ai("/graph"));if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiDownloadQrCodesFile] error:",r),r}},$l=async(r,e)=>{try{const t=await fetch(ai("/graph/nodes"),{method:"PUT",body:JSON.stringify({code:r,node:e})});if(!t.ok)throw new Error(`http error status: ${t.status}`);return await t.json()}catch(t){throw console.error("[apiDownloadQrCodesFile] error:",t),t}};function ai(r){return"http://"+window.location.host.split(":")[0]+":8090"+r}var Hn={},Pl,PE;function $U(){return PE||(PE=1,Pl=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Pl}var Rl={},gi={},RE;function wn(){if(RE)return gi;RE=1;let r;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return gi.getSymbolSize=function(i){if(!i)throw new Error('"version" cannot be null or undefined');if(i<1||i>40)throw new Error('"version" should be in range from 1 to 40');return i*4+17},gi.getSymbolTotalCodewords=function(i){return e[i]},gi.getBCHDigit=function(t){let i=0;for(;t!==0;)i++,t>>>=1;return i},gi.setToSJISFunction=function(i){if(typeof i!="function")throw new Error('"toSJISFunc" is not a valid function.');r=i},gi.isKanjiModeEnabled=function(){return typeof r<"u"},gi.toSJIS=function(i){return r(i)},gi}var Cl={},CE;function Ow(){return CE||(CE=1,function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function e(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}r.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},r.from=function(i,n){if(r.isValid(i))return i;try{return e(i)}catch{return n}}}(Cl)),Cl}var xl,xE;function PU(){if(xE)return xl;xE=1;function r(){this.buffer=[],this.length=0}return r.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let i=0;i>>t-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},xl=r,xl}var ql,qE;function RU(){if(qE)return ql;qE=1;function r(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return r.prototype.set=function(e,t,i,n){const s=e*this.size+t;this.data[s]=i,n&&(this.reservedBit[s]=!0)},r.prototype.get=function(e,t){return this.data[e*this.size+t]},r.prototype.xor=function(e,t,i){this.data[e*this.size+t]^=i},r.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},ql=r,ql}var Dl={},DE;function CU(){return DE||(DE=1,function(r){const e=wn().getSymbolSize;r.getRowColCoords=function(i){if(i===1)return[];const n=Math.floor(i/7)+2,s=e(i),o=s===145?26:Math.ceil((s-13)/(2*n-2))*2,a=[s-7];for(let u=1;u=0&&n<=7},r.from=function(n){return r.isValid(n)?parseInt(n,10):void 0},r.getPenaltyN1=function(n){const s=n.size;let o=0,a=0,u=0,l=null,c=null;for(let d=0;d=5&&(o+=e.N1+(a-5)),l=f,a=1),f=n.get(h,d),f===c?u++:(u>=5&&(o+=e.N1+(u-5)),c=f,u=1)}a>=5&&(o+=e.N1+(a-5)),u>=5&&(o+=e.N1+(u-5))}return o},r.getPenaltyN2=function(n){const s=n.size;let o=0;for(let a=0;a=10&&(a===1488||a===93)&&o++,u=u<<1&2047|n.get(c,l),c>=10&&(u===1488||u===93)&&o++}return o*e.N3},r.getPenaltyN4=function(n){let s=0;const o=n.data.length;for(let u=0;u=0;){const o=s[0];for(let u=0;u0){const a=new Uint8Array(this.degree);return a.set(s,o),a}return s},Fl=e,Fl}var kl={},Bl={},jl={},jE;function GL(){return jE||(jE=1,jl.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),jl}var Pr={},LE;function YL(){if(LE)return Pr;LE=1;const r="[0-9]+",e="[A-Z $%*+\\-./:]+";let t="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";t=t.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+t+`)(?:.|[\r +]))+`;Pr.KANJI=new RegExp(t,"g"),Pr.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Pr.BYTE=new RegExp(i,"g"),Pr.NUMERIC=new RegExp(r,"g"),Pr.ALPHANUMERIC=new RegExp(e,"g");const n=new RegExp("^"+t+"$"),s=new RegExp("^"+r+"$"),o=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Pr.testKanji=function(u){return n.test(u)},Pr.testNumeric=function(u){return s.test(u)},Pr.testAlphanumeric=function(u){return o.test(u)},Pr}var zE;function En(){return zE||(zE=1,function(r){const e=GL(),t=YL();r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(s,o){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!e.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?s.ccBits[0]:o<27?s.ccBits[1]:s.ccBits[2]},r.getBestModeForData=function(s){return t.testNumeric(s)?r.NUMERIC:t.testAlphanumeric(s)?r.ALPHANUMERIC:t.testKanji(s)?r.KANJI:r.BYTE},r.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},r.isValid=function(s){return s&&s.bit&&s.ccBits};function i(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+n)}}r.from=function(s,o){if(r.isValid(s))return s;try{return i(s)}catch{return o}}}(Bl)),Bl}var HE;function NU(){return HE||(HE=1,function(r){const e=wn(),t=KL(),i=Ow(),n=En(),s=GL(),o=7973,a=e.getBCHDigit(o);function u(h,f,v){for(let p=1;p<=40;p++)if(f<=r.getCapacity(p,v,h))return p}function l(h,f){return n.getCharCountIndicator(h,f)+4}function c(h,f){let v=0;return h.forEach(function(p){const _=l(p.mode,f);v+=_+p.getBitsLength()}),v}function d(h,f){for(let v=1;v<=40;v++)if(c(h,v)<=r.getCapacity(v,f,n.MIXED))return v}r.from=function(f,v){return s.isValid(f)?parseInt(f,10):v},r.getCapacity=function(f,v,p){if(!s.isValid(f))throw new Error("Invalid QR Code version");typeof p>"u"&&(p=n.BYTE);const _=e.getSymbolTotalCodewords(f),m=t.getTotalCodewordsCount(f,v),g=(_-m)*8;if(p===n.MIXED)return g;const E=g-l(p,f);switch(p){case n.NUMERIC:return Math.floor(E/10*3);case n.ALPHANUMERIC:return Math.floor(E/11*2);case n.KANJI:return Math.floor(E/13);case n.BYTE:default:return Math.floor(E/8)}},r.getBestVersionForData=function(f,v){let p;const _=i.from(v,i.M);if(Array.isArray(f)){if(f.length>1)return d(f,_);if(f.length===0)return 1;p=f[0]}else p=f;return u(p.mode,p.getLength(),_)},r.getEncodedBits=function(f){if(!s.isValid(f)||f<7)throw new Error("Invalid QR Code version");let v=f<<12;for(;e.getBCHDigit(v)-a>=0;)v^=o<=0;)u^=e<0&&(s=this.data.substr(n),o=parseInt(s,10),i.put(o,a*3+1))},Hl=e,Hl}var Wl,VE;function BU(){if(VE)return Wl;VE=1;const r=En(),e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function t(i){this.mode=r.ALPHANUMERIC,this.data=i}return t.getBitsLength=function(n){return 11*Math.floor(n/2)+6*(n%2)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){let s;for(s=0;s+2<=this.data.length;s+=2){let o=e.indexOf(this.data[s])*45;o+=e.indexOf(this.data[s+1]),n.put(o,11)}this.data.length%2&&n.put(e.indexOf(this.data[s]),6)},Wl=t,Wl}var Ul,KE;function jU(){if(KE)return Ul;KE=1;const r=En();function e(t){this.mode=r.BYTE,typeof t=="string"?this.data=new TextEncoder().encode(t):this.data=new Uint8Array(t)}return e.getBitsLength=function(i){return i*8},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(t){for(let i=0,n=this.data.length;i=33088&&s<=40956)s-=33088;else if(s>=57408&&s<=60351)s-=49472;else throw new Error("Invalid SJIS character: "+this.data[n]+` +Make sure your charset is UTF-8`);s=(s>>>8&255)*192+(s&255),i.put(s,13)}},Vl=t,Vl}var Kl={exports:{}},YE;function zU(){return YE||(YE=1,function(r){var e={single_source_shortest_paths:function(t,i,n){var s={},o={};o[i]=0;var a=e.PriorityQueue.make();a.push(i,0);for(var u,l,c,d,h,f,v,p,_;!a.empty();){u=a.pop(),l=u.value,d=u.cost,h=t[l]||{};for(c in h)h.hasOwnProperty(c)&&(f=h[c],v=d+f,p=o[c],_=typeof o[c]>"u",(_||p>v)&&(o[c]=v,a.push(c,v),s[c]=l))}if(typeof n<"u"&&typeof o[n]>"u"){var m=["Could not find a path from ",i," to ",n,"."].join("");throw new Error(m)}return s},extract_shortest_path_from_predecessor_list:function(t,i){for(var n=[],s=i;s;)n.push(s),t[s],s=t[s];return n.reverse(),n},find_path:function(t,i,n){var s=e.single_source_shortest_paths(t,i,n);return e.extract_shortest_path_from_predecessor_list(s,n)},PriorityQueue:{make:function(t){var i=e.PriorityQueue,n={},s;t=t||{};for(s in i)i.hasOwnProperty(s)&&(n[s]=i[s]);return n.queue=[],n.sorter=t.sorter||i.default_sorter,n},default_sorter:function(t,i){return t.cost-i.cost},push:function(t,i){var n={value:t,cost:i};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};r.exports=e}(Kl)),Kl.exports}var XE;function HU(){return XE||(XE=1,function(r){const e=En(),t=kU(),i=BU(),n=jU(),s=LU(),o=YL(),a=wn(),u=zU();function l(m){return unescape(encodeURIComponent(m)).length}function c(m,g,E){const y=[];let O;for(;(O=m.exec(E))!==null;)y.push({data:O[0],index:O.index,mode:g,length:O[0].length});return y}function d(m){const g=c(o.NUMERIC,e.NUMERIC,m),E=c(o.ALPHANUMERIC,e.ALPHANUMERIC,m);let y,O;return a.isKanjiModeEnabled()?(y=c(o.BYTE,e.BYTE,m),O=c(o.KANJI,e.KANJI,m)):(y=c(o.BYTE_KANJI,e.BYTE,m),O=[]),g.concat(E,y,O).sort(function(S,b){return S.index-b.index}).map(function(S){return{data:S.data,mode:S.mode,length:S.length}})}function h(m,g){switch(g){case e.NUMERIC:return t.getBitsLength(m);case e.ALPHANUMERIC:return i.getBitsLength(m);case e.KANJI:return s.getBitsLength(m);case e.BYTE:return n.getBitsLength(m)}}function f(m){return m.reduce(function(g,E){const y=g.length-1>=0?g[g.length-1]:null;return y&&y.mode===E.mode?(g[g.length-1].data+=E.data,g):(g.push(E),g)},[])}function v(m){const g=[];for(let E=0;E=0&&C<=6&&(D===0||D===6)||D>=0&&D<=6&&(C===0||C===6)||C>=2&&C<=4&&D>=2&&D<=4?I.set(R+C,x+D,!0,!0):I.set(R+C,x+D,!1,!0))}}function v(I){const S=I.size;for(let b=8;b>C&1)===1,I.set(T,R,x,!0),I.set(R,T,x,!0)}function m(I,S,b){const w=I.size,T=c.getEncodedBits(S,b);let R,x;for(R=0;R<15;R++)x=(T>>R&1)===1,R<6?I.set(R,8,x,!0):R<8?I.set(R+1,8,x,!0):I.set(w-15+R,8,x,!0),R<8?I.set(8,w-R-1,x,!0):R<9?I.set(8,15-R-1+1,x,!0):I.set(8,15-R-1,x,!0);I.set(w-8,8,1,!0)}function g(I,S){const b=I.size;let w=-1,T=b-1,R=7,x=0;for(let C=b-1;C>0;C-=2)for(C===6&&C--;;){for(let D=0;D<2;D++)if(!I.isReserved(T,C-D)){let j=!1;x>>R&1)===1),I.set(T,C-D,j),R--,R===-1&&(x++,R=7)}if(T+=w,T<0||b<=T){T-=w,w=-w;break}}}function E(I,S,b){const w=new t;b.forEach(function(D){w.put(D.mode.bit,4),w.put(D.getLength(),d.getCharCountIndicator(D.mode,I)),D.write(w)});const T=r.getSymbolTotalCodewords(I),R=a.getTotalCodewordsCount(I,S),x=(T-R)*8;for(w.getLengthInBits()+4<=x&&w.put(0,4);w.getLengthInBits()%8!==0;)w.putBit(0);const C=(x-w.getLengthInBits())/8;for(let D=0;D=7&&_(D,S),g(D,x),isNaN(w)&&(w=o.getBestMask(D,m.bind(null,D,b))),o.applyMask(w,D),m(D,b,w),{modules:D,version:S,errorCorrectionLevel:b,maskPattern:w,segments:T}}return Rl.create=function(S,b){if(typeof S>"u"||S==="")throw new Error("No input text");let w=e.M,T,R;return typeof b<"u"&&(w=e.from(b.errorCorrectionLevel,e.M),T=l.from(b.version),R=o.from(b.maskPattern),b.toSJISFunc&&r.setToSJISFunction(b.toSJISFunc)),O(S,T,w,R)},Rl}var Gl={},Yl={},QE;function XL(){return QE||(QE=1,function(r){function e(t){if(typeof t=="number"&&(t=t.toString()),typeof t!="string")throw new Error("Color should be defined as hex string");let i=t.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+t);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(s){return[s,s]}))),i.length===6&&i.push("F","F");const n=parseInt(i.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+i.slice(0,6).join("")}}r.getOptions=function(i){i||(i={}),i.color||(i.color={});const n=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,s=i.width&&i.width>=21?i.width:void 0,o=i.scale||4;return{width:s,scale:s?4:o,margin:n,color:{dark:e(i.color.dark||"#000000ff"),light:e(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},r.getScale=function(i,n){return n.width&&n.width>=i+n.margin*2?n.width/(i+n.margin*2):n.scale},r.getImageWidth=function(i,n){const s=r.getScale(i,n);return Math.floor((i+n.margin*2)*s)},r.qrToImageData=function(i,n,s){const o=n.modules.size,a=n.modules.data,u=r.getScale(o,s),l=Math.floor((o+s.margin*2)*u),c=s.margin*u,d=[s.color.light,s.color.dark];for(let h=0;h=c&&f>=c&&h"u"&&(!o||!o.getContext)&&(u=o,o=void 0),o||(l=i()),u=e.getOptions(u);const c=e.getImageWidth(s.modules.size,u),d=l.getContext("2d"),h=d.createImageData(c,c);return e.qrToImageData(h.data,s,u),t(d,l,c),d.putImageData(h,0,0),l},r.renderToDataURL=function(s,o,a){let u=a;typeof u>"u"&&(!o||!o.getContext)&&(u=o,o=void 0),u||(u={});const l=r.render(s,o,u),c=u.type||"image/png",d=u.rendererOpts||{};return l.toDataURL(c,d.quality)}}(Gl)),Gl}var Xl={},eS;function VU(){if(eS)return Xl;eS=1;const r=XL();function e(n,s){const o=n.a/255,a=s+'="'+n.hex+'"';return o<1?a+" "+s+'-opacity="'+o.toFixed(2).slice(1)+'"':a}function t(n,s,o){let a=n+s;return typeof o<"u"&&(a+=" "+o),a}function i(n,s,o){let a="",u=0,l=!1,c=0;for(let d=0;d0&&h>0&&n[d-1]||(a+=l?t("M",h+o,.5+f+o):t("m",u,0),u=0,l=!1),h+1':"",f="',v='viewBox="0 0 '+d+" "+d+'"',_=''+h+f+` +`;return typeof a=="function"&&a(null,_),_},Xl}var tS;function KU(){if(tS)return Hn;tS=1;const r=$U(),e=WU(),t=UU(),i=VU();function n(s,o,a,u,l){const c=[].slice.call(arguments,1),d=c.length,h=typeof c[d-1]=="function";if(!h&&!r())throw new Error("Callback required as last argument");if(h){if(d<2)throw new Error("Too few arguments provided");d===2?(l=a,a=o,o=u=void 0):d===3&&(o.getContext&&typeof l>"u"?(l=u,u=void 0):(l=u,u=a,a=o,o=void 0))}else{if(d<1)throw new Error("Too few arguments provided");return d===1?(a=o,o=u=void 0):d===2&&!o.getContext&&(u=a,a=o,o=void 0),new Promise(function(f,v){try{const p=e.create(a,u);f(s(p,o,u))}catch(p){v(p)}})}try{const f=e.create(a,u);l(null,s(f,o,u))}catch(f){l(f)}}return Hn.create=e.create,Hn.toCanvas=n.bind(null,t.render),Hn.toDataURL=n.bind(null,t.renderToDataURL),Hn.toString=n.bind(null,function(s,o,a){return i.render(s,a)}),Hn}var Jl=KU();/*! vue-qrcode v2.0.0 | (c) 2018-present Chen Fengyuan | MIT */const rS="ready";var GU=Or({name:"VueQrcode",props:{value:{type:String,default:void 0},options:{type:Object,default:void 0},tag:{type:String,default:"canvas"}},emits:[rS],watch:{$props:{deep:!0,immediate:!0,handler(){this.$el&&this.generate()}}},mounted(){this.generate()},methods:{generate(){const r=this.options||{},e=String(this.value),t=()=>{this.$emit(rS,this.$el)};switch(this.tag){case"canvas":Jl.toCanvas(this.$el,e,r,i=>{if(i)throw i;t()});break;case"img":Jl.toDataURL(e,r,(i,n)=>{if(i)throw i;this.$el.src=n,this.$el.onload=t});break;case"svg":Jl.toString(e,r,(i,n)=>{if(i)throw i;const s=document.createElement("div");s.innerHTML=n;const o=s.querySelector("svg");if(o){const{attributes:a,childNodes:u}=o;Object.keys(a).forEach(l=>{const c=a[Number(l)];this.$el.setAttribute(c.name,c.value)}),Object.keys(u).forEach(l=>{const c=u[Number(l)];this.$el.appendChild(c.cloneNode(!0))}),t()}});break}}},render(){return ww(this.tag,this.$slots.default)}});const YU={key:0,class:"qr"},XU=Or({__name:"TeamQRCode",props:{data:String,title:String},setup(r){return(e,t)=>{var i;return(((i=r.data)==null?void 0:i.length)??0)>1?(Ge(),Ct("div",YU,[yt(tr(GU),{value:r.data,options:tr(mU),tag:"svg"},null,8,["value","options"]),Q("div",null,Ft(r.title),1)])):A_("",!0)}}}),xu=(r,e)=>{const t=r.__vccOpts||r;for(const[i,n]of e)t[i]=n;return t},JU=xu(XU,[["__scopeId","data-v-666b8d35"]]),QU={},ZU={class:"header-block"};function eV(r,e){return Ge(),Ct("div",ZU,[XH(r.$slots,"default",{},void 0)])}const Iw=xu(QU,[["render",eV],["__scopeId","data-v-5b6894ef"]]),tV={class:"buttons-block"},rV={class:"team-name"},iV=["href"],nV={class:"cell-center"},sV=["onClick"],oV={class:"cell-center"},aV=["onClick"],uV={class:"form-custom form-block"},lV={class:"center-block-custom"},cV=Or({__name:"AdminWindow",setup(r){const e=$t("-"),t=$t("-"),i=$t(""),n=$t(),s=$t({teams:[]}),o=$t("");async function a(){await wU(o.value),o.value=""}async function u(){i.value="Загрузка...",await SU()}async function l(){i.value="Загрузка...",await OU()}async function c(){var f,v,p;n.value=await EU(),n.value.state==="NEW"&&(i.value="Игра ещё не началась"),n.value.state==="RUN"&&(i.value="Игра идет с "+((f=n.value)==null?void 0:f.startAt.substring(11))),n.value.state==="STOP"&&(i.value="Игра остановлена "+((v=n.value)==null?void 0:v.startAt.substring(11))+" - "+((p=n.value)==null?void 0:p.endAt.substring(11)))}function d(f,v){return v.applications.length-f.applications.length}let h=0;return yw(async()=>{s.value=await TE(),h=setInterval(async()=>{s.value=await TE(),s.value.teams.sort(d),await c()},2e3),iw.beforeEach((f,v,p)=>{clearInterval(h),p()})}),(f,v)=>(Ge(),Ct(pt,null,[yt(Iw,null,{default:Iu(()=>[Q("div",null," Вечерний детектив - "+Ft(i.value),1),Q("div",tV,[Q("button",{onClick:v[0]||(v[0]=p=>tr(iw).push("/editor")),class:"button-menu button-custom-inline"},"Граф"),Q("button",{onClick:u,class:"button-menu button-custom-inline"},"Начать"),Q("button",{onClick:l,class:"button-menu button-custom-inline"},"Остановить"),Q("button",{onClick:v[1]||(v[1]=(...p)=>tr($E)&&tr($E)(...p)),class:"button-menu button-custom-inline"},"Скачать qr‑ы")])]),_:1}),yt(JU,{data:e.value,title:t.value},null,8,["data","title"]),Q("table",null,[v[3]||(v[3]=Q("thead",null,[Q("tr",null,[Q("th",null,"№"),Q("th",null,"Название команды"),Q("th",null,"Поездки"),Q("th",null,"Приложения"),Q("th",null,"Qr")])],-1)),Q("tbody",null,[(Ge(!0),Ct(pt,null,vo(s.value.teams,(p,_)=>(Ge(),Ct("tr",{key:p.name},[Q("td",null,Ft(_+1),1),Q("td",rV,[Qi(Ft(p.name)+" ",1),Q("a",{href:p.url,target:"_blank"},"[url]",8,iV)]),Q("td",nV,Ft(p.spendTime),1),Q("td",null,[(Ge(!0),Ct(pt,null,vo(p.applications,m=>(Ge(),Ct("div",{key:m.id},[Qi(Ft(m.name)+" ",1),Q("button",{class:"link-button",onClick:g=>tr(IU)(p.id,m.id)},"Выдано",8,sV)]))),128))]),Q("td",oV,[Q("a",{onClick:m=>(e.value=p.url,t.value=p.name)},"QR",8,aV)])]))),128))])]),Q("div",uV,[Q("div",lV,[Q("form",{onSubmit:o4(a,["prevent"])},[Q("div",null,[so(Q("input",{class:"input-custom","onUpdate:modelValue":v[2]||(v[2]=p=>o.value=p),type:"text",placeholder:"Название команды"},null,512),[[ao,o.value]])]),v[4]||(v[4]=Q("div",{class:"button-container"},[Q("button",{class:"button-custom",type:"submit"},"Добавить")],-1))],32)])])],64))}}),dV=xu(cV,[["__scopeId","data-v-27835e5c"]]),hV=Or({__name:"HomeView",setup(r){return(e,t)=>(Ge(),Di(dV))}});/** + * vis-data + * http://visjs.org/ + * + * Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data. + * + * @version 8.0.3 + * @date 2025-09-10T16:22:00.613Z + * + * @copyright (c) 2011-2017 Almende B.V, http://almende.com + * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs + * + * @license + * vis.js is dual licensed under both + * + * 1. The Apache 2.0 License + * http://www.apache.org/licenses/LICENSE-2.0 + * + * and + * + * 2. The MIT License + * http://opensource.org/licenses/MIT + * + * vis.js may be distributed under either license. + */var iS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Te(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Ql={exports:{}},nS={},to,sS;function ct(){if(sS)return to;sS=1;var r=function(e){return e&&e.Math===Math&&e};return to=r(typeof globalThis=="object"&&globalThis)||r(typeof window=="object"&&window)||r(typeof self=="object"&&self)||r(typeof iS=="object"&&iS)||r(typeof to=="object"&&to)||function(){return this}()||Function("return this")(),to}var Zl,oS;function ke(){return oS||(oS=1,Zl=function(r){try{return!!r()}catch{return!0}}),Zl}var ec,aS;function Go(){if(aS)return ec;aS=1;var r=ke();return ec=!r(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),ec}var tc,uS;function qu(){if(uS)return tc;uS=1;var r=Go(),e=Function.prototype,t=e.apply,i=e.call;return tc=typeof Reflect=="object"&&Reflect.apply||(r?i.bind(t):function(){return i.apply(t,arguments)}),tc}var rc,lS;function ze(){if(lS)return rc;lS=1;var r=Go(),e=Function.prototype,t=e.call,i=r&&e.bind.bind(t,t);return rc=r?i:function(n){return function(){return t.apply(n,arguments)}},rc}var ic,cS;function ui(){if(cS)return ic;cS=1;var r=ze(),e=r({}.toString),t=r("".slice);return ic=function(i){return t(e(i),8,-1)},ic}var nc,dS;function JL(){if(dS)return nc;dS=1;var r=ui(),e=ze();return nc=function(t){if(r(t)==="Function")return e(t)},nc}var sc,hS;function bt(){if(hS)return sc;hS=1;var r=typeof document=="object"&&document.all;return sc=typeof r>"u"&&r!==void 0?function(e){return typeof e=="function"||e===r}:function(e){return typeof e=="function"},sc}var oc={},ac,fS;function dt(){if(fS)return ac;fS=1;var r=ke();return ac=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),ac}var uc,vS;function Xt(){if(vS)return uc;vS=1;var r=Go(),e=Function.prototype.call;return uc=r?e.bind(e):function(){return e.apply(e,arguments)},uc}var lc={},pS;function Tw(){if(pS)return lc;pS=1;var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!r.call({1:2},1);return lc.f=t?function(n){var s=e(this,n);return!!s&&s.enumerable}:r,lc}var cc,gS;function Yo(){return gS||(gS=1,cc=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}),cc}var dc,mS;function Du(){if(mS)return dc;mS=1;var r=ze(),e=ke(),t=ui(),i=Object,n=r("".split);return dc=e(function(){return!i("z").propertyIsEnumerable(0)})?function(s){return t(s)==="String"?n(s,""):i(s)}:i,dc}var hc,yS;function Xo(){return yS||(yS=1,hc=function(r){return r==null}),hc}var fc,bS;function Sn(){if(bS)return fc;bS=1;var r=Xo(),e=TypeError;return fc=function(t){if(r(t))throw new e("Can't call method on "+t);return t},fc}var vc,_S;function jr(){if(_S)return vc;_S=1;var r=Du(),e=Sn();return vc=function(t){return r(e(t))},vc}var pc,wS;function Ut(){if(wS)return pc;wS=1;var r=bt();return pc=function(e){return typeof e=="object"?e!==null:r(e)},pc}var gc,ES;function gt(){return ES||(ES=1,gc={}),gc}var mc,SS;function ir(){if(SS)return mc;SS=1;var r=gt(),e=ct(),t=bt(),i=function(n){return t(n)?n:void 0};return mc=function(n,s){return arguments.length<2?i(r[n])||i(e[n]):r[n]&&r[n][s]||e[n]&&e[n][s]},mc}var yc,OS;function _t(){if(OS)return yc;OS=1;var r=ze();return yc=r({}.isPrototypeOf),yc}var bc,IS;function Ss(){if(IS)return bc;IS=1;var r=ct(),e=r.navigator,t=e&&e.userAgent;return bc=t?String(t):"",bc}var _c,TS;function Jo(){if(TS)return _c;TS=1;var r=ct(),e=Ss(),t=r.process,i=r.Deno,n=t&&t.versions||i&&i.version,s=n&&n.v8,o,a;return s&&(o=s.split("."),a=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!a&&e&&(o=e.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=e.match(/Chrome\/(\d+)/),o&&(a=+o[1]))),_c=a,_c}var wc,$S;function Os(){if($S)return wc;$S=1;var r=Jo(),e=ke(),t=ct(),i=t.String;return wc=!!Object.getOwnPropertySymbols&&!e(function(){var n=Symbol("symbol detection");return!i(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&r&&r<41}),wc}var Ec,PS;function QL(){if(PS)return Ec;PS=1;var r=Os();return Ec=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Ec}var Sc,RS;function Qo(){if(RS)return Sc;RS=1;var r=ir(),e=bt(),t=_t(),i=QL(),n=Object;return Sc=i?function(s){return typeof s=="symbol"}:function(s){var o=r("Symbol");return e(o)&&t(o.prototype,n(s))},Sc}var Oc,CS;function Is(){if(CS)return Oc;CS=1;var r=String;return Oc=function(e){try{return r(e)}catch{return"Object"}},Oc}var Ic,xS;function li(){if(xS)return Ic;xS=1;var r=bt(),e=Is(),t=TypeError;return Ic=function(i){if(r(i))return i;throw new t(e(i)+" is not a function")},Ic}var Tc,qS;function $w(){if(qS)return Tc;qS=1;var r=li(),e=Xo();return Tc=function(t,i){var n=t[i];return e(n)?void 0:r(n)},Tc}var $c,DS;function fV(){if(DS)return $c;DS=1;var r=Xt(),e=bt(),t=Ut(),i=TypeError;return $c=function(n,s){var o,a;if(s==="string"&&e(o=n.toString)&&!t(a=r(o,n))||e(o=n.valueOf)&&!t(a=r(o,n))||s!=="string"&&e(o=n.toString)&&!t(a=r(o,n)))return a;throw new i("Can't convert object to primitive value")},$c}var Pc={exports:{}},Rc,AS;function Ts(){return AS||(AS=1,Rc=!0),Rc}var Cc,MS;function vV(){if(MS)return Cc;MS=1;var r=ct(),e=Object.defineProperty;return Cc=function(t,i){try{e(r,t,{value:i,configurable:!0,writable:!0})}catch{r[t]=i}return i},Cc}var NS;function Pw(){if(NS)return Pc.exports;NS=1;var r=Ts(),e=ct(),t=vV(),i="__core-js_shared__",n=Pc.exports=e[i]||t(i,{});return(n.versions||(n.versions=[])).push({version:"3.44.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Pc.exports}var xc,FS;function $s(){if(FS)return xc;FS=1;var r=Pw();return xc=function(e,t){return r[e]||(r[e]=t||{})},xc}var qc,kS;function Ir(){if(kS)return qc;kS=1;var r=Sn(),e=Object;return qc=function(t){return e(r(t))},qc}var Dc,BS;function wt(){if(BS)return Dc;BS=1;var r=ze(),e=Ir(),t=r({}.hasOwnProperty);return Dc=Object.hasOwn||function(n,s){return t(e(n),s)},Dc}var Ac,jS;function Au(){if(jS)return Ac;jS=1;var r=ze(),e=0,t=Math.random(),i=r(1.1.toString);return Ac=function(n){return"Symbol("+(n===void 0?"":n)+")_"+i(++e+t,36)},Ac}var Mc,LS;function Et(){if(LS)return Mc;LS=1;var r=ct(),e=$s(),t=wt(),i=Au(),n=Os(),s=QL(),o=r.Symbol,a=e("wks"),u=s?o.for||o:o&&o.withoutSetter||i;return Mc=function(l){return t(a,l)||(a[l]=n&&t(o,l)?o[l]:u("Symbol."+l)),a[l]},Mc}var Nc,zS;function ZL(){if(zS)return Nc;zS=1;var r=Xt(),e=Ut(),t=Qo(),i=$w(),n=fV(),s=Et(),o=TypeError,a=s("toPrimitive");return Nc=function(u,l){if(!e(u)||t(u))return u;var c=i(u,a),d;if(c){if(l===void 0&&(l="default"),d=r(c,u,l),!e(d)||t(d))return d;throw new o("Can't convert object to primitive value")}return l===void 0&&(l="number"),n(u,l)},Nc}var Fc,HS;function Rw(){if(HS)return Fc;HS=1;var r=ZL(),e=Qo();return Fc=function(t){var i=r(t,"string");return e(i)?i:i+""},Fc}var kc,WS;function ez(){if(WS)return kc;WS=1;var r=ct(),e=Ut(),t=r.document,i=e(t)&&e(t.createElement);return kc=function(n){return i?t.createElement(n):{}},kc}var Bc,US;function tz(){if(US)return Bc;US=1;var r=dt(),e=ke(),t=ez();return Bc=!r&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),Bc}var VS;function Mu(){if(VS)return oc;VS=1;var r=dt(),e=Xt(),t=Tw(),i=Yo(),n=jr(),s=Rw(),o=wt(),a=tz(),u=Object.getOwnPropertyDescriptor;return oc.f=r?u:function(c,d){if(c=n(c),d=s(d),a)try{return u(c,d)}catch{}if(o(c,d))return i(!e(t.f,c,d),c[d])},oc}var jc,KS;function pV(){if(KS)return jc;KS=1;var r=ke(),e=bt(),t=/#|\.prototype\./,i=function(u,l){var c=s[n(u)];return c===a?!0:c===o?!1:e(l)?r(l):!!l},n=i.normalize=function(u){return String(u).replace(t,".").toLowerCase()},s=i.data={},o=i.NATIVE="N",a=i.POLYFILL="P";return jc=i,jc}var Lc,GS;function Nu(){if(GS)return Lc;GS=1;var r=JL(),e=li(),t=Go(),i=r(r.bind);return Lc=function(n,s){return e(n),s===void 0?n:t?i(n,s):function(){return n.apply(s,arguments)}},Lc}var zc={},Hc,YS;function rz(){if(YS)return Hc;YS=1;var r=dt(),e=ke();return Hc=r&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Hc}var Wc,XS;function ci(){if(XS)return Wc;XS=1;var r=Ut(),e=String,t=TypeError;return Wc=function(i){if(r(i))return i;throw new t(e(i)+" is not an object")},Wc}var JS;function dr(){if(JS)return zc;JS=1;var r=dt(),e=tz(),t=rz(),i=ci(),n=Rw(),s=TypeError,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return zc.f=r?t?function(h,f,v){if(i(h),f=n(f),i(v),typeof h=="function"&&f==="prototype"&&"value"in v&&c in v&&!v[c]){var p=a(h,f);p&&p[c]&&(h[f]=v.value,v={configurable:l in v?v[l]:p[l],enumerable:u in v?v[u]:p[u],writable:!1})}return o(h,f,v)}:o:function(h,f,v){if(i(h),f=n(f),i(v),e)try{return o(h,f,v)}catch{}if("get"in v||"set"in v)throw new s("Accessors not supported");return"value"in v&&(h[f]=v.value),h},zc}var Uc,QS;function Ps(){if(QS)return Uc;QS=1;var r=dt(),e=dr(),t=Yo();return Uc=r?function(i,n,s){return e.f(i,n,t(1,s))}:function(i,n,s){return i[n]=s,i},Uc}var Vc,ZS;function ye(){if(ZS)return Vc;ZS=1;var r=ct(),e=qu(),t=JL(),i=bt(),n=Mu().f,s=pV(),o=gt(),a=Nu(),u=Ps(),l=wt(),c=function(d){var h=function(f,v,p){if(this instanceof h){switch(arguments.length){case 0:return new d;case 1:return new d(f);case 2:return new d(f,v)}return new d(f,v,p)}return e(d,this,arguments)};return h.prototype=d.prototype,h};return Vc=function(d,h){var f=d.target,v=d.global,p=d.stat,_=d.proto,m=v?r:p?r[f]:r[f]&&r[f].prototype,g=v?o:o[f]||u(o,f,{})[f],E=g.prototype,y,O,I,S,b,w,T,R,x;for(S in h)y=s(v?S:f+(p?".":"#")+S,d.forced),O=!y&&m&&l(m,S),w=g[S],O&&(d.dontCallGetSet?(x=n(m,S),T=x&&x.value):T=m[S]),b=O&&T?T:h[S],!(!y&&!_&&typeof w==typeof b)&&(d.bind&&O?R=a(b,r):d.wrap&&O?R=c(b):_&&i(b)?R=t(b):R=b,(d.sham||b&&b.sham||w&&w.sham)&&u(R,"sham",!0),u(g,S,R),_&&(I=f+"Prototype",l(o,I)||u(o,I,{}),u(o[I],S,b),d.real&&E&&(y||!E[S])&&u(E,S,b)))},Vc}var eO;function gV(){if(eO)return nS;eO=1;var r=ye(),e=dt(),t=dr().f;return r({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),nS}var tO;function mV(){if(tO)return Ql.exports;tO=1,gV();var r=gt(),e=r.Object,t=Ql.exports=function(n,s,o){return e.defineProperty(n,s,o)};return e.defineProperty.sham&&(t.sham=!0),Ql.exports}var Kc,rO;function iz(){if(rO)return Kc;rO=1;var r=mV();return Kc=r,Kc}var Gc,iO;function yV(){if(iO)return Gc;iO=1;var r=iz();return Gc=r,Gc}var Yc,nO;function bV(){if(nO)return Yc;nO=1;var r=yV();return Yc=r,Yc}var Xc,sO;function _V(){return sO||(sO=1,Xc=bV()),Xc}var wV=_V(),EV=Te(wV),oO={},Jc,aO;function On(){if(aO)return Jc;aO=1;var r=ui();return Jc=Array.isArray||function(t){return r(t)==="Array"},Jc}var Qc,uO;function SV(){if(uO)return Qc;uO=1;var r=Math.ceil,e=Math.floor;return Qc=Math.trunc||function(i){var n=+i;return(n>0?e:r)(n)},Qc}var Zc,lO;function Rs(){if(lO)return Zc;lO=1;var r=SV();return Zc=function(e){var t=+e;return t!==t||t===0?0:r(t)},Zc}var ed,cO;function nz(){if(cO)return ed;cO=1;var r=Rs(),e=Math.min;return ed=function(t){var i=r(t);return i>0?e(i,9007199254740991):0},ed}var td,dO;function Bi(){if(dO)return td;dO=1;var r=nz();return td=function(e){return r(e.length)},td}var rd,hO;function sz(){if(hO)return rd;hO=1;var r=TypeError,e=9007199254740991;return rd=function(t){if(t>e)throw r("Maximum allowed index exceeded");return t},rd}var id,fO;function Fu(){if(fO)return id;fO=1;var r=dt(),e=dr(),t=Yo();return id=function(i,n,s){r?e.f(i,n,t(0,s)):i[n]=s},id}var nd,vO;function Cw(){if(vO)return nd;vO=1;var r=Et(),e=r("toStringTag"),t={};return t[e]="z",nd=String(t)==="[object z]",nd}var sd,pO;function ji(){if(pO)return sd;pO=1;var r=Cw(),e=bt(),t=ui(),i=Et(),n=i("toStringTag"),s=Object,o=t(function(){return arguments}())==="Arguments",a=function(u,l){try{return u[l]}catch{}};return sd=r?t:function(u){var l,c,d;return u===void 0?"Undefined":u===null?"Null":typeof(c=a(l=s(u),n))=="string"?c:o?t(l):(d=t(l))==="Object"&&e(l.callee)?"Arguments":d},sd}var od,gO;function OV(){if(gO)return od;gO=1;var r=ze(),e=bt(),t=Pw(),i=r(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(n){return i(n)}),od=t.inspectSource,od}var ad,mO;function oz(){if(mO)return ad;mO=1;var r=ze(),e=ke(),t=bt(),i=ji(),n=ir(),s=OV(),o=function(){},a=n("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=r(u.exec),c=!u.test(o),d=function(v){if(!t(v))return!1;try{return a(o,[],v),!0}catch{return!1}},h=function(v){if(!t(v))return!1;switch(i(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,s(v))}catch{return!0}};return h.sham=!0,ad=!a||e(function(){var f;return d(d.call)||!d(Object)||!d(function(){f=!0})||f})?h:d,ad}var ud,yO;function IV(){if(yO)return ud;yO=1;var r=On(),e=oz(),t=Ut(),i=Et(),n=i("species"),s=Array;return ud=function(o){var a;return r(o)&&(a=o.constructor,e(a)&&(a===s||r(a.prototype))?a=void 0:t(a)&&(a=a[n],a===null&&(a=void 0))),a===void 0?s:a},ud}var ld,bO;function xw(){if(bO)return ld;bO=1;var r=IV();return ld=function(e,t){return new(r(e))(t===0?0:t)},ld}var cd,_O;function Zo(){if(_O)return cd;_O=1;var r=ke(),e=Et(),t=Jo(),i=e("species");return cd=function(n){return t>=51||!r(function(){var s=[],o=s.constructor={};return o[i]=function(){return{foo:1}},s[n](Boolean).foo!==1})},cd}var wO;function az(){if(wO)return oO;wO=1;var r=ye(),e=ke(),t=On(),i=Ut(),n=Ir(),s=Bi(),o=sz(),a=Fu(),u=xw(),l=Zo(),c=Et(),d=Jo(),h=c("isConcatSpreadable"),f=d>=51||!e(function(){var _=[];return _[h]=!1,_.concat()[0]!==_}),v=function(_){if(!i(_))return!1;var m=_[h];return m!==void 0?!!m:t(_)},p=!f||!l("concat");return r({target:"Array",proto:!0,arity:1,forced:p},{concat:function(m){var g=n(this),E=u(g,0),y=0,O,I,S,b,w;for(O=-1,S=arguments.length;Oc;)if(d=u[c++],d!==d)return!0}else for(;l>c;c++)if((n||c in u)&&u[c]===o)return n||c||0;return!n&&-1}};return vd={includes:i(!0),indexOf:i(!1)},vd}var pd,$O;function ea(){return $O||($O=1,pd={}),pd}var gd,PO;function uz(){if(PO)return gd;PO=1;var r=ze(),e=wt(),t=jr(),i=TV().indexOf,n=ea(),s=r([].push);return gd=function(o,a){var u=t(o),l=0,c=[],d;for(d in u)!e(n,d)&&e(u,d)&&s(c,d);for(;a.length>l;)e(u,d=a[l++])&&(~i(c,d)||s(c,d));return c},gd}var md,RO;function Dw(){return RO||(RO=1,md=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),md}var yd,CO;function ku(){if(CO)return yd;CO=1;var r=uz(),e=Dw();return yd=Object.keys||function(i){return r(i,e)},yd}var xO;function Aw(){if(xO)return hd;xO=1;var r=dt(),e=rz(),t=dr(),i=ci(),n=jr(),s=ku();return hd.f=r&&!e?Object.defineProperties:function(a,u){i(a);for(var l=n(u),c=s(u),d=c.length,h=0,f;d>h;)t.f(a,f=c[h++],l[f]);return a},hd}var bd,qO;function $V(){if(qO)return bd;qO=1;var r=ir();return bd=r("document","documentElement"),bd}var _d,DO;function Bu(){if(DO)return _d;DO=1;var r=$s(),e=Au(),t=r("keys");return _d=function(i){return t[i]||(t[i]=e(i))},_d}var wd,AO;function ta(){if(AO)return wd;AO=1;var r=ci(),e=Aw(),t=Dw(),i=ea(),n=$V(),s=ez(),o=Bu(),a=">",u="<",l="prototype",c="script",d=o("IE_PROTO"),h=function(){},f=function(g){return u+c+a+g+u+"/"+c+a},v=function(g){g.write(f("")),g.close();var E=g.parentWindow.Object;return g=null,E},p=function(){var g=s("iframe"),E="java"+c+":",y;return g.style.display="none",n.appendChild(g),g.src=String(E),y=g.contentWindow.document,y.open(),y.write(f("document.F=Object")),y.close(),y.F},_,m=function(){try{_=new ActiveXObject("htmlfile")}catch{}m=typeof document<"u"?document.domain&&_?v(_):p():v(_);for(var g=t.length;g--;)delete m[l][t[g]];return m()};return i[d]=!0,wd=Object.create||function(E,y){var O;return E!==null?(h[l]=r(E),O=new h,h[l]=null,O[d]=E):O=m(),y===void 0?O:e.f(O,y)},wd}var Ed={},MO;function ju(){if(MO)return Ed;MO=1;var r=uz(),e=Dw(),t=e.concat("length","prototype");return Ed.f=Object.getOwnPropertyNames||function(n){return r(n,t)},Ed}var Sd={},Od,NO;function Cs(){if(NO)return Od;NO=1;var r=ze();return Od=r([].slice),Od}var FO;function lz(){if(FO)return Sd;FO=1;var r=ui(),e=jr(),t=ju().f,i=Cs(),n=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(o){try{return t(o)}catch{return i(n)}};return Sd.f=function(a){return n&&r(a)==="Window"?s(a):t(e(a))},Sd}var Id={},kO;function Lu(){return kO||(kO=1,Id.f=Object.getOwnPropertySymbols),Id}var Td,BO;function ra(){if(BO)return Td;BO=1;var r=Ps();return Td=function(e,t,i,n){return n&&n.enumerable?e[t]=i:r(e,t,i),e},Td}var $d,jO;function Mw(){if(jO)return $d;jO=1;var r=dr();return $d=function(e,t,i){return r.f(e,t,i)},$d}var Pd={},LO;function zu(){if(LO)return Pd;LO=1;var r=Et();return Pd.f=r,Pd}var Rd,zO;function Je(){if(zO)return Rd;zO=1;var r=gt(),e=wt(),t=zu(),i=dr().f;return Rd=function(n){var s=r.Symbol||(r.Symbol={});e(s,n)||i(s,n,{value:t.f(n)})},Rd}var Cd,HO;function cz(){if(HO)return Cd;HO=1;var r=Xt(),e=ir(),t=Et(),i=ra();return Cd=function(){var n=e("Symbol"),s=n&&n.prototype,o=s&&s.valueOf,a=t("toPrimitive");s&&!s[a]&&i(s,a,function(u){return r(o,this)},{arity:1})},Cd}var xd,WO;function PV(){if(WO)return xd;WO=1;var r=Cw(),e=ji();return xd=r?{}.toString:function(){return"[object "+e(this)+"]"},xd}var qd,UO;function In(){if(UO)return qd;UO=1;var r=Cw(),e=dr().f,t=Ps(),i=wt(),n=PV(),s=Et(),o=s("toStringTag");return qd=function(a,u,l,c){var d=l?a:a&&a.prototype;d&&(i(d,o)||e(d,o,{configurable:!0,value:u}),c&&!r&&t(d,"toString",n))},qd}var Dd,VO;function RV(){if(VO)return Dd;VO=1;var r=ct(),e=bt(),t=r.WeakMap;return Dd=e(t)&&/native code/.test(String(t)),Dd}var Ad,KO;function ia(){if(KO)return Ad;KO=1;var r=RV(),e=ct(),t=Ut(),i=Ps(),n=wt(),s=Pw(),o=Bu(),a=ea(),u="Object already initialized",l=e.TypeError,c=e.WeakMap,d,h,f,v=function(g){return f(g)?h(g):d(g,{})},p=function(g){return function(E){var y;if(!t(E)||(y=h(E)).type!==g)throw new l("Incompatible receiver, "+g+" required");return y}};if(r||s.state){var _=s.state||(s.state=new c);_.get=_.get,_.has=_.has,_.set=_.set,d=function(g,E){if(_.has(g))throw new l(u);return E.facade=g,_.set(g,E),E},h=function(g){return _.get(g)||{}},f=function(g){return _.has(g)}}else{var m=o("state");a[m]=!0,d=function(g,E){if(n(g,m))throw new l(u);return E.facade=g,i(g,m,E),E},h=function(g){return n(g,m)?g[m]:{}},f=function(g){return n(g,m)}}return Ad={set:d,get:h,has:f,enforce:v,getterFor:p},Ad}var Md,GO;function xs(){if(GO)return Md;GO=1;var r=Nu(),e=ze(),t=Du(),i=Ir(),n=Bi(),s=xw(),o=e([].push),a=function(u){var l=u===1,c=u===2,d=u===3,h=u===4,f=u===6,v=u===7,p=u===5||f;return function(_,m,g,E){for(var y=i(_),O=t(y),I=n(O),S=r(m,g),b=0,w=E||s,T=l?w(_,I):c||v?w(_,0):void 0,R,x;I>b;b++)if((p||b in O)&&(R=O[b],x=S(R,b,y),u))if(l)T[b]=x;else if(x)switch(u){case 3:return!0;case 5:return R;case 6:return b;case 2:o(T,R)}else switch(u){case 4:return!1;case 7:o(T,R)}return f?-1:d||h?h:T}};return Md={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},Md}var YO;function CV(){if(YO)return SO;YO=1;var r=ye(),e=ct(),t=Xt(),i=ze(),n=Ts(),s=dt(),o=Os(),a=ke(),u=wt(),l=_t(),c=ci(),d=jr(),h=Rw(),f=Li(),v=Yo(),p=ta(),_=ku(),m=ju(),g=lz(),E=Lu(),y=Mu(),O=dr(),I=Aw(),S=Tw(),b=ra(),w=Mw(),T=$s(),R=Bu(),x=ea(),C=Au(),D=Et(),j=zu(),te=Je(),H=cz(),ee=In(),ve=ia(),we=xs().forEach,re=R("hidden"),me="Symbol",xe="prototype",De=ve.set,nt=ve.getterFor(me),_e=Object[xe],A=e.Symbol,W=A&&A[xe],Y=e.RangeError,ne=e.TypeError,Pe=e.QObject,$=y.f,P=O.f,q=g.f,F=S.f,k=i([].push),N=T("symbols"),K=T("op-symbols"),X=T("wks"),U=!Pe||!Pe[xe]||!Pe[xe].findChild,B=function(ae,V,Z){var ie=$(_e,V);ie&&delete _e[V],P(ae,V,Z),ie&&ae!==_e&&P(_e,V,ie)},ce=s&&a(function(){return p(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a!==7})?B:P,J=function(ae,V){var Z=N[ae]=p(W);return De(Z,{type:me,tag:ae,description:V}),s||(Z.description=V),Z},oe=function(V,Z,ie){V===_e&&oe(K,Z,ie),c(V);var se=h(Z);return c(ie),u(N,se)?(ie.enumerable?(u(V,re)&&V[re][se]&&(V[re][se]=!1),ie=p(ie,{enumerable:v(0,!1)})):(u(V,re)||P(V,re,v(1,p(null))),V[re][se]=!0),ce(V,se,ie)):P(V,se,ie)},he=function(V,Z){c(V);var ie=d(Z),se=_(ie).concat(st(ie));return we(se,function(Ee){(!s||t(qe,ie,Ee))&&oe(V,Ee,ie[Ee])}),V},Oe=function(V,Z){return Z===void 0?p(V):he(p(V),Z)},qe=function(V){var Z=h(V),ie=t(F,this,Z);return this===_e&&u(N,Z)&&!u(K,Z)?!1:ie||!u(this,Z)||!u(N,Z)||u(this,re)&&this[re][Z]?ie:!0},Re=function(V,Z){var ie=d(V),se=h(Z);if(!(ie===_e&&u(N,se)&&!u(K,se))){var Ee=$(ie,se);return Ee&&u(N,se)&&!(u(ie,re)&&ie[re][se])&&(Ee.enumerable=!0),Ee}},vt=function(V){var Z=q(d(V)),ie=[];return we(Z,function(se){!u(N,se)&&!u(x,se)&&k(ie,se)}),ie},st=function(ae){var V=ae===_e,Z=q(V?K:d(ae)),ie=[];return we(Z,function(se){u(N,se)&&(!V||u(_e,se))&&k(ie,N[se])}),ie};return o||(A=function(){if(l(W,this))throw new ne("Symbol is not a constructor");var V=!arguments.length||arguments[0]===void 0?void 0:f(arguments[0]),Z=C(V),ie=function(se){var Ee=this===void 0?e:this;Ee===_e&&t(ie,K,se),u(Ee,re)&&u(Ee[re],Z)&&(Ee[re][Z]=!1);var vi=v(1,se);try{ce(Ee,Z,vi)}catch(Xs){if(!(Xs instanceof Y))throw Xs;B(Ee,Z,vi)}};return s&&U&&ce(_e,Z,{configurable:!0,set:ie}),J(Z,V)},W=A[xe],b(W,"toString",function(){return nt(this).tag}),b(A,"withoutSetter",function(ae){return J(C(ae),ae)}),S.f=qe,O.f=oe,I.f=he,y.f=Re,m.f=g.f=vt,E.f=st,j.f=function(ae){return J(D(ae),ae)},s&&(w(W,"description",{configurable:!0,get:function(){return nt(this).description}}),n||b(_e,"propertyIsEnumerable",qe,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:A}),we(_(X),function(ae){te(ae)}),r({target:me,stat:!0,forced:!o},{useSetter:function(){U=!0},useSimple:function(){U=!1}}),r({target:"Object",stat:!0,forced:!o,sham:!s},{create:Oe,defineProperty:oe,defineProperties:he,getOwnPropertyDescriptor:Re}),r({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:vt}),H(),ee(A,me),x[re]=!0,SO}var XO={},Nd,JO;function dz(){if(JO)return Nd;JO=1;var r=Os();return Nd=r&&!!Symbol.for&&!!Symbol.keyFor,Nd}var QO;function xV(){if(QO)return XO;QO=1;var r=ye(),e=ir(),t=wt(),i=Li(),n=$s(),s=dz(),o=n("string-to-symbol-registry"),a=n("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!s},{for:function(u){var l=i(u);if(t(o,l))return o[l];var c=e("Symbol")(l);return o[l]=c,a[c]=l,c}}),XO}var ZO={},eI;function qV(){if(eI)return ZO;eI=1;var r=ye(),e=wt(),t=Qo(),i=Is(),n=$s(),s=dz(),o=n("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!s},{keyFor:function(u){if(!t(u))throw new TypeError(i(u)+" is not a symbol");if(e(o,u))return o[u]}}),ZO}var tI={},Fd,rI;function DV(){if(rI)return Fd;rI=1;var r=ze(),e=On(),t=bt(),i=ui(),n=Li(),s=r([].push);return Fd=function(o){if(t(o))return o;if(e(o)){for(var a=o.length,u=[],l=0;l=v.length)return f.target=null,o(void 0,!0);switch(f.kind){case"keys":return o(p,!1);case"values":return o(v[p],!1)}return o([p,v[p]],!1)},"values");var h=t.Arguments=t.Array;if(e("keys"),e("values"),e("entries"),!a&&u&&h.name!=="values")try{n(h,"name",{value:"values"})}catch{}return Qd}var Zd,tT;function rK(){return tT||(tT=1,Zd={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}),Zd}var rT;function Hi(){if(rT)return jI;rT=1,zi();var r=rK(),e=ct(),t=In(),i=qs();for(var n in r)t(e[n],n),i[n]=i.Array;return jI}var eh,iT;function _z(){if(iT)return eh;iT=1;var r=KV();return Hi(),eh=r,eh}var nT={},sT;function iK(){if(sT)return nT;sT=1;var r=Et(),e=dr().f,t=r("metadata"),i=Function.prototype;return i[t]===void 0&&e(i,t,{value:null}),nT}var oT={},aT;function nK(){return aT||(aT=1,vz()),oT}var uT={},lT;function sK(){return lT||(lT=1,pz()),uT}var cT={},dT;function oK(){if(dT)return cT;dT=1;var r=Je();return r("metadata"),cT}var th,hT;function aK(){if(hT)return th;hT=1;var r=_z();return iK(),nK(),sK(),oK(),th=r,th}var fT={},rh,vT;function wz(){if(vT)return rh;vT=1;var r=ir(),e=ze(),t=r("Symbol"),i=t.keyFor,n=e(t.prototype.valueOf);return rh=t.isRegisteredSymbol||function(o){try{return i(n(o))!==void 0}catch{return!1}},rh}var pT;function uK(){if(pT)return fT;pT=1;var r=ye(),e=wz();return r({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),fT}var gT={},ih,mT;function Ez(){if(mT)return ih;mT=1;for(var r=$s(),e=ir(),t=ze(),i=Qo(),n=Et(),s=e("Symbol"),o=s.isWellKnownSymbol,a=e("Object","getOwnPropertyNames"),u=t(s.prototype.valueOf),l=r("wks"),c=0,d=a(s),h=d.length;c=f?u?"":void 0:(v=s(d,h),v<55296||v>56319||h+1===f||(p=s(d,h+1))<56320||p>57343?u?n(d,h):v:u?o(d,h,h+2):(v-55296<<10)+(p-56320)+65536)}};return oh={codeAt:a(!1),charAt:a(!0)},oh}var BT;function Hu(){if(BT)return FT;BT=1;var r=wK().charAt,e=Li(),t=ia(),i=Nw(),n=Fw(),s="String Iterator",o=t.set,a=t.getterFor(s);return i(String,"String",function(u){o(this,{type:s,string:e(u),index:0})},function(){var l=a(this),c=l.string,d=l.index,h;return d>=c.length?n(void 0,!0):(h=r(c,d),l.index+=h.length,n(h,!1))}),FT}var ah,jT;function EK(){if(jT)return ah;jT=1,zi(),Hu(),gz();var r=zu();return ah=r.f("iterator"),ah}var uh,LT;function Sz(){if(LT)return uh;LT=1;var r=EK();return Hi(),uh=r,uh}var lh,zT;function SK(){if(zT)return lh;zT=1;var r=Sz();return lh=r,lh}var ch,HT;function OK(){if(HT)return ch;HT=1;var r=SK();return ch=r,ch}var dh,WT;function IK(){return WT||(WT=1,dh=OK()),dh}var TK=IK(),$K=Te(TK);function Ao(r){"@babel/helpers - typeof";return Ao=typeof Aa=="function"&&typeof $K=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Aa=="function"&&e.constructor===Aa&&e!==Aa.prototype?"symbol":typeof e},Ao(r)}var hh,UT;function PK(){if(UT)return hh;UT=1,mz();var r=zu();return hh=r.f("toPrimitive"),hh}var fh,VT;function RK(){if(VT)return fh;VT=1;var r=PK();return fh=r,fh}var vh,KT;function CK(){if(KT)return vh;KT=1;var r=RK();return vh=r,vh}var ph,GT;function xK(){if(GT)return ph;GT=1;var r=CK();return ph=r,ph}var gh,YT;function qK(){return YT||(YT=1,gh=xK()),gh}var DK=qK(),AK=Te(DK);function MK(r,e){if(Ao(r)!="object"||!r)return r;var t=r[AK];if(t!==void 0){var i=t.call(r,e);if(Ao(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function NK(r){var e=MK(r,"string");return Ao(e)=="symbol"?e:e+""}function Ii(r,e,t){return(e=NK(e))in r?EV(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var XT={},mh,JT;function FK(){if(JT)return mh;JT=1;var r=ze(),e=li(),t=Ut(),i=wt(),n=Cs(),s=Go(),o=Function,a=r([].concat),u=r([].join),l={},c=function(d,h,f){if(!i(l,h)){for(var v=[],p=0;p=0:v>p;p+=_)p in f&&(d=l(d,f[p],p,h));return d}};return Sh={left:o(!1),right:o(!0)},Sh}var Oh,o$;function Wu(){if(o$)return Oh;o$=1;var r=ke();return Oh=function(e,t){var i=[][e];return!!i&&r(function(){i.call(null,t||function(){return 1},1)})},Oh}var Ih,a$;function Iz(){if(a$)return Ih;a$=1;var r=ct(),e=Ss(),t=ui(),i=function(n){return e.slice(0,n.length)===n};return Ih=function(){return i("Bun/")?"BUN":i("Cloudflare-Workers")?"CLOUDFLARE":i("Deno/")?"DENO":i("Node.js/")?"NODE":r.Bun&&typeof Bun.version=="string"?"BUN":r.Deno&&typeof Deno.version=="object"?"DENO":t(r.process)==="process"?"NODE":r.window&&r.document?"BROWSER":"REST"}(),Ih}var Th,u$;function UK(){if(u$)return Th;u$=1;var r=Iz();return Th=r==="NODE",Th}var l$;function VK(){if(l$)return n$;l$=1;var r=ye(),e=WK().left,t=Wu(),i=Jo(),n=UK(),s=!n&&i>79&&i<83,o=s||!t("reduce");return r({target:"Array",proto:!0,forced:o},{reduce:function(u){var l=arguments.length;return e(this,u,l,l>1?arguments[1]:void 0)}}),n$}var $h,c$;function KK(){if(c$)return $h;c$=1,VK();var r=Jt();return $h=r("Array","reduce"),$h}var Ph,d$;function GK(){if(d$)return Ph;d$=1;var r=_t(),e=KK(),t=Array.prototype;return Ph=function(i){var n=i.reduce;return i===t||r(t,i)&&n===t.reduce?e:n},Ph}var Rh,h$;function YK(){if(h$)return Rh;h$=1;var r=GK();return Rh=r,Rh}var Ch,f$;function XK(){return f$||(f$=1,Ch=YK()),Ch}var JK=XK(),QK=Te(JK),v$={},p$;function ZK(){if(p$)return v$;p$=1;var r=ye(),e=xs().filter,t=Zo(),i=t("filter");return r({target:"Array",proto:!0,forced:!i},{filter:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),v$}var xh,g$;function eG(){if(g$)return xh;g$=1,ZK();var r=Jt();return xh=r("Array","filter"),xh}var qh,m$;function tG(){if(m$)return qh;m$=1;var r=_t(),e=eG(),t=Array.prototype;return qh=function(i){var n=i.filter;return i===t||r(t,i)&&n===t.filter?e:n},qh}var Dh,y$;function rG(){if(y$)return Dh;y$=1;var r=tG();return Dh=r,Dh}var Ah,b$;function iG(){return b$||(b$=1,Ah=rG()),Ah}var nG=iG(),Xn=Te(nG),_$={},w$;function sG(){if(w$)return _$;w$=1;var r=ye(),e=xs().map,t=Zo(),i=t("map");return r({target:"Array",proto:!0,forced:!i},{map:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),_$}var Mh,E$;function oG(){if(E$)return Mh;E$=1,sG();var r=Jt();return Mh=r("Array","map"),Mh}var Nh,S$;function aG(){if(S$)return Nh;S$=1;var r=_t(),e=oG(),t=Array.prototype;return Nh=function(i){var n=i.map;return i===t||r(t,i)&&n===t.map?e:n},Nh}var Fh,O$;function uG(){if(O$)return Fh;O$=1;var r=aG();return Fh=r,Fh}var kh,I$;function lG(){return I$||(I$=1,kh=uG()),kh}var cG=lG(),mr=Te(cG),Bh,T$;function dG(){return T$||(T$=1,Bh=_z()),Bh}var hG=dG(),fG=Te(hG),$$={},P$;function vG(){if(P$)return $$;P$=1;var r=ye(),e=On(),t=oz(),i=Ut(),n=qw(),s=Bi(),o=jr(),a=Fu(),u=Et(),l=Zo(),c=Cs(),d=l("slice"),h=u("species"),f=Array,v=Math.max;return r({target:"Array",proto:!0,forced:!d},{slice:function(_,m){var g=o(this),E=s(g),y=n(_,E),O=n(m===void 0?E:m,E),I,S,b;if(e(g)&&(I=g.constructor,t(I)&&(I===f||e(I.prototype))?I=void 0:i(I)&&(I=I[h],I===null&&(I=void 0)),I===f||I===void 0))return c(g,y,O);for(S=new(I===void 0?f:I)(v(O-y,0)),b=0;y1?arguments[1]:void 0)},ef}var J$;function kG(){if(J$)return Y$;J$=1;var r=ye(),e=FG();return r({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),Y$}var tf,Q$;function BG(){if(Q$)return tf;Q$=1,kG();var r=Jt();return tf=r("Array","forEach"),tf}var rf,Z$;function jG(){if(Z$)return rf;Z$=1;var r=BG();return rf=r,rf}var nf,eP;function LG(){if(eP)return nf;eP=1;var r=ji(),e=wt(),t=_t(),i=jG(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return nf=function(o){var a=o.forEach;return o===n||t(n,o)&&a===n.forEach||e(s,r(o))?i:a},nf}var sf,tP;function zG(){return tP||(tP=1,sf=LG()),sf}var HG=zG(),hn=Te(HG),rP={},iP;function WG(){if(iP)return rP;iP=1;var r=ye(),e=ze(),t=On(),i=e([].reverse),n=[1,2];return r({target:"Array",proto:!0,forced:String(n)===String(n.reverse())},{reverse:function(){return t(this)&&(this.length=this.length),i(this)}}),rP}var of,nP;function UG(){if(nP)return of;nP=1,WG();var r=Jt();return of=r("Array","reverse"),of}var af,sP;function VG(){if(sP)return af;sP=1;var r=_t(),e=UG(),t=Array.prototype;return af=function(i){var n=i.reverse;return i===t||r(t,i)&&n===t.reverse?e:n},af}var uf,oP;function KG(){if(oP)return uf;oP=1;var r=VG();return uf=r,uf}var lf,aP;function GG(){return aP||(aP=1,lf=KG()),lf}var YG=GG(),XG=Te(YG),uP={},cf,lP;function JG(){if(lP)return cf;lP=1;var r=dt(),e=On(),t=TypeError,i=Object.getOwnPropertyDescriptor,n=r&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(s){return s instanceof TypeError}}();return cf=n?function(s,o){if(e(s)&&!i(s,"length").writable)throw new t("Cannot set read only .length");return s.length=o}:function(s,o){return s.length=o},cf}var df,cP;function $z(){if(cP)return df;cP=1;var r=Is(),e=TypeError;return df=function(t,i){if(!delete t[i])throw new e("Cannot delete property "+r(i)+" of "+r(t))},df}var dP;function QG(){if(dP)return uP;dP=1;var r=ye(),e=Ir(),t=qw(),i=Rs(),n=Bi(),s=JG(),o=sz(),a=xw(),u=Fu(),l=$z(),c=Zo(),d=c("splice"),h=Math.max,f=Math.min;return r({target:"Array",proto:!0,forced:!d},{splice:function(p,_){var m=e(this),g=n(m),E=t(p,g),y=arguments.length,O,I,S,b,w,T;for(y===0?O=I=0:y===1?(O=0,I=g-E):(O=y-2,I=f(h(i(_),0),g-E)),o(g+O-I),S=a(m,I),b=0;bg-I+O;b--)l(m,b-1)}else if(O>I)for(b=g-I;b>E;b--)w=b+I-1,T=b+O-1,w in m?m[T]=m[w]:l(m,T);for(b=0;bm;)for(var y=u(arguments[m++]),O=g?d(n(y),g(y)):n(y),I=O.length,S=0,b;I>S;)b=O[S++],(!r||t(E,y,b))&&(p[b]=y[b]);return p}:l,gf}var yP;function s6(){if(yP)return gP;yP=1;var r=ye(),e=n6();return r({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e}),gP}var mf,bP;function o6(){if(bP)return mf;bP=1,s6();var r=gt();return mf=r.Object.assign,mf}var yf,_P;function a6(){if(_P)return yf;_P=1;var r=o6();return yf=r,yf}var bf,wP;function u6(){return wP||(wP=1,bf=a6()),bf}var l6=u6(),c6=Te(l6),_f,EP;function d6(){if(EP)return _f;EP=1,az();var r=Jt();return _f=r("Array","concat"),_f}var wf,SP;function h6(){if(SP)return wf;SP=1;var r=_t(),e=d6(),t=Array.prototype;return wf=function(i){var n=i.concat;return i===t||r(t,i)&&n===t.concat?e:n},wf}var Ef,OP;function f6(){if(OP)return Ef;OP=1;var r=h6();return Ef=r,Ef}var Sf,IP;function v6(){return IP||(IP=1,Sf=f6()),Sf}var p6=v6(),g6=Te(p6),TP={},$P;function m6(){if($P)return TP;$P=1;var r=ye(),e=dt(),t=ta();return r({target:"Object",stat:!0,sham:!e},{create:t}),TP}var Of,PP;function y6(){if(PP)return Of;PP=1,m6();var r=gt(),e=r.Object;return Of=function(i,n){return e.create(i,n)},Of}var If,RP;function b6(){if(RP)return If;RP=1;var r=y6();return If=r,If}var Tf,CP;function _6(){return CP||(CP=1,Tf=b6()),Tf}var w6=_6(),E6=Te(w6),xP={},$f,qP;function S6(){if(qP)return $f;qP=1;var r=Rs(),e=Li(),t=Sn(),i=RangeError;return $f=function(s){var o=e(t(this)),a="",u=r(s);if(u<0||u===1/0)throw new i("Wrong number of repetitions");for(;u>0;(u>>>=1)&&(o+=o))u&1&&(a+=o);return a},$f}var Pf,DP;function O6(){if(DP)return Pf;DP=1;var r=ze(),e=nz(),t=Li(),i=S6(),n=Sn(),s=r(i),o=r("".slice),a=Math.ceil,u=function(l){return function(c,d,h){var f=t(n(c)),v=e(d),p=f.length,_=h===void 0?" ":t(h),m,g;return v<=p||_===""?f:(m=v-p,g=s(_,a(m/_.length)),g.length>m&&(g=o(g,0,m)),l?f+g:g+f)}};return Pf={start:u(!1),end:u(!0)},Pf}var Rf,AP;function I6(){if(AP)return Rf;AP=1;var r=ze(),e=ke(),t=O6().start,i=RangeError,n=isFinite,s=Math.abs,o=Date.prototype,a=o.toISOString,u=r(o.getTime),l=r(o.getUTCDate),c=r(o.getUTCFullYear),d=r(o.getUTCHours),h=r(o.getUTCMilliseconds),f=r(o.getUTCMinutes),v=r(o.getUTCMonth),p=r(o.getUTCSeconds);return Rf=e(function(){return a.call(new Date(-5e13-1))!=="0385-07-25T07:06:39.999Z"})||!e(function(){a.call(new Date(NaN))})?function(){if(!n(u(this)))throw new i("Invalid time value");var m=this,g=c(m),E=h(m),y=g<0?"-":g>9999?"+":"";return y+t(s(g),y?6:4,0)+"-"+t(v(m)+1,2,0)+"-"+t(l(m),2,0)+"T"+t(d(m),2,0)+":"+t(f(m),2,0)+":"+t(p(m),2,0)+"."+t(E,3,0)+"Z"}:a,Rf}var MP;function T6(){if(MP)return xP;MP=1;var r=ye(),e=Xt(),t=Ir(),i=ZL(),n=I6(),s=ui(),o=ke(),a=o(function(){return new Date(NaN).toJSON()!==null||e(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1});return r({target:"Date",proto:!0,forced:a},{toJSON:function(l){var c=t(this),d=i(c,"number");return typeof d=="number"&&!isFinite(d)?null:!("toISOString"in c)&&s(c)==="Date"?e(n,c):c.toISOString()}}),xP}var Cf,NP;function $6(){if(NP)return Cf;NP=1,T6(),hz();var r=gt(),e=qu();return r.JSON||(r.JSON={stringify:JSON.stringify}),Cf=function(i,n,s){return e(r.JSON.stringify,null,arguments)},Cf}var xf,FP;function P6(){if(FP)return xf;FP=1;var r=$6();return xf=r,xf}var qf,kP;function R6(){return kP||(kP=1,qf=P6()),qf}var C6=R6(),x6=Te(C6),BP={},jP={},Df,LP;function q6(){if(LP)return Df;LP=1;var r=TypeError;return Df=function(e,t){if(ed,p=t(h)?h:a(h),_=v?s(arguments,d):[],m=v?function(){e(p,this,_)}:p;return c?l(m,f):l(m)}:l},Af}var HP;function D6(){if(HP)return jP;HP=1;var r=ye(),e=ct(),t=Rz(),i=t(e.setInterval,!0);return r({global:!0,bind:!0,forced:e.setInterval!==i},{setInterval:i}),jP}var WP={},UP;function A6(){if(UP)return WP;UP=1;var r=ye(),e=ct(),t=Rz(),i=t(e.setTimeout,!0);return r({global:!0,bind:!0,forced:e.setTimeout!==i},{setTimeout:i}),WP}var VP;function M6(){return VP||(VP=1,D6(),A6()),BP}var Mf,KP;function N6(){if(KP)return Mf;KP=1,M6();var r=gt();return Mf=r.setTimeout,Mf}var Nf,GP;function F6(){return GP||(GP=1,Nf=N6()),Nf}var k6=F6(),B6=Te(k6),Ff={exports:{}},YP;function j6(){return YP||(YP=1,function(r){function e(i){if(i)return t(i);this._callbacks=new Map}function t(i){return Object.assign(i,e.prototype),i._callbacks=new Map,i}e.prototype.on=function(i,n){const s=this._callbacks.get(i)??[];return s.push(n),this._callbacks.set(i,s),this},e.prototype.once=function(i,n){const s=(...o)=>{this.off(i,s),n.apply(this,o)};return s.fn=n,this.on(i,s),this},e.prototype.off=function(i,n){if(i===void 0&&n===void 0)return this._callbacks.clear(),this;if(n===void 0)return this._callbacks.delete(i),this;const s=this._callbacks.get(i);if(s){for(const[o,a]of s.entries())if(a===n||a.fn===n){s.splice(o,1);break}s.length===0?this._callbacks.delete(i):this._callbacks.set(i,s)}return this},e.prototype.emit=function(i,...n){const s=this._callbacks.get(i);if(s){const o=[...s];for(const a of o)a.apply(this,n)}return this},e.prototype.listeners=function(i){return this._callbacks.get(i)??[]},e.prototype.listenerCount=function(i){if(i)return this.listeners(i).length;let n=0;for(const s of this._callbacks.values())n+=s.length;return n},e.prototype.hasListeners=function(i){return this.listenerCount(i)>0},e.prototype.addEventListener=e.prototype.on,e.prototype.removeListener=e.prototype.off,e.prototype.removeEventListener=e.prototype.off,e.prototype.removeAllListeners=e.prototype.off,r.exports=e}(Ff)),Ff.exports}var L6=j6(),z6=Te(L6);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 + * http://naver.github.io/egjs + * + * Forked By Naver egjs + * Copyright (c) hammerjs + * Licensed under the MIT license */function Er(){return Er=Object.assign||function(r){for(var e=1;e"u"?{style:{}}:document.createElement("div"),W6="function",Jn=Math.round,vn=Math.abs,Bw=Date.now;function Uu(r,e){for(var t,i,n=e[0].toUpperCase()+e.slice(1),s=0;s"u"?Jr={}:Jr=window;var Cz=Uu(H6.style,"touchAction"),xz=Cz!==void 0;function U6(){if(!xz)return!1;var r={},e=Jr.CSS&&Jr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return r[t]=e?Jr.CSS.supports("touch-action",t):!0}),r}var qz="compute",Dz="auto",L_="manipulation",sn="none",Mo="pan-x",No="pan-y",Na=U6(),V6=/mobile|tablet|ip(ad|hone|od)|android/i,Az="ontouchstart"in Jr,K6=Uu(Jr,"PointerEvent")!==void 0,G6=Az&&V6.test(navigator.userAgent),na="touch",Y6="pen",jw="mouse",X6="kinect",J6=25,Ht=1,Tn=2,ot=4,Gt=8,iu=1,sa=2,oa=4,aa=8,ps=16,Fr=sa|oa,on=aa|ps,Mz=Fr|on,Nz=["x","y"],nu=["clientX","clientY"];function Qr(r,e,t){var i;if(r)if(r.forEach)r.forEach(e,t);else if(r.length!==void 0)for(i=0;i-1}function Q6(r){if(Zi(r,sn))return sn;var e=Zi(r,Mo),t=Zi(r,No);return e&&t?sn:e||t?e?Mo:No:Zi(r,L_)?L_:Dz}var Fz=function(){function r(t,i){this.manager=t,this.set(i)}var e=r.prototype;return e.set=function(i){i===qz&&(i=this.compute()),xz&&this.manager.element.style&&Na[i]&&(this.manager.element.style[Cz]=i),this.actions=i.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var i=[];return Qr(this.manager.recognizers,function(n){Vu(n.options.enable,[n])&&(i=i.concat(n.getTouchAction()))}),Q6(i.join(" "))},e.preventDefaults=function(i){var n=i.srcEvent,s=i.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,a=Zi(o,sn)&&!Na[sn],u=Zi(o,No)&&!Na[No],l=Zi(o,Mo)&&!Na[Mo];if(a){var c=i.pointers.length===1,d=i.distance<2,h=i.deltaTime<250;if(c&&d&&h)return}if(!(l&&u)&&(a||u&&s&Fr||l&&s&on))return this.preventSrc(n)},e.preventSrc=function(i){this.manager.session.prevented=!0,i.preventDefault()},r}();function Lw(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}function kz(r){var e=r.length;if(e===1)return{x:Jn(r[0].clientX),y:Jn(r[0].clientY)};for(var t=0,i=0,n=0;n=vn(e)?r<0?sa:oa:e<0?aa:ps}function Z6(r,e){var t=e.center,i=r.offsetDelta||{},n=r.prevDelta||{},s=r.prevInput||{};(e.eventType===Ht||s.eventType===ot)&&(n=r.prevDelta={x:s.deltaX||0,y:s.deltaY||0},i=r.offsetDelta={x:t.x,y:t.y}),e.deltaX=n.x+(t.x-i.x),e.deltaY=n.y+(t.y-i.y)}function jz(r,e,t){return{x:e/r||0,y:t/r||0}}function e8(r,e){return su(e[0],e[1],nu)/su(r[0],r[1],nu)}function t8(r,e){return z_(e[1],e[0],nu)+z_(r[1],r[0],nu)}function r8(r,e){var t=r.lastInterval||e,i=e.timeStamp-t.timeStamp,n,s,o,a;if(e.eventType!==Gt&&(i>J6||t.velocity===void 0)){var u=e.deltaX-t.deltaX,l=e.deltaY-t.deltaY,c=jz(i,u,l);s=c.x,o=c.y,n=vn(c.x)>vn(c.y)?c.x:c.y,a=Bz(u,l),r.lastInterval=e}else n=t.velocity,s=t.velocityX,o=t.velocityY,a=t.direction;e.velocity=n,e.velocityX=s,e.velocityY=o,e.direction=a}function i8(r,e){var t=r.session,i=e.pointers,n=i.length;t.firstInput||(t.firstInput=JP(e)),n>1&&!t.firstMultiple?t.firstMultiple=JP(e):n===1&&(t.firstMultiple=!1);var s=t.firstInput,o=t.firstMultiple,a=o?o.center:s.center,u=e.center=kz(i);e.timeStamp=Bw(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=z_(a,u),e.distance=su(a,u),Z6(t,e),e.offsetDirection=Bz(e.deltaX,e.deltaY);var l=jz(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=vn(l.x)>vn(l.y)?l.x:l.y,e.scale=o?e8(o.pointers,i):1,e.rotation=o?t8(o.pointers,i):0,e.maxPointers=t.prevInput?e.pointers.length>t.prevInput.maxPointers?e.pointers.length:t.prevInput.maxPointers:e.pointers.length,r8(t,e);var c=r.element,d=e.srcEvent,h;d.composedPath?h=d.composedPath()[0]:d.path?h=d.path[0]:h=d.target,Lw(h,c)&&(c=h),e.target=c}function n8(r,e,t){var i=t.pointers.length,n=t.changedPointers.length,s=e&Ht&&i-n===0,o=e&(ot|Gt)&&i-n===0;t.isFirst=!!s,t.isFinal=!!o,s&&(r.session={}),t.eventType=e,i8(r,t),r.emit("hammer.input",t),r.recognize(t),r.session.prevInput=t}function Fo(r){return r.trim().split(/\s+/g)}function bo(r,e,t){Qr(Fo(e),function(i){r.addEventListener(i,t,!1)})}function _o(r,e,t){Qr(Fo(e),function(i){r.removeEventListener(i,t,!1)})}function QP(r){var e=r.ownerDocument||r;return e.defaultView||e.parentWindow||window}var Ds=function(){function r(t,i){var n=this;this.manager=t,this.callback=i,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(s){Vu(t.options.enable,[t])&&n.handler(s)},this.init()}var e=r.prototype;return e.handler=function(){},e.init=function(){this.evEl&&bo(this.element,this.evEl,this.domHandler),this.evTarget&&bo(this.target,this.evTarget,this.domHandler),this.evWin&&bo(QP(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&_o(this.element,this.evEl,this.domHandler),this.evTarget&&_o(this.target,this.evTarget,this.domHandler),this.evWin&&_o(QP(this.element),this.evWin,this.domHandler)},r}();function pn(r,e,t){if(r.indexOf&&!t)return r.indexOf(e);for(var i=0;iu[e]}):i=i.sort()),i}var a8={touchstart:Ht,touchmove:Tn,touchend:ot,touchcancel:Gt},u8="touchstart touchmove touchend touchcancel",Hw=function(r){hr(e,r);function e(){var i;return e.prototype.evTarget=u8,i=r.apply(this,arguments)||this,i.targetIds={},i}var t=e.prototype;return t.handler=function(n){var s=a8[n.type],o=l8.call(this,n,s);o&&this.callback(this.manager,s,{pointers:o[0],changedPointers:o[1],pointerType:na,srcEvent:n})},e}(Ds);function l8(r,e){var t=ko(r.touches),i=this.targetIds;if(e&(Ht|Tn)&&t.length===1)return i[t[0].identifier]=!0,[t,t];var n,s,o=ko(r.changedTouches),a=[],u=this.target;if(s=t.filter(function(l){return Lw(l.target,u)}),e===Ht)for(n=0;n-1&&n.splice(a,1)};setTimeout(s,f8)}}function v8(r,e){r&Ht?(this.primaryTouch=e.changedPointers[0].identifier,eR.call(this,e)):r&(ot|Gt)&&eR.call(this,e)}function p8(r){for(var e=r.srcEvent.clientX,t=r.srcEvent.clientY,i=0;i-1&&this.requireFail.splice(n,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(i){return!!this.simultaneous[i.id]},e.emit=function(i){var n=this,s=this.state;function o(a){n.manager.emit(a,i)}s=Ti&&o(n.options.event+tR(s))},e.tryEmit=function(i){if(this.canEmit())return this.emit(i);this.state=Dr},e.canEmit=function(){for(var i=0;is.threshold&&u&s.direction},t.attrTest=function(n){return ms.prototype.attrTest.call(this,n)&&(this.state&lr||!(this.state&lr)&&this.directionTest(n))},t.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var s=Uz(n.direction);s&&(n.additionalEvent=this.options.event+s),r.prototype.emit.call(this,n)},e}(ms),Vz=function(r){hr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Er({event:"swipe",threshold:10,velocity:.3,direction:Fr|on,pointers:1},i))||this}var t=e.prototype;return t.getTouchAction=function(){return Uw.prototype.getTouchAction.call(this)},t.attrTest=function(n){var s=this.options.direction,o;return s&(Fr|on)?o=n.overallVelocity:s&Fr?o=n.overallVelocityX:s&on&&(o=n.overallVelocityY),r.prototype.attrTest.call(this,n)&&s&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&vn(o)>this.options.velocity&&n.eventType&ot},t.emit=function(n){var s=Uz(n.offsetDirection);s&&this.manager.emit(this.options.event+s,n),this.manager.emit(this.options.event,n)},e}(ms),Kz=function(r){hr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Er({event:"pinch",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[sn]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&lr)},t.emit=function(n){if(n.scale!==1){var s=n.scale<1?"in":"out";n.additionalEvent=this.options.event+s}r.prototype.emit.call(this,n)},e}(ms),Gz=function(r){hr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Er({event:"rotate",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[sn]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&lr)},e}(ms),Yz=function(r){hr(e,r);function e(i){var n;return i===void 0&&(i={}),n=r.call(this,Er({event:"press",pointers:1,time:251,threshold:9},i))||this,n._timer=null,n._input=null,n}var t=e.prototype;return t.getTouchAction=function(){return[Dz]},t.process=function(n){var s=this,o=this.options,a=n.pointers.length===o.pointers,u=n.distanceo.time;if(this._input=n,!u||!a||n.eventType&(ot|Gt)&&!l)this.reset();else if(n.eventType&Ht)this.reset(),this._timer=setTimeout(function(){s.state=Zr,s.tryEmit()},o.time);else if(n.eventType&ot)return Zr;return Dr},t.reset=function(){clearTimeout(this._timer)},t.emit=function(n){this.state===Zr&&(n&&n.eventType&ot?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=Bw(),this.manager.emit(this.options.event,this._input)))},e}(ua),Xz={domEvents:!1,touchAction:qz,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},rR=[[Gz,{enable:!1}],[Kz,{enable:!1},["rotate"]],[Vz,{direction:Fr}],[Uw,{direction:Fr},["swipe"]],[H_],[H_,{event:"doubletap",taps:2},["tap"]],[Yz]],b8=1,iR=2;function nR(r,e){var t=r.element;if(t.style){var i;Qr(r.options.cssProps,function(n,s){i=Uu(t.style,s),e?(r.oldCssProps[i]=t.style[i],t.style[i]=n):t.style[i]=r.oldCssProps[i]||""}),e||(r.oldCssProps={})}}function _8(r,e){var t=document.createEvent("Event");t.initEvent(r,!0,!0),t.gesture=e,e.target.dispatchEvent(t)}var sR=function(){function r(t,i){var n=this;this.options=fn({},Xz,i||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=g8(this),this.touchAction=new Fz(this,this.options.touchAction),nR(this,!0),Qr(this.options.recognizers,function(s){var o=n.add(new s[0](s[1]));s[2]&&o.recognizeWith(s[2]),s[3]&&o.requireFailure(s[3])},this)}var e=r.prototype;return e.set=function(i){return fn(this.options,i),i.touchAction&&this.touchAction.update(),i.inputTarget&&(this.input.destroy(),this.input.target=i.inputTarget,this.input.init()),this},e.stop=function(i){this.session.stopped=i?iR:b8},e.recognize=function(i){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(i);var s,o=this.recognizers,a=n.curRecognizer;(!a||a&&a.state&Zr)&&(n.curRecognizer=null,a=null);for(var u=0;u\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,i,s),r.apply(this,arguments)}}var Qz=Jz(function(r,e,t){for(var i=Object.keys(e),n=0;n1?e-1:0),i=1;i2)return ou(e3(e[0],e[1]),..._G(e).call(e,2));const i=e[0],n=e[1];if(i instanceof Date&&n instanceof Date)return i.setTime(n.getTime()),i;for(const s of TG(n))Object.prototype.propertyIsEnumerable.call(n,s)&&(n[s]===Zz?delete i[s]:i[s]!==null&&n[s]!==null&&typeof i[s]=="object"&&typeof n[s]=="object"&&!Cr(i[s])&&!Cr(n[s])?i[s]=ou(i[s],n[s]):i[s]=t3(n[s]));return i}function t3(r){return Cr(r)?mr(r).call(r,e=>t3(e)):typeof r=="object"&&r!==null?r instanceof Date?new Date(r.getTime()):ou({},r):r}function r3(r){for(const e of kw(r))r[e]===Zz?delete r[e]:typeof r[e]=="object"&&r[e]!==null&&r3(r[e])}function C8(){const r=()=>{};return{on:r,off:r,destroy:r,emit:r,get(){return{set:r}}}}const x8=typeof window<"u"?window.Hammer||P8:function(){return C8()};function Gr(r){var e;this._cleanupQueue=[],this.active=!1,this._dom={container:r,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});const t=x8(this._dom.overlay);t.on("tap",Oz(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{t.destroy()});const i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];hn(i).call(i,n=>{t.on(n,s=>{s.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=n=>{q8(n.target,r)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=n=>{("key"in n?n.key==="Escape":n.keyCode===27)&&this.deactivate()}}z6(Gr.prototype);Gr.current=null;Gr.prototype.destroy=function(){this.deactivate();for(const t of XG(r=Pz(e=this._cleanupQueue).call(e,0)).call(r)){var r,e;t()}};Gr.prototype.activate=function(){Gr.current&&Gr.current.deactivate(),Gr.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)};Gr.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")};Gr.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function q8(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}var kf,aR;function D8(){if(aR)return kf;aR=1,fz();var r=gt();return kf=r.Object.getOwnPropertySymbols,kf}var Bf,uR;function A8(){if(uR)return Bf;uR=1;var r=D8();return Bf=r,Bf}var jf,lR;function M8(){return lR||(lR=1,jf=A8()),jf}var N8=M8(),cR=Te(N8),Lf={exports:{}},dR={},hR;function F8(){if(hR)return dR;hR=1;var r=ye(),e=ke(),t=jr(),i=Mu().f,n=dt(),s=!n||e(function(){i(1)});return r({target:"Object",stat:!0,forced:s,sham:!n},{getOwnPropertyDescriptor:function(a,u){return i(t(a),u)}}),dR}var fR;function k8(){if(fR)return Lf.exports;fR=1,F8();var r=gt(),e=r.Object,t=Lf.exports=function(n,s){return e.getOwnPropertyDescriptor(n,s)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),Lf.exports}var zf,vR;function B8(){if(vR)return zf;vR=1;var r=k8();return zf=r,zf}var Hf,pR;function j8(){return pR||(pR=1,Hf=B8()),Hf}var L8=j8(),i3=Te(L8),gR={},mR;function z8(){if(mR)return gR;mR=1;var r=ye(),e=dt(),t=Tz(),i=jr(),n=Mu(),s=Fu();return r({target:"Object",stat:!0,sham:!e},{getOwnPropertyDescriptors:function(a){for(var u=i(a),l=n.f,c=t(u),d={},h=0,f,v;c.length>h;)v=l(u,f=c[h++]),v!==void 0&&s(d,f,v);return d}}),gR}var Wf,yR;function H8(){if(yR)return Wf;yR=1,z8();var r=gt();return Wf=r.Object.getOwnPropertyDescriptors,Wf}var Uf,bR;function W8(){if(bR)return Uf;bR=1;var r=H8();return Uf=r,Uf}var Vf,_R;function U8(){return _R||(_R=1,Vf=W8()),Vf}var V8=U8(),wR=Te(V8),Kf={exports:{}},ER={},SR;function K8(){if(SR)return ER;SR=1;var r=ye(),e=dt(),t=Aw().f;return r({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),ER}var OR;function G8(){if(OR)return Kf.exports;OR=1,K8();var r=gt(),e=r.Object,t=Kf.exports=function(n,s){return e.defineProperties(n,s)};return e.defineProperties.sham&&(t.sham=!0),Kf.exports}var Gf,IR;function Y8(){if(IR)return Gf;IR=1;var r=G8();return Gf=r,Gf}var Yf,TR;function X8(){return TR||(TR=1,Yf=Y8()),Yf}var J8=X8(),Q8=Te(J8),Xf,$R;function Z8(){return $R||($R=1,Xf=iz()),Xf}var e9=Z8(),t9=Te(e9),PR={},RR={},Jf={exports:{}},Qf,CR;function r9(){if(CR)return Qf;CR=1;var r=ke();return Qf=r(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),Qf}var Zf,xR;function i9(){if(xR)return Zf;xR=1;var r=ke(),e=Ut(),t=ui(),i=r9(),n=Object.isExtensible,s=r(function(){});return Zf=s||i?function(a){return!e(a)||i&&t(a)==="ArrayBuffer"?!1:n?n(a):!0}:n,Zf}var ev,qR;function n9(){if(qR)return ev;qR=1;var r=ke();return ev=!r(function(){return Object.isExtensible(Object.preventExtensions({}))}),ev}var DR;function n3(){if(DR)return Jf.exports;DR=1;var r=ye(),e=ze(),t=ea(),i=Ut(),n=wt(),s=dr().f,o=ju(),a=lz(),u=i9(),l=Au(),c=n9(),d=!1,h=l("meta"),f=0,v=function(y){s(y,h,{value:{objectID:"O"+f++,weakData:{}}})},p=function(y,O){if(!i(y))return typeof y=="symbol"?y:(typeof y=="string"?"S":"P")+y;if(!n(y,h)){if(!u(y))return"F";if(!O)return"E";v(y)}return y[h].objectID},_=function(y,O){if(!n(y,h)){if(!u(y))return!0;if(!O)return!1;v(y)}return y[h].weakData},m=function(y){return c&&d&&u(y)&&!n(y,h)&&v(y),y},g=function(){E.enable=function(){},d=!0;var y=o.f,O=e([].splice),I={};I[h]=1,y(I).length&&(o.f=function(S){for(var b=y(S),w=0,T=b.length;wb;b++)if(T=D(f[b]),T&&o(h,T))return T;return new d(!1)}I=a(f,S)}for(R=g?f.next:I.next;!(x=e(R,I)).done;){try{T=D(x.value)}catch(j){l(I,"throw",j)}if(typeof T=="object"&&T&&o(h,T))return T}return new d(!1)},sv}var ov,BR;function a3(){if(BR)return ov;BR=1;var r=_t(),e=TypeError;return ov=function(t,i){if(r(i,t))return t;throw new e("Incorrect invocation")},ov}var av,jR;function u3(){if(jR)return av;jR=1;var r=ye(),e=ct(),t=n3(),i=ke(),n=Ps(),s=Kw(),o=a3(),a=bt(),u=Ut(),l=Xo(),c=In(),d=dr().f,h=xs().forEach,f=dt(),v=ia(),p=v.set,_=v.getterFor;return av=function(m,g,E){var y=m.indexOf("Map")!==-1,O=m.indexOf("Weak")!==-1,I=y?"set":"add",S=e[m],b=S&&S.prototype,w={},T;if(!f||!a(S)||!(O||b.forEach&&!i(function(){new S().entries().next()})))T=E.getConstructor(g,m,y,I),t.enable();else{T=g(function(C,D){p(o(C,R),{type:m,collection:new S}),l(D)||s(D,C[I],{that:C,AS_ENTRIES:y})});var R=T.prototype,x=_(m);h(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(C){var D=C==="add"||C==="set";C in b&&!(O&&C==="clear")&&n(R,C,function(j,te){var H=x(this).collection;if(!D&&O&&!u(j))return C==="get"?void 0:!1;var ee=H[C](j===0?0:j,te);return D?this:ee})}),O||d(R,"size",{configurable:!0,get:function(){return x(this).collection.size}})}return c(T,m,!1,!0),w[m]=T,r({global:!0,forced:!0},w),O||E.setStrong(T,m,y),T},av}var uv,LR;function o9(){if(LR)return uv;LR=1;var r=ra();return uv=function(e,t,i){for(var n in t)i&&i.unsafe&&e[n]?e[n]=t[n]:r(e,n,t[n],i);return e},uv}var lv,zR;function a9(){if(zR)return lv;zR=1;var r=ir(),e=Mw(),t=Et(),i=dt(),n=t("species");return lv=function(s){var o=r(s);i&&o&&!o[n]&&e(o,n,{configurable:!0,get:function(){return this}})},lv}var cv,HR;function l3(){if(HR)return cv;HR=1;var r=ta(),e=Mw(),t=o9(),i=Nu(),n=a3(),s=Xo(),o=Kw(),a=Nw(),u=Fw(),l=a9(),c=dt(),d=n3().fastKey,h=ia(),f=h.set,v=h.getterFor;return cv={getConstructor:function(p,_,m,g){var E=p(function(b,w){n(b,y),f(b,{type:_,index:r(null),first:null,last:null,size:0}),c||(b.size=0),s(w)||o(w,b[g],{that:b,AS_ENTRIES:m})}),y=E.prototype,O=v(_),I=function(b,w,T){var R=O(b),x=S(b,w),C,D;return x?x.value=T:(R.last=x={index:D=d(w,!0),key:w,value:T,previous:C=R.last,next:null,removed:!1},R.first||(R.first=x),C&&(C.next=x),c?R.size++:b.size++,D!=="F"&&(R.index[D]=x)),b},S=function(b,w){var T=O(b),R=d(w),x;if(R!=="F")return T.index[R];for(x=T.first;x;x=x.next)if(x.key===w)return x};return t(y,{clear:function(){for(var w=this,T=O(w),R=T.first;R;)R.removed=!0,R.previous&&(R.previous=R.previous.next=null),R=R.next;T.first=T.last=null,T.index=r(null),c?T.size=0:w.size=0},delete:function(b){var w=this,T=O(w),R=S(w,b);if(R){var x=R.next,C=R.previous;delete T.index[R.index],R.removed=!0,C&&(C.next=x),x&&(x.previous=C),T.first===R&&(T.first=x),T.last===R&&(T.last=C),c?T.size--:w.size--}return!!R},forEach:function(w){for(var T=O(this),R=i(w,arguments.length>1?arguments[1]:void 0),x;x=x?x.next:T.first;)for(R(x.value,x.key,this);x&&x.removed;)x=x.previous},has:function(w){return!!S(this,w)}}),t(y,m?{get:function(w){var T=S(this,w);return T&&T.value},set:function(w,T){return I(this,w===0?0:w,T)}}:{add:function(w){return I(this,w=w===0?0:w,w)}}),c&&e(y,"size",{configurable:!0,get:function(){return O(this).size}}),E},setStrong:function(p,_,m){var g=_+" Iterator",E=v(_),y=v(g);a(p,_,function(O,I){f(this,{type:g,target:O,state:E(O),kind:I,last:null})},function(){for(var O=y(this),I=O.kind,S=O.last;S&&S.removed;)S=S.previous;return!O.target||!(O.last=S=S?S.next:O.state.first)?(O.target=null,u(void 0,!0)):u(I==="keys"?S.key:I==="values"?S.value:[S.key,S.value],!1)},m?"entries":"values",!m,!0),l(_)}},cv}var WR;function u9(){if(WR)return RR;WR=1;var r=u3(),e=l3();return r("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),RR}var UR;function l9(){return UR||(UR=1,u9()),PR}var VR={},dv,KR;function c3(){return KR||(KR=1,dv=function(r,e){return e===1?function(t,i){return t[r](i)}:function(t,i,n){return t[r](i,n)}}),dv}var hv,GR;function c9(){if(GR)return hv;GR=1;var r=ir(),e=c3(),t=r("Map");return hv={Map:t,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:t.prototype},hv}var YR;function d9(){if(YR)return VR;YR=1;var r=ye(),e=ze(),t=li(),i=Sn(),n=Kw(),s=c9(),o=Ts(),a=ke(),u=s.Map,l=s.has,c=s.get,d=s.set,h=e([].push),f=o||a(function(){return u.groupBy("ab",function(v){return v}).get("a").length!==1});return r({target:"Map",stat:!0,forced:o||f},{groupBy:function(p,_){i(p),t(_);var m=new u,g=0;return n(p,function(E){var y=_(E,g++);l(m,y)?h(c(m,y),E):d(m,y,[E])}),m}}),VR}var fv,XR;function h9(){if(XR)return fv;XR=1,zi(),l9(),d9(),Hu();var r=gt();return fv=r.Map,fv}var vv,JR;function f9(){if(JR)return vv;JR=1;var r=h9();return Hi(),vv=r,vv}var pv,QR;function v9(){return QR||(QR=1,pv=f9()),pv}var p9=v9(),d3=Te(p9),ZR={},eC;function g9(){if(eC)return ZR;eC=1;var r=ye(),e=xs().some,t=Wu(),i=t("some");return r({target:"Array",proto:!0,forced:!i},{some:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),ZR}var gv,tC;function m9(){if(tC)return gv;tC=1,g9();var r=Jt();return gv=r("Array","some"),gv}var mv,rC;function y9(){if(rC)return mv;rC=1;var r=_t(),e=m9(),t=Array.prototype;return mv=function(i){var n=i.some;return i===t||r(t,i)&&n===t.some?e:n},mv}var yv,iC;function b9(){if(iC)return yv;iC=1;var r=y9();return yv=r,yv}var bv,nC;function _9(){return nC||(nC=1,bv=b9()),bv}var w9=_9(),E9=Te(w9),_v,sC;function S9(){if(sC)return _v;sC=1,zi();var r=Jt();return _v=r("Array","keys"),_v}var wv,oC;function O9(){if(oC)return wv;oC=1;var r=S9();return wv=r,wv}var Ev,aC;function I9(){if(aC)return Ev;aC=1,Hi();var r=ji(),e=wt(),t=_t(),i=O9(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return Ev=function(o){var a=o.keys;return o===n||t(n,o)&&a===n.keys||e(s,r(o))?i:a},Ev}var Sv,uC;function T9(){return uC||(uC=1,Sv=I9()),Sv}var $9=T9(),Wn=Te($9),lC={},Ov,cC;function P9(){if(cC)return Ov;cC=1;var r=Cs(),e=Math.floor,t=function(i,n){var s=i.length;if(s<8)for(var o=1,a,u;o0;)i[u]=i[--u];u!==o++&&(i[u]=a)}else for(var l=e(s/2),c=t(r(i,0,l),n),d=t(r(i,l),n),h=c.length,f=d.length,v=0,p=0;v3)){if(d)return!0;if(f)return f<603;var S="",b,w,T,R;for(b=65;b<76;b++){switch(w=String.fromCharCode(b),b){case 66:case 69:case 70:case 72:T=3;break;case 68:case 71:T=4;break;default:T=2}for(R=0;R<47;R++)v.push({k:w+R,v:T})}for(v.sort(function(x,C){return C.v-x.v}),R=0;Ro(w)?1:-1}};return r({target:"Array",proto:!0,forced:O},{sort:function(b){b!==void 0&&t(b);var w=i(this);if(y)return b===void 0?p(w):p(w,b);var T=[],R=n(w),x,C;for(C=0;C"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Lv=crypto.getRandomValues.bind(crypto)}return Lv(Q9)}const e7=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var RC={randomUUID:e7};function t7(r,e,t){var n;r=r||{};const i=r.random??((n=r.rng)==null?void 0:n.call(r))??Z9();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,J9(i)}function r7(r,e,t){return RC.randomUUID?RC.randomUUID():t7(r)}function CC(r){return typeof r=="string"||typeof r=="number"}class Gw{constructor(e){Ii(this,"_queue",[]),Ii(this,"_timeout",null),Ii(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(e)}setOptions(e){e&&typeof e.delay<"u"&&(this.delay=e.delay),e&&typeof e.max<"u"&&(this.max=e.max),this._flushIfNeeded()}static extend(e,t){const i=new Gw(t);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=()=>{i.flush()};const n=[{name:"flush",original:void 0}];if(t&&t.replace)for(let s=0;sthis.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=B6(()=>{this.flush()},this.delay))}flush(){var e,t;hn(e=Pz(t=this._queue).call(t,0)).call(e,i=>{i.fn.apply(i.context||i.fn,i.args||[])})}}class au{constructor(){Ii(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),Ii(this,"subscribe",au.prototype.on),Ii(this,"unsubscribe",au.prototype.off)}_trigger(e,t,i){var n;if(e==="*")throw new Error("Cannot trigger event *");hn(n=[...this._subscribers[e],...this._subscribers["*"]]).call(n,s=>{s(e,t,i??null)})}on(e,t){typeof t=="function"&&this._subscribers[e].push(t)}off(e,t){var i;this._subscribers[e]=Xn(i=this._subscribers[e]).call(i,n=>n!==t)}}var xC={},qC={},DC;function i7(){if(DC)return qC;DC=1;var r=u3(),e=l3();return r("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),qC}var AC;function n7(){return AC||(AC=1,i7()),xC}var MC={},zv,NC;function $n(){if(NC)return zv;NC=1;var r=Is(),e=TypeError;return zv=function(t){if(typeof t=="object"&&"size"in t&&"has"in t&&"add"in t&&"delete"in t&&"keys"in t)return t;throw new e(r(t)+" is not a set")},zv}var Hv,FC;function Pn(){if(FC)return Hv;FC=1;var r=ir(),e=c3(),t=r("Set"),i=t.prototype;return Hv={Set:t,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:i},Hv}var Wv,kC;function Rn(){if(kC)return Wv;kC=1;var r=Xt();return Wv=function(e,t,i){for(var n=i?e:e.iterator,s=e.next,o,a;!(o=r(s,n)).done;)if(a=t(o.value),a!==void 0)return a},Wv}var Uv,BC;function la(){if(BC)return Uv;BC=1;var r=Rn();return Uv=function(e,t,i){return i?r(e.keys(),t,!0):e.forEach(t)},Uv}var Vv,jC;function Yw(){if(jC)return Vv;jC=1;var r=Pn(),e=la(),t=r.Set,i=r.add;return Vv=function(n){var s=new t;return e(n,function(o){i(s,o)}),s},Vv}var Kv,LC;function ca(){return LC||(LC=1,Kv=function(r){return r.size}),Kv}var Gv,zC;function s7(){return zC||(zC=1,Gv=function(r){return{iterator:r,next:r.next,done:!1}}),Gv}var Yv,HC;function Cn(){if(HC)return Yv;HC=1;var r=li(),e=ci(),t=Xt(),i=Rs(),n=s7(),s="Invalid size",o=RangeError,a=TypeError,u=Math.max,l=function(c,d){this.set=c,this.size=u(d,0),this.has=r(c.has),this.keys=r(c.keys)};return l.prototype={getIterator:function(){return n(e(t(this.keys,this.set)))},includes:function(c){return t(this.has,this.set,c)}},Yv=function(c){e(c);var d=+c.size;if(d!==d)throw new a(s);var h=i(d);if(h<0)throw new o(s);return new l(c,h)},Yv}var Xv,WC;function o7(){if(WC)return Xv;WC=1;var r=$n(),e=Pn(),t=Yw(),i=ca(),n=Cn(),s=la(),o=Rn(),a=e.has,u=e.remove;return Xv=function(c){var d=r(this),h=n(c),f=t(d);return i(d)<=h.size?s(d,function(v){h.includes(v)&&u(f,v)}):o(h.getIterator(),function(v){a(f,v)&&u(f,v)}),f},Xv}var Jv,UC;function xn(){return UC||(UC=1,Jv=function(){return!1}),Jv}var VC;function a7(){if(VC)return MC;VC=1;var r=ye(),e=o7(),t=ke(),i=xn(),n=!i("difference",function(o){return o.size===0}),s=n||t(function(){var o={size:1,has:function(){return!0},keys:function(){var u=0;return{next:function(){var l=u++>1;return a.has(1)&&a.clear(),{done:l,value:2}}}}},a=new Set([1,2,3,4]);return a.difference(o).size!==3});return r({target:"Set",proto:!0,real:!0,forced:s},{difference:e}),MC}var KC={},Qv,GC;function u7(){if(GC)return Qv;GC=1;var r=$n(),e=Pn(),t=ca(),i=Cn(),n=la(),s=Rn(),o=e.Set,a=e.add,u=e.has;return Qv=function(c){var d=r(this),h=i(c),f=new o;return t(d)>h.size?s(h.getIterator(),function(v){u(d,v)&&a(f,v)}):n(d,function(v){h.includes(v)&&a(f,v)}),f},Qv}var YC;function l7(){if(YC)return KC;YC=1;var r=ye(),e=ke(),t=u7(),i=xn(),n=!i("intersection",function(s){return s.size===2&&s.has(1)&&s.has(2)})||e(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});return r({target:"Set",proto:!0,real:!0,forced:n},{intersection:t}),KC}var XC={},Zv,JC;function c7(){if(JC)return Zv;JC=1;var r=$n(),e=Pn().has,t=ca(),i=Cn(),n=la(),s=Rn(),o=Vw();return Zv=function(u){var l=r(this),c=i(u);if(t(l)<=c.size)return n(l,function(h){if(c.includes(h))return!1},!0)!==!1;var d=c.getIterator();return s(d,function(h){if(e(l,h))return o(d,"normal",!1)})!==!1},Zv}var QC;function d7(){if(QC)return XC;QC=1;var r=ye(),e=c7(),t=xn(),i=!t("isDisjointFrom",function(n){return!n});return r({target:"Set",proto:!0,real:!0,forced:i},{isDisjointFrom:e}),XC}var ZC={},ep,ex;function h7(){if(ex)return ep;ex=1;var r=$n(),e=ca(),t=la(),i=Cn();return ep=function(s){var o=r(this),a=i(s);return e(o)>a.size?!1:t(o,function(u){if(!a.includes(u))return!1},!0)!==!1},ep}var tx;function f7(){if(tx)return ZC;tx=1;var r=ye(),e=h7(),t=xn(),i=!t("isSubsetOf",function(n){return n});return r({target:"Set",proto:!0,real:!0,forced:i},{isSubsetOf:e}),ZC}var rx={},tp,ix;function v7(){if(ix)return tp;ix=1;var r=$n(),e=Pn().has,t=ca(),i=Cn(),n=Rn(),s=Vw();return tp=function(a){var u=r(this),l=i(a);if(t(u)t[0])}toItemArray(){var e;return mr(e=[...this._pairs]).call(e,t=>t[1])}toEntryArray(){return[...this._pairs]}toObjectMap(){const e=E6(null);for(const[t,i]of this._pairs)e[t]=i;return e}toMap(){return new d3(this._pairs)}toIdSet(){return new up(this.toIdArray())}toItemSet(){return new up(this.toItemArray())}cache(){return new en([...this._pairs])}distinct(e){const t=new up;for(const[i,n]of this._pairs)t.add(e(n,i));return t}filter(e){const t=this._pairs;return new en({*[Zn](){for(const[i,n]of t)e(n,i)&&(yield[i,n])}})}forEach(e){for(const[t,i]of this._pairs)e(i,t)}map(e){const t=this._pairs;return new en({*[Zn](){for(const[i,n]of t)yield[i,e(n,i)]}})}max(e){const t=pp(this._pairs);let i=t.next();if(i.done)return null;let n=i.value[1],s=e(i.value[1],i.value[0]);for(;!(i=t.next()).done;){const[o,a]=i.value,u=e(a,o);u>s&&(s=u,n=a)}return n}min(e){const t=pp(this._pairs);let i=t.next();if(i.done)return null;let n=i.value[1],s=e(i.value[1],i.value[0]);for(;!(i=t.next()).done;){const[o,a]=i.value,u=e(a,o);u{var t;return pp(W_(t=[...this._pairs]).call(t,(i,n)=>{let[s,o]=i,[a,u]=n;return e(o,u,s,a)}))}})}}function wx(r,e){var t=kw(r);if(cR){var i=cR(r);e&&(i=Xn(i).call(i,function(n){return i3(r,n).enumerable})),t.push.apply(t,i)}return t}function Ex(r){for(var e=1;eo[this._idProp]);if(E9(s).call(s,o=>this._data.has(o)))throw new Error("A duplicate id was found in the parameter array.");for(let o=0,a=e.length;o{const c=l[a];if(c!=null&&this._data.has(c)){const d=l,h=c6({},this._data.get(c)),f=this._updateItem(d);n.push(f),o.push(d),s.push(h)}else{const d=this._addItem(l);i.push(d)}};if(Cr(e))for(let l=0,c=e.length;l{const o=this._data.get(s[this._idProp]);if(o==null)throw new Error("Updating non-existent items is not allowed.");return{oldData:o,update:s}})).call(i,s=>{let{oldData:o,update:a}=s;const u=o[this._idProp],l=R8(o,a);return this._data.set(u,l),{id:u,oldData:o,updatedData:l}});if(n.length){const s={items:mr(n).call(n,o=>o.id),oldData:mr(n).call(n,o=>o.oldData),data:mr(n).call(n,o=>o.updatedData)};return this._trigger("update",s,t),s.items}else return[]}get(e,t){let i,n,s;CC(e)?(i=e,s=t):Cr(e)?(n=e,s=t):s=e;const o=s&&s.returnType==="Object"?"Object":"Array",a=s&&Xn(s),u=[];let l,c,d;if(i!=null)l=this._data.get(i),l&&a&&!a(l)&&(l=void 0);else if(n!=null)for(let f=0,v=n.length;f(n[s]=e[s],n),{})}_sort(e,t){if(typeof t=="string"){const i=t;W_(e).call(e,(n,s)=>{const o=n[i],a=s[i];return o>a?1:oi)&&(t=s,i=o)}return t||null}min(e){let t=null,i=null;for(const s of SC(n=this._data).call(n)){var n;const o=s[e];typeof o=="number"&&(i==null||o"u"&&r!==void 0?function(e){return typeof e=="function"||e===r}:function(e){return typeof e=="function"},Ep}var Sp={},Op,Dx;function it(){if(Dx)return Op;Dx=1;var r=$e();return Op=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Op}var Ip,Ax;function Qt(){if(Ax)return Ip;Ax=1;var r=da(),e=Function.prototype.call;return Ip=r?e.bind(e):function(){return e.apply(e,arguments)},Ip}var Tp={},Mx;function Gu(){if(Mx)return Tp;Mx=1;var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!r.call({1:2},1);return Tp.f=t?function(n){var s=e(this,n);return!!s&&s.enumerable}:r,Tp}var $p,Nx;function ha(){return Nx||(Nx=1,$p=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}),$p}var Pp,Fx;function Yu(){if(Fx)return Pp;Fx=1;var r=Ce(),e=$e(),t=Lr(),i=Object,n=r("".split);return Pp=e(function(){return!i("z").propertyIsEnumerable(0)})?function(s){return t(s)==="String"?n(s,""):i(s)}:i,Pp}var Rp,kx;function As(){return kx||(kx=1,Rp=function(r){return r==null}),Rp}var Cp,Bx;function di(){if(Bx)return Cp;Bx=1;var r=As(),e=TypeError;return Cp=function(t){if(r(t))throw new e("Can't call method on "+t);return t},Cp}var xp,jx;function Tr(){if(jx)return xp;jx=1;var r=Yu(),e=di();return xp=function(t){return r(e(t))},xp}var qp,Lx;function Ot(){if(Lx)return qp;Lx=1;var r=St();return qp=function(e){return typeof e=="object"?e!==null:r(e)},qp}var Dp,zx;function Be(){return zx||(zx=1,Dp={}),Dp}var Ap,Hx;function nr(){if(Hx)return Ap;Hx=1;var r=Be(),e=Xe(),t=St(),i=function(n){return t(n)?n:void 0};return Ap=function(n,s){return arguments.length<2?i(r[n])||i(e[n]):r[n]&&r[n][s]||e[n]&&e[n][s]},Ap}var Mp,Wx;function ht(){if(Wx)return Mp;Wx=1;var r=Ce();return Mp=r({}.isPrototypeOf),Mp}var Np,Ux;function Ms(){if(Ux)return Np;Ux=1;var r=Xe(),e=r.navigator,t=e&&e.userAgent;return Np=t?String(t):"",Np}var Fp,Vx;function fa(){if(Vx)return Fp;Vx=1;var r=Xe(),e=Ms(),t=r.process,i=r.Deno,n=t&&t.versions||i&&i.version,s=n&&n.v8,o,a;return s&&(o=s.split("."),a=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!a&&e&&(o=e.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=e.match(/Chrome\/(\d+)/),o&&(a=+o[1]))),Fp=a,Fp}var kp,Kx;function Ns(){if(Kx)return kp;Kx=1;var r=fa(),e=$e(),t=Xe(),i=t.String;return kp=!!Object.getOwnPropertySymbols&&!e(function(){var n=Symbol("symbol detection");return!i(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&r&&r<41}),kp}var Bp,Gx;function v3(){if(Gx)return Bp;Gx=1;var r=Ns();return Bp=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Bp}var jp,Yx;function va(){if(Yx)return jp;Yx=1;var r=nr(),e=St(),t=ht(),i=v3(),n=Object;return jp=i?function(s){return typeof s=="symbol"}:function(s){var o=r("Symbol");return e(o)&&t(o.prototype,n(s))},jp}var Lp,Xx;function Fs(){if(Xx)return Lp;Xx=1;var r=String;return Lp=function(e){try{return r(e)}catch{return"Object"}},Lp}var zp,Jx;function hi(){if(Jx)return zp;Jx=1;var r=St(),e=Fs(),t=TypeError;return zp=function(i){if(r(i))return i;throw new t(e(i)+" is not a function")},zp}var Hp,Qx;function Jw(){if(Qx)return Hp;Qx=1;var r=hi(),e=As();return Hp=function(t,i){var n=t[i];return e(n)?void 0:r(n)},Hp}var Wp,Zx;function D7(){if(Zx)return Wp;Zx=1;var r=Qt(),e=St(),t=Ot(),i=TypeError;return Wp=function(n,s){var o,a;if(s==="string"&&e(o=n.toString)&&!t(a=r(o,n))||e(o=n.valueOf)&&!t(a=r(o,n))||s!=="string"&&e(o=n.toString)&&!t(a=r(o,n)))return a;throw new i("Can't convert object to primitive value")},Wp}var Up={exports:{}},Vp,eq;function ks(){return eq||(eq=1,Vp=!0),Vp}var Kp,tq;function A7(){if(tq)return Kp;tq=1;var r=Xe(),e=Object.defineProperty;return Kp=function(t,i){try{e(r,t,{value:i,configurable:!0,writable:!0})}catch{r[t]=i}return i},Kp}var rq;function Qw(){if(rq)return Up.exports;rq=1;var r=ks(),e=Xe(),t=A7(),i="__core-js_shared__",n=Up.exports=e[i]||t(i,{});return(n.versions||(n.versions=[])).push({version:"3.44.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Up.exports}var Gp,iq;function Bs(){if(iq)return Gp;iq=1;var r=Qw();return Gp=function(e,t){return r[e]||(r[e]=t||{})},Gp}var Yp,nq;function sr(){if(nq)return Yp;nq=1;var r=di(),e=Object;return Yp=function(t){return e(r(t))},Yp}var Xp,sq;function Pt(){if(sq)return Xp;sq=1;var r=Ce(),e=sr(),t=r({}.hasOwnProperty);return Xp=Object.hasOwn||function(n,s){return t(e(n),s)},Xp}var Jp,oq;function Xu(){if(oq)return Jp;oq=1;var r=Ce(),e=0,t=Math.random(),i=r(1.1.toString);return Jp=function(n){return"Symbol("+(n===void 0?"":n)+")_"+i(++e+t,36)},Jp}var Qp,aq;function ft(){if(aq)return Qp;aq=1;var r=Xe(),e=Bs(),t=Pt(),i=Xu(),n=Ns(),s=v3(),o=r.Symbol,a=e("wks"),u=s?o.for||o:o&&o.withoutSetter||i;return Qp=function(l){return t(a,l)||(a[l]=n&&t(o,l)?o[l]:u("Symbol."+l)),a[l]},Qp}var Zp,uq;function p3(){if(uq)return Zp;uq=1;var r=Qt(),e=Ot(),t=va(),i=Jw(),n=D7(),s=ft(),o=TypeError,a=s("toPrimitive");return Zp=function(u,l){if(!e(u)||t(u))return u;var c=i(u,a),d;if(c){if(l===void 0&&(l="default"),d=r(c,u,l),!e(d)||t(d))return d;throw new o("Can't convert object to primitive value")}return l===void 0&&(l="number"),n(u,l)},Zp}var eg,lq;function Zw(){if(lq)return eg;lq=1;var r=p3(),e=va();return eg=function(t){var i=r(t,"string");return e(i)?i:i+""},eg}var tg,cq;function g3(){if(cq)return tg;cq=1;var r=Xe(),e=Ot(),t=r.document,i=e(t)&&e(t.createElement);return tg=function(n){return i?t.createElement(n):{}},tg}var rg,dq;function m3(){if(dq)return rg;dq=1;var r=it(),e=$e(),t=g3();return rg=!r&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),rg}var hq;function Ju(){if(hq)return Sp;hq=1;var r=it(),e=Qt(),t=Gu(),i=ha(),n=Tr(),s=Zw(),o=Pt(),a=m3(),u=Object.getOwnPropertyDescriptor;return Sp.f=r?u:function(c,d){if(c=n(c),d=s(d),a)try{return u(c,d)}catch{}if(o(c,d))return i(!e(t.f,c,d),c[d])},Sp}var ig,fq;function M7(){if(fq)return ig;fq=1;var r=$e(),e=St(),t=/#|\.prototype\./,i=function(u,l){var c=s[n(u)];return c===a?!0:c===o?!1:e(l)?r(l):!!l},n=i.normalize=function(u){return String(u).replace(t,".").toLowerCase()},s=i.data={},o=i.NATIVE="N",a=i.POLYFILL="P";return ig=i,ig}var ng,vq;function Qu(){if(vq)return ng;vq=1;var r=Xw(),e=hi(),t=da(),i=r(r.bind);return ng=function(n,s){return e(n),s===void 0?n:t?i(n,s):function(){return n.apply(s,arguments)}},ng}var sg={},og,pq;function y3(){if(pq)return og;pq=1;var r=it(),e=$e();return og=r&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),og}var ag,gq;function zr(){if(gq)return ag;gq=1;var r=Ot(),e=String,t=TypeError;return ag=function(i){if(r(i))return i;throw new t(e(i)+" is not an object")},ag}var mq;function fr(){if(mq)return sg;mq=1;var r=it(),e=m3(),t=y3(),i=zr(),n=Zw(),s=TypeError,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return sg.f=r?t?function(h,f,v){if(i(h),f=n(f),i(v),typeof h=="function"&&f==="prototype"&&"value"in v&&c in v&&!v[c]){var p=a(h,f);p&&p[c]&&(h[f]=v.value,v={configurable:l in v?v[l]:p[l],enumerable:u in v?v[u]:p[u],writable:!1})}return o(h,f,v)}:o:function(h,f,v){if(i(h),f=n(f),i(v),e)try{return o(h,f,v)}catch{}if("get"in v||"set"in v)throw new s("Accessors not supported");return"value"in v&&(h[f]=v.value),h},sg}var ug,yq;function js(){if(yq)return ug;yq=1;var r=it(),e=fr(),t=ha();return ug=r?function(i,n,s){return e.f(i,n,t(1,s))}:function(i,n,s){return i[n]=s,i},ug}var lg,bq;function de(){if(bq)return lg;bq=1;var r=Xe(),e=Ku(),t=Xw(),i=St(),n=Ju().f,s=M7(),o=Be(),a=Qu(),u=js(),l=Pt(),c=function(d){var h=function(f,v,p){if(this instanceof h){switch(arguments.length){case 0:return new d;case 1:return new d(f);case 2:return new d(f,v)}return new d(f,v,p)}return e(d,this,arguments)};return h.prototype=d.prototype,h};return lg=function(d,h){var f=d.target,v=d.global,p=d.stat,_=d.proto,m=v?r:p?r[f]:r[f]&&r[f].prototype,g=v?o:o[f]||u(o,f,{})[f],E=g.prototype,y,O,I,S,b,w,T,R,x;for(S in h)y=s(v?S:f+(p?".":"#")+S,d.forced),O=!y&&m&&l(m,S),w=g[S],O&&(d.dontCallGetSet?(x=n(m,S),T=x&&x.value):T=m[S]),b=O&&T?T:h[S],!(!y&&!_&&typeof w==typeof b)&&(d.bind&&O?R=a(b,r):d.wrap&&O?R=c(b):_&&i(b)?R=t(b):R=b,(d.sham||b&&b.sham||w&&w.sham)&&u(R,"sham",!0),u(g,S,R),_&&(I=f+"Prototype",l(o,I)||u(o,I,{}),u(o[I],S,b),d.real&&E&&(y||!E[S])&&u(E,S,b)))},lg}var cg,_q;function N7(){if(_q)return cg;_q=1;var r=Math.ceil,e=Math.floor;return cg=Math.trunc||function(i){var n=+i;return(n>0?e:r)(n)},cg}var dg,wq;function Ls(){if(wq)return dg;wq=1;var r=N7();return dg=function(e){var t=+e;return t!==t||t===0?0:r(t)},dg}var hg,Eq;function Zu(){if(Eq)return hg;Eq=1;var r=Ls(),e=Math.max,t=Math.min;return hg=function(i,n){var s=r(i);return s<0?e(s+n,0):t(s,n)},hg}var fg,Sq;function b3(){if(Sq)return fg;Sq=1;var r=Ls(),e=Math.min;return fg=function(t){var i=r(t);return i>0?e(i,9007199254740991):0},fg}var vg,Oq;function fi(){if(Oq)return vg;Oq=1;var r=b3();return vg=function(e){return r(e.length)},vg}var pg,Iq;function e0(){if(Iq)return pg;Iq=1;var r=Tr(),e=Zu(),t=fi(),i=function(n){return function(s,o,a){var u=r(s),l=t(u);if(l===0)return!n&&-1;var c=e(a,l),d;if(n&&o!==o){for(;l>c;)if(d=u[c++],d!==d)return!0}else for(;l>c;c++)if((n||c in u)&&u[c]===o)return n||c||0;return!n&&-1}};return pg={includes:i(!0),indexOf:i(!1)},pg}var gg,Tq;function pa(){return Tq||(Tq=1,gg={}),gg}var mg,$q;function _3(){if($q)return mg;$q=1;var r=Ce(),e=Pt(),t=Tr(),i=e0().indexOf,n=pa(),s=r([].push);return mg=function(o,a){var u=t(o),l=0,c=[],d;for(d in u)!e(n,d)&&e(u,d)&&s(c,d);for(;a.length>l;)e(u,d=a[l++])&&(~i(c,d)||s(c,d));return c},mg}var yg,Pq;function t0(){return Pq||(Pq=1,yg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),yg}var bg,Rq;function ga(){if(Rq)return bg;Rq=1;var r=_3(),e=t0();return bg=Object.keys||function(i){return r(i,e)},bg}var _g={},Cq;function el(){return Cq||(Cq=1,_g.f=Object.getOwnPropertySymbols),_g}var wg,xq;function F7(){if(xq)return wg;xq=1;var r=it(),e=Ce(),t=Qt(),i=$e(),n=ga(),s=el(),o=Gu(),a=sr(),u=Yu(),l=Object.assign,c=Object.defineProperty,d=e([].concat);return wg=!l||i(function(){if(r&&l({b:1},l(c({},"a",{enumerable:!0,get:function(){c(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var h={},f={},v=Symbol("assign detection"),p="abcdefghijklmnopqrst";return h[v]=7,p.split("").forEach(function(_){f[_]=_}),l({},h)[v]!==7||n(l({},f)).join("")!==p})?function(f,v){for(var p=a(f),_=arguments.length,m=1,g=s.f,E=o.f;_>m;)for(var y=u(arguments[m++]),O=g?d(n(y),g(y)):n(y),I=O.length,S=0,b;I>S;)b=O[S++],(!r||t(E,y,b))&&(p[b]=y[b]);return p}:l,wg}var qq;function k7(){if(qq)return Ox;qq=1;var r=de(),e=F7();return r({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e}),Ox}var Eg,Dq;function B7(){if(Dq)return Eg;Dq=1,k7();var r=Be();return Eg=r.Object.assign,Eg}var Sg,Aq;function j7(){if(Aq)return Sg;Aq=1;var r=B7();return Sg=r,Sg}var Og,Mq;function L7(){return Mq||(Mq=1,Og=j7()),Og}var z7=L7(),at=pe(z7),Nq={},Ig,Fq;function zs(){if(Fq)return Ig;Fq=1;var r=Ce();return Ig=r([].slice),Ig}var Tg,kq;function H7(){if(kq)return Tg;kq=1;var r=Ce(),e=hi(),t=Ot(),i=Pt(),n=zs(),s=da(),o=Function,a=r([].concat),u=r([].join),l={},c=function(d,h,f){if(!i(l,h)){for(var v=[],p=0;p=.1;)v=+s[d++%o],v>c&&(v=c),f=Math.sqrt(v*v/(1+l*l)),f=a<0?-f:f,e+=f,t+=l*f,h===!0?r.lineTo(e,t):r.moveTo(e,t),c-=v,h=!h}function tY(r,e,t,i){r.beginPath();const n=6,s=Math.PI*2/n;r.moveTo(e+i,t);for(let o=1;o1?t-1:0),n=1;ne)throw r("Maximum allowed index exceeded");return t},Ag}var Mg,Xq;function tl(){if(Xq)return Mg;Xq=1;var r=it(),e=fr(),t=ha();return Mg=function(i,n,s){r?e.f(i,n,t(0,s)):i[n]=s},Mg}var Ng,Jq;function i0(){if(Jq)return Ng;Jq=1;var r=ft(),e=r("toStringTag"),t={};return t[e]="z",Ng=String(t)==="[object z]",Ng}var Fg,Qq;function Hs(){if(Qq)return Fg;Qq=1;var r=i0(),e=St(),t=Lr(),i=ft(),n=i("toStringTag"),s=Object,o=t(function(){return arguments}())==="Arguments",a=function(u,l){try{return u[l]}catch{}};return Fg=r?t:function(u){var l,c,d;return u===void 0?"Undefined":u===null?"Null":typeof(c=a(l=s(u),n))=="string"?c:o?t(l):(d=t(l))==="Object"&&e(l.callee)?"Arguments":d},Fg}var kg,Zq;function sY(){if(Zq)return kg;Zq=1;var r=Ce(),e=St(),t=Qw(),i=r(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(n){return i(n)}),kg=t.inspectSource,kg}var Bg,eD;function T3(){if(eD)return Bg;eD=1;var r=Ce(),e=$e(),t=St(),i=Hs(),n=nr(),s=sY(),o=function(){},a=n("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=r(u.exec),c=!u.test(o),d=function(v){if(!t(v))return!1;try{return a(o,[],v),!0}catch{return!1}},h=function(v){if(!t(v))return!1;switch(i(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,s(v))}catch{return!0}};return h.sham=!0,Bg=!a||e(function(){var f;return d(d.call)||!d(Object)||!d(function(){f=!0})||f})?h:d,Bg}var jg,tD;function oY(){if(tD)return jg;tD=1;var r=qn(),e=T3(),t=Ot(),i=ft(),n=i("species"),s=Array;return jg=function(o){var a;return r(o)&&(a=o.constructor,e(a)&&(a===s||r(a.prototype))?a=void 0:t(a)&&(a=a[n],a===null&&(a=void 0))),a===void 0?s:a},jg}var Lg,rD;function n0(){if(rD)return Lg;rD=1;var r=oY();return Lg=function(e,t){return new(r(e))(t===0?0:t)},Lg}var zg,iD;function ma(){if(iD)return zg;iD=1;var r=$e(),e=ft(),t=fa(),i=e("species");return zg=function(n){return t>=51||!r(function(){var s=[],o=s.constructor={};return o[i]=function(){return{foo:1}},s[n](Boolean).foo!==1})},zg}var nD;function $3(){if(nD)return Kq;nD=1;var r=de(),e=$e(),t=qn(),i=Ot(),n=sr(),s=fi(),o=I3(),a=tl(),u=n0(),l=ma(),c=ft(),d=fa(),h=c("isConcatSpreadable"),f=d>=51||!e(function(){var _=[];return _[h]=!1,_.concat()[0]!==_}),v=function(_){if(!i(_))return!1;var m=_[h];return m!==void 0?!!m:t(_)},p=!f||!l("concat");return r({target:"Array",proto:!0,arity:1,forced:p},{concat:function(m){var g=n(this),E=u(g,0),y=0,O,I,S,b,w;for(O=-1,S=arguments.length;Oh;)t.f(a,f=c[h++],l[f]);return a},Wg}var Ug,lD;function aY(){if(lD)return Ug;lD=1;var r=nr();return Ug=r("document","documentElement"),Ug}var Vg,cD;function rl(){if(cD)return Vg;cD=1;var r=Bs(),e=Xu(),t=r("keys");return Vg=function(i){return t[i]||(t[i]=e(i))},Vg}var Kg,dD;function ya(){if(dD)return Kg;dD=1;var r=zr(),e=s0(),t=t0(),i=pa(),n=aY(),s=g3(),o=rl(),a=">",u="<",l="prototype",c="script",d=o("IE_PROTO"),h=function(){},f=function(g){return u+c+a+g+u+"/"+c+a},v=function(g){g.write(f("")),g.close();var E=g.parentWindow.Object;return g=null,E},p=function(){var g=s("iframe"),E="java"+c+":",y;return g.style.display="none",n.appendChild(g),g.src=String(E),y=g.contentWindow.document,y.open(),y.write(f("document.F=Object")),y.close(),y.F},_,m=function(){try{_=new ActiveXObject("htmlfile")}catch{}m=typeof document<"u"?document.domain&&_?v(_):p():v(_);for(var g=t.length;g--;)delete m[l][t[g]];return m()};return i[d]=!0,Kg=Object.create||function(E,y){var O;return E!==null?(h[l]=r(E),O=new h,h[l]=null,O[d]=E):O=m(),y===void 0?O:e.f(O,y)},Kg}var Gg={},hD;function il(){if(hD)return Gg;hD=1;var r=_3(),e=t0(),t=e.concat("length","prototype");return Gg.f=Object.getOwnPropertyNames||function(n){return r(n,t)},Gg}var Yg={},fD;function o0(){if(fD)return Yg;fD=1;var r=Lr(),e=Tr(),t=il().f,i=zs(),n=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(o){try{return t(o)}catch{return i(n)}};return Yg.f=function(a){return n&&r(a)==="Window"?s(a):t(e(a))},Yg}var Xg,vD;function ba(){if(vD)return Xg;vD=1;var r=js();return Xg=function(e,t,i,n){return n&&n.enumerable?e[t]=i:r(e,t,i),e},Xg}var Jg,pD;function a0(){if(pD)return Jg;pD=1;var r=fr();return Jg=function(e,t,i){return r.f(e,t,i)},Jg}var Qg={},gD;function nl(){if(gD)return Qg;gD=1;var r=ft();return Qg.f=r,Qg}var Zg,mD;function Qe(){if(mD)return Zg;mD=1;var r=Be(),e=Pt(),t=nl(),i=fr().f;return Zg=function(n){var s=r.Symbol||(r.Symbol={});e(s,n)||i(s,n,{value:t.f(n)})},Zg}var em,yD;function P3(){if(yD)return em;yD=1;var r=Qt(),e=nr(),t=ft(),i=ba();return em=function(){var n=e("Symbol"),s=n&&n.prototype,o=s&&s.valueOf,a=t("toPrimitive");s&&!s[a]&&i(s,a,function(u){return r(o,this)},{arity:1})},em}var tm,bD;function uY(){if(bD)return tm;bD=1;var r=i0(),e=Hs();return tm=r?{}.toString:function(){return"[object "+e(this)+"]"},tm}var rm,_D;function Dn(){if(_D)return rm;_D=1;var r=i0(),e=fr().f,t=js(),i=Pt(),n=uY(),s=ft(),o=s("toStringTag");return rm=function(a,u,l,c){var d=l?a:a&&a.prototype;d&&(i(d,o)||e(d,o,{configurable:!0,value:u}),c&&!r&&t(d,"toString",n))},rm}var im,wD;function R3(){if(wD)return im;wD=1;var r=Xe(),e=St(),t=r.WeakMap;return im=e(t)&&/native code/.test(String(t)),im}var nm,ED;function An(){if(ED)return nm;ED=1;var r=R3(),e=Xe(),t=Ot(),i=js(),n=Pt(),s=Qw(),o=rl(),a=pa(),u="Object already initialized",l=e.TypeError,c=e.WeakMap,d,h,f,v=function(g){return f(g)?h(g):d(g,{})},p=function(g){return function(E){var y;if(!t(E)||(y=h(E)).type!==g)throw new l("Incompatible receiver, "+g+" required");return y}};if(r||s.state){var _=s.state||(s.state=new c);_.get=_.get,_.has=_.has,_.set=_.set,d=function(g,E){if(_.has(g))throw new l(u);return E.facade=g,_.set(g,E),E},h=function(g){return _.get(g)||{}},f=function(g){return _.has(g)}}else{var m=o("state");a[m]=!0,d=function(g,E){if(n(g,m))throw new l(u);return E.facade=g,i(g,m,E),E},h=function(g){return n(g,m)?g[m]:{}},f=function(g){return n(g,m)}}return nm={set:d,get:h,has:f,enforce:v,getterFor:p},nm}var sm,SD;function Wi(){if(SD)return sm;SD=1;var r=Qu(),e=Ce(),t=Yu(),i=sr(),n=fi(),s=n0(),o=e([].push),a=function(u){var l=u===1,c=u===2,d=u===3,h=u===4,f=u===6,v=u===7,p=u===5||f;return function(_,m,g,E){for(var y=i(_),O=t(y),I=n(O),S=r(m,g),b=0,w=E||s,T=l?w(_,I):c||v?w(_,0):void 0,R,x;I>b;b++)if((p||b in O)&&(R=O[b],x=S(R,b,y),u))if(l)T[b]=x;else if(x)switch(u){case 3:return!0;case 5:return R;case 6:return b;case 2:o(T,R)}else switch(u){case 4:return!1;case 7:o(T,R)}return f?-1:d||h?h:T}};return sm={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},sm}var OD;function lY(){if(OD)return oD;OD=1;var r=de(),e=Xe(),t=Qt(),i=Ce(),n=ks(),s=it(),o=Ns(),a=$e(),u=Pt(),l=ht(),c=zr(),d=Tr(),h=Zw(),f=vr(),v=ha(),p=ya(),_=ga(),m=il(),g=o0(),E=el(),y=Ju(),O=fr(),I=s0(),S=Gu(),b=ba(),w=a0(),T=Bs(),R=rl(),x=pa(),C=Xu(),D=ft(),j=nl(),te=Qe(),H=P3(),ee=Dn(),ve=An(),we=Wi().forEach,re=R("hidden"),me="Symbol",xe="prototype",De=ve.set,nt=ve.getterFor(me),_e=Object[xe],A=e.Symbol,W=A&&A[xe],Y=e.RangeError,ne=e.TypeError,Pe=e.QObject,$=y.f,P=O.f,q=g.f,F=S.f,k=i([].push),N=T("symbols"),K=T("op-symbols"),X=T("wks"),U=!Pe||!Pe[xe]||!Pe[xe].findChild,B=function(ae,V,Z){var ie=$(_e,V);ie&&delete _e[V],P(ae,V,Z),ie&&ae!==_e&&P(_e,V,ie)},ce=s&&a(function(){return p(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a!==7})?B:P,J=function(ae,V){var Z=N[ae]=p(W);return De(Z,{type:me,tag:ae,description:V}),s||(Z.description=V),Z},oe=function(V,Z,ie){V===_e&&oe(K,Z,ie),c(V);var se=h(Z);return c(ie),u(N,se)?(ie.enumerable?(u(V,re)&&V[re][se]&&(V[re][se]=!1),ie=p(ie,{enumerable:v(0,!1)})):(u(V,re)||P(V,re,v(1,p(null))),V[re][se]=!0),ce(V,se,ie)):P(V,se,ie)},he=function(V,Z){c(V);var ie=d(Z),se=_(ie).concat(st(ie));return we(se,function(Ee){(!s||t(qe,ie,Ee))&&oe(V,Ee,ie[Ee])}),V},Oe=function(V,Z){return Z===void 0?p(V):he(p(V),Z)},qe=function(V){var Z=h(V),ie=t(F,this,Z);return this===_e&&u(N,Z)&&!u(K,Z)?!1:ie||!u(this,Z)||!u(N,Z)||u(this,re)&&this[re][Z]?ie:!0},Re=function(V,Z){var ie=d(V),se=h(Z);if(!(ie===_e&&u(N,se)&&!u(K,se))){var Ee=$(ie,se);return Ee&&u(N,se)&&!(u(ie,re)&&ie[re][se])&&(Ee.enumerable=!0),Ee}},vt=function(V){var Z=q(d(V)),ie=[];return we(Z,function(se){!u(N,se)&&!u(x,se)&&k(ie,se)}),ie},st=function(ae){var V=ae===_e,Z=q(V?K:d(ae)),ie=[];return we(Z,function(se){u(N,se)&&(!V||u(_e,se))&&k(ie,N[se])}),ie};return o||(A=function(){if(l(W,this))throw new ne("Symbol is not a constructor");var V=!arguments.length||arguments[0]===void 0?void 0:f(arguments[0]),Z=C(V),ie=function(se){var Ee=this===void 0?e:this;Ee===_e&&t(ie,K,se),u(Ee,re)&&u(Ee[re],Z)&&(Ee[re][Z]=!1);var vi=v(1,se);try{ce(Ee,Z,vi)}catch(Xs){if(!(Xs instanceof Y))throw Xs;B(Ee,Z,vi)}};return s&&U&&ce(_e,Z,{configurable:!0,set:ie}),J(Z,V)},W=A[xe],b(W,"toString",function(){return nt(this).tag}),b(A,"withoutSetter",function(ae){return J(C(ae),ae)}),S.f=qe,O.f=oe,I.f=he,y.f=Re,m.f=g.f=vt,E.f=st,j.f=function(ae){return J(D(ae),ae)},s&&(w(W,"description",{configurable:!0,get:function(){return nt(this).description}}),n||b(_e,"propertyIsEnumerable",qe,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:A}),we(_(X),function(ae){te(ae)}),r({target:me,stat:!0,forced:!o},{useSetter:function(){U=!0},useSimple:function(){U=!1}}),r({target:"Object",stat:!0,forced:!o,sham:!s},{create:Oe,defineProperty:oe,defineProperties:he,getOwnPropertyDescriptor:Re}),r({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:vt}),H(),ee(A,me),x[re]=!0,oD}var ID={},om,TD;function C3(){if(TD)return om;TD=1;var r=Ns();return om=r&&!!Symbol.for&&!!Symbol.keyFor,om}var $D;function cY(){if($D)return ID;$D=1;var r=de(),e=nr(),t=Pt(),i=vr(),n=Bs(),s=C3(),o=n("string-to-symbol-registry"),a=n("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!s},{for:function(u){var l=i(u);if(t(o,l))return o[l];var c=e("Symbol")(l);return o[l]=c,a[c]=l,c}}),ID}var PD={},RD;function dY(){if(RD)return PD;RD=1;var r=de(),e=Pt(),t=va(),i=Fs(),n=Bs(),s=C3(),o=n("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!s},{keyFor:function(u){if(!t(u))throw new TypeError(i(u)+" is not a symbol");if(e(o,u))return o[u]}}),PD}var CD={},am,xD;function hY(){if(xD)return am;xD=1;var r=Ce(),e=qn(),t=St(),i=Lr(),n=vr(),s=r([].push);return am=function(o){if(t(o))return o;if(e(o)){for(var a=o.length,u=[],l=0;l=v.length)return f.target=null,o(void 0,!0);switch(f.kind){case"keys":return o(p,!1);case"values":return o(v[p],!1)}return o([p,v[p]],!1)},"values");var h=t.Arguments=t.Array;if(e("keys"),e("values"),e("entries"),!a&&u&&h.name!=="values")try{n(h,"name",{value:"values"})}catch{}return Em}var Sm,CA;function DY(){return CA||(CA=1,Sm={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),Sm}var xA;function Vs(){if(xA)return pA;xA=1,Us();var r=DY(),e=Xe(),t=Dn(),i=Ws();for(var n in r)t(e[n],n),i[n]=i.Array;return pA}var Om,qA;function B3(){if(qA)return Om;qA=1;var r=TY();return Vs(),Om=r,Om}var Im,DA;function AY(){return DA||(DA=1,Im=B3()),Im}var MY=AY(),NY=pe(MY),AA={},MA;function FY(){if(MA)return AA;MA=1;var r=de(),e=qn(),t=T3(),i=Ot(),n=Zu(),s=fi(),o=Tr(),a=tl(),u=ft(),l=ma(),c=zs(),d=l("slice"),h=u("species"),f=Array,v=Math.max;return r({target:"Array",proto:!0,forced:!d},{slice:function(_,m){var g=o(this),E=s(g),y=n(_,E),O=n(m===void 0?E:m,E),I,S,b;if(e(g)&&(I=g.constructor,t(I)&&(I===f||e(I.prototype))?I=void 0:i(I)&&(I=I[h],I===null&&(I=void 0)),I===f||I===void 0))return c(g,y,O);for(S=new(I===void 0?f:I)(v(O-y,0)),b=0;y1?arguments[1]:void 0)}}),VA}var Am,GA;function XY(){if(GA)return Am;GA=1,YY();var r=Rt();return Am=r("Array","map"),Am}var Mm,YA;function JY(){if(YA)return Mm;YA=1;var r=ht(),e=XY(),t=Array.prototype;return Mm=function(i){var n=i.map;return i===t||r(t,i)&&n===t.map?e:n},Mm}var Nm,XA;function QY(){if(XA)return Nm;XA=1;var r=JY();return Nm=r,Nm}var Fm,JA;function ZY(){return JA||(JA=1,Fm=QY()),Fm}var eX=ZY(),ys=pe(eX),QA={},ZA;function tX(){if(ZA)return QA;ZA=1;var r=de(),e=sr(),t=ga(),i=$e(),n=i(function(){t(1)});return r({target:"Object",stat:!0,forced:n},{keys:function(o){return t(e(o))}}),QA}var km,eM;function rX(){if(eM)return km;eM=1,tX();var r=Be();return km=r.Object.keys,km}var Bm,tM;function iX(){if(tM)return Bm;tM=1;var r=rX();return Bm=r,Bm}var jm,rM;function nX(){return rM||(rM=1,jm=iX()),jm}var sX=nX(),et=pe(sX),iM={},nM;function oX(){if(nM)return iM;nM=1;var r=de(),e=Ce(),t=Date,i=e(t.prototype.getTime);return r({target:"Date",stat:!0},{now:function(){return i(new t)}}),iM}var Lm,sM;function aX(){if(sM)return Lm;sM=1,oX();var r=Be();return Lm=r.Date.now,Lm}var zm,oM;function uX(){if(oM)return zm;oM=1;var r=aX();return zm=r,zm}var Hm,aM;function lX(){return aM||(aM=1,Hm=uX()),Hm}var cX=lX(),lu=pe(cX),uM={},Wm,lM;function Ks(){if(lM)return Wm;lM=1;var r=$e();return Wm=function(e,t){var i=[][e];return!!i&&r(function(){i.call(null,t||function(){return 1},1)})},Wm}var Um,cM;function dX(){if(cM)return Um;cM=1;var r=Wi().forEach,e=Ks(),t=e("forEach");return Um=t?[].forEach:function(n){return r(this,n,arguments.length>1?arguments[1]:void 0)},Um}var dM;function hX(){if(dM)return uM;dM=1;var r=de(),e=dX();return r({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),uM}var Vm,hM;function fX(){if(hM)return Vm;hM=1,hX();var r=Rt();return Vm=r("Array","forEach"),Vm}var Km,fM;function vX(){if(fM)return Km;fM=1;var r=fX();return Km=r,Km}var Gm,vM;function pX(){if(vM)return Gm;vM=1;var r=Hs(),e=Pt(),t=ht(),i=vX(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return Gm=function(o){var a=o.forEach;return o===n||t(n,o)&&a===n.forEach||e(s,r(o))?i:a},Gm}var Ym,pM;function gX(){return pM||(pM=1,Ym=pX()),Ym}var mX=gX(),Le=pe(mX),gM={},mM;function yX(){if(mM)return gM;mM=1;var r=de(),e=Ce(),t=qn(),i=e([].reverse),n=[1,2];return r({target:"Array",proto:!0,forced:String(n)===String(n.reverse())},{reverse:function(){return t(this)&&(this.length=this.length),i(this)}}),gM}var Xm,yM;function bX(){if(yM)return Xm;yM=1,yX();var r=Rt();return Xm=r("Array","reverse"),Xm}var Jm,bM;function _X(){if(bM)return Jm;bM=1;var r=ht(),e=bX(),t=Array.prototype;return Jm=function(i){var n=i.reverse;return i===t||r(t,i)&&n===t.reverse?e:n},Jm}var Qm,_M;function wX(){if(_M)return Qm;_M=1;var r=_X();return Qm=r,Qm}var Zm,wM;function EX(){return wM||(wM=1,Zm=wX()),Zm}var SX=EX(),an=pe(SX),EM={},ey,SM;function OX(){if(SM)return ey;SM=1;var r=it(),e=qn(),t=TypeError,i=Object.getOwnPropertyDescriptor,n=r&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(s){return s instanceof TypeError}}();return ey=n?function(s,o){if(e(s)&&!i(s,"length").writable)throw new t("Cannot set read only .length");return s.length=o}:function(s,o){return s.length=o},ey}var ty,OM;function j3(){if(OM)return ty;OM=1;var r=Fs(),e=TypeError;return ty=function(t,i){if(!delete t[i])throw new e("Cannot delete property "+r(i)+" of "+r(t))},ty}var IM;function IX(){if(IM)return EM;IM=1;var r=de(),e=sr(),t=Zu(),i=Ls(),n=fi(),s=OX(),o=I3(),a=n0(),u=tl(),l=j3(),c=ma(),d=c("splice"),h=Math.max,f=Math.min;return r({target:"Array",proto:!0,forced:!d},{splice:function(p,_){var m=e(this),g=n(m),E=t(p,g),y=arguments.length,O,I,S,b,w,T;for(y===0?O=I=0:y===1?(O=0,I=g-E):(O=y-2,I=f(h(i(_),0),g-E)),o(g+O-I),S=a(m,I),b=0;bg-I+O;b--)l(m,b-1)}else if(O>I)for(b=g-I;b>E;b--)w=b+I-1,T=b+O-1,w in m?m[T]=m[w]:l(m,T);for(b=0;b1?arguments[1]:void 0)}}),i("includes"),CM}var oy,qM;function qX(){if(qM)return oy;qM=1,xX();var r=Rt();return oy=r("Array","includes"),oy}var DM={},ay,AM;function DX(){if(AM)return ay;AM=1;var r=Ot(),e=Lr(),t=ft(),i=t("match");return ay=function(n){var s;return r(n)&&((s=n[i])!==void 0?!!s:e(n)==="RegExp")},ay}var uy,MM;function AX(){if(MM)return uy;MM=1;var r=DX(),e=TypeError;return uy=function(t){if(r(t))throw new e("The method doesn't accept regular expressions");return t},uy}var ly,NM;function MX(){if(NM)return ly;NM=1;var r=ft(),e=r("match");return ly=function(t){var i=/./;try{"/./"[t](i)}catch{try{return i[e]=!1,"/./"[t](i)}catch{}}return!1},ly}var FM;function NX(){if(FM)return DM;FM=1;var r=de(),e=Ce(),t=AX(),i=di(),n=vr(),s=MX(),o=e("".indexOf);return r({target:"String",proto:!0,forced:!s("includes")},{includes:function(u){return!!~o(n(i(this)),n(t(u)),arguments.length>1?arguments[1]:void 0)}}),DM}var cy,kM;function FX(){if(kM)return cy;kM=1,NX();var r=Rt();return cy=r("String","includes"),cy}var dy,BM;function kX(){if(BM)return dy;BM=1;var r=ht(),e=qX(),t=FX(),i=Array.prototype,n=String.prototype;return dy=function(s){var o=s.includes;return s===i||r(i,s)&&o===i.includes?e:typeof s=="string"||s===n||r(n,s)&&o===n.includes?t:o},dy}var hy,jM;function BX(){if(jM)return hy;jM=1;var r=kX();return hy=r,hy}var fy,LM;function jX(){return LM||(LM=1,fy=BX()),fy}var LX=jX(),$i=pe(LX),zM={},HM;function zX(){if(HM)return zM;HM=1;var r=de(),e=$e(),t=sr(),i=sl(),n=F3(),s=e(function(){i(1)});return r({target:"Object",stat:!0,forced:s,sham:!n},{getPrototypeOf:function(a){return i(t(a))}}),zM}var vy,WM;function HX(){if(WM)return vy;WM=1,zX();var r=Be();return vy=r.Object.getPrototypeOf,vy}var py,UM;function WX(){if(UM)return py;UM=1;var r=HX();return py=r,py}var gy,VM;function UX(){return VM||(VM=1,gy=WX()),gy}var VX=UX(),KM=pe(VX),my,GM;function KX(){if(GM)return my;GM=1,$3();var r=Rt();return my=r("Array","concat"),my}var yy,YM;function GX(){if(YM)return yy;YM=1;var r=ht(),e=KX(),t=Array.prototype;return yy=function(i){var n=i.concat;return i===t||r(t,i)&&n===t.concat?e:n},yy}var by,XM;function YX(){if(XM)return by;XM=1;var r=GX();return by=r,by}var _y,JM;function XX(){return JM||(JM=1,_y=YX()),_y}var JX=XX(),QX=pe(JX),QM={},ZM;function ZX(){if(ZM)return QM;ZM=1;var r=de(),e=Wi().filter,t=ma(),i=t("filter");return r({target:"Array",proto:!0,forced:!i},{filter:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),QM}var wy,eN;function eJ(){if(eN)return wy;eN=1,ZX();var r=Rt();return wy=r("Array","filter"),wy}var Ey,tN;function tJ(){if(tN)return Ey;tN=1;var r=ht(),e=eJ(),t=Array.prototype;return Ey=function(i){var n=i.filter;return i===t||r(t,i)&&n===t.filter?e:n},Ey}var Sy,rN;function rJ(){if(rN)return Sy;rN=1;var r=tJ();return Sy=r,Sy}var Oy,iN;function iJ(){return iN||(iN=1,Oy=rJ()),Oy}var nJ=iJ(),Kt=pe(nJ),nN={},Iy,sN;function sJ(){if(sN)return Iy;sN=1;var r=it(),e=$e(),t=Ce(),i=sl(),n=ga(),s=Tr(),o=Gu().f,a=t(o),u=t([].push),l=r&&e(function(){var d=Object.create(null);return d[2]=2,!a(d,2)}),c=function(d){return function(h){for(var f=s(h),v=n(f),p=l&&i(f)===null,_=v.length,m=0,g=[],E;_>m;)E=v[m++],(!r||(p?E in f:a(f,E)))&&u(g,d?[E,f[E]]:f[E]);return g}};return Iy={entries:c(!0),values:c(!1)},Iy}var oN;function oJ(){if(oN)return nN;oN=1;var r=de(),e=sJ().values;return r({target:"Object",stat:!0},{values:function(i){return e(i)}}),nN}var Ty,aN;function aJ(){if(aN)return Ty;aN=1,oJ();var r=Be();return Ty=r.Object.values,Ty}var $y,uN;function uJ(){if(uN)return $y;uN=1;var r=aJ();return $y=r,$y}var Py,lN;function lJ(){return lN||(lN=1,Py=uJ()),Py}var cJ=lJ(),dJ=pe(cJ),cN={},Ry,dN;function d0(){return dN||(dN=1,Ry=` +\v\f\r                 \u2028\u2029\uFEFF`),Ry}var Cy,hN;function L3(){if(hN)return Cy;hN=1;var r=Ce(),e=di(),t=vr(),i=d0(),n=r("".replace),s=RegExp("^["+i+"]+"),o=RegExp("(^|[^"+i+"])["+i+"]+$"),a=function(u){return function(l){var c=t(e(l));return u&1&&(c=n(c,s,"")),u&2&&(c=n(c,o,"$1")),c}};return Cy={start:a(1),end:a(2),trim:a(3)},Cy}var xy,fN;function hJ(){if(fN)return xy;fN=1;var r=Xe(),e=$e(),t=Ce(),i=vr(),n=L3().trim,s=d0(),o=r.parseInt,a=r.Symbol,u=a&&a.iterator,l=/^[+-]?0x/i,c=t(l.exec),d=o(s+"08")!==8||o(s+"0x16")!==22||u&&!e(function(){o(Object(u))});return xy=d?function(f,v){var p=n(i(f));return o(p,v>>>0||(c(l,p)?16:10))}:o,xy}var vN;function fJ(){if(vN)return cN;vN=1;var r=de(),e=hJ();return r({global:!0,forced:parseInt!==e},{parseInt:e}),cN}var qy,pN;function vJ(){if(pN)return qy;pN=1,fJ();var r=Be();return qy=r.parseInt,qy}var Dy,gN;function pJ(){if(gN)return Dy;gN=1;var r=vJ();return Dy=r,Dy}var Ay,mN;function gJ(){return mN||(mN=1,Ay=pJ()),Ay}var mJ=gJ(),yr=pe(mJ),yN={},bN;function yJ(){if(bN)return yN;bN=1;var r=de(),e=Xw(),t=e0().indexOf,i=Ks(),n=e([].indexOf),s=!!n&&1/n([1],1,-0)<0,o=s||!i("indexOf");return r({target:"Array",proto:!0,forced:o},{indexOf:function(u){var l=arguments.length>1?arguments[1]:void 0;return s?n(this,u,l)||0:t(this,u,l)}}),yN}var My,_N;function bJ(){if(_N)return My;_N=1,yJ();var r=Rt();return My=r("Array","indexOf"),My}var Ny,wN;function _J(){if(wN)return Ny;wN=1;var r=ht(),e=bJ(),t=Array.prototype;return Ny=function(i){var n=i.indexOf;return i===t||r(t,i)&&n===t.indexOf?e:n},Ny}var Fy,EN;function wJ(){if(EN)return Fy;EN=1;var r=_J();return Fy=r,Fy}var ky,SN;function EJ(){return SN||(SN=1,ky=wJ()),ky}var SJ=EJ(),Fe=pe(SJ),ON={},IN;function OJ(){if(IN)return ON;IN=1;var r=de(),e=it(),t=ya();return r({target:"Object",stat:!0,sham:!e},{create:t}),ON}var By,TN;function IJ(){if(TN)return By;TN=1,OJ();var r=Be(),e=r.Object;return By=function(i,n){return e.create(i,n)},By}var jy,$N;function TJ(){if($N)return jy;$N=1;var r=IJ();return jy=r,jy}var Ly,PN;function $J(){return PN||(PN=1,Ly=TJ()),Ly}var PJ=$J(),un=pe(PJ),RN={},zy,CN;function RJ(){if(CN)return zy;CN=1;var r=Ls(),e=vr(),t=di(),i=RangeError;return zy=function(s){var o=e(t(this)),a="",u=r(s);if(u<0||u===1/0)throw new i("Wrong number of repetitions");for(;u>0;(u>>>=1)&&(o+=o))u&1&&(a+=o);return a},zy}var Hy,xN;function CJ(){if(xN)return Hy;xN=1;var r=Ce(),e=b3(),t=vr(),i=RJ(),n=di(),s=r(i),o=r("".slice),a=Math.ceil,u=function(l){return function(c,d,h){var f=t(n(c)),v=e(d),p=f.length,_=h===void 0?" ":t(h),m,g;return v<=p||_===""?f:(m=v-p,g=s(_,a(m/_.length)),g.length>m&&(g=o(g,0,m)),l?f+g:g+f)}};return Hy={start:u(!1),end:u(!0)},Hy}var Wy,qN;function xJ(){if(qN)return Wy;qN=1;var r=Ce(),e=$e(),t=CJ().start,i=RangeError,n=isFinite,s=Math.abs,o=Date.prototype,a=o.toISOString,u=r(o.getTime),l=r(o.getUTCDate),c=r(o.getUTCFullYear),d=r(o.getUTCHours),h=r(o.getUTCMilliseconds),f=r(o.getUTCMinutes),v=r(o.getUTCMonth),p=r(o.getUTCSeconds);return Wy=e(function(){return a.call(new Date(-5e13-1))!=="0385-07-25T07:06:39.999Z"})||!e(function(){a.call(new Date(NaN))})?function(){if(!n(u(this)))throw new i("Invalid time value");var m=this,g=c(m),E=h(m),y=g<0?"-":g>9999?"+":"";return y+t(s(g),y?6:4,0)+"-"+t(v(m)+1,2,0)+"-"+t(l(m),2,0)+"T"+t(d(m),2,0)+":"+t(f(m),2,0)+":"+t(p(m),2,0)+"."+t(E,3,0)+"Z"}:a,Wy}var DN;function qJ(){if(DN)return RN;DN=1;var r=de(),e=Qt(),t=sr(),i=p3(),n=xJ(),s=Lr(),o=$e(),a=o(function(){return new Date(NaN).toJSON()!==null||e(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1});return r({target:"Date",proto:!0,forced:a},{toJSON:function(l){var c=t(this),d=i(c,"number");return typeof d=="number"&&!isFinite(d)?null:!("toISOString"in c)&&s(c)==="Date"?e(n,c):c.toISOString()}}),RN}var Uy,AN;function DJ(){if(AN)return Uy;AN=1,qJ(),x3();var r=Be(),e=Ku();return r.JSON||(r.JSON={stringify:JSON.stringify}),Uy=function(i,n,s){return e(r.JSON.stringify,null,arguments)},Uy}var Vy,MN;function AJ(){if(MN)return Vy;MN=1;var r=DJ();return Vy=r,Vy}var Ky,NN;function MJ(){return NN||(NN=1,Ky=AJ()),Ky}var NJ=MJ(),_a=pe(NJ),FN={},kN={},Gy,BN;function z3(){if(BN)return Gy;BN=1;var r=Xe(),e=Ms(),t=Lr(),i=function(n){return e.slice(0,n.length)===n};return Gy=function(){return i("Bun/")?"BUN":i("Cloudflare-Workers")?"CLOUDFLARE":i("Deno/")?"DENO":i("Node.js/")?"NODE":r.Bun&&typeof Bun.version=="string"?"BUN":r.Deno&&typeof Deno.version=="object"?"DENO":t(r.process)==="process"?"NODE":r.window&&r.document?"BROWSER":"REST"}(),Gy}var Yy,jN;function FJ(){if(jN)return Yy;jN=1;var r=TypeError;return Yy=function(e,t){if(ed,p=t(h)?h:a(h),_=v?s(arguments,d):[],m=v?function(){e(p,this,_)}:p;return c?l(m,f):l(m)}:l},Xy}var zN;function kJ(){if(zN)return kN;zN=1;var r=de(),e=Xe(),t=H3(),i=t(e.setInterval,!0);return r({global:!0,bind:!0,forced:e.setInterval!==i},{setInterval:i}),kN}var HN={},WN;function BJ(){if(WN)return HN;WN=1;var r=de(),e=Xe(),t=H3(),i=t(e.setTimeout,!0);return r({global:!0,bind:!0,forced:e.setTimeout!==i},{setTimeout:i}),HN}var UN;function W3(){return UN||(UN=1,kJ(),BJ()),FN}var Jy,VN;function jJ(){if(VN)return Jy;VN=1,W3();var r=Be();return Jy=r.setTimeout,Jy}var Qy,KN;function LJ(){return KN||(KN=1,Qy=jJ()),Qy}var zJ=LJ(),ti=pe(zJ),GN={},Zy,YN;function HJ(){if(YN)return Zy;YN=1;var r=sr(),e=Zu(),t=fi();return Zy=function(n){for(var s=r(this),o=t(s),a=arguments.length,u=e(a>1?arguments[1]:void 0,o),l=a>2?arguments[2]:void 0,c=l===void 0?o:e(l,o);c>u;)s[u++]=n;return s},Zy}var XN;function WJ(){if(XN)return GN;XN=1;var r=de(),e=HJ(),t=u0();return r({target:"Array",proto:!0},{fill:e}),t("fill"),GN}var eb,JN;function UJ(){if(JN)return eb;JN=1,WJ();var r=Rt();return eb=r("Array","fill"),eb}var tb,QN;function VJ(){if(QN)return tb;QN=1;var r=ht(),e=UJ(),t=Array.prototype;return tb=function(i){var n=i.fill;return i===t||r(t,i)&&n===t.fill?e:n},tb}var rb,ZN;function KJ(){if(ZN)return rb;ZN=1;var r=VJ();return rb=r,rb}var ib,eF;function GJ(){return eF||(eF=1,ib=KJ()),ib}var YJ=GJ(),wa=pe(YJ);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 + * http://naver.github.io/egjs + * + * Forked By Naver egjs + * Copyright (c) hammerjs + * Licensed under the MIT license */function Sr(){return Sr=Object.assign||function(r){for(var e=1;e"u"?{style:{}}:document.createElement("div"),JJ="function",es=Math.round,mn=Math.abs,h0=Date.now;function ol(r,e){for(var t,i,n=e[0].toUpperCase()+e.slice(1),s=0;s"u"?ri={}:ri=window;var U3=ol(XJ.style,"touchAction"),V3=U3!==void 0;function QJ(){if(!V3)return!1;var r={},e=ri.CSS&&ri.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return r[t]=e?ri.CSS.supports("touch-action",t):!0}),r}var K3="compute",G3="auto",K_="manipulation",ln="none",jo="pan-x",Lo="pan-y",Ba=QJ(),ZJ=/mobile|tablet|ip(ad|hone|od)|android/i,Y3="ontouchstart"in ri,eQ=ol(ri,"PointerEvent")!==void 0,tQ=Y3&&ZJ.test(navigator.userAgent),Ea="touch",rQ="pen",f0="mouse",iQ="kinect",nQ=25,Wt=1,Mn=2,ut=4,Yt=8,cu=1,Sa=2,Oa=4,Ia=8,bs=16,kr=Sa|Oa,cn=Ia|bs,X3=kr|cn,J3=["x","y"],du=["clientX","clientY"];function ii(r,e,t){var i;if(r)if(r.forEach)r.forEach(e,t);else if(r.length!==void 0)for(i=0;i-1}function sQ(r){if(tn(r,ln))return ln;var e=tn(r,jo),t=tn(r,Lo);return e&&t?ln:e||t?e?jo:Lo:tn(r,K_)?K_:G3}var Q3=function(){function r(t,i){this.manager=t,this.set(i)}var e=r.prototype;return e.set=function(i){i===K3&&(i=this.compute()),V3&&this.manager.element.style&&Ba[i]&&(this.manager.element.style[U3]=i),this.actions=i.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var i=[];return ii(this.manager.recognizers,function(n){al(n.options.enable,[n])&&(i=i.concat(n.getTouchAction()))}),sQ(i.join(" "))},e.preventDefaults=function(i){var n=i.srcEvent,s=i.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,a=tn(o,ln)&&!Ba[ln],u=tn(o,Lo)&&!Ba[Lo],l=tn(o,jo)&&!Ba[jo];if(a){var c=i.pointers.length===1,d=i.distance<2,h=i.deltaTime<250;if(c&&d&&h)return}if(!(l&&u)&&(a||u&&s&kr||l&&s&cn))return this.preventSrc(n)},e.preventSrc=function(i){this.manager.session.prevented=!0,i.preventDefault()},r}();function v0(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}function Z3(r){var e=r.length;if(e===1)return{x:es(r[0].clientX),y:es(r[0].clientY)};for(var t=0,i=0,n=0;n=mn(e)?r<0?Sa:Oa:e<0?Ia:bs}function oQ(r,e){var t=e.center,i=r.offsetDelta||{},n=r.prevDelta||{},s=r.prevInput||{};(e.eventType===Wt||s.eventType===ut)&&(n=r.prevDelta={x:s.deltaX||0,y:s.deltaY||0},i=r.offsetDelta={x:t.x,y:t.y}),e.deltaX=n.x+(t.x-i.x),e.deltaY=n.y+(t.y-i.y)}function t5(r,e,t){return{x:e/r||0,y:t/r||0}}function aQ(r,e){return hu(e[0],e[1],du)/hu(r[0],r[1],du)}function uQ(r,e){return G_(e[1],e[0],du)+G_(r[1],r[0],du)}function lQ(r,e){var t=r.lastInterval||e,i=e.timeStamp-t.timeStamp,n,s,o,a;if(e.eventType!==Yt&&(i>nQ||t.velocity===void 0)){var u=e.deltaX-t.deltaX,l=e.deltaY-t.deltaY,c=t5(i,u,l);s=c.x,o=c.y,n=mn(c.x)>mn(c.y)?c.x:c.y,a=e5(u,l),r.lastInterval=e}else n=t.velocity,s=t.velocityX,o=t.velocityY,a=t.direction;e.velocity=n,e.velocityX=s,e.velocityY=o,e.direction=a}function cQ(r,e){var t=r.session,i=e.pointers,n=i.length;t.firstInput||(t.firstInput=rF(e)),n>1&&!t.firstMultiple?t.firstMultiple=rF(e):n===1&&(t.firstMultiple=!1);var s=t.firstInput,o=t.firstMultiple,a=o?o.center:s.center,u=e.center=Z3(i);e.timeStamp=h0(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=G_(a,u),e.distance=hu(a,u),oQ(t,e),e.offsetDirection=e5(e.deltaX,e.deltaY);var l=t5(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=mn(l.x)>mn(l.y)?l.x:l.y,e.scale=o?aQ(o.pointers,i):1,e.rotation=o?uQ(o.pointers,i):0,e.maxPointers=t.prevInput?e.pointers.length>t.prevInput.maxPointers?e.pointers.length:t.prevInput.maxPointers:e.pointers.length,lQ(t,e);var c=r.element,d=e.srcEvent,h;d.composedPath?h=d.composedPath()[0]:d.path?h=d.path[0]:h=d.target,v0(h,c)&&(c=h),e.target=c}function dQ(r,e,t){var i=t.pointers.length,n=t.changedPointers.length,s=e&Wt&&i-n===0,o=e&(ut|Yt)&&i-n===0;t.isFirst=!!s,t.isFinal=!!o,s&&(r.session={}),t.eventType=e,cQ(r,t),r.emit("hammer.input",t),r.recognize(t),r.session.prevInput=t}function zo(r){return r.trim().split(/\s+/g)}function wo(r,e,t){ii(zo(e),function(i){r.addEventListener(i,t,!1)})}function Eo(r,e,t){ii(zo(e),function(i){r.removeEventListener(i,t,!1)})}function iF(r){var e=r.ownerDocument||r;return e.defaultView||e.parentWindow||window}var Gs=function(){function r(t,i){var n=this;this.manager=t,this.callback=i,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(s){al(t.options.enable,[t])&&n.handler(s)},this.init()}var e=r.prototype;return e.handler=function(){},e.init=function(){this.evEl&&wo(this.element,this.evEl,this.domHandler),this.evTarget&&wo(this.target,this.evTarget,this.domHandler),this.evWin&&wo(iF(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&Eo(this.element,this.evEl,this.domHandler),this.evTarget&&Eo(this.target,this.evTarget,this.domHandler),this.evWin&&Eo(iF(this.element),this.evWin,this.domHandler)},r}();function yn(r,e,t){if(r.indexOf&&!t)return r.indexOf(e);for(var i=0;iu[e]}):i=i.sort()),i}var vQ={touchstart:Wt,touchmove:Mn,touchend:ut,touchcancel:Yt},pQ="touchstart touchmove touchend touchcancel",g0=function(r){pr(e,r);function e(){var i;return e.prototype.evTarget=pQ,i=r.apply(this,arguments)||this,i.targetIds={},i}var t=e.prototype;return t.handler=function(n){var s=vQ[n.type],o=gQ.call(this,n,s);o&&this.callback(this.manager,s,{pointers:o[0],changedPointers:o[1],pointerType:Ea,srcEvent:n})},e}(Gs);function gQ(r,e){var t=Ho(r.touches),i=this.targetIds;if(e&(Wt|Mn)&&t.length===1)return i[t[0].identifier]=!0,[t,t];var n,s,o=Ho(r.changedTouches),a=[],u=this.target;if(s=t.filter(function(l){return v0(l.target,u)}),e===Wt)for(n=0;n-1&&n.splice(a,1)};setTimeout(s,_Q)}}function wQ(r,e){r&Wt?(this.primaryTouch=e.changedPointers[0].identifier,sF.call(this,e)):r&(ut|Yt)&&sF.call(this,e)}function EQ(r){for(var e=r.srcEvent.clientX,t=r.srcEvent.clientY,i=0;i-1&&this.requireFail.splice(n,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(i){return!!this.simultaneous[i.id]},e.emit=function(i){var n=this,s=this.state;function o(a){n.manager.emit(a,i)}s=Pi&&o(n.options.event+oF(s))},e.tryEmit=function(i){if(this.canEmit())return this.emit(i);this.state=Ar},e.canEmit=function(){for(var i=0;is.threshold&&u&s.direction},t.attrTest=function(n){return ws.prototype.attrTest.call(this,n)&&(this.state&cr||!(this.state&cr)&&this.directionTest(n))},t.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var s=o5(n.direction);s&&(n.additionalEvent=this.options.event+s),r.prototype.emit.call(this,n)},e}(ws),a5=function(r){pr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Sr({event:"swipe",threshold:10,velocity:.3,direction:kr|cn,pointers:1},i))||this}var t=e.prototype;return t.getTouchAction=function(){return y0.prototype.getTouchAction.call(this)},t.attrTest=function(n){var s=this.options.direction,o;return s&(kr|cn)?o=n.overallVelocity:s&kr?o=n.overallVelocityX:s&cn&&(o=n.overallVelocityY),r.prototype.attrTest.call(this,n)&&s&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&mn(o)>this.options.velocity&&n.eventType&ut},t.emit=function(n){var s=o5(n.offsetDirection);s&&this.manager.emit(this.options.event+s,n),this.manager.emit(this.options.event,n)},e}(ws),u5=function(r){pr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Sr({event:"pinch",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[ln]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&cr)},t.emit=function(n){if(n.scale!==1){var s=n.scale<1?"in":"out";n.additionalEvent=this.options.event+s}r.prototype.emit.call(this,n)},e}(ws),l5=function(r){pr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Sr({event:"rotate",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[ln]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&cr)},e}(ws),c5=function(r){pr(e,r);function e(i){var n;return i===void 0&&(i={}),n=r.call(this,Sr({event:"press",pointers:1,time:251,threshold:9},i))||this,n._timer=null,n._input=null,n}var t=e.prototype;return t.getTouchAction=function(){return[G3]},t.process=function(n){var s=this,o=this.options,a=n.pointers.length===o.pointers,u=n.distanceo.time;if(this._input=n,!u||!a||n.eventType&(ut|Yt)&&!l)this.reset();else if(n.eventType&Wt)this.reset(),this._timer=setTimeout(function(){s.state=ni,s.tryEmit()},o.time);else if(n.eventType&ut)return ni;return Ar},t.reset=function(){clearTimeout(this._timer)},t.emit=function(n){this.state===ni&&(n&&n.eventType&ut?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=h0(),this.manager.emit(this.options.event,this._input)))},e}(Ta),d5={domEvents:!1,touchAction:K3,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},aF=[[l5,{enable:!1}],[u5,{enable:!1},["rotate"]],[a5,{direction:kr}],[y0,{direction:kr},["swipe"]],[Y_],[Y_,{event:"doubletap",taps:2},["tap"]],[c5]],TQ=1,uF=2;function lF(r,e){var t=r.element;if(t.style){var i;ii(r.options.cssProps,function(n,s){i=ol(t.style,s),e?(r.oldCssProps[i]=t.style[i],t.style[i]=n):t.style[i]=r.oldCssProps[i]||""}),e||(r.oldCssProps={})}}function $Q(r,e){var t=document.createEvent("Event");t.initEvent(r,!0,!0),t.gesture=e,e.target.dispatchEvent(t)}var cF=function(){function r(t,i){var n=this;this.options=gn({},d5,i||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=SQ(this),this.touchAction=new Q3(this,this.options.touchAction),lF(this,!0),ii(this.options.recognizers,function(s){var o=n.add(new s[0](s[1]));s[2]&&o.recognizeWith(s[2]),s[3]&&o.requireFailure(s[3])},this)}var e=r.prototype;return e.set=function(i){return gn(this.options,i),i.touchAction&&this.touchAction.update(),i.inputTarget&&(this.input.destroy(),this.input.target=i.inputTarget,this.input.init()),this},e.stop=function(i){this.session.stopped=i?uF:TQ},e.recognize=function(i){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(i);var s,o=this.recognizers,a=n.curRecognizer;(!a||a&&a.state&ni)&&(n.curRecognizer=null,a=null);for(var u=0;u\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,i,s),r.apply(this,arguments)}}var f5=h5(function(r,e,t){for(var i=Object.keys(e),n=0;n{const o=2091639*e+n*23283064365386963e-26;return e=t,t=i,i=o-(n=o|0)};return s.uint32=()=>s()*4294967296,s.fract53=()=>s()+(s()*2097152|0)*11102230246251565e-32,s.algorithm="Alea",s.seed=r,s.version="0.9",s}function NQ(){const r=FQ();let e=r(" "),t=r(" "),i=r(" ");for(let n=0;n>>0,n-=r,n*=r,r=n>>>0,n-=r,r+=n*4294967296}return(r>>>0)*23283064365386963e-26}}function kQ(){const r=()=>{};return{on:r,off:r,destroy:r,emit:r,get(){return{set:r}}}}const b0=typeof window<"u"?window.Hammer||v5:function(){return kQ()};function Mr(r){var e;this._cleanupQueue=[],this.active=!1,this._dom={container:r,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});const t=b0(this._dom.overlay);t.on("tap",z(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{t.destroy()});const i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Le(i).call(i,n=>{t.on(n,s=>{s.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=n=>{BQ(n.target,r)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=n=>{("key"in n?n.key==="Escape":n.keyCode===27)&&this.deactivate()}}O3(Mr.prototype);Mr.current=null;Mr.prototype.destroy=function(){this.deactivate();for(const t of an(r=ei(e=this._cleanupQueue).call(e,0)).call(r)){var r,e;t()}};Mr.prototype.activate=function(){Mr.current&&Mr.current.deactivate(),Mr.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)};Mr.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")};Mr.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function BQ(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}const jQ=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,LQ=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,zQ=/^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,HQ=/^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 _i(r){if(r)for(;r.hasChildNodes()===!0;){const e=r.firstChild;e&&(_i(e),r.removeChild(e))}}function us(r){return r instanceof String||typeof r=="string"}function hF(r){return typeof r=="object"&&r!==null}function bn(r,e,t,i){let n=!1;i===!0&&(n=e[t]===null&&r[t]!==void 0),n?delete r[t]:r[t]=e[t]}function p5(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(const i in r)if(e[i]!==void 0)if(e[i]===null||typeof e[i]!="object")bn(r,e,i,t);else{const n=r[i],s=e[i];hF(n)&&hF(s)&&p5(n,s,t)}}function Ys(r,e,t){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(tt(t))throw new TypeError("Arrays are not supported by deepExtend");for(let n=0;n3&&arguments[3]!==void 0?arguments[3]:!1;if(tt(t))throw new TypeError("Arrays are not supported by deepExtend");for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&!$i(r).call(r,n))if(t[n]&&t[n].constructor===Object)e[n]===void 0&&(e[n]={}),e[n].constructor===Object?Ue(e[n],t[n]):bn(e,t,n,i);else if(tt(t[n])){e[n]=[];for(let s=0;s2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)||t===!0)if(typeof e[s]=="object"&&e[s]!==null&&KM(e[s])===Object.prototype)r[s]===void 0?r[s]=Ue({},e[s],t):typeof r[s]=="object"&&r[s]!==null&&KM(r[s])===Object.prototype?Ue(r[s],e[s],t):bn(r,e,s,i);else if(tt(e[s])){var n;r[s]=qr(n=e[s]).call(n)}else bn(r,e,s,i);return r}function vu(r,e){return[...r,e]}function WQ(r){return qr(r).call(r)}function UQ(r){return r.getBoundingClientRect().left}function VQ(r){return r.getBoundingClientRect().top}function Ie(r,e){if(tt(r)){const t=r.length;for(let i=0;i3&&arguments[3]!==void 0?arguments[3]:{};const n=function(f){return f!=null},s=function(f){return f!==null&&typeof f=="object"},o=function(f){for(const v in f)if(Object.prototype.hasOwnProperty.call(f,v))return!1;return!0};if(!s(r))throw new Error("Parameter mergeTarget must be an object");if(!s(e))throw new Error("Parameter options must be an object");if(!n(t))throw new Error("Parameter option must have a value");if(!s(i))throw new Error("Parameter globalOptions must be an object");const a=function(f,v,p){s(f[p])||(f[p]={});const _=v[p],m=f[p];for(const g in _)Object.prototype.hasOwnProperty.call(_,g)&&(m[g]=_[g])},u=e[t],c=s(i)&&!o(i)?i[t]:void 0,d=c?c.enabled:void 0;if(u===void 0)return;if(typeof u=="boolean"){s(r[t])||(r[t]={}),r[t].enabled=u;return}if(u===null&&!s(r[t]))if(n(c))r[t]=un(c);else return;if(!s(u))return;let h=!0;u.enabled!==void 0?h=u.enabled:d!==void 0&&(h=c.enabled),a(r,e,t),r[t].enabled=h}const YQ={linear(r){return r},easeInQuad(r){return r*r},easeOutQuad(r){return r*(2-r)},easeInOutQuad(r){return r<.5?2*r*r:-1+(4-2*r)*r},easeInCubic(r){return r*r*r},easeOutCubic(r){return--r*r*r+1},easeInOutCubic(r){return r<.5?4*r*r*r:(r-1)*(2*r-2)*(2*r-2)+1},easeInQuart(r){return r*r*r*r},easeOutQuart(r){return 1- --r*r*r*r},easeInOutQuart(r){return r<.5?8*r*r*r*r:1-8*--r*r*r*r},easeInQuint(r){return r*r*r*r*r},easeOutQuint(r){return 1+--r*r*r*r*r},easeInOutQuint(r){return r<.5?16*r*r*r*r*r:1+16*--r*r*r*r*r}};function wi(r,e){let t;tt(e)||(e=[e]);for(const i of r)if(i){t=i[e[0]];for(let n=1;n0&&arguments[0]!==void 0?arguments[0]:1;this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(e){if(typeof e=="function")this.updateCallback=e;else throw new Error("Function attempted to set as colorPicker update callback is not a function.")}setCloseCallback(e){if(typeof e=="function")this.closeCallback=e;else throw new Error("Function attempted to set as colorPicker closing callback is not a function.")}_isColorString(e){if(typeof e=="string")return XQ[e]}setColor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e==="none")return;let i;const n=this._isColorString(e);if(n!==void 0&&(e=n),us(e)===!0){if(y5(e)===!0){const s=e.substr(4).substr(0,e.length-5).split(",");i={r:s[0],g:s[1],b:s[2],a:1}}else if(GQ(e)===!0){const s=e.substr(5).substr(0,e.length-6).split(",");i={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(m5(e)===!0){const s=_0(e);i={r:s.r,g:s.g,b:s.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){const s=e.a!==void 0?e.a:"1.0";i={r:e.r,g:e.g,b:e.b,a:s}}if(i===void 0)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+_a(e));this._setColor(i,t)}show(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}_hide(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)===!0&&(this.previousColor=at({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",ti(()=>{this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){this.previousColor!==void 0?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}_setColor(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)===!0&&(this.initialColor=at({},e)),this.color=e;const i=uo(e.r,e.g,e.b),n=2*Math.PI,s=this.r*i.s,o=this.centerCoordinates.x+s*Math.sin(n*i.h),a=this.centerCoordinates.y+s*Math.cos(n*i.h);this.colorPickerSelector.style.left=o-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=a-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(e)}_setOpacity(e){this.color.a=e/100,this._updatePicker(this.color)}_setBrightness(e){const t=uo(this.color.r,this.color.g,this.color.b);t.v=e/100;const i=Ya(t.h,t.s,t.v);i.a=this.color.a,this.color=i,this._updatePicker()}_updatePicker(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color;const t=uo(e.r,e.g,e.b),i=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);const n=this.colorPickerCanvas.clientWidth,s=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,n,s),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-t.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),wa(i).call(i),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}_setSize(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){var e,t,i,n;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){const o=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(o.webkitBackingStorePixelRatio||o.mozBackingStorePixelRatio||o.msBackingStorePixelRatio||o.oBackingStorePixelRatio||o.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{const o=document.createElement("DIV");o.style.color="red",o.style.fontWeight="bold",o.style.padding="10px",o.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(o)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch{}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch{}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);const s=this;this.opacityRange.onchange=function(){s._setOpacity(this.value)},this.opacityRange.oninput=function(){s._setOpacity(this.value)},this.brightnessRange.onchange=function(){s._setBrightness(this.value)},this.brightnessRange.oninput=function(){s._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=z(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=z(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=z(i=this._save).call(i,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=z(n=this._loadLast).call(n,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)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new b0(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",e=>{e.isFirst&&this._moveSelector(e)}),this.hammer.on("tap",e=>{this._moveSelector(e)}),this.hammer.on("panstart",e=>{this._moveSelector(e)}),this.hammer.on("panmove",e=>{this._moveSelector(e)}),this.hammer.on("panend",e=>{this._moveSelector(e)})}_generateHueCircle(){if(this.generated===!1){const 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);const t=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,i);let n,s,o,a;this.centerCoordinates={x:t*.5,y:i*.5},this.r=.49*t;const u=2*Math.PI/360,l=1/360,c=1/this.r;let d;for(o=0;o<360;o++)for(a=0;a3&&arguments[3]!==void 0?arguments[3]:1,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:()=>!1;this.parent=e,this.changedOptions=[],this.container=t,this.allowCreation=!1,this.hideOption=s,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},at(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new JQ(n),this.wrapper=void 0}setOptions(e){if(e!==void 0){this.popupHistory={},this._removePopup();let t=!0;if(typeof e=="string")this.options.filter=e;else if(tt(e))this.options.filter=e.join();else if(typeof e=="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),Kt(e)!==void 0&&(this.options.filter=Kt(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);Kt(this.options)===!1&&(t=!1),this.options.enabled=t}this._clean()}setModuleOptions(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];const e=Kt(this.options);let t=0,i=!1;for(const n in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,n)&&(this.allowCreation=!1,i=!1,typeof e=="function"?(i=e(n,[]),i=i||this._handleObject(this.configureOptions[n],[n],!0)):(e===!0||Fe(e).call(e,n)!==-1)&&(i=!0),i!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),t++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(let e=0;e1?t-1:0),n=1;n{s.appendChild(o)}),this.domElements.push(s),this.domElements.length}return 0}_makeHeader(e){const t=document.createElement("div");t.className="vis-configuration vis-config-header",t.innerText=e,this._makeItem([],t)}_makeLabel(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const n=document.createElement("div");if(n.className="vis-configuration vis-config-label vis-config-s"+t.length,i===!0){for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(Q_("i","b",e))}else n.innerText=e+":";return n}_makeDropdown(e,t,i){const n=document.createElement("select");n.className="vis-configuration vis-config-select";let s=0;t!==void 0&&Fe(e).call(e,t)!==-1&&(s=Fe(e).call(e,t));for(let u=0;uo&&o!==1&&(u.max=Math.ceil(t*1.2),c=u.max,l="range increased"),u.value=t):u.value=n;const d=document.createElement("input");d.className="vis-configuration vis-config-rangeinput",d.value=u.value;const h=this;u.onchange=function(){d.value=this.value,h._update(Number(this.value),i)},u.oninput=function(){d.value=this.value};const f=this._makeLabel(i[i.length-1],i),v=this._makeItem(i,f,u,d);l!==""&&this.popupHistory[v]!==c&&(this.popupHistory[v]=c,this._setupPopup(l,v))}_makeButton(){if(this.options.showButton===!0){const e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerText="generate options",e.onclick=()=>{this._printOptions()},e.onmouseover=()=>{e.className="vis-configuration vis-config-button hover"},e.onmouseout=()=>{e.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(e)}}_setupPopup(e,t){if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:i,index:t}}}_removePopup(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(this.popupDiv.html!==void 0){const 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=ti(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=ti(()=>{this._removePopup()},1800)}}_makeCheckbox(e,t,i){const n=document.createElement("input");n.type="checkbox",n.className="vis-configuration vis-config-checkbox",n.checked=e,t!==void 0&&(n.checked=t,t!==e&&(typeof e=="object"?t!==e.enabled&&this.changedOptions.push({path:i,value:t}):this.changedOptions.push({path:i,value:t})));const s=this;n.onchange=function(){s._update(this.checked,i)};const o=this._makeLabel(i[i.length-1],i);this._makeItem(i,o,n)}_makeTextInput(e,t,i){const n=document.createElement("input");n.type="text",n.className="vis-configuration vis-config-text",n.value=t,t!==e&&this.changedOptions.push({path:i,value:t});const s=this;n.onchange=function(){s._update(this.value,i)};const o=this._makeLabel(i[i.length-1],i);this._makeItem(i,o,n)}_makeColorField(e,t,i){const n=e[1],s=document.createElement("div");t=t===void 0?n:t,t!=="none"?(s.className="vis-configuration vis-config-colorBlock",s.style.backgroundColor=t):s.className="vis-configuration vis-config-colorBlock none",t=t===void 0?n:t,s.onclick=()=>{this._showColorPicker(t,s,i)};const o=this._makeLabel(i[i.length-1],i);this._makeItem(i,o,s)}_showColorPicker(e,t,i){t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(n=>{const s="rgba("+n.r+","+n.g+","+n.b+","+n.a+")";t.style.backgroundColor=s,this._update(s,i)}),this.colorPicker.setCloseCallback(()=>{t.onclick=()=>{this._showColorPicker(e,t,i)}})}_handleObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=!1;const s=Kt(this.options);let o=!1;for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){n=!0;const u=e[a],l=vu(t,a);if(typeof s=="function"&&(n=s(a,t),n===!1&&!tt(u)&&typeof u!="string"&&typeof u!="boolean"&&u instanceof Object&&(this.allowCreation=!1,n=this._handleObject(u,l,!0),this.allowCreation=i===!1)),n!==!1){o=!0;const c=this._getValue(l);if(tt(u))this._handleArray(u,c,l);else if(typeof u=="string")this._makeTextInput(u,c,l);else if(typeof u=="boolean")this._makeCheckbox(u,c,l);else if(u instanceof Object){if(!this.hideOption(t,a,this.moduleOptions))if(u.enabled!==void 0){const d=vu(l,"enabled"),h=this._getValue(d);if(h===!0){const f=this._makeLabel(a,l,!0);this._makeItem(l,f),o=this._handleObject(u,l)||o}else this._makeCheckbox(u,h,l)}else{const d=this._makeLabel(a,l,!0);this._makeItem(l,d),o=this._handleObject(u,l)||o}}else console.error("dont know how to handle",u,a,l)}}return o}_handleArray(e,t,i){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,t,i),e[1]!==t&&this.changedOptions.push({path:i,value:t})):typeof e[0]=="string"?(this._makeDropdown(e,t,i),e[0]!==t&&this.changedOptions.push({path:i,value:t})):typeof e[0]=="number"&&(this._makeRange(e,t,i),e[0]!==t&&this.changedOptions.push({path:i,value:Number(t)}))}_update(e,t){const i=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}_constructOptions(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=i;e=e==="true"?!0:e,e=e==="false"?!1:e;for(let s=0;ss-this.padding&&(u=!0),u?o=this.x-i:o=this.x,l?a=this.y-t:a=this.y}else a=this.y-t,a+t+this.padding>n&&(a=n-t-this.padding),as&&(o=s-i-this.padding),os.distance?u=" in "+Ze.printLocation(n.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+Ze.printLocation(s.path,s.closestMatch,""):n.distance<=o?u='. Did you mean "'+n.closestMatch+'"?'+Ze.printLocation(n.path,e):u=". Did you mean one of these: "+Ze.print(et(t))+Ze.printLocation(i,e),console.error('%cUnknown option detected: "'+e+'"'+u,Z_),io=!0}static findInOptions(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,s=1e9,o="",a=[];const u=e.toLowerCase();let l;for(const d in t){let h;if(t[d].__type__!==void 0&&n===!0){const f=Ze.findInOptions(e,t[d],vu(i,d));s>f.distance&&(o=f.closestMatch,a=f.path,s=f.distance,l=f.indexMatch)}else{var c;Fe(c=d.toLowerCase()).call(c,u)!==-1&&(l=d),h=Ze.levenshteinDistance(e,d),s>h&&(o=d,a=WQ(i),s=h)}}return{closestMatch:o,path:a,distance:s,indexMatch:l}}static printLocation(e,t){let n=` + +`+(arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at: +`)+`options = { +`;for(let s=0;s":!0,"--":!0},Si="",Es=0,Se="",fe="",Vt=kt.NULL;function oZ(){Es=0,Se=Si.charAt(0)}function mt(){Es++,Se=Si.charAt(Es)}function Un(){return Si.charAt(Es+1)}function pF(r){var e=r.charCodeAt(0);return e<47?e===35||e===46:e<59?e>47:e<91?e>64:e<96?e===95:e<123?e>96:!1}function Ai(r,e){if(r||(r={}),e)for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}function aZ(r,e,t){for(var i=e.split("."),n=r;i.length;){var s=i.shift();i.length?(n[s]||(n[s]={}),n=n[s]):n[s]=t}}function w5(r,e){for(var t,i,n=null,s=[r],o=r;o.parent;)s.push(o.parent),o=o.parent;if(o.nodes){for(t=0,i=o.nodes.length;t=0;t--){var a,u=s[t];u.nodes||(u.nodes=[]),Fe(a=u.nodes).call(a,n)===-1&&u.nodes.push(n)}e.attr&&(n.attr=Ai(n.attr,e.attr))}function uZ(r,e){if(r.edges||(r.edges=[]),r.edges.push(e),r.edge){var t=Ai({},r.edge);e.attr=Ai(t,e.attr)}}function E5(r,e,t,i,n){var s={from:e,to:t,type:i};return r.edge&&(s.attr=Ai({},r.edge)),s.attr=Ai(s.attr||{},n),n!=null&&n.hasOwnProperty("arrows")&&n.arrows!=null&&(s.arrows={to:{enabled:!0,type:n.arrows.type}},n.arrows=null),s}function Ve(){for(Vt=kt.NULL,fe="";Se===" "||Se===" "||Se===` +`||Se==="\r";)mt();do{var r=!1;if(Se==="#"){for(var e=Es-1;Si.charAt(e)===" "||Si.charAt(e)===" ";)e--;if(Si.charAt(e)===` +`||Si.charAt(e)===""){for(;Se!=""&&Se!=` +`;)mt();r=!0}}if(Se==="/"&&Un()==="/"){for(;Se!=""&&Se!=` +`;)mt();r=!0}if(Se==="/"&&Un()==="*"){for(;Se!="";)if(Se==="*"&&Un()==="/"){mt(),mt();break}else mt();r=!0}for(;Se===" "||Se===" "||Se===` +`||Se==="\r";)mt()}while(r);if(Se===""){Vt=kt.DELIMITER;return}var t=Se+Un();if(vF[t]){Vt=kt.DELIMITER,fe=t,mt(),mt();return}if(vF[Se]){Vt=kt.DELIMITER,fe=Se,mt();return}if(pF(Se)||Se==="-"){for(fe+=Se,mt();pF(Se);)fe+=Se,mt();fe==="false"?fe=!1:fe==="true"?fe=!0:isNaN(Number(fe))||(fe=Number(fe)),Vt=kt.IDENTIFIER;return}if(Se==='"'){for(mt();Se!=""&&(Se!='"'||Se==='"'&&Un()==='"');)Se==='"'?(fe+=Se,mt()):Se==="\\"&&Un()==="n"?(fe+=` +`,mt()):fe+=Se,mt();if(Se!='"')throw Bt('End of string " expected');mt(),Vt=kt.IDENTIFIER;return}for(Vt=kt.UNKNOWN;Se!="";)fe+=Se,mt();throw new SyntaxError('Syntax error in part "'+T5(fe,30)+'"')}function lZ(){var r={};if(oZ(),Ve(),fe==="strict"&&(r.strict=!0,Ve()),(fe==="graph"||fe==="digraph")&&(r.type=fe,Ve()),Vt===kt.IDENTIFIER&&(r.id=fe,Ve()),fe!="{")throw Bt("Angle bracket { expected");if(Ve(),S5(r),fe!="}")throw Bt("Angle bracket } expected");if(Ve(),fe!=="")throw Bt("End of file expected");return Ve(),delete r.node,delete r.edge,delete r.graph,r}function S5(r){for(;fe!==""&&fe!="}";)cZ(r),fe===";"&&Ve()}function cZ(r){var e=O5(r);if(e){I5(r,e);return}var t=dZ(r);if(!t){if(Vt!=kt.IDENTIFIER)throw Bt("Identifier expected");var i=fe;if(Ve(),fe==="="){if(Ve(),Vt!=kt.IDENTIFIER)throw Bt("Identifier expected");r[i]=fe,Ve()}else hZ(r,i)}}function O5(r){var e=null;if(fe==="subgraph"&&(e={},e.type="subgraph",Ve(),Vt===kt.IDENTIFIER&&(e.id=fe,Ve())),fe==="{"){if(Ve(),e||(e={}),e.parent=r,e.node=r.node,e.edge=r.edge,e.graph=r.graph,S5(e),fe!="}")throw Bt("Angle bracket } expected");Ve(),delete e.node,delete e.edge,delete e.graph,delete e.parent,r.subgraphs||(r.subgraphs=[]),r.subgraphs.push(e)}return e}function dZ(r){return fe==="node"?(Ve(),r.node=So(),"node"):fe==="edge"?(Ve(),r.edge=So(),"edge"):fe==="graph"?(Ve(),r.graph=So(),"graph"):null}function hZ(r,e){var t={id:e},i=So();i&&(t.attr=i),w5(r,t),I5(r,e)}function I5(r,e){for(;fe==="->"||fe==="--";){var t,i=fe;Ve();var n=O5(r);if(n)t=n;else{if(Vt!=kt.IDENTIFIER)throw Bt("Identifier or subgraph expected");t=fe,w5(r,{id:t}),Ve()}var s=So(),o=E5(r,e,t,i,s);uZ(r,o),e=t}}function So(){for(var r,e=null,t={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"},n=new Array,s=new Array;fe==="[";){for(Ve(),e={};fe!==""&&fe!="]";){if(Vt!=kt.IDENTIFIER)throw Bt("Attribute name expected");var o=fe;if(Ve(),fe!="=")throw Bt("Equal sign = expected");if(Ve(),Vt!=kt.IDENTIFIER)throw Bt("Attribute value expected");var a=fe;o==="style"&&(a=t[a]);var u;o==="arrowhead"&&(u=i[a],o="arrows",a={to:{enabled:!0,type:u}}),o==="arrowtail"&&(u=i[a],o="arrows",a={from:{enabled:!0,type:u}}),n.push({attr:e,name:o,value:a}),s.push(o),Ve(),fe==","&&Ve()}if(fe!="]")throw Bt("Bracket ] expected");Ve()}if($i(s).call(s,"dir")){var l={};for(l.arrows={},r=0;r"&&(a.arrows="to"),a};Le(n=e.edges).call(n,function(o){var a,u;if(o.from instanceof Object?a=o.from.nodes:a={id:o.from},o.to instanceof Object?u=o.to.nodes:u={id:o.to},o.from instanceof Object&&o.from.edges){var l;Le(l=o.from.edges).call(l,function(d){var h=s(d);t.edges.push(h)})}if(fZ(a,u,function(d,h){var f=E5(t,d.id,h.id,o.type,o.attr),v=s(f);t.edges.push(v)}),o.to instanceof Object&&o.to.edges){var c;Le(c=o.to.edges).call(c,function(d){var h=s(d);t.edges.push(h)})}})}return e.attr&&(t.options=e.attr),t}function pZ(r,e){var t;const i={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};e!=null&&(e.fixed!=null&&(i.nodes.fixed=e.fixed),e.parseColor!=null&&(i.nodes.parseColor=e.parseColor),e.inheritColor!=null&&(i.edges.inheritColor=e.inheritColor));const n=r.edges,s=ys(n).call(n,a=>{const u={from:a.source,id:a.id,to:a.target};return a.attributes!=null&&(u.attributes=a.attributes),a.label!=null&&(u.label=a.label),a.attributes!=null&&a.attributes.title!=null&&(u.title=a.attributes.title),a.type==="Directed"&&(u.arrows="to"),a.color&&i.edges.inheritColor===!1&&(u.color=a.color),u});return{nodes:ys(t=r.nodes).call(t,a=>{const u={id:a.id,fixed:i.nodes.fixed&&a.x!=null&&a.y!=null};return a.attributes!=null&&(u.attributes=a.attributes),a.label!=null&&(u.label=a.label),a.size!=null&&(u.size=a.size),a.attributes!=null&&a.attributes.title!=null&&(u.title=a.attributes.title),a.title!=null&&(u.title=a.title),a.x!=null&&(u.x=a.x),a.y!=null&&(u.y=a.y),a.color!=null&&(i.nodes.parseColor===!0?u.color=a.color:u.color={background:a.color,border:a.color,highlight:{background:a.color,border:a.color},hover:{background:a.color,border:a.color}}),u}),edges:s}}const gZ={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"},mZ={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"},yZ={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"},bZ={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"},_Z={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"},wZ={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ó"},EZ={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},SZ={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},OZ={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},IZ={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"},TZ={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"};var $Z=Object.freeze({__proto__:null,cn:SZ,cs:TZ,de:mZ,en:gZ,es:yZ,fr:IZ,it:bZ,nl:_Z,pt:wZ,ru:EZ,uk:OZ});function PZ(r,e){try{const[i,n]=e.split(/[-_ /]/,2),s=i!=null?i.toLowerCase():null,o=n!=null?n.toUpperCase():null;if(s&&o){const a=s+"-"+o;if(Object.prototype.hasOwnProperty.call(r,a))return a;var t;console.warn(QX(t="Unknown variant ".concat(o," of language ")).call(t,s,"."))}if(s){const a=s;if(Object.prototype.hasOwnProperty.call(r,a))return a;console.warn("Unknown language ".concat(s))}return console.warn("Unknown locale ".concat(e,", falling back to English.")),"en"}catch(i){return console.error(i),console.warn("Unexpected error while normalizing locale ".concat(e,", falling back to English.")),"en"}}class RZ{constructor(){this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}init(){if(this.initialized())return;this.src=this.image.src;const e=this.image.width,t=this.image.height;this.width=e,this.height=t;const i=Math.floor(t/2),n=Math.floor(t/4),s=Math.floor(t/8),o=Math.floor(t/16),a=Math.floor(e/2),u=Math.floor(e/4),l=Math.floor(e/8),c=Math.floor(e/16);this.canvas.width=3*u,this.canvas.height=i,this.coordinates=[[0,0,a,i],[a,0,u,n],[a,n,l,s],[5*l,n,c,o]],this._fillMipMap()}initialized(){return this.coordinates!==void 0}_fillMipMap(){const e=this.canvas.getContext("2d"),t=this.coordinates[0];e.drawImage(this.image,t[0],t[1],t[2],t[3]);for(let i=1;i2){t*=.5;let a=0;for(;t>2&&a=this.NUM_ITERATIONS&&(a=this.NUM_ITERATIONS-1);const u=this.coordinates[a];e.drawImage(this.canvas,u[0],u[1],u[2],u[3],i,n,s,o)}else e.drawImage(this.image,i,n,s,o)}}class CZ{constructor(e){this.images={},this.imageBroken={},this.callback=e}_tryloadBrokenUrl(e,t,i){if(!(e===void 0||i===void 0)){if(t===void 0){console.warn("No broken url image defined");return}i.image.onerror=()=>{console.error("Could not load brokenImage:",t)},i.image.src=t}}_redrawWithImage(e){this.callback&&this.callback(e)}load(e,t){const i=this.images[e];if(i)return i;const n=new RZ;return this.images[e]=n,n.image.onload=()=>{this._fixImageCoordinates(n.image),n.init(),this._redrawWithImage(n)},n.image.onerror=()=>{console.error("Could not load image:",e),this._tryloadBrokenUrl(e,t,n)},n.image.src=e,n}_fixImageCoordinates(e){e.width===0&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}var mF={},yF={},sb={exports:{}},ob,bF;function xZ(){if(bF)return ob;bF=1;var r=$e();return ob=r(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),ob}var ab,_F;function qZ(){if(_F)return ab;_F=1;var r=$e(),e=Ot(),t=Lr(),i=xZ(),n=Object.isExtensible,s=r(function(){});return ab=s||i?function(a){return!e(a)||i&&t(a)==="ArrayBuffer"?!1:n?n(a):!0}:n,ab}var ub,wF;function $5(){if(wF)return ub;wF=1;var r=$e();return ub=!r(function(){return Object.isExtensible(Object.preventExtensions({}))}),ub}var EF;function ll(){if(EF)return sb.exports;EF=1;var r=de(),e=Ce(),t=pa(),i=Ot(),n=Pt(),s=fr().f,o=il(),a=o0(),u=qZ(),l=Xu(),c=$5(),d=!1,h=l("meta"),f=0,v=function(y){s(y,h,{value:{objectID:"O"+f++,weakData:{}}})},p=function(y,O){if(!i(y))return typeof y=="symbol"?y:(typeof y=="string"?"S":"P")+y;if(!n(y,h)){if(!u(y))return"F";if(!O)return"E";v(y)}return y[h].objectID},_=function(y,O){if(!n(y,h)){if(!u(y))return!0;if(!O)return!1;v(y)}return y[h].weakData},m=function(y){return c&&d&&u(y)&&!n(y,h)&&v(y),y},g=function(){E.enable=function(){},d=!0;var y=o.f,O=e([].splice),I={};I[h]=1,y(I).length&&(o.f=function(S){for(var b=y(S),w=0,T=b.length;wb;b++)if(T=D(f[b]),T&&o(h,T))return T;return new d(!1)}I=a(f,S)}for(R=g?f.next:I.next;!(x=e(R,I)).done;){try{T=D(x.value)}catch(j){l(I,"throw",j)}if(typeof T=="object"&&T&&o(h,T))return T}return new d(!1)},fb}var vb,PF;function S0(){if(PF)return vb;PF=1;var r=ht(),e=TypeError;return vb=function(t,i){if(r(i,t))return t;throw new e("Incorrect invocation")},vb}var pb,RF;function O0(){if(RF)return pb;RF=1;var r=de(),e=Xe(),t=ll(),i=$e(),n=js(),s=cl(),o=S0(),a=St(),u=Ot(),l=As(),c=Dn(),d=fr().f,h=Wi().forEach,f=it(),v=An(),p=v.set,_=v.getterFor;return pb=function(m,g,E){var y=m.indexOf("Map")!==-1,O=m.indexOf("Weak")!==-1,I=y?"set":"add",S=e[m],b=S&&S.prototype,w={},T;if(!f||!a(S)||!(O||b.forEach&&!i(function(){new S().entries().next()})))T=E.getConstructor(g,m,y,I),t.enable();else{T=g(function(C,D){p(o(C,R),{type:m,collection:new S}),l(D)||s(D,C[I],{that:C,AS_ENTRIES:y})});var R=T.prototype,x=_(m);h(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(C){var D=C==="add"||C==="set";C in b&&!(O&&C==="clear")&&n(R,C,function(j,te){var H=x(this).collection;if(!D&&O&&!u(j))return C==="get"?void 0:!1;var ee=H[C](j===0?0:j,te);return D?this:ee})}),O||d(R,"size",{configurable:!0,get:function(){return x(this).collection.size}})}return c(T,m,!1,!0),w[m]=T,r({global:!0,forced:!0},w),O||E.setStrong(T,m,y),T},pb}var gb,CF;function I0(){if(CF)return gb;CF=1;var r=ba();return gb=function(e,t,i){for(var n in t)i&&i.unsafe&&e[n]?e[n]=t[n]:r(e,n,t[n],i);return e},gb}var mb,xF;function MZ(){if(xF)return mb;xF=1;var r=nr(),e=a0(),t=ft(),i=it(),n=t("species");return mb=function(s){var o=r(s);i&&o&&!o[n]&&e(o,n,{configurable:!0,get:function(){return this}})},mb}var yb,qF;function R5(){if(qF)return yb;qF=1;var r=ya(),e=a0(),t=I0(),i=Qu(),n=S0(),s=As(),o=cl(),a=l0(),u=c0(),l=MZ(),c=it(),d=ll().fastKey,h=An(),f=h.set,v=h.getterFor;return yb={getConstructor:function(p,_,m,g){var E=p(function(b,w){n(b,y),f(b,{type:_,index:r(null),first:null,last:null,size:0}),c||(b.size=0),s(w)||o(w,b[g],{that:b,AS_ENTRIES:m})}),y=E.prototype,O=v(_),I=function(b,w,T){var R=O(b),x=S(b,w),C,D;return x?x.value=T:(R.last=x={index:D=d(w,!0),key:w,value:T,previous:C=R.last,next:null,removed:!1},R.first||(R.first=x),C&&(C.next=x),c?R.size++:b.size++,D!=="F"&&(R.index[D]=x)),b},S=function(b,w){var T=O(b),R=d(w),x;if(R!=="F")return T.index[R];for(x=T.first;x;x=x.next)if(x.key===w)return x};return t(y,{clear:function(){for(var w=this,T=O(w),R=T.first;R;)R.removed=!0,R.previous&&(R.previous=R.previous.next=null),R=R.next;T.first=T.last=null,T.index=r(null),c?T.size=0:w.size=0},delete:function(b){var w=this,T=O(w),R=S(w,b);if(R){var x=R.next,C=R.previous;delete T.index[R.index],R.removed=!0,C&&(C.next=x),x&&(x.previous=C),T.first===R&&(T.first=x),T.last===R&&(T.last=C),c?T.size--:w.size--}return!!R},forEach:function(w){for(var T=O(this),R=i(w,arguments.length>1?arguments[1]:void 0),x;x=x?x.next:T.first;)for(R(x.value,x.key,this);x&&x.removed;)x=x.previous},has:function(w){return!!S(this,w)}}),t(y,m?{get:function(w){var T=S(this,w);return T&&T.value},set:function(w,T){return I(this,w===0?0:w,T)}}:{add:function(w){return I(this,w=w===0?0:w,w)}}),c&&e(y,"size",{configurable:!0,get:function(){return O(this).size}}),E},setStrong:function(p,_,m){var g=_+" Iterator",E=v(_),y=v(g);a(p,_,function(O,I){f(this,{type:g,target:O,state:E(O),kind:I,last:null})},function(){for(var O=y(this),I=O.kind,S=O.last;S&&S.removed;)S=S.previous;return!O.target||!(O.last=S=S?S.next:O.state.first)?(O.target=null,u(void 0,!0)):u(I==="keys"?S.key:I==="values"?S.value:[S.key,S.value],!1)},m?"entries":"values",!m,!0),l(_)}},yb}var DF;function NZ(){if(DF)return yF;DF=1;var r=O0(),e=R5();return r("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),yF}var AF;function FZ(){return AF||(AF=1,NZ()),mF}var MF={},bb,NF;function C5(){return NF||(NF=1,bb=function(r,e){return e===1?function(t,i){return t[r](i)}:function(t,i,n){return t[r](i,n)}}),bb}var _b,FF;function kZ(){if(FF)return _b;FF=1;var r=nr(),e=C5(),t=r("Map");return _b={Map:t,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:t.prototype},_b}var kF;function BZ(){if(kF)return MF;kF=1;var r=de(),e=Ce(),t=hi(),i=di(),n=cl(),s=kZ(),o=ks(),a=$e(),u=s.Map,l=s.has,c=s.get,d=s.set,h=e([].push),f=o||a(function(){return u.groupBy("ab",function(v){return v}).get("a").length!==1});return r({target:"Map",stat:!0,forced:o||f},{groupBy:function(p,_){i(p),t(_);var m=new u,g=0;return n(p,function(E){var y=_(E,g++);l(m,y)?h(c(m,y),E):d(m,y,[E])}),m}}),MF}var BF={},wb,jF;function jZ(){if(jF)return wb;jF=1;var r=Ce(),e=Ls(),t=vr(),i=di(),n=r("".charAt),s=r("".charCodeAt),o=r("".slice),a=function(u){return function(l,c){var d=t(i(l)),h=e(c),f=d.length,v,p;return h<0||h>=f?u?"":void 0:(v=s(d,h),v<55296||v>56319||h+1===f||(p=s(d,h+1))<56320||p>57343?u?n(d,h):v:u?o(d,h,h+2):(v-55296<<10)+(p-56320)+65536)}};return wb={codeAt:a(!1),charAt:a(!0)},wb}var LF;function T0(){if(LF)return BF;LF=1;var r=jZ().charAt,e=vr(),t=An(),i=l0(),n=c0(),s="String Iterator",o=t.set,a=t.getterFor(s);return i(String,"String",function(u){o(this,{type:s,string:e(u),index:0})},function(){var l=a(this),c=l.string,d=l.index,h;return d>=c.length?n(void 0,!0):(h=r(c,d),l.index+=h.length,n(h,!1))}),BF}var Eb,zF;function LZ(){if(zF)return Eb;zF=1,Us(),FZ(),BZ(),T0();var r=Be();return Eb=r.Map,Eb}var Sb,HF;function zZ(){if(HF)return Sb;HF=1;var r=LZ();return Vs(),Sb=r,Sb}var Ob,WF;function HZ(){return WF||(WF=1,Ob=zZ()),Ob}var WZ=HZ(),$0=pe(WZ);class UZ{constructor(){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},at(this.options,this.defaultOptions)}setOptions(e){const t=["useDefaultGroups"];if(e!==void 0){for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&Fe(t).call(t,i)===-1){const n=e[i];this.add(i,n)}}}clear(){this._groups=new $0,this._groupNames=[]}get(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this._groups.get(e);if(i===void 0&&t)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){const n=this._groupIndex%this._groupNames.length;++this._groupIndex,i={},i.color=this._groups.get(this._groupNames[n]),this._groups.set(e,i)}else{const n=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,i={},i.color=this._defaultGroups[n],this._groups.set(e,i)}return i}add(e,t){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,t),t}}var UF={},VF;function VZ(){if(VF)return UF;VF=1;var r=de();return r({target:"Number",stat:!0},{isNaN:function(t){return t!==t}}),UF}var Ib,KF;function KZ(){if(KF)return Ib;KF=1,VZ();var r=Be();return Ib=r.Number.isNaN,Ib}var Tb,GF;function GZ(){if(GF)return Tb;GF=1;var r=KZ();return Tb=r,Tb}var $b,YF;function YZ(){return YF||(YF=1,$b=GZ()),$b}var XZ=YZ(),ew=pe(XZ),XF={},Pb,JF;function JZ(){if(JF)return Pb;JF=1;var r=Xe(),e=r.isFinite;return Pb=Number.isFinite||function(i){return typeof i=="number"&&e(i)},Pb}var QF;function QZ(){if(QF)return XF;QF=1;var r=de(),e=JZ();return r({target:"Number",stat:!0},{isFinite:e}),XF}var Rb,ZF;function ZZ(){if(ZF)return Rb;ZF=1,QZ();var r=Be();return Rb=r.Number.isFinite,Rb}var Cb,ek;function eee(){if(ek)return Cb;ek=1;var r=ZZ();return Cb=r,Cb}var xb,tk;function tee(){return tk||(tk=1,xb=eee()),xb}var ree=tee(),rn=pe(ree),rk={},ik;function iee(){if(ik)return rk;ik=1;var r=de(),e=Wi().some,t=Ks(),i=t("some");return r({target:"Array",proto:!0,forced:!i},{some:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),rk}var qb,nk;function nee(){if(nk)return qb;nk=1,iee();var r=Rt();return qb=r("Array","some"),qb}var Db,sk;function see(){if(sk)return Db;sk=1;var r=ht(),e=nee(),t=Array.prototype;return Db=function(i){var n=i.some;return i===t||r(t,i)&&n===t.some?e:n},Db}var Ab,ok;function oee(){if(ok)return Ab;ok=1;var r=see();return Ab=r,Ab}var Mb,ak;function aee(){return ak||(ak=1,Mb=oee()),Mb}var uee=aee(),lee=pe(uee),Nb={exports:{}},uk={},lk;function cee(){if(lk)return uk;lk=1;var r=de(),e=it(),t=fr().f;return r({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),uk}var ck;function dee(){if(ck)return Nb.exports;ck=1,cee();var r=Be(),e=r.Object,t=Nb.exports=function(n,s,o){return e.defineProperty(n,s,o)};return e.defineProperty.sham&&(t.sham=!0),Nb.exports}var Fb,dk;function x5(){if(dk)return Fb;dk=1;var r=dee();return Fb=r,Fb}var kb,hk;function hee(){if(hk)return kb;hk=1;var r=x5();return kb=r,kb}var Bb,fk;function fee(){if(fk)return Bb;fk=1;var r=hee();return Bb=r,Bb}var jb,vk;function vee(){return vk||(vk=1,jb=fee()),jb}var pee=vee(),gee=pe(pee),pk={},gk;function mee(){if(gk)return pk;gk=1;var r=ft(),e=fr().f,t=r("metadata"),i=Function.prototype;return i[t]===void 0&&e(i,t,{value:null}),pk}var mk={},yk;function yee(){return yk||(yk=1,D3()),mk}var bk={},_k;function bee(){return _k||(_k=1,A3()),bk}var wk={},Ek;function _ee(){if(Ek)return wk;Ek=1;var r=Qe();return r("metadata"),wk}var Lb,Sk;function wee(){if(Sk)return Lb;Sk=1;var r=B3();return mee(),yee(),bee(),_ee(),Lb=r,Lb}var Ok={},zb,Ik;function q5(){if(Ik)return zb;Ik=1;var r=nr(),e=Ce(),t=r("Symbol"),i=t.keyFor,n=e(t.prototype.valueOf);return zb=t.isRegisteredSymbol||function(o){try{return i(n(o))!==void 0}catch{return!1}},zb}var Tk;function Eee(){if(Tk)return Ok;Tk=1;var r=de(),e=q5();return r({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),Ok}var $k={},Hb,Pk;function D5(){if(Pk)return Hb;Pk=1;for(var r=Bs(),e=nr(),t=Ce(),i=va(),n=ft(),s=e("Symbol"),o=s.isWellKnownSymbol,a=e("Object","getOwnPropertyNames"),u=t(s.prototype.valueOf),l=r("wks"),c=0,d=a(s),h=d.length;ch;)v=l(u,f=c[h++]),v!==void 0&&s(d,f,v);return d}}),S2}var p1,I2;function bte(){if(I2)return p1;I2=1,yte();var r=Be();return p1=r.Object.getOwnPropertyDescriptors,p1}var g1,T2;function _te(){if(T2)return g1;T2=1;var r=bte();return g1=r,g1}var m1,$2;function wte(){return $2||($2=1,m1=_te()),m1}var Ete=wte(),Ni=pe(Ete),y1={exports:{}},P2={},R2;function Ste(){if(R2)return P2;R2=1;var r=de(),e=it(),t=s0().f;return r({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),P2}var C2;function Ote(){if(C2)return y1.exports;C2=1,Ste();var r=Be(),e=r.Object,t=y1.exports=function(n,s){return e.defineProperties(n,s)};return e.defineProperties.sham&&(t.sham=!0),y1.exports}var b1,x2;function Ite(){if(x2)return b1;x2=1;var r=Ote();return b1=r,b1}var _1,q2;function Tte(){return q2||(q2=1,_1=Ite()),_1}var $te=Tte(),dl=pe($te),w1,D2;function Pte(){return D2||(D2=1,w1=x5()),w1}var Rte=Pte(),hl=pe(Rte);function P0(r,e){const t=["node","edge","label"];let i=!0;const n=wi(e,"chosen");if(typeof n=="boolean")i=n;else if(typeof n=="object"){if(Fe(t).call(t,r)===-1)throw new Error("choosify: subOption '"+r+"' should be one of '"+t.join("', '")+"'");const s=wi(e,["chosen",r]);(typeof s=="boolean"||typeof s=="function")&&(i=s)}return i}function tw(r,e,t){if(r.width<=0||r.height<=0)return!1;if(t!==void 0){const s={x:e.x-t.x,y:e.y-t.y};if(t.angle!==0){const o=-t.angle;e={x:Math.cos(o)*s.x-Math.sin(o)*s.y,y:Math.sin(o)*s.x+Math.cos(o)*s.y}}else e=s}const i=r.x+r.width,n=r.y+r.width;return r.lefte.x&&r.tope.y}function pu(r){return typeof r=="string"&&r!==""}function M5(r,e,t,i){let n=i.x,s=i.y;if(typeof i.distanceToBorder=="function"){const o=i.distanceToBorder(r,e),a=Math.sin(e)*o,u=Math.cos(e)*o;u===o?(n+=o,s=i.y):a===o?(n=i.x,s-=o):(n+=u,s-=a)}else i.shape.width>i.shape.height?(n=i.x+i.shape.width*.5,s=i.y-t):(n=i.x+t,s=i.y-i.shape.height*.5);return{x:n,y:s}}var E1,A2;function Cte(){if(A2)return E1;A2=1,Us();var r=Rt();return E1=r("Array","values"),E1}var S1,M2;function xte(){if(M2)return S1;M2=1;var r=Cte();return S1=r,S1}var O1,N2;function qte(){if(N2)return O1;N2=1,Vs();var r=Hs(),e=Pt(),t=ht(),i=xte(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return O1=function(o){var a=o.values;return o===n||t(n,o)&&a===n.values||e(s,r(o))?i:a},O1}var I1,F2;function Dte(){return F2||(F2=1,I1=qte()),I1}var Ate=Dte(),N5=pe(Ate);class Mte{constructor(e){this.measureText=e,this.current=0,this.width=0,this.height=0,this.lines=[]}_add(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"normal";this.lines[e]===void 0&&(this.lines[e]={width:0,height:0,blocks:[]});let n=t;(t===void 0||t==="")&&(n=" ");const s=this.measureText(n,i),o=at({},N5(s));o.text=t,o.width=s.width,o.mod=i,(t===void 0||t==="")&&(o.width=0),this.lines[e].blocks.push(o),this.lines[e].width+=o.width}curWidth(){const e=this.lines[this.current];return e===void 0?0:e.width}append(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t)}newLine(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t),this.current++}determineLineHeights(){for(let e=0;ee&&(e=n.width),t+=n.height}this.width=e,this.height=t}removeEmptyBlocks(){const e=[];for(let t=0;t"://,""://,""://,"":/<\/b>/,"":/<\/i>/,"":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/};class k2{constructor(e){this.text=e,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}mod(){return this.modStack.length===0?"normal":this.modStack[0]}modName(){if(this.modStack.length===0)return"normal";if(this.modStack[0]==="mono")return"mono";if(this.bold&&this.ital)return"boldital";if(this.bold)return"bold";if(this.ital)return"ital"}emitBlock(){this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}add(e){e===" "&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1),e!=" "&&(this.buffer+=e)}parseWS(e){return/[ \t]/.test(e)?(this.mono?this.add(e):this.spacing=!0,!0):!1}setTag(e){this.emitBlock(),this[e]=!0,this.modStack.unshift(e)}unsetTag(e){this.emitBlock(),this[e]=!1,this.modStack.shift()}parseStartTag(e,t){return!this.mono&&!this[e]&&this.match(t)?(this.setTag(e),!0):!1}match(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const[i,n]=this.prepareRegExp(e),s=i.test(this.text.substr(this.position,n));return s&&t&&(this.position+=n-1),s}parseEndTag(e,t,i){let n=this.mod()===e;return e==="mono"?n=n&&this.mono:n=n&&!this.mono,n&&this.match(t)?(i!==void 0?(this.position===this.text.length-1||this.match(i,!1))&&this.unsetTag(e):this.unsetTag(e),!0):!1}replace(e,t){return this.match(e)?(this.add(t),this.position+=length-1,!0):!1}prepareRegExp(e){let t,i;if(e instanceof RegExp)i=e,t=1;else{const n=Nte[e];n!==void 0?i=n:i=new RegExp(e),t=e.length}return[i,t]}}class Fte{constructor(e,t,i,n){this.ctx=e,this.parent=t,this.selected=i,this.hover=n;const s=(o,a)=>{if(o===void 0)return 0;const u=this.parent.getFormattingValues(e,i,n,a);let l=0;return o!==""&&(l=this.ctx.measureText(o).width),{width:l,values:u}};this.lines=new Mte(s)}process(e){if(!pu(e))return this.lines.finalize();const t=this.parent.fontOptions;e=e.replace(/\r\n/g,` +`),e=e.replace(/\r/g,` +`);const i=String(e).split(` +`),n=i.length;if(t.multi)for(let s=0;s0)for(let a=0;a0)for(let s=0;s/&/.test(n)?(t.replace(t.text,"<","<")||t.replace(t.text,"&","&")||t.add("&"),!0):!1;for(;t.position")||t.parseStartTag("ital","")||t.parseStartTag("mono","")||t.parseEndTag("bold","")||t.parseEndTag("ital","")||t.parseEndTag("mono",""))||i(n)||t.add(n),t.position++}return t.emitBlock(),t.blocks}splitMarkdownBlocks(e){const t=new k2(e);let i=!0;const n=s=>/\\/.test(s)?(t.positionthis.parent.fontOptions.maxWdt}getLongestFit(e){let t="",i=0;for(;i1&&arguments[1]!==void 0?arguments[1]:"normal",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");let n=e.split("\r");for(;n.length>0;){let s=this.getLongestFit(n);if(s===0){const o=n[0],a=this.getLongestFitWord(o);this.lines.newLine(qr(o).call(o,0,a),t),n[0]=qr(o).call(o,a)}else{let o=s;n[s-1]===" "?s--:n[o]===" "&&o++;const a=qr(n).call(n,0,s).join("");s==n.length&&i?this.lines.append(a,t):this.lines.newLine(a,t),n=qr(n).call(n,o)}}}}const no=["bold","ital","boldital","mono"];class cs{constructor(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(t),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=i}setOptions(e){if(this.elementOptions=e,this.initFontOptions(e.font),pu(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(typeof e.font=="object"){const t=e.font.size;t!==void 0&&(this.baseSize=t)}}}initFontOptions(e){if(Ie(no,t=>{this.fontOptions[t]={}}),cs.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}Ie(e,(t,i)=>{t!=null&&typeof t!="object"&&(this.fontOptions[i]=t)})}static parseFontString(e,t){if(!t||typeof t!="string")return!1;const i=t.split(" ");return e.size=+i[0].replace("px",""),e.face=i[1],e.color=i[2],!0}constrain(e){const t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},i=wi(e,"widthConstraint");if(typeof i=="number")t.maxWdt=Number(i),t.minWdt=Number(i);else if(typeof i=="object"){const s=wi(e,["widthConstraint","maximum"]);typeof s=="number"&&(t.maxWdt=Number(s));const o=wi(e,["widthConstraint","minimum"]);typeof o=="number"&&(t.minWdt=Number(o))}const n=wi(e,"heightConstraint");if(typeof n=="number")t.minHgt=Number(n);else if(typeof n=="object"){const s=wi(e,["heightConstraint","minimum"]);typeof s=="number"&&(t.minHgt=Number(s));const o=wi(e,["heightConstraint","valign"]);typeof o=="string"&&(o==="top"||o==="bottom")&&(t.valign=o)}return t}update(e,t){this.setOptions(e,!0),this.propagateFonts(t),Ue(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=P0("label",t)}adjustSizes(e){const t=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t);const i=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=i)}addFontOptionsToPile(e,t){for(let i=0;i{o!==void 0&&(Object.prototype.hasOwnProperty.call(t,a)||(Fe(no).call(no,a)!==-1?t[a]={}:t[a]=o))})}return t}getFontOption(e,t,i){let n;for(let s=0;s{s[u]=a}),s.size=Number(s.size),s.vadjust=Number(s.vadjust)}}draw(e,t,i,n,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label===void 0)return;let a=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&a=this.elementOptions.scaling.label.maxVisible&&(a=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,n,s,t,i,o),this._drawBackground(e),this._drawText(e,t,this.size.yLine,o,a))}_drawBackground(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){e.fillStyle=this.fontOptions.background;const t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}_drawText(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",s=arguments.length>4?arguments[4]:void 0;[t,i]=this._setAlignment(e,t,i,n),e.textAlign="left",t=t-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(i-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(i+=(this.size.height-this.size.labelHeight)/2));for(let o=0;o0&&(e.lineWidth=c.strokeWidth,e.strokeStyle=h,e.lineJoin="round"),e.fillStyle=d,c.strokeWidth>0&&e.strokeText(c.text,t+u,i+c.vadjust),e.fillText(c.text,t+u,i+c.vadjust),u+=c.width}i+=a.height}}}_setAlignment(e,t,i,n){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){t=0,i=0;const s=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",i-=2*s):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",i+=2*s):e.textBaseline="middle"}else e.textBaseline=n;return[t,i]}_getColor(e,t,i){let n=e||"#000000",s=i||"#ffffff";if(t<=this.elementOptions.scaling.label.drawThreshold){const o=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)));n=ar(n,o),s=ar(s,o)}return[n,s]}getTextSize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,t,i),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}getSize(){let t=this.size.left,i=this.size.top-.5*2;if(this.isEdgeLabel){const s=-this.size.width*.5;switch(this.fontOptions.align){case"middle":t=s,i=-this.size.height*.5;break;case"top":t=s,i=-(this.size.height+2);break;case"bottom":t=s,i=2;break}}return{left:t,top:i,width:this.size.width,height:this.size.height}}calculateLabelSize(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(e,t,i),this.size.left=n-this.size.width*.5,this.size.top=s-this.size.height*.5,this.size.yLine=s+(1-this.lineCount)*.5*this.fontOptions.size,o==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}getFormattingValues(e,t,i,n){const s=function(u,l,c){return l==="normal"?c==="mod"?"":u[c]:u[l][c]!==void 0?u[l][c]:u[c]},o={color:s(this.fontOptions,n,"color"),size:s(this.fontOptions,n,"size"),face:s(this.fontOptions,n,"face"),mod:s(this.fontOptions,n,"mod"),vadjust:s(this.fontOptions,n,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(t||i)&&(n==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?o.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(o,this.elementOptions.id,t,i));let a="";return o.mod!==void 0&&o.mod!==""&&(a+=o.mod+" "),a+=o.size+"px "+o.face,e.font=a.replace(/"/g,""),o.font=e.font,o.height=o.size,o}differentState(e,t){return e!==this.selectedState||t!==this.hoverState}_processLabelText(e,t,i,n){return new Fte(e,this,t,i).process(n)}_processLabel(e,t,i){if(this.labelDirty===!1&&!this.differentState(t,i))return;const n=this._processLabelText(e,t,i,this.elementOptions.label);this.fontOptions.minWdt>0&&n.width0&&n.height0&&(this.enableBorderDashes(e,t),e.stroke(),this.disableBorderDashes(e,t)),e.restore()}performFill(e,t){e.save(),e.fillStyle=t.color,this.enableShadow(e,t),wa(e).call(e),this.disableShadow(e,t),e.restore(),this.performStroke(e,t)}_addBoundingBoxMargin(e){this.boundingBox.left-=e,this.boundingBox.top-=e,this.boundingBox.bottom+=e,this.boundingBox.right+=e}_updateBoundingBox(e,t,i,n,s){i!==void 0&&this.resize(i,n,s),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}updateBoundingBox(e,t,i,n,s){this._updateBoundingBox(e,t,i,n,s)}getDimensionsFromLabel(e,t,i){this.textSize=this.labelModule.getTextSize(e,t,i);let n=this.textSize.width,s=this.textSize.height;const o=14;return n===0&&(n=o,s=o),{width:n,height:s}}}let kte=class extends Nn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,i)){const n=this.getDimensionsFromLabel(e,t,i);this.width=n.width+this.margin.right+this.margin.left,this.height=n.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this.initContextForDraw(e,o),w3(e,this.left,this.top,this.width,this.height,o.borderRadius),this.performFill(e,o),this.updateBoundingBox(t,i,e,n,s),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,s)}updateBoundingBox(e,t,i,n,s){this._updateBoundingBox(e,t,i,n,s);const o=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(o)}distanceToBorder(e,t){e&&this.resize(e);const i=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+i}};class R0 extends Nn{constructor(e,t,i){super(e,t,i),this.labelOffset=0,this.selected=!1}setOptions(e,t,i){this.options=e,t===void 0&&i===void 0||this.setImages(t,i)}setImages(e,t){t&&this.selected?(this.imageObj=t,this.imageObjAlt=e):(this.imageObj=e,this.imageObjAlt=t)}switchImages(e){const t=e&&!this.selected||!e&&this.selected;if(this.selected=e,this.imageObjAlt!==void 0&&t){const i=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=i}}_getImagePadding(){const e={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){const t=this.options.imagePadding;typeof 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}_resizeImage(){let e,t;if(this.options.shapeProperties.useImageSize===!1){let i=1,n=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?i=this.imageObj.width/this.imageObj.height:n=this.imageObj.height/this.imageObj.width),e=this.options.size*2*i,t=this.options.size*2*n}else{const 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}_drawRawCircle(e,t,i,n){this.initContextForDraw(e,n),r0(e,t,i,n.size),this.performFill(e,n)}_drawImageAtPosition(e,t){if(this.imageObj.width!=0){e.globalAlpha=t.opacity!==void 0?t.opacity:1,this.enableShadow(e,t);let i=1;this.options.shapeProperties.interpolation===!0&&(i=this.imageObj.width/this.width/this.body.view.scale);const n=this._getImagePadding(),s=this.left+n.left,o=this.top+n.top,a=this.width-n.left-n.right,u=this.height-n.top-n.bottom;this.imageObj.drawImageAtPosition(e,i,s,o,a,u),this.disableShadow(e,t)}}_drawImageLabel(e,t,i,n,s){let o=0;if(this.height!==void 0){o=this.height*.5;const u=this.labelModule.getTextSize(e,n,s);u.lineCount>=1&&(o+=u.height/2)}const a=i+o;this.options.label&&(this.labelOffset=o),this.labelModule.draw(e,t,a,n,s,"hanging")}}let Bte=class extends R0{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,i)){const n=this.getDimensionsFromLabel(e,t,i),s=Math.max(n.width+this.margin.right+this.margin.left,n.height+this.margin.top+this.margin.bottom);this.options.size=s/2,this.width=s,this.height=s,this.radius=this.width/2}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this._drawRawCircle(e,t,i,o),this.updateBoundingBox(t,i),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,i,n,s)}updateBoundingBox(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}distanceToBorder(e){return e&&this.resize(e),this.width*.5}};class jte extends R0{constructor(e,t,i,n,s){super(e,t,i),this.setImages(n,s)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=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){const s=this.options.size*2;this.width=s,this.height=s,this.radius=.5*this.width;return}this.needsRefresh(t,i)&&this._resizeImage()}draw(e,t,i,n,s,o){this.switchImages(n),this.resize();let a=t,u=i;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=t,this.top=i,a+=this.width/2,u+=this.height/2):(this.left=t-this.width/2,this.top=i-this.height/2),this._drawRawCircle(e,a,u,o),e.save(),e.clip(),this._drawImageAtPosition(e,o),e.restore(),this._drawImageLabel(e,a,u,n,s),this.updateBoundingBox(t,i)}updateBoundingBox(e,t){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=t,this.boundingBox.left=e,this.boundingBox.right=e+this.options.size*2,this.boundingBox.bottom=t+this.options.size*2):(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)}distanceToBorder(e){return e&&this.resize(e),this.width*.5}}class Vi extends Nn{constructor(e,t,i){super(e,t,i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(t,i)){var s,o;this.labelModule.getTextSize(e,t,i);const a=2*n.size;this.width=(s=this.customSizeWidth)!==null&&s!==void 0?s:a,this.height=(o=this.customSizeHeight)!==null&&o!==void 0?o:a,this.radius=.5*this.width}}_drawShape(e,t,i,n,s,o,a,u){return this.resize(e,o,a,u),this.left=n-this.width/2,this.top=s-this.height/2,this.initContextForDraw(e,u),rY(t)(e,n,s,u.size),this.performFill(e,u),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(e.font=(o?"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,n,s)),{drawExternalLabel:()=>{if(this.options.label!==void 0){this.labelModule.calculateLabelSize(e,o,a,n,s,"hanging");const l=s+.5*this.height+.5*this.labelModule.size.height;this.labelModule.draw(e,n,l,o,a,"hanging")}this.updateBoundingBox(n,s)}}}updateBoundingBox(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))}}function B2(r,e){var t=et(r);if(Mi){var i=Mi(r);e&&(i=Kt(i).call(i,function(n){return Ui(r,n).enumerable})),t.push.apply(t,i)}return t}function Lte(r){for(var e=1;e{e.save(),u(),e.restore()}}return a.nodeDimensions&&(this.customSizeWidth=a.nodeDimensions.width,this.customSizeHeight=a.nodeDimensions.height),a}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Hte extends Nn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e,t,i){if(this.needsRefresh(t,i)){const s=this.getDimensionsFromLabel(e,t,i).width+this.margin.right+this.margin.left;this.width=s,this.height=s,this.radius=this.width/2}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this.initContextForDraw(e,o),E3(e,t-this.width/2,i-this.height/2,this.width,this.height),this.performFill(e,o),this.updateBoundingBox(t,i,e,n,s),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let Wte=class extends Vi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"diamond",4,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class Ute extends Vi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"circle",2,t,i,n,s,o)}distanceToBorder(e){return e&&this.resize(e),this.options.size}}class j2 extends Nn{constructor(e,t,i){super(e,t,i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,i)){const n=this.getDimensionsFromLabel(e,t,i);this.height=n.height*2,this.width=n.width+n.height,this.radius=.5*this.width}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width*.5,this.top=i-this.height*.5,this.initContextForDraw(e,o),U_(e,this.left,this.top,this.width,this.height),this.performFill(e,o),this.updateBoundingBox(t,i,e,n,s),this.labelModule.draw(e,t,i,n,s)}distanceToBorder(e,t){e&&this.resize(e);const i=this.width*.5,n=this.height*.5,s=Math.sin(t)*i,o=Math.cos(t)*n;return i*n/Math.sqrt(s*s+o*o)}}class Vte extends Nn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e,t,i){this.needsRefresh(t,i)&&(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)}draw(e,t,i,n,s,o){return this.resize(e,n,s),this.options.icon.size=this.options.icon.size||50,this.left=t-this.width/2,this.top=i-this.height/2,this._icon(e,t,i,n,s,o),{drawExternalLabel:()=>{this.options.label!==void 0&&this.labelModule.draw(e,this.left+this.iconSize.width/2+this.margin.left,i+this.height/2+5,n),this.updateBoundingBox(t,i)}}}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.icon.size*.5,this.boundingBox.left=e-this.options.icon.size*.5,this.boundingBox.right=e+this.options.icon.size*.5,this.boundingBox.bottom=t+this.options.icon.size*.5,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))}_icon(e,t,i,n,s,o){const a=Number(this.options.icon.size);this.options.icon.code!==void 0?(e.font=[this.options.icon.weight!=null?this.options.icon.weight:n?"bold":"",(this.options.icon.weight!=null&&n?5:0)+a+"px",this.options.icon.face].join(" "),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",this.enableShadow(e,o),e.fillText(this.options.icon.code,t,i),this.disableShadow(e,o)):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.")}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let Kte=class extends R0{constructor(e,t,i,n,s){super(e,t,i),this.setImages(n,s)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=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){const s=this.options.size*2;this.width=s,this.height=s;return}this.needsRefresh(t,i)&&this._resizeImage()}draw(e,t,i,n,s,o){e.save(),this.switchImages(n),this.resize();let a=t,u=i;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=t,this.top=i,a+=this.width/2,u+=this.height/2):(this.left=t-this.width/2,this.top=i-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){const l=this.options.borderWidth,c=this.options.borderWidthSelected||2*this.options.borderWidth,d=(n?c:l)/this.body.view.scale;e.lineWidth=Math.min(this.width,d),e.beginPath();let h=n?this.options.color.highlight.border:s?this.options.color.hover.border:this.options.color.border,f=n?this.options.color.highlight.background:s?this.options.color.hover.background:this.options.color.background;o.opacity!==void 0&&(h=ar(h,o.opacity),f=ar(f,o.opacity)),e.strokeStyle=h,e.fillStyle=f,e.rect(this.left-.5*e.lineWidth,this.top-.5*e.lineWidth,this.width+e.lineWidth,this.height+e.lineWidth),wa(e).call(e),this.performStroke(e,o),e.closePath()}this._drawImageAtPosition(e,o),this._drawImageLabel(e,a,u,n,s),this.updateBoundingBox(t,i),e.restore()}updateBoundingBox(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))}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class Gte extends Vi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"square",2,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Yte extends Vi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"hexagon",4,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Xte extends Vi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"star",4,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Jte extends Nn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e,t,i){this.needsRefresh(t,i)&&(this.textSize=this.labelModule.getTextSize(e,t,i),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)}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this.enableShadow(e,o),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,s),this.disableShadow(e,o),this.updateBoundingBox(t,i,e,n,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let Qte=class extends Vi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"triangle",3,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class Zte extends Vi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"triangleDown",3,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}function L2(r,e){var t=et(r);if(Mi){var i=Mi(r);e&&(i=Kt(i).call(i,function(n){return Ui(r,n).enumerable})),t.push.apply(t,i)}return t}function z2(r){for(var e=1;et[l]!=null);u.push("font"),fu(u,e,a),e.color=X_(e.color)}static parseOptions(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=arguments.length>4?arguments[4]:void 0;if(fu(["color","fixed","shadow"],e,t,i),Ke.checkMass(t),e.opacity!==void 0&&(Ke.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),t.opacity!==void 0&&(Ke.checkOpacity(t.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+t.opacity),t.opacity=void 0)),t.shapeProperties&&!Ke.checkCoordinateOrigin(t.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+t.shapeProperties.coordinateOrigin),or(e,t,"shadow",n),t.color!==void 0&&t.color!==null){const a=X_(t.color);p5(e.color,a)}else i===!0&&t.color===null&&(e.color=Ri(n.color));t.fixed!==void 0&&t.fixed!==null&&(typeof t.fixed=="boolean"?(e.fixed.x=t.fixed,e.fixed.y=t.fixed):(t.fixed.x!==void 0&&typeof t.fixed.x=="boolean"&&(e.fixed.x=t.fixed.x),t.fixed.y!==void 0&&typeof t.fixed.y=="boolean"&&(e.fixed.y=t.fixed.y))),i===!0&&t.font===null&&(e.font=Ri(n.font)),Ke.updateGroupOptions(e,t,s),t.scaling!==void 0&&or(e.scaling,t.scaling,"label",n.scaling)}getFormattingValues(){const e={color:this.options.color.background,opacity:this.options.opacity,borderWidth:this.options.borderWidth,borderColor:this.options.color.border,size:this.options.size,borderDashes:this.options.shapeProperties.borderDashes,borderRadius:this.options.shapeProperties.borderRadius,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y};if(this.selected||this.hover?this.chooser===!0?this.selected?(this.options.borderWidthSelected!=null?e.borderWidth=this.options.borderWidthSelected:e.borderWidth*=2,e.color=this.options.color.highlight.background,e.borderColor=this.options.color.highlight.border,e.shadow=this.options.shadow.enabled):this.hover&&(e.color=this.options.color.hover.background,e.borderColor=this.options.color.hover.border,e.shadow=this.options.shadow.enabled):typeof this.chooser=="function"&&(this.chooser(e,this.options.id,this.selected,this.hover),e.shadow===!1&&(e.shadowColor!==this.options.shadow.color||e.shadowSize!==this.options.shadow.size||e.shadowX!==this.options.shadow.x||e.shadowY!==this.options.shadow.y)&&(e.shadow=!0)):e.shadow=this.options.shadow.enabled,this.options.opacity!==void 0){const t=this.options.opacity;e.borderColor=ar(e.borderColor,t),e.color=ar(e.color,t),e.shadowColor=ar(e.shadowColor,t)}return e}updateLabelModule(e){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),Ke.updateGroupOptions(this.options,z2(z2({},e),{},{color:e&&e.color||this._localColor||void 0}),this.grouplist);const t=this.grouplist.get(this.options.group,!1),i=[e,this.options,t,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,i),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateShape(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 kte(this.options,this.body,this.labelModule);break;case"circle":this.shape=new Bte(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new jte(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new zte(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new Hte(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new Wte(this.options,this.body,this.labelModule);break;case"dot":this.shape=new Ute(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new j2(this.options,this.body,this.labelModule);break;case"icon":this.shape=new Vte(this.options,this.body,this.labelModule);break;case"image":this.shape=new Kte(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new Gte(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new Yte(this.options,this.body,this.labelModule);break;case"star":this.shape=new Xte(this.options,this.body,this.labelModule);break;case"text":this.shape=new Jte(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new Qte(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new Zte(this.options,this.body,this.labelModule);break;default:this.shape=new j2(this.options,this.body,this.labelModule);break}this.needsRefresh()}select(){this.selected=!0,this.needsRefresh()}unselect(){this.selected=!1,this.needsRefresh()}needsRefresh(){this.shape.refreshNeeded=!0}getTitle(){return this.options.title}distanceToBorder(e,t){return this.shape.distanceToBorder(e,t)}isFixed(){return this.options.fixed.x&&this.options.fixed.y}isSelected(){return this.selected}getValue(){return this.options.value}getLabelSize(){return this.labelModule.size()}setValueRange(e,t,i){if(this.options.value!==void 0){const n=this.options.scaling.customScalingFunction(e,t,i,this.options.value),s=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const o=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+n*o}this.options.size=this.options.scaling.min+n*s}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}draw(e){const t=this.getFormattingValues();return this.shape.draw(e,this.x,this.y,this.selected,this.hover,t)||{}}updateBoundingBox(e){this.shape.updateBoundingBox(this.x,this.y,e)}resize(e){const t=this.getFormattingValues();this.shape.resize(e,this.selected,this.hover,t)}getItemsOnPoint(e){const t=[];return this.labelModule.visible()&&tw(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),tw(this.shape.boundingBox,e)&&t.push({nodeId:this.id}),t}isOverlappingWith(e){return this.shape.lefte.left&&this.shape.tope.top}isBoundingBoxOverlappingWith(e){return this.shape.boundingBox.lefte.left&&this.shape.boundingBox.tope.top}static checkMass(e,t){if(e.mass!==void 0&&e.mass<=0){let i="";t!==void 0&&(i=" in node id: "+t),console.error("%cNegative or zero mass disallowed"+i+", setting mass to 1.",b5),e.mass=1}}}class ere{constructor(e,t,i,n){var s;if(this.body=e,this.images=t,this.groups=i,this.layoutEngine=n,this.body.functions.createNode=z(s=this.create).call(s,this),this.nodesListeners={add:(o,a)=>{this.add(a.items)},update:(o,a)=>{this.update(a.items,a.data,a.oldData)},remove:(o,a)=>{this.remove(a.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(o,a,u,l){if(a===o)return .5;{const c=1/(a-o);return Math.max(0,(l-o)*c)}}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1,coordinateOrigin:"center"},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=Ri(this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e,t;this.body.emitter.on("refreshNodes",z(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",z(t=this.refresh).call(t,this)),this.body.emitter.on("destroy",()=>{Ie(this.nodesListeners,(i,n)=>{this.body.data.nodes&&this.body.data.nodes.off(n,i)}),delete this.body.functions.createNode,delete this.nodesListeners.add,delete this.nodesListeners.update,delete this.nodesListeners.remove,delete this.nodesListeners})}setOptions(e){if(e!==void 0){if(Ke.parseOptions(this.options,e),e.opacity!==void 0&&(ew(e.opacity)||!rn(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(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(const t of et(this.body.nodes))this.body.nodes[t].updateLabelModule(),this.body.nodes[t].needsRefresh();if(e.size!==void 0)for(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].needsRefresh();(e.hidden!==void 0||e.physics!==void 0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.data.nodes;if(f3("id",e))this.body.data.nodes=e;else if(tt(e))this.body.data.nodes=new uu,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new uu;else throw new TypeError("Array or DataSet expected");if(i&&Ie(this.nodesListeners,function(n,s){i.off(s,n)}),this.body.nodes={},this.body.data.nodes){const n=this;Ie(this.nodesListeners,function(o,a){n.body.data.nodes.on(a,o)});const s=this.body.data.nodes.getIds();this.add(s,!0)}t===!1&&this.body.emitter.emit("_dataChanged")}add(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i;const n=[];for(let s=0;s1&&arguments[1]!==void 0?arguments[1]:Ke;return new t(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}refresh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ie(this.body.nodes,(t,i)=>{const n=this.body.data.nodes.get(i);n!==void 0&&(e===!0&&t.setOptions({x:null,y:null}),t.setOptions({fixed:!1}),t.setOptions(n))})}getPositions(e){const t={};if(e!==void 0){if(tt(e)===!0){for(let i=0;i{this.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}}var H2={},W2;function tre(){if(W2)return H2;W2=1;var r=de(),e=Math.hypot,t=Math.abs,i=Math.sqrt,n=!!e&&e(1/0,NaN)!==1/0;return r({target:"Math",stat:!0,arity:2,forced:n},{hypot:function(o,a){for(var u=0,l=0,c=arguments.length,d=0,h,f;l0?(f=h/d,u+=f*f):u+=h;return d===1/0?1/0:d*i(u)}}),H2}var T1,U2;function rre(){if(U2)return T1;U2=1,tre();var r=Be();return T1=r.Math.hypot,T1}var $1,V2;function ire(){if(V2)return $1;V2=1;var r=rre();return $1=r,$1}var P1,K2;function nre(){return K2||(K2=1,P1=ire()),P1}var sre=nre(),ore=pe(sre);class rt{static transform(e,t){tt(e)||(e=[e]);const i=t.point.x,n=t.point.y,s=t.angle,o=t.length;for(let a=0;a4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,t),e.lineWidth=t.width,t.dashes!==!1?this._drawDashedLine(e,t,s):this._drawLine(e,t,s)}_drawLine(e,t,i,n,s){if(this.from!=this.to)this._line(e,t,i,n,s);else{const[o,a,u]=this._getCircleData(e);this._circle(e,t,o,a,u)}}_drawDashedLine(e,t,i,n,s){e.lineCap="round";const o=tt(t.dashes)?t.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(o),e.lineDashOffset=0,this.from!=this.to)this._line(e,t,i);else{const[a,u,l]=this._getCircleData(e);this._circle(e,t,a,u,l)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)S3(e,this.from.x,this.from.y,this.to.x,this.to.y,o);else{const[a,u,l]=this._getCircleData(e);this._circle(e,t,a,u,l)}this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}}findBorderPosition(e,t,i){return this.from!=this.to?this._findBorderPosition(e,t,i):this._findBorderPositionCircle(e,t,i)}findBorderPositions(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};{var t;const[i,n]=qr(t=this._getCircleData(e)).call(t,0,2);return{from:this._findBorderPositionCircle(this.from,e,{x:i,y:n,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:i,y:n,low:.6,high:.8,direction:1})}}}_getCircleData(e){const t=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);const i=M5(e,this.options.selfReference.angle,t,this.from);return[i.x,i.y,t]}_pointOnCircle(e,t,i,n){const s=n*2*Math.PI;return{x:e+i*Math.cos(s),y:t-i*Math.sin(s)}}_findBorderPositionCircle(e,t,i){const n=i.x,s=i.y;let o=i.low,a=i.high;const u=i.direction,l=10,c=this.options.selfReference.size,d=.05;let h,f=(o+a)*.5,v=0;this.options.arrowStrikethrough===!0&&(u===-1?v=this.options.endPointOffset.from:u===1&&(v=this.options.endPointOffset.to));let p=0;do{f=(o+a)*.5,h=this._pointOnCircle(n,s,c,f);const _=Math.atan2(e.y-h.y,e.x-h.x),m=e.distanceToBorder(t,_)+v,g=Math.sqrt(Math.pow(h.x-e.x,2)+Math.pow(h.y-e.y,2)),E=m-g;if(Math.abs(E)0?u>0?o=f:a=f:u>0?a=f:o=f,++p}while(o<=a&&p1?c=1:c<0&&(c=0);const d=e+c*a,h=t+c*u,f=d-s,v=h-o;return Math.sqrt(f*f+v*v)}getArrowData(e,t,i,n,s,o){let a,u,l,c,d,h,f;const v=o.width;t==="from"?(l=this.from,c=this.to,d=o.fromArrowScale<0,h=Math.abs(o.fromArrowScale),f=o.fromArrowType):t==="to"?(l=this.to,c=this.from,d=o.toArrowScale<0,h=Math.abs(o.toArrowScale),f=o.toArrowType):(l=this.to,c=this.from,d=o.middleArrowScale<0,h=Math.abs(o.middleArrowScale),f=o.middleArrowType);const p=15*h+3*v;if(l!=c){const E=ore(l.x-c.x,l.y-c.y),y=p/E;if(t!=="middle")if(this.options.smooth.enabled===!0){const O=this._findBorderPosition(l,e,{via:i}),I=this.getPoint(O.t+y*(t==="from"?1:-1),i);a=Math.atan2(O.y-I.y,O.x-I.x),u=O}else a=Math.atan2(l.y-c.y,l.x-c.x),u=this._findBorderPosition(l,e);else{const O=(d?-y:y)/2,I=this.getPoint(.5+O,i),S=this.getPoint(.5-O,i);a=Math.atan2(I.y-S.y,I.x-S.x),u=this.getPoint(.5,i)}}else{const[E,y,O]=this._getCircleData(e);if(t==="from"){const I=this.options.selfReference.angle,S=this.options.selfReference.angle+Math.PI,b=this._findBorderPositionCircle(this.from,e,{x:E,y,low:I,high:S,direction:-1});a=b.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,u=b}else if(t==="to"){const I=this.options.selfReference.angle,S=this.options.selfReference.angle+Math.PI,b=this._findBorderPositionCircle(this.from,e,{x:E,y,low:I,high:S,direction:1});a=b.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,u=b}else{const I=this.options.selfReference.angle/(2*Math.PI);u=this._pointOnCircle(E,y,O,I),a=I*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}const _=u.x-p*.9*Math.cos(a),m=u.y-p*.9*Math.sin(a);return{point:u,core:{x:_,y:m},angle:a,length:p,type:f}}drawArrowHead(e,t,i,n,s){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width,F5.draw(e,s)&&(this.enableShadow(e,t),wa(e).call(e),this.disableShadow(e,t))}enableShadow(e,t){t.shadow===!0&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}disableShadow(e,t){t.shadow===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}drawBackground(e,t){if(t.background!==!1){const i={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=t.backgroundColor,e.lineWidth=t.backgroundSize,this.setStrokeDashed(e,t.backgroundDashes),e.stroke(),e.strokeStyle=i.strokeStyle,e.lineWidth=i.lineWidth,e.dashes=i.dashes,this.setStrokeDashed(e,t.dashes)}}setStrokeDashed(e,t){if(t!==!1)if(e.setLineDash!==void 0){const i=tt(t)?t:[5,5];e.setLineDash(i)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else e.setLineDash!==void 0?e.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}function X2(r,e){var t=et(r);if(Mi){var i=Mi(r);e&&(i=Kt(i).call(i,function(n){return Ui(r,n).enumerable})),t.push.apply(t,i)}return t}function J2(r){for(var e=1;e2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates();const n=10,s=.2;let o=!1,a=1,u=0,l=this.to,c,d,h=this.options.endPointOffset?this.options.endPointOffset.to:0;e.id===this.from.id&&(l=this.from,o=!0,h=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(h=0);let f=0;do{d=(u+a)*.5,c=this.getPoint(d,i);const v=Math.atan2(l.y-c.y,l.x-c.x),p=l.distanceToBorder(t,v)+h,_=Math.sqrt(Math.pow(c.x-l.x,2)+Math.pow(c.y-l.y,2)),m=p-_;if(Math.abs(m)0&&(l=this._getDistanceToLine(v,p,h,f,s,o),u=l{this.positionBezierNode()},this._body.emitter.on("_repositionBezierNodes",this._boundFunction)}setOptions(e){super.setOptions(e);let 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(),t===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}connect(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}cleanup(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),this.via!==void 0?(delete this._body.nodes[this.via.id],this.via=void 0,!0):!1}setupSupportNode(){if(this.via===void 0){const 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()}}positionBezierNode(){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)}_line(e,t,i){this._bezierCurve(e,t,i)}_getViaCoordinates(){return this.via}getViaNode(){return this.via}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){const[i,n,s]=this._getCircleData(),o=2*Math.PI*(1-e);return{x:i+s*Math.sin(o),y:n+s-s*(1-Math.cos(o))}}else return{x:Math.pow(1-e,2)*this.fromPoint.x+2*e*(1-e)*t.x+Math.pow(e,2)*this.toPoint.x,y:Math.pow(1-e,2)*this.fromPoint.y+2*e*(1-e)*t.y+Math.pow(e,2)*this.toPoint.y}}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t,this.via)}_getDistanceToEdge(e,t,i,n,s,o){return this._getDistanceToBezierEdge(e,t,i,n,s,o,this.via)}}class Z2 extends C0{constructor(e,t,i){super(e,t,i)}_line(e,t,i){this._bezierCurve(e,t,i)}getViaNode(){return this._getViaCoordinates()}_getViaCoordinates(){const e=this.options.smooth.roundness,t=this.options.smooth.type;let i=Math.abs(this.from.x-this.to.x),n=Math.abs(this.from.y-this.to.y);if(t==="discrete"||t==="diagonalCross"){let s,o;i<=n?s=o=e*n:s=o=e*i,this.from.x>this.to.x&&(s=-s),this.from.y>=this.to.y&&(o=-o);let a=this.from.x+s,u=this.from.y+o;return t==="discrete"&&(i<=n?a=ithis.to.x&&(s=-s),this.from.y>=this.to.y&&(o=-o);let a=this.from.x+s,u=this.from.y+o;return i<=n?this.from.x<=this.to.x?a=this.to.xa?this.to.x:a:this.from.y>=this.to.y?u=this.to.y>u?this.to.y:u:u=this.to.y2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(e,t,i.via)}_getDistanceToEdge(e,t,i,n,s,o){let a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(e,t,i,n,s,o,a)}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const i=e,n=Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*t.x+Math.pow(i,2)*this.toPoint.x,s=Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*t.y+Math.pow(i,2)*this.toPoint.y;return{x:n,y:s}}}class bre extends C0{constructor(e,t,i){super(e,t,i)}_getDistanceToBezierEdge2(e,t,i,n,s,o,a,u){let l=1e9,c=e,d=t;const h=[0,0,0,0];for(let f=1;f<10;f++){const v=.1*f;h[0]=Math.pow(1-v,3),h[1]=3*v*Math.pow(1-v,2),h[2]=3*Math.pow(v,2)*(1-v),h[3]=Math.pow(v,3);const p=h[0]*e+h[1]*a.x+h[2]*u.x+h[3]*i,_=h[0]*t+h[1]*a.y+h[2]*u.y+h[3]*n;if(f>0){const m=this._getDistanceToLine(c,d,p,_,s,o);l=mMath.abs(t)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(n=this.from.y,o=this.to.y,i=this.from.x-a*e,s=this.to.x+a*e):(n=this.from.y-a*t,o=this.to.y+a*t,i=this.from.x,s=this.to.x),[{x:i,y:n},{x:s,y:o}]}getViaNode(){return this._getViaCoordinates()}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t)}_getDistanceToEdge(e,t,i,n,s,o){let[a,u]=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge2(e,t,i,n,s,o,a,u)}getPoint(e){let[t,i]=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const n=e,s=[Math.pow(1-n,3),3*n*Math.pow(1-n,2),3*Math.pow(n,2)*(1-n),Math.pow(n,3)],o=s[0]*this.fromPoint.x+s[1]*t.x+s[2]*i.x+s[3]*this.toPoint.x,a=s[0]*this.fromPoint.y+s[1]*t.y+s[2]*i.y+s[3]*this.toPoint.y;return{x:o,y:a}}}class tB extends k5{constructor(e,t,i){super(e,t,i)}_line(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)}getViaNode(){}getPoint(e){return{x:(1-e)*this.fromPoint.x+e*this.toPoint.x,y:(1-e)*this.fromPoint.y+e*this.toPoint.y}}_findBorderPosition(e,t){let i=this.to,n=this.from;e.id===this.from.id&&(i=this.from,n=this.to);const s=Math.atan2(i.y-n.y,i.x-n.x),o=i.x-n.x,a=i.y-n.y,u=Math.sqrt(o*o+a*a),l=e.distanceToBorder(t,s),c=(u-l)/u;return{x:(1-c)*n.x+c*i.x,y:(1-c)*n.y+c*i.y,t:0}}_getDistanceToEdge(e,t,i,n,s,o){return this._getDistanceToLine(e,t,i,n,s,o)}}class Ci{constructor(e,t,i,n,s){if(t===void 0)throw new Error("No body provided");this.options=Ri(n),this.globalOptions=n,this.defaultOptions=s,this.body=t,this.imagelist=i,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 cs(this.body,this.options,!0),this.setOptions(e)}setOptions(e){if(!e)return;let t=typeof e.physics<"u"&&this.options.physics!==e.physics||typeof e.hidden<"u"&&(this.options.hidden||!1)!==(e.hidden||!1)||typeof e.from<"u"&&this.options.from!==e.from||typeof e.to<"u"&&this.options.to!==e.to;Ci.parseOptions(this.options,e,!0,this.globalOptions),e.id!==void 0&&(this.id=e.id),e.from!==void 0&&(this.fromId=e.from),e.to!==void 0&&(this.toId=e.to),e.title!==void 0&&(this.title=e.title),e.value!==void 0&&(e.value=A5(e.value));const i=[e,this.options,this.defaultOptions];return this.chooser=P0("edge",i),this.updateLabelModule(e),t=this.updateEdgeType()||t,this._setInteractionWidths(),this.connect(),t}static parseOptions(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Ys(["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"],e,t,i),t.endPointOffset!==void 0&&t.endPointOffset.from!==void 0&&(rn(t.endPointOffset.from)?e.endPointOffset.from=t.endPointOffset.from:(e.endPointOffset.from=n.endPointOffset.from!==void 0?n.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),t.endPointOffset!==void 0&&t.endPointOffset.to!==void 0&&(rn(t.endPointOffset.to)?e.endPointOffset.to=t.endPointOffset.to:(e.endPointOffset.to=n.endPointOffset.to!==void 0?n.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),pu(t.label)?e.label=t.label:pu(e.label)||(e.label=void 0),or(e,t,"smooth",n),or(e,t,"shadow",n),or(e,t,"background",n),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:i===!0&&t.dashes===null&&(e.dashes=un(n.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),or(e.scaling,t.scaling,"label",n.scaling)):i===!0&&t.scaling===null&&(e.scaling=un(n.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows=="string"){const a=t.arrows.toLowerCase();e.arrows.to.enabled=Fe(a).call(a,"to")!=-1,e.arrows.middle.enabled=Fe(a).call(a,"middle")!=-1,e.arrows.from.enabled=Fe(a).call(a,"from")!=-1}else if(typeof t.arrows=="object")or(e.arrows,t.arrows,"to",n.arrows),or(e.arrows,t.arrows,"middle",n.arrows),or(e.arrows,t.arrows,"from",n.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+_a(t.arrows));else i===!0&&t.arrows===null&&(e.arrows=un(n.arrows));if(t.color!==void 0&&t.color!==null){const a=us(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,u=e.color;if(s)Ue(u,n.color,!1,i);else for(const l in u)Object.prototype.hasOwnProperty.call(u,l)&&delete u[l];if(us(u))u.color=u,u.highlight=u,u.hover=u,u.inherit=!1,a.opacity===void 0&&(u.opacity=1);else{let l=!1;a.color!==void 0&&(u.color=a.color,l=!0),a.highlight!==void 0&&(u.highlight=a.highlight,l=!0),a.hover!==void 0&&(u.hover=a.hover,l=!0),a.inherit!==void 0&&(u.inherit=a.inherit),a.opacity!==void 0&&(u.opacity=Math.min(1,Math.max(0,a.opacity))),l===!0?u.inherit=!1:u.inherit===void 0&&(u.inherit="from")}}else i===!0&&t.color===null&&(e.color=Ri(n.color));i===!0&&t.font===null&&(e.font=Ri(n.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)}getFormattingValues(){const e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,t=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,i=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,n=this.options.color.inherit,s={toArrow:e,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:i,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:t,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:n?void 0:this.options.color.color,inheritsColor:n,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(this.chooser===!0){if(this.selected){const o=this.options.selectionWidth;typeof o=="function"?s.width=o(s.width):typeof o=="number"&&(s.width+=o),s.width=Math.max(s.width,.3/this.body.view.scale),s.color=this.options.color.highlight,s.shadow=this.options.shadow.enabled}else if(this.hover){const o=this.options.hoverWidth;typeof o=="function"?s.width=o(s.width):typeof o=="number"&&(s.width+=o),s.width=Math.max(s.width,.3/this.body.view.scale),s.color=this.options.color.hover,s.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(s,this.options.id,this.selected,this.hover),s.color!==void 0&&(s.inheritsColor=!1),s.shadow===!1&&(s.shadowColor!==this.options.shadow.color||s.shadowSize!==this.options.shadow.size||s.shadowX!==this.options.shadow.x||s.shadowY!==this.options.shadow.y)&&(s.shadow=!0));else s.shadow=this.options.shadow.enabled,s.width=Math.max(s.width,.3/this.body.view.scale);return s}updateLabelModule(e){const t=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,t),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateEdgeType(){const e=this.options.smooth;let t=!1,i=!0;return this.edgeType!==void 0&&((this.edgeType instanceof Q2&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof eB&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof Z2&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof tB&&e.type.enabled===!1)&&(i=!1),i===!0&&(t=this.cleanup())),i===!0?e.enabled===!0?e.type==="dynamic"?(t=!0,this.edgeType=new Q2(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new eB(this.options,this.body,this.labelModule):this.edgeType=new Z2(this.options,this.body,this.labelModule):this.edgeType=new tB(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),t}connect(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=this.from!==void 0&&this.to!==void 0,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}disconnect(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}getTitle(){return this.title}isSelected(){return this.selected}getValue(){return this.options.value}setValueRange(e,t,i){if(this.options.value!==void 0){const n=this.options.scaling.customScalingFunction(e,t,i,this.options.value),s=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const o=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+n*o}this.options.width=this.options.scaling.min+n*s}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}_setInteractionWidths(){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}draw(e){const t=this.getFormattingValues();if(t.hidden)return;const i=this.edgeType.getViaNode();this.edgeType.drawLine(e,t,this.selected,this.hover,i),this.drawLabel(e,i)}drawArrows(e){const t=this.getFormattingValues();if(t.hidden)return;const i=this.edgeType.getViaNode(),n={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,t.fromArrow&&(n.from=this.edgeType.getArrowData(e,"from",i,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.fromPoint=n.from.core),t.fromArrowSrc&&(n.from.image=this.imagelist.load(t.fromArrowSrc)),t.fromArrowImageWidth&&(n.from.imageWidth=t.fromArrowImageWidth),t.fromArrowImageHeight&&(n.from.imageHeight=t.fromArrowImageHeight)),t.toArrow&&(n.to=this.edgeType.getArrowData(e,"to",i,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.toPoint=n.to.core),t.toArrowSrc&&(n.to.image=this.imagelist.load(t.toArrowSrc)),t.toArrowImageWidth&&(n.to.imageWidth=t.toArrowImageWidth),t.toArrowImageHeight&&(n.to.imageHeight=t.toArrowImageHeight)),t.middleArrow&&(n.middle=this.edgeType.getArrowData(e,"middle",i,this.selected,this.hover,t),t.middleArrowSrc&&(n.middle.image=this.imagelist.load(t.middleArrowSrc)),t.middleArrowImageWidth&&(n.middle.imageWidth=t.middleArrowImageWidth),t.middleArrowImageHeight&&(n.middle.imageHeight=t.middleArrowImageHeight)),t.fromArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,n.from),t.middleArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,n.middle),t.toArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,n.to)}drawLabel(e,t){if(this.options.label!==void 0){const i=this.from,n=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);let s;if(i.id!=n.id){this.labelModule.pointToSelf=!1,s=this.edgeType.getPoint(.5,t),e.save();const o=this._getRotation(e);o.angle!=0&&(e.translate(o.x,o.y),e.rotate(o.angle)),this.labelModule.draw(e,s.x,s.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;const o=M5(e,this.options.selfReference.angle,this.options.selfReference.size,i);s=this._pointOnCircle(o.x,o.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,s.x,s.y,this.selected,this.hover)}}}getItemsOnPoint(e){const t=[];if(this.labelModule.visible()){const n=this._getRotation();tw(this.labelModule.getSize(),e,n)&&t.push({edgeId:this.id,labelId:0})}const i={left:e.x,top:e.y};return this.isOverlappingWith(i)&&t.push({edgeId:this.id}),t}isOverlappingWith(e){if(this.connected){const i=this.from.x,n=this.from.y,s=this.to.x,o=this.to.y,a=e.left,u=e.top;return this.edgeType.getDistanceToEdge(i,n,s,o,a,u)<10}else return!1}_getRotation(e){const t=this.edgeType.getViaNode(),i=this.edgeType.getPoint(.5,t);e!==void 0&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,i.x,i.y);const n={x:i.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible()||this.options.font.align==="horizontal")return n;const s=this.from.y-this.to.y,o=this.from.x-this.to.x;let a=Math.atan2(s,o);return(a<-1&&o<0||a>0&&o<0)&&(a+=Math.PI),n.angle=a,n}_pointOnCircle(e,t,i,n){return{x:e+i*Math.cos(n),y:t-i*Math.sin(n)}}select(){this.selected=!0}unselect(){this.selected=!1}cleanup(){return this.edgeType.cleanup()}remove(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}endPointsValid(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}}class _re{constructor(e,t,i){var n;this.body=e,this.images=t,this.groups=i,this.body.functions.createEdge=z(n=this.create).call(n,this),this.edgesListeners={add:(s,o)=>{this.add(o.items)},update:(s,o)=>{this.update(o.items)},remove:(s,o)=>{this.remove(o.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(s,o,a,u){if(o===s)return .5;{const l=1/(o-s);return Math.max(0,(u-s)*l)}}},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},Ue(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e=this,t,i;this.body.emitter.on("_forceDisableDynamicCurves",function(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;n==="dynamic"&&(n="continuous");let o=!1;for(const a in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,a)){const u=e.body.edges[a],l=e.body.data.edges.get(a);if(l!=null){const c=l.smooth;c!==void 0&&c.enabled===!0&&c.type==="dynamic"&&(n===void 0?u.setOptions({smooth:!1}):u.setOptions({smooth:{type:n}}),o=!0)}}s===!0&&o===!0&&e.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",()=>{this.reconnectEdges()}),this.body.emitter.on("refreshEdges",z(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",z(i=this.refresh).call(i,this)),this.body.emitter.on("destroy",()=>{Ie(this.edgesListeners,(n,s)=>{this.body.data.edges&&this.body.data.edges.off(s,n)}),delete this.body.functions.createEdge,delete this.edgesListeners.add,delete this.edgesListeners.update,delete this.edgesListeners.remove,delete this.edgesListeners})}setOptions(e){if(e!==void 0){Ci.parseOptions(this.options,e,!0,this.defaultOptions,!0);let t=!1;if(e.smooth!==void 0)for(const i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&(t=this.body.edges[i].updateEdgeType()||t);if(e.font!==void 0)for(const i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&this.body.edges[i].updateLabelModule();(e.hidden!==void 0||e.physics!==void 0||t===!0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.data.edges;if(f3("id",e))this.body.data.edges=e;else if(tt(e))this.body.data.edges=new uu,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new uu;else throw new TypeError("Array or DataSet expected");if(i&&Ie(this.edgesListeners,(n,s)=>{i.off(s,n)}),this.body.edges={},this.body.data.edges){Ie(this.edgesListeners,(s,o)=>{this.body.data.edges.on(o,s)});const n=this.body.data.edges.getIds();this.add(n,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),t===!1&&this.body.emitter.emit("_dataChanged")}add(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.edges,n=this.body.data.edges;for(let s=0;s1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length===0)return;const i=this.body.edges;Ie(e,n=>{const s=i[n];s!==void 0&&s.remove()}),t&&this.body.emitter.emit("_dataChanged")}refresh(){Ie(this.body.edges,(e,t)=>{const i=this.body.data.edges.get(t);i!==void 0&&e.setOptions(i)})}create(e){return new Ci(e,this.body,this.images,this.options,this.defaultOptions)}reconnectEdges(){let e;const t=this.body.nodes,i=this.body.edges;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].edges=[]);for(e in i)if(Object.prototype.hasOwnProperty.call(i,e)){const n=i[e];n.from=null,n.to=null,n.connect()}}getConnectedNodes(e){const t=[];if(this.body.edges[e]!==void 0){const i=this.body.edges[e];i.fromId!==void 0&&t.push(i.fromId),i.toId!==void 0&&t.push(i.toId)}return t}_updateState(){this._addMissingEdges(),this._removeInvalidEdges()}_removeInvalidEdges(){const e=[];Ie(this.body.edges,(t,i)=>{const n=this.body.nodes[t.toId],s=this.body.nodes[t.fromId];n!==void 0&&n.isCluster===!0||s!==void 0&&s.isCluster===!0||(n===void 0||s===void 0)&&e.push(i)}),this.remove(e,!1)}_addMissingEdges(){const e=this.body.data.edges;if(e==null)return;const t=this.body.edges,i=[];Le(e).call(e,(n,s)=>{t[s]===void 0&&i.push(s)}),this.add(i,!0)}}class B5{constructor(e,t,i){this.body=e,this.physicsBody=t,this.barnesHutTree,this.setOptions(i),this._rng=ul("BARNES HUT SOLVER")}setOptions(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}solve(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){let e;const t=this.body.nodes,i=this.physicsBody.physicsNodeIndices,n=i.length,s=this._formBarnesHutTree(t,i);this.barnesHutTree=s;for(let o=0;o0&&this._getForceContributions(s.root,e)}}_getForceContributions(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)}_getForceContribution(e,t){if(e.childrenCount>0){const i=e.centerOfMass.x-t.x,n=e.centerOfMass.y-t.y,s=Math.sqrt(i*i+n*n);s*e.calcSize>this.thetaInversed?this._calculateForces(s,i,n,t,e):e.childrenCount===4?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(s,i,n,t,e)}}_calculateForces(e,t,i,n,s){e===0&&(e=.1,t=e),this.overlapAvoidanceFactor<1&&n.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*n.shape.radius,e-n.shape.radius));const o=this.options.gravitationalConstant*s.mass*n.options.mass/Math.pow(e,3),a=t*o,u=i*o;this.physicsBody.forces[n.id].x+=a,this.physicsBody.forces[n.id].y+=u}_formBarnesHutTree(e,t){let i;const n=t.length;let s=e[t[0]].x,o=e[t[0]].y,a=e[t[0]].x,u=e[t[0]].y;for(let _=1;_0&&(ga&&(a=g),Eu&&(u=E))}const l=Math.abs(a-s)-Math.abs(u-o);l>0?(o-=.5*l,u+=.5*l):(s+=.5*l,a-=.5*l);const d=Math.max(1e-5,Math.abs(a-s)),h=.5*d,f=.5*(s+a),v=.5*(o+u),p={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:f-h,maxX:f+h,minY:v-h,maxY:v+h},size:d,calcSize:1/d,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(p.root);for(let _=0;_0&&this._placeInTree(p.root,i);return p}_updateBranchMass(e,t){const i=e.centerOfMass,n=e.mass+t.options.mass,s=1/n;i.x=i.x*e.mass+t.x*t.options.mass,i.x*=s,i.y=i.y*e.mass+t.y*t.options.mass,i.y*=s,e.mass=n;const o=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidtht.x?n.maxY>t.y?s="NW":s="SW":n.maxY>t.y?s="NE":s="SE",this._placeInRegion(e,t,s)}_placeInRegion(e,t,i){const n=e.children[i];switch(n.childrenCount){case 0:n.children.data=t,n.childrenCount=1,this._updateBranchMass(n,t);break;case 1:n.children.data.x===t.x&&n.children.data.y===t.y?(t.x+=this._rng(),t.y+=this._rng()):(this._splitBranch(n),this._placeInTree(n,t));break;case 4:this._placeInTree(n,t);break}}_splitBranch(e){let 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)}_insertRegion(e,t){let i,n,s,o;const a=.5*e.size;switch(t){case"NW":i=e.range.minX,n=e.range.minX+a,s=e.range.minY,o=e.range.minY+a;break;case"NE":i=e.range.minX+a,n=e.range.maxX,s=e.range.minY,o=e.range.minY+a;break;case"SW":i=e.range.minX,n=e.range.minX+a,s=e.range.minY+a,o=e.range.maxY;break;case"SE":i=e.range.minX+a,n=e.range.maxX,s=e.range.minY+a,o=e.range.maxY;break}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:n,minY:s,maxY:o},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}_debug(e,t){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}_drawBranch(e,t,i){i===void 0&&(i="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=i,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}}class wre{constructor(e,t,i){this._rng=ul("REPULSION SOLVER"),this.body=e,this.physicsBody=t,this.setOptions(i)}setOptions(e){this.options=e}solve(){let e,t,i,n,s,o,a,u;const l=this.body.nodes,c=this.physicsBody.physicsNodeIndices,d=this.physicsBody.forces,h=this.options.nodeDistance,f=-2/3/h,v=4/3;for(let p=0;p0){const o=s.edges.length+1,a=this.options.centralGravity*o*s.options.mass;n[s.id].x=t*a,n[s.id].y=i*a}}}class Tre{constructor(e){this.body=e,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}},at(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("initPhysics",()=>{this.initPhysics()}),this.body.emitter.on("_layoutFailed",()=>{this.layoutFailed=!0}),this.body.emitter.on("resetPhysics",()=>{this.stopSimulation(),this.ready=!1}),this.body.emitter.on("disablePhysics",()=>{this.physicsEnabled=!1,this.stopSimulation()}),this.body.emitter.on("restorePhysics",()=>{this.setOptions(this.options),this.ready===!0&&this.startSimulation()}),this.body.emitter.on("startSimulation",()=>{this.ready===!0&&this.startSimulation()}),this.body.emitter.on("stopSimulation",()=>{this.stopSimulation()}),this.body.emitter.on("destroy",()=>{this.stopSimulation(!1),this.body.emitter.off()}),this.body.emitter.on("_dataChanged",()=>{this.updatePhysicsData()})}setOptions(e){if(e!==void 0)if(e===!1)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(e===!0)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,fu(["stabilization"],this.options,e),or(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());const t=this.options.wind;t&&((typeof t.x!="number"||ew(t.x))&&(t.x=0),(typeof t.y!="number"||ew(t.y))&&(t.y=0)),this.timestep=this.options.timestep}this.init()}init(){let e;this.options.solver==="forceAtlas2Based"?(e=this.options.forceAtlas2Based,this.nodesSolver=new Ore(this.body,this.physicsBody,e),this.edgesSolver=new R1(this.body,this.physicsBody,e),this.gravitySolver=new Ire(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new wre(this.body,this.physicsBody,e),this.edgesSolver=new R1(this.body,this.physicsBody,e),this.gravitySolver=new Xa(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new Ere(this.body,this.physicsBody,e),this.edgesSolver=new Sre(this.body,this.physicsBody,e),this.gravitySolver=new Xa(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new B5(this.body,this.physicsBody,e),this.edgesSolver=new R1(this.body,this.physicsBody,e),this.gravitySolver=new Xa(this.body,this.physicsBody,e)),this.modelOptions=e}initPhysics(){this.physicsEnabled===!0&&this.options.enabled===!0?this.options.stabilization.enabled===!0?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}startSimulation(){if(this.physicsEnabled===!0&&this.options.enabled===!0){if(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),this.viewFunction===void 0){var e;this.viewFunction=z(e=this.simulationStep).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}else this.body.emitter.emit("_redraw")}stopSimulation(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.stabilized=!0,e===!0&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,e===!0&&this.body.emitter.emit("_stopRendering"))}simulationStep(){const e=lu();this.physicsTick(),(lu()-e<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}_emitStabilized(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&ti(()=>{this.body.emitter.emit("stabilized",{iterations:e}),this.startedStabilization=!1,this.stabilizationIterations=0},0)}physicsStep(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}adjustTimeStep(){this._evaluateStepQuality()===!0?this.timestep=1.2*this.timestep:this.timestep/1.2o))return!1;return!0}moveNodes(){const e=this.physicsBody.physicsNodeIndices;let t=0,i=0;const n=5;for(let s=0;so&&(e=e>0?o:-o),e}_performStep(e){const t=this.body.nodes[e],i=this.physicsBody.forces[e];this.options.wind&&(i.x+=this.options.wind.x,i.y+=this.options.wind.y);const n=this.physicsBody.velocities[e];return this.previousStates[e]={x:t.x,y:t.y,vx:n.x,vy:n.y},t.options.fixed.x===!1?(n.x=this.calculateComponentVelocity(n.x,i.x,t.options.mass),t.x+=n.x*this.timestep):(i.x=0,n.x=0),t.options.fixed.y===!1?(n.y=this.calculateComponentVelocity(n.y,i.y,t.options.mass),t.y+=n.y*this.timestep):(i.y=0,n.y=0),Math.sqrt(Math.pow(n.x,2)+Math.pow(n.y,2))}_freezeNodes(){const e=this.body.nodes;for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].x&&e[t].y){const i=e[t].options.fixed;this.freezeCache[t]={x:i.x,y:i.y},i.x=!0,i.y=!0}}_restoreFrozenNodes(){const e=this.body.nodes;for(const 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={}}stabilize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof e!="number"&&(e=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",e)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,ti(()=>this._stabilizationBatch(),0)}_startStabilizing(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}_stabilizationBatch(){const e=()=>this.stabilized===!1&&this.stabilizationIterations{this.body.emitter.emit("stabilizationProgress",{iterations:this.stabilizationIterations,total:this.targetIterations})};this._startStabilizing()&&t();let i=0;for(;e()&&i"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");C1=crypto.getRandomValues.bind(crypto)}return C1(Pre)}const Cre=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var rB={randomUUID:Cre};function xre(r,e,t){var n;r=r||{};const i=r.random??((n=r.rng)==null?void 0:n.call(r))??Rre();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,$re(i)}function Oo(r,e,t){return rB.randomUUID?rB.randomUUID():xre(r)}class Lt{constructor(){}static getRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,n=-1e9,s=1e9,o=-1e9,a;if(t.length>0)for(let u=0;ua.shape.boundingBox.left&&(s=a.shape.boundingBox.left),oa.shape.boundingBox.top&&(i=a.shape.boundingBox.top),n1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,n=-1e9,s=1e9,o=-1e9,a;if(t.length>0)for(let u=0;ua.x&&(s=a.x),oa.y&&(i=a.y),n{delete this.containedEdges[i.id]}),Ie(t.containedNodes,(i,n)=>{this.containedNodes[n]=i}),t.containedNodes={},Ie(t.containedEdges,(i,n)=>{this.containedEdges[n]=i}),t.containedEdges={},Ie(t.edges,i=>{Ie(this.edges,n=>{var s,o;const a=Fe(s=n.clusteringEdgeReplacingIds).call(s,i.id);a!==-1&&(Ie(i.clusteringEdgeReplacingIds,u=>{n.clusteringEdgeReplacingIds.push(u),this.body.edges[u].edgeReplacedById=n.id}),ei(o=n.clusteringEdgeReplacingIds).call(o,a,1))})}),t.edges=[]}}class Dre{constructor(e){this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},at(this.options,this.defaultOptions),this.body.emitter.on("_resetData",()=>{this.clusteredNodes={},this.clusteredEdges={}})}clusterByHubsize(e,t){e===void 0?e=this._getHubSize():typeof e=="object"&&(t=this._checkOptions(e),e=this._getHubSize());const i=[];for(let n=0;n=e&&i.push(s.id)}for(let n=0;n0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");e=this._checkOptions(e);const i={},n={};Ie(this.body.nodes,(s,o)=>{s.options&&e.joinCondition(s.options)===!0&&(i[o]=s,Ie(s.edges,a=>{this.clusteredEdges[a.id]===void 0&&(n[a.id]=a)}))}),this._cluster(i,n,e,t)}clusterByEdgeCount(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;t=this._checkOptions(t);const n=[],s={};let o,a,u;for(let l=0;l0&&et(d).length>0&&p===!0){const m=function(){for(let g=0;g1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,t)}clusterBridges(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,t)}clusterByConnection(e,t){var i;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[e]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");const s=this.body.nodes[e];t=this._checkOptions(t,s),t.clusterNodeProperties.x===void 0&&(t.clusterNodeProperties.x=s.x),t.clusterNodeProperties.y===void 0&&(t.clusterNodeProperties.y=s.y),t.clusterNodeProperties.fixed===void 0&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=s.options.fixed.x,t.clusterNodeProperties.fixed.y=s.options.fixed.y);const o={},a={},u=s.id,l=Lt.cloneOptions(s);o[u]=s;for(let d=0;d-1&&(a[v.id]=v)}}this._cluster(o,a,t,n)}_createClusterEdges(e,t,i,n){let s,o,a,u,l,c;const d=et(e),h=[];for(let p=0;p0&&arguments[0]!==void 0?arguments[0]:{};return e.clusterEdgeProperties===void 0&&(e.clusterEdgeProperties={}),e.clusterNodeProperties===void 0&&(e.clusterNodeProperties={}),e}_cluster(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;const s=[];for(const c in e)Object.prototype.hasOwnProperty.call(e,c)&&this.clusteredNodes[c]!==void 0&&s.push(c);for(let c=0;cn?a.x:n,s=a.yo?a.y:o;return{x:.5*(i+n),y:.5*(s+o)}}openCluster(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No clusterNodeId supplied to openCluster.");const n=this.body.nodes[e];if(n===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(n.isCluster!==!0||n.containedNodes===void 0||n.containedEdges===void 0)throw new Error("The node:"+e+" is not a valid cluster.");const s=this.findNode(e),o=Fe(s).call(s,e)-1;if(o>=0){const c=s[o];this.body.nodes[c]._openChildCluster(e),delete this.body.nodes[e],i===!0&&this.body.emitter.emit("_dataChanged");return}const a=n.containedNodes,u=n.containedEdges;if(t!==void 0&&t.releaseFunction!==void 0&&typeof t.releaseFunction=="function"){const c={},d={x:n.x,y:n.y};for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)){const v=this.body.nodes[f];c[f]={x:v.x,y:v.y}}const h=t.releaseFunction(d,c);for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)){const v=this.body.nodes[f];h[f]!==void 0&&(v.x=h[f].x===void 0?n.x:h[f].x,v.y=h[f].y===void 0?n.y:h[f].y)}}else Ie(a,function(c){c.options.fixed.x===!1&&(c.x=n.x),c.options.fixed.y===!1&&(c.y=n.y)});for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c)){const d=this.body.nodes[c];d.vx=n.vx,d.vy=n.vy,d.setOptions({physics:!0}),delete this.clusteredNodes[c]}const l=[];for(let c=0;c0&&on&&(n=l.edges.length),e+=l.edges.length,t+=Math.pow(l.edges.length,2),i+=1}e=e/i,t=t/i;const s=t-Math.pow(e,2),o=Math.sqrt(s);let a=Math.floor(e+2*o);return a>n&&(a=n),a}_createClusteredEdge(e,t,i,n,s){const o=Lt.cloneOptions(i,"edge");Ue(o,n),o.from=e,o.to=t,o.id="clusterEdge:"+Oo(),s!==void 0&&Ue(o,s);const a=this.body.functions.createEdge(o);return a.clusteringEdgeReplacingIds=[i.id],a.connect(),this.body.edges[a.id]=a,a}_clusterEdges(e,t,i,n){if(t instanceof Ci){const s=t,o={};o[s.id]=s,t=o}if(e instanceof Ke){const s=e,o={};o[s.id]=s,e=o}if(i==null)throw new Error("_clusterEdges: parameter clusterNode required");n===void 0&&(n=i.clusterEdgeProperties),this._createClusterEdges(e,t,i,n);for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&this.body.edges[s]!==void 0){const o=this.body.edges[s];this._backupEdgeOptions(o),o.setOptions({physics:!1})}for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(this.clusteredNodes[s]={clusterId:i.id,node:this.body.nodes[s]},this.body.nodes[s].setOptions({physics:!1}))}_getClusterNodeForNode(e){if(e===void 0)return;const t=this.clusteredNodes[e];if(t===void 0)return;const i=t.clusterId;if(i!==void 0)return this.body.nodes[i]}_filter(e,t){const i=[];return Ie(e,n=>{t(n)&&i.push(n)}),i}_updateState(){let e;const t=[],i={},n=u=>{Ie(this.body.nodes,l=>{l.isCluster===!0&&u(l)})};for(e in this.clusteredNodes){if(!Object.prototype.hasOwnProperty.call(this.clusteredNodes,e))continue;this.body.nodes[e]===void 0&&t.push(e)}n(function(u){for(let l=0;l{const l=this.body.edges[u];(l===void 0||!l.endPointsValid())&&(i[u]=u)}),n(function(u){Ie(u.containedEdges,(l,c)=>{!l.endPointsValid()&&!i[c]&&(i[c]=c)})}),Ie(this.body.edges,(u,l)=>{let c=!0;const d=u.clusteringEdgeReplacingIds;if(d!==void 0){let h=0;Ie(d,f=>{const v=this.body.edges[f];v!==void 0&&v.endPointsValid()&&(h+=1)}),c=h>0}(!u.endPointsValid()||!c)&&(i[l]=l)}),n(u=>{Ie(i,l=>{delete u.containedEdges[l],Ie(u.edges,(c,d)=>{if(c.id===l){u.edges[d]=null;return}c.clusteringEdgeReplacingIds=this._filter(c.clusteringEdgeReplacingIds,function(h){return!i[h]})}),u.edges=this._filter(u.edges,function(c){return c!==null})})}),Ie(i,u=>{delete this.clusteredEdges[u]}),Ie(i,u=>{delete this.body.edges[u]});const s=et(this.body.edges);Ie(s,u=>{const l=this.body.edges[u],c=this._isClusteredNode(l.fromId)||this._isClusteredNode(l.toId);if(c!==this._isClusteredEdge(l.id))if(c){const d=this._getClusterNodeForNode(l.fromId);d!==void 0&&this._clusterEdges(this.body.nodes[l.fromId],l,d);const h=this._getClusterNodeForNode(l.toId);h!==void 0&&this._clusterEdges(this.body.nodes[l.toId],l,h)}else delete this._clusterEdges[u],this._restoreEdge(l)});let o=!1,a=!0;for(;a;){const u=[];n(function(l){const c=et(l.containedNodes).length,d=l.options.allowSingleNodeCluster===!0;(d&&c<1||!d&&c<2)&&u.push(l.id)});for(let l=0;l0,o=o||a}o&&this._updateState()}_isClusteredNode(e){return this.clusteredNodes[e]!==void 0}_isClusteredEdge(e){return this.clusteredEdges[e]!==void 0}}class Are{constructor(e,t){this.body=e,this.canvas=t,this.redrawRequested=!1,this.requestAnimationFrameRequestId=void 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},at(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e;this.body.emitter.on("dragStart",()=>{this.dragging=!0}),this.body.emitter.on("dragEnd",()=>{this.dragging=!1}),this.body.emitter.on("zoom",()=>{this.zooming=!0,window.clearTimeout(this.zoomTimeoutId),this.zoomTimeoutId=ti(()=>{var t;this.zooming=!1,z(t=this._requestRedraw).call(t,this)()},250)}),this.body.emitter.on("_resizeNodes",()=>{this._resizeNodes()}),this.body.emitter.on("_redraw",()=>{this.renderingActive===!1&&this._redraw()}),this.body.emitter.on("_blockRedraw",()=>{this.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",()=>{this.allowRedraw=!0,this.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",z(e=this._requestRedraw).call(e,this)),this.body.emitter.on("_startRendering",()=>{this.renderRequests+=1,this.renderingActive=!0,this._startRendering()}),this.body.emitter.on("_stopRendering",()=>{this.renderRequests-=1,this.renderingActive=this.renderRequests>0,this.requestAnimationFrameRequestId=void 0}),this.body.emitter.on("destroy",()=>{this.renderRequests=0,this.allowRedraw=!1,this.renderingActive=!1,window.cancelAnimationFrame(this.requestAnimationFrameRequestId),this.body.emitter.off()})}setOptions(e){e!==void 0&&Ys(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"],this.options,e)}_startRendering(){if(this.renderingActive===!0&&this.requestAnimationFrameRequestId===void 0){var e;this.requestAnimationFrameRequestId=window.requestAnimationFrame(z(e=this._renderStep).call(e,this),this.simulationInterval)}}_renderStep(){this.renderingActive===!0&&(this.requestAnimationFrameRequestId=void 0,this._startRendering(),this._redraw())}redraw(){this.body.emitter.emit("setSize"),this._redraw()}_requestRedraw(){this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,window.requestAnimationFrame(()=>{this._redraw(!1)}))}_redraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;const t={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();const i=this.canvas.getContext(),n=this.canvas.frame.canvas.clientWidth,s=this.canvas.frame.canvas.clientHeight;if(i.clearRect(0,0,n,s),this.canvas.frame.clientWidth===0)return;if(i.save(),i.translate(this.body.view.translation.x,this.body.view.translation.y),i.scale(this.body.view.scale,this.body.view.scale),i.beginPath(),this.body.emitter.emit("beforeDrawing",i),i.closePath(),e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(i),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){const{drawExternalLabels:o}=this._drawNodes(i,e);t.drawExternalLabels=o}e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(i),t.drawExternalLabels!=null&&t.drawExternalLabels(),e===!1&&this._drawSelectionBox(i),i.beginPath(),this.body.emitter.emit("afterDrawing",i),i.closePath(),i.restore(),e===!0&&i.clearRect(0,0,n,s)}}_resizeNodes(){this.canvas.setTransform();const 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);const t=this.body.nodes;let i;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i=t[n],i.resize(e),i.updateBoundingBox(e,i.selected));e.restore()}_drawNodes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.nodes,n=this.body.nodeIndices;let s;const o=[],a=[],u=20,l=this.canvas.DOMtoCanvas({x:-20,y:-20}),c=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+u,y:this.canvas.frame.canvas.clientHeight+u}),d={top:l.y,left:l.x,bottom:c.y,right:c.x},h=[];for(let _=0;_{for(const _ of h)_()}}}_drawEdges(e){const t=this.body.edges,i=this.body.edgeIndices;for(let n=0;n{t.width!==0&&(this.body.view.translation.x=t.width*.5),t.height!==0&&(this.body.view.translation.y=t.height*.5)}),this.body.emitter.on("setSize",z(e=this.setSize).call(e,this)),this.body.emitter.on("destroy",()=>{this.hammerFrame.destroy(),this.hammer.destroy(),this._cleanUp()})}setOptions(e){if(e!==void 0&&Ys(["width","height","autoResize"],this.options,e),this._cleanUp(),this.options.autoResize===!0){var t;if(window.ResizeObserver){const n=new ResizeObserver(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")}),{frame:s}=this;n.observe(s),this._cleanupCallbacks.push(()=>{n.unobserve(s)})}else{const n=kre(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(()=>{clearInterval(n)})}const i=z(t=this._onResize).call(t,this);window.addEventListener("resize",i),this._cleanupCallbacks.push(()=>{window.removeEventListener("resize",i)})}}_cleanUp(){var e,t,i;Le(e=an(t=ei(i=this._cleanupCallbacks).call(i,0)).call(t)).call(e,n=>{try{n()}catch(s){console.error(s)}})}_onResize(){this.setSize(),this.body.emitter.emit("_redraw")}_getCameraState(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/e,this.cameraState.previousHeight=this.frame.canvas.height/e,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/e,y:.5*this.frame.canvas.height/e}))}_setCameraState(){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){const e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight;let i=this.cameraState.scale;e!=1&&t!=1?i=this.cameraState.scale*.5*(e+t):e!=1?i=this.cameraState.scale*e:t!=1&&(i=this.cameraState.scale*t),this.body.view.scale=i;const n=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),s={x:n.x-this.cameraState.position.x,y:n.y-this.cameraState.position.y};this.body.view.translation.x+=s.x*this.body.view.scale,this.body.view.translation.y+=s.y*this.body.view.scale}}_prepareValue(e){if(typeof e=="number")return e+"px";if(typeof e=="string"){if(Fe(e).call(e,"%")!==-1||Fe(e).call(e,"px")!==-1)return e;if(Fe(e).call(e,"%")===-1)return e+"px"}throw new Error("Could not use the value supplied for width or height:"+e)}_create(){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{const 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()}_bindHammer(){this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new ls(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:ls.DIRECTION_ALL}),gu(this.hammer,e=>{this.body.eventListeners.onTouch(e)}),this.hammer.on("tap",e=>{this.body.eventListeners.onTap(e)}),this.hammer.on("doubletap",e=>{this.body.eventListeners.onDoubleTap(e)}),this.hammer.on("press",e=>{this.body.eventListeners.onHold(e)}),this.hammer.on("panstart",e=>{this.body.eventListeners.onDragStart(e)}),this.hammer.on("panmove",e=>{this.body.eventListeners.onDrag(e)}),this.hammer.on("panend",e=>{this.body.eventListeners.onDragEnd(e)}),this.hammer.on("pinch",e=>{this.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener("wheel",e=>{this.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("mousemove",e=>{this.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener("contextmenu",e=>{this.body.eventListeners.onContext(e)}),this.hammerFrame=new ls(this.frame),j5(this.hammerFrame,e=>{this.body.eventListeners.onRelease(e)})}setSize(){let 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);let i=!1;const n=this.frame.canvas.width,s=this.frame.canvas.height,o=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(o),this.frame.style.width=e,this.frame.style.height=t,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=t,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},i=!0;else{const a=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),u=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==a||this.frame.canvas.height!==u)&&this._getCameraState(o),this.frame.canvas.width!==a&&(this.frame.canvas.width=a,i=!0),this.frame.canvas.height!==u&&(this.frame.canvas.height=u,i=!0)}return i===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(n/this.pixelRatio),oldHeight:Math.round(s/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}getContext(){return this.frame.canvas.getContext("2d")}_determinePixelRatio(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");let t=1;typeof window<"u"&&(t=window.devicePixelRatio||1);const i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/i}_setPixelRatio(){this.pixelRatio=this._determinePixelRatio()}setTransform(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}_XconvertDOMtoCanvas(e){return(e-this.body.view.translation.x)/this.body.view.scale}_XconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.x}_YconvertDOMtoCanvas(e){return(e-this.body.view.translation.y)/this.body.view.scale}_YconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.y}canvasToDOM(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}DOMtoCanvas(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}}function jre(r,e){const t=at({nodes:e,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},r??{});if(!tt(t.nodes))throw new TypeError("Nodes has to be an array of ids.");if(t.nodes.length===0&&(t.nodes=e),!(typeof t.minZoomLevel=="number"&&t.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof t.maxZoomLevel=="number"&&t.minZoomLevel<=t.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return t}class Lre{constructor(e,t){var i,n;this.body=e,this.canvas=t,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",z(i=this.fit).call(i,this)),this.body.emitter.on("animationFinished",()=>{this.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",z(n=this.releaseNode).call(n,this))}setOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}fit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;e=jre(e,this.body.nodeIndices);const i=this.canvas.frame.canvas.clientWidth,n=this.canvas.frame.canvas.clientHeight;let s,o;if(i===0||n===0)o=1,s=Lt.getRange(this.body.nodes,e.nodes);else if(t===!0){let l=0;for(const h in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,h)&&this.body.nodes[h].predefinedPosition===!0&&(l+=1);if(l>.5*this.body.nodeIndices.length){this.fit(e,!1);return}s=Lt.getRange(this.body.nodes,e.nodes),o=12.662/(this.body.nodeIndices.length+7.4147)+.0964822;const d=Math.min(i/600,n/600);o*=d}else{this.body.emitter.emit("_resizeNodes"),s=Lt.getRange(this.body.nodes,e.nodes);const l=Math.abs(s.maxX-s.minX)*1.1,c=Math.abs(s.maxY-s.minY)*1.1,d=i/l,h=n/c;o=d<=h?d:h}o>e.maxZoomLevel?o=e.maxZoomLevel:o1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){const i={x:this.body.nodes[e].x,y:this.body.nodes[e].y};t.position=i,t.lockedOnNode=e,this.moveTo(t)}else console.error("Node: "+e+" cannot be found.")}moveTo(e){if(e===void 0){e={};return}if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!rn(e.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else e.offset.x=0;if(e.offset.y!=null){if(e.offset.y=+e.offset.y,!rn(e.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else e.offset.x=0}else e.offset={x:0,y:0};if(e.position!=null){if(e.position.x!=null){if(e.position.x=+e.position.x,!rn(e.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else e.position.x=0;if(e.position.y!=null){if(e.position.y=+e.position.y,!rn(e.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else e.position.x=0}else e.position=this.getViewPosition();if(e.scale!=null){if(e.scale=+e.scale,!(e.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else e.scale=this.body.view.scale;e.animation===void 0&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),e.animation.duration===void 0&&(e.animation.duration=1e3),e.animation.easingFunction===void 0&&(e.animation.easingFunction="easeInOutQuad"),this.animateView(e)}animateView(e){if(e===void 0)return;this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),e.locked===!0&&(this.lockedOnNodeId=e.lockedOnNode,this.lockedOnNodeOffset=e.offset),this.easingTime!=0&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=e.scale,this.body.view.scale=this.targetScale;const t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:t.x-e.position.x,y:t.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var n;this.viewFunction=z(n=this._lockedRedraw).call(n,this),this.body.emitter.on("initRedraw",this.viewFunction)}else this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw");else{var s;this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=z(s=this._transitionRedraw).call(s,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}_lockedRedraw(){const e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:t.x-e.x,y:t.y-e.y},n=this.body.view.translation,s={x:n.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:n.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=s}releaseNode(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}_transitionRedraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;const t=YQ[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*t,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*t,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*t},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var i;this.viewFunction=z(i=this._lockedRedraw).call(i,this),this.body.emitter.on("initRedraw",this.viewFunction)}this.body.emitter.emit("animationFinished")}}getScale(){return this.body.view.scale}getViewPosition(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}function sB(r){var e=r&&r.preventDefault||!1,t=r&&r.container||window,i={},n={keydown:{},keyup:{}},s={},o;for(o=97;o<=122;o++)s[String.fromCharCode(o)]={code:65+(o-97),shift:!1};for(o=65;o<=90;o++)s[String.fromCharCode(o)]={code:o,shift:!0};for(o=0;o<=9;o++)s[""+o]={code:48+o,shift:!1};for(o=1;o<=12;o++)s["F"+o]={code:111+o,shift:!1};for(o=0;o<=9;o++)s["num"+o]={code:96+o,shift:!1};s["num*"]={code:106,shift:!1},s["num+"]={code:107,shift:!1},s["num-"]={code:109,shift:!1},s["num/"]={code:111,shift:!1},s["num."]={code:110,shift:!1},s.left={code:37,shift:!1},s.up={code:38,shift:!1},s.right={code:39,shift:!1},s.down={code:40,shift:!1},s.space={code:32,shift:!1},s.enter={code:13,shift:!1},s.shift={code:16,shift:void 0},s.esc={code:27,shift:!1},s.backspace={code:8,shift:!1},s.tab={code:9,shift:!1},s.ctrl={code:17,shift:!1},s.alt={code:18,shift:!1},s.delete={code:46,shift:!1},s.pageup={code:33,shift:!1},s.pagedown={code:34,shift:!1},s["="]={code:187,shift:!1},s["-"]={code:189,shift:!1},s["]"]={code:221,shift:!1},s["["]={code:219,shift:!1};var a=function(c){l(c,"keydown")},u=function(c){l(c,"keyup")},l=function(c,d){if(n[d][c.keyCode]!==void 0){for(var h=n[d][c.keyCode],f=0;f{this.activated=!0,this.configureKeyboardBindings()}),this.body.emitter.on("deactivate",()=>{this.activated=!1,this.configureKeyboardBindings()}),this.body.emitter.on("destroy",()=>{this.keycharm!==void 0&&this.keycharm.destroy()}),this.options={}}setOptions(e){e!==void 0&&(this.options=e,this.create())}create(){this.options.navigationButtons===!0?this.iconsCreated===!1&&this.loadNavigationElements():this.iconsCreated===!0&&this.cleanNavigation(),this.configureKeyboardBindings()}cleanNavigation(){if(this.navigationHammers.length!=0){for(let e=0;e{this._stopMovement()}),this.navigationHammers.push(s),this.iconsCreated=!0}bindToRedraw(e){if(this.boundFunctions[e]===void 0){var t;this.boundFunctions[e]=z(t=this[e]).call(t,this),this.body.emitter.on("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_startRendering")}}unbindFromRedraw(e){this.boundFunctions[e]!==void 0&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"),delete this.boundFunctions[e])}_fit(){new Date().valueOf()-this.touchTime>700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=new Date().valueOf())}_stopMovement(){for(const 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={}}_moveUp(){this.body.view.translation.y+=this.options.keyboard.speed.y}_moveDown(){this.body.view.translation.y-=this.options.keyboard.speed.y}_moveLeft(){this.body.view.translation.x+=this.options.keyboard.speed.x}_moveRight(){this.body.view.translation.x-=this.options.keyboard.speed.x}_zoomIn(){const e=this.body.view.scale,t=this.body.view.scale*(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,n=t/e,s=(1-n)*this.canvas.canvasViewCenter.x+i.x*n,o=(1-n)*this.canvas.canvasViewCenter.y+i.y*n;this.body.view.scale=t,this.body.view.translation={x:s,y:o},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}_zoomOut(){const e=this.body.view.scale,t=this.body.view.scale/(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,n=t/e,s=(1-n)*this.canvas.canvasViewCenter.x+i.x*n,o=(1-n)*this.canvas.canvasViewCenter.y+i.y*n;this.body.view.scale=t,this.body.view.translation={x:s,y:o},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}configureKeyboardBindings(){if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=sB({container:window,preventDefault:!0}):this.keycharm=sB({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var e,t,i,n,s,o,a,u,l,c,d,h,f,v,p,_,m,g,E,y,O,I,S,b;z(e=this.keycharm).call(e,"up",()=>{this.bindToRedraw("_moveUp")},"keydown"),z(t=this.keycharm).call(t,"down",()=>{this.bindToRedraw("_moveDown")},"keydown"),z(i=this.keycharm).call(i,"left",()=>{this.bindToRedraw("_moveLeft")},"keydown"),z(n=this.keycharm).call(n,"right",()=>{this.bindToRedraw("_moveRight")},"keydown"),z(s=this.keycharm).call(s,"=",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(o=this.keycharm).call(o,"num+",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(a=this.keycharm).call(a,"num-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(u=this.keycharm).call(u,"-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(l=this.keycharm).call(l,"[",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(c=this.keycharm).call(c,"]",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(d=this.keycharm).call(d,"pageup",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(h=this.keycharm).call(h,"pagedown",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(f=this.keycharm).call(f,"up",()=>{this.unbindFromRedraw("_moveUp")},"keyup"),z(v=this.keycharm).call(v,"down",()=>{this.unbindFromRedraw("_moveDown")},"keyup"),z(p=this.keycharm).call(p,"left",()=>{this.unbindFromRedraw("_moveLeft")},"keyup"),z(_=this.keycharm).call(_,"right",()=>{this.unbindFromRedraw("_moveRight")},"keyup"),z(m=this.keycharm).call(m,"=",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(g=this.keycharm).call(g,"num+",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(E=this.keycharm).call(E,"num-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),z(y=this.keycharm).call(y,"-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),z(O=this.keycharm).call(O,"[",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),z(I=this.keycharm).call(I,"]",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(S=this.keycharm).call(S,"pageup",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(b=this.keycharm).call(b,"pagedown",()=>{this.unbindFromRedraw("_zoomOut")},"keyup")}}}class Hre{constructor(e,t,i){var n,s,o,a,u,l,c,d,h,f,v,p,_;this.body=e,this.canvas=t,this.selectionHandler=i,this.navigationHandler=new zre(e,t),this.body.eventListeners.onTap=z(n=this.onTap).call(n,this),this.body.eventListeners.onTouch=z(s=this.onTouch).call(s,this),this.body.eventListeners.onDoubleTap=z(o=this.onDoubleTap).call(o,this),this.body.eventListeners.onHold=z(a=this.onHold).call(a,this),this.body.eventListeners.onDragStart=z(u=this.onDragStart).call(u,this),this.body.eventListeners.onDrag=z(l=this.onDrag).call(l,this),this.body.eventListeners.onDragEnd=z(c=this.onDragEnd).call(c,this),this.body.eventListeners.onMouseWheel=z(d=this.onMouseWheel).call(d,this),this.body.eventListeners.onPinch=z(h=this.onPinch).call(h,this),this.body.eventListeners.onMouseMove=z(f=this.onMouseMove).call(f,this),this.body.eventListeners.onRelease=z(v=this.onRelease).call(v,this),this.body.eventListeners.onContext=z(p=this.onContext).call(p,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=z(_=this.getPointer).call(_,this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0,autoFocus:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0,zoomSpeed:1},at(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("destroy",()=>{clearTimeout(this.popupTimer),delete this.body.functions.getPointer})}setOptions(e){e!==void 0&&(fu(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"],this.options,e),or(this.options,e,"keyboard"),e.tooltip&&(at(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=X_(e.tooltip.color)))),this.navigationHandler.setOptions(this.options)}getPointer(e){return{x:e.x-UQ(this.canvas.frame.canvas),y:e.y-VQ(this.canvas.frame.canvas)}}onTouch(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())}onTap(e){const t=this.getPointer(e.center),i=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,i),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t)}onDoubleTap(e){const t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,t)}onHold(e){const t=this.getPointer(e.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,i),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t),this.selectionHandler.generateClickEvent("hold",e,t)}onRelease(e){if(new Date().valueOf()-this.touchTime>10){const t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,t),this.touchTime=new Date().valueOf()}}onContext(e){const t=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,t)}checkSelectionChanges(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1)===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}_determineDifference(e,t){const i=function(n,s){const o=[];for(let a=0;a{const a=o.node;o.xFixed===!1&&(a.x=this.canvas._XconvertDOMtoCanvas(this.canvas._XconvertCanvasToDOM(o.x)+n)),o.yFixed===!1&&(a.y=this.canvas._YconvertDOMtoCanvas(this.canvas._YconvertCanvasToDOM(o.y)+s))}),this.body.emitter.emit("startSimulation")}else{if(e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(t.x),y:this.canvas._YconvertDOMtoCanvas(t.y)},this.body.emitter.emit("_requestRedraw")}if(this.options.dragView===!0&&!e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}const n=t.x-this.drag.pointer.x,s=t.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+n,y:this.drag.translation.y+s},this.body.emitter.emit("_requestRedraw")}}}onDragEnd(e){if(this.drag.dragging=!1,this.body.selectionBox.show){var t;this.body.selectionBox.show=!1;const i=this.body.selectionBox.position,n={minX:Math.min(i.start.x,i.end.x),minY:Math.min(i.start.y,i.end.y),maxX:Math.max(i.start.x,i.end.x),maxY:Math.max(i.start.y,i.end.y)},s=Kt(t=this.body.nodeIndices).call(t,a=>{const u=this.body.nodes[a];return u.x>=n.minX&&u.x<=n.maxX&&u.y>=n.minY&&u.y<=n.maxY});Le(s).call(s,a=>this.selectionHandler.selectObject(this.body.nodes[a]));const 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{const i=this.drag.selection;i&&i.length?(Le(i).call(i,function(n){n.node.options.fixed.x=n.xFixed,n.node.options.fixed.y=n.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"))}}onPinch(e){const t=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);const i=this.pinch.scale*e.scale;this.zoom(i,t)}zoom(e,t){if(this.options.zoomView===!0){const i=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);let n;this.drag!==void 0&&this.drag.dragging===!0&&(n=this.canvas.DOMtoCanvas(this.drag.pointer));const s=this.body.view.translation,o=e/i,a=(1-o)*t.x+s.x*o,u=(1-o)*t.y+s.y*o;if(this.body.view.scale=e,this.body.view.translation={x:a,y:u},n!=null){const l=this.canvas.canvasToDOM(n);this.drag.pointer.x=l.x,this.drag.pointer.y=l.y}this.body.emitter.emit("_requestRedraw"),ithis._checkShowPopup(t),this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(e,t)}_checkShowPopup(e){const t=this.canvas._XconvertDOMtoCanvas(e.x),i=this.canvas._YconvertDOMtoCanvas(e.y),n={left:t,top:i,right:t,bottom:i},s=this.popupObj===void 0?void 0:this.popupObj.id;let o=!1,a="node";if(this.popupObj===void 0){const u=this.body.nodeIndices,l=this.body.nodes;let c;const d=[];for(let h=0;h0&&(this.popupObj=l[d[d.length-1]],o=!0)}if(this.popupObj===void 0&&o===!1){const u=this.body.edgeIndices,l=this.body.edges;let c;const d=[];for(let h=0;h0&&(this.popupObj=l[d[d.length-1]],a="edge")}this.popupObj!==void 0?this.popupObj.id!==s&&(this.popup===void 0&&(this.popup=new iZ(this.canvas.frame)),this.popup.popupTargetType=a,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}_checkHidePopup(e){const t=this.selectionHandler._pointerToPositionObject(e);let i=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t),i===!0)){const n=this.selectionHandler.getNodeAt(e);i=n===void 0?!1:n.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));i===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}var oB={},aB={},uB;function Wre(){if(uB)return aB;uB=1;var r=O0(),e=R5();return r("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),aB}var lB;function Ure(){return lB||(lB=1,Wre()),oB}var cB={},D1,dB;function Fn(){if(dB)return D1;dB=1;var r=Fs(),e=TypeError;return D1=function(t){if(typeof t=="object"&&"size"in t&&"has"in t&&"add"in t&&"delete"in t&&"keys"in t)return t;throw new e(r(t)+" is not a set")},D1}var A1,hB;function kn(){if(hB)return A1;hB=1;var r=nr(),e=C5(),t=r("Set"),i=t.prototype;return A1={Set:t,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:i},A1}var M1,fB;function Bn(){if(fB)return M1;fB=1;var r=Qt();return M1=function(e,t,i){for(var n=i?e:e.iterator,s=e.next,o,a;!(o=r(s,n)).done;)if(a=t(o.value),a!==void 0)return a},M1}var N1,vB;function $a(){if(vB)return N1;vB=1;var r=Bn();return N1=function(e,t,i){return i?r(e.keys(),t,!0):e.forEach(t)},N1}var F1,pB;function x0(){if(pB)return F1;pB=1;var r=kn(),e=$a(),t=r.Set,i=r.add;return F1=function(n){var s=new t;return e(n,function(o){i(s,o)}),s},F1}var k1,gB;function Pa(){return gB||(gB=1,k1=function(r){return r.size}),k1}var B1,mB;function Vre(){return mB||(mB=1,B1=function(r){return{iterator:r,next:r.next,done:!1}}),B1}var j1,yB;function jn(){if(yB)return j1;yB=1;var r=hi(),e=zr(),t=Qt(),i=Ls(),n=Vre(),s="Invalid size",o=RangeError,a=TypeError,u=Math.max,l=function(c,d){this.set=c,this.size=u(d,0),this.has=r(c.has),this.keys=r(c.keys)};return l.prototype={getIterator:function(){return n(e(t(this.keys,this.set)))},includes:function(c){return t(this.has,this.set,c)}},j1=function(c){e(c);var d=+c.size;if(d!==d)throw new a(s);var h=i(d);if(h<0)throw new o(s);return new l(c,h)},j1}var L1,bB;function Kre(){if(bB)return L1;bB=1;var r=Fn(),e=kn(),t=x0(),i=Pa(),n=jn(),s=$a(),o=Bn(),a=e.has,u=e.remove;return L1=function(c){var d=r(this),h=n(c),f=t(d);return i(d)<=h.size?s(d,function(v){h.includes(v)&&u(f,v)}):o(h.getIterator(),function(v){a(f,v)&&u(f,v)}),f},L1}var z1,_B;function Ln(){return _B||(_B=1,z1=function(){return!1}),z1}var wB;function Gre(){if(wB)return cB;wB=1;var r=de(),e=Kre(),t=$e(),i=Ln(),n=!i("difference",function(o){return o.size===0}),s=n||t(function(){var o={size:1,has:function(){return!0},keys:function(){var u=0;return{next:function(){var l=u++>1;return a.has(1)&&a.clear(),{done:l,value:2}}}}},a=new Set([1,2,3,4]);return a.difference(o).size!==3});return r({target:"Set",proto:!0,real:!0,forced:s},{difference:e}),cB}var EB={},H1,SB;function Yre(){if(SB)return H1;SB=1;var r=Fn(),e=kn(),t=Pa(),i=jn(),n=$a(),s=Bn(),o=e.Set,a=e.add,u=e.has;return H1=function(c){var d=r(this),h=i(c),f=new o;return t(d)>h.size?s(h.getIterator(),function(v){u(d,v)&&a(f,v)}):n(d,function(v){h.includes(v)&&a(f,v)}),f},H1}var OB;function Xre(){if(OB)return EB;OB=1;var r=de(),e=$e(),t=Yre(),i=Ln(),n=!i("intersection",function(s){return s.size===2&&s.has(1)&&s.has(2)})||e(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});return r({target:"Set",proto:!0,real:!0,forced:n},{intersection:t}),EB}var IB={},W1,TB;function Jre(){if(TB)return W1;TB=1;var r=Fn(),e=kn().has,t=Pa(),i=jn(),n=$a(),s=Bn(),o=E0();return W1=function(u){var l=r(this),c=i(u);if(t(l)<=c.size)return n(l,function(h){if(c.includes(h))return!1},!0)!==!1;var d=c.getIterator();return s(d,function(h){if(e(l,h))return o(d,"normal",!1)})!==!1},W1}var $B;function Qre(){if($B)return IB;$B=1;var r=de(),e=Jre(),t=Ln(),i=!t("isDisjointFrom",function(n){return!n});return r({target:"Set",proto:!0,real:!0,forced:i},{isDisjointFrom:e}),IB}var PB={},U1,RB;function Zre(){if(RB)return U1;RB=1;var r=Fn(),e=Pa(),t=$a(),i=jn();return U1=function(s){var o=r(this),a=i(s);return e(o)>a.size?!1:t(o,function(u){if(!a.includes(u))return!1},!0)!==!1},U1}var CB;function eie(){if(CB)return PB;CB=1;var r=de(),e=Zre(),t=Ln(),i=!t("isSubsetOf",function(n){return n});return r({target:"Set",proto:!0,real:!0,forced:i},{isSubsetOf:e}),PB}var xB={},V1,qB;function tie(){if(qB)return V1;qB=1;var r=Fn(),e=kn().has,t=Pa(),i=jn(),n=Bn(),s=E0();return V1=function(a){var u=r(this),l=i(a);if(t(u)0&&arguments[0]!==void 0?arguments[0]:()=>{};Io(this,Yi,new ZB),Io(this,Xi,new ZB),Io(this,i_,void 0),rw(i_,this,e)}get sizeNodes(){return We(Yi,this).size}get sizeEdges(){return We(Xi,this).size}getNodes(){return We(Yi,this).getSelection()}getEdges(){return We(Xi,this).getSelection()}addNodes(){We(Yi,this).add(...arguments)}addEdges(){We(Xi,this).add(...arguments)}deleteNodes(e){We(Yi,this).delete(e)}deleteEdges(e){We(Xi,this).delete(e)}clear(){We(Yi,this).clear(),We(Xi,this).clear()}commit(){const e={nodes:We(Yi,this).commit(),edges:We(Xi,this).commit()};for(var t=arguments.length,i=new Array(t),n=0;n{this.updateSelection()})}setOptions(e){e!==void 0&&Ys(["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"],this.options,e)}selectOnPoint(e){let t=!1;if(this.options.selectable===!0){const i=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),i!==void 0&&(t=this.selectObject(i)),this.body.emitter.emit("_requestRedraw")}return t}selectAdditionalOnPoint(e){let t=!1;if(this.options.selectable===!0){const i=this.getNodeAt(e)||this.getEdgeAt(e);i!==void 0&&(t=!0,i.isSelected()===!0?this.deselectObject(i):this.selectObject(i),this.body.emitter.emit("_requestRedraw"))}return t}_initBaseEvent(e,t){const i={};return i.pointer={DOM:{x:t.x,y:t.y},canvas:this.canvas.DOMtoCanvas(t)},i.event=e,i}generateClickEvent(e,t,i,n){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;const o=this._initBaseEvent(t,i);if(s===!0)o.nodes=[],o.edges=[];else{const a=this.getSelection();o.nodes=a.nodes,o.edges=a.edges}n!==void 0&&(o.previousSelection=n),e=="click"&&(o.items=this.getClickedItems(i)),t.controlEdge!==void 0&&(o.controlEdge=t.controlEdge),this.body.emitter.emit(e,o)}selectObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;return e!==void 0?(e instanceof Ke?(t===!0&&this._selectionAccumulator.addEdges(...e.edges),this._selectionAccumulator.addNodes(e)):this._selectionAccumulator.addEdges(e),!0):!1}deselectObject(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}_getAllNodesOverlappingWith(e){const t=[],i=this.body.nodes;for(let n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;const i=this._pointerToPositionObject(e),n=this._getAllNodesOverlappingWith(i);if(n.length>0)return t===!0?this.body.nodes[n[n.length-1]]:n[n.length-1]}_getEdgesOverlappingWith(e,t){const i=this.body.edges;for(let n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;const i=this.canvas.DOMtoCanvas(e);let n=10,s=null;const o=this.body.edges;for(let a=0;a0&&(this.generateClickEvent("deselectEdge",t,e,s),i=!0),n.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",t,e,s),i=!0),n.nodes.added.length>0&&(this.generateClickEvent("selectNode",t,e),i=!0),n.edges.added.length>0&&(this.generateClickEvent("selectEdge",t,e),i=!0),i===!0&&this.generateClickEvent("select",t,e)}getSelection(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}getSelectedNodes(){return this._selectionAccumulator.getNodes()}getSelectedEdges(){return this._selectionAccumulator.getEdges()}getSelectedNodeIds(){var e;return ys(e=this._selectionAccumulator.getNodes()).call(e,t=>t.id)}getSelectedEdgeIds(){var e;return ys(e=this._selectionAccumulator.getEdges()).call(e,t=>t.id)}setSelection(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((t.unselectAll||t.unselectAll===void 0)&&this.unselectAll(),e.nodes)for(const i of e.nodes){const n=this.body.nodes[i];if(!n)throw new RangeError('Node with id "'+i+'" not found');this.selectObject(n,t.highlightEdges)}if(e.edges)for(const i of e.edges){const n=this.body.edges[i];if(!n)throw new RangeError('Edge with id "'+i+'" not found');this.selectObject(n)}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}selectNodes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({nodes:e},{highlightEdges:t})}selectEdges(e){if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({edges:e})}updateSelection(){for(const e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(const e in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,e.id)||this._selectionAccumulator.deleteEdges(e)}getClickedItems(e){const t=this.canvas.DOMtoCanvas(e),i=[],n=this.body.nodeIndices,s=this.body.nodes;for(let u=n.length-1;u>=0;u--){const c=s[n[u]].getItemsOnPoint(t);i.push.apply(i,c)}const o=this.body.edgeIndices,a=this.body.edges;for(let u=o.length-1;u>=0;u--){const c=a[o[u]].getItemsOnPoint(t);i.push.apply(i,c)}return i}}var ej={},n_,tj;function wie(){if(tj)return n_;tj=1;var r=zs(),e=Math.floor,t=function(i,n){var s=i.length;if(s<8)for(var o=1,a,u;o0;)i[u]=i[--u];u!==o++&&(i[u]=a)}else for(var l=e(s/2),c=t(r(i,0,l),n),d=t(r(i,l),n),h=c.length,f=d.length,v=0,p=0;v3)){if(d)return!0;if(f)return f<603;var S="",b,w,T,R;for(b=65;b<76;b++){switch(w=String.fromCharCode(b),b){case 66:case 69:case 70:case 72:T=3;break;case 68:case 71:T=4;break;default:T=2}for(R=0;R<47;R++)v.push({k:w+R,v:T})}for(v.sort(function(x,C){return C.v-x.v}),R=0;Ro(w)?1:-1}};return r({target:"Array",proto:!0,forced:O},{sort:function(b){b!==void 0&&t(b);var w=i(this);if(y)return b===void 0?p(w):p(w,b);var T=[],R=n(w),x,C;for(C=0;C=0:v>p;p+=_)p in f&&(d=l(d,f[p],p,h));return d}};return h_={left:o(!1),right:o(!0)},h_}var f_,hj;function qie(){if(hj)return f_;hj=1;var r=z3();return f_=r==="NODE",f_}var fj;function Die(){if(fj)return cj;fj=1;var r=de(),e=xie().left,t=Ks(),i=fa(),n=qie(),s=!n&&i>79&&i<83,o=s||!t("reduce");return r({target:"Array",proto:!0,forced:o},{reduce:function(u){var l=arguments.length;return e(this,u,l,l>1?arguments[1]:void 0)}}),cj}var v_,vj;function Aie(){if(vj)return v_;vj=1,Die();var r=Rt();return v_=r("Array","reduce"),v_}var p_,pj;function Mie(){if(pj)return p_;pj=1;var r=ht(),e=Aie(),t=Array.prototype;return p_=function(i){var n=i.reduce;return i===t||r(t,i)&&n===t.reduce?e:n},p_}var g_,gj;function Nie(){if(gj)return g_;gj=1;var r=Mie();return g_=r,g_}var m_,mj;function Fie(){return mj||(mj=1,m_=Nie()),m_}var kie=Fie(),H5=pe(kie);class W5{abstract(){throw new Error("Can't instantiate abstract class!")}fake_use(){}curveType(){return this.abstract()}getPosition(e){return this.fake_use(e),this.abstract()}setPosition(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,t,i),this.abstract()}getTreeSize(e){return this.fake_use(e),this.abstract()}sort(e){this.fake_use(e),this.abstract()}fix(e,t){this.fake_use(e,t),this.abstract()}shift(e,t){this.fake_use(e,t),this.abstract()}}class Bie extends W5{constructor(e){super(),this.layout=e}curveType(){return"horizontal"}getPosition(e){return e.x}setPosition(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;i!==void 0&&this.layout.hierarchical.addToOrdering(e,i),e.x=t}getTreeSize(e){const t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_x,max:t.max_x}}sort(e){ds(e).call(e,function(t,i){return t.x-i.x})}fix(e,t){e.y=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.y=!0}shift(e,t){this.layout.body.nodes[e].x+=t}}class jie extends W5{constructor(e){super(),this.layout=e}curveType(){return"vertical"}getPosition(e){return e.y}setPosition(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;i!==void 0&&this.layout.hierarchical.addToOrdering(e,i),e.y=t}getTreeSize(e){const t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_y,max:t.max_y}}sort(e){ds(e).call(e,function(t,i){return t.y-i.y})}fix(e,t){e.x=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.x=!0}shift(e,t){this.layout.body.nodes[e].y+=t}}var yj={},bj;function Lie(){if(bj)return yj;bj=1;var r=de(),e=Wi().every,t=Ks(),i=t("every");return r({target:"Array",proto:!0,forced:!i},{every:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),yj}var y_,_j;function zie(){if(_j)return y_;_j=1,Lie();var r=Rt();return y_=r("Array","every"),y_}var b_,wj;function Hie(){if(wj)return b_;wj=1;var r=ht(),e=zie(),t=Array.prototype;return b_=function(i){var n=i.every;return i===t||r(t,i)&&n===t.every?e:n},b_}var __,Ej;function Wie(){if(Ej)return __;Ej=1;var r=Hie();return __=r,__}var w_,Sj;function Uie(){return Sj||(Sj=1,w_=Wie()),w_}var Vie=Uie(),U5=pe(Vie);function Kie(r,e){const t=new Ei;return Le(r).call(r,i=>{var n;Le(n=i.edges).call(n,s=>{s.connected&&t.add(s)})}),Le(t).call(t,i=>{const n=i.from.id,s=i.to.id;e[n]==null&&(e[n]=0),(e[s]==null||e[n]>=e[s])&&(e[s]=e[n]+1)}),e}function Gie(r){return V5(e=>{var t,i;return U5(t=Kt(i=e.edges).call(i,n=>r.has(n.toId))).call(t,n=>n.to===e)},(e,t)=>t>e,"from",r)}function Yie(r){return V5(e=>{var t,i;return U5(t=Kt(i=e.edges).call(i,n=>r.has(n.toId))).call(t,n=>n.from===e)},(e,t)=>td+1+h.edges.length,0),a=t+"Id",u=t==="to"?1:-1;for(const[d,h]of i){if(!i.has(d)||!r(h))continue;s[d]=0;const f=[h];let v=0,p;for(;p=f.pop();){var l,c;if(!i.has(d))continue;const _=s[p.id]+u;if(Le(l=Kt(c=p.edges).call(c,m=>m.connected&&m.to!==m.from&&m[t]!==p&&i.has(m.toId)&&i.has(m.fromId))).call(l,m=>{const g=m[a],E=s[g];(E==null||e(_,E))&&(s[g]=_,f.push(m[t]))}),v>o)return Kie(i,s);++v}}return s}class Xie{constructor(){this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}addRelation(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)}checkIfTree(){for(const e in this.parentReference)if(this.parentReference[e].length>1){this.isTree=!1;return}this.isTree=!0}numTrees(){return this.treeIndex+1}setTreeIndex(e,t){t!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=t,this.treeIndex=Math.max(t,this.treeIndex))}ensureLevel(e){this.levels[e]===void 0&&(this.levels[e]=0)}getMaxLevel(e){const t={},i=n=>{if(t[n]!==void 0)return t[n];let s=this.levels[n];if(this.childrenReference[n]){const o=this.childrenReference[n];if(o.length>0)for(let a=0;as-o);for(const s of n)t.set(s,i++);for(const s in this.levels)Object.prototype.hasOwnProperty.call(this.levels,s)&&(this.levels[s]=t.get(this.levels[s]))}getTreeSize(e,t){let i=1e9,n=-1e9,s=1e9,o=-1e9;for(const a in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,a)&&this.trees[a]===t){const u=e[a];i=Math.min(u.x,i),n=Math.max(u.x,n),s=Math.min(u.y,s),o=Math.max(u.y,o)}return{min_x:i,max_x:n,min_y:s,max_y:o}}hasSameParent(e,t){const i=this.parentReference[e.id],n=this.parentReference[t.id];if(i===void 0||n===void 0)return!1;for(let s=0;s{this.setupHierarchicalLayout()}),this.body.emitter.on("_dataLoaded",()=>{this.layoutNetwork()}),this.body.emitter.on("_resetHierarchicalLayout",()=>{this.setupHierarchicalLayout()}),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",()=>{if(this.options.hierarchical.enabled!==!0)return;const e=this.direction.curveType();this.body.emitter.emit("_forceDisableDynamicCurves",e,!1)})}setOptions(e,t){if(e!==void 0){const i=this.options.hierarchical,n=i.enabled;if(Ys(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),or(this.options,e,"hierarchical"),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),i.enabled===!0)return n===!0&&this.body.emitter.emit("refresh",!0),i.direction==="RL"||i.direction==="DU"?i.levelSeparation>0&&(i.levelSeparation*=-1):i.levelSeparation<0&&(i.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(n===!0)return this.body.emitter.emit("refresh"),Ue(t,this.optionsBackup)}return t}_resetRNG(e){this.initialRandomSeed=e,this._rng=ul(this.initialRandomSeed)}adaptAllOptionsForHierarchicalLayout(e){if(this.options.hierarchical.enabled===!0){const t=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:t.enabled===void 0?!0:t.enabled,solver:"hierarchicalRepulsion"},t.enabled=t.enabled===void 0?!0:t.enabled,t.solver=t.solver||"barnesHut"):typeof e.physics=="object"?(t.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,t.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(t.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});let i=this.direction.curveType();if(e.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1};else if(e.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1;else if(typeof e.edges.smooth=="boolean")this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:i};else{const n=e.edges.smooth;n.type!==void 0&&n.type!=="dynamic"&&(i=n.type),this.optionsBackup.edges={smooth:{enabled:n.enabled===void 0?!0:n.enabled,type:n.type===void 0?"dynamic":n.type,roundness:n.roundness===void 0?.5:n.roundness,forceDirection:n.forceDirection===void 0?!1:n.forceDirection}},e.edges.smooth={enabled:n.enabled===void 0?!0:n.enabled,type:i,roundness:n.roundness===void 0?.5:n.roundness,forceDirection:n.forceDirection===void 0?!1:n.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",i)}return e}positionInitially(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);const t=e.length+50;for(let i=0;is){const u=e.length;for(;e.length>s&&n<=10;){n+=1;const l=e.length;n%3===0?this.body.modules.clustering.clusterBridges(o):this.body.modules.clustering.clusterOutliers(o);const c=e.length;if(l==c&&n%3!==0){this._declusterAll(),this.body.emitter.emit("_layoutFailed"),console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.");return}}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*u)})}n>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();const a=70;for(let u=0;u0){let e,t,i=!1,n=!1;this.lastNodeOnLevel={},this.hierarchical=new Xie;for(t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&(e=this.body.nodes[t],e.options.level!==void 0?(i=!0,this.hierarchical.levels[t]=e.options.level):n=!0);if(n===!0&&i===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");{if(n===!0){const o=this.options.hierarchical.sortMethod;o==="hubsize"?this._determineLevelsByHubsize():o==="directed"?this._determineLevelsDirected():o==="custom"&&this._determineLevelsCustomCallback()}for(const o in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,o)&&this.hierarchical.ensureLevel(o);const s=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(s),this._condenseHierarchy(),this._shiftToCenter()}}}_condenseHierarchy(){var e=this;let t=!1;const i={},n=()=>{const m=o();let g=0;for(let E=0;E{const E=this.hierarchical.trees;for(const y in E)Object.prototype.hasOwnProperty.call(E,y)&&E[y]===m&&this.direction.shift(y,g)},o=()=>{const m=[];for(let g=0;g{if(!g[m.id]&&(g[m.id]=!0,this.hierarchical.childrenReference[m.id])){const E=this.hierarchical.childrenReference[m.id];if(E.length>0)for(let y=0;y1&&arguments[1]!==void 0?arguments[1]:1e9,E=1e9,y=1e9,O=1e9,I=-1e9;for(const S in m)if(Object.prototype.hasOwnProperty.call(m,S)){const b=e.body.nodes[S],w=e.hierarchical.levels[b.id],T=e.direction.getPosition(b),[R,x]=e._getSpaceAroundNode(b,m);E=Math.min(R,E),y=Math.min(x,y),w<=g&&(O=Math.min(T,O),I=Math.max(T,I))}return[O,I,E,y]},l=(m,g)=>{const E=this.hierarchical.getMaxLevel(m.id),y=this.hierarchical.getMaxLevel(g.id);return Math.min(E,y)},c=(m,g,E)=>{const y=this.hierarchical;for(let O=0;O1)for(let b=0;b2&&arguments[2]!==void 0?arguments[2]:!1;const y=e.direction.getPosition(m),O=e.direction.getPosition(g),I=Math.abs(O-y),S=e.options.hierarchical.nodeSpacing;if(I>S){const b={},w={};a(m,b),a(g,w);const T=l(m,g),R=u(b,T),x=u(w,T),C=R[1],D=x[0],j=x[2];if(Math.abs(C-D)>S){let H=C-D+S;H<-j+S&&(H=-j+S),H<0&&(e._shiftBlock(g.id,H),t=!0,E===!0&&e._centerParent(g))}}},h=(m,g)=>{const E=g.id,y=g.edges,O=this.hierarchical.levels[g.id],I=this.options.hierarchical.levelSeparation*this.options.hierarchical.levelSeparation,S={},b=[];for(let j=0;j{let H=0;for(let ee=0;ee{let H=0;for(let ee=0;ee{let H=this.direction.getPosition(g);const ee={};for(let ve=0;ve{const te=this.direction.getPosition(g);if(i[g.id]===void 0){const me={};a(g,me),i[g.id]=me}const H=u(i[g.id]),ee=H[2],ve=H[3],we=j-te;let re=0;we>0?re=Math.min(we,ve-this.options.hierarchical.nodeSpacing):we<0&&(re=-Math.min(-we,ee-this.options.hierarchical.nodeSpacing)),re!=0&&(this._shiftBlock(g.id,re),t=!0)},C=j=>{const te=this.direction.getPosition(g),[H,ee]=this._getSpaceAroundNode(g),ve=j-te;let we=te;ve>0?we=Math.min(te+(ee-this.options.hierarchical.nodeSpacing),j):ve<0&&(we=Math.max(te-(H-this.options.hierarchical.nodeSpacing),j)),we!==te&&(this.direction.setPosition(g,we),t=!0)};let D=R(m,b);x(D),D=R(m,y),C(D)},f=m=>{let g=this.hierarchical.getLevels();g=an(g).call(g);for(let E=0;E{let g=this.hierarchical.getLevels();g=an(g).call(g);for(let E=0;E{for(const m in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,m)&&this._centerParent(this.body.nodes[m])},_=()=>{let m=this.hierarchical.getLevels();m=an(m).call(m);for(let g=0;g0&&Math.abs(d)0&&(l=this.direction.getPosition(n[o-1])+u),this.direction.setPosition(a,l,i),this._validatePositionAndContinue(a,i,l),s++}}}}_placeBranchNodes(e,t){var i;const n=this.hierarchical.childrenReference[e];if(n===void 0)return;const s=[];for(let a=0;at&&this.positionedNodes[u.id]===void 0){const c=this.options.hierarchical.nodeSpacing;let d;a===0?d=this.direction.getPosition(this.body.nodes[e]):d=this.direction.getPosition(s[a-1])+c,this.direction.setPosition(u,d,l),this._validatePositionAndContinue(u,l,d)}else return}const o=this._getCenterPosition(s);this.direction.setPosition(this.body.nodes[e],o,t)}_validatePositionAndContinue(e,t,i){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[t]!==void 0){const n=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(i-n{var n;Fe(n=this.body.edgeIndices).call(n,i.id)!==-1&&t.push(i)}),t}_getHubSizes(){const e={},t=this.body.nodeIndices;Ie(t,n=>{const s=this.body.nodes[n],o=this._getActiveEdges(s).length;e[o]=!0});const i=[];return Ie(e,n=>{i.push(Number(n))}),ds(i).call(i,function(n,s){return s-n}),i}_determineLevelsByHubsize(){const e=(i,n)=>{this.hierarchical.levelDownstream(i,n)},t=this._getHubSizes();for(let i=0;i{const o=this.body.nodes[s];n===this._getActiveEdges(o).length&&this._crawlNetwork(e,s)})}}_determineLevelsCustomCallback(){const t=function(n,s,o){},i=(n,s,o)=>{let a=this.hierarchical.levels[n.id];a===void 0&&(a=this.hierarchical.levels[n.id]=1e5);const u=t(Lt.cloneOptions(n,"node"),Lt.cloneOptions(s,"node"),Lt.cloneOptions(o,"edge"));this.hierarchical.levels[s.id]=a+u};this._crawlNetwork(i),this.hierarchical.setMinLevelToZero()}_determineLevelsDirected(){var e;const t=H5(e=this.body.nodeIndices).call(e,(i,n)=>(i.set(n,this.body.nodes[n]),i),new $0);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=Yie(t):this.hierarchical.levels=Gie(t),this.hierarchical.setMinLevelToZero()}_generateMap(){const e=(t,i)=>{this.hierarchical.levels[i.id]>this.hierarchical.levels[t.id]&&this.hierarchical.addRelation(t.id,i.id)};this._crawlNetwork(e),this.hierarchical.checkIfTree()}_crawlNetwork(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},t=arguments.length>1?arguments[1]:void 0;const i={},n=(s,o)=>{if(i[s.id]===void 0){this.hierarchical.setTreeIndex(s,o),i[s.id]=!0;let a;const u=this._getActiveEdges(s);for(let l=0;l{if(i[s])return;i[s]=!0,this.direction.shift(s,t);const o=this.hierarchical.childrenReference[s];if(o!==void 0)for(let a=0;a{const u=this.hierarchical.parentReference[a];if(u!==void 0)for(let l=0;l{const u=this.hierarchical.parentReference[a];if(u!==void 0)for(let l=0;l{this._clean()}),this.body.emitter.on("_dataChanged",z(s=this._restore).call(s,this)),this.body.emitter.on("_resetData",z(o=this._restore).call(o,this))}_restore(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}setOptions(e,t,i){t!==void 0&&(t.locale!==void 0?this.options.locale=t.locale:this.options.locale=i.locale,t.locales!==void 0?this.options.locales=t.locales:this.options.locales=i.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,Ue(this.options,e)),this.options.initiallyActive===!0&&(this.editMode=!0),this._setup())}toggleEditMode(){this.editMode===!0?this.disableEditMode():this.enableEditMode()}enableEditMode(){this.editMode=!0,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}disableEditMode(){this.editMode=!1,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}showManipulatorToolbar(){if(this._clean(),this.manipulationDOM={},this.guiEnabled===!0){var e,t;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";const i=this.selectionHandler.getSelectedNodeCount(),n=this.selectionHandler.getSelectedEdgeCount(),s=i+n,o=this.options.locales[this.options.locale];let a=!1;this.options.addNode!==!1&&(this._createAddNodeButton(o),a=!0),this.options.addEdge!==!1&&(a===!0?this._createSeperator(1):a=!0,this._createAddEdgeButton(o)),i===1&&typeof this.options.editNode=="function"?(a===!0?this._createSeperator(2):a=!0,this._createEditNodeButton(o)):n===1&&i===0&&this.options.editEdge!==!1&&(a===!0?this._createSeperator(3):a=!0,this._createEditEdgeButton(o)),s!==0&&(i>0&&this.options.deleteNode!==!1?(a===!0&&this._createSeperator(4),this._createDeleteButton(o)):i===0&&this.options.deleteEdge!==!1&&(a===!0&&this._createSeperator(4),this._createDeleteButton(o))),this._bindElementEvents(this.closeDiv,z(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",z(t=this.showManipulatorToolbar).call(t,this))}this.body.emitter.emit("_redraw")}addNodeMode(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var t;const i=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(i),this._createSeperator(),this._createDescription(i.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,z(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent("click",z(e=this._performAddNode).call(e,this))}editNode(){this.editMode!==!0&&this.enableEditMode(),this._clean();const e=this.selectionHandler.getSelectedNodes()[0];if(e!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(e.isCluster!==!0){const t=Ue({},e.options,!1);if(t.x=e.x,t.y=e.y,this.options.editNode.length===2)this.options.editNode(t,i=>{i!=null&&this.inMode==="editNode"&&this.body.data.nodes.getDataSet().update(i),this.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}addEdgeMode(){var e,t,i,n,s;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var o;const a=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(a),this._createSeperator(),this._createDescription(a.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,z(o=this.toggleEditMode).call(o,this))}this._temporaryBindUI("onTouch",z(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",z(t=this._finishConnect).call(t,this)),this._temporaryBindUI("onDrag",z(i=this._dragControlNode).call(i,this)),this._temporaryBindUI("onRelease",z(n=this._finishConnect).call(n,this)),this._temporaryBindUI("onDragStart",z(s=this._dragStartEdge).call(s,this)),this._temporaryBindUI("onHold",()=>{})}editEdgeMode(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",typeof this.options.editEdge=="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){const o=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(o.from.id,o.to.id);return}if(this.guiEnabled===!0){var e;const o=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(o),this._createSeperator(),this._createDescription(o.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,z(e=this.toggleEditMode).call(e,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var t,i,n,s;const o=this.body.edges[this.edgeBeingEditedId],a=this._getNewTargetNode(o.from.x,o.from.y),u=this._getNewTargetNode(o.to.x,o.to.y);this.temporaryIds.nodes.push(a.id),this.temporaryIds.nodes.push(u.id),this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id),this.body.nodes[u.id]=u,this.body.nodeIndices.push(u.id),this._temporaryBindUI("onTouch",z(t=this._controlNodeTouch).call(t,this)),this._temporaryBindUI("onTap",()=>{}),this._temporaryBindUI("onHold",()=>{}),this._temporaryBindUI("onDragStart",z(i=this._controlNodeDragStart).call(i,this)),this._temporaryBindUI("onDrag",z(n=this._controlNodeDrag).call(n,this)),this._temporaryBindUI("onDragEnd",z(s=this._controlNodeDragEnd).call(s,this)),this._temporaryBindUI("onMouseMove",()=>{}),this._temporaryBindEvent("beforeDrawing",l=>{const c=o.edgeType.findBorderPositions(l);a.selected===!1&&(a.x=c.from.x,a.y=c.from.y),u.selected===!1&&(u.x=c.to.x,u.y=c.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}deleteSelected(){this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";const e=this.selectionHandler.getSelectedNodeIds(),t=this.selectionHandler.getSelectedEdgeIds();let i;if(e.length>0){for(let n=0;n0&&typeof this.options.deleteEdge=="function"&&(i=this.options.deleteEdge);if(typeof i=="function"){const n={nodes:e,edges:t};if(i.length===2)i(n,s=>{s!=null&&this.inMode==="delete"?(this.body.data.edges.getDataSet().remove(s.edges),this.body.data.nodes.getDataSet().remove(s.nodes),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()):(this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(t),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}_setup(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}_createWrappers(){if(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0){var e,t;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(t=this.options.locales[this.options.locale])===null||t===void 0?void 0:t.close)!==null&&e!==void 0?e:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}_getNewTargetNode(e,t){const i=Ue({},this.options.controlNodeStyle);i.id="targetNode"+Oo(),i.hidden=!1,i.physics=!1,i.x=e,i.y=t;const n=this.body.functions.createNode(i);return n.shape.boundingBox={left:e,right:e,top:t,bottom:t},n}_createEditButton(){var e;this._clean(),this.manipulationDOM={},_i(this.editModeDiv);const t=this.options.locales[this.options.locale],i=this._createButton("editMode","vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(i),this._bindElementEvents(i,z(e=this.toggleEditMode).call(e,this))}_clean(){this.inMode=!1,this.guiEnabled===!0&&(_i(this.editModeDiv),_i(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}_cleanupDOMEventListeners(){for(const t of ei(e=this._domEventListenerCleanupQueue).call(e,0)){var e;t()}}_removeManipulationDOM(){this._clean(),_i(this.manipulationDiv),_i(this.editModeDiv),_i(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}_createSeperator(){let 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])}_createAddNodeButton(e){var t;const i=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.addNodeMode).call(t,this))}_createAddEdgeButton(e){var t;const i=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.addEdgeMode).call(t,this))}_createEditNodeButton(e){var t;const i=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.editNode).call(t,this))}_createEditEdgeButton(e){var t;const i=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.editEdgeMode).call(t,this))}_createDeleteButton(e){var t;let i;this.options.rtl?i="vis-delete-rtl":i="vis-delete";const n=this._createButton("delete",i,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,z(t=this.deleteSelected).call(t,this))}_createBackButton(e){var t;const i=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.showManipulatorToolbar).call(t,this))}_createButton(e,t,i){let n=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=n,this.manipulationDOM[e+"Label"].innerText=i,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}_createDescription(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}_temporaryBindEvent(e,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}_temporaryBindUI(e,t){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+_a(et(this.body.eventListeners)))}_unbindTemporaryUIs(){for(const e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}_unbindTemporaryEvents(){for(let e=0;e{i.destroy()});const n=s=>{let{keyCode:o,key:a}=s;(a==="Enter"||a===" "||o===13||o===32)&&t()};e.addEventListener("keyup",n,!1),this._domEventListenerCleanupQueue.push(()=>{e.removeEventListener("keyup",n,!1)})}_cleanupTemporaryNodesAndEdges(){for(let s=0;s=0;a--)if(s[a]!==this.selectedControlNode.id){o=this.body.nodes[s[a]];break}if(o!==void 0&&this.selectedControlNode!==void 0)if(o.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(o.id,n.to.id):this._performEditEdge(n.from.id,o.id)}else n.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}_handleConnect(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=at({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;const t=this.lastTouch,i=this.selectionHandler.getNodeAt(t);if(i!==void 0)if(i.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const n=this._getNewTargetNode(i.x,i.y);this.body.nodes[n.id]=n,this.body.nodeIndices.push(n.id);const s=this.body.functions.createEdge({id:"connectionEdge"+Oo(),from:i.id,to:n.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[s.id]=s,this.body.edgeIndices.push(s.id),this.temporaryIds.nodes.push(n.id),this.temporaryIds.edges.push(s.id)}this.touchTime=new Date().valueOf()}}_dragControlNode(e){const t=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(t);let n;this.temporaryIds.edges[0]!==void 0&&(n=this.body.edges[this.temporaryIds.edges[0]].fromId);const s=this.selectionHandler._getAllNodesOverlappingWith(i);let o;for(let u=s.length-1;u>=0;u--){var a;if(Fe(a=this.temporaryIds.nodes).call(a,s[u])===-1){o=this.body.nodes[s[u]];break}}if(e.controlEdge={from:n,to:o?o.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,t),this.temporaryIds.nodes[0]!==void 0){const u=this.body.nodes[this.temporaryIds.nodes[0]];u.x=this.canvas._XconvertDOMtoCanvas(t.x),u.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}_finishConnect(e){const t=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(t);let n;this.temporaryIds.edges[0]!==void 0&&(n=this.body.edges[this.temporaryIds.edges[0]].fromId);const s=this.selectionHandler._getAllNodesOverlappingWith(i);let o;for(let u=s.length-1;u>=0;u--){var a;if(Fe(a=this.temporaryIds.nodes).call(a,s[u])===-1){o=this.body.nodes[s[u]];break}}this._cleanupTemporaryNodesAndEdges(),o!==void 0&&(o.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[n]!==void 0&&this.body.nodes[o.id]!==void 0&&this._performAddEdge(n,o.id)),e.controlEdge={from:n,to:o?o.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,t),this.body.emitter.emit("_redraw")}_dragStartEdge(e){const t=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,t,void 0,!0)}_performAddNode(e){const t={id:Oo(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(t,i=>{i!=null&&this.inMode==="addNode"&&this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(t),this.showManipulatorToolbar()}_performAddEdge(e,t){const i={from:e,to:t};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(i,n=>{n!=null&&this.inMode==="addEdge"&&(this.body.data.edges.getDataSet().add(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(i),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}_performEditEdge(e,t){const i={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label};let n=this.options.editEdge;if(typeof n=="object"&&(n=n.editWithoutDrag),typeof n=="function")if(n.length===2)n(i,s=>{s==null||this.inMode!=="editEdge"?(this.body.edges[i.id].updateEdgeType(),this.body.emitter.emit("_redraw"),this.showManipulatorToolbar()):(this.body.data.edges.getDataSet().update(s),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(i),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}const G="string",L="boolean",M="number",lo="array",le="object",K5="dom",Zie="any",E_=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],S_={borderWidth:{number:M},borderWidthSelected:{number:M,undefined:"undefined"},brokenImage:{string:G,undefined:"undefined"},chosen:{label:{boolean:L,function:"function"},node:{boolean:L,function:"function"},__type__:{object:le,boolean:L}},color:{border:{string:G},background:{string:G},highlight:{border:{string:G},background:{string:G},__type__:{object:le,string:G}},hover:{border:{string:G},background:{string:G},__type__:{object:le,string:G}},__type__:{object:le,string:G}},opacity:{number:M,undefined:"undefined"},fixed:{x:{boolean:L},y:{boolean:L},__type__:{object:le,boolean:L}},font:{align:{string:G},color:{string:G},size:{number:M},face:{string:G},background:{string:G},strokeWidth:{number:M},strokeColor:{string:G},vadjust:{number:M},multi:{boolean:L,string:G},bold:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:le,string:G}},boldital:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:le,string:G}},ital:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:le,string:G}},mono:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:le,string:G}},__type__:{object:le,string:G}},group:{string:G,number:M,undefined:"undefined"},heightConstraint:{minimum:{number:M},valign:{string:G},__type__:{object:le,boolean:L,number:M}},hidden:{boolean:L},icon:{face:{string:G},code:{string:G},size:{number:M},color:{string:G},weight:{string:G,number:M},__type__:{object:le}},id:{string:G,number:M},image:{selected:{string:G,undefined:"undefined"},unselected:{string:G,undefined:"undefined"},__type__:{object:le,string:G}},imagePadding:{top:{number:M},right:{number:M},bottom:{number:M},left:{number:M},__type__:{object:le,number:M}},label:{string:G,undefined:"undefined"},labelHighlightBold:{boolean:L},level:{number:M,undefined:"undefined"},margin:{top:{number:M},right:{number:M},bottom:{number:M},left:{number:M},__type__:{object:le,number:M}},mass:{number:M},physics:{boolean:L},scaling:{min:{number:M},max:{number:M},label:{enabled:{boolean:L},min:{number:M},max:{number:M},maxVisible:{number:M},drawThreshold:{number:M},__type__:{object:le,boolean:L}},customScalingFunction:{function:"function"},__type__:{object:le}},shadow:{enabled:{boolean:L},color:{string:G},size:{number:M},x:{number:M},y:{number:M},__type__:{object:le,boolean:L}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:L,array:lo},borderRadius:{number:M},interpolation:{boolean:L},useImageSize:{boolean:L},useBorderWithImage:{boolean:L},coordinateOrigin:{string:["center","top-left"]},__type__:{object:le}},size:{number:M},title:{string:G,dom:K5,undefined:"undefined"},value:{number:M,undefined:"undefined"},widthConstraint:{minimum:{number:M},maximum:{number:M},__type__:{object:le,boolean:L,number:M}},x:{number:M},y:{number:M},__type__:{object:le}},ene={configure:{enabled:{boolean:L},filter:{boolean:L,string:G,array:lo,function:"function"},container:{dom:K5},showButton:{boolean:L},__type__:{object:le,boolean:L,string:G,array:lo,function:"function"}},edges:{arrows:{to:{enabled:{boolean:L},scaleFactor:{number:M},type:{string:E_},imageHeight:{number:M},imageWidth:{number:M},src:{string:G},__type__:{object:le,boolean:L}},middle:{enabled:{boolean:L},scaleFactor:{number:M},type:{string:E_},imageWidth:{number:M},imageHeight:{number:M},src:{string:G},__type__:{object:le,boolean:L}},from:{enabled:{boolean:L},scaleFactor:{number:M},type:{string:E_},imageWidth:{number:M},imageHeight:{number:M},src:{string:G},__type__:{object:le,boolean:L}},__type__:{string:["from","to","middle"],object:le}},endPointOffset:{from:{number:M},to:{number:M},__type__:{object:le,number:M}},arrowStrikethrough:{boolean:L},background:{enabled:{boolean:L},color:{string:G},size:{number:M},dashes:{boolean:L,array:lo},__type__:{object:le,boolean:L}},chosen:{label:{boolean:L,function:"function"},edge:{boolean:L,function:"function"},__type__:{object:le,boolean:L}},color:{color:{string:G},highlight:{string:G},hover:{string:G},inherit:{string:["from","to","both"],boolean:L},opacity:{number:M},__type__:{object:le,string:G}},dashes:{boolean:L,array:lo},font:{color:{string:G},size:{number:M},face:{string:G},background:{string:G},strokeWidth:{number:M},strokeColor:{string:G},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:M},multi:{boolean:L,string:G},bold:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:le,string:G}},boldital:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:le,string:G}},ital:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:le,string:G}},mono:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:le,string:G}},__type__:{object:le,string:G}},hidden:{boolean:L},hoverWidth:{function:"function",number:M},label:{string:G,undefined:"undefined"},labelHighlightBold:{boolean:L},length:{number:M,undefined:"undefined"},physics:{boolean:L},scaling:{min:{number:M},max:{number:M},label:{enabled:{boolean:L},min:{number:M},max:{number:M},maxVisible:{number:M},drawThreshold:{number:M},__type__:{object:le,boolean:L}},customScalingFunction:{function:"function"},__type__:{object:le}},selectionWidth:{function:"function",number:M},selfReferenceSize:{number:M},selfReference:{size:{number:M},angle:{number:M},renderBehindTheNode:{boolean:L},__type__:{object:le}},shadow:{enabled:{boolean:L},color:{string:G},size:{number:M},x:{number:M},y:{number:M},__type__:{object:le,boolean:L}},smooth:{enabled:{boolean:L},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:M},forceDirection:{string:["horizontal","vertical","none"],boolean:L},__type__:{object:le,boolean:L}},title:{string:G,undefined:"undefined"},width:{number:M},widthConstraint:{maximum:{number:M},__type__:{object:le,boolean:L,number:M}},value:{number:M,undefined:"undefined"},__type__:{object:le}},groups:{useDefaultGroups:{boolean:L},__any__:S_,__type__:{object:le}},interaction:{dragNodes:{boolean:L},dragView:{boolean:L},hideEdgesOnDrag:{boolean:L},hideEdgesOnZoom:{boolean:L},hideNodesOnDrag:{boolean:L},hover:{boolean:L},keyboard:{enabled:{boolean:L},speed:{x:{number:M},y:{number:M},zoom:{number:M},__type__:{object:le}},bindToWindow:{boolean:L},autoFocus:{boolean:L},__type__:{object:le,boolean:L}},multiselect:{boolean:L},navigationButtons:{boolean:L},selectable:{boolean:L},selectConnectedEdges:{boolean:L},hoverConnectedEdges:{boolean:L},tooltipDelay:{number:M},zoomView:{boolean:L},zoomSpeed:{number:M},__type__:{object:le}},layout:{randomSeed:{undefined:"undefined",number:M,string:G},improvedLayout:{boolean:L},clusterThreshold:{number:M},hierarchical:{enabled:{boolean:L},levelSeparation:{number:M},nodeSpacing:{number:M},treeSpacing:{number:M},blockShifting:{boolean:L},edgeMinimization:{boolean:L},parentCentralization:{boolean:L},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:le,boolean:L}},__type__:{object:le}},manipulation:{enabled:{boolean:L},initiallyActive:{boolean:L},addNode:{boolean:L,function:"function"},addEdge:{boolean:L,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:le,boolean:L,function:"function"}},deleteNode:{boolean:L,function:"function"},deleteEdge:{boolean:L,function:"function"},controlNodeStyle:S_,__type__:{object:le,boolean:L}},nodes:S_,physics:{enabled:{boolean:L},barnesHut:{theta:{number:M},gravitationalConstant:{number:M},centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},damping:{number:M},avoidOverlap:{number:M},__type__:{object:le}},forceAtlas2Based:{theta:{number:M},gravitationalConstant:{number:M},centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},damping:{number:M},avoidOverlap:{number:M},__type__:{object:le}},repulsion:{centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},nodeDistance:{number:M},damping:{number:M},__type__:{object:le}},hierarchicalRepulsion:{centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},nodeDistance:{number:M},damping:{number:M},avoidOverlap:{number:M},__type__:{object:le}},maxVelocity:{number:M},minVelocity:{number:M},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:L},iterations:{number:M},updateInterval:{number:M},onlyDynamicEdges:{boolean:L},fit:{boolean:L},__type__:{object:le,boolean:L}},timestep:{number:M},adaptiveTimestep:{boolean:L},wind:{x:{number:M},y:{number:M},__type__:{object:le}},__type__:{object:le,boolean:L}},autoResize:{boolean:L},clickToUse:{boolean:L},locale:{string:G},locales:{__any__:{any:Zie},__type__:{object:le}},height:{string:G},width:{string:G},__type__:{object:le}},G5={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]}}},tne=(r,e,t)=>{var i;return!!($i(r).call(r,"physics")&&$i(i=G5.physics.solver).call(i,e)&&t.physics.solver!==e&&e!=="wind")};class rne{constructor(){}getDistances(e,t,i){const n={},s=e.edges;for(let a=0;a2&&arguments[2]!==void 0?arguments[2]:!1;const n=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(n),this._createK_matrix(n),this._createE_matrix();const s=.01,o=1;let a=0;const u=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),l=5;let c=1e9,d=0,h=0,f=0,v=0,p=0;for(;c>s&&ao&&pthis.body.emitter.emit("_requestRedraw")),this.groups=new UZ,this.canvas=new Bre(this.body),this.selectionHandler=new _ie(this.body,this.canvas),this.interactionHandler=new Hre(this.body,this.canvas,this.selectionHandler),this.view=new Lre(this.body,this.canvas),this.renderer=new Are(this.body,this.canvas),this.physics=new Tre(this.body),this.layoutEngine=new Jie(this.body),this.clustering=new Dre(this.body),this.manipulation=new Qie(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new ere(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new _re(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new ine(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(t),this.setData(e)}O3(ue.prototype);ue.prototype.setOptions=function(r){if(r===null&&(r=void 0),r!==void 0){if(nZ.validate(r,ene)===!0&&console.error("%cErrors have been found in the supplied options object.",b5),Ys(["locale","locales","clickToUse"],this.options,r),r.locale!==void 0&&(r.locale=PZ(r.locales||this.options.locales,r.locale)),r=this.layoutEngine.setOptions(r.layout,r),this.canvas.setOptions(r),this.groups.setOptions(r.groups),this.nodesHandler.setOptions(r.nodes),this.edgesHandler.setOptions(r.edges),this.physics.setOptions(r.physics),this.manipulation.setOptions(r.manipulation,r,this.options),this.interactionHandler.setOptions(r.interaction),this.renderer.setOptions(r.interaction),this.selectionHandler.setOptions(r.interaction),r.groups!==void 0&&this.body.emitter.emit("refreshNodes"),"configure"in r&&(this.configurator||(this.configurator=new rZ(this,this.body.container,G5,this.canvas.pixelRatio,tne)),this.configurator.setOptions(r.configure)),this.configurator&&this.configurator.options.enabled===!0){const i={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};Ue(i.nodes,this.nodesHandler.options),Ue(i.edges,this.edgesHandler.options),Ue(i.layout,this.layoutEngine.options),Ue(i.interaction,this.selectionHandler.options),Ue(i.interaction,this.renderer.options),Ue(i.interaction,this.interactionHandler.options),Ue(i.manipulation,this.manipulation.options),Ue(i.physics,this.physics.options),Ue(i.global,this.canvas.options),Ue(i.global,this.options),this.configurator.setModuleOptions(i)}r.clickToUse!==void 0?r.clickToUse===!0?this.activator===void 0&&(this.activator=new tZ(this.canvas.frame),this.activator.on("change",()=>{this.body.emitter.emit("activate")})):(this.activator!==void 0&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}};ue.prototype._updateVisibleIndices=function(){const r=this.body.nodes,e=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&!this.clustering._isClusteredNode(t)&&r[t].options.hidden===!1&&this.body.nodeIndices.push(r[t].id);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const i=e[t],n=r[i.fromId],s=r[i.toId],o=n!==void 0&&s!==void 0;!this.clustering._isClusteredEdge(t)&&i.options.hidden===!1&&o&&n.options.hidden===!1&&s.options.hidden===!1&&this.body.edgeIndices.push(i.id)}};ue.prototype.bindEventListeners=function(){this.body.emitter.on("_dataChanged",()=>{this.edgesHandler._updateState(),this.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",()=>{this.clustering._updateState(),this._updateVisibleIndices(),this._updateValueRange(this.body.nodes),this._updateValueRange(this.body.edges),this.body.emitter.emit("startSimulation"),this.body.emitter.emit("_requestRedraw")})};ue.prototype.setData=function(r){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),r&&r.dot&&(r.nodes||r.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(r&&r.options),r&&r.dot){console.warn("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");const e=vZ(r.dot);this.setData(e);return}else if(r&&r.gephi){console.warn("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");const e=pZ(r.gephi);this.setData(e);return}else this.nodesHandler.setData(r&&r.nodes,!0),this.edgesHandler.setData(r&&r.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")};ue.prototype.destroy=function(){this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images;for(const r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&delete this.body.nodes[r];for(const r in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,r)&&delete this.body.edges[r];_i(this.body.container)};ue.prototype._updateValueRange=function(r){let e,t,i,n=0;for(e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const s=r[e].getValue();s!==void 0&&(t=t===void 0?s:Math.min(s,t),i=i===void 0?s:Math.max(s,i),n+=s)}if(t!==void 0&&i!==void 0)for(e in r)Object.prototype.hasOwnProperty.call(r,e)&&r[e].setValueRange(t,i,n)};ue.prototype.isActive=function(){return!this.activator||this.activator.active};ue.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};ue.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};ue.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};ue.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};ue.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};ue.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};ue.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};ue.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};ue.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};ue.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};ue.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};ue.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};ue.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};ue.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};ue.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};ue.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};ue.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};ue.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};ue.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};ue.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};ue.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};ue.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};ue.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};ue.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};ue.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};ue.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};ue.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};ue.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};ue.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};ue.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};ue.prototype.getConnectedNodes=function(r){return this.body.nodes[r]!==void 0?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)};ue.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};ue.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};ue.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};ue.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};ue.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};ue.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};ue.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};ue.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};ue.prototype.getNodeAt=function(){const r=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};ue.prototype.getEdgeAt=function(){const r=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};ue.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};ue.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};ue.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};ue.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};ue.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};ue.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};ue.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};ue.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};ue.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};ue.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};ue.prototype.getOptionsFromConfigurator=function(){let r={};return this.configurator&&(r=this.configurator.getOptions.apply(this.configurator)),r};const nne={class:"nodes-container"},sne={class:"checkbox-green"},one={class:"scroll-y"},ane=["onMouseenter"],une=["onClick"],lne={key:0},cne=["onClick"],dne={class:"edit-node-container"},hne=["onClick"],fne=["onUpdate:modelValue"],vne=["onClick"],pne=Or({__name:"EditorWindow",setup(r){const e=$t(),t=$t({nodes:[],edges:[]}),i={code:"",name:"",text:"",applications:[],id:"",label:"",links:[]},n=$t(""),s=$t({code:"",name:"",text:"",applications:[],id:"",label:"",links:[]}),o=$t({code:"",name:"",text:"",applications:[],id:"",label:"",links:[]});let a={},u={};const l=$t(0),c=$t(0),d=$t(!0);async function h(){t.value=await TU(),c.value=t.value.edges.length,d.value&&(t.value.edges=t.value.edges.filter(function(S){return S.type!=="application"})),t.value.edges.map(function(S){S.type=="application"&&(S.color="#cccccc")}),t.value.nodes=t.value.nodes.map(function(S){return S.id=S.code,S.label=S.name,S}),l.value=t.value.edges.length,u={nodes:t.value.nodes,edges:t.value.edges.sort(function(S,b){return S.type=="application"?1:b.type=="application"?-1:0})},a.setData(u),console.log(t.value.edges)}yw(async()=>{if(!e.value)return;const S={interaction:{selectable:!0},nodes:{color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#960000",background:"#ff9494"},hover:{border:"#2B7CE9",background:"#D2E5FF"}}}};a=new ue(e.value,u,S),a.on("click",function(b){if(console.log("click graph:",b),b.nodes.length>0){const w=t.value.nodes.find(function(T){return T.code==b.nodes[0]});w!==void 0&&p(w)}else b.edges.length>0&&console.log("Clicked edge:",b.edges[0])}),await h(),p(t.value.nodes[0])});function f(){s.value.applications.push({name:""})}function v(S){s.value.applications=s.value.applications.filter(function(b){return b.name!=S})}function p(S){console.log("Select node:",S),n.value=S.code,s.value=S;const b=t.value.edges.filter(function(w){return w.from==S.code}).map(function(w){const T=w.to;return t.value.nodes.filter(function(x){return x.code==T})[0]});s.value.links=b,a.selectNodes([s.value.code])}function _(S){console.log("Focus node:",S.code),o.value=S}function m(S){console.log("Focus node:",S.code),navigator.clipboard.writeText("(["+S.code+"])"),o.value=i}async function g(){console.log("Update node:",s.value),await $l(n.value,s.value),await h();const S=t.value.nodes.filter(function(b){return b.code==s.value.code});p(S[0])}async function E(){console.log("Delete node:",s.value),s.value.code="",await $l(n.value,s.value),await h()}async function y(){console.log("Add node:",s.value),s.value.code=n.value,await $l("",s.value),await h();const S=t.value.nodes.filter(function(b){return b.code==s.value.code});p(S[0])}async function O(){console.log("Clear node"),p(i)}function I(S){return"["+S.code+"] - "+S.name}return(S,b)=>(Ge(),Ct(pt,null,[yt(Iw,null,{default:Iu(()=>b[10]||(b[10]=[Q("div",null," Редактор сценариев ",-1)])),_:1}),Q("div",{ref_key:"network",ref:e,class:"graph-container"},null,512),Q("div",nne,[b[13]||(b[13]=Q("h2",null,"Точки",-1)),Q("div",null,"Всего точек: "+Ft(t.value.nodes.length),1),Q("div",null,[Qi(" Всего связей: "+Ft(c.value)+", показано: "+Ft(l.value)+" ",1),Q("div",null,[b[12]||(b[12]=Qi(" Показать все связи: ")),Q("label",sne,[Q("input",{type:"checkbox",onClick:b[0]||(b[0]=w=>(d.value=!d.value,h()))}),b[11]||(b[11]=Q("span",{class:"checkbox-green-switch","data-label-on":"Вкл","data-label-off":"Выкл"},null,-1))])])]),b[14]||(b[14]=Q("hr",{class:"hr"},null,-1)),Q("div",one,[(Ge(!0),Ct(pt,null,vo(t.value.nodes,w=>(Ge(),Ct("div",{key:w.code},[Q("span",{onMouseenter:T=>_(w),onMouseleave:b[1]||(b[1]=T=>_(i))},[Q("span",{class:wu([[w.code==s.value.code?"selected-node":""],"node-select-button"]),onClick:T=>p(w)},Ft(I(w)),11,une),w.applications.length>0?(Ge(),Ct("span",lne," ("+Ft(w.applications.length)+")",1)):A_("",!0),w.code==o.value.code?(Ge(),Ct("span",{key:1,class:"copy-node-link",onClick:T=>m(w)}," Ссылка ",8,cne)):A_("",!0)],40,ane)]))),128))])]),Q("div",dne,[b[19]||(b[19]=Q("h2",null,"Редактирование точки",-1)),Q("div",null,[so(Q("input",{"onUpdate:modelValue":b[2]||(b[2]=w=>n.value=w),type:"text",class:"node-code-edit-field",maxlength:"3"},null,512),[[ao,n.value]]),b[15]||(b[15]=Qi(" - ")),so(Q("input",{"onUpdate:modelValue":b[3]||(b[3]=w=>s.value.name=w),type:"text",class:"node-name-edit-field"},null,512),[[ao,s.value.name]])]),Q("div",null,[so(Q("textarea",{class:"node-text-edit-field",rows:"25","onUpdate:modelValue":b[4]||(b[4]=w=>s.value.text=w)},null,512),[[ao,s.value.text]])]),Q("div",null,[Q("h3",null,[Qi("Приложения: "+Ft(s.value.applications.length)+" ",1),Q("button",{class:"editor-button application-add-button",onClick:b[5]||(b[5]=w=>f())},"+")]),(Ge(!0),Ct(pt,null,vo(s.value.applications,(w,T)=>(Ge(),Ct("div",{key:T},[Q("button",{class:"editor-button application-remove-button",onClick:R=>v(w.name)},"-",8,hne),so(Q("textarea",{class:"node-text-edit-field",rows:"5","onUpdate:modelValue":R=>w.name=R},null,8,fne),[[ao,w.name]])]))),128))]),Q("div",null,[Q("h3",null,"Ссылки: "+Ft(s.value.links.length),1),(Ge(!0),Ct(pt,null,vo(s.value.links,w=>(Ge(),Ct("div",{key:w.code},[Q("div",{class:"node-select-button",onClick:T=>p(w)}," - "+Ft(I(w)),9,vne)]))),128))]),Q("div",null,[b[16]||(b[16]=Q("hr",{class:"hr"},null,-1)),Q("div",null,[Q("button",{class:"editor-button",onClick:b[6]||(b[6]=w=>g())},"Обновить")]),b[17]||(b[17]=Q("hr",{class:"hr"},null,-1)),Q("div",null,[Q("button",{class:"editor-button",onClick:b[7]||(b[7]=w=>O())},"Очистить"),Q("button",{class:"editor-button",onClick:b[8]||(b[8]=w=>y())},"Добавить")]),b[18]||(b[18]=Q("hr",{class:"hr"},null,-1)),Q("div",null,[Q("button",{class:"editor-button",onClick:b[9]||(b[9]=w=>E())},"Удалить")])])])],64))}}),gne=xu(pne,[["__scopeId","data-v-fcde91a4"]]),mne=Or({__name:"EditorView",setup(r){return(e,t)=>(Ge(),Di(gne))}}),yne=Or({__name:"GamesWindow",setup(r){return(e,t)=>(Ge(),Di(Iw,null,{default:Iu(()=>t[0]||(t[0]=[Q("div",null," Каталог игр ",-1)])),_:1}))}}),bne=Or({__name:"GamesView",setup(r){return(e,t)=>(Ge(),Di(yne))}}),iw=vU({history:W4("/"),routes:[{path:"/",name:"home",component:hV},{path:"/editor",name:"editor",component:mne},{path:"/games",name:"games",component:bne}]}),q0=l4(gU);q0.use(f4());q0.use(iw);q0.mount("#app"); diff --git a/cmd/evening_detective/static/admin/index.html b/cmd/evening_detective/static/admin/index.html index aaf4b4a..6eef405 100644 --- a/cmd/evening_detective/static/admin/index.html +++ b/cmd/evening_detective/static/admin/index.html @@ -5,8 +5,8 @@ ВД Админка - - + +
diff --git a/internal/services/story_service/service.go b/internal/services/story_service/service.go index 990624c..7cf256a 100644 --- a/internal/services/story_service/service.go +++ b/internal/services/story_service/service.go @@ -97,18 +97,44 @@ func (s *StoryService) GetPlace(code string) *Place { } func (s *StoryService) UpdatePlace(code string, node *GraphNode) error { + if code != "" && node.Code == "" { + for i := range s.story.Places { + if s.story.Places[i].Code == code { + s.story.Places = append(s.story.Places[:i], s.story.Places[i+1:]...) + break + } + } + s.Update() + return nil + } + nodeApplications := make([]*Application, 0, len(node.Applications)) + for _, application := range node.Applications { + nodeApplications = append( + nodeApplications, + &Application{ + Name: application.Name, + }, + ) + } + if code == "" && node.Code != "" { + s.story.Places = append( + s.story.Places, + &Place{ + Code: node.Code, + Name: node.Name, + Text: formatText(node.Text), + Applications: nodeApplications, + }, + ) + s.Update() + return nil + } + if code == "" || node.Code == "" { + return nil + } update := false for i := range s.story.Places { if s.story.Places[i].Code == code { - nodeApplications := make([]*Application, 0, len(node.Applications)) - for _, application := range node.Applications { - nodeApplications = append( - nodeApplications, - &Application{ - Name: application.Name, - }, - ) - } s.story.Places[i] = &Place{ Code: node.Code, Name: node.Name, @@ -122,15 +148,6 @@ func (s *StoryService) UpdatePlace(code string, node *GraphNode) error { if !update { for i := range s.story.Places { if s.story.Places[i].Code == node.Code { - nodeApplications := make([]*Application, 0, len(node.Applications)) - for _, application := range node.Applications { - nodeApplications = append( - nodeApplications, - &Application{ - Name: application.Name, - }, - ) - } s.story.Places[i] = &Place{ Code: code, Name: node.Name,