diff --git a/cmd/evening_detective/static/admin/assets/index-CoW_u23P.js b/cmd/evening_detective/static/admin/assets/index-c8po_p3Q.js similarity index 83% rename from cmd/evening_detective/static/admin/assets/index-CoW_u23P.js rename to cmd/evening_detective/static/admin/assets/index-c8po_p3Q.js index e3433c8..92efd0f 100644 --- a/cmd/evening_detective/static/admin/assets/index-CoW_u23P.js +++ b/cmd/evening_detective/static/admin/assets/index-c8po_p3Q.js @@ -22,14 +22,14 @@ * vue-router v4.5.1 * (c) 2025 Eduardo San Martin Morote * @license MIT - */const ls=typeof document<"u";function Oz(r){return typeof r=="object"||"displayName"in r||"props"in r||"__vccOpts"in r}function gU(r){return r.__esModule||r[Symbol.toStringTag]==="Module"||r.default&&Oz(r.default)}const Fe=Object.assign;function Kl(r,e){const t={};for(const i in e){const n=e[i];t[i]=$r(n)?n.map(r):r(n)}return t}const Ro=()=>{},$r=Array.isArray,Iz=/#/g,mU=/&/g,yU=/\//g,bU=/=/g,_U=/\?/g,Tz=/\+/g,wU=/%5B/g,EU=/%5D/g,$z=/%5E/g,SU=/%60/g,Pz=/%7B/g,OU=/%7C/g,Rz=/%7D/g,IU=/%20/g;function Uw(r){return encodeURI(""+r).replace(OU,"|").replace(wU,"[").replace(EU,"]")}function TU(r){return Uw(r).replace(Pz,"{").replace(Rz,"}").replace($z,"^")}function aw(r){return Uw(r).replace(Tz,"%2B").replace(IU,"+").replace(Iz,"%23").replace(mU,"%26").replace(SU,"`").replace(Pz,"{").replace(Rz,"}").replace($z,"^")}function $U(r){return aw(r).replace(bU,"%3D")}function PU(r){return Uw(r).replace(Iz,"%23").replace(_U,"%3F")}function RU(r){return r==null?"":PU(r).replace(yU,"%2F")}function Vo(r){try{return decodeURIComponent(""+r)}catch{}return""+r}const CU=/\/$/,xU=r=>r.replace(CU,"");function Gl(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=MU(i??e,t),{fullPath:i+(s&&"?")+s+o,path:i,query:n,hash:Vo(o)}}function qU(r,e){const t=e.query?r(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function HE(r,e){return!e||!r.toLowerCase().startsWith(e.toLowerCase())?r:r.slice(e.length)||"/"}function AU(r,e,t){const i=e.matched.length-1,n=t.matched.length-1;return i>-1&&i===n&&$s(e.matched[i],t.matched[n])&&Cz(e.params,t.params)&&r(e.query)===r(t.query)&&e.hash===t.hash}function $s(r,e){return(r.aliasOf||r)===(e.aliasOf||e)}function Cz(r,e){if(Object.keys(r).length!==Object.keys(e).length)return!1;for(const t in r)if(!DU(r[t],e[t]))return!1;return!0}function DU(r,e){return $r(r)?WE(r,e):$r(e)?WE(e,r):r===e}function WE(r,e){return $r(e)?r.length===e.length&&r.every((t,i)=>t===e[i]):r.length===1&&r[0]===e}function MU(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 Si={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Ko;(function(r){r.pop="pop",r.push="push"})(Ko||(Ko={}));var Co;(function(r){r.back="back",r.forward="forward",r.unknown=""})(Co||(Co={}));function NU(r){if(!r)if(ls){const e=document.querySelector("base");r=e&&e.getAttribute("href")||"/",r=r.replace(/^\w+:\/\/[^\/]+/,"")}else r="/";return r[0]!=="/"&&r[0]!=="#"&&(r="/"+r),xU(r)}const FU=/^[^#]+#/;function kU(r,e){return r.replace(FU,"#")+e}function BU(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 Zu=()=>({left:window.scrollX,top:window.scrollY});function LU(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=BU(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 UE(r,e){return(history.state?history.state.position-e:-1)+r}const uw=new Map;function jU(r,e){uw.set(r,e)}function zU(r){const e=uw.get(r);return uw.delete(r),e}let HU=()=>location.protocol+"//"+location.host;function xz(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),HE(u,"")}return HE(t,r)+i+n}function WU(r,e,t,i){let n=[],s=[],o=null;const a=({state:h})=>{const f=xz(r,location),p=t.value,v=e.value;let _=0;if(h){if(t.value=f,e.value=h,o&&o===p){o=null;return}_=v?h.position-v.position:0}else i(f);n.forEach(m=>{m(t.value,p,{delta:_,type:Ko.pop,direction:_?_>0?Co.forward:Co.back:Co.unknown})})};function u(){o=t.value}function l(h){n.push(h);const f=()=>{const p=n.indexOf(h);p>-1&&n.splice(p,1)};return s.push(f),f}function c(){const{history:h}=window;h.state&&h.replaceState(Fe({},h.state,{scroll:Zu()}),"")}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 VE(r,e,t,i=!1,n=!1){return{back:r,current:e,forward:t,replaced:i,position:window.history.length,scroll:n?Zu():null}}function UU(r){const{history:e,location:t}=window,i={value:xz(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:HU()+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=Fe({},e.state,VE(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=Fe({},n.value,e.state,{forward:u,scroll:Zu()});s(c.current,c,!0);const d=Fe({},VE(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 VU(r){r=NU(r);const e=UU(r),t=WU(r,e.state,e.location,e.replace);function i(s,o=!0){o||t.pauseListeners(),history.go(s)}const n=Fe({location:"",base:r,go:i,createHref:kU.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 KU(r){return typeof r=="string"||r&&typeof r=="object"}function qz(r){return typeof r=="string"||typeof r=="symbol"}const Az=Symbol("");var KE;(function(r){r[r.aborted=4]="aborted",r[r.cancelled=8]="cancelled",r[r.duplicated=16]="duplicated"})(KE||(KE={}));function Ps(r,e){return Fe(new Error,{type:r,[Az]:!0},e)}function Yr(r,e){return r instanceof Error&&Az in r&&(e==null||!!(r.type&e))}const GE="[^/]+?",GU={sensitive:!1,strict:!1,start:!0,end:!0},YU=/[.+*?^${}()[\]/\\]/g;function XU(r,e){const t=Fe({},GU,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 Dz(r,e){let t=0;const i=r.score,n=e.score;for(;t0&&e[e.length-1]<0}const QU={type:0,value:""},ZU=/[a-zA-Z0-9_]/;function eV(r){if(!r)return[[]];if(r==="/")return[[QU]];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)}:Ro}function o(d){if(qz(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=sV(d,t);t.splice(h,0,d),d.record.name&&!QE(d)&&i.set(d.record.name,d)}function l(d,h){let f,p={},v,_;if("name"in d&&d.name){if(f=i.get(d.name),!f)throw Ps(1,{location:d});_=f.record.name,p=Fe(XE(h.params,f.keys.filter(E=>!E.optional).concat(f.parent?f.parent.keys.filter(E=>E.optional):[]).map(E=>E.name)),d.params&&XE(d.params,f.keys.map(E=>E.name))),v=f.stringify(p)}else if(d.path!=null)v=d.path,f=t.find(E=>E.re.test(v)),f&&(p=f.parse(v),_=f.record.name);else{if(f=h.name?i.get(h.name):t.find(E=>E.re.test(h.path)),!f)throw Ps(1,{location:d,currentLocation:h});_=f.record.name,p=Fe({},h.params,d.params),v=f.stringify(p)}const m=[];let g=f;for(;g;)m.unshift(g.record),g=g.parent;return{name:_,path:v,params:p,matched:m,meta:nV(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 XE(r,e){const t={};for(const i of e)i in r&&(t[i]=r[i]);return t}function JE(r){const e={path:r.path,redirect:r.redirect,name:r.name,meta:r.meta||{},aliasOf:r.aliasOf,beforeEnter:r.beforeEnter,props:iV(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 iV(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 QE(r){for(;r;){if(r.record.aliasOf)return!0;r=r.parent}return!1}function nV(r){return r.reduce((e,t)=>Fe(e,t.meta),{})}function ZE(r,e){const t={};for(const i in r)t[i]=i in e?e[i]:r[i];return t}function sV(r,e){let t=0,i=e.length;for(;t!==i;){const s=t+i>>1;Dz(r,e[s])<0?i=s:t=s+1}const n=oV(r);return n&&(i=e.lastIndexOf(n,i-1)),i}function oV(r){let e=r;for(;e=e.parent;)if(Mz(e)&&Dz(r,e)===0)return e}function Mz({record:r}){return!!(r.name||r.components&&Object.keys(r.components).length||r.redirect)}function aV(r){const e={};if(r===""||r==="?")return e;const i=(r[0]==="?"?r.slice(1):r).split("&");for(let n=0;ns&&aw(s)):[i&&aw(i)]).forEach(s=>{s!==void 0&&(e+=(e.length?"&":"")+t,s!=null&&(e+="="+s))})}return e}function uV(r){const e={};for(const t in r){const i=r[t];i!==void 0&&(e[t]=$r(i)?i.map(n=>n==null?null:""+n):i==null?i:""+i)}return e}const lV=Symbol(""),tS=Symbol(""),Vw=Symbol(""),Nz=Symbol(""),lw=Symbol("");function po(){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 Ri(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(Ps(4,{from:t,to:e})):h instanceof Error?u(h):KU(h)?u(Ps(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 Yl(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(Oz(u)){const c=(u.__vccOpts||u)[e];c&&s.push(Ri(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=gU(c)?c.default:c;o.mods[a]=c,o.components[a]=d;const f=(d.__vccOpts||d)[e];return f&&Ri(f,t,i,o,a,n)()}))}}return s}function rS(r){const e=ii(Vw),t=ii(Nz),i=Sr(()=>{const u=dr(r.to);return e.resolve(u)}),n=Sr(()=>{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($s.bind(null,c));if(h>-1)return h;const f=iS(u[l-2]);return l>1&&iS(c)===f&&d[d.length-1].path!==f?d.findIndex($s.bind(null,u[l-2])):h}),s=Sr(()=>n.value>-1&&pV(t.params,i.value.params)),o=Sr(()=>n.value>-1&&n.value===t.matched.length-1&&Cz(t.params,i.value.params));function a(u={}){if(fV(u)){const l=e[dr(r.replace)?"replace":"push"](dr(r.to)).catch(Ro);return r.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>l),l}return Promise.resolve()}return{route:i,href:Sr(()=>i.value.href),isActive:s,isExactActive:o,navigate:a}}function cV(r){return r.length===1?r[0]:r}const dV=pr({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:rS,setup(r,{slots:e}){const t=Uu(rS(r)),{options:i}=ii(Vw),n=Sr(()=>({[nS(r.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[nS(r.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const s=e.default&&cV(e.default(t));return r.custom?s:Qu("a",{"aria-current":t.isExactActive?r.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:n.value},s)}}}),hV=dV;function fV(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 pV(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(!$r(n)||n.length!==i.length||i.some((s,o)=>s!==n[o]))return!1}return!0}function iS(r){return r?r.aliasOf?r.aliasOf.path:r.path:""}const nS=(r,e,t)=>r??e??t,vV=pr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(r,{attrs:e,slots:t}){const i=ii(lw),n=Sr(()=>r.route||i.value),s=ii(tS,0),o=Sr(()=>{let l=dr(s);const{matched:c}=n.value;let d;for(;(d=c[l])&&!d.components;)l++;return l}),a=Sr(()=>n.value.matched[o.value]);cu(tS,Sr(()=>o.value+1)),cu(lV,a),cu(lw,n);const u=it();return du(()=>[u.value,a.value,r.name],([l,c,d],[h,f,p])=>{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||!$s(c,f)||!h)&&(c.enterCallbacks[d]||[]).forEach(v=>v(l))},{flush:"post"}),()=>{const l=n.value,c=r.name,d=a.value,h=d&&d.components[c];if(!h)return sS(t.default,{Component:h,route:l});const f=d.props[c],p=f?f===!0?l.params:typeof f=="function"?f(l):f:null,_=Qu(h,Fe({},p,e,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(d.instances[c]=null)},ref:u}));return sS(t.default,{Component:_,route:l})||_}}});function sS(r,e){if(!r)return null;const t=r(e);return t.length===1?t[0]:t}const Fz=vV;function gV(r){const e=rV(r.routes,r),t=r.parseQuery||aV,i=r.stringifyQuery||eS,n=r.history,s=po(),o=po(),a=po(),u=bW(Si);let l=Si;ls&&r.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=Kl.bind(null,D=>""+D),d=Kl.bind(null,RU),h=Kl.bind(null,Vo);function f(D,U){let X,ne;return qz(D)?(X=e.getRecordMatcher(D),ne=U):ne=D,e.addRoute(ne,X)}function p(D){const U=e.getRecordMatcher(D);U&&e.removeRoute(U)}function v(){return e.getRoutes().map(D=>D.record)}function _(D){return!!e.getRecordMatcher(D)}function m(D,U){if(U=Fe({},U||u.value),typeof D=="string"){const A=Gl(t,D,U.path),k=e.resolve({path:A.path},U),B=n.createHref(A.fullPath);return Fe(A,k,{params:h(k.params),hash:Vo(A.hash),redirectedFrom:void 0,href:B})}let X;if(D.path!=null)X=Fe({},D,{path:Gl(t,D.path,U.path).path});else{const A=Fe({},D.params);for(const k in A)A[k]==null&&delete A[k];X=Fe({},D,{params:d(A)}),U.params=d(U.params)}const ne=e.resolve(X,U),Re=D.hash||"";ne.params=c(h(ne.params));const C=qU(i,Fe({},D,{hash:TU(Re),path:ne.path})),x=n.createHref(C);return Fe({fullPath:C,hash:Re,query:i===eS?uV(D.query):D.query||{}},ne,{redirectedFrom:void 0,href:x})}function g(D){return typeof D=="string"?Gl(t,D,u.value.path):Fe({},D)}function E(D,U){if(l!==D)return Ps(8,{from:U,to:D})}function y(D){return T(D)}function I(D){return y(Fe(g(D),{replace:!0}))}function O(D){const U=D.matched[D.matched.length-1];if(U&&U.redirect){const{redirect:X}=U;let ne=typeof X=="function"?X(D):X;return typeof ne=="string"&&(ne=ne.includes("?")||ne.includes("#")?ne=g(ne):{path:ne},ne.params={}),Fe({query:D.query,hash:D.hash,params:ne.path!=null?{}:D.params},ne)}}function T(D,U){const X=l=m(D),ne=u.value,Re=D.state,C=D.force,x=D.replace===!0,A=O(X);if(A)return T(Fe(g(A),{state:typeof A=="object"?Fe({},Re,A.state):Re,force:C,replace:x}),U||X);const k=X;k.redirectedFrom=U;let B;return!C&&AU(i,ne,X)&&(B=Ps(16,{to:k,from:ne}),re(ne,ne,!0,!1)),(B?Promise.resolve(B):R(k,ne)).catch(N=>Yr(N)?Yr(N,2)?N:we(N):te(N,k,ne)).then(N=>{if(N){if(Yr(N,2))return T(Fe({replace:x},g(N.to),{state:typeof N.to=="object"?Fe({},Re,N.to.state):Re,force:C}),U||k)}else N=S(k,ne,!0,x,Re);return P(k,ne,N),N})}function b(D,U){const X=E(D,U);return X?Promise.reject(X):Promise.resolve()}function w(D){const U=De.values().next().value;return U&&typeof U.runWithContext=="function"?U.runWithContext(D):D()}function R(D,U){let X;const[ne,Re,C]=mV(D,U);X=Yl(ne.reverse(),"beforeRouteLeave",D,U);for(const A of ne)A.leaveGuards.forEach(k=>{X.push(Ri(k,D,U))});const x=b.bind(null,D,U);return X.push(x),_e(X).then(()=>{X=[];for(const A of s.list())X.push(Ri(A,D,U));return X.push(x),_e(X)}).then(()=>{X=Yl(Re,"beforeRouteUpdate",D,U);for(const A of Re)A.updateGuards.forEach(k=>{X.push(Ri(k,D,U))});return X.push(x),_e(X)}).then(()=>{X=[];for(const A of C)if(A.beforeEnter)if($r(A.beforeEnter))for(const k of A.beforeEnter)X.push(Ri(k,D,U));else X.push(Ri(A.beforeEnter,D,U));return X.push(x),_e(X)}).then(()=>(D.matched.forEach(A=>A.enterCallbacks={}),X=Yl(C,"beforeRouteEnter",D,U,w),X.push(x),_e(X))).then(()=>{X=[];for(const A of o.list())X.push(Ri(A,D,U));return X.push(x),_e(X)}).catch(A=>Yr(A,8)?A:Promise.reject(A))}function P(D,U,X){a.list().forEach(ne=>w(()=>ne(D,U,X)))}function S(D,U,X,ne,Re){const C=E(D,U);if(C)return C;const x=U===Si,A=ls?history.state:{};X&&(ne||x?n.replace(D.fullPath,Fe({scroll:x&&A&&A.scroll},Re)):n.push(D.fullPath,Re)),u.value=D,re(D,U,X,x),we()}let $;function q(){$||($=n.listen((D,U,X)=>{if(!ct.listening)return;const ne=m(D),Re=O(ne);if(Re){T(Fe(Re,{replace:!0,force:!0}),ne).catch(Ro);return}l=ne;const C=u.value;ls&&jU(UE(C.fullPath,X.delta),Zu()),R(ne,C).catch(x=>Yr(x,12)?x:Yr(x,2)?(T(Fe(g(x.to),{force:!0}),ne).then(A=>{Yr(A,20)&&!X.delta&&X.type===Ko.pop&&n.go(-1,!1)}).catch(Ro),Promise.reject()):(X.delta&&n.go(-X.delta,!1),te(x,ne,C))).then(x=>{x=x||S(ne,C,!1),x&&(X.delta&&!Yr(x,8)?n.go(-X.delta,!1):X.type===Ko.pop&&Yr(x,20)&&n.go(-1,!1)),P(ne,C,x)}).catch(Ro)}))}let F=po(),Z=po(),z;function te(D,U,X){we(D);const ne=Z.list();return ne.length?ne.forEach(Re=>Re(D,U,X)):console.error(D),Promise.reject(D)}function ve(){return z&&u.value!==Si?Promise.resolve():new Promise((D,U)=>{F.add([D,U])})}function we(D){return z||(z=!D,q(),F.list().forEach(([U,X])=>D?X(D):U()),F.reset()),D}function re(D,U,X,ne){const{scrollBehavior:Re}=r;if(!ls||!Re)return Promise.resolve();const C=!X&&zU(UE(D.fullPath,0))||(ne||!X)&&history.state&&history.state.scroll||null;return Mj().then(()=>Re(D,U,C)).then(x=>x&&LU(x)).catch(x=>te(x,D,U))}const me=D=>n.go(D);let qe;const De=new Set,ct={currentRoute:u,listening:!0,addRoute:f,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:_,getRoutes:v,resolve:m,options:r,push:y,replace:I,go:me,back:()=>me(-1),forward:()=>me(1),beforeEach:s.add,beforeResolve:o.add,afterEach:a.add,onError:Z.add,isReady:ve,install(D){const U=this;D.component("RouterLink",hV),D.component("RouterView",Fz),D.config.globalProperties.$router=U,Object.defineProperty(D.config.globalProperties,"$route",{enumerable:!0,get:()=>dr(u)}),ls&&!qe&&u.value===Si&&(qe=!0,y(n.location).catch(Re=>{}));const X={};for(const Re in Si)Object.defineProperty(X,Re,{get:()=>u.value[Re],enumerable:!0});D.provide(Vw,U),D.provide(Nz,Rj(X)),D.provide(lw,u);const ne=D.unmount;De.add(D),D.unmount=function(){De.delete(D),De.size<1&&(l=Si,$&&$(),$=null,u.value=Si,qe=!1,z=!1),ne()}}};function _e(D){return D.reduce((U,X)=>U.then(()=>w(X)),Promise.resolve())}return ct}function mV(r,e){const t=[],i=[],n=[],s=Math.max(e.matched.length,r.matched.length);for(let o=0;o$s(l,a))?i.push(a):t.push(a));const u=r.matched[o];u&&(e.matched.find(l=>$s(l,u))||n.push(u))}return[t,i,n]}const yV=pr({__name:"App",setup(r){return(e,t)=>(Oe(),hi(dr(Fz)))}}),bV=it({width:200,margin:1,color:{dark:"#000000",light:"ffffff"}}),_V=r=>{const e=wV(r);EV(e,"teams_qr_code.pdf","application/pdf;teams_qr_code.pdf")},wV=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)},oS=async()=>{try{const r=await fetch(pi("/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}},SV=async r=>{try{const e=await fetch(pi("/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}},OV=async()=>{try{const r=await fetch(pi("/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}},IV=async()=>{try{const r=await fetch(pi("/game/start"),{method:"POST"});if(!r.ok)throw new Error(`http error status: ${r.status}`)}catch(r){throw console.error("[apiStartGame] error:",r),r}},TV=async()=>{try{const r=await fetch(pi("/game/stop"),{method:"POST"});if(!r.ok)throw new Error(`http error status: ${r.status}`)}catch(r){throw console.error("[apiStopGame] error:",r),r}},$V=async(r,e)=>{try{const t=await fetch(pi("/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}},aS=async()=>{try{const r=await fetch(pi("/teams/pdf"));if(!r.ok)throw new Error(`http error status: ${r.status}`);const e=await r.json();_V(e.result)}catch(r){throw console.error("[apiDownloadQrCodesFile] error:",r),r}},PV=async()=>{try{const r=await fetch(pi("/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}},Xl=async(r,e)=>{try{const t=await fetch(pi("/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 pi(r){return"http://"+window.location.host.split(":")[0]+":8090"+r}var ns={},Jl,uS;function RV(){return uS||(uS=1,Jl=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Jl}var Ql={},Oi={},lS;function Nn(){if(lS)return Oi;lS=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 Oi.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},Oi.getSymbolTotalCodewords=function(i){return e[i]},Oi.getBCHDigit=function(t){let i=0;for(;t!==0;)i++,t>>>=1;return i},Oi.setToSJISFunction=function(i){if(typeof i!="function")throw new Error('"toSJISFunc" is not a valid function.');r=i},Oi.isKanjiModeEnabled=function(){return typeof r<"u"},Oi.toSJIS=function(i){return r(i)},Oi}var Zl={},cS;function Kw(){return cS||(cS=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}}}(Zl)),Zl}var ec,dS;function CV(){if(dS)return ec;dS=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++}},ec=r,ec}var tc,hS;function xV(){if(hS)return tc;hS=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]},tc=r,tc}var rc={},fS;function qV(){return fS||(fS=1,function(r){const e=Nn().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},oc=e,oc}var ac={},uc={},lc={},_S;function Bz(){return _S||(_S=1,lc.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),lc}var Ar={},wS;function Lz(){if(wS)return Ar;wS=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 -]))+`;Ar.KANJI=new RegExp(t,"g"),Ar.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Ar.BYTE=new RegExp(i,"g"),Ar.NUMERIC=new RegExp(r,"g"),Ar.ALPHANUMERIC=new RegExp(e,"g");const n=new RegExp("^"+t+"$"),s=new RegExp("^"+r+"$"),o=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Ar.testKanji=function(u){return n.test(u)},Ar.testNumeric=function(u){return s.test(u)},Ar.testAlphanumeric=function(u){return o.test(u)},Ar}var ES;function Fn(){return ES||(ES=1,function(r){const e=Bz(),t=Lz();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}}}(uc)),uc}var SS;function kV(){return SS||(SS=1,function(r){const e=Nn(),t=kz(),i=Kw(),n=Fn(),s=Bz(),o=7973,a=e.getBCHDigit(o);function u(h,f,p){for(let v=1;v<=40;v++)if(f<=r.getCapacity(v,p,h))return v}function l(h,f){return n.getCharCountIndicator(h,f)+4}function c(h,f){let p=0;return h.forEach(function(v){const _=l(v.mode,f);p+=_+v.getBitsLength()}),p}function d(h,f){for(let p=1;p<=40;p++)if(c(h,p)<=r.getCapacity(p,f,n.MIXED))return p}r.from=function(f,p){return s.isValid(f)?parseInt(f,10):p},r.getCapacity=function(f,p,v){if(!s.isValid(f))throw new Error("Invalid QR Code version");typeof v>"u"&&(v=n.BYTE);const _=e.getSymbolTotalCodewords(f),m=t.getTotalCodewordsCount(f,p),g=(_-m)*8;if(v===n.MIXED)return g;const E=g-l(v,f);switch(v){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,p){let v;const _=i.from(p,i.M);if(Array.isArray(f)){if(f.length>1)return d(f,_);if(f.length===0)return 1;v=f[0]}else v=f;return u(v.mode,v.getLength(),_)},r.getEncodedBits=function(f){if(!s.isValid(f)||f<7)throw new Error("Invalid QR Code version");let p=f<<12;for(;e.getBCHDigit(p)-a>=0;)p^=o<=0;)u^=e<0&&(s=this.data.substr(n),o=parseInt(s,10),i.put(o,a*3+1))},hc=e,hc}var fc,TS;function jV(){if(TS)return fc;TS=1;const r=Fn(),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)},fc=t,fc}var pc,$S;function zV(){if($S)return pc;$S=1;const r=Fn();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)}},vc=t,vc}var gc={exports:{}},RS;function WV(){return RS||(RS=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,p,v,_;!a.empty();){u=a.pop(),l=u.value,d=u.cost,h=t[l]||{};for(c in h)h.hasOwnProperty(c)&&(f=h[c],p=d+f,v=o[c],_=typeof o[c]>"u",(_||v>p)&&(o[c]=p,a.push(c,p),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}(gc)),gc.exports}var CS;function UV(){return CS||(CS=1,function(r){const e=Fn(),t=LV(),i=jV(),n=zV(),s=HV(),o=Lz(),a=Nn(),u=WV();function l(m){return unescape(encodeURIComponent(m)).length}function c(m,g,E){const y=[];let I;for(;(I=m.exec(E))!==null;)y.push({data:I[0],index:I.index,mode:g,length:I[0].length});return y}function d(m){const g=c(o.NUMERIC,e.NUMERIC,m),E=c(o.ALPHANUMERIC,e.ALPHANUMERIC,m);let y,I;return a.isKanjiModeEnabled()?(y=c(o.BYTE,e.BYTE,m),I=c(o.KANJI,e.KANJI,m)):(y=c(o.BYTE_KANJI,e.BYTE,m),I=[]),g.concat(E,y,I).sort(function(T,b){return T.index-b.index}).map(function(T){return{data:T.data,mode:T.mode,length:T.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 p(m){const g=[];for(let E=0;E=0&&$<=6&&(q===0||q===6)||q>=0&&q<=6&&($===0||$===6)||$>=2&&$<=4&&q>=2&&q<=4?O.set(P+$,S+q,!0,!0):O.set(P+$,S+q,!1,!0))}}function p(O){const T=O.size;for(let b=8;b>$&1)===1,O.set(R,P,S,!0),O.set(P,R,S,!0)}function m(O,T,b){const w=O.size,R=c.getEncodedBits(T,b);let P,S;for(P=0;P<15;P++)S=(R>>P&1)===1,P<6?O.set(P,8,S,!0):P<8?O.set(P+1,8,S,!0):O.set(w-15+P,8,S,!0),P<8?O.set(8,w-P-1,S,!0):P<9?O.set(8,15-P-1+1,S,!0):O.set(8,15-P-1,S,!0);O.set(w-8,8,1,!0)}function g(O,T){const b=O.size;let w=-1,R=b-1,P=7,S=0;for(let $=b-1;$>0;$-=2)for($===6&&$--;;){for(let q=0;q<2;q++)if(!O.isReserved(R,$-q)){let F=!1;S>>P&1)===1),O.set(R,$-q,F),P--,P===-1&&(S++,P=7)}if(R+=w,R<0||b<=R){R-=w,w=-w;break}}}function E(O,T,b){const w=new t;b.forEach(function(q){w.put(q.mode.bit,4),w.put(q.getLength(),d.getCharCountIndicator(q.mode,O)),q.write(w)});const R=r.getSymbolTotalCodewords(O),P=a.getTotalCodewordsCount(O,T),S=(R-P)*8;for(w.getLengthInBits()+4<=S&&w.put(0,4);w.getLengthInBits()%8!==0;)w.putBit(0);const $=(S-w.getLengthInBits())/8;for(let q=0;q<$;q++)w.put(q%2?17:236,8);return y(w,O,T)}function y(O,T,b){const w=r.getSymbolTotalCodewords(T),R=a.getTotalCodewordsCount(T,b),P=w-R,S=a.getBlocksCount(T,b),$=w%S,q=S-$,F=Math.floor(w/S),Z=Math.floor(P/S),z=Z+1,te=F-Z,ve=new u(te);let we=0;const re=new Array(S),me=new Array(S);let qe=0;const De=new Uint8Array(O.buffer);for(let X=0;X{},$r=Array.isArray,Iz=/#/g,mU=/&/g,yU=/\//g,bU=/=/g,_U=/\?/g,Tz=/\+/g,wU=/%5B/g,EU=/%5D/g,$z=/%5E/g,SU=/%60/g,Pz=/%7B/g,OU=/%7C/g,Rz=/%7D/g,IU=/%20/g;function Uw(r){return encodeURI(""+r).replace(OU,"|").replace(wU,"[").replace(EU,"]")}function TU(r){return Uw(r).replace(Pz,"{").replace(Rz,"}").replace($z,"^")}function aw(r){return Uw(r).replace(Tz,"%2B").replace(IU,"+").replace(Iz,"%23").replace(mU,"%26").replace(SU,"`").replace(Pz,"{").replace(Rz,"}").replace($z,"^")}function $U(r){return aw(r).replace(bU,"%3D")}function PU(r){return Uw(r).replace(Iz,"%23").replace(_U,"%3F")}function RU(r){return r==null?"":PU(r).replace(yU,"%2F")}function Vo(r){try{return decodeURIComponent(""+r)}catch{}return""+r}const CU=/\/$/,xU=r=>r.replace(CU,"");function Gl(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=MU(i??e,t),{fullPath:i+(s&&"?")+s+o,path:i,query:n,hash:Vo(o)}}function qU(r,e){const t=e.query?r(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function HE(r,e){return!e||!r.toLowerCase().startsWith(e.toLowerCase())?r:r.slice(e.length)||"/"}function AU(r,e,t){const i=e.matched.length-1,n=t.matched.length-1;return i>-1&&i===n&&$s(e.matched[i],t.matched[n])&&Cz(e.params,t.params)&&r(e.query)===r(t.query)&&e.hash===t.hash}function $s(r,e){return(r.aliasOf||r)===(e.aliasOf||e)}function Cz(r,e){if(Object.keys(r).length!==Object.keys(e).length)return!1;for(const t in r)if(!DU(r[t],e[t]))return!1;return!0}function DU(r,e){return $r(r)?WE(r,e):$r(e)?WE(e,r):r===e}function WE(r,e){return $r(e)?r.length===e.length&&r.every((t,i)=>t===e[i]):r.length===1&&r[0]===e}function MU(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 Si={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Ko;(function(r){r.pop="pop",r.push="push"})(Ko||(Ko={}));var Co;(function(r){r.back="back",r.forward="forward",r.unknown=""})(Co||(Co={}));function NU(r){if(!r)if(ls){const e=document.querySelector("base");r=e&&e.getAttribute("href")||"/",r=r.replace(/^\w+:\/\/[^\/]+/,"")}else r="/";return r[0]!=="/"&&r[0]!=="#"&&(r="/"+r),xU(r)}const FU=/^[^#]+#/;function kU(r,e){return r.replace(FU,"#")+e}function BU(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 Zu=()=>({left:window.scrollX,top:window.scrollY});function LU(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=BU(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 UE(r,e){return(history.state?history.state.position-e:-1)+r}const uw=new Map;function jU(r,e){uw.set(r,e)}function zU(r){const e=uw.get(r);return uw.delete(r),e}let HU=()=>location.protocol+"//"+location.host;function xz(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),HE(u,"")}return HE(t,r)+i+n}function WU(r,e,t,i){let n=[],s=[],o=null;const a=({state:h})=>{const f=xz(r,location),p=t.value,v=e.value;let _=0;if(h){if(t.value=f,e.value=h,o&&o===p){o=null;return}_=v?h.position-v.position:0}else i(f);n.forEach(m=>{m(t.value,p,{delta:_,type:Ko.pop,direction:_?_>0?Co.forward:Co.back:Co.unknown})})};function u(){o=t.value}function l(h){n.push(h);const f=()=>{const p=n.indexOf(h);p>-1&&n.splice(p,1)};return s.push(f),f}function c(){const{history:h}=window;h.state&&h.replaceState(Fe({},h.state,{scroll:Zu()}),"")}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 VE(r,e,t,i=!1,n=!1){return{back:r,current:e,forward:t,replaced:i,position:window.history.length,scroll:n?Zu():null}}function UU(r){const{history:e,location:t}=window,i={value:xz(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:HU()+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=Fe({},e.state,VE(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=Fe({},n.value,e.state,{forward:u,scroll:Zu()});s(c.current,c,!0);const d=Fe({},VE(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 VU(r){r=NU(r);const e=UU(r),t=WU(r,e.state,e.location,e.replace);function i(s,o=!0){o||t.pauseListeners(),history.go(s)}const n=Fe({location:"",base:r,go:i,createHref:kU.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 KU(r){return typeof r=="string"||r&&typeof r=="object"}function qz(r){return typeof r=="string"||typeof r=="symbol"}const Az=Symbol("");var KE;(function(r){r[r.aborted=4]="aborted",r[r.cancelled=8]="cancelled",r[r.duplicated=16]="duplicated"})(KE||(KE={}));function Ps(r,e){return Fe(new Error,{type:r,[Az]:!0},e)}function Yr(r,e){return r instanceof Error&&Az in r&&(e==null||!!(r.type&e))}const GE="[^/]+?",GU={sensitive:!1,strict:!1,start:!0,end:!0},YU=/[.+*?^${}()[\]/\\]/g;function XU(r,e){const t=Fe({},GU,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 Dz(r,e){let t=0;const i=r.score,n=e.score;for(;t0&&e[e.length-1]<0}const QU={type:0,value:""},ZU=/[a-zA-Z0-9_]/;function eV(r){if(!r)return[[]];if(r==="/")return[[QU]];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)}:Ro}function o(d){if(qz(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=sV(d,t);t.splice(h,0,d),d.record.name&&!QE(d)&&i.set(d.record.name,d)}function l(d,h){let f,p={},v,_;if("name"in d&&d.name){if(f=i.get(d.name),!f)throw Ps(1,{location:d});_=f.record.name,p=Fe(XE(h.params,f.keys.filter(E=>!E.optional).concat(f.parent?f.parent.keys.filter(E=>E.optional):[]).map(E=>E.name)),d.params&&XE(d.params,f.keys.map(E=>E.name))),v=f.stringify(p)}else if(d.path!=null)v=d.path,f=t.find(E=>E.re.test(v)),f&&(p=f.parse(v),_=f.record.name);else{if(f=h.name?i.get(h.name):t.find(E=>E.re.test(h.path)),!f)throw Ps(1,{location:d,currentLocation:h});_=f.record.name,p=Fe({},h.params,d.params),v=f.stringify(p)}const m=[];let g=f;for(;g;)m.unshift(g.record),g=g.parent;return{name:_,path:v,params:p,matched:m,meta:nV(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 XE(r,e){const t={};for(const i of e)i in r&&(t[i]=r[i]);return t}function JE(r){const e={path:r.path,redirect:r.redirect,name:r.name,meta:r.meta||{},aliasOf:r.aliasOf,beforeEnter:r.beforeEnter,props:iV(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 iV(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 QE(r){for(;r;){if(r.record.aliasOf)return!0;r=r.parent}return!1}function nV(r){return r.reduce((e,t)=>Fe(e,t.meta),{})}function ZE(r,e){const t={};for(const i in r)t[i]=i in e?e[i]:r[i];return t}function sV(r,e){let t=0,i=e.length;for(;t!==i;){const s=t+i>>1;Dz(r,e[s])<0?i=s:t=s+1}const n=oV(r);return n&&(i=e.lastIndexOf(n,i-1)),i}function oV(r){let e=r;for(;e=e.parent;)if(Mz(e)&&Dz(r,e)===0)return e}function Mz({record:r}){return!!(r.name||r.components&&Object.keys(r.components).length||r.redirect)}function aV(r){const e={};if(r===""||r==="?")return e;const i=(r[0]==="?"?r.slice(1):r).split("&");for(let n=0;ns&&aw(s)):[i&&aw(i)]).forEach(s=>{s!==void 0&&(e+=(e.length?"&":"")+t,s!=null&&(e+="="+s))})}return e}function uV(r){const e={};for(const t in r){const i=r[t];i!==void 0&&(e[t]=$r(i)?i.map(n=>n==null?null:""+n):i==null?i:""+i)}return e}const lV=Symbol(""),tS=Symbol(""),Vw=Symbol(""),Nz=Symbol(""),lw=Symbol("");function po(){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 Ri(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(Ps(4,{from:t,to:e})):h instanceof Error?u(h):KU(h)?u(Ps(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 Yl(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(Oz(u)){const c=(u.__vccOpts||u)[e];c&&s.push(Ri(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=gU(c)?c.default:c;o.mods[a]=c,o.components[a]=d;const f=(d.__vccOpts||d)[e];return f&&Ri(f,t,i,o,a,n)()}))}}return s}function rS(r){const e=ii(Vw),t=ii(Nz),i=Sr(()=>{const u=dr(r.to);return e.resolve(u)}),n=Sr(()=>{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($s.bind(null,c));if(h>-1)return h;const f=iS(u[l-2]);return l>1&&iS(c)===f&&d[d.length-1].path!==f?d.findIndex($s.bind(null,u[l-2])):h}),s=Sr(()=>n.value>-1&&pV(t.params,i.value.params)),o=Sr(()=>n.value>-1&&n.value===t.matched.length-1&&Cz(t.params,i.value.params));function a(u={}){if(fV(u)){const l=e[dr(r.replace)?"replace":"push"](dr(r.to)).catch(Ro);return r.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>l),l}return Promise.resolve()}return{route:i,href:Sr(()=>i.value.href),isActive:s,isExactActive:o,navigate:a}}function cV(r){return r.length===1?r[0]:r}const dV=pr({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:rS,setup(r,{slots:e}){const t=Uu(rS(r)),{options:i}=ii(Vw),n=Sr(()=>({[nS(r.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[nS(r.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const s=e.default&&cV(e.default(t));return r.custom?s:Qu("a",{"aria-current":t.isExactActive?r.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:n.value},s)}}}),hV=dV;function fV(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 pV(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(!$r(n)||n.length!==i.length||i.some((s,o)=>s!==n[o]))return!1}return!0}function iS(r){return r?r.aliasOf?r.aliasOf.path:r.path:""}const nS=(r,e,t)=>r??e??t,vV=pr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(r,{attrs:e,slots:t}){const i=ii(lw),n=Sr(()=>r.route||i.value),s=ii(tS,0),o=Sr(()=>{let l=dr(s);const{matched:c}=n.value;let d;for(;(d=c[l])&&!d.components;)l++;return l}),a=Sr(()=>n.value.matched[o.value]);cu(tS,Sr(()=>o.value+1)),cu(lV,a),cu(lw,n);const u=it();return du(()=>[u.value,a.value,r.name],([l,c,d],[h,f,p])=>{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||!$s(c,f)||!h)&&(c.enterCallbacks[d]||[]).forEach(v=>v(l))},{flush:"post"}),()=>{const l=n.value,c=r.name,d=a.value,h=d&&d.components[c];if(!h)return sS(t.default,{Component:h,route:l});const f=d.props[c],p=f?f===!0?l.params:typeof f=="function"?f(l):f:null,_=Qu(h,Fe({},p,e,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(d.instances[c]=null)},ref:u}));return sS(t.default,{Component:_,route:l})||_}}});function sS(r,e){if(!r)return null;const t=r(e);return t.length===1?t[0]:t}const Fz=vV;function gV(r){const e=rV(r.routes,r),t=r.parseQuery||aV,i=r.stringifyQuery||eS,n=r.history,s=po(),o=po(),a=po(),u=bW(Si);let l=Si;ls&&r.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=Kl.bind(null,D=>""+D),d=Kl.bind(null,RU),h=Kl.bind(null,Vo);function f(D,U){let X,ne;return qz(D)?(X=e.getRecordMatcher(D),ne=U):ne=D,e.addRoute(ne,X)}function p(D){const U=e.getRecordMatcher(D);U&&e.removeRoute(U)}function v(){return e.getRoutes().map(D=>D.record)}function _(D){return!!e.getRecordMatcher(D)}function m(D,U){if(U=Fe({},U||u.value),typeof D=="string"){const A=Gl(t,D,U.path),k=e.resolve({path:A.path},U),B=n.createHref(A.fullPath);return Fe(A,k,{params:h(k.params),hash:Vo(A.hash),redirectedFrom:void 0,href:B})}let X;if(D.path!=null)X=Fe({},D,{path:Gl(t,D.path,U.path).path});else{const A=Fe({},D.params);for(const k in A)A[k]==null&&delete A[k];X=Fe({},D,{params:d(A)}),U.params=d(U.params)}const ne=e.resolve(X,U),Re=D.hash||"";ne.params=c(h(ne.params));const C=qU(i,Fe({},D,{hash:TU(Re),path:ne.path})),x=n.createHref(C);return Fe({fullPath:C,hash:Re,query:i===eS?uV(D.query):D.query||{}},ne,{redirectedFrom:void 0,href:x})}function g(D){return typeof D=="string"?Gl(t,D,u.value.path):Fe({},D)}function E(D,U){if(l!==D)return Ps(8,{from:U,to:D})}function y(D){return T(D)}function I(D){return y(Fe(g(D),{replace:!0}))}function O(D){const U=D.matched[D.matched.length-1];if(U&&U.redirect){const{redirect:X}=U;let ne=typeof X=="function"?X(D):X;return typeof ne=="string"&&(ne=ne.includes("?")||ne.includes("#")?ne=g(ne):{path:ne},ne.params={}),Fe({query:D.query,hash:D.hash,params:ne.path!=null?{}:D.params},ne)}}function T(D,U){const X=l=m(D),ne=u.value,Re=D.state,C=D.force,x=D.replace===!0,A=O(X);if(A)return T(Fe(g(A),{state:typeof A=="object"?Fe({},Re,A.state):Re,force:C,replace:x}),U||X);const k=X;k.redirectedFrom=U;let B;return!C&&AU(i,ne,X)&&(B=Ps(16,{to:k,from:ne}),re(ne,ne,!0,!1)),(B?Promise.resolve(B):R(k,ne)).catch(N=>Yr(N)?Yr(N,2)?N:we(N):te(N,k,ne)).then(N=>{if(N){if(Yr(N,2))return T(Fe({replace:x},g(N.to),{state:typeof N.to=="object"?Fe({},Re,N.to.state):Re,force:C}),U||k)}else N=S(k,ne,!0,x,Re);return P(k,ne,N),N})}function b(D,U){const X=E(D,U);return X?Promise.reject(X):Promise.resolve()}function w(D){const U=De.values().next().value;return U&&typeof U.runWithContext=="function"?U.runWithContext(D):D()}function R(D,U){let X;const[ne,Re,C]=mV(D,U);X=Yl(ne.reverse(),"beforeRouteLeave",D,U);for(const A of ne)A.leaveGuards.forEach(k=>{X.push(Ri(k,D,U))});const x=b.bind(null,D,U);return X.push(x),_e(X).then(()=>{X=[];for(const A of s.list())X.push(Ri(A,D,U));return X.push(x),_e(X)}).then(()=>{X=Yl(Re,"beforeRouteUpdate",D,U);for(const A of Re)A.updateGuards.forEach(k=>{X.push(Ri(k,D,U))});return X.push(x),_e(X)}).then(()=>{X=[];for(const A of C)if(A.beforeEnter)if($r(A.beforeEnter))for(const k of A.beforeEnter)X.push(Ri(k,D,U));else X.push(Ri(A.beforeEnter,D,U));return X.push(x),_e(X)}).then(()=>(D.matched.forEach(A=>A.enterCallbacks={}),X=Yl(C,"beforeRouteEnter",D,U,w),X.push(x),_e(X))).then(()=>{X=[];for(const A of o.list())X.push(Ri(A,D,U));return X.push(x),_e(X)}).catch(A=>Yr(A,8)?A:Promise.reject(A))}function P(D,U,X){a.list().forEach(ne=>w(()=>ne(D,U,X)))}function S(D,U,X,ne,Re){const C=E(D,U);if(C)return C;const x=U===Si,A=ls?history.state:{};X&&(ne||x?n.replace(D.fullPath,Fe({scroll:x&&A&&A.scroll},Re)):n.push(D.fullPath,Re)),u.value=D,re(D,U,X,x),we()}let $;function q(){$||($=n.listen((D,U,X)=>{if(!ct.listening)return;const ne=m(D),Re=O(ne);if(Re){T(Fe(Re,{replace:!0,force:!0}),ne).catch(Ro);return}l=ne;const C=u.value;ls&&jU(UE(C.fullPath,X.delta),Zu()),R(ne,C).catch(x=>Yr(x,12)?x:Yr(x,2)?(T(Fe(g(x.to),{force:!0}),ne).then(A=>{Yr(A,20)&&!X.delta&&X.type===Ko.pop&&n.go(-1,!1)}).catch(Ro),Promise.reject()):(X.delta&&n.go(-X.delta,!1),te(x,ne,C))).then(x=>{x=x||S(ne,C,!1),x&&(X.delta&&!Yr(x,8)?n.go(-X.delta,!1):X.type===Ko.pop&&Yr(x,20)&&n.go(-1,!1)),P(ne,C,x)}).catch(Ro)}))}let F=po(),Z=po(),z;function te(D,U,X){we(D);const ne=Z.list();return ne.length?ne.forEach(Re=>Re(D,U,X)):console.error(D),Promise.reject(D)}function ve(){return z&&u.value!==Si?Promise.resolve():new Promise((D,U)=>{F.add([D,U])})}function we(D){return z||(z=!D,q(),F.list().forEach(([U,X])=>D?X(D):U()),F.reset()),D}function re(D,U,X,ne){const{scrollBehavior:Re}=r;if(!ls||!Re)return Promise.resolve();const C=!X&&zU(UE(D.fullPath,0))||(ne||!X)&&history.state&&history.state.scroll||null;return Mj().then(()=>Re(D,U,C)).then(x=>x&&LU(x)).catch(x=>te(x,D,U))}const me=D=>n.go(D);let qe;const De=new Set,ct={currentRoute:u,listening:!0,addRoute:f,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:_,getRoutes:v,resolve:m,options:r,push:y,replace:I,go:me,back:()=>me(-1),forward:()=>me(1),beforeEach:s.add,beforeResolve:o.add,afterEach:a.add,onError:Z.add,isReady:ve,install(D){const U=this;D.component("RouterLink",hV),D.component("RouterView",Fz),D.config.globalProperties.$router=U,Object.defineProperty(D.config.globalProperties,"$route",{enumerable:!0,get:()=>dr(u)}),ls&&!qe&&u.value===Si&&(qe=!0,y(n.location).catch(Re=>{}));const X={};for(const Re in Si)Object.defineProperty(X,Re,{get:()=>u.value[Re],enumerable:!0});D.provide(Vw,U),D.provide(Nz,Rj(X)),D.provide(lw,u);const ne=D.unmount;De.add(D),D.unmount=function(){De.delete(D),De.size<1&&(l=Si,$&&$(),$=null,u.value=Si,qe=!1,z=!1),ne()}}};function _e(D){return D.reduce((U,X)=>U.then(()=>w(X)),Promise.resolve())}return ct}function mV(r,e){const t=[],i=[],n=[],s=Math.max(e.matched.length,r.matched.length);for(let o=0;o$s(l,a))?i.push(a):t.push(a));const u=r.matched[o];u&&(e.matched.find(l=>$s(l,u))||n.push(u))}return[t,i,n]}const yV=pr({__name:"App",setup(r){return(e,t)=>(Oe(),hi(dr(Fz)))}}),bV=it({width:200,margin:1,color:{dark:"#000000",light:"ffffff"}}),_V=r=>{const e=wV(r);EV(e,"teams_qr_code.pdf","application/pdf;teams_qr_code.pdf")},wV=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)},SV="https://evening-detective-api.crabs-games.art",oS=async()=>{try{const r=await fetch(pi("/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}},OV=async r=>{try{const e=await fetch(pi("/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}},IV=async()=>{try{const r=await fetch(pi("/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}},TV=async()=>{try{const r=await fetch(pi("/game/start"),{method:"POST"});if(!r.ok)throw new Error(`http error status: ${r.status}`)}catch(r){throw console.error("[apiStartGame] error:",r),r}},$V=async()=>{try{const r=await fetch(pi("/game/stop"),{method:"POST"});if(!r.ok)throw new Error(`http error status: ${r.status}`)}catch(r){throw console.error("[apiStopGame] error:",r),r}},PV=async(r,e)=>{try{const t=await fetch(pi("/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}},aS=async()=>{try{const r=await fetch(pi("/teams/pdf"));if(!r.ok)throw new Error(`http error status: ${r.status}`);const e=await r.json();_V(e.result)}catch(r){throw console.error("[apiDownloadQrCodesFile] error:",r),r}},RV=async()=>{try{const r=await fetch(pi("/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}},Xl=async(r,e)=>{try{const t=await fetch(pi("/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 pi(r){return SV+r}var ns={},Jl,uS;function CV(){return uS||(uS=1,Jl=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Jl}var Ql={},Oi={},lS;function Nn(){if(lS)return Oi;lS=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 Oi.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},Oi.getSymbolTotalCodewords=function(i){return e[i]},Oi.getBCHDigit=function(t){let i=0;for(;t!==0;)i++,t>>>=1;return i},Oi.setToSJISFunction=function(i){if(typeof i!="function")throw new Error('"toSJISFunc" is not a valid function.');r=i},Oi.isKanjiModeEnabled=function(){return typeof r<"u"},Oi.toSJIS=function(i){return r(i)},Oi}var Zl={},cS;function Kw(){return cS||(cS=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}}}(Zl)),Zl}var ec,dS;function xV(){if(dS)return ec;dS=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++}},ec=r,ec}var tc,hS;function qV(){if(hS)return tc;hS=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]},tc=r,tc}var rc={},fS;function AV(){return fS||(fS=1,function(r){const e=Nn().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},oc=e,oc}var ac={},uc={},lc={},_S;function Bz(){return _S||(_S=1,lc.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),lc}var Ar={},wS;function Lz(){if(wS)return Ar;wS=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 +]))+`;Ar.KANJI=new RegExp(t,"g"),Ar.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Ar.BYTE=new RegExp(i,"g"),Ar.NUMERIC=new RegExp(r,"g"),Ar.ALPHANUMERIC=new RegExp(e,"g");const n=new RegExp("^"+t+"$"),s=new RegExp("^"+r+"$"),o=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Ar.testKanji=function(u){return n.test(u)},Ar.testNumeric=function(u){return s.test(u)},Ar.testAlphanumeric=function(u){return o.test(u)},Ar}var ES;function Fn(){return ES||(ES=1,function(r){const e=Bz(),t=Lz();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}}}(uc)),uc}var SS;function BV(){return SS||(SS=1,function(r){const e=Nn(),t=kz(),i=Kw(),n=Fn(),s=Bz(),o=7973,a=e.getBCHDigit(o);function u(h,f,p){for(let v=1;v<=40;v++)if(f<=r.getCapacity(v,p,h))return v}function l(h,f){return n.getCharCountIndicator(h,f)+4}function c(h,f){let p=0;return h.forEach(function(v){const _=l(v.mode,f);p+=_+v.getBitsLength()}),p}function d(h,f){for(let p=1;p<=40;p++)if(c(h,p)<=r.getCapacity(p,f,n.MIXED))return p}r.from=function(f,p){return s.isValid(f)?parseInt(f,10):p},r.getCapacity=function(f,p,v){if(!s.isValid(f))throw new Error("Invalid QR Code version");typeof v>"u"&&(v=n.BYTE);const _=e.getSymbolTotalCodewords(f),m=t.getTotalCodewordsCount(f,p),g=(_-m)*8;if(v===n.MIXED)return g;const E=g-l(v,f);switch(v){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,p){let v;const _=i.from(p,i.M);if(Array.isArray(f)){if(f.length>1)return d(f,_);if(f.length===0)return 1;v=f[0]}else v=f;return u(v.mode,v.getLength(),_)},r.getEncodedBits=function(f){if(!s.isValid(f)||f<7)throw new Error("Invalid QR Code version");let p=f<<12;for(;e.getBCHDigit(p)-a>=0;)p^=o<=0;)u^=e<0&&(s=this.data.substr(n),o=parseInt(s,10),i.put(o,a*3+1))},hc=e,hc}var fc,TS;function zV(){if(TS)return fc;TS=1;const r=Fn(),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)},fc=t,fc}var pc,$S;function HV(){if($S)return pc;$S=1;const r=Fn();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)}},vc=t,vc}var gc={exports:{}},RS;function UV(){return RS||(RS=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,p,v,_;!a.empty();){u=a.pop(),l=u.value,d=u.cost,h=t[l]||{};for(c in h)h.hasOwnProperty(c)&&(f=h[c],p=d+f,v=o[c],_=typeof o[c]>"u",(_||v>p)&&(o[c]=p,a.push(c,p),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}(gc)),gc.exports}var CS;function VV(){return CS||(CS=1,function(r){const e=Fn(),t=jV(),i=zV(),n=HV(),s=WV(),o=Lz(),a=Nn(),u=UV();function l(m){return unescape(encodeURIComponent(m)).length}function c(m,g,E){const y=[];let I;for(;(I=m.exec(E))!==null;)y.push({data:I[0],index:I.index,mode:g,length:I[0].length});return y}function d(m){const g=c(o.NUMERIC,e.NUMERIC,m),E=c(o.ALPHANUMERIC,e.ALPHANUMERIC,m);let y,I;return a.isKanjiModeEnabled()?(y=c(o.BYTE,e.BYTE,m),I=c(o.KANJI,e.KANJI,m)):(y=c(o.BYTE_KANJI,e.BYTE,m),I=[]),g.concat(E,y,I).sort(function(T,b){return T.index-b.index}).map(function(T){return{data:T.data,mode:T.mode,length:T.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 p(m){const g=[];for(let E=0;E=0&&$<=6&&(q===0||q===6)||q>=0&&q<=6&&($===0||$===6)||$>=2&&$<=4&&q>=2&&q<=4?O.set(P+$,S+q,!0,!0):O.set(P+$,S+q,!1,!0))}}function p(O){const T=O.size;for(let b=8;b>$&1)===1,O.set(R,P,S,!0),O.set(P,R,S,!0)}function m(O,T,b){const w=O.size,R=c.getEncodedBits(T,b);let P,S;for(P=0;P<15;P++)S=(R>>P&1)===1,P<6?O.set(P,8,S,!0):P<8?O.set(P+1,8,S,!0):O.set(w-15+P,8,S,!0),P<8?O.set(8,w-P-1,S,!0):P<9?O.set(8,15-P-1+1,S,!0):O.set(8,15-P-1,S,!0);O.set(w-8,8,1,!0)}function g(O,T){const b=O.size;let w=-1,R=b-1,P=7,S=0;for(let $=b-1;$>0;$-=2)for($===6&&$--;;){for(let q=0;q<2;q++)if(!O.isReserved(R,$-q)){let F=!1;S>>P&1)===1),O.set(R,$-q,F),P--,P===-1&&(S++,P=7)}if(R+=w,R<0||b<=R){R-=w,w=-w;break}}}function E(O,T,b){const w=new t;b.forEach(function(q){w.put(q.mode.bit,4),w.put(q.getLength(),d.getCharCountIndicator(q.mode,O)),q.write(w)});const R=r.getSymbolTotalCodewords(O),P=a.getTotalCodewordsCount(O,T),S=(R-P)*8;for(w.getLengthInBits()+4<=S&&w.put(0,4);w.getLengthInBits()%8!==0;)w.putBit(0);const $=(S-w.getLengthInBits())/8;for(let q=0;q<$;q++)w.put(q%2?17:236,8);return y(w,O,T)}function y(O,T,b){const w=r.getSymbolTotalCodewords(T),R=a.getTotalCodewordsCount(T,b),P=w-R,S=a.getBlocksCount(T,b),$=w%S,q=S-$,F=Math.floor(w/S),Z=Math.floor(P/S),z=Z+1,te=F-Z,ve=new u(te);let we=0;const re=new Array(S),me=new Array(S);let qe=0;const De=new Uint8Array(O.buffer);for(let X=0;X=7&&_(q,T),g(q,S),isNaN(w)&&(w=o.getBestMask(q,m.bind(null,q,b))),o.applyMask(w,q),m(q,b,w),{modules:q,version:T,errorCorrectionLevel:b,maskPattern:w,segments:R}}return Ql.create=function(T,b){if(typeof T>"u"||T==="")throw new Error("No input text");let w=e.M,R,P;return typeof b<"u"&&(w=e.from(b.errorCorrectionLevel,e.M),R=l.from(b.version),P=o.from(b.maskPattern),b.toSJISFunc&&r.setToSJISFunction(b.toSJISFunc)),I(T,R,w,P)},Ql}var mc={},yc={},qS;function jz(){return qS||(qS=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)}}(mc)),mc}var bc={},DS;function GV(){if(DS)return bc;DS=1;const r=jz();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="',p='viewBox="0 0 '+d+" "+d+'"',_=''+h+f+` -`;return typeof a=="function"&&a(null,_),_},bc}var MS;function YV(){if(MS)return ns;MS=1;const r=RV(),e=VV(),t=KV(),i=GV();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,p){try{const v=e.create(a,u);f(s(v,o,u))}catch(v){p(v)}})}try{const f=e.create(a,u);l(null,s(f,o,u))}catch(f){l(f)}}return ns.create=e.create,ns.toCanvas=n.bind(null,t.render),ns.toDataURL=n.bind(null,t.renderToDataURL),ns.toString=n.bind(null,function(s,o,a){return i.render(s,a)}),ns}var _c=YV();/*! vue-qrcode v2.0.0 | (c) 2018-present Chen Fengyuan | MIT */const NS="ready";var XV=pr({name:"VueQrcode",props:{value:{type:String,default:void 0},options:{type:Object,default:void 0},tag:{type:String,default:"canvas"}},emits:[NS],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(NS,this.$el)};switch(this.tag){case"canvas":_c.toCanvas(this.$el,e,r,i=>{if(i)throw i;t()});break;case"img":_c.toDataURL(e,r,(i,n)=>{if(i)throw i;this.$el.src=n,this.$el.onload=t});break;case"svg":_c.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 Qu(this.tag,this.$slots.default)}});const JV={key:0,class:"qr"},QV=pr({__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?(Oe(),Ne("div",JV,[at(dr(XV),{value:r.data,options:dr(bV),tag:"svg"},null,8,["value","options"]),W("div",null,Xe(r.title),1)])):Jr("",!0)}}}),ca=(r,e)=>{const t=r.__vccOpts||r;for(const[i,n]of e)t[i]=n;return t},ZV=ca(QV,[["__scopeId","data-v-eea3ea34"]]),eK={},tK={class:"header-block"};function rK(r,e){return Oe(),Ne("div",tK,[lu(r.$slots,"default",{},void 0)])}const Gw=ca(eK,[["render",rK],["__scopeId","data-v-5b6894ef"]]),iK={class:"modal-wrapper"},nK={class:"modal-header"},sK={class:"modal-body"},oK={class:"modal-footer"},aK=pr({__name:"ModalWindow",props:{isOpen:{type:Boolean,required:!0},title:{type:String,default:"Внимание"},buttonText:{type:String,required:!0}},emits:["close","confirm"],setup(r,{emit:e}){const t=r,i=e,n=()=>{i("close")},s=()=>{i("confirm")},o=a=>{t.isOpen&&a.key==="Escape"&&n()};return ua(()=>{document.addEventListener("keydown",o)}),jw(()=>{document.removeEventListener("keydown",o)}),(a,u)=>(Oe(),hi(CW,{to:"body"},[at(k4,{name:"modal"},{default:bn(()=>[r.isOpen?(Oe(),Ne("div",{key:0,class:"modal-mask",onClick:n},[W("div",iK,[W("div",{class:"modal-container",onClick:u[0]||(u[0]=Sz(()=>{},["stop"]))},[W("div",nK,[lu(a.$slots,"header",{},()=>[W("h3",null,Xe(r.title),1)],!0)]),W("div",sK,[lu(a.$slots,"default",{},()=>[u[1]||(u[1]=ar("Дефолтный текст модального окна"))],!0)]),W("div",oK,[lu(a.$slots,"footer",{},()=>[W("button",{class:"btn-cancel",onClick:n},"Отмена"),W("button",{class:"btn-primary",onClick:s},Xe(r.buttonText),1)],!0)])])])])):Jr("",!0)]),_:3})]))}}),FS=ca(aK,[["__scopeId","data-v-f97ce307"]]),uK={class:"buttons-block"},lK={class:"center-block-custom content-block"},cK={class:"team-content-block"},dK={class:"team-name-block"},hK=["onClick"],fK=["href"],pK=["onClick"],vK=pr({__name:"AdminWindow",setup(r){const e=it("-"),t=it("-"),i=it(!1),n=it(!1),s=it(""),o=it(),a=it({teams:[]}),u=it("");async function l(){await SV(u.value),u.value=""}async function c(){s.value="Загрузка...",await IV()}async function d(){s.value="Загрузка...",await TV()}async function h(){var O,T,b;o.value=await OV(),o.value.state==="NEW"&&(s.value="Игра ещё не началась"),o.value.state==="RUN"&&(s.value="Игра идет с "+((O=o.value)==null?void 0:O.startAt.substring(11))),o.value.state==="STOP"&&(s.value="Игра остановлена "+((T=o.value)==null?void 0:T.startAt.substring(11))+" - "+((b=o.value)==null?void 0:b.endAt.substring(11)))}function f(O,T){return T.applications.length-O.applications.length}let p=0;ua(async()=>{a.value=await oS(),p=setInterval(async()=>{a.value=await oS(),a.value.teams.sort(f),await h()},2e3),$w.beforeEach((O,T,b)=>{clearInterval(p),b()})});const v=it({id:0,name:"",password:"",url:"",spendTime:0,applications:[]}),_=it({id:0,name:""});function m(O,T){v.value=O,_.value=T,i.value=!0}async function g(){console.log("confirm"),await $V(v.value.id,_.value.id),i.value=!1}function E(){n.value=!1}function y(){console.log("close"),i.value=!1}function I(){e.value=location.href,t.value="Админ панель",n.value=!0}return(O,T)=>(Oe(),Ne(Qe,null,[at(Gw,null,{default:bn(()=>[W("div",null," Вечерний детектив - "+Xe(s.value),1),W("div",uK,[W("button",{onClick:T[0]||(T[0]=b=>dr($w).push("/editor")),class:"button-menu button-custom-inline"},"Редактор"),W("button",{onClick:c,class:"button-menu button-custom-inline"},"Начать"),W("button",{onClick:d,class:"button-menu button-custom-inline"},"Остановить"),W("button",{onClick:T[1]||(T[1]=(...b)=>dr(aS)&&dr(aS)(...b)),class:"button-menu button-custom-inline"},"Скачать qr‑ы"),W("button",{onClick:I,class:"button-menu button-custom-inline"},"Qr")])]),_:1}),W("div",lK,[T[4]||(T[4]=W("div",{class:"team-header-block"},"Команды",-1)),(Oe(!0),Ne(Qe,null,Xr(a.value.teams,b=>(Oe(),Ne("div",{class:"team-block",key:b.name},[W("div",cK,[W("div",dK,[W("a",{onClick:w=>(e.value=b.url,t.value=b.name,n.value=!0)}," QR ",8,hK),W("a",{href:b.url,class:"url-block",target:"_blank"}," URL ",8,fK),ar(" "+Xe(b.name),1)]),W("div",null,"Поездки: "+Xe(b.spendTime),1)]),(Oe(!0),Ne(Qe,null,Xr(b.applications,w=>(Oe(),Ne("div",{key:w.id,class:"link-button",onClick:R=>m(b,w)}," Выдать: "+Xe(w.name),9,pK))),128))]))),128)),W("form",{onSubmit:Sz(l,["prevent"])},[W("div",null,[Ii(W("input",{class:"input-custom","onUpdate:modelValue":T[2]||(T[2]=b=>u.value=b),type:"text",placeholder:"Название команды"},null,512),[[dn,u.value]])]),T[3]||(T[3]=W("div",{class:"button-container"},[W("button",{class:"button-custom",type:"submit"},"Добавить")],-1))],32)]),at(FS,{"is-open":i.value,onConfirm:g,onClose:y,buttonText:"Выдано"},{default:bn(()=>[W("div",null," Команда: "+Xe(v.value.name),1),W("div",null," Приложение: "+Xe(_.value.name),1)]),_:1},8,["is-open"]),at(FS,{"is-open":n.value,onConfirm:E,onClose:E,buttonText:"Ок",title:"Код"},{default:bn(()=>[at(ZV,{data:e.value,title:t.value},null,8,["data","title"])]),_:1},8,["is-open"])],64))}}),gK=ca(vK,[["__scopeId","data-v-3033f565"]]),mK=pr({__name:"HomeView",setup(r){return(e,t)=>(Oe(),hi(gK))}});/** +`);const S=E(T,b,R),$=r.getSymbolSize(T),q=new i($);return f(q,T),p(q),v(q,T),m(q,b,0),T>=7&&_(q,T),g(q,S),isNaN(w)&&(w=o.getBestMask(q,m.bind(null,q,b))),o.applyMask(w,q),m(q,b,w),{modules:q,version:T,errorCorrectionLevel:b,maskPattern:w,segments:R}}return Ql.create=function(T,b){if(typeof T>"u"||T==="")throw new Error("No input text");let w=e.M,R,P;return typeof b<"u"&&(w=e.from(b.errorCorrectionLevel,e.M),R=l.from(b.version),P=o.from(b.maskPattern),b.toSJISFunc&&r.setToSJISFunction(b.toSJISFunc)),I(T,R,w,P)},Ql}var mc={},yc={},qS;function jz(){return qS||(qS=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)}}(mc)),mc}var bc={},DS;function YV(){if(DS)return bc;DS=1;const r=jz();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="',p='viewBox="0 0 '+d+" "+d+'"',_=''+h+f+` +`;return typeof a=="function"&&a(null,_),_},bc}var MS;function XV(){if(MS)return ns;MS=1;const r=CV(),e=KV(),t=GV(),i=YV();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,p){try{const v=e.create(a,u);f(s(v,o,u))}catch(v){p(v)}})}try{const f=e.create(a,u);l(null,s(f,o,u))}catch(f){l(f)}}return ns.create=e.create,ns.toCanvas=n.bind(null,t.render),ns.toDataURL=n.bind(null,t.renderToDataURL),ns.toString=n.bind(null,function(s,o,a){return i.render(s,a)}),ns}var _c=XV();/*! vue-qrcode v2.0.0 | (c) 2018-present Chen Fengyuan | MIT */const NS="ready";var JV=pr({name:"VueQrcode",props:{value:{type:String,default:void 0},options:{type:Object,default:void 0},tag:{type:String,default:"canvas"}},emits:[NS],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(NS,this.$el)};switch(this.tag){case"canvas":_c.toCanvas(this.$el,e,r,i=>{if(i)throw i;t()});break;case"img":_c.toDataURL(e,r,(i,n)=>{if(i)throw i;this.$el.src=n,this.$el.onload=t});break;case"svg":_c.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 Qu(this.tag,this.$slots.default)}});const QV={key:0,class:"qr"},ZV=pr({__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?(Oe(),Ne("div",QV,[at(dr(JV),{value:r.data,options:dr(bV),tag:"svg"},null,8,["value","options"]),W("div",null,Xe(r.title),1)])):Jr("",!0)}}}),ca=(r,e)=>{const t=r.__vccOpts||r;for(const[i,n]of e)t[i]=n;return t},eK=ca(ZV,[["__scopeId","data-v-eea3ea34"]]),tK={},rK={class:"header-block"};function iK(r,e){return Oe(),Ne("div",rK,[lu(r.$slots,"default",{},void 0)])}const Gw=ca(tK,[["render",iK],["__scopeId","data-v-5b6894ef"]]),nK={class:"modal-wrapper"},sK={class:"modal-header"},oK={class:"modal-body"},aK={class:"modal-footer"},uK=pr({__name:"ModalWindow",props:{isOpen:{type:Boolean,required:!0},title:{type:String,default:"Внимание"},buttonText:{type:String,required:!0}},emits:["close","confirm"],setup(r,{emit:e}){const t=r,i=e,n=()=>{i("close")},s=()=>{i("confirm")},o=a=>{t.isOpen&&a.key==="Escape"&&n()};return ua(()=>{document.addEventListener("keydown",o)}),jw(()=>{document.removeEventListener("keydown",o)}),(a,u)=>(Oe(),hi(CW,{to:"body"},[at(k4,{name:"modal"},{default:bn(()=>[r.isOpen?(Oe(),Ne("div",{key:0,class:"modal-mask",onClick:n},[W("div",nK,[W("div",{class:"modal-container",onClick:u[0]||(u[0]=Sz(()=>{},["stop"]))},[W("div",sK,[lu(a.$slots,"header",{},()=>[W("h3",null,Xe(r.title),1)],!0)]),W("div",oK,[lu(a.$slots,"default",{},()=>[u[1]||(u[1]=ar("Дефолтный текст модального окна"))],!0)]),W("div",aK,[lu(a.$slots,"footer",{},()=>[W("button",{class:"btn-cancel",onClick:n},"Отмена"),W("button",{class:"btn-primary",onClick:s},Xe(r.buttonText),1)],!0)])])])])):Jr("",!0)]),_:3})]))}}),FS=ca(uK,[["__scopeId","data-v-f97ce307"]]),lK={class:"buttons-block"},cK={class:"center-block-custom content-block"},dK={class:"team-content-block"},hK={class:"team-name-block"},fK=["onClick"],pK=["href"],vK=["onClick"],gK=pr({__name:"AdminWindow",setup(r){const e=it("-"),t=it("-"),i=it(!1),n=it(!1),s=it(""),o=it(),a=it({teams:[]}),u=it("");async function l(){await OV(u.value),u.value=""}async function c(){s.value="Загрузка...",await TV()}async function d(){s.value="Загрузка...",await $V()}async function h(){var O,T,b;o.value=await IV(),o.value.state==="NEW"&&(s.value="Игра ещё не началась"),o.value.state==="RUN"&&(s.value="Игра идет с "+((O=o.value)==null?void 0:O.startAt.substring(11))),o.value.state==="STOP"&&(s.value="Игра остановлена "+((T=o.value)==null?void 0:T.startAt.substring(11))+" - "+((b=o.value)==null?void 0:b.endAt.substring(11)))}function f(O,T){return T.applications.length-O.applications.length}let p=0;ua(async()=>{a.value=await oS(),p=setInterval(async()=>{a.value=await oS(),a.value.teams.sort(f),await h()},2e3),$w.beforeEach((O,T,b)=>{clearInterval(p),b()})});const v=it({id:0,name:"",password:"",url:"",spendTime:0,applications:[]}),_=it({id:0,name:""});function m(O,T){v.value=O,_.value=T,i.value=!0}async function g(){console.log("confirm"),await PV(v.value.id,_.value.id),i.value=!1}function E(){n.value=!1}function y(){console.log("close"),i.value=!1}function I(){e.value=location.href,t.value="Админ панель",n.value=!0}return(O,T)=>(Oe(),Ne(Qe,null,[at(Gw,null,{default:bn(()=>[W("div",null," Вечерний детектив - "+Xe(s.value),1),W("div",lK,[W("button",{onClick:T[0]||(T[0]=b=>dr($w).push("/editor")),class:"button-menu button-custom-inline"},"Редактор"),W("button",{onClick:c,class:"button-menu button-custom-inline"},"Начать"),W("button",{onClick:d,class:"button-menu button-custom-inline"},"Остановить"),W("button",{onClick:T[1]||(T[1]=(...b)=>dr(aS)&&dr(aS)(...b)),class:"button-menu button-custom-inline"},"Скачать qr‑ы"),W("button",{onClick:I,class:"button-menu button-custom-inline"},"Qr")])]),_:1}),W("div",cK,[T[4]||(T[4]=W("div",{class:"team-header-block"},"Команды",-1)),(Oe(!0),Ne(Qe,null,Xr(a.value.teams,b=>(Oe(),Ne("div",{class:"team-block",key:b.name},[W("div",dK,[W("div",hK,[W("a",{onClick:w=>(e.value=b.url,t.value=b.name,n.value=!0)}," QR ",8,fK),W("a",{href:b.url,class:"url-block",target:"_blank"}," URL ",8,pK),ar(" "+Xe(b.name),1)]),W("div",null,"Поездки: "+Xe(b.spendTime),1)]),(Oe(!0),Ne(Qe,null,Xr(b.applications,w=>(Oe(),Ne("div",{key:w.id,class:"link-button",onClick:R=>m(b,w)}," Выдать: "+Xe(w.name),9,vK))),128))]))),128)),W("form",{onSubmit:Sz(l,["prevent"])},[W("div",null,[Ii(W("input",{class:"input-custom","onUpdate:modelValue":T[2]||(T[2]=b=>u.value=b),type:"text",placeholder:"Название команды"},null,512),[[dn,u.value]])]),T[3]||(T[3]=W("div",{class:"button-container"},[W("button",{class:"button-custom",type:"submit"},"Добавить")],-1))],32)]),at(FS,{"is-open":i.value,onConfirm:g,onClose:y,buttonText:"Выдано"},{default:bn(()=>[W("div",null," Команда: "+Xe(v.value.name),1),W("div",null," Приложение: "+Xe(_.value.name),1)]),_:1},8,["is-open"]),at(FS,{"is-open":n.value,onConfirm:E,onClose:E,buttonText:"Ок",title:"Код"},{default:bn(()=>[at(eK,{data:e.value,title:t.value},null,8,["data","title"])]),_:1},8,["is-open"])],64))}}),mK=ca(gK,[["__scopeId","data-v-3033f565"]]),yK=pr({__name:"HomeView",setup(r){return(e,t)=>(Oe(),hi(mK))}});/** * vis-data * http://visjs.org/ * @@ -53,14 +53,14 @@ Minimum version required to store current data is: `+P+`. * http://opensource.org/licenses/MIT * * vis.js may be distributed under either license. - */var kS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $e(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var wc={exports:{}},BS={},go,LS;function vt(){if(LS)return go;LS=1;var r=function(e){return e&&e.Math===Math&&e};return go=r(typeof globalThis=="object"&&globalThis)||r(typeof window=="object"&&window)||r(typeof self=="object"&&self)||r(typeof kS=="object"&&kS)||r(typeof go=="object"&&go)||function(){return this}()||Function("return this")(),go}var Ec,jS;function Le(){return jS||(jS=1,Ec=function(r){try{return!!r()}catch{return!0}}),Ec}var Sc,zS;function da(){if(zS)return Sc;zS=1;var r=Le();return Sc=!r(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Sc}var Oc,HS;function el(){if(HS)return Oc;HS=1;var r=da(),e=Function.prototype,t=e.apply,i=e.call;return Oc=typeof Reflect=="object"&&Reflect.apply||(r?i.bind(t):function(){return i.apply(t,arguments)}),Oc}var Ic,WS;function Ue(){if(WS)return Ic;WS=1;var r=da(),e=Function.prototype,t=e.call,i=r&&e.bind.bind(t,t);return Ic=r?i:function(n){return function(){return t.apply(n,arguments)}},Ic}var Tc,US;function vi(){if(US)return Tc;US=1;var r=Ue(),e=r({}.toString),t=r("".slice);return Tc=function(i){return t(e(i),8,-1)},Tc}var $c,VS;function zz(){if(VS)return $c;VS=1;var r=vi(),e=Ue();return $c=function(t){if(r(t)==="Function")return e(t)},$c}var Pc,KS;function St(){if(KS)return Pc;KS=1;var r=typeof document=="object"&&document.all;return Pc=typeof r>"u"&&r!==void 0?function(e){return typeof e=="function"||e===r}:function(e){return typeof e=="function"},Pc}var Rc={},Cc,GS;function gt(){if(GS)return Cc;GS=1;var r=Le();return Cc=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Cc}var xc,YS;function Qt(){if(YS)return xc;YS=1;var r=da(),e=Function.prototype.call;return xc=r?e.bind(e):function(){return e.apply(e,arguments)},xc}var qc={},XS;function Yw(){if(XS)return qc;XS=1;var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!r.call({1:2},1);return qc.f=t?function(n){var s=e(this,n);return!!s&&s.enumerable}:r,qc}var Ac,JS;function ha(){return JS||(JS=1,Ac=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}),Ac}var Dc,QS;function tl(){if(QS)return Dc;QS=1;var r=Ue(),e=Le(),t=vi(),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 Mc,ZS;function fa(){return ZS||(ZS=1,Mc=function(r){return r==null}),Mc}var Nc,eO;function kn(){if(eO)return Nc;eO=1;var r=fa(),e=TypeError;return Nc=function(t){if(r(t))throw new e("Can't call method on "+t);return t},Nc}var Fc,tO;function Wr(){if(tO)return Fc;tO=1;var r=tl(),e=kn();return Fc=function(t){return r(e(t))},Fc}var kc,rO;function Kt(){if(rO)return kc;rO=1;var r=St();return kc=function(e){return typeof e=="object"?e!==null:r(e)},kc}var Bc,iO;function _t(){return iO||(iO=1,Bc={}),Bc}var Lc,nO;function ir(){if(nO)return Lc;nO=1;var r=_t(),e=vt(),t=St(),i=function(n){return t(n)?n:void 0};return Lc=function(n,s){return arguments.length<2?i(r[n])||i(e[n]):r[n]&&r[n][s]||e[n]&&e[n][s]},Lc}var jc,sO;function Ot(){if(sO)return jc;sO=1;var r=Ue();return jc=r({}.isPrototypeOf),jc}var zc,oO;function Fs(){if(oO)return zc;oO=1;var r=vt(),e=r.navigator,t=e&&e.userAgent;return zc=t?String(t):"",zc}var Hc,aO;function pa(){if(aO)return Hc;aO=1;var r=vt(),e=Fs(),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]))),Hc=a,Hc}var Wc,uO;function ks(){if(uO)return Wc;uO=1;var r=pa(),e=Le(),t=vt(),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 Uc,lO;function Hz(){if(lO)return Uc;lO=1;var r=ks();return Uc=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Uc}var Vc,cO;function va(){if(cO)return Vc;cO=1;var r=ir(),e=St(),t=Ot(),i=Hz(),n=Object;return Vc=i?function(s){return typeof s=="symbol"}:function(s){var o=r("Symbol");return e(o)&&t(o.prototype,n(s))},Vc}var Kc,dO;function Bs(){if(dO)return Kc;dO=1;var r=String;return Kc=function(e){try{return r(e)}catch{return"Object"}},Kc}var Gc,hO;function gi(){if(hO)return Gc;hO=1;var r=St(),e=Bs(),t=TypeError;return Gc=function(i){if(r(i))return i;throw new t(e(i)+" is not a function")},Gc}var Yc,fO;function Xw(){if(fO)return Yc;fO=1;var r=gi(),e=fa();return Yc=function(t,i){var n=t[i];return e(n)?void 0:r(n)},Yc}var Xc,pO;function yK(){if(pO)return Xc;pO=1;var r=Qt(),e=St(),t=Kt(),i=TypeError;return Xc=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")},Xc}var Jc={exports:{}},Qc,vO;function Ls(){return vO||(vO=1,Qc=!0),Qc}var Zc,gO;function bK(){if(gO)return Zc;gO=1;var r=vt(),e=Object.defineProperty;return Zc=function(t,i){try{e(r,t,{value:i,configurable:!0,writable:!0})}catch{r[t]=i}return i},Zc}var mO;function Jw(){if(mO)return Jc.exports;mO=1;var r=Ls(),e=vt(),t=bK(),i="__core-js_shared__",n=Jc.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"}),Jc.exports}var ed,yO;function js(){if(yO)return ed;yO=1;var r=Jw();return ed=function(e,t){return r[e]||(r[e]=t||{})},ed}var td,bO;function Cr(){if(bO)return td;bO=1;var r=kn(),e=Object;return td=function(t){return e(r(t))},td}var rd,_O;function It(){if(_O)return rd;_O=1;var r=Ue(),e=Cr(),t=r({}.hasOwnProperty);return rd=Object.hasOwn||function(n,s){return t(e(n),s)},rd}var id,wO;function rl(){if(wO)return id;wO=1;var r=Ue(),e=0,t=Math.random(),i=r(1.1.toString);return id=function(n){return"Symbol("+(n===void 0?"":n)+")_"+i(++e+t,36)},id}var nd,EO;function Tt(){if(EO)return nd;EO=1;var r=vt(),e=js(),t=It(),i=rl(),n=ks(),s=Hz(),o=r.Symbol,a=e("wks"),u=s?o.for||o:o&&o.withoutSetter||i;return nd=function(l){return t(a,l)||(a[l]=n&&t(o,l)?o[l]:u("Symbol."+l)),a[l]},nd}var sd,SO;function Wz(){if(SO)return sd;SO=1;var r=Qt(),e=Kt(),t=va(),i=Xw(),n=yK(),s=Tt(),o=TypeError,a=s("toPrimitive");return sd=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)},sd}var od,OO;function Qw(){if(OO)return od;OO=1;var r=Wz(),e=va();return od=function(t){var i=r(t,"string");return e(i)?i:i+""},od}var ad,IO;function Uz(){if(IO)return ad;IO=1;var r=vt(),e=Kt(),t=r.document,i=e(t)&&e(t.createElement);return ad=function(n){return i?t.createElement(n):{}},ad}var ud,TO;function Vz(){if(TO)return ud;TO=1;var r=gt(),e=Le(),t=Uz();return ud=!r&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),ud}var $O;function il(){if($O)return Rc;$O=1;var r=gt(),e=Qt(),t=Yw(),i=ha(),n=Wr(),s=Qw(),o=It(),a=Vz(),u=Object.getOwnPropertyDescriptor;return Rc.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])},Rc}var ld,PO;function _K(){if(PO)return ld;PO=1;var r=Le(),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 ld=i,ld}var cd,RO;function nl(){if(RO)return cd;RO=1;var r=zz(),e=gi(),t=da(),i=r(r.bind);return cd=function(n,s){return e(n),s===void 0?n:t?i(n,s):function(){return n.apply(s,arguments)}},cd}var dd={},hd,CO;function Kz(){if(CO)return hd;CO=1;var r=gt(),e=Le();return hd=r&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),hd}var fd,xO;function mi(){if(xO)return fd;xO=1;var r=Kt(),e=String,t=TypeError;return fd=function(i){if(r(i))return i;throw new t(e(i)+" is not an object")},fd}var qO;function vr(){if(qO)return dd;qO=1;var r=gt(),e=Vz(),t=Kz(),i=mi(),n=Qw(),s=TypeError,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return dd.f=r?t?function(h,f,p){if(i(h),f=n(f),i(p),typeof h=="function"&&f==="prototype"&&"value"in p&&c in p&&!p[c]){var v=a(h,f);v&&v[c]&&(h[f]=p.value,p={configurable:l in p?p[l]:v[l],enumerable:u in p?p[u]:v[u],writable:!1})}return o(h,f,p)}:o:function(h,f,p){if(i(h),f=n(f),i(p),e)try{return o(h,f,p)}catch{}if("get"in p||"set"in p)throw new s("Accessors not supported");return"value"in p&&(h[f]=p.value),h},dd}var pd,AO;function zs(){if(AO)return pd;AO=1;var r=gt(),e=vr(),t=ha();return pd=r?function(i,n,s){return e.f(i,n,t(1,s))}:function(i,n,s){return i[n]=s,i},pd}var vd,DO;function be(){if(DO)return vd;DO=1;var r=vt(),e=el(),t=zz(),i=St(),n=il().f,s=_K(),o=_t(),a=nl(),u=zs(),l=It(),c=function(d){var h=function(f,p,v){if(this instanceof h){switch(arguments.length){case 0:return new d;case 1:return new d(f);case 2:return new d(f,p)}return new d(f,p,v)}return e(d,this,arguments)};return h.prototype=d.prototype,h};return vd=function(d,h){var f=d.target,p=d.global,v=d.stat,_=d.proto,m=p?r:v?r[f]:r[f]&&r[f].prototype,g=p?o:o[f]||u(o,f,{})[f],E=g.prototype,y,I,O,T,b,w,R,P,S;for(T in h)y=s(p?T:f+(v?".":"#")+T,d.forced),I=!y&&m&&l(m,T),w=g[T],I&&(d.dontCallGetSet?(S=n(m,T),R=S&&S.value):R=m[T]),b=I&&R?R:h[T],!(!y&&!_&&typeof w==typeof b)&&(d.bind&&I?P=a(b,r):d.wrap&&I?P=c(b):_&&i(b)?P=t(b):P=b,(d.sham||b&&b.sham||w&&w.sham)&&u(P,"sham",!0),u(g,T,P),_&&(O=f+"Prototype",l(o,O)||u(o,O,{}),u(o[O],T,b),d.real&&E&&(y||!E[T])&&u(E,T,b)))},vd}var MO;function wK(){if(MO)return BS;MO=1;var r=be(),e=gt(),t=vr().f;return r({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),BS}var NO;function EK(){if(NO)return wc.exports;NO=1,wK();var r=_t(),e=r.Object,t=wc.exports=function(n,s,o){return e.defineProperty(n,s,o)};return e.defineProperty.sham&&(t.sham=!0),wc.exports}var gd,FO;function Gz(){if(FO)return gd;FO=1;var r=EK();return gd=r,gd}var md,kO;function SK(){if(kO)return md;kO=1;var r=Gz();return md=r,md}var yd,BO;function OK(){if(BO)return yd;BO=1;var r=SK();return yd=r,yd}var bd,LO;function IK(){return LO||(LO=1,bd=OK()),bd}var TK=IK(),$K=$e(TK),jO={},_d,zO;function Bn(){if(zO)return _d;zO=1;var r=vi();return _d=Array.isArray||function(t){return r(t)==="Array"},_d}var wd,HO;function PK(){if(HO)return wd;HO=1;var r=Math.ceil,e=Math.floor;return wd=Math.trunc||function(i){var n=+i;return(n>0?e:r)(n)},wd}var Ed,WO;function Hs(){if(WO)return Ed;WO=1;var r=PK();return Ed=function(e){var t=+e;return t!==t||t===0?0:r(t)},Ed}var Sd,UO;function Yz(){if(UO)return Sd;UO=1;var r=Hs(),e=Math.min;return Sd=function(t){var i=r(t);return i>0?e(i,9007199254740991):0},Sd}var Od,VO;function Yi(){if(VO)return Od;VO=1;var r=Yz();return Od=function(e){return r(e.length)},Od}var Id,KO;function Xz(){if(KO)return Id;KO=1;var r=TypeError,e=9007199254740991;return Id=function(t){if(t>e)throw r("Maximum allowed index exceeded");return t},Id}var Td,GO;function sl(){if(GO)return Td;GO=1;var r=gt(),e=vr(),t=ha();return Td=function(i,n,s){r?e.f(i,n,t(0,s)):i[n]=s},Td}var $d,YO;function Zw(){if(YO)return $d;YO=1;var r=Tt(),e=r("toStringTag"),t={};return t[e]="z",$d=String(t)==="[object z]",$d}var Pd,XO;function Xi(){if(XO)return Pd;XO=1;var r=Zw(),e=St(),t=vi(),i=Tt(),n=i("toStringTag"),s=Object,o=t(function(){return arguments}())==="Arguments",a=function(u,l){try{return u[l]}catch{}};return Pd=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},Pd}var Rd,JO;function RK(){if(JO)return Rd;JO=1;var r=Ue(),e=St(),t=Jw(),i=r(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(n){return i(n)}),Rd=t.inspectSource,Rd}var Cd,QO;function Jz(){if(QO)return Cd;QO=1;var r=Ue(),e=Le(),t=St(),i=Xi(),n=ir(),s=RK(),o=function(){},a=n("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=r(u.exec),c=!u.test(o),d=function(p){if(!t(p))return!1;try{return a(o,[],p),!0}catch{return!1}},h=function(p){if(!t(p))return!1;switch(i(p)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,s(p))}catch{return!0}};return h.sham=!0,Cd=!a||e(function(){var f;return d(d.call)||!d(Object)||!d(function(){f=!0})||f})?h:d,Cd}var xd,ZO;function CK(){if(ZO)return xd;ZO=1;var r=Bn(),e=Jz(),t=Kt(),i=Tt(),n=i("species"),s=Array;return xd=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},xd}var qd,eI;function e0(){if(eI)return qd;eI=1;var r=CK();return qd=function(e,t){return new(r(e))(t===0?0:t)},qd}var Ad,tI;function ga(){if(tI)return Ad;tI=1;var r=Le(),e=Tt(),t=pa(),i=e("species");return Ad=function(n){return t>=51||!r(function(){var s=[],o=s.constructor={};return o[i]=function(){return{foo:1}},s[n](Boolean).foo!==1})},Ad}var rI;function Qz(){if(rI)return jO;rI=1;var r=be(),e=Le(),t=Bn(),i=Kt(),n=Cr(),s=Yi(),o=Xz(),a=sl(),u=e0(),l=ga(),c=Tt(),d=pa(),h=c("isConcatSpreadable"),f=d>=51||!e(function(){var _=[];return _[h]=!1,_.concat()[0]!==_}),p=function(_){if(!i(_))return!1;var m=_[h];return m!==void 0?!!m:t(_)},v=!f||!l("concat");return r({target:"Array",proto:!0,arity:1,forced:v},{concat:function(m){var g=n(this),E=u(g,0),y=0,I,O,T,b,w;for(I=-1,T=arguments.length;Ic;)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 kd,uI;function ma(){return uI||(uI=1,kd={}),kd}var Bd,lI;function Zz(){if(lI)return Bd;lI=1;var r=Ue(),e=It(),t=Wr(),i=xK().indexOf,n=ma(),s=r([].push);return Bd=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},Bd}var Ld,cI;function r0(){return cI||(cI=1,Ld=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Ld}var jd,dI;function ol(){if(dI)return jd;dI=1;var r=Zz(),e=r0();return jd=Object.keys||function(i){return r(i,e)},jd}var hI;function i0(){if(hI)return Md;hI=1;var r=gt(),e=Kz(),t=vr(),i=mi(),n=Wr(),s=ol();return Md.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},Md}var zd,fI;function qK(){if(fI)return zd;fI=1;var r=ir();return zd=r("document","documentElement"),zd}var Hd,pI;function al(){if(pI)return Hd;pI=1;var r=js(),e=rl(),t=r("keys");return Hd=function(i){return t[i]||(t[i]=e(i))},Hd}var Wd,vI;function ya(){if(vI)return Wd;vI=1;var r=mi(),e=i0(),t=r0(),i=ma(),n=qK(),s=Uz(),o=al(),a=">",u="<",l="prototype",c="script",d=o("IE_PROTO"),h=function(){},f=function(g){return u+c+a+g+u+"/"+c+a},p=function(g){g.write(f("")),g.close();var E=g.parentWindow.Object;return g=null,E},v=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&&_?p(_):v():p(_);for(var g=t.length;g--;)delete m[l][t[g]];return m()};return i[d]=!0,Wd=Object.create||function(E,y){var I;return E!==null?(h[l]=r(E),I=new h,h[l]=null,I[d]=E):I=m(),y===void 0?I:e.f(I,y)},Wd}var Ud={},gI;function ul(){if(gI)return Ud;gI=1;var r=Zz(),e=r0(),t=e.concat("length","prototype");return Ud.f=Object.getOwnPropertyNames||function(n){return r(n,t)},Ud}var Vd={},Kd,mI;function Ws(){if(mI)return Kd;mI=1;var r=Ue();return Kd=r([].slice),Kd}var yI;function e3(){if(yI)return Vd;yI=1;var r=vi(),e=Wr(),t=ul().f,i=Ws(),n=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(o){try{return t(o)}catch{return i(n)}};return Vd.f=function(a){return n&&r(a)==="Window"?s(a):t(e(a))},Vd}var Gd={},bI;function ll(){return bI||(bI=1,Gd.f=Object.getOwnPropertySymbols),Gd}var Yd,_I;function ba(){if(_I)return Yd;_I=1;var r=zs();return Yd=function(e,t,i,n){return n&&n.enumerable?e[t]=i:r(e,t,i),e},Yd}var Xd,wI;function n0(){if(wI)return Xd;wI=1;var r=vr();return Xd=function(e,t,i){return r.f(e,t,i)},Xd}var Jd={},EI;function cl(){if(EI)return Jd;EI=1;var r=Tt();return Jd.f=r,Jd}var Qd,SI;function et(){if(SI)return Qd;SI=1;var r=_t(),e=It(),t=cl(),i=vr().f;return Qd=function(n){var s=r.Symbol||(r.Symbol={});e(s,n)||i(s,n,{value:t.f(n)})},Qd}var Zd,OI;function t3(){if(OI)return Zd;OI=1;var r=Qt(),e=ir(),t=Tt(),i=ba();return Zd=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})},Zd}var eh,II;function AK(){if(II)return eh;II=1;var r=Zw(),e=Xi();return eh=r?{}.toString:function(){return"[object "+e(this)+"]"},eh}var th,TI;function Ln(){if(TI)return th;TI=1;var r=Zw(),e=vr().f,t=zs(),i=It(),n=AK(),s=Tt(),o=s("toStringTag");return th=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))},th}var rh,$I;function DK(){if($I)return rh;$I=1;var r=vt(),e=St(),t=r.WeakMap;return rh=e(t)&&/native code/.test(String(t)),rh}var ih,PI;function _a(){if(PI)return ih;PI=1;var r=DK(),e=vt(),t=Kt(),i=zs(),n=It(),s=Jw(),o=al(),a=ma(),u="Object already initialized",l=e.TypeError,c=e.WeakMap,d,h,f,p=function(g){return f(g)?h(g):d(g,{})},v=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 ih={set:d,get:h,has:f,enforce:p,getterFor:v},ih}var nh,RI;function Us(){if(RI)return nh;RI=1;var r=nl(),e=Ue(),t=tl(),i=Cr(),n=Yi(),s=e0(),o=e([].push),a=function(u){var l=u===1,c=u===2,d=u===3,h=u===4,f=u===6,p=u===7,v=u===5||f;return function(_,m,g,E){for(var y=i(_),I=t(y),O=n(I),T=r(m,g),b=0,w=E||s,R=l?w(_,O):c||p?w(_,0):void 0,P,S;O>b;b++)if((v||b in I)&&(P=I[b],S=T(P,b,y),u))if(l)R[b]=S;else if(S)switch(u){case 3:return!0;case 5:return P;case 6:return b;case 2:o(R,P)}else switch(u){case 4:return!1;case 7:o(R,P)}return f?-1:d||h?h:R}};return nh={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},nh}var CI;function MK(){if(CI)return nI;CI=1;var r=be(),e=vt(),t=Qt(),i=Ue(),n=Ls(),s=gt(),o=ks(),a=Le(),u=It(),l=Ot(),c=mi(),d=Wr(),h=Qw(),f=Ji(),p=ha(),v=ya(),_=ol(),m=ul(),g=e3(),E=ll(),y=il(),I=vr(),O=i0(),T=Yw(),b=ba(),w=n0(),R=js(),P=al(),S=ma(),$=rl(),q=Tt(),F=cl(),Z=et(),z=t3(),te=Ln(),ve=_a(),we=Us().forEach,re=P("hidden"),me="Symbol",qe="prototype",De=ve.set,ct=ve.getterFor(me),_e=Object[qe],D=e.Symbol,U=D&&D[qe],X=e.RangeError,ne=e.TypeError,Re=e.QObject,C=y.f,x=I.f,A=g.f,k=T.f,B=i([].push),N=R("symbols"),G=R("op-symbols"),J=R("wks"),V=!Re||!Re[qe]||!Re[qe].findChild,L=function(ae,K,ee){var ie=C(_e,K);ie&&delete _e[K],x(ae,K,ee),ie&&ae!==_e&&x(_e,K,ie)},ce=s&&a(function(){return v(x({},"a",{get:function(){return x(this,"a",{value:7}).a}})).a!==7})?L:x,Q=function(ae,K){var ee=N[ae]=v(U);return De(ee,{type:me,tag:ae,description:K}),s||(ee.description=K),ee},oe=function(K,ee,ie){K===_e&&oe(G,ee,ie),c(K);var se=h(ee);return c(ie),u(N,se)?(ie.enumerable?(u(K,re)&&K[re][se]&&(K[re][se]=!1),ie=v(ie,{enumerable:p(0,!1)})):(u(K,re)||x(K,re,p(1,v(null))),K[re][se]=!0),ce(K,se,ie)):x(K,se,ie)},he=function(K,ee){c(K);var ie=d(ee),se=_(ie).concat(dt(ie));return we(se,function(Ee){(!s||t(Ae,ie,Ee))&&oe(K,Ee,ie[Ee])}),K},Ie=function(K,ee){return ee===void 0?v(K):he(v(K),ee)},Ae=function(K){var ee=h(K),ie=t(k,this,ee);return this===_e&&u(N,ee)&&!u(G,ee)?!1:ie||!u(this,ee)||!u(N,ee)||u(this,re)&&this[re][ee]?ie:!0},Ce=function(K,ee){var ie=d(K),se=h(ee);if(!(ie===_e&&u(N,se)&&!u(G,se))){var Ee=C(ie,se);return Ee&&u(N,se)&&!(u(ie,re)&&ie[re][se])&&(Ee.enumerable=!0),Ee}},bt=function(K){var ee=A(d(K)),ie=[];return we(ee,function(se){!u(N,se)&&!u(S,se)&&B(ie,se)}),ie},dt=function(ae){var K=ae===_e,ee=A(K?G:d(ae)),ie=[];return we(ee,function(se){u(N,se)&&(!K||u(_e,se))&&B(ie,N[se])}),ie};return o||(D=function(){if(l(U,this))throw new ne("Symbol is not a constructor");var K=!arguments.length||arguments[0]===void 0?void 0:f(arguments[0]),ee=$(K),ie=function(se){var Ee=this===void 0?e:this;Ee===_e&&t(ie,G,se),u(Ee,re)&&u(Ee[re],ee)&&(Ee[re][ee]=!1);var wi=p(1,se);try{ce(Ee,ee,wi)}catch(co){if(!(co instanceof X))throw co;L(Ee,ee,wi)}};return s&&V&&ce(_e,ee,{configurable:!0,set:ie}),Q(ee,K)},U=D[qe],b(U,"toString",function(){return ct(this).tag}),b(D,"withoutSetter",function(ae){return Q($(ae),ae)}),T.f=Ae,I.f=oe,O.f=he,y.f=Ce,m.f=g.f=bt,E.f=dt,F.f=function(ae){return Q(q(ae),ae)},s&&(w(U,"description",{configurable:!0,get:function(){return ct(this).description}}),n||b(_e,"propertyIsEnumerable",Ae,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:D}),we(_(J),function(ae){Z(ae)}),r({target:me,stat:!0,forced:!o},{useSetter:function(){V=!0},useSimple:function(){V=!1}}),r({target:"Object",stat:!0,forced:!o,sham:!s},{create:Ie,defineProperty:oe,defineProperties:he,getOwnPropertyDescriptor:Ce}),r({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:bt}),z(),te(D,me),S[re]=!0,nI}var xI={},sh,qI;function r3(){if(qI)return sh;qI=1;var r=ks();return sh=r&&!!Symbol.for&&!!Symbol.keyFor,sh}var AI;function NK(){if(AI)return xI;AI=1;var r=be(),e=ir(),t=It(),i=Ji(),n=js(),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}}),xI}var DI={},MI;function FK(){if(MI)return DI;MI=1;var r=be(),e=It(),t=va(),i=Bs(),n=js(),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]}}),DI}var NI={},oh,FI;function kK(){if(FI)return oh;FI=1;var r=Ue(),e=Bn(),t=St(),i=vi(),n=Ji(),s=r([].push);return oh=function(o){if(t(o))return o;if(e(o)){for(var a=o.length,u=[],l=0;l=p.length)return f.target=null,o(void 0,!0);switch(f.kind){case"keys":return o(v,!1);case"values":return o(p[v],!1)}return o([v,p[v]],!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 wh}var Eh,NT;function aG(){return NT||(NT=1,Eh={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}),Eh}var FT;function Zi(){if(FT)return wT;FT=1,Qi();var r=aG(),e=vt(),t=Ln(),i=Vs();for(var n in r)t(e[n],n),i[n]=i.Array;return wT}var Sh,kT;function d3(){if(kT)return Sh;kT=1;var r=QK();return Zi(),Sh=r,Sh}var BT={},LT;function uG(){if(LT)return BT;LT=1;var r=Tt(),e=vr().f,t=r("metadata"),i=Function.prototype;return i[t]===void 0&&e(i,t,{value:null}),BT}var jT={},zT;function lG(){return zT||(zT=1,s3()),jT}var HT={},WT;function cG(){return WT||(WT=1,o3()),HT}var UT={},VT;function dG(){if(VT)return UT;VT=1;var r=et();return r("metadata"),UT}var Oh,KT;function hG(){if(KT)return Oh;KT=1;var r=d3();return uG(),lG(),cG(),dG(),Oh=r,Oh}var GT={},Ih,YT;function h3(){if(YT)return Ih;YT=1;var r=ir(),e=Ue(),t=r("Symbol"),i=t.keyFor,n=e(t.prototype.valueOf);return Ih=t.isRegisteredSymbol||function(o){try{return i(n(o))!==void 0}catch{return!1}},Ih}var XT;function fG(){if(XT)return GT;XT=1;var r=be(),e=h3();return r({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),GT}var JT={},Th,QT;function f3(){if(QT)return Th;QT=1;for(var r=js(),e=ir(),t=Ue(),i=va(),n=Tt(),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:(p=s(d,h),p<55296||p>56319||h+1===f||(v=s(d,h+1))<56320||v>57343?u?n(d,h):p:u?o(d,h,h+2):(p-55296<<10)+(v-56320)+65536)}};return Rh={codeAt:a(!1),charAt:a(!0)},Rh}var _$;function dl(){if(_$)return y$;_$=1;var r=TG().charAt,e=Ji(),t=_a(),i=s0(),n=o0(),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))}),y$}var Ch,w$;function $G(){if(w$)return Ch;w$=1,Qi(),dl(),a3();var r=cl();return Ch=r.f("iterator"),Ch}var xh,E$;function p3(){if(E$)return xh;E$=1;var r=$G();return Zi(),xh=r,xh}var qh,S$;function PG(){if(S$)return qh;S$=1;var r=p3();return qh=r,qh}var Ah,O$;function RG(){if(O$)return Ah;O$=1;var r=PG();return Ah=r,Ah}var Dh,I$;function CG(){return I$||(I$=1,Dh=RG()),Dh}var xG=CG(),qG=$e(xG);function Go(r){"@babel/helpers - typeof";return Go=typeof Za=="function"&&typeof qG=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Za=="function"&&e.constructor===Za&&e!==Za.prototype?"symbol":typeof e},Go(r)}var Mh,T$;function AG(){if(T$)return Mh;T$=1,u3();var r=cl();return Mh=r.f("toPrimitive"),Mh}var Nh,$$;function DG(){if($$)return Nh;$$=1;var r=AG();return Nh=r,Nh}var Fh,P$;function MG(){if(P$)return Fh;P$=1;var r=DG();return Fh=r,Fh}var kh,R$;function NG(){if(R$)return kh;R$=1;var r=MG();return kh=r,kh}var Bh,C$;function FG(){return C$||(C$=1,Bh=NG()),Bh}var kG=FG(),BG=$e(kG);function LG(r,e){if(Go(r)!="object"||!r)return r;var t=r[BG];if(t!==void 0){var i=t.call(r,e);if(Go(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function jG(r){var e=LG(r,"string");return Go(e)=="symbol"?e:e+""}function Ni(r,e,t){return(e=jG(e))in r?$K(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var x$={},Lh,q$;function zG(){if(q$)return Lh;q$=1;var r=Ue(),e=gi(),t=Kt(),i=It(),n=Ws(),s=da(),o=Function,a=r([].concat),u=r([].join),l={},c=function(d,h,f){if(!i(l,h)){for(var p=[],v=0;v=0:p>v;v+=_)v in f&&(d=l(d,f[v],v,h));return d}};return Vh={left:o(!1),right:o(!0)},Vh}var Kh,j$;function hl(){if(j$)return Kh;j$=1;var r=Le();return Kh=function(e,t){var i=[][e];return!!i&&r(function(){i.call(null,t||function(){return 1},1)})},Kh}var Gh,z$;function g3(){if(z$)return Gh;z$=1;var r=vt(),e=Fs(),t=vi(),i=function(n){return e.slice(0,n.length)===n};return Gh=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"}(),Gh}var Yh,H$;function XG(){if(H$)return Yh;H$=1;var r=g3();return Yh=r==="NODE",Yh}var W$;function JG(){if(W$)return B$;W$=1;var r=be(),e=YG().left,t=hl(),i=pa(),n=XG(),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)}}),B$}var Xh,U$;function QG(){if(U$)return Xh;U$=1,JG();var r=Zt();return Xh=r("Array","reduce"),Xh}var Jh,V$;function ZG(){if(V$)return Jh;V$=1;var r=Ot(),e=QG(),t=Array.prototype;return Jh=function(i){var n=i.reduce;return i===t||r(t,i)&&n===t.reduce?e:n},Jh}var Qh,K$;function e6(){if(K$)return Qh;K$=1;var r=ZG();return Qh=r,Qh}var Zh,G$;function t6(){return G$||(G$=1,Zh=e6()),Zh}var r6=t6(),i6=$e(r6),Y$={},X$;function n6(){if(X$)return Y$;X$=1;var r=be(),e=Us().filter,t=ga(),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)}}),Y$}var ef,J$;function s6(){if(J$)return ef;J$=1,n6();var r=Zt();return ef=r("Array","filter"),ef}var tf,Q$;function o6(){if(Q$)return tf;Q$=1;var r=Ot(),e=s6(),t=Array.prototype;return tf=function(i){var n=i.filter;return i===t||r(t,i)&&n===t.filter?e:n},tf}var rf,Z$;function a6(){if(Z$)return rf;Z$=1;var r=o6();return rf=r,rf}var nf,eP;function u6(){return eP||(eP=1,nf=a6()),nf}var l6=u6(),cs=$e(l6),tP={},rP;function c6(){if(rP)return tP;rP=1;var r=be(),e=Us().map,t=ga(),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)}}),tP}var sf,iP;function d6(){if(iP)return sf;iP=1,c6();var r=Zt();return sf=r("Array","map"),sf}var of,nP;function h6(){if(nP)return of;nP=1;var r=Ot(),e=d6(),t=Array.prototype;return of=function(i){var n=i.map;return i===t||r(t,i)&&n===t.map?e:n},of}var af,sP;function f6(){if(sP)return af;sP=1;var r=h6();return af=r,af}var uf,oP;function p6(){return oP||(oP=1,uf=f6()),uf}var v6=p6(),wr=$e(v6),lf,aP;function g6(){return aP||(aP=1,lf=d3()),lf}var m6=g6(),y6=$e(m6),uP={},lP;function b6(){if(lP)return uP;lP=1;var r=be(),e=Bn(),t=Jz(),i=Kt(),n=t0(),s=Yi(),o=Wr(),a=sl(),u=Tt(),l=ga(),c=Ws(),d=l("slice"),h=u("species"),f=Array,p=Math.max;return r({target:"Array",proto:!0,forced:!d},{slice:function(_,m){var g=o(this),E=s(g),y=n(_,E),I=n(m===void 0?E:m,E),O,T,b;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,y,I);for(T=new(O===void 0?f:O)(p(I-y,0)),b=0;y1?arguments[1]:void 0)},Of}var qP;function H6(){if(qP)return CP;qP=1;var r=be(),e=z6();return r({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),CP}var If,AP;function W6(){if(AP)return If;AP=1,H6();var r=Zt();return If=r("Array","forEach"),If}var Tf,DP;function U6(){if(DP)return Tf;DP=1;var r=W6();return Tf=r,Tf}var $f,MP;function V6(){if(MP)return $f;MP=1;var r=Xi(),e=It(),t=Ot(),i=U6(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return $f=function(o){var a=o.forEach;return o===n||t(n,o)&&a===n.forEach||e(s,r(o))?i:a},$f}var Pf,NP;function K6(){return NP||(NP=1,Pf=V6()),Pf}var G6=K6(),$n=$e(G6),FP={},kP;function Y6(){if(kP)return FP;kP=1;var r=be(),e=Ue(),t=Bn(),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)}}),FP}var Rf,BP;function X6(){if(BP)return Rf;BP=1,Y6();var r=Zt();return Rf=r("Array","reverse"),Rf}var Cf,LP;function J6(){if(LP)return Cf;LP=1;var r=Ot(),e=X6(),t=Array.prototype;return Cf=function(i){var n=i.reverse;return i===t||r(t,i)&&n===t.reverse?e:n},Cf}var xf,jP;function Q6(){if(jP)return xf;jP=1;var r=J6();return xf=r,xf}var qf,zP;function Z6(){return zP||(zP=1,qf=Q6()),qf}var e8=Z6(),t8=$e(e8),HP={},Af,WP;function r8(){if(WP)return Af;WP=1;var r=gt(),e=Bn(),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 Af=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},Af}var Df,UP;function y3(){if(UP)return Df;UP=1;var r=Bs(),e=TypeError;return Df=function(t,i){if(!delete t[i])throw new e("Cannot delete property "+r(i)+" of "+r(t))},Df}var VP;function i8(){if(VP)return HP;VP=1;var r=be(),e=Cr(),t=t0(),i=Hs(),n=Yi(),s=r8(),o=Xz(),a=e0(),u=sl(),l=y3(),c=ga(),d=c("splice"),h=Math.max,f=Math.min;return r({target:"Array",proto:!0,forced:!d},{splice:function(v,_){var m=e(this),g=n(m),E=t(v,g),y=arguments.length,I,O,T,b,w,R;for(y===0?I=O=0:y===1?(I=0,O=g-E):(I=y-2,O=f(h(i(_),0),g-E)),o(g+I-O),T=a(m,O),b=0;bg-O+I;b--)l(m,b-1)}else if(I>O)for(b=g-O;b>E;b--)w=b+O-1,R=b+I-1,w in m?m[R]=m[w]:l(m,R);for(b=0;bm;)for(var y=u(arguments[m++]),I=g?d(n(y),g(y)):n(y),O=I.length,T=0,b;O>T;)b=I[T++],(!r||t(E,y,b))&&(v[b]=y[b]);return v}:l,Bf}var ZP;function c8(){if(ZP)return JP;ZP=1;var r=be(),e=l8();return r({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e}),JP}var Lf,eR;function d8(){if(eR)return Lf;eR=1,c8();var r=_t();return Lf=r.Object.assign,Lf}var jf,tR;function h8(){if(tR)return jf;tR=1;var r=d8();return jf=r,jf}var zf,rR;function f8(){return rR||(rR=1,zf=h8()),zf}var p8=f8(),v8=$e(p8),Hf,iR;function g8(){if(iR)return Hf;iR=1,Qz();var r=Zt();return Hf=r("Array","concat"),Hf}var Wf,nR;function m8(){if(nR)return Wf;nR=1;var r=Ot(),e=g8(),t=Array.prototype;return Wf=function(i){var n=i.concat;return i===t||r(t,i)&&n===t.concat?e:n},Wf}var Uf,sR;function y8(){if(sR)return Uf;sR=1;var r=m8();return Uf=r,Uf}var Vf,oR;function b8(){return oR||(oR=1,Vf=y8()),Vf}var _8=b8(),w8=$e(_8),aR={},uR;function E8(){if(uR)return aR;uR=1;var r=be(),e=gt(),t=ya();return r({target:"Object",stat:!0,sham:!e},{create:t}),aR}var Kf,lR;function S8(){if(lR)return Kf;lR=1,E8();var r=_t(),e=r.Object;return Kf=function(i,n){return e.create(i,n)},Kf}var Gf,cR;function O8(){if(cR)return Gf;cR=1;var r=S8();return Gf=r,Gf}var Yf,dR;function I8(){return dR||(dR=1,Yf=O8()),Yf}var T8=I8(),$8=$e(T8),hR={},Xf,fR;function P8(){if(fR)return Xf;fR=1;var r=Hs(),e=Ji(),t=kn(),i=RangeError;return Xf=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},Xf}var Jf,pR;function R8(){if(pR)return Jf;pR=1;var r=Ue(),e=Yz(),t=Ji(),i=P8(),n=kn(),s=r(i),o=r("".slice),a=Math.ceil,u=function(l){return function(c,d,h){var f=t(n(c)),p=e(d),v=f.length,_=h===void 0?" ":t(h),m,g;return p<=v||_===""?f:(m=p-v,g=s(_,a(m/_.length)),g.length>m&&(g=o(g,0,m)),l?f+g:g+f)}};return Jf={start:u(!1),end:u(!0)},Jf}var Qf,vR;function C8(){if(vR)return Qf;vR=1;var r=Ue(),e=Le(),t=R8().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),p=r(o.getUTCMonth),v=r(o.getUTCSeconds);return Qf=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(p(m)+1,2,0)+"-"+t(l(m),2,0)+"T"+t(d(m),2,0)+":"+t(f(m),2,0)+":"+t(v(m),2,0)+"."+t(E,3,0)+"Z"}:a,Qf}var gR;function x8(){if(gR)return hR;gR=1;var r=be(),e=Qt(),t=Cr(),i=Wz(),n=C8(),s=vi(),o=Le(),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()}}),hR}var Zf,mR;function q8(){if(mR)return Zf;mR=1,x8(),i3();var r=_t(),e=el();return r.JSON||(r.JSON={stringify:JSON.stringify}),Zf=function(i,n,s){return e(r.JSON.stringify,null,arguments)},Zf}var ep,yR;function A8(){if(yR)return ep;yR=1;var r=q8();return ep=r,ep}var tp,bR;function D8(){return bR||(bR=1,tp=A8()),tp}var M8=D8(),N8=$e(M8),_R={},wR={},rp,ER;function F8(){if(ER)return rp;ER=1;var r=TypeError;return rp=function(e,t){if(ed,v=t(h)?h:a(h),_=p?s(arguments,d):[],m=p?function(){e(v,this,_)}:v;return c?l(m,f):l(m)}:l},ip}var OR;function k8(){if(OR)return wR;OR=1;var r=be(),e=vt(),t=_3(),i=t(e.setInterval,!0);return r({global:!0,bind:!0,forced:e.setInterval!==i},{setInterval:i}),wR}var IR={},TR;function B8(){if(TR)return IR;TR=1;var r=be(),e=vt(),t=_3(),i=t(e.setTimeout,!0);return r({global:!0,bind:!0,forced:e.setTimeout!==i},{setTimeout:i}),IR}var $R;function L8(){return $R||($R=1,k8(),B8()),_R}var np,PR;function j8(){if(PR)return np;PR=1,L8();var r=_t();return np=r.setTimeout,np}var sp,RR;function z8(){return RR||(RR=1,sp=j8()),sp}var H8=z8(),W8=$e(H8),op={exports:{}},CR;function U8(){return CR||(CR=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}(op)),op.exports}var V8=U8(),K8=$e(V8);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 + */var kS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $e(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var wc={exports:{}},BS={},go,LS;function vt(){if(LS)return go;LS=1;var r=function(e){return e&&e.Math===Math&&e};return go=r(typeof globalThis=="object"&&globalThis)||r(typeof window=="object"&&window)||r(typeof self=="object"&&self)||r(typeof kS=="object"&&kS)||r(typeof go=="object"&&go)||function(){return this}()||Function("return this")(),go}var Ec,jS;function Le(){return jS||(jS=1,Ec=function(r){try{return!!r()}catch{return!0}}),Ec}var Sc,zS;function da(){if(zS)return Sc;zS=1;var r=Le();return Sc=!r(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Sc}var Oc,HS;function el(){if(HS)return Oc;HS=1;var r=da(),e=Function.prototype,t=e.apply,i=e.call;return Oc=typeof Reflect=="object"&&Reflect.apply||(r?i.bind(t):function(){return i.apply(t,arguments)}),Oc}var Ic,WS;function Ue(){if(WS)return Ic;WS=1;var r=da(),e=Function.prototype,t=e.call,i=r&&e.bind.bind(t,t);return Ic=r?i:function(n){return function(){return t.apply(n,arguments)}},Ic}var Tc,US;function vi(){if(US)return Tc;US=1;var r=Ue(),e=r({}.toString),t=r("".slice);return Tc=function(i){return t(e(i),8,-1)},Tc}var $c,VS;function zz(){if(VS)return $c;VS=1;var r=vi(),e=Ue();return $c=function(t){if(r(t)==="Function")return e(t)},$c}var Pc,KS;function St(){if(KS)return Pc;KS=1;var r=typeof document=="object"&&document.all;return Pc=typeof r>"u"&&r!==void 0?function(e){return typeof e=="function"||e===r}:function(e){return typeof e=="function"},Pc}var Rc={},Cc,GS;function gt(){if(GS)return Cc;GS=1;var r=Le();return Cc=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Cc}var xc,YS;function Qt(){if(YS)return xc;YS=1;var r=da(),e=Function.prototype.call;return xc=r?e.bind(e):function(){return e.apply(e,arguments)},xc}var qc={},XS;function Yw(){if(XS)return qc;XS=1;var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!r.call({1:2},1);return qc.f=t?function(n){var s=e(this,n);return!!s&&s.enumerable}:r,qc}var Ac,JS;function ha(){return JS||(JS=1,Ac=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}),Ac}var Dc,QS;function tl(){if(QS)return Dc;QS=1;var r=Ue(),e=Le(),t=vi(),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 Mc,ZS;function fa(){return ZS||(ZS=1,Mc=function(r){return r==null}),Mc}var Nc,eO;function kn(){if(eO)return Nc;eO=1;var r=fa(),e=TypeError;return Nc=function(t){if(r(t))throw new e("Can't call method on "+t);return t},Nc}var Fc,tO;function Wr(){if(tO)return Fc;tO=1;var r=tl(),e=kn();return Fc=function(t){return r(e(t))},Fc}var kc,rO;function Kt(){if(rO)return kc;rO=1;var r=St();return kc=function(e){return typeof e=="object"?e!==null:r(e)},kc}var Bc,iO;function _t(){return iO||(iO=1,Bc={}),Bc}var Lc,nO;function ir(){if(nO)return Lc;nO=1;var r=_t(),e=vt(),t=St(),i=function(n){return t(n)?n:void 0};return Lc=function(n,s){return arguments.length<2?i(r[n])||i(e[n]):r[n]&&r[n][s]||e[n]&&e[n][s]},Lc}var jc,sO;function Ot(){if(sO)return jc;sO=1;var r=Ue();return jc=r({}.isPrototypeOf),jc}var zc,oO;function Fs(){if(oO)return zc;oO=1;var r=vt(),e=r.navigator,t=e&&e.userAgent;return zc=t?String(t):"",zc}var Hc,aO;function pa(){if(aO)return Hc;aO=1;var r=vt(),e=Fs(),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]))),Hc=a,Hc}var Wc,uO;function ks(){if(uO)return Wc;uO=1;var r=pa(),e=Le(),t=vt(),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 Uc,lO;function Hz(){if(lO)return Uc;lO=1;var r=ks();return Uc=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Uc}var Vc,cO;function va(){if(cO)return Vc;cO=1;var r=ir(),e=St(),t=Ot(),i=Hz(),n=Object;return Vc=i?function(s){return typeof s=="symbol"}:function(s){var o=r("Symbol");return e(o)&&t(o.prototype,n(s))},Vc}var Kc,dO;function Bs(){if(dO)return Kc;dO=1;var r=String;return Kc=function(e){try{return r(e)}catch{return"Object"}},Kc}var Gc,hO;function gi(){if(hO)return Gc;hO=1;var r=St(),e=Bs(),t=TypeError;return Gc=function(i){if(r(i))return i;throw new t(e(i)+" is not a function")},Gc}var Yc,fO;function Xw(){if(fO)return Yc;fO=1;var r=gi(),e=fa();return Yc=function(t,i){var n=t[i];return e(n)?void 0:r(n)},Yc}var Xc,pO;function bK(){if(pO)return Xc;pO=1;var r=Qt(),e=St(),t=Kt(),i=TypeError;return Xc=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")},Xc}var Jc={exports:{}},Qc,vO;function Ls(){return vO||(vO=1,Qc=!0),Qc}var Zc,gO;function _K(){if(gO)return Zc;gO=1;var r=vt(),e=Object.defineProperty;return Zc=function(t,i){try{e(r,t,{value:i,configurable:!0,writable:!0})}catch{r[t]=i}return i},Zc}var mO;function Jw(){if(mO)return Jc.exports;mO=1;var r=Ls(),e=vt(),t=_K(),i="__core-js_shared__",n=Jc.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"}),Jc.exports}var ed,yO;function js(){if(yO)return ed;yO=1;var r=Jw();return ed=function(e,t){return r[e]||(r[e]=t||{})},ed}var td,bO;function Cr(){if(bO)return td;bO=1;var r=kn(),e=Object;return td=function(t){return e(r(t))},td}var rd,_O;function It(){if(_O)return rd;_O=1;var r=Ue(),e=Cr(),t=r({}.hasOwnProperty);return rd=Object.hasOwn||function(n,s){return t(e(n),s)},rd}var id,wO;function rl(){if(wO)return id;wO=1;var r=Ue(),e=0,t=Math.random(),i=r(1.1.toString);return id=function(n){return"Symbol("+(n===void 0?"":n)+")_"+i(++e+t,36)},id}var nd,EO;function Tt(){if(EO)return nd;EO=1;var r=vt(),e=js(),t=It(),i=rl(),n=ks(),s=Hz(),o=r.Symbol,a=e("wks"),u=s?o.for||o:o&&o.withoutSetter||i;return nd=function(l){return t(a,l)||(a[l]=n&&t(o,l)?o[l]:u("Symbol."+l)),a[l]},nd}var sd,SO;function Wz(){if(SO)return sd;SO=1;var r=Qt(),e=Kt(),t=va(),i=Xw(),n=bK(),s=Tt(),o=TypeError,a=s("toPrimitive");return sd=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)},sd}var od,OO;function Qw(){if(OO)return od;OO=1;var r=Wz(),e=va();return od=function(t){var i=r(t,"string");return e(i)?i:i+""},od}var ad,IO;function Uz(){if(IO)return ad;IO=1;var r=vt(),e=Kt(),t=r.document,i=e(t)&&e(t.createElement);return ad=function(n){return i?t.createElement(n):{}},ad}var ud,TO;function Vz(){if(TO)return ud;TO=1;var r=gt(),e=Le(),t=Uz();return ud=!r&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),ud}var $O;function il(){if($O)return Rc;$O=1;var r=gt(),e=Qt(),t=Yw(),i=ha(),n=Wr(),s=Qw(),o=It(),a=Vz(),u=Object.getOwnPropertyDescriptor;return Rc.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])},Rc}var ld,PO;function wK(){if(PO)return ld;PO=1;var r=Le(),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 ld=i,ld}var cd,RO;function nl(){if(RO)return cd;RO=1;var r=zz(),e=gi(),t=da(),i=r(r.bind);return cd=function(n,s){return e(n),s===void 0?n:t?i(n,s):function(){return n.apply(s,arguments)}},cd}var dd={},hd,CO;function Kz(){if(CO)return hd;CO=1;var r=gt(),e=Le();return hd=r&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),hd}var fd,xO;function mi(){if(xO)return fd;xO=1;var r=Kt(),e=String,t=TypeError;return fd=function(i){if(r(i))return i;throw new t(e(i)+" is not an object")},fd}var qO;function vr(){if(qO)return dd;qO=1;var r=gt(),e=Vz(),t=Kz(),i=mi(),n=Qw(),s=TypeError,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return dd.f=r?t?function(h,f,p){if(i(h),f=n(f),i(p),typeof h=="function"&&f==="prototype"&&"value"in p&&c in p&&!p[c]){var v=a(h,f);v&&v[c]&&(h[f]=p.value,p={configurable:l in p?p[l]:v[l],enumerable:u in p?p[u]:v[u],writable:!1})}return o(h,f,p)}:o:function(h,f,p){if(i(h),f=n(f),i(p),e)try{return o(h,f,p)}catch{}if("get"in p||"set"in p)throw new s("Accessors not supported");return"value"in p&&(h[f]=p.value),h},dd}var pd,AO;function zs(){if(AO)return pd;AO=1;var r=gt(),e=vr(),t=ha();return pd=r?function(i,n,s){return e.f(i,n,t(1,s))}:function(i,n,s){return i[n]=s,i},pd}var vd,DO;function be(){if(DO)return vd;DO=1;var r=vt(),e=el(),t=zz(),i=St(),n=il().f,s=wK(),o=_t(),a=nl(),u=zs(),l=It(),c=function(d){var h=function(f,p,v){if(this instanceof h){switch(arguments.length){case 0:return new d;case 1:return new d(f);case 2:return new d(f,p)}return new d(f,p,v)}return e(d,this,arguments)};return h.prototype=d.prototype,h};return vd=function(d,h){var f=d.target,p=d.global,v=d.stat,_=d.proto,m=p?r:v?r[f]:r[f]&&r[f].prototype,g=p?o:o[f]||u(o,f,{})[f],E=g.prototype,y,I,O,T,b,w,R,P,S;for(T in h)y=s(p?T:f+(v?".":"#")+T,d.forced),I=!y&&m&&l(m,T),w=g[T],I&&(d.dontCallGetSet?(S=n(m,T),R=S&&S.value):R=m[T]),b=I&&R?R:h[T],!(!y&&!_&&typeof w==typeof b)&&(d.bind&&I?P=a(b,r):d.wrap&&I?P=c(b):_&&i(b)?P=t(b):P=b,(d.sham||b&&b.sham||w&&w.sham)&&u(P,"sham",!0),u(g,T,P),_&&(O=f+"Prototype",l(o,O)||u(o,O,{}),u(o[O],T,b),d.real&&E&&(y||!E[T])&&u(E,T,b)))},vd}var MO;function EK(){if(MO)return BS;MO=1;var r=be(),e=gt(),t=vr().f;return r({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),BS}var NO;function SK(){if(NO)return wc.exports;NO=1,EK();var r=_t(),e=r.Object,t=wc.exports=function(n,s,o){return e.defineProperty(n,s,o)};return e.defineProperty.sham&&(t.sham=!0),wc.exports}var gd,FO;function Gz(){if(FO)return gd;FO=1;var r=SK();return gd=r,gd}var md,kO;function OK(){if(kO)return md;kO=1;var r=Gz();return md=r,md}var yd,BO;function IK(){if(BO)return yd;BO=1;var r=OK();return yd=r,yd}var bd,LO;function TK(){return LO||(LO=1,bd=IK()),bd}var $K=TK(),PK=$e($K),jO={},_d,zO;function Bn(){if(zO)return _d;zO=1;var r=vi();return _d=Array.isArray||function(t){return r(t)==="Array"},_d}var wd,HO;function RK(){if(HO)return wd;HO=1;var r=Math.ceil,e=Math.floor;return wd=Math.trunc||function(i){var n=+i;return(n>0?e:r)(n)},wd}var Ed,WO;function Hs(){if(WO)return Ed;WO=1;var r=RK();return Ed=function(e){var t=+e;return t!==t||t===0?0:r(t)},Ed}var Sd,UO;function Yz(){if(UO)return Sd;UO=1;var r=Hs(),e=Math.min;return Sd=function(t){var i=r(t);return i>0?e(i,9007199254740991):0},Sd}var Od,VO;function Yi(){if(VO)return Od;VO=1;var r=Yz();return Od=function(e){return r(e.length)},Od}var Id,KO;function Xz(){if(KO)return Id;KO=1;var r=TypeError,e=9007199254740991;return Id=function(t){if(t>e)throw r("Maximum allowed index exceeded");return t},Id}var Td,GO;function sl(){if(GO)return Td;GO=1;var r=gt(),e=vr(),t=ha();return Td=function(i,n,s){r?e.f(i,n,t(0,s)):i[n]=s},Td}var $d,YO;function Zw(){if(YO)return $d;YO=1;var r=Tt(),e=r("toStringTag"),t={};return t[e]="z",$d=String(t)==="[object z]",$d}var Pd,XO;function Xi(){if(XO)return Pd;XO=1;var r=Zw(),e=St(),t=vi(),i=Tt(),n=i("toStringTag"),s=Object,o=t(function(){return arguments}())==="Arguments",a=function(u,l){try{return u[l]}catch{}};return Pd=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},Pd}var Rd,JO;function CK(){if(JO)return Rd;JO=1;var r=Ue(),e=St(),t=Jw(),i=r(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(n){return i(n)}),Rd=t.inspectSource,Rd}var Cd,QO;function Jz(){if(QO)return Cd;QO=1;var r=Ue(),e=Le(),t=St(),i=Xi(),n=ir(),s=CK(),o=function(){},a=n("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=r(u.exec),c=!u.test(o),d=function(p){if(!t(p))return!1;try{return a(o,[],p),!0}catch{return!1}},h=function(p){if(!t(p))return!1;switch(i(p)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,s(p))}catch{return!0}};return h.sham=!0,Cd=!a||e(function(){var f;return d(d.call)||!d(Object)||!d(function(){f=!0})||f})?h:d,Cd}var xd,ZO;function xK(){if(ZO)return xd;ZO=1;var r=Bn(),e=Jz(),t=Kt(),i=Tt(),n=i("species"),s=Array;return xd=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},xd}var qd,eI;function e0(){if(eI)return qd;eI=1;var r=xK();return qd=function(e,t){return new(r(e))(t===0?0:t)},qd}var Ad,tI;function ga(){if(tI)return Ad;tI=1;var r=Le(),e=Tt(),t=pa(),i=e("species");return Ad=function(n){return t>=51||!r(function(){var s=[],o=s.constructor={};return o[i]=function(){return{foo:1}},s[n](Boolean).foo!==1})},Ad}var rI;function Qz(){if(rI)return jO;rI=1;var r=be(),e=Le(),t=Bn(),i=Kt(),n=Cr(),s=Yi(),o=Xz(),a=sl(),u=e0(),l=ga(),c=Tt(),d=pa(),h=c("isConcatSpreadable"),f=d>=51||!e(function(){var _=[];return _[h]=!1,_.concat()[0]!==_}),p=function(_){if(!i(_))return!1;var m=_[h];return m!==void 0?!!m:t(_)},v=!f||!l("concat");return r({target:"Array",proto:!0,arity:1,forced:v},{concat:function(m){var g=n(this),E=u(g,0),y=0,I,O,T,b,w;for(I=-1,T=arguments.length;Ic;)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 kd,uI;function ma(){return uI||(uI=1,kd={}),kd}var Bd,lI;function Zz(){if(lI)return Bd;lI=1;var r=Ue(),e=It(),t=Wr(),i=qK().indexOf,n=ma(),s=r([].push);return Bd=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},Bd}var Ld,cI;function r0(){return cI||(cI=1,Ld=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Ld}var jd,dI;function ol(){if(dI)return jd;dI=1;var r=Zz(),e=r0();return jd=Object.keys||function(i){return r(i,e)},jd}var hI;function i0(){if(hI)return Md;hI=1;var r=gt(),e=Kz(),t=vr(),i=mi(),n=Wr(),s=ol();return Md.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},Md}var zd,fI;function AK(){if(fI)return zd;fI=1;var r=ir();return zd=r("document","documentElement"),zd}var Hd,pI;function al(){if(pI)return Hd;pI=1;var r=js(),e=rl(),t=r("keys");return Hd=function(i){return t[i]||(t[i]=e(i))},Hd}var Wd,vI;function ya(){if(vI)return Wd;vI=1;var r=mi(),e=i0(),t=r0(),i=ma(),n=AK(),s=Uz(),o=al(),a=">",u="<",l="prototype",c="script",d=o("IE_PROTO"),h=function(){},f=function(g){return u+c+a+g+u+"/"+c+a},p=function(g){g.write(f("")),g.close();var E=g.parentWindow.Object;return g=null,E},v=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&&_?p(_):v():p(_);for(var g=t.length;g--;)delete m[l][t[g]];return m()};return i[d]=!0,Wd=Object.create||function(E,y){var I;return E!==null?(h[l]=r(E),I=new h,h[l]=null,I[d]=E):I=m(),y===void 0?I:e.f(I,y)},Wd}var Ud={},gI;function ul(){if(gI)return Ud;gI=1;var r=Zz(),e=r0(),t=e.concat("length","prototype");return Ud.f=Object.getOwnPropertyNames||function(n){return r(n,t)},Ud}var Vd={},Kd,mI;function Ws(){if(mI)return Kd;mI=1;var r=Ue();return Kd=r([].slice),Kd}var yI;function e3(){if(yI)return Vd;yI=1;var r=vi(),e=Wr(),t=ul().f,i=Ws(),n=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(o){try{return t(o)}catch{return i(n)}};return Vd.f=function(a){return n&&r(a)==="Window"?s(a):t(e(a))},Vd}var Gd={},bI;function ll(){return bI||(bI=1,Gd.f=Object.getOwnPropertySymbols),Gd}var Yd,_I;function ba(){if(_I)return Yd;_I=1;var r=zs();return Yd=function(e,t,i,n){return n&&n.enumerable?e[t]=i:r(e,t,i),e},Yd}var Xd,wI;function n0(){if(wI)return Xd;wI=1;var r=vr();return Xd=function(e,t,i){return r.f(e,t,i)},Xd}var Jd={},EI;function cl(){if(EI)return Jd;EI=1;var r=Tt();return Jd.f=r,Jd}var Qd,SI;function et(){if(SI)return Qd;SI=1;var r=_t(),e=It(),t=cl(),i=vr().f;return Qd=function(n){var s=r.Symbol||(r.Symbol={});e(s,n)||i(s,n,{value:t.f(n)})},Qd}var Zd,OI;function t3(){if(OI)return Zd;OI=1;var r=Qt(),e=ir(),t=Tt(),i=ba();return Zd=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})},Zd}var eh,II;function DK(){if(II)return eh;II=1;var r=Zw(),e=Xi();return eh=r?{}.toString:function(){return"[object "+e(this)+"]"},eh}var th,TI;function Ln(){if(TI)return th;TI=1;var r=Zw(),e=vr().f,t=zs(),i=It(),n=DK(),s=Tt(),o=s("toStringTag");return th=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))},th}var rh,$I;function MK(){if($I)return rh;$I=1;var r=vt(),e=St(),t=r.WeakMap;return rh=e(t)&&/native code/.test(String(t)),rh}var ih,PI;function _a(){if(PI)return ih;PI=1;var r=MK(),e=vt(),t=Kt(),i=zs(),n=It(),s=Jw(),o=al(),a=ma(),u="Object already initialized",l=e.TypeError,c=e.WeakMap,d,h,f,p=function(g){return f(g)?h(g):d(g,{})},v=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 ih={set:d,get:h,has:f,enforce:p,getterFor:v},ih}var nh,RI;function Us(){if(RI)return nh;RI=1;var r=nl(),e=Ue(),t=tl(),i=Cr(),n=Yi(),s=e0(),o=e([].push),a=function(u){var l=u===1,c=u===2,d=u===3,h=u===4,f=u===6,p=u===7,v=u===5||f;return function(_,m,g,E){for(var y=i(_),I=t(y),O=n(I),T=r(m,g),b=0,w=E||s,R=l?w(_,O):c||p?w(_,0):void 0,P,S;O>b;b++)if((v||b in I)&&(P=I[b],S=T(P,b,y),u))if(l)R[b]=S;else if(S)switch(u){case 3:return!0;case 5:return P;case 6:return b;case 2:o(R,P)}else switch(u){case 4:return!1;case 7:o(R,P)}return f?-1:d||h?h:R}};return nh={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},nh}var CI;function NK(){if(CI)return nI;CI=1;var r=be(),e=vt(),t=Qt(),i=Ue(),n=Ls(),s=gt(),o=ks(),a=Le(),u=It(),l=Ot(),c=mi(),d=Wr(),h=Qw(),f=Ji(),p=ha(),v=ya(),_=ol(),m=ul(),g=e3(),E=ll(),y=il(),I=vr(),O=i0(),T=Yw(),b=ba(),w=n0(),R=js(),P=al(),S=ma(),$=rl(),q=Tt(),F=cl(),Z=et(),z=t3(),te=Ln(),ve=_a(),we=Us().forEach,re=P("hidden"),me="Symbol",qe="prototype",De=ve.set,ct=ve.getterFor(me),_e=Object[qe],D=e.Symbol,U=D&&D[qe],X=e.RangeError,ne=e.TypeError,Re=e.QObject,C=y.f,x=I.f,A=g.f,k=T.f,B=i([].push),N=R("symbols"),G=R("op-symbols"),J=R("wks"),V=!Re||!Re[qe]||!Re[qe].findChild,L=function(ae,K,ee){var ie=C(_e,K);ie&&delete _e[K],x(ae,K,ee),ie&&ae!==_e&&x(_e,K,ie)},ce=s&&a(function(){return v(x({},"a",{get:function(){return x(this,"a",{value:7}).a}})).a!==7})?L:x,Q=function(ae,K){var ee=N[ae]=v(U);return De(ee,{type:me,tag:ae,description:K}),s||(ee.description=K),ee},oe=function(K,ee,ie){K===_e&&oe(G,ee,ie),c(K);var se=h(ee);return c(ie),u(N,se)?(ie.enumerable?(u(K,re)&&K[re][se]&&(K[re][se]=!1),ie=v(ie,{enumerable:p(0,!1)})):(u(K,re)||x(K,re,p(1,v(null))),K[re][se]=!0),ce(K,se,ie)):x(K,se,ie)},he=function(K,ee){c(K);var ie=d(ee),se=_(ie).concat(dt(ie));return we(se,function(Ee){(!s||t(Ae,ie,Ee))&&oe(K,Ee,ie[Ee])}),K},Ie=function(K,ee){return ee===void 0?v(K):he(v(K),ee)},Ae=function(K){var ee=h(K),ie=t(k,this,ee);return this===_e&&u(N,ee)&&!u(G,ee)?!1:ie||!u(this,ee)||!u(N,ee)||u(this,re)&&this[re][ee]?ie:!0},Ce=function(K,ee){var ie=d(K),se=h(ee);if(!(ie===_e&&u(N,se)&&!u(G,se))){var Ee=C(ie,se);return Ee&&u(N,se)&&!(u(ie,re)&&ie[re][se])&&(Ee.enumerable=!0),Ee}},bt=function(K){var ee=A(d(K)),ie=[];return we(ee,function(se){!u(N,se)&&!u(S,se)&&B(ie,se)}),ie},dt=function(ae){var K=ae===_e,ee=A(K?G:d(ae)),ie=[];return we(ee,function(se){u(N,se)&&(!K||u(_e,se))&&B(ie,N[se])}),ie};return o||(D=function(){if(l(U,this))throw new ne("Symbol is not a constructor");var K=!arguments.length||arguments[0]===void 0?void 0:f(arguments[0]),ee=$(K),ie=function(se){var Ee=this===void 0?e:this;Ee===_e&&t(ie,G,se),u(Ee,re)&&u(Ee[re],ee)&&(Ee[re][ee]=!1);var wi=p(1,se);try{ce(Ee,ee,wi)}catch(co){if(!(co instanceof X))throw co;L(Ee,ee,wi)}};return s&&V&&ce(_e,ee,{configurable:!0,set:ie}),Q(ee,K)},U=D[qe],b(U,"toString",function(){return ct(this).tag}),b(D,"withoutSetter",function(ae){return Q($(ae),ae)}),T.f=Ae,I.f=oe,O.f=he,y.f=Ce,m.f=g.f=bt,E.f=dt,F.f=function(ae){return Q(q(ae),ae)},s&&(w(U,"description",{configurable:!0,get:function(){return ct(this).description}}),n||b(_e,"propertyIsEnumerable",Ae,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:D}),we(_(J),function(ae){Z(ae)}),r({target:me,stat:!0,forced:!o},{useSetter:function(){V=!0},useSimple:function(){V=!1}}),r({target:"Object",stat:!0,forced:!o,sham:!s},{create:Ie,defineProperty:oe,defineProperties:he,getOwnPropertyDescriptor:Ce}),r({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:bt}),z(),te(D,me),S[re]=!0,nI}var xI={},sh,qI;function r3(){if(qI)return sh;qI=1;var r=ks();return sh=r&&!!Symbol.for&&!!Symbol.keyFor,sh}var AI;function FK(){if(AI)return xI;AI=1;var r=be(),e=ir(),t=It(),i=Ji(),n=js(),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}}),xI}var DI={},MI;function kK(){if(MI)return DI;MI=1;var r=be(),e=It(),t=va(),i=Bs(),n=js(),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]}}),DI}var NI={},oh,FI;function BK(){if(FI)return oh;FI=1;var r=Ue(),e=Bn(),t=St(),i=vi(),n=Ji(),s=r([].push);return oh=function(o){if(t(o))return o;if(e(o)){for(var a=o.length,u=[],l=0;l=p.length)return f.target=null,o(void 0,!0);switch(f.kind){case"keys":return o(v,!1);case"values":return o(p[v],!1)}return o([v,p[v]],!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 wh}var Eh,NT;function uG(){return NT||(NT=1,Eh={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}),Eh}var FT;function Zi(){if(FT)return wT;FT=1,Qi();var r=uG(),e=vt(),t=Ln(),i=Vs();for(var n in r)t(e[n],n),i[n]=i.Array;return wT}var Sh,kT;function d3(){if(kT)return Sh;kT=1;var r=ZK();return Zi(),Sh=r,Sh}var BT={},LT;function lG(){if(LT)return BT;LT=1;var r=Tt(),e=vr().f,t=r("metadata"),i=Function.prototype;return i[t]===void 0&&e(i,t,{value:null}),BT}var jT={},zT;function cG(){return zT||(zT=1,s3()),jT}var HT={},WT;function dG(){return WT||(WT=1,o3()),HT}var UT={},VT;function hG(){if(VT)return UT;VT=1;var r=et();return r("metadata"),UT}var Oh,KT;function fG(){if(KT)return Oh;KT=1;var r=d3();return lG(),cG(),dG(),hG(),Oh=r,Oh}var GT={},Ih,YT;function h3(){if(YT)return Ih;YT=1;var r=ir(),e=Ue(),t=r("Symbol"),i=t.keyFor,n=e(t.prototype.valueOf);return Ih=t.isRegisteredSymbol||function(o){try{return i(n(o))!==void 0}catch{return!1}},Ih}var XT;function pG(){if(XT)return GT;XT=1;var r=be(),e=h3();return r({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),GT}var JT={},Th,QT;function f3(){if(QT)return Th;QT=1;for(var r=js(),e=ir(),t=Ue(),i=va(),n=Tt(),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:(p=s(d,h),p<55296||p>56319||h+1===f||(v=s(d,h+1))<56320||v>57343?u?n(d,h):p:u?o(d,h,h+2):(p-55296<<10)+(v-56320)+65536)}};return Rh={codeAt:a(!1),charAt:a(!0)},Rh}var _$;function dl(){if(_$)return y$;_$=1;var r=$G().charAt,e=Ji(),t=_a(),i=s0(),n=o0(),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))}),y$}var Ch,w$;function PG(){if(w$)return Ch;w$=1,Qi(),dl(),a3();var r=cl();return Ch=r.f("iterator"),Ch}var xh,E$;function p3(){if(E$)return xh;E$=1;var r=PG();return Zi(),xh=r,xh}var qh,S$;function RG(){if(S$)return qh;S$=1;var r=p3();return qh=r,qh}var Ah,O$;function CG(){if(O$)return Ah;O$=1;var r=RG();return Ah=r,Ah}var Dh,I$;function xG(){return I$||(I$=1,Dh=CG()),Dh}var qG=xG(),AG=$e(qG);function Go(r){"@babel/helpers - typeof";return Go=typeof Za=="function"&&typeof AG=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Za=="function"&&e.constructor===Za&&e!==Za.prototype?"symbol":typeof e},Go(r)}var Mh,T$;function DG(){if(T$)return Mh;T$=1,u3();var r=cl();return Mh=r.f("toPrimitive"),Mh}var Nh,$$;function MG(){if($$)return Nh;$$=1;var r=DG();return Nh=r,Nh}var Fh,P$;function NG(){if(P$)return Fh;P$=1;var r=MG();return Fh=r,Fh}var kh,R$;function FG(){if(R$)return kh;R$=1;var r=NG();return kh=r,kh}var Bh,C$;function kG(){return C$||(C$=1,Bh=FG()),Bh}var BG=kG(),LG=$e(BG);function jG(r,e){if(Go(r)!="object"||!r)return r;var t=r[LG];if(t!==void 0){var i=t.call(r,e);if(Go(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function zG(r){var e=jG(r,"string");return Go(e)=="symbol"?e:e+""}function Ni(r,e,t){return(e=zG(e))in r?PK(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var x$={},Lh,q$;function HG(){if(q$)return Lh;q$=1;var r=Ue(),e=gi(),t=Kt(),i=It(),n=Ws(),s=da(),o=Function,a=r([].concat),u=r([].join),l={},c=function(d,h,f){if(!i(l,h)){for(var p=[],v=0;v=0:p>v;v+=_)v in f&&(d=l(d,f[v],v,h));return d}};return Vh={left:o(!1),right:o(!0)},Vh}var Kh,j$;function hl(){if(j$)return Kh;j$=1;var r=Le();return Kh=function(e,t){var i=[][e];return!!i&&r(function(){i.call(null,t||function(){return 1},1)})},Kh}var Gh,z$;function g3(){if(z$)return Gh;z$=1;var r=vt(),e=Fs(),t=vi(),i=function(n){return e.slice(0,n.length)===n};return Gh=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"}(),Gh}var Yh,H$;function JG(){if(H$)return Yh;H$=1;var r=g3();return Yh=r==="NODE",Yh}var W$;function QG(){if(W$)return B$;W$=1;var r=be(),e=XG().left,t=hl(),i=pa(),n=JG(),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)}}),B$}var Xh,U$;function ZG(){if(U$)return Xh;U$=1,QG();var r=Zt();return Xh=r("Array","reduce"),Xh}var Jh,V$;function e6(){if(V$)return Jh;V$=1;var r=Ot(),e=ZG(),t=Array.prototype;return Jh=function(i){var n=i.reduce;return i===t||r(t,i)&&n===t.reduce?e:n},Jh}var Qh,K$;function t6(){if(K$)return Qh;K$=1;var r=e6();return Qh=r,Qh}var Zh,G$;function r6(){return G$||(G$=1,Zh=t6()),Zh}var i6=r6(),n6=$e(i6),Y$={},X$;function s6(){if(X$)return Y$;X$=1;var r=be(),e=Us().filter,t=ga(),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)}}),Y$}var ef,J$;function o6(){if(J$)return ef;J$=1,s6();var r=Zt();return ef=r("Array","filter"),ef}var tf,Q$;function a6(){if(Q$)return tf;Q$=1;var r=Ot(),e=o6(),t=Array.prototype;return tf=function(i){var n=i.filter;return i===t||r(t,i)&&n===t.filter?e:n},tf}var rf,Z$;function u6(){if(Z$)return rf;Z$=1;var r=a6();return rf=r,rf}var nf,eP;function l6(){return eP||(eP=1,nf=u6()),nf}var c6=l6(),cs=$e(c6),tP={},rP;function d6(){if(rP)return tP;rP=1;var r=be(),e=Us().map,t=ga(),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)}}),tP}var sf,iP;function h6(){if(iP)return sf;iP=1,d6();var r=Zt();return sf=r("Array","map"),sf}var of,nP;function f6(){if(nP)return of;nP=1;var r=Ot(),e=h6(),t=Array.prototype;return of=function(i){var n=i.map;return i===t||r(t,i)&&n===t.map?e:n},of}var af,sP;function p6(){if(sP)return af;sP=1;var r=f6();return af=r,af}var uf,oP;function v6(){return oP||(oP=1,uf=p6()),uf}var g6=v6(),wr=$e(g6),lf,aP;function m6(){return aP||(aP=1,lf=d3()),lf}var y6=m6(),b6=$e(y6),uP={},lP;function _6(){if(lP)return uP;lP=1;var r=be(),e=Bn(),t=Jz(),i=Kt(),n=t0(),s=Yi(),o=Wr(),a=sl(),u=Tt(),l=ga(),c=Ws(),d=l("slice"),h=u("species"),f=Array,p=Math.max;return r({target:"Array",proto:!0,forced:!d},{slice:function(_,m){var g=o(this),E=s(g),y=n(_,E),I=n(m===void 0?E:m,E),O,T,b;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,y,I);for(T=new(O===void 0?f:O)(p(I-y,0)),b=0;y1?arguments[1]:void 0)},Of}var qP;function W6(){if(qP)return CP;qP=1;var r=be(),e=H6();return r({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),CP}var If,AP;function U6(){if(AP)return If;AP=1,W6();var r=Zt();return If=r("Array","forEach"),If}var Tf,DP;function V6(){if(DP)return Tf;DP=1;var r=U6();return Tf=r,Tf}var $f,MP;function K6(){if(MP)return $f;MP=1;var r=Xi(),e=It(),t=Ot(),i=V6(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return $f=function(o){var a=o.forEach;return o===n||t(n,o)&&a===n.forEach||e(s,r(o))?i:a},$f}var Pf,NP;function G6(){return NP||(NP=1,Pf=K6()),Pf}var Y6=G6(),$n=$e(Y6),FP={},kP;function X6(){if(kP)return FP;kP=1;var r=be(),e=Ue(),t=Bn(),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)}}),FP}var Rf,BP;function J6(){if(BP)return Rf;BP=1,X6();var r=Zt();return Rf=r("Array","reverse"),Rf}var Cf,LP;function Q6(){if(LP)return Cf;LP=1;var r=Ot(),e=J6(),t=Array.prototype;return Cf=function(i){var n=i.reverse;return i===t||r(t,i)&&n===t.reverse?e:n},Cf}var xf,jP;function Z6(){if(jP)return xf;jP=1;var r=Q6();return xf=r,xf}var qf,zP;function e8(){return zP||(zP=1,qf=Z6()),qf}var t8=e8(),r8=$e(t8),HP={},Af,WP;function i8(){if(WP)return Af;WP=1;var r=gt(),e=Bn(),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 Af=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},Af}var Df,UP;function y3(){if(UP)return Df;UP=1;var r=Bs(),e=TypeError;return Df=function(t,i){if(!delete t[i])throw new e("Cannot delete property "+r(i)+" of "+r(t))},Df}var VP;function n8(){if(VP)return HP;VP=1;var r=be(),e=Cr(),t=t0(),i=Hs(),n=Yi(),s=i8(),o=Xz(),a=e0(),u=sl(),l=y3(),c=ga(),d=c("splice"),h=Math.max,f=Math.min;return r({target:"Array",proto:!0,forced:!d},{splice:function(v,_){var m=e(this),g=n(m),E=t(v,g),y=arguments.length,I,O,T,b,w,R;for(y===0?I=O=0:y===1?(I=0,O=g-E):(I=y-2,O=f(h(i(_),0),g-E)),o(g+I-O),T=a(m,O),b=0;bg-O+I;b--)l(m,b-1)}else if(I>O)for(b=g-O;b>E;b--)w=b+O-1,R=b+I-1,w in m?m[R]=m[w]:l(m,R);for(b=0;bm;)for(var y=u(arguments[m++]),I=g?d(n(y),g(y)):n(y),O=I.length,T=0,b;O>T;)b=I[T++],(!r||t(E,y,b))&&(v[b]=y[b]);return v}:l,Bf}var ZP;function d8(){if(ZP)return JP;ZP=1;var r=be(),e=c8();return r({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e}),JP}var Lf,eR;function h8(){if(eR)return Lf;eR=1,d8();var r=_t();return Lf=r.Object.assign,Lf}var jf,tR;function f8(){if(tR)return jf;tR=1;var r=h8();return jf=r,jf}var zf,rR;function p8(){return rR||(rR=1,zf=f8()),zf}var v8=p8(),g8=$e(v8),Hf,iR;function m8(){if(iR)return Hf;iR=1,Qz();var r=Zt();return Hf=r("Array","concat"),Hf}var Wf,nR;function y8(){if(nR)return Wf;nR=1;var r=Ot(),e=m8(),t=Array.prototype;return Wf=function(i){var n=i.concat;return i===t||r(t,i)&&n===t.concat?e:n},Wf}var Uf,sR;function b8(){if(sR)return Uf;sR=1;var r=y8();return Uf=r,Uf}var Vf,oR;function _8(){return oR||(oR=1,Vf=b8()),Vf}var w8=_8(),E8=$e(w8),aR={},uR;function S8(){if(uR)return aR;uR=1;var r=be(),e=gt(),t=ya();return r({target:"Object",stat:!0,sham:!e},{create:t}),aR}var Kf,lR;function O8(){if(lR)return Kf;lR=1,S8();var r=_t(),e=r.Object;return Kf=function(i,n){return e.create(i,n)},Kf}var Gf,cR;function I8(){if(cR)return Gf;cR=1;var r=O8();return Gf=r,Gf}var Yf,dR;function T8(){return dR||(dR=1,Yf=I8()),Yf}var $8=T8(),P8=$e($8),hR={},Xf,fR;function R8(){if(fR)return Xf;fR=1;var r=Hs(),e=Ji(),t=kn(),i=RangeError;return Xf=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},Xf}var Jf,pR;function C8(){if(pR)return Jf;pR=1;var r=Ue(),e=Yz(),t=Ji(),i=R8(),n=kn(),s=r(i),o=r("".slice),a=Math.ceil,u=function(l){return function(c,d,h){var f=t(n(c)),p=e(d),v=f.length,_=h===void 0?" ":t(h),m,g;return p<=v||_===""?f:(m=p-v,g=s(_,a(m/_.length)),g.length>m&&(g=o(g,0,m)),l?f+g:g+f)}};return Jf={start:u(!1),end:u(!0)},Jf}var Qf,vR;function x8(){if(vR)return Qf;vR=1;var r=Ue(),e=Le(),t=C8().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),p=r(o.getUTCMonth),v=r(o.getUTCSeconds);return Qf=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(p(m)+1,2,0)+"-"+t(l(m),2,0)+"T"+t(d(m),2,0)+":"+t(f(m),2,0)+":"+t(v(m),2,0)+"."+t(E,3,0)+"Z"}:a,Qf}var gR;function q8(){if(gR)return hR;gR=1;var r=be(),e=Qt(),t=Cr(),i=Wz(),n=x8(),s=vi(),o=Le(),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()}}),hR}var Zf,mR;function A8(){if(mR)return Zf;mR=1,q8(),i3();var r=_t(),e=el();return r.JSON||(r.JSON={stringify:JSON.stringify}),Zf=function(i,n,s){return e(r.JSON.stringify,null,arguments)},Zf}var ep,yR;function D8(){if(yR)return ep;yR=1;var r=A8();return ep=r,ep}var tp,bR;function M8(){return bR||(bR=1,tp=D8()),tp}var N8=M8(),F8=$e(N8),_R={},wR={},rp,ER;function k8(){if(ER)return rp;ER=1;var r=TypeError;return rp=function(e,t){if(ed,v=t(h)?h:a(h),_=p?s(arguments,d):[],m=p?function(){e(v,this,_)}:v;return c?l(m,f):l(m)}:l},ip}var OR;function B8(){if(OR)return wR;OR=1;var r=be(),e=vt(),t=_3(),i=t(e.setInterval,!0);return r({global:!0,bind:!0,forced:e.setInterval!==i},{setInterval:i}),wR}var IR={},TR;function L8(){if(TR)return IR;TR=1;var r=be(),e=vt(),t=_3(),i=t(e.setTimeout,!0);return r({global:!0,bind:!0,forced:e.setTimeout!==i},{setTimeout:i}),IR}var $R;function j8(){return $R||($R=1,B8(),L8()),_R}var np,PR;function z8(){if(PR)return np;PR=1,j8();var r=_t();return np=r.setTimeout,np}var sp,RR;function H8(){return RR||(RR=1,sp=z8()),sp}var W8=H8(),U8=$e(W8),op={exports:{}},CR;function V8(){return CR||(CR=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}(op)),op.exports}var K8=V8(),G8=$e(K8);/*! 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 Pr(){return Pr=Object.assign||function(r){for(var e=1;e"u"?{style:{}}:document.createElement("div"),Y8="function",ds=Math.round,Rn=Math.abs,u0=Date.now;function fl(r,e){for(var t,i,n=e[0].toUpperCase()+e.slice(1),s=0;s"u"?ni={}:ni=window;var w3=fl(G8.style,"touchAction"),E3=w3!==void 0;function X8(){if(!E3)return!1;var r={},e=ni.CSS&&ni.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return r[t]=e?ni.CSS.supports("touch-action",t):!0}),r}var S3="compute",O3="auto",dw="manipulation",_n="none",Yo="pan-x",Xo="pan-y",tu=X8(),J8=/mobile|tablet|ip(ad|hone|od)|android/i,I3="ontouchstart"in ni,Q8=fl(ni,"PointerEvent")!==void 0,Z8=I3&&J8.test(navigator.userAgent),wa="touch",e9="pen",l0="mouse",t9="kinect",r9=25,Ut=1,jn=2,ht=4,Xt=8,Iu=1,Ea=2,Sa=4,Oa=8,Rs=16,zr=Ea|Sa,wn=Oa|Rs,T3=zr|wn,$3=["x","y"],Tu=["clientX","clientY"];function si(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 i9(r){if(pn(r,_n))return _n;var e=pn(r,Yo),t=pn(r,Xo);return e&&t?_n:e||t?e?Yo:Xo:pn(r,dw)?dw:O3}var P3=function(){function r(t,i){this.manager=t,this.set(i)}var e=r.prototype;return e.set=function(i){i===S3&&(i=this.compute()),E3&&this.manager.element.style&&tu[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 si(this.manager.recognizers,function(n){pl(n.options.enable,[n])&&(i=i.concat(n.getTouchAction()))}),i9(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=pn(o,_n)&&!tu[_n],u=pn(o,Xo)&&!tu[Xo],l=pn(o,Yo)&&!tu[Yo];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&zr||l&&s&wn))return this.preventSrc(n)},e.preventSrc=function(i){this.manager.session.prevented=!0,i.preventDefault()},r}();function c0(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}function R3(r){var e=r.length;if(e===1)return{x:ds(r[0].clientX),y:ds(r[0].clientY)};for(var t=0,i=0,n=0;n=Rn(e)?r<0?Ea:Sa:e<0?Oa:Rs}function n9(r,e){var t=e.center,i=r.offsetDelta||{},n=r.prevDelta||{},s=r.prevInput||{};(e.eventType===Ut||s.eventType===ht)&&(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 x3(r,e,t){return{x:e/r||0,y:t/r||0}}function s9(r,e){return $u(e[0],e[1],Tu)/$u(r[0],r[1],Tu)}function o9(r,e){return hw(e[1],e[0],Tu)+hw(r[1],r[0],Tu)}function a9(r,e){var t=r.lastInterval||e,i=e.timeStamp-t.timeStamp,n,s,o,a;if(e.eventType!==Xt&&(i>r9||t.velocity===void 0)){var u=e.deltaX-t.deltaX,l=e.deltaY-t.deltaY,c=x3(i,u,l);s=c.x,o=c.y,n=Rn(c.x)>Rn(c.y)?c.x:c.y,a=C3(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 u9(r,e){var t=r.session,i=e.pointers,n=i.length;t.firstInput||(t.firstInput=qR(e)),n>1&&!t.firstMultiple?t.firstMultiple=qR(e):n===1&&(t.firstMultiple=!1);var s=t.firstInput,o=t.firstMultiple,a=o?o.center:s.center,u=e.center=R3(i);e.timeStamp=u0(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=hw(a,u),e.distance=$u(a,u),n9(t,e),e.offsetDirection=C3(e.deltaX,e.deltaY);var l=x3(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=Rn(l.x)>Rn(l.y)?l.x:l.y,e.scale=o?s9(o.pointers,i):1,e.rotation=o?o9(o.pointers,i):0,e.maxPointers=t.prevInput?e.pointers.length>t.prevInput.maxPointers?e.pointers.length:t.prevInput.maxPointers:e.pointers.length,a9(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,c0(h,c)&&(c=h),e.target=c}function l9(r,e,t){var i=t.pointers.length,n=t.changedPointers.length,s=e&Ut&&i-n===0,o=e&(ht|Xt)&&i-n===0;t.isFirst=!!s,t.isFinal=!!o,s&&(r.session={}),t.eventType=e,u9(r,t),r.emit("hammer.input",t),r.recognize(t),r.session.prevInput=t}function Jo(r){return r.trim().split(/\s+/g)}function xo(r,e,t){si(Jo(e),function(i){r.addEventListener(i,t,!1)})}function qo(r,e,t){si(Jo(e),function(i){r.removeEventListener(i,t,!1)})}function AR(r){var e=r.ownerDocument||r;return e.defaultView||e.parentWindow||window}var Ks=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){pl(t.options.enable,[t])&&n.handler(s)},this.init()}var e=r.prototype;return e.handler=function(){},e.init=function(){this.evEl&&xo(this.element,this.evEl,this.domHandler),this.evTarget&&xo(this.target,this.evTarget,this.domHandler),this.evWin&&xo(AR(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&qo(this.element,this.evEl,this.domHandler),this.evTarget&&qo(this.target,this.evTarget,this.domHandler),this.evWin&&qo(AR(this.element),this.evWin,this.domHandler)},r}();function Cn(r,e,t){if(r.indexOf&&!t)return r.indexOf(e);for(var i=0;iu[e]}):i=i.sort()),i}var h9={touchstart:Ut,touchmove:jn,touchend:ht,touchcancel:Xt},f9="touchstart touchmove touchend touchcancel",h0=function(r){gr(e,r);function e(){var i;return e.prototype.evTarget=f9,i=r.apply(this,arguments)||this,i.targetIds={},i}var t=e.prototype;return t.handler=function(n){var s=h9[n.type],o=p9.call(this,n,s);o&&this.callback(this.manager,s,{pointers:o[0],changedPointers:o[1],pointerType:wa,srcEvent:n})},e}(Ks);function p9(r,e){var t=Qo(r.touches),i=this.targetIds;if(e&(Ut|jn)&&t.length===1)return i[t[0].identifier]=!0,[t,t];var n,s,o=Qo(r.changedTouches),a=[],u=this.target;if(s=t.filter(function(l){return c0(l.target,u)}),e===Ut)for(n=0;n-1&&n.splice(a,1)};setTimeout(s,y9)}}function b9(r,e){r&Ut?(this.primaryTouch=e.changedPointers[0].identifier,MR.call(this,e)):r&(ht|Xt)&&MR.call(this,e)}function _9(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=Fi&&o(n.options.event+NR(s))},e.tryEmit=function(i){if(this.canEmit())return this.emit(i);this.state=kr},e.canEmit=function(){for(var i=0;is.threshold&&u&s.direction},t.attrTest=function(n){return xs.prototype.attrTest.call(this,n)&&(this.state&hr||!(this.state&hr)&&this.directionTest(n))},t.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var s=N3(n.direction);s&&(n.additionalEvent=this.options.event+s),r.prototype.emit.call(this,n)},e}(xs),F3=function(r){gr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Pr({event:"swipe",threshold:10,velocity:.3,direction:zr|wn,pointers:1},i))||this}var t=e.prototype;return t.getTouchAction=function(){return p0.prototype.getTouchAction.call(this)},t.attrTest=function(n){var s=this.options.direction,o;return s&(zr|wn)?o=n.overallVelocity:s&zr?o=n.overallVelocityX:s&wn&&(o=n.overallVelocityY),r.prototype.attrTest.call(this,n)&&s&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&Rn(o)>this.options.velocity&&n.eventType&ht},t.emit=function(n){var s=N3(n.offsetDirection);s&&this.manager.emit(this.options.event+s,n),this.manager.emit(this.options.event,n)},e}(xs),k3=function(r){gr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Pr({event:"pinch",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[_n]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&hr)},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}(xs),B3=function(r){gr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Pr({event:"rotate",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[_n]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&hr)},e}(xs),L3=function(r){gr(e,r);function e(i){var n;return i===void 0&&(i={}),n=r.call(this,Pr({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[O3]},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&(ht|Xt)&&!l)this.reset();else if(n.eventType&Ut)this.reset(),this._timer=setTimeout(function(){s.state=oi,s.tryEmit()},o.time);else if(n.eventType&ht)return oi;return kr},t.reset=function(){clearTimeout(this._timer)},t.emit=function(n){this.state===oi&&(n&&n.eventType&ht?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=u0(),this.manager.emit(this.options.event,this._input)))},e}(Ia),j3={domEvents:!1,touchAction:S3,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},FR=[[B3,{enable:!1}],[k3,{enable:!1},["rotate"]],[F3,{direction:zr}],[p0,{direction:zr},["swipe"]],[fw],[fw,{event:"doubletap",taps:2},["tap"]],[L3]],O9=1,kR=2;function BR(r,e){var t=r.element;if(t.style){var i;si(r.options.cssProps,function(n,s){i=fl(t.style,s),e?(r.oldCssProps[i]=t.style[i],t.style[i]=n):t.style[i]=r.oldCssProps[i]||""}),e||(r.oldCssProps={})}}function I9(r,e){var t=document.createEvent("Event");t.initEvent(r,!0,!0),t.gesture=e,e.target.dispatchEvent(t)}var LR=function(){function r(t,i){var n=this;this.options=Pn({},j3,i||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=w9(this),this.touchAction=new P3(this,this.options.touchAction),BR(this,!0),si(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?kR:O9},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&oi)&&(n.curRecognizer=null,a=null);for(var u=0;u"u"?{style:{}}:document.createElement("div"),X8="function",ds=Math.round,Rn=Math.abs,u0=Date.now;function fl(r,e){for(var t,i,n=e[0].toUpperCase()+e.slice(1),s=0;s"u"?ni={}:ni=window;var w3=fl(Y8.style,"touchAction"),E3=w3!==void 0;function J8(){if(!E3)return!1;var r={},e=ni.CSS&&ni.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return r[t]=e?ni.CSS.supports("touch-action",t):!0}),r}var S3="compute",O3="auto",dw="manipulation",_n="none",Yo="pan-x",Xo="pan-y",tu=J8(),Q8=/mobile|tablet|ip(ad|hone|od)|android/i,I3="ontouchstart"in ni,Z8=fl(ni,"PointerEvent")!==void 0,e9=I3&&Q8.test(navigator.userAgent),wa="touch",t9="pen",l0="mouse",r9="kinect",i9=25,Ut=1,jn=2,ht=4,Xt=8,Iu=1,Ea=2,Sa=4,Oa=8,Rs=16,zr=Ea|Sa,wn=Oa|Rs,T3=zr|wn,$3=["x","y"],Tu=["clientX","clientY"];function si(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 n9(r){if(pn(r,_n))return _n;var e=pn(r,Yo),t=pn(r,Xo);return e&&t?_n:e||t?e?Yo:Xo:pn(r,dw)?dw:O3}var P3=function(){function r(t,i){this.manager=t,this.set(i)}var e=r.prototype;return e.set=function(i){i===S3&&(i=this.compute()),E3&&this.manager.element.style&&tu[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 si(this.manager.recognizers,function(n){pl(n.options.enable,[n])&&(i=i.concat(n.getTouchAction()))}),n9(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=pn(o,_n)&&!tu[_n],u=pn(o,Xo)&&!tu[Xo],l=pn(o,Yo)&&!tu[Yo];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&zr||l&&s&wn))return this.preventSrc(n)},e.preventSrc=function(i){this.manager.session.prevented=!0,i.preventDefault()},r}();function c0(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}function R3(r){var e=r.length;if(e===1)return{x:ds(r[0].clientX),y:ds(r[0].clientY)};for(var t=0,i=0,n=0;n=Rn(e)?r<0?Ea:Sa:e<0?Oa:Rs}function s9(r,e){var t=e.center,i=r.offsetDelta||{},n=r.prevDelta||{},s=r.prevInput||{};(e.eventType===Ut||s.eventType===ht)&&(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 x3(r,e,t){return{x:e/r||0,y:t/r||0}}function o9(r,e){return $u(e[0],e[1],Tu)/$u(r[0],r[1],Tu)}function a9(r,e){return hw(e[1],e[0],Tu)+hw(r[1],r[0],Tu)}function u9(r,e){var t=r.lastInterval||e,i=e.timeStamp-t.timeStamp,n,s,o,a;if(e.eventType!==Xt&&(i>i9||t.velocity===void 0)){var u=e.deltaX-t.deltaX,l=e.deltaY-t.deltaY,c=x3(i,u,l);s=c.x,o=c.y,n=Rn(c.x)>Rn(c.y)?c.x:c.y,a=C3(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 l9(r,e){var t=r.session,i=e.pointers,n=i.length;t.firstInput||(t.firstInput=qR(e)),n>1&&!t.firstMultiple?t.firstMultiple=qR(e):n===1&&(t.firstMultiple=!1);var s=t.firstInput,o=t.firstMultiple,a=o?o.center:s.center,u=e.center=R3(i);e.timeStamp=u0(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=hw(a,u),e.distance=$u(a,u),s9(t,e),e.offsetDirection=C3(e.deltaX,e.deltaY);var l=x3(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=Rn(l.x)>Rn(l.y)?l.x:l.y,e.scale=o?o9(o.pointers,i):1,e.rotation=o?a9(o.pointers,i):0,e.maxPointers=t.prevInput?e.pointers.length>t.prevInput.maxPointers?e.pointers.length:t.prevInput.maxPointers:e.pointers.length,u9(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,c0(h,c)&&(c=h),e.target=c}function c9(r,e,t){var i=t.pointers.length,n=t.changedPointers.length,s=e&Ut&&i-n===0,o=e&(ht|Xt)&&i-n===0;t.isFirst=!!s,t.isFinal=!!o,s&&(r.session={}),t.eventType=e,l9(r,t),r.emit("hammer.input",t),r.recognize(t),r.session.prevInput=t}function Jo(r){return r.trim().split(/\s+/g)}function xo(r,e,t){si(Jo(e),function(i){r.addEventListener(i,t,!1)})}function qo(r,e,t){si(Jo(e),function(i){r.removeEventListener(i,t,!1)})}function AR(r){var e=r.ownerDocument||r;return e.defaultView||e.parentWindow||window}var Ks=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){pl(t.options.enable,[t])&&n.handler(s)},this.init()}var e=r.prototype;return e.handler=function(){},e.init=function(){this.evEl&&xo(this.element,this.evEl,this.domHandler),this.evTarget&&xo(this.target,this.evTarget,this.domHandler),this.evWin&&xo(AR(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&qo(this.element,this.evEl,this.domHandler),this.evTarget&&qo(this.target,this.evTarget,this.domHandler),this.evWin&&qo(AR(this.element),this.evWin,this.domHandler)},r}();function Cn(r,e,t){if(r.indexOf&&!t)return r.indexOf(e);for(var i=0;iu[e]}):i=i.sort()),i}var f9={touchstart:Ut,touchmove:jn,touchend:ht,touchcancel:Xt},p9="touchstart touchmove touchend touchcancel",h0=function(r){gr(e,r);function e(){var i;return e.prototype.evTarget=p9,i=r.apply(this,arguments)||this,i.targetIds={},i}var t=e.prototype;return t.handler=function(n){var s=f9[n.type],o=v9.call(this,n,s);o&&this.callback(this.manager,s,{pointers:o[0],changedPointers:o[1],pointerType:wa,srcEvent:n})},e}(Ks);function v9(r,e){var t=Qo(r.touches),i=this.targetIds;if(e&(Ut|jn)&&t.length===1)return i[t[0].identifier]=!0,[t,t];var n,s,o=Qo(r.changedTouches),a=[],u=this.target;if(s=t.filter(function(l){return c0(l.target,u)}),e===Ut)for(n=0;n-1&&n.splice(a,1)};setTimeout(s,b9)}}function _9(r,e){r&Ut?(this.primaryTouch=e.changedPointers[0].identifier,MR.call(this,e)):r&(ht|Xt)&&MR.call(this,e)}function w9(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=Fi&&o(n.options.event+NR(s))},e.tryEmit=function(i){if(this.canEmit())return this.emit(i);this.state=kr},e.canEmit=function(){for(var i=0;is.threshold&&u&s.direction},t.attrTest=function(n){return xs.prototype.attrTest.call(this,n)&&(this.state&hr||!(this.state&hr)&&this.directionTest(n))},t.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var s=N3(n.direction);s&&(n.additionalEvent=this.options.event+s),r.prototype.emit.call(this,n)},e}(xs),F3=function(r){gr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Pr({event:"swipe",threshold:10,velocity:.3,direction:zr|wn,pointers:1},i))||this}var t=e.prototype;return t.getTouchAction=function(){return p0.prototype.getTouchAction.call(this)},t.attrTest=function(n){var s=this.options.direction,o;return s&(zr|wn)?o=n.overallVelocity:s&zr?o=n.overallVelocityX:s&wn&&(o=n.overallVelocityY),r.prototype.attrTest.call(this,n)&&s&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&Rn(o)>this.options.velocity&&n.eventType&ht},t.emit=function(n){var s=N3(n.offsetDirection);s&&this.manager.emit(this.options.event+s,n),this.manager.emit(this.options.event,n)},e}(xs),k3=function(r){gr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Pr({event:"pinch",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[_n]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&hr)},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}(xs),B3=function(r){gr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Pr({event:"rotate",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[_n]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&hr)},e}(xs),L3=function(r){gr(e,r);function e(i){var n;return i===void 0&&(i={}),n=r.call(this,Pr({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[O3]},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&(ht|Xt)&&!l)this.reset();else if(n.eventType&Ut)this.reset(),this._timer=setTimeout(function(){s.state=oi,s.tryEmit()},o.time);else if(n.eventType&ht)return oi;return kr},t.reset=function(){clearTimeout(this._timer)},t.emit=function(n){this.state===oi&&(n&&n.eventType&ht?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=u0(),this.manager.emit(this.options.event,this._input)))},e}(Ia),j3={domEvents:!1,touchAction:S3,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},FR=[[B3,{enable:!1}],[k3,{enable:!1},["rotate"]],[F3,{direction:zr}],[p0,{direction:zr},["swipe"]],[fw],[fw,{event:"doubletap",taps:2},["tap"]],[L3]],I9=1,kR=2;function BR(r,e){var t=r.element;if(t.style){var i;si(r.options.cssProps,function(n,s){i=fl(t.style,s),e?(r.oldCssProps[i]=t.style[i],t.style[i]=n):t.style[i]=r.oldCssProps[i]||""}),e||(r.oldCssProps={})}}function T9(r,e){var t=document.createEvent("Event");t.initEvent(r,!0,!0),t.gesture=e,e.target.dispatchEvent(t)}var LR=function(){function r(t,i){var n=this;this.options=Pn({},j3,i||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=E9(this),this.touchAction=new P3(this,this.options.touchAction),BR(this,!0),si(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?kR:I9},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&oi)&&(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 H3=z3(function(r,e,t){for(var i=Object.keys(e),n=0;n1?e-1:0),i=1;i2)return Pu(U3(e[0],e[1]),...I6(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 x6(n))Object.prototype.propertyIsEnumerable.call(n,s)&&(n[s]===W3?delete i[s]:i[s]!==null&&n[s]!==null&&typeof i[s]=="object"&&typeof n[s]=="object"&&!Mr(i[s])&&!Mr(n[s])?i[s]=Pu(i[s],n[s]):i[s]=V3(n[s]));return i}function V3(r){return Mr(r)?wr(r).call(r,e=>V3(e)):typeof r=="object"&&r!==null?r instanceof Date?new Date(r.getTime()):Pu({},r):r}function K3(r){for(const e of a0(r))r[e]===W3?delete r[e]:typeof r[e]=="object"&&r[e]!==null&&K3(r[e])}function M9(){const r=()=>{};return{on:r,off:r,destroy:r,emit:r,get(){return{set:r}}}}const N9=typeof window<"u"?window.Hammer||A9:function(){return M9()};function ti(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=N9(this._dom.overlay);t.on("tap",v3(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{t.destroy()});const i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];$n(i).call(i,n=>{t.on(n,s=>{s.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=n=>{F9(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()}}K8(ti.prototype);ti.current=null;ti.prototype.destroy=function(){this.deactivate();for(const t of t8(r=b3(e=this._cleanupQueue).call(e,0)).call(r)){var r,e;t()}};ti.prototype.activate=function(){ti.current&&ti.current.deactivate(),ti.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)};ti.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")};ti.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function F9(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}var ap,zR;function k9(){if(zR)return ap;zR=1,n3();var r=_t();return ap=r.Object.getOwnPropertySymbols,ap}var up,HR;function B9(){if(HR)return up;HR=1;var r=k9();return up=r,up}var lp,WR;function L9(){return WR||(WR=1,lp=B9()),lp}var j9=L9(),UR=$e(j9),cp={exports:{}},VR={},KR;function z9(){if(KR)return VR;KR=1;var r=be(),e=Le(),t=Wr(),i=il().f,n=gt(),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)}}),VR}var GR;function H9(){if(GR)return cp.exports;GR=1,z9();var r=_t(),e=r.Object,t=cp.exports=function(n,s){return e.getOwnPropertyDescriptor(n,s)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),cp.exports}var dp,YR;function W9(){if(YR)return dp;YR=1;var r=H9();return dp=r,dp}var hp,XR;function U9(){return XR||(XR=1,hp=W9()),hp}var V9=U9(),G3=$e(V9),JR={},QR;function K9(){if(QR)return JR;QR=1;var r=be(),e=gt(),t=m3(),i=Wr(),n=il(),s=sl();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,p;c.length>h;)p=l(u,f=c[h++]),p!==void 0&&s(d,f,p);return d}}),JR}var fp,ZR;function G9(){if(ZR)return fp;ZR=1,K9();var r=_t();return fp=r.Object.getOwnPropertyDescriptors,fp}var pp,eC;function Y9(){if(eC)return pp;eC=1;var r=G9();return pp=r,pp}var vp,tC;function X9(){return tC||(tC=1,vp=Y9()),vp}var J9=X9(),rC=$e(J9),gp={exports:{}},iC={},nC;function Q9(){if(nC)return iC;nC=1;var r=be(),e=gt(),t=i0().f;return r({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),iC}var sC;function Z9(){if(sC)return gp.exports;sC=1,Q9();var r=_t(),e=r.Object,t=gp.exports=function(n,s){return e.defineProperties(n,s)};return e.defineProperties.sham&&(t.sham=!0),gp.exports}var mp,oC;function e7(){if(oC)return mp;oC=1;var r=Z9();return mp=r,mp}var yp,aC;function t7(){return aC||(aC=1,yp=e7()),yp}var r7=t7(),i7=$e(r7),bp,uC;function n7(){return uC||(uC=1,bp=Gz()),bp}var s7=n7(),o7=$e(s7),lC={},cC={},_p={exports:{}},wp,dC;function a7(){if(dC)return wp;dC=1;var r=Le();return wp=r(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),wp}var Ep,hC;function u7(){if(hC)return Ep;hC=1;var r=Le(),e=Kt(),t=vi(),i=a7(),n=Object.isExtensible,s=r(function(){});return Ep=s||i?function(a){return!e(a)||i&&t(a)==="ArrayBuffer"?!1:n?n(a):!0}:n,Ep}var Sp,fC;function l7(){if(fC)return Sp;fC=1;var r=Le();return Sp=!r(function(){return Object.isExtensible(Object.preventExtensions({}))}),Sp}var pC;function Y3(){if(pC)return _p.exports;pC=1;var r=be(),e=Ue(),t=ma(),i=Kt(),n=It(),s=vr().f,o=ul(),a=e3(),u=u7(),l=rl(),c=l7(),d=!1,h=l("meta"),f=0,p=function(y){s(y,h,{value:{objectID:"O"+f++,weakData:{}}})},v=function(y,I){if(!i(y))return typeof y=="symbol"?y:(typeof y=="string"?"S":"P")+y;if(!n(y,h)){if(!u(y))return"F";if(!I)return"E";p(y)}return y[h].objectID},_=function(y,I){if(!n(y,h)){if(!u(y))return!0;if(!I)return!1;p(y)}return y[h].weakData},m=function(y){return c&&d&&u(y)&&!n(y,h)&&p(y),y},g=function(){E.enable=function(){},d=!0;var y=o.f,I=e([].splice),O={};O[h]=1,y(O).length&&(o.f=function(T){for(var b=y(T),w=0,R=b.length;wb;b++)if(R=q(f[b]),R&&o(h,R))return R;return new d(!1)}O=a(f,T)}for(P=g?f.next:O.next;!(S=e(P,O)).done;){try{R=q(S.value)}catch(F){l(O,"throw",F)}if(typeof R=="object"&&R&&o(h,R))return R}return new d(!1)},Pp}var Rp,_C;function Q3(){if(_C)return Rp;_C=1;var r=Ot(),e=TypeError;return Rp=function(t,i){if(r(i,t))return t;throw new e("Incorrect invocation")},Rp}var Cp,wC;function Z3(){if(wC)return Cp;wC=1;var r=be(),e=vt(),t=Y3(),i=Le(),n=zs(),s=g0(),o=Q3(),a=St(),u=Kt(),l=fa(),c=Ln(),d=vr().f,h=Us().forEach,f=gt(),p=_a(),v=p.set,_=p.getterFor;return Cp=function(m,g,E){var y=m.indexOf("Map")!==-1,I=m.indexOf("Weak")!==-1,O=y?"set":"add",T=e[m],b=T&&T.prototype,w={},R;if(!f||!a(T)||!(I||b.forEach&&!i(function(){new T().entries().next()})))R=E.getConstructor(g,m,y,O),t.enable();else{R=g(function($,q){v(o($,P),{type:m,collection:new T}),l(q)||s(q,$[O],{that:$,AS_ENTRIES:y})});var P=R.prototype,S=_(m);h(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function($){var q=$==="add"||$==="set";$ in b&&!(I&&$==="clear")&&n(P,$,function(F,Z){var z=S(this).collection;if(!q&&I&&!u(F))return $==="get"?void 0:!1;var te=z[$](F===0?0:F,Z);return q?this:te})}),I||d(P,"size",{configurable:!0,get:function(){return S(this).collection.size}})}return c(R,m,!1,!0),w[m]=R,r({global:!0,forced:!0},w),I||E.setStrong(R,m,y),R},Cp}var xp,EC;function d7(){if(EC)return xp;EC=1;var r=ba();return xp=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},xp}var qp,SC;function h7(){if(SC)return qp;SC=1;var r=ir(),e=n0(),t=Tt(),i=gt(),n=t("species");return qp=function(s){var o=r(s);i&&o&&!o[n]&&e(o,n,{configurable:!0,get:function(){return this}})},qp}var Ap,OC;function e5(){if(OC)return Ap;OC=1;var r=ya(),e=n0(),t=d7(),i=nl(),n=Q3(),s=fa(),o=g0(),a=s0(),u=o0(),l=h7(),c=gt(),d=Y3().fastKey,h=_a(),f=h.set,p=h.getterFor;return Ap={getConstructor:function(v,_,m,g){var E=v(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,I=p(_),O=function(b,w,R){var P=I(b),S=T(b,w),$,q;return S?S.value=R:(P.last=S={index:q=d(w,!0),key:w,value:R,previous:$=P.last,next:null,removed:!1},P.first||(P.first=S),$&&($.next=S),c?P.size++:b.size++,q!=="F"&&(P.index[q]=S)),b},T=function(b,w){var R=I(b),P=d(w),S;if(P!=="F")return R.index[P];for(S=R.first;S;S=S.next)if(S.key===w)return S};return t(y,{clear:function(){for(var w=this,R=I(w),P=R.first;P;)P.removed=!0,P.previous&&(P.previous=P.previous.next=null),P=P.next;R.first=R.last=null,R.index=r(null),c?R.size=0:w.size=0},delete:function(b){var w=this,R=I(w),P=T(w,b);if(P){var S=P.next,$=P.previous;delete R.index[P.index],P.removed=!0,$&&($.next=S),S&&(S.previous=$),R.first===P&&(R.first=S),R.last===P&&(R.last=$),c?R.size--:w.size--}return!!P},forEach:function(w){for(var R=I(this),P=i(w,arguments.length>1?arguments[1]:void 0),S;S=S?S.next:R.first;)for(P(S.value,S.key,this);S&&S.removed;)S=S.previous},has:function(w){return!!T(this,w)}}),t(y,m?{get:function(w){var R=T(this,w);return R&&R.value},set:function(w,R){return O(this,w===0?0:w,R)}}:{add:function(w){return O(this,w=w===0?0:w,w)}}),c&&e(y,"size",{configurable:!0,get:function(){return I(this).size}}),E},setStrong:function(v,_,m){var g=_+" Iterator",E=p(_),y=p(g);a(v,_,function(I,O){f(this,{type:g,target:I,state:E(I),kind:O,last:null})},function(){for(var I=y(this),O=I.kind,T=I.last;T&&T.removed;)T=T.previous;return!I.target||!(I.last=T=T?T.next:I.state.first)?(I.target=null,u(void 0,!0)):u(O==="keys"?T.key:O==="values"?T.value:[T.key,T.value],!1)},m?"entries":"values",!m,!0),l(_)}},Ap}var IC;function f7(){if(IC)return cC;IC=1;var r=Z3(),e=e5();return r("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),cC}var TC;function p7(){return TC||(TC=1,f7()),lC}var $C={},Dp,PC;function t5(){return PC||(PC=1,Dp=function(r,e){return e===1?function(t,i){return t[r](i)}:function(t,i,n){return t[r](i,n)}}),Dp}var Mp,RC;function v7(){if(RC)return Mp;RC=1;var r=ir(),e=t5(),t=r("Map");return Mp={Map:t,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:t.prototype},Mp}var CC;function g7(){if(CC)return $C;CC=1;var r=be(),e=Ue(),t=gi(),i=kn(),n=g0(),s=v7(),o=Ls(),a=Le(),u=s.Map,l=s.has,c=s.get,d=s.set,h=e([].push),f=o||a(function(){return u.groupBy("ab",function(p){return p}).get("a").length!==1});return r({target:"Map",stat:!0,forced:o||f},{groupBy:function(v,_){i(v),t(_);var m=new u,g=0;return n(v,function(E){var y=_(E,g++);l(m,y)?h(c(m,y),E):d(m,y,[E])}),m}}),$C}var Np,xC;function m7(){if(xC)return Np;xC=1,Qi(),p7(),g7(),dl();var r=_t();return Np=r.Map,Np}var Fp,qC;function y7(){if(qC)return Fp;qC=1;var r=m7();return Zi(),Fp=r,Fp}var kp,AC;function b7(){return AC||(AC=1,kp=y7()),kp}var _7=b7(),r5=$e(_7),DC={},MC;function w7(){if(MC)return DC;MC=1;var r=be(),e=Us().some,t=hl(),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)}}),DC}var Bp,NC;function E7(){if(NC)return Bp;NC=1,w7();var r=Zt();return Bp=r("Array","some"),Bp}var Lp,FC;function S7(){if(FC)return Lp;FC=1;var r=Ot(),e=E7(),t=Array.prototype;return Lp=function(i){var n=i.some;return i===t||r(t,i)&&n===t.some?e:n},Lp}var jp,kC;function O7(){if(kC)return jp;kC=1;var r=S7();return jp=r,jp}var zp,BC;function I7(){return BC||(BC=1,zp=O7()),zp}var T7=I7(),$7=$e(T7),Hp,LC;function P7(){if(LC)return Hp;LC=1,Qi();var r=Zt();return Hp=r("Array","keys"),Hp}var Wp,jC;function R7(){if(jC)return Wp;jC=1;var r=P7();return Wp=r,Wp}var Up,zC;function C7(){if(zC)return Up;zC=1,Zi();var r=Xi(),e=It(),t=Ot(),i=R7(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return Up=function(o){var a=o.keys;return o===n||t(n,o)&&a===n.keys||e(s,r(o))?i:a},Up}var Vp,HC;function x7(){return HC||(HC=1,Vp=C7()),Vp}var q7=x7(),ss=$e(q7),WC={},Kp,UC;function A7(){if(UC)return Kp;UC=1;var r=Ws(),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,p=0,v=0;p3)){if(d)return!0;if(f)return f<603;var T="",b,w,R,P;for(b=65;b<76;b++){switch(w=String.fromCharCode(b),b){case 66:case 69:case 70:case 72:R=3;break;case 68:case 71:R=4;break;default:R=2}for(P=0;P<47;P++)p.push({k:w+P,v:R})}for(p.sort(function(S,$){return $.v-S.v}),P=0;Po(w)?1:-1}};return r({target:"Array",proto:!0,forced:I},{sort:function(b){b!==void 0&&t(b);var w=i(this);if(y)return b===void 0?v(w):v(w,b);var R=[],P=n(w),S,$;for($=0;$"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");cv=crypto.getRandomValues.bind(crypto)}return cv(iY)}const sY=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var cx={randomUUID:sY};function oY(r,e,t){var n;r=r||{};const i=r.random??((n=r.rng)==null?void 0:n.call(r))??nY();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,rY(i)}function aY(r,e,t){return cx.randomUUID&&!r?cx.randomUUID():oY(r)}function dx(r){return typeof r=="string"||typeof r=="number"}class m0{constructor(e){Ni(this,"_queue",[]),Ni(this,"_timeout",null),Ni(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 m0(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=W8(()=>{this.flush()},this.delay))}flush(){var e,t;$n(e=b3(t=this._queue).call(t,0)).call(e,i=>{i.fn.apply(i.context||i.fn,i.args||[])})}}class Ru{constructor(){Ni(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),Ni(this,"subscribe",Ru.prototype.on),Ni(this,"unsubscribe",Ru.prototype.off)}_trigger(e,t,i){var n;if(e==="*")throw new Error("Cannot trigger event *");$n(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]=cs(i=this._subscribers[e]).call(i,n=>n!==t)}}var hx={},fx={},px;function uY(){if(px)return fx;px=1;var r=Z3(),e=e5();return r("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),fx}var vx;function lY(){return vx||(vx=1,uY()),hx}var gx={},dv,mx;function zn(){if(mx)return dv;mx=1;var r=Bs(),e=TypeError;return dv=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")},dv}var hv,yx;function Hn(){if(yx)return hv;yx=1;var r=ir(),e=t5(),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 fv,bx;function Wn(){if(bx)return fv;bx=1;var r=Qt();return fv=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},fv}var pv,_x;function Ta(){if(_x)return pv;_x=1;var r=Wn();return pv=function(e,t,i){return i?r(e.keys(),t,!0):e.forEach(t)},pv}var vv,wx;function y0(){if(wx)return vv;wx=1;var r=Hn(),e=Ta(),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 gv,Ex;function $a(){return Ex||(Ex=1,gv=function(r){return r.size}),gv}var mv,Sx;function cY(){return Sx||(Sx=1,mv=function(r){return{iterator:r,next:r.next,done:!1}}),mv}var yv,Ox;function Un(){if(Ox)return yv;Ox=1;var r=gi(),e=mi(),t=Qt(),i=Hs(),n=cY(),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 bv,Ix;function dY(){if(Ix)return bv;Ix=1;var r=zn(),e=Hn(),t=y0(),i=$a(),n=Un(),s=Ta(),o=Wn(),a=e.has,u=e.remove;return bv=function(c){var d=r(this),h=n(c),f=t(d);return i(d)<=h.size?s(d,function(p){h.includes(p)&&u(f,p)}):o(h.getIterator(),function(p){a(f,p)&&u(f,p)}),f},bv}var _v,Tx;function Vn(){return Tx||(Tx=1,_v=function(){return!1}),_v}var $x;function hY(){if($x)return gx;$x=1;var r=be(),e=dY(),t=Le(),i=Vn(),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}),gx}var Px={},wv,Rx;function fY(){if(Rx)return wv;Rx=1;var r=zn(),e=Hn(),t=$a(),i=Un(),n=Ta(),s=Wn(),o=e.Set,a=e.add,u=e.has;return wv=function(c){var d=r(this),h=i(c),f=new o;return t(d)>h.size?s(h.getIterator(),function(p){u(d,p)&&a(f,p)}):n(d,function(p){h.includes(p)&&a(f,p)}),f},wv}var Cx;function pY(){if(Cx)return Px;Cx=1;var r=be(),e=Le(),t=fY(),i=Vn(),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}),Px}var xx={},Ev,qx;function vY(){if(qx)return Ev;qx=1;var r=zn(),e=Hn().has,t=$a(),i=Un(),n=Ta(),s=Wn(),o=v0();return Ev=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},Ev}var Ax;function gY(){if(Ax)return xx;Ax=1;var r=be(),e=vY(),t=Vn(),i=!t("isDisjointFrom",function(n){return!n});return r({target:"Set",proto:!0,real:!0,forced:i},{isDisjointFrom:e}),xx}var Dx={},Sv,Mx;function mY(){if(Mx)return Sv;Mx=1;var r=zn(),e=$a(),t=Ta(),i=Un();return Sv=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},Sv}var Nx;function yY(){if(Nx)return Dx;Nx=1;var r=be(),e=mY(),t=Vn(),i=!t("isSubsetOf",function(n){return n});return r({target:"Set",proto:!0,real:!0,forced:i},{isSubsetOf:e}),Dx}var Fx={},Ov,kx;function bY(){if(kx)return Ov;kx=1;var r=zn(),e=Hn().has,t=$a(),i=Un(),n=Wn(),s=v0();return Ov=function(a){var u=r(this),l=i(a);if(t(u)t[0])}toItemArray(){var e;return wr(e=[...this._pairs]).call(e,t=>t[1])}toEntryArray(){return[...this._pairs]}toObjectMap(){const e=$8(null);for(const[t,i]of this._pairs)e[t]=i;return e}toMap(){return new r5(this._pairs)}toIdSet(){return new xv(this.toIdArray())}toItemSet(){return new xv(this.toItemArray())}cache(){return new vn([...this._pairs])}distinct(e){const t=new xv;for(const[i,n]of this._pairs)t.add(e(n,i));return t}filter(e){const t=this._pairs;return new vn({*[fs](){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 vn({*[fs](){for(const[i,n]of t)yield[i,e(n,i)]}})}max(e){const t=kv(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=kv(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 kv(pw(t=[...this._pairs]).call(t,(i,n)=>{let[s,o]=i,[a,u]=n;return e(o,u,s,a)}))}})}}function rq(r,e){var t=a0(r);if(UR){var i=UR(r);e&&(i=cs(i).call(i,function(n){return G3(r,n).enumerable})),t.push.apply(t,i)}return t}function iq(r){for(var e=1;eo[this._idProp]);if($7(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=v8({},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(Mr(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=D9(o,a);return this._data.set(u,l),{id:u,oldData:o,updatedData:l}});if(n.length){const s={items:wr(n).call(n,o=>o.id),oldData:wr(n).call(n,o=>o.oldData),data:wr(n).call(n,o=>o.updatedData)};return this._trigger("update",s,t),s.items}else return[]}get(e,t){let i,n,s;dx(e)?(i=e,s=t):Mr(e)?(n=e,s=t):s=e;const o=s&&s.returnType==="Object"?"Object":"Array",a=s&&cs(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,p=n.length;f(n[s]=e[s],n),{})}_sort(e,t){if(typeof t=="string"){const i=t;pw(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 nx(n=this._data).call(n)){var n;const o=s[e];typeof o=="number"&&(i==null||o\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 H3=z3(function(r,e,t){for(var i=Object.keys(e),n=0;n1?e-1:0),i=1;i2)return Pu(U3(e[0],e[1]),...T6(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 q6(n))Object.prototype.propertyIsEnumerable.call(n,s)&&(n[s]===W3?delete i[s]:i[s]!==null&&n[s]!==null&&typeof i[s]=="object"&&typeof n[s]=="object"&&!Mr(i[s])&&!Mr(n[s])?i[s]=Pu(i[s],n[s]):i[s]=V3(n[s]));return i}function V3(r){return Mr(r)?wr(r).call(r,e=>V3(e)):typeof r=="object"&&r!==null?r instanceof Date?new Date(r.getTime()):Pu({},r):r}function K3(r){for(const e of a0(r))r[e]===W3?delete r[e]:typeof r[e]=="object"&&r[e]!==null&&K3(r[e])}function N9(){const r=()=>{};return{on:r,off:r,destroy:r,emit:r,get(){return{set:r}}}}const F9=typeof window<"u"?window.Hammer||D9:function(){return N9()};function ti(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=F9(this._dom.overlay);t.on("tap",v3(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{t.destroy()});const i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];$n(i).call(i,n=>{t.on(n,s=>{s.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=n=>{k9(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()}}G8(ti.prototype);ti.current=null;ti.prototype.destroy=function(){this.deactivate();for(const t of r8(r=b3(e=this._cleanupQueue).call(e,0)).call(r)){var r,e;t()}};ti.prototype.activate=function(){ti.current&&ti.current.deactivate(),ti.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)};ti.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")};ti.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function k9(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}var ap,zR;function B9(){if(zR)return ap;zR=1,n3();var r=_t();return ap=r.Object.getOwnPropertySymbols,ap}var up,HR;function L9(){if(HR)return up;HR=1;var r=B9();return up=r,up}var lp,WR;function j9(){return WR||(WR=1,lp=L9()),lp}var z9=j9(),UR=$e(z9),cp={exports:{}},VR={},KR;function H9(){if(KR)return VR;KR=1;var r=be(),e=Le(),t=Wr(),i=il().f,n=gt(),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)}}),VR}var GR;function W9(){if(GR)return cp.exports;GR=1,H9();var r=_t(),e=r.Object,t=cp.exports=function(n,s){return e.getOwnPropertyDescriptor(n,s)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),cp.exports}var dp,YR;function U9(){if(YR)return dp;YR=1;var r=W9();return dp=r,dp}var hp,XR;function V9(){return XR||(XR=1,hp=U9()),hp}var K9=V9(),G3=$e(K9),JR={},QR;function G9(){if(QR)return JR;QR=1;var r=be(),e=gt(),t=m3(),i=Wr(),n=il(),s=sl();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,p;c.length>h;)p=l(u,f=c[h++]),p!==void 0&&s(d,f,p);return d}}),JR}var fp,ZR;function Y9(){if(ZR)return fp;ZR=1,G9();var r=_t();return fp=r.Object.getOwnPropertyDescriptors,fp}var pp,eC;function X9(){if(eC)return pp;eC=1;var r=Y9();return pp=r,pp}var vp,tC;function J9(){return tC||(tC=1,vp=X9()),vp}var Q9=J9(),rC=$e(Q9),gp={exports:{}},iC={},nC;function Z9(){if(nC)return iC;nC=1;var r=be(),e=gt(),t=i0().f;return r({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),iC}var sC;function e7(){if(sC)return gp.exports;sC=1,Z9();var r=_t(),e=r.Object,t=gp.exports=function(n,s){return e.defineProperties(n,s)};return e.defineProperties.sham&&(t.sham=!0),gp.exports}var mp,oC;function t7(){if(oC)return mp;oC=1;var r=e7();return mp=r,mp}var yp,aC;function r7(){return aC||(aC=1,yp=t7()),yp}var i7=r7(),n7=$e(i7),bp,uC;function s7(){return uC||(uC=1,bp=Gz()),bp}var o7=s7(),a7=$e(o7),lC={},cC={},_p={exports:{}},wp,dC;function u7(){if(dC)return wp;dC=1;var r=Le();return wp=r(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),wp}var Ep,hC;function l7(){if(hC)return Ep;hC=1;var r=Le(),e=Kt(),t=vi(),i=u7(),n=Object.isExtensible,s=r(function(){});return Ep=s||i?function(a){return!e(a)||i&&t(a)==="ArrayBuffer"?!1:n?n(a):!0}:n,Ep}var Sp,fC;function c7(){if(fC)return Sp;fC=1;var r=Le();return Sp=!r(function(){return Object.isExtensible(Object.preventExtensions({}))}),Sp}var pC;function Y3(){if(pC)return _p.exports;pC=1;var r=be(),e=Ue(),t=ma(),i=Kt(),n=It(),s=vr().f,o=ul(),a=e3(),u=l7(),l=rl(),c=c7(),d=!1,h=l("meta"),f=0,p=function(y){s(y,h,{value:{objectID:"O"+f++,weakData:{}}})},v=function(y,I){if(!i(y))return typeof y=="symbol"?y:(typeof y=="string"?"S":"P")+y;if(!n(y,h)){if(!u(y))return"F";if(!I)return"E";p(y)}return y[h].objectID},_=function(y,I){if(!n(y,h)){if(!u(y))return!0;if(!I)return!1;p(y)}return y[h].weakData},m=function(y){return c&&d&&u(y)&&!n(y,h)&&p(y),y},g=function(){E.enable=function(){},d=!0;var y=o.f,I=e([].splice),O={};O[h]=1,y(O).length&&(o.f=function(T){for(var b=y(T),w=0,R=b.length;wb;b++)if(R=q(f[b]),R&&o(h,R))return R;return new d(!1)}O=a(f,T)}for(P=g?f.next:O.next;!(S=e(P,O)).done;){try{R=q(S.value)}catch(F){l(O,"throw",F)}if(typeof R=="object"&&R&&o(h,R))return R}return new d(!1)},Pp}var Rp,_C;function Q3(){if(_C)return Rp;_C=1;var r=Ot(),e=TypeError;return Rp=function(t,i){if(r(i,t))return t;throw new e("Incorrect invocation")},Rp}var Cp,wC;function Z3(){if(wC)return Cp;wC=1;var r=be(),e=vt(),t=Y3(),i=Le(),n=zs(),s=g0(),o=Q3(),a=St(),u=Kt(),l=fa(),c=Ln(),d=vr().f,h=Us().forEach,f=gt(),p=_a(),v=p.set,_=p.getterFor;return Cp=function(m,g,E){var y=m.indexOf("Map")!==-1,I=m.indexOf("Weak")!==-1,O=y?"set":"add",T=e[m],b=T&&T.prototype,w={},R;if(!f||!a(T)||!(I||b.forEach&&!i(function(){new T().entries().next()})))R=E.getConstructor(g,m,y,O),t.enable();else{R=g(function($,q){v(o($,P),{type:m,collection:new T}),l(q)||s(q,$[O],{that:$,AS_ENTRIES:y})});var P=R.prototype,S=_(m);h(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function($){var q=$==="add"||$==="set";$ in b&&!(I&&$==="clear")&&n(P,$,function(F,Z){var z=S(this).collection;if(!q&&I&&!u(F))return $==="get"?void 0:!1;var te=z[$](F===0?0:F,Z);return q?this:te})}),I||d(P,"size",{configurable:!0,get:function(){return S(this).collection.size}})}return c(R,m,!1,!0),w[m]=R,r({global:!0,forced:!0},w),I||E.setStrong(R,m,y),R},Cp}var xp,EC;function h7(){if(EC)return xp;EC=1;var r=ba();return xp=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},xp}var qp,SC;function f7(){if(SC)return qp;SC=1;var r=ir(),e=n0(),t=Tt(),i=gt(),n=t("species");return qp=function(s){var o=r(s);i&&o&&!o[n]&&e(o,n,{configurable:!0,get:function(){return this}})},qp}var Ap,OC;function e5(){if(OC)return Ap;OC=1;var r=ya(),e=n0(),t=h7(),i=nl(),n=Q3(),s=fa(),o=g0(),a=s0(),u=o0(),l=f7(),c=gt(),d=Y3().fastKey,h=_a(),f=h.set,p=h.getterFor;return Ap={getConstructor:function(v,_,m,g){var E=v(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,I=p(_),O=function(b,w,R){var P=I(b),S=T(b,w),$,q;return S?S.value=R:(P.last=S={index:q=d(w,!0),key:w,value:R,previous:$=P.last,next:null,removed:!1},P.first||(P.first=S),$&&($.next=S),c?P.size++:b.size++,q!=="F"&&(P.index[q]=S)),b},T=function(b,w){var R=I(b),P=d(w),S;if(P!=="F")return R.index[P];for(S=R.first;S;S=S.next)if(S.key===w)return S};return t(y,{clear:function(){for(var w=this,R=I(w),P=R.first;P;)P.removed=!0,P.previous&&(P.previous=P.previous.next=null),P=P.next;R.first=R.last=null,R.index=r(null),c?R.size=0:w.size=0},delete:function(b){var w=this,R=I(w),P=T(w,b);if(P){var S=P.next,$=P.previous;delete R.index[P.index],P.removed=!0,$&&($.next=S),S&&(S.previous=$),R.first===P&&(R.first=S),R.last===P&&(R.last=$),c?R.size--:w.size--}return!!P},forEach:function(w){for(var R=I(this),P=i(w,arguments.length>1?arguments[1]:void 0),S;S=S?S.next:R.first;)for(P(S.value,S.key,this);S&&S.removed;)S=S.previous},has:function(w){return!!T(this,w)}}),t(y,m?{get:function(w){var R=T(this,w);return R&&R.value},set:function(w,R){return O(this,w===0?0:w,R)}}:{add:function(w){return O(this,w=w===0?0:w,w)}}),c&&e(y,"size",{configurable:!0,get:function(){return I(this).size}}),E},setStrong:function(v,_,m){var g=_+" Iterator",E=p(_),y=p(g);a(v,_,function(I,O){f(this,{type:g,target:I,state:E(I),kind:O,last:null})},function(){for(var I=y(this),O=I.kind,T=I.last;T&&T.removed;)T=T.previous;return!I.target||!(I.last=T=T?T.next:I.state.first)?(I.target=null,u(void 0,!0)):u(O==="keys"?T.key:O==="values"?T.value:[T.key,T.value],!1)},m?"entries":"values",!m,!0),l(_)}},Ap}var IC;function p7(){if(IC)return cC;IC=1;var r=Z3(),e=e5();return r("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),cC}var TC;function v7(){return TC||(TC=1,p7()),lC}var $C={},Dp,PC;function t5(){return PC||(PC=1,Dp=function(r,e){return e===1?function(t,i){return t[r](i)}:function(t,i,n){return t[r](i,n)}}),Dp}var Mp,RC;function g7(){if(RC)return Mp;RC=1;var r=ir(),e=t5(),t=r("Map");return Mp={Map:t,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:t.prototype},Mp}var CC;function m7(){if(CC)return $C;CC=1;var r=be(),e=Ue(),t=gi(),i=kn(),n=g0(),s=g7(),o=Ls(),a=Le(),u=s.Map,l=s.has,c=s.get,d=s.set,h=e([].push),f=o||a(function(){return u.groupBy("ab",function(p){return p}).get("a").length!==1});return r({target:"Map",stat:!0,forced:o||f},{groupBy:function(v,_){i(v),t(_);var m=new u,g=0;return n(v,function(E){var y=_(E,g++);l(m,y)?h(c(m,y),E):d(m,y,[E])}),m}}),$C}var Np,xC;function y7(){if(xC)return Np;xC=1,Qi(),v7(),m7(),dl();var r=_t();return Np=r.Map,Np}var Fp,qC;function b7(){if(qC)return Fp;qC=1;var r=y7();return Zi(),Fp=r,Fp}var kp,AC;function _7(){return AC||(AC=1,kp=b7()),kp}var w7=_7(),r5=$e(w7),DC={},MC;function E7(){if(MC)return DC;MC=1;var r=be(),e=Us().some,t=hl(),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)}}),DC}var Bp,NC;function S7(){if(NC)return Bp;NC=1,E7();var r=Zt();return Bp=r("Array","some"),Bp}var Lp,FC;function O7(){if(FC)return Lp;FC=1;var r=Ot(),e=S7(),t=Array.prototype;return Lp=function(i){var n=i.some;return i===t||r(t,i)&&n===t.some?e:n},Lp}var jp,kC;function I7(){if(kC)return jp;kC=1;var r=O7();return jp=r,jp}var zp,BC;function T7(){return BC||(BC=1,zp=I7()),zp}var $7=T7(),P7=$e($7),Hp,LC;function R7(){if(LC)return Hp;LC=1,Qi();var r=Zt();return Hp=r("Array","keys"),Hp}var Wp,jC;function C7(){if(jC)return Wp;jC=1;var r=R7();return Wp=r,Wp}var Up,zC;function x7(){if(zC)return Up;zC=1,Zi();var r=Xi(),e=It(),t=Ot(),i=C7(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return Up=function(o){var a=o.keys;return o===n||t(n,o)&&a===n.keys||e(s,r(o))?i:a},Up}var Vp,HC;function q7(){return HC||(HC=1,Vp=x7()),Vp}var A7=q7(),ss=$e(A7),WC={},Kp,UC;function D7(){if(UC)return Kp;UC=1;var r=Ws(),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,p=0,v=0;p3)){if(d)return!0;if(f)return f<603;var T="",b,w,R,P;for(b=65;b<76;b++){switch(w=String.fromCharCode(b),b){case 66:case 69:case 70:case 72:R=3;break;case 68:case 71:R=4;break;default:R=2}for(P=0;P<47;P++)p.push({k:w+P,v:R})}for(p.sort(function(S,$){return $.v-S.v}),P=0;Po(w)?1:-1}};return r({target:"Array",proto:!0,forced:I},{sort:function(b){b!==void 0&&t(b);var w=i(this);if(y)return b===void 0?v(w):v(w,b);var R=[],P=n(w),S,$;for($=0;$"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");cv=crypto.getRandomValues.bind(crypto)}return cv(nY)}const oY=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var cx={randomUUID:oY};function aY(r,e,t){var n;r=r||{};const i=r.random??((n=r.rng)==null?void 0:n.call(r))??sY();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,iY(i)}function uY(r,e,t){return cx.randomUUID&&!r?cx.randomUUID():aY(r)}function dx(r){return typeof r=="string"||typeof r=="number"}class m0{constructor(e){Ni(this,"_queue",[]),Ni(this,"_timeout",null),Ni(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 m0(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=U8(()=>{this.flush()},this.delay))}flush(){var e,t;$n(e=b3(t=this._queue).call(t,0)).call(e,i=>{i.fn.apply(i.context||i.fn,i.args||[])})}}class Ru{constructor(){Ni(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),Ni(this,"subscribe",Ru.prototype.on),Ni(this,"unsubscribe",Ru.prototype.off)}_trigger(e,t,i){var n;if(e==="*")throw new Error("Cannot trigger event *");$n(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]=cs(i=this._subscribers[e]).call(i,n=>n!==t)}}var hx={},fx={},px;function lY(){if(px)return fx;px=1;var r=Z3(),e=e5();return r("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),fx}var vx;function cY(){return vx||(vx=1,lY()),hx}var gx={},dv,mx;function zn(){if(mx)return dv;mx=1;var r=Bs(),e=TypeError;return dv=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")},dv}var hv,yx;function Hn(){if(yx)return hv;yx=1;var r=ir(),e=t5(),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 fv,bx;function Wn(){if(bx)return fv;bx=1;var r=Qt();return fv=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},fv}var pv,_x;function Ta(){if(_x)return pv;_x=1;var r=Wn();return pv=function(e,t,i){return i?r(e.keys(),t,!0):e.forEach(t)},pv}var vv,wx;function y0(){if(wx)return vv;wx=1;var r=Hn(),e=Ta(),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 gv,Ex;function $a(){return Ex||(Ex=1,gv=function(r){return r.size}),gv}var mv,Sx;function dY(){return Sx||(Sx=1,mv=function(r){return{iterator:r,next:r.next,done:!1}}),mv}var yv,Ox;function Un(){if(Ox)return yv;Ox=1;var r=gi(),e=mi(),t=Qt(),i=Hs(),n=dY(),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 bv,Ix;function hY(){if(Ix)return bv;Ix=1;var r=zn(),e=Hn(),t=y0(),i=$a(),n=Un(),s=Ta(),o=Wn(),a=e.has,u=e.remove;return bv=function(c){var d=r(this),h=n(c),f=t(d);return i(d)<=h.size?s(d,function(p){h.includes(p)&&u(f,p)}):o(h.getIterator(),function(p){a(f,p)&&u(f,p)}),f},bv}var _v,Tx;function Vn(){return Tx||(Tx=1,_v=function(){return!1}),_v}var $x;function fY(){if($x)return gx;$x=1;var r=be(),e=hY(),t=Le(),i=Vn(),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}),gx}var Px={},wv,Rx;function pY(){if(Rx)return wv;Rx=1;var r=zn(),e=Hn(),t=$a(),i=Un(),n=Ta(),s=Wn(),o=e.Set,a=e.add,u=e.has;return wv=function(c){var d=r(this),h=i(c),f=new o;return t(d)>h.size?s(h.getIterator(),function(p){u(d,p)&&a(f,p)}):n(d,function(p){h.includes(p)&&a(f,p)}),f},wv}var Cx;function vY(){if(Cx)return Px;Cx=1;var r=be(),e=Le(),t=pY(),i=Vn(),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}),Px}var xx={},Ev,qx;function gY(){if(qx)return Ev;qx=1;var r=zn(),e=Hn().has,t=$a(),i=Un(),n=Ta(),s=Wn(),o=v0();return Ev=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},Ev}var Ax;function mY(){if(Ax)return xx;Ax=1;var r=be(),e=gY(),t=Vn(),i=!t("isDisjointFrom",function(n){return!n});return r({target:"Set",proto:!0,real:!0,forced:i},{isDisjointFrom:e}),xx}var Dx={},Sv,Mx;function yY(){if(Mx)return Sv;Mx=1;var r=zn(),e=$a(),t=Ta(),i=Un();return Sv=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},Sv}var Nx;function bY(){if(Nx)return Dx;Nx=1;var r=be(),e=yY(),t=Vn(),i=!t("isSubsetOf",function(n){return n});return r({target:"Set",proto:!0,real:!0,forced:i},{isSubsetOf:e}),Dx}var Fx={},Ov,kx;function _Y(){if(kx)return Ov;kx=1;var r=zn(),e=Hn().has,t=$a(),i=Un(),n=Wn(),s=v0();return Ov=function(a){var u=r(this),l=i(a);if(t(u)t[0])}toItemArray(){var e;return wr(e=[...this._pairs]).call(e,t=>t[1])}toEntryArray(){return[...this._pairs]}toObjectMap(){const e=P8(null);for(const[t,i]of this._pairs)e[t]=i;return e}toMap(){return new r5(this._pairs)}toIdSet(){return new xv(this.toIdArray())}toItemSet(){return new xv(this.toItemArray())}cache(){return new vn([...this._pairs])}distinct(e){const t=new xv;for(const[i,n]of this._pairs)t.add(e(n,i));return t}filter(e){const t=this._pairs;return new vn({*[fs](){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 vn({*[fs](){for(const[i,n]of t)yield[i,e(n,i)]}})}max(e){const t=kv(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=kv(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 kv(pw(t=[...this._pairs]).call(t,(i,n)=>{let[s,o]=i,[a,u]=n;return e(o,u,s,a)}))}})}}function rq(r,e){var t=a0(r);if(UR){var i=UR(r);e&&(i=cs(i).call(i,function(n){return G3(r,n).enumerable})),t.push.apply(t,i)}return t}function iq(r){for(var e=1;eo[this._idProp]);if(P7(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=g8({},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(Mr(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=M9(o,a);return this._data.set(u,l),{id:u,oldData:o,updatedData:l}});if(n.length){const s={items:wr(n).call(n,o=>o.id),oldData:wr(n).call(n,o=>o.oldData),data:wr(n).call(n,o=>o.updatedData)};return this._trigger("update",s,t),s.items}else return[]}get(e,t){let i,n,s;dx(e)?(i=e,s=t):Mr(e)?(n=e,s=t):s=e;const o=s&&s.returnType==="Object"?"Object":"Array",a=s&&cs(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,p=n.length;f(n[s]=e[s],n),{})}_sort(e,t){if(typeof t=="string"){const i=t;pw(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 nx(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"},Uv}var Vv={},Kv,pq;function lt(){if(pq)return Kv;pq=1;var r=Pe();return Kv=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Kv}var Gv,vq;function er(){if(vq)return Gv;vq=1;var r=Pa(),e=Function.prototype.call;return Gv=r?e.bind(e):function(){return e.apply(e,arguments)},Gv}var Yv={},gq;function gl(){if(gq)return Yv;gq=1;var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!r.call({1:2},1);return Yv.f=t?function(n){var s=e(this,n);return!!s&&s.enumerable}:r,Yv}var Xv,mq;function Ra(){return mq||(mq=1,Xv=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}),Xv}var Jv,yq;function ml(){if(yq)return Jv;yq=1;var r=xe(),e=Pe(),t=Ur(),i=Object,n=r("".split);return Jv=e(function(){return!i("z").propertyIsEnumerable(0)})?function(s){return t(s)==="String"?n(s,""):i(s)}:i,Jv}var Qv,bq;function Gs(){return bq||(bq=1,Qv=function(r){return r==null}),Qv}var Zv,_q;function yi(){if(_q)return Zv;_q=1;var r=Gs(),e=TypeError;return Zv=function(t){if(r(t))throw new e("Can't call method on "+t);return t},Zv}var eg,wq;function xr(){if(wq)return eg;wq=1;var r=ml(),e=yi();return eg=function(t){return r(e(t))},eg}var tg,Eq;function Pt(){if(Eq)return tg;Eq=1;var r=$t();return tg=function(e){return typeof e=="object"?e!==null:r(e)},tg}var rg,Sq;function je(){return Sq||(Sq=1,rg={}),rg}var ig,Oq;function nr(){if(Oq)return ig;Oq=1;var r=je(),e=Ze(),t=$t(),i=function(n){return t(n)?n:void 0};return ig=function(n,s){return arguments.length<2?i(r[n])||i(e[n]):r[n]&&r[n][s]||e[n]&&e[n][s]},ig}var ng,Iq;function mt(){if(Iq)return ng;Iq=1;var r=xe();return ng=r({}.isPrototypeOf),ng}var sg,Tq;function Ys(){if(Tq)return sg;Tq=1;var r=Ze(),e=r.navigator,t=e&&e.userAgent;return sg=t?String(t):"",sg}var og,$q;function Ca(){if($q)return og;$q=1;var r=Ze(),e=Ys(),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]))),og=a,og}var ag,Pq;function Xs(){if(Pq)return ag;Pq=1;var r=Ca(),e=Pe(),t=Ze(),i=t.String;return ag=!!Object.getOwnPropertySymbols&&!e(function(){var n=Symbol("symbol detection");return!i(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&r&&r<41}),ag}var ug,Rq;function s5(){if(Rq)return ug;Rq=1;var r=Xs();return ug=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ug}var lg,Cq;function xa(){if(Cq)return lg;Cq=1;var r=nr(),e=$t(),t=mt(),i=s5(),n=Object;return lg=i?function(s){return typeof s=="symbol"}:function(s){var o=r("Symbol");return e(o)&&t(o.prototype,n(s))},lg}var cg,xq;function Js(){if(xq)return cg;xq=1;var r=String;return cg=function(e){try{return r(e)}catch{return"Object"}},cg}var dg,qq;function bi(){if(qq)return dg;qq=1;var r=$t(),e=Js(),t=TypeError;return dg=function(i){if(r(i))return i;throw new t(e(i)+" is not a function")},dg}var hg,Aq;function _0(){if(Aq)return hg;Aq=1;var r=bi(),e=Gs();return hg=function(t,i){var n=t[i];return e(n)?void 0:r(n)},hg}var fg,Dq;function kY(){if(Dq)return fg;Dq=1;var r=er(),e=$t(),t=Pt(),i=TypeError;return fg=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")},fg}var pg={exports:{}},vg,Mq;function Qs(){return Mq||(Mq=1,vg=!0),vg}var gg,Nq;function BY(){if(Nq)return gg;Nq=1;var r=Ze(),e=Object.defineProperty;return gg=function(t,i){try{e(r,t,{value:i,configurable:!0,writable:!0})}catch{r[t]=i}return i},gg}var Fq;function w0(){if(Fq)return pg.exports;Fq=1;var r=Qs(),e=Ze(),t=BY(),i="__core-js_shared__",n=pg.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"}),pg.exports}var mg,kq;function Zs(){if(kq)return mg;kq=1;var r=w0();return mg=function(e,t){return r[e]||(r[e]=t||{})},mg}var yg,Bq;function sr(){if(Bq)return yg;Bq=1;var r=yi(),e=Object;return yg=function(t){return e(r(t))},yg}var bg,Lq;function qt(){if(Lq)return bg;Lq=1;var r=xe(),e=sr(),t=r({}.hasOwnProperty);return bg=Object.hasOwn||function(n,s){return t(e(n),s)},bg}var _g,jq;function yl(){if(jq)return _g;jq=1;var r=xe(),e=0,t=Math.random(),i=r(1.1.toString);return _g=function(n){return"Symbol("+(n===void 0?"":n)+")_"+i(++e+t,36)},_g}var wg,zq;function yt(){if(zq)return wg;zq=1;var r=Ze(),e=Zs(),t=qt(),i=yl(),n=Xs(),s=s5(),o=r.Symbol,a=e("wks"),u=s?o.for||o:o&&o.withoutSetter||i;return wg=function(l){return t(a,l)||(a[l]=n&&t(o,l)?o[l]:u("Symbol."+l)),a[l]},wg}var Eg,Hq;function o5(){if(Hq)return Eg;Hq=1;var r=er(),e=Pt(),t=xa(),i=_0(),n=kY(),s=yt(),o=TypeError,a=s("toPrimitive");return Eg=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)},Eg}var Sg,Wq;function E0(){if(Wq)return Sg;Wq=1;var r=o5(),e=xa();return Sg=function(t){var i=r(t,"string");return e(i)?i:i+""},Sg}var Og,Uq;function a5(){if(Uq)return Og;Uq=1;var r=Ze(),e=Pt(),t=r.document,i=e(t)&&e(t.createElement);return Og=function(n){return i?t.createElement(n):{}},Og}var Ig,Vq;function u5(){if(Vq)return Ig;Vq=1;var r=lt(),e=Pe(),t=a5();return Ig=!r&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),Ig}var Kq;function bl(){if(Kq)return Vv;Kq=1;var r=lt(),e=er(),t=gl(),i=Ra(),n=xr(),s=E0(),o=qt(),a=u5(),u=Object.getOwnPropertyDescriptor;return Vv.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])},Vv}var Tg,Gq;function LY(){if(Gq)return Tg;Gq=1;var r=Pe(),e=$t(),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 Tg=i,Tg}var $g,Yq;function _l(){if(Yq)return $g;Yq=1;var r=b0(),e=bi(),t=Pa(),i=r(r.bind);return $g=function(n,s){return e(n),s===void 0?n:t?i(n,s):function(){return n.apply(s,arguments)}},$g}var Pg={},Rg,Xq;function l5(){if(Xq)return Rg;Xq=1;var r=lt(),e=Pe();return Rg=r&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Rg}var Cg,Jq;function Vr(){if(Jq)return Cg;Jq=1;var r=Pt(),e=String,t=TypeError;return Cg=function(i){if(r(i))return i;throw new t(e(i)+" is not an object")},Cg}var Qq;function mr(){if(Qq)return Pg;Qq=1;var r=lt(),e=u5(),t=l5(),i=Vr(),n=E0(),s=TypeError,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Pg.f=r?t?function(h,f,p){if(i(h),f=n(f),i(p),typeof h=="function"&&f==="prototype"&&"value"in p&&c in p&&!p[c]){var v=a(h,f);v&&v[c]&&(h[f]=p.value,p={configurable:l in p?p[l]:v[l],enumerable:u in p?p[u]:v[u],writable:!1})}return o(h,f,p)}:o:function(h,f,p){if(i(h),f=n(f),i(p),e)try{return o(h,f,p)}catch{}if("get"in p||"set"in p)throw new s("Accessors not supported");return"value"in p&&(h[f]=p.value),h},Pg}var xg,Zq;function eo(){if(Zq)return xg;Zq=1;var r=lt(),e=mr(),t=Ra();return xg=r?function(i,n,s){return e.f(i,n,t(1,s))}:function(i,n,s){return i[n]=s,i},xg}var qg,eA;function de(){if(eA)return qg;eA=1;var r=Ze(),e=vl(),t=b0(),i=$t(),n=bl().f,s=LY(),o=je(),a=_l(),u=eo(),l=qt(),c=function(d){var h=function(f,p,v){if(this instanceof h){switch(arguments.length){case 0:return new d;case 1:return new d(f);case 2:return new d(f,p)}return new d(f,p,v)}return e(d,this,arguments)};return h.prototype=d.prototype,h};return qg=function(d,h){var f=d.target,p=d.global,v=d.stat,_=d.proto,m=p?r:v?r[f]:r[f]&&r[f].prototype,g=p?o:o[f]||u(o,f,{})[f],E=g.prototype,y,I,O,T,b,w,R,P,S;for(T in h)y=s(p?T:f+(v?".":"#")+T,d.forced),I=!y&&m&&l(m,T),w=g[T],I&&(d.dontCallGetSet?(S=n(m,T),R=S&&S.value):R=m[T]),b=I&&R?R:h[T],!(!y&&!_&&typeof w==typeof b)&&(d.bind&&I?P=a(b,r):d.wrap&&I?P=c(b):_&&i(b)?P=t(b):P=b,(d.sham||b&&b.sham||w&&w.sham)&&u(P,"sham",!0),u(g,T,P),_&&(O=f+"Prototype",l(o,O)||u(o,O,{}),u(o[O],T,b),d.real&&E&&(y||!E[T])&&u(E,T,b)))},qg}var Ag,tA;function jY(){if(tA)return Ag;tA=1;var r=Math.ceil,e=Math.floor;return Ag=Math.trunc||function(i){var n=+i;return(n>0?e:r)(n)},Ag}var Dg,rA;function to(){if(rA)return Dg;rA=1;var r=jY();return Dg=function(e){var t=+e;return t!==t||t===0?0:r(t)},Dg}var Mg,iA;function wl(){if(iA)return Mg;iA=1;var r=to(),e=Math.max,t=Math.min;return Mg=function(i,n){var s=r(i);return s<0?e(s+n,0):t(s,n)},Mg}var Ng,nA;function c5(){if(nA)return Ng;nA=1;var r=to(),e=Math.min;return Ng=function(t){var i=r(t);return i>0?e(i,9007199254740991):0},Ng}var Fg,sA;function _i(){if(sA)return Fg;sA=1;var r=c5();return Fg=function(e){return r(e.length)},Fg}var kg,oA;function S0(){if(oA)return kg;oA=1;var r=xr(),e=wl(),t=_i(),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 kg={includes:i(!0),indexOf:i(!1)},kg}var Bg,aA;function qa(){return aA||(aA=1,Bg={}),Bg}var Lg,uA;function d5(){if(uA)return Lg;uA=1;var r=xe(),e=qt(),t=xr(),i=S0().indexOf,n=qa(),s=r([].push);return Lg=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},Lg}var jg,lA;function O0(){return lA||(lA=1,jg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),jg}var zg,cA;function Aa(){if(cA)return zg;cA=1;var r=d5(),e=O0();return zg=Object.keys||function(i){return r(i,e)},zg}var Hg={},dA;function El(){return dA||(dA=1,Hg.f=Object.getOwnPropertySymbols),Hg}var Wg,hA;function zY(){if(hA)return Wg;hA=1;var r=lt(),e=xe(),t=er(),i=Pe(),n=Aa(),s=El(),o=gl(),a=sr(),u=ml(),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={},p=Symbol("assign detection"),v="abcdefghijklmnopqrst";return h[p]=7,v.split("").forEach(function(_){f[_]=_}),l({},h)[p]!==7||n(l({},f)).join("")!==v})?function(f,p){for(var v=a(f),_=arguments.length,m=1,g=s.f,E=o.f;_>m;)for(var y=u(arguments[m++]),I=g?d(n(y),g(y)):n(y),O=I.length,T=0,b;O>T;)b=I[T++],(!r||t(E,y,b))&&(v[b]=y[b]);return v}:l,Wg}var fA;function HY(){if(fA)return sq;fA=1;var r=de(),e=zY();return r({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e}),sq}var Ug,pA;function WY(){if(pA)return Ug;pA=1,HY();var r=je();return Ug=r.Object.assign,Ug}var Vg,vA;function UY(){if(vA)return Vg;vA=1;var r=WY();return Vg=r,Vg}var Kg,gA;function VY(){return gA||(gA=1,Kg=UY()),Kg}var KY=VY(),ft=ge(KY),mA={},Gg,yA;function ro(){if(yA)return Gg;yA=1;var r=xe();return Gg=r([].slice),Gg}var Yg,bA;function GY(){if(bA)return Yg;bA=1;var r=xe(),e=bi(),t=Pt(),i=qt(),n=ro(),s=Pa(),o=Function,a=r([].concat),u=r([].join),l={},c=function(d,h,f){if(!i(l,h)){for(var p=[],v=0;v=.1;)p=+s[d++%o],p>c&&(p=c),f=Math.sqrt(p*p/(1+l*l)),f=a<0?-f:f,e+=f,t+=l*f,h===!0?r.lineTo(e,t):r.moveTo(e,t),c-=p,h=!h}function oX(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},im}var nm,xA;function Sl(){if(xA)return nm;xA=1;var r=lt(),e=mr(),t=Ra();return nm=function(i,n,s){r?e.f(i,n,t(0,s)):i[n]=s},nm}var sm,qA;function T0(){if(qA)return sm;qA=1;var r=yt(),e=r("toStringTag"),t={};return t[e]="z",sm=String(t)==="[object z]",sm}var om,AA;function io(){if(AA)return om;AA=1;var r=T0(),e=$t(),t=Ur(),i=yt(),n=i("toStringTag"),s=Object,o=t(function(){return arguments}())==="Arguments",a=function(u,l){try{return u[l]}catch{}};return om=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},om}var am,DA;function cX(){if(DA)return am;DA=1;var r=xe(),e=$t(),t=w0(),i=r(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(n){return i(n)}),am=t.inspectSource,am}var um,MA;function m5(){if(MA)return um;MA=1;var r=xe(),e=Pe(),t=$t(),i=io(),n=nr(),s=cX(),o=function(){},a=n("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=r(u.exec),c=!u.test(o),d=function(p){if(!t(p))return!1;try{return a(o,[],p),!0}catch{return!1}},h=function(p){if(!t(p))return!1;switch(i(p)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,s(p))}catch{return!0}};return h.sham=!0,um=!a||e(function(){var f;return d(d.call)||!d(Object)||!d(function(){f=!0})||f})?h:d,um}var lm,NA;function dX(){if(NA)return lm;NA=1;var r=Kn(),e=m5(),t=Pt(),i=yt(),n=i("species"),s=Array;return lm=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},lm}var cm,FA;function $0(){if(FA)return cm;FA=1;var r=dX();return cm=function(e,t){return new(r(e))(t===0?0:t)},cm}var dm,kA;function Da(){if(kA)return dm;kA=1;var r=Pe(),e=yt(),t=Ca(),i=e("species");return dm=function(n){return t>=51||!r(function(){var s=[],o=s.constructor={};return o[i]=function(){return{foo:1}},s[n](Boolean).foo!==1})},dm}var BA;function y5(){if(BA)return PA;BA=1;var r=de(),e=Pe(),t=Kn(),i=Pt(),n=sr(),s=_i(),o=g5(),a=Sl(),u=$0(),l=Da(),c=yt(),d=Ca(),h=c("isConcatSpreadable"),f=d>=51||!e(function(){var _=[];return _[h]=!1,_.concat()[0]!==_}),p=function(_){if(!i(_))return!1;var m=_[h];return m!==void 0?!!m:t(_)},v=!f||!l("concat");return r({target:"Array",proto:!0,arity:1,forced:v},{concat:function(m){var g=n(this),E=u(g,0),y=0,I,O,T,b,w;for(I=-1,T=arguments.length;Ih;)t.f(a,f=c[h++],l[f]);return a},fm}var pm,WA;function hX(){if(WA)return pm;WA=1;var r=nr();return pm=r("document","documentElement"),pm}var vm,UA;function Ol(){if(UA)return vm;UA=1;var r=Zs(),e=yl(),t=r("keys");return vm=function(i){return t[i]||(t[i]=e(i))},vm}var gm,VA;function Ma(){if(VA)return gm;VA=1;var r=Vr(),e=P0(),t=O0(),i=qa(),n=hX(),s=a5(),o=Ol(),a=">",u="<",l="prototype",c="script",d=o("IE_PROTO"),h=function(){},f=function(g){return u+c+a+g+u+"/"+c+a},p=function(g){g.write(f("")),g.close();var E=g.parentWindow.Object;return g=null,E},v=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&&_?p(_):v():p(_);for(var g=t.length;g--;)delete m[l][t[g]];return m()};return i[d]=!0,gm=Object.create||function(E,y){var I;return E!==null?(h[l]=r(E),I=new h,h[l]=null,I[d]=E):I=m(),y===void 0?I:e.f(I,y)},gm}var mm={},KA;function Il(){if(KA)return mm;KA=1;var r=d5(),e=O0(),t=e.concat("length","prototype");return mm.f=Object.getOwnPropertyNames||function(n){return r(n,t)},mm}var ym={},GA;function R0(){if(GA)return ym;GA=1;var r=Ur(),e=xr(),t=Il().f,i=ro(),n=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(o){try{return t(o)}catch{return i(n)}};return ym.f=function(a){return n&&r(a)==="Window"?s(a):t(e(a))},ym}var bm,YA;function Na(){if(YA)return bm;YA=1;var r=eo();return bm=function(e,t,i,n){return n&&n.enumerable?e[t]=i:r(e,t,i),e},bm}var _m,XA;function C0(){if(XA)return _m;XA=1;var r=mr();return _m=function(e,t,i){return r.f(e,t,i)},_m}var wm={},JA;function Tl(){if(JA)return wm;JA=1;var r=yt();return wm.f=r,wm}var Em,QA;function tt(){if(QA)return Em;QA=1;var r=je(),e=qt(),t=Tl(),i=mr().f;return Em=function(n){var s=r.Symbol||(r.Symbol={});e(s,n)||i(s,n,{value:t.f(n)})},Em}var Sm,ZA;function b5(){if(ZA)return Sm;ZA=1;var r=er(),e=nr(),t=yt(),i=Na();return Sm=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})},Sm}var Om,eD;function fX(){if(eD)return Om;eD=1;var r=T0(),e=io();return Om=r?{}.toString:function(){return"[object "+e(this)+"]"},Om}var Im,tD;function Gn(){if(tD)return Im;tD=1;var r=T0(),e=mr().f,t=eo(),i=qt(),n=fX(),s=yt(),o=s("toStringTag");return Im=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))},Im}var Tm,rD;function _5(){if(rD)return Tm;rD=1;var r=Ze(),e=$t(),t=r.WeakMap;return Tm=e(t)&&/native code/.test(String(t)),Tm}var $m,iD;function Yn(){if(iD)return $m;iD=1;var r=_5(),e=Ze(),t=Pt(),i=eo(),n=qt(),s=w0(),o=Ol(),a=qa(),u="Object already initialized",l=e.TypeError,c=e.WeakMap,d,h,f,p=function(g){return f(g)?h(g):d(g,{})},v=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 $m={set:d,get:h,has:f,enforce:p,getterFor:v},$m}var Pm,nD;function en(){if(nD)return Pm;nD=1;var r=_l(),e=xe(),t=ml(),i=sr(),n=_i(),s=$0(),o=e([].push),a=function(u){var l=u===1,c=u===2,d=u===3,h=u===4,f=u===6,p=u===7,v=u===5||f;return function(_,m,g,E){for(var y=i(_),I=t(y),O=n(I),T=r(m,g),b=0,w=E||s,R=l?w(_,O):c||p?w(_,0):void 0,P,S;O>b;b++)if((v||b in I)&&(P=I[b],S=T(P,b,y),u))if(l)R[b]=S;else if(S)switch(u){case 3:return!0;case 5:return P;case 6:return b;case 2:o(R,P)}else switch(u){case 4:return!1;case 7:o(R,P)}return f?-1:d||h?h:R}};return Pm={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},Pm}var sD;function pX(){if(sD)return jA;sD=1;var r=de(),e=Ze(),t=er(),i=xe(),n=Qs(),s=lt(),o=Xs(),a=Pe(),u=qt(),l=mt(),c=Vr(),d=xr(),h=E0(),f=yr(),p=Ra(),v=Ma(),_=Aa(),m=Il(),g=R0(),E=El(),y=bl(),I=mr(),O=P0(),T=gl(),b=Na(),w=C0(),R=Zs(),P=Ol(),S=qa(),$=yl(),q=yt(),F=Tl(),Z=tt(),z=b5(),te=Gn(),ve=Yn(),we=en().forEach,re=P("hidden"),me="Symbol",qe="prototype",De=ve.set,ct=ve.getterFor(me),_e=Object[qe],D=e.Symbol,U=D&&D[qe],X=e.RangeError,ne=e.TypeError,Re=e.QObject,C=y.f,x=I.f,A=g.f,k=T.f,B=i([].push),N=R("symbols"),G=R("op-symbols"),J=R("wks"),V=!Re||!Re[qe]||!Re[qe].findChild,L=function(ae,K,ee){var ie=C(_e,K);ie&&delete _e[K],x(ae,K,ee),ie&&ae!==_e&&x(_e,K,ie)},ce=s&&a(function(){return v(x({},"a",{get:function(){return x(this,"a",{value:7}).a}})).a!==7})?L:x,Q=function(ae,K){var ee=N[ae]=v(U);return De(ee,{type:me,tag:ae,description:K}),s||(ee.description=K),ee},oe=function(K,ee,ie){K===_e&&oe(G,ee,ie),c(K);var se=h(ee);return c(ie),u(N,se)?(ie.enumerable?(u(K,re)&&K[re][se]&&(K[re][se]=!1),ie=v(ie,{enumerable:p(0,!1)})):(u(K,re)||x(K,re,p(1,v(null))),K[re][se]=!0),ce(K,se,ie)):x(K,se,ie)},he=function(K,ee){c(K);var ie=d(ee),se=_(ie).concat(dt(ie));return we(se,function(Ee){(!s||t(Ae,ie,Ee))&&oe(K,Ee,ie[Ee])}),K},Ie=function(K,ee){return ee===void 0?v(K):he(v(K),ee)},Ae=function(K){var ee=h(K),ie=t(k,this,ee);return this===_e&&u(N,ee)&&!u(G,ee)?!1:ie||!u(this,ee)||!u(N,ee)||u(this,re)&&this[re][ee]?ie:!0},Ce=function(K,ee){var ie=d(K),se=h(ee);if(!(ie===_e&&u(N,se)&&!u(G,se))){var Ee=C(ie,se);return Ee&&u(N,se)&&!(u(ie,re)&&ie[re][se])&&(Ee.enumerable=!0),Ee}},bt=function(K){var ee=A(d(K)),ie=[];return we(ee,function(se){!u(N,se)&&!u(S,se)&&B(ie,se)}),ie},dt=function(ae){var K=ae===_e,ee=A(K?G:d(ae)),ie=[];return we(ee,function(se){u(N,se)&&(!K||u(_e,se))&&B(ie,N[se])}),ie};return o||(D=function(){if(l(U,this))throw new ne("Symbol is not a constructor");var K=!arguments.length||arguments[0]===void 0?void 0:f(arguments[0]),ee=$(K),ie=function(se){var Ee=this===void 0?e:this;Ee===_e&&t(ie,G,se),u(Ee,re)&&u(Ee[re],ee)&&(Ee[re][ee]=!1);var wi=p(1,se);try{ce(Ee,ee,wi)}catch(co){if(!(co instanceof X))throw co;L(Ee,ee,wi)}};return s&&V&&ce(_e,ee,{configurable:!0,set:ie}),Q(ee,K)},U=D[qe],b(U,"toString",function(){return ct(this).tag}),b(D,"withoutSetter",function(ae){return Q($(ae),ae)}),T.f=Ae,I.f=oe,O.f=he,y.f=Ce,m.f=g.f=bt,E.f=dt,F.f=function(ae){return Q(q(ae),ae)},s&&(w(U,"description",{configurable:!0,get:function(){return ct(this).description}}),n||b(_e,"propertyIsEnumerable",Ae,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:D}),we(_(J),function(ae){Z(ae)}),r({target:me,stat:!0,forced:!o},{useSetter:function(){V=!0},useSimple:function(){V=!1}}),r({target:"Object",stat:!0,forced:!o,sham:!s},{create:Ie,defineProperty:oe,defineProperties:he,getOwnPropertyDescriptor:Ce}),r({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:bt}),z(),te(D,me),S[re]=!0,jA}var oD={},Rm,aD;function w5(){if(aD)return Rm;aD=1;var r=Xs();return Rm=r&&!!Symbol.for&&!!Symbol.keyFor,Rm}var uD;function vX(){if(uD)return oD;uD=1;var r=de(),e=nr(),t=qt(),i=yr(),n=Zs(),s=w5(),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 lD={},cD;function gX(){if(cD)return lD;cD=1;var r=de(),e=qt(),t=xa(),i=Js(),n=Zs(),s=w5(),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]}}),lD}var dD={},Cm,hD;function mX(){if(hD)return Cm;hD=1;var r=xe(),e=Kn(),t=$t(),i=Ur(),n=yr(),s=r([].push);return Cm=function(o){if(t(o))return o;if(e(o)){for(var a=o.length,u=[],l=0;l=p.length)return f.target=null,o(void 0,!0);switch(f.kind){case"keys":return o(v,!1);case"values":return o(p[v],!1)}return o([v,p[v]],!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 Um}var Vm,dM;function kX(){return dM||(dM=1,Vm={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}),Vm}var hM;function oo(){if(hM)return XD;hM=1,so();var r=kX(),e=Ze(),t=Gn(),i=no();for(var n in r)t(e[n],n),i[n]=i.Array;return XD}var Km,fM;function C5(){if(fM)return Km;fM=1;var r=xX();return oo(),Km=r,Km}var Gm,pM;function BX(){return pM||(pM=1,Gm=C5()),Gm}var LX=BX(),jX=ge(LX),vM={},gM;function zX(){if(gM)return vM;gM=1;var r=de(),e=Kn(),t=m5(),i=Pt(),n=wl(),s=_i(),o=xr(),a=Sl(),u=yt(),l=Da(),c=ro(),d=l("slice"),h=u("species"),f=Array,p=Math.max;return r({target:"Array",proto:!0,forced:!d},{slice:function(_,m){var g=o(this),E=s(g),y=n(_,E),I=n(m===void 0?E:m,E),O,T,b;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,y,I);for(T=new(O===void 0?f:O)(p(I-y,0)),b=0;y1?arguments[1]:void 0)}}),$M}var iy,RM;function tJ(){if(RM)return iy;RM=1,eJ();var r=At();return iy=r("Array","map"),iy}var ny,CM;function rJ(){if(CM)return ny;CM=1;var r=mt(),e=tJ(),t=Array.prototype;return ny=function(i){var n=i.map;return i===t||r(t,i)&&n===t.map?e:n},ny}var sy,xM;function iJ(){if(xM)return sy;xM=1;var r=rJ();return sy=r,sy}var oy,qM;function nJ(){return qM||(qM=1,oy=iJ()),oy}var sJ=nJ(),qs=ge(sJ),AM={},DM;function oJ(){if(DM)return AM;DM=1;var r=de(),e=sr(),t=Aa(),i=Pe(),n=i(function(){t(1)});return r({target:"Object",stat:!0,forced:n},{keys:function(o){return t(e(o))}}),AM}var ay,MM;function aJ(){if(MM)return ay;MM=1,oJ();var r=je();return ay=r.Object.keys,ay}var uy,NM;function uJ(){if(NM)return uy;NM=1;var r=aJ();return uy=r,uy}var ly,FM;function lJ(){return FM||(FM=1,ly=uJ()),ly}var cJ=lJ(),nt=ge(cJ),kM={},BM;function dJ(){if(BM)return kM;BM=1;var r=de(),e=xe(),t=Date,i=e(t.prototype.getTime);return r({target:"Date",stat:!0},{now:function(){return i(new t)}}),kM}var cy,LM;function hJ(){if(LM)return cy;LM=1,dJ();var r=je();return cy=r.Date.now,cy}var dy,jM;function fJ(){if(jM)return dy;jM=1;var r=hJ();return dy=r,dy}var hy,zM;function pJ(){return zM||(zM=1,hy=fJ()),hy}var vJ=pJ(),xu=ge(vJ),HM={},fy,WM;function ao(){if(WM)return fy;WM=1;var r=Pe();return fy=function(e,t){var i=[][e];return!!i&&r(function(){i.call(null,t||function(){return 1},1)})},fy}var py,UM;function gJ(){if(UM)return py;UM=1;var r=en().forEach,e=ao(),t=e("forEach");return py=t?[].forEach:function(n){return r(this,n,arguments.length>1?arguments[1]:void 0)},py}var VM;function mJ(){if(VM)return HM;VM=1;var r=de(),e=gJ();return r({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),HM}var vy,KM;function yJ(){if(KM)return vy;KM=1,mJ();var r=At();return vy=r("Array","forEach"),vy}var gy,GM;function bJ(){if(GM)return gy;GM=1;var r=yJ();return gy=r,gy}var my,YM;function _J(){if(YM)return my;YM=1;var r=io(),e=qt(),t=mt(),i=bJ(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return my=function(o){var a=o.forEach;return o===n||t(n,o)&&a===n.forEach||e(s,r(o))?i:a},my}var yy,XM;function wJ(){return XM||(XM=1,yy=_J()),yy}var EJ=wJ(),He=ge(EJ),JM={},QM;function SJ(){if(QM)return JM;QM=1;var r=de(),e=xe(),t=Kn(),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)}}),JM}var by,ZM;function OJ(){if(ZM)return by;ZM=1,SJ();var r=At();return by=r("Array","reverse"),by}var _y,eN;function IJ(){if(eN)return _y;eN=1;var r=mt(),e=OJ(),t=Array.prototype;return _y=function(i){var n=i.reverse;return i===t||r(t,i)&&n===t.reverse?e:n},_y}var wy,tN;function TJ(){if(tN)return wy;tN=1;var r=IJ();return wy=r,wy}var Ey,rN;function $J(){return rN||(rN=1,Ey=TJ()),Ey}var PJ=$J(),En=ge(PJ),iN={},Sy,nN;function RJ(){if(nN)return Sy;nN=1;var r=lt(),e=Kn(),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 Sy=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},Sy}var Oy,sN;function x5(){if(sN)return Oy;sN=1;var r=Js(),e=TypeError;return Oy=function(t,i){if(!delete t[i])throw new e("Cannot delete property "+r(i)+" of "+r(t))},Oy}var oN;function CJ(){if(oN)return iN;oN=1;var r=de(),e=sr(),t=wl(),i=to(),n=_i(),s=RJ(),o=g5(),a=$0(),u=Sl(),l=x5(),c=Da(),d=c("splice"),h=Math.max,f=Math.min;return r({target:"Array",proto:!0,forced:!d},{splice:function(v,_){var m=e(this),g=n(m),E=t(v,g),y=arguments.length,I,O,T,b,w,R;for(y===0?I=O=0:y===1?(I=0,O=g-E):(I=y-2,O=f(h(i(_),0),g-E)),o(g+I-O),T=a(m,O),b=0;bg-O+I;b--)l(m,b-1)}else if(I>O)for(b=g-O;b>E;b--)w=b+O-1,R=b+I-1,w in m?m[R]=m[w]:l(m,R);for(b=0;b1?arguments[1]:void 0)}}),i("includes"),dN}var Ry,fN;function FJ(){if(fN)return Ry;fN=1,NJ();var r=At();return Ry=r("Array","includes"),Ry}var pN={},Cy,vN;function kJ(){if(vN)return Cy;vN=1;var r=Pt(),e=Ur(),t=yt(),i=t("match");return Cy=function(n){var s;return r(n)&&((s=n[i])!==void 0?!!s:e(n)==="RegExp")},Cy}var xy,gN;function BJ(){if(gN)return xy;gN=1;var r=kJ(),e=TypeError;return xy=function(t){if(r(t))throw new e("The method doesn't accept regular expressions");return t},xy}var qy,mN;function LJ(){if(mN)return qy;mN=1;var r=yt(),e=r("match");return qy=function(t){var i=/./;try{"/./"[t](i)}catch{try{return i[e]=!1,"/./"[t](i)}catch{}}return!1},qy}var yN;function jJ(){if(yN)return pN;yN=1;var r=de(),e=xe(),t=BJ(),i=yi(),n=yr(),s=LJ(),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)}}),pN}var Ay,bN;function zJ(){if(bN)return Ay;bN=1,jJ();var r=At();return Ay=r("String","includes"),Ay}var Dy,_N;function HJ(){if(_N)return Dy;_N=1;var r=mt(),e=FJ(),t=zJ(),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 My,wN;function WJ(){if(wN)return My;wN=1;var r=HJ();return My=r,My}var Ny,EN;function UJ(){return EN||(EN=1,Ny=WJ()),Ny}var VJ=UJ(),ki=ge(VJ),SN={},ON;function KJ(){if(ON)return SN;ON=1;var r=de(),e=Pe(),t=sr(),i=$l(),n=P5(),s=e(function(){i(1)});return r({target:"Object",stat:!0,forced:s,sham:!n},{getPrototypeOf:function(a){return i(t(a))}}),SN}var Fy,IN;function GJ(){if(IN)return Fy;IN=1,KJ();var r=je();return Fy=r.Object.getPrototypeOf,Fy}var ky,TN;function YJ(){if(TN)return ky;TN=1;var r=GJ();return ky=r,ky}var By,$N;function XJ(){return $N||($N=1,By=YJ()),By}var JJ=XJ(),PN=ge(JJ),Ly,RN;function QJ(){if(RN)return Ly;RN=1,y5();var r=At();return Ly=r("Array","concat"),Ly}var jy,CN;function ZJ(){if(CN)return jy;CN=1;var r=mt(),e=QJ(),t=Array.prototype;return jy=function(i){var n=i.concat;return i===t||r(t,i)&&n===t.concat?e:n},jy}var zy,xN;function eQ(){if(xN)return zy;xN=1;var r=ZJ();return zy=r,zy}var Hy,qN;function tQ(){return qN||(qN=1,Hy=eQ()),Hy}var rQ=tQ(),iQ=ge(rQ),AN={},DN;function nQ(){if(DN)return AN;DN=1;var r=de(),e=en().filter,t=Da(),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)}}),AN}var Wy,MN;function sQ(){if(MN)return Wy;MN=1,nQ();var r=At();return Wy=r("Array","filter"),Wy}var Uy,NN;function oQ(){if(NN)return Uy;NN=1;var r=mt(),e=sQ(),t=Array.prototype;return Uy=function(i){var n=i.filter;return i===t||r(t,i)&&n===t.filter?e:n},Uy}var Vy,FN;function aQ(){if(FN)return Vy;FN=1;var r=oQ();return Vy=r,Vy}var Ky,kN;function uQ(){return kN||(kN=1,Ky=aQ()),Ky}var lQ=uQ(),Yt=ge(lQ),BN={},Gy,LN;function cQ(){if(LN)return Gy;LN=1;var r=lt(),e=Pe(),t=xe(),i=$l(),n=Aa(),s=xr(),o=gl().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),p=n(f),v=l&&i(f)===null,_=p.length,m=0,g=[],E;_>m;)E=p[m++],(!r||(v?E in f:a(f,E)))&&u(g,d?[E,f[E]]:f[E]);return g}};return Gy={entries:c(!0),values:c(!1)},Gy}var jN;function dQ(){if(jN)return BN;jN=1;var r=de(),e=cQ().values;return r({target:"Object",stat:!0},{values:function(i){return e(i)}}),BN}var Yy,zN;function hQ(){if(zN)return Yy;zN=1,dQ();var r=je();return Yy=r.Object.values,Yy}var Xy,HN;function fQ(){if(HN)return Xy;HN=1;var r=hQ();return Xy=r,Xy}var Jy,WN;function pQ(){return WN||(WN=1,Jy=fQ()),Jy}var vQ=pQ(),gQ=ge(vQ),UN={},Qy,VN;function D0(){return VN||(VN=1,Qy=` -\v\f\r                 \u2028\u2029\uFEFF`),Qy}var Zy,KN;function q5(){if(KN)return Zy;KN=1;var r=xe(),e=yi(),t=yr(),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 Zy={start:a(1),end:a(2),trim:a(3)},Zy}var eb,GN;function mQ(){if(GN)return eb;GN=1;var r=Ze(),e=Pe(),t=xe(),i=yr(),n=q5().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 eb=d?function(f,p){var v=n(i(f));return o(v,p>>>0||(c(l,v)?16:10))}:o,eb}var YN;function yQ(){if(YN)return UN;YN=1;var r=de(),e=mQ();return r({global:!0,forced:parseInt!==e},{parseInt:e}),UN}var tb,XN;function bQ(){if(XN)return tb;XN=1,yQ();var r=je();return tb=r.parseInt,tb}var rb,JN;function _Q(){if(JN)return rb;JN=1;var r=bQ();return rb=r,rb}var ib,QN;function wQ(){return QN||(QN=1,ib=_Q()),ib}var EQ=wQ(),Er=ge(EQ),ZN={},eF;function SQ(){if(eF)return ZN;eF=1;var r=de(),e=b0(),t=S0().indexOf,i=ao(),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)}}),ZN}var nb,tF;function OQ(){if(tF)return nb;tF=1,SQ();var r=At();return nb=r("Array","indexOf"),nb}var sb,rF;function IQ(){if(rF)return sb;rF=1;var r=mt(),e=OQ(),t=Array.prototype;return sb=function(i){var n=i.indexOf;return i===t||r(t,i)&&n===t.indexOf?e:n},sb}var ob,iF;function TQ(){if(iF)return ob;iF=1;var r=IQ();return ob=r,ob}var ab,nF;function $Q(){return nF||(nF=1,ab=TQ()),ab}var PQ=$Q(),Be=ge(PQ),sF={},oF;function RQ(){if(oF)return sF;oF=1;var r=de(),e=lt(),t=Ma();return r({target:"Object",stat:!0,sham:!e},{create:t}),sF}var ub,aF;function CQ(){if(aF)return ub;aF=1,RQ();var r=je(),e=r.Object;return ub=function(i,n){return e.create(i,n)},ub}var lb,uF;function xQ(){if(uF)return lb;uF=1;var r=CQ();return lb=r,lb}var cb,lF;function qQ(){return lF||(lF=1,cb=xQ()),cb}var AQ=qQ(),Sn=ge(AQ),cF={},db,dF;function DQ(){if(dF)return db;dF=1;var r=to(),e=yr(),t=yi(),i=RangeError;return db=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},db}var hb,hF;function MQ(){if(hF)return hb;hF=1;var r=xe(),e=c5(),t=yr(),i=DQ(),n=yi(),s=r(i),o=r("".slice),a=Math.ceil,u=function(l){return function(c,d,h){var f=t(n(c)),p=e(d),v=f.length,_=h===void 0?" ":t(h),m,g;return p<=v||_===""?f:(m=p-v,g=s(_,a(m/_.length)),g.length>m&&(g=o(g,0,m)),l?f+g:g+f)}};return hb={start:u(!1),end:u(!0)},hb}var fb,fF;function NQ(){if(fF)return fb;fF=1;var r=xe(),e=Pe(),t=MQ().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),p=r(o.getUTCMonth),v=r(o.getUTCSeconds);return fb=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(p(m)+1,2,0)+"-"+t(l(m),2,0)+"T"+t(d(m),2,0)+":"+t(f(m),2,0)+":"+t(v(m),2,0)+"."+t(E,3,0)+"Z"}:a,fb}var pF;function FQ(){if(pF)return cF;pF=1;var r=de(),e=er(),t=sr(),i=o5(),n=NQ(),s=Ur(),o=Pe(),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()}}),cF}var pb,vF;function kQ(){if(vF)return pb;vF=1,FQ(),E5();var r=je(),e=vl();return r.JSON||(r.JSON={stringify:JSON.stringify}),pb=function(i,n,s){return e(r.JSON.stringify,null,arguments)},pb}var vb,gF;function BQ(){if(gF)return vb;gF=1;var r=kQ();return vb=r,vb}var gb,mF;function LQ(){return mF||(mF=1,gb=BQ()),gb}var jQ=LQ(),Fa=ge(jQ),yF={},bF={},mb,_F;function A5(){if(_F)return mb;_F=1;var r=Ze(),e=Ys(),t=Ur(),i=function(n){return e.slice(0,n.length)===n};return mb=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"}(),mb}var yb,wF;function zQ(){if(wF)return yb;wF=1;var r=TypeError;return yb=function(e,t){if(ed,v=t(h)?h:a(h),_=p?s(arguments,d):[],m=p?function(){e(v,this,_)}:v;return c?l(m,f):l(m)}:l},bb}var SF;function HQ(){if(SF)return bF;SF=1;var r=de(),e=Ze(),t=D5(),i=t(e.setInterval,!0);return r({global:!0,bind:!0,forced:e.setInterval!==i},{setInterval:i}),bF}var OF={},IF;function WQ(){if(IF)return OF;IF=1;var r=de(),e=Ze(),t=D5(),i=t(e.setTimeout,!0);return r({global:!0,bind:!0,forced:e.setTimeout!==i},{setTimeout:i}),OF}var TF;function M5(){return TF||(TF=1,HQ(),WQ()),yF}var _b,$F;function UQ(){if($F)return _b;$F=1,M5();var r=je();return _b=r.setTimeout,_b}var wb,PF;function VQ(){return PF||(PF=1,wb=UQ()),wb}var KQ=VQ(),ui=ge(KQ),RF={},Eb,CF;function GQ(){if(CF)return Eb;CF=1;var r=sr(),e=wl(),t=_i();return Eb=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},Eb}var xF;function YQ(){if(xF)return RF;xF=1;var r=de(),e=GQ(),t=x0();return r({target:"Array",proto:!0},{fill:e}),t("fill"),RF}var Sb,qF;function XQ(){if(qF)return Sb;qF=1,YQ();var r=At();return Sb=r("Array","fill"),Sb}var Ob,AF;function JQ(){if(AF)return Ob;AF=1;var r=mt(),e=XQ(),t=Array.prototype;return Ob=function(i){var n=i.fill;return i===t||r(t,i)&&n===t.fill?e:n},Ob}var Ib,DF;function QQ(){if(DF)return Ib;DF=1;var r=JQ();return Ib=r,Ib}var Tb,MF;function ZQ(){return MF||(MF=1,Tb=QQ()),Tb}var eZ=ZQ(),ka=ge(eZ);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 + */var nq=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ge(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var sq={},mo,oq;function Ze(){if(oq)return mo;oq=1;var r=function(e){return e&&e.Math===Math&&e};return mo=r(typeof globalThis=="object"&&globalThis)||r(typeof window=="object"&&window)||r(typeof self=="object"&&self)||r(typeof nq=="object"&&nq)||r(typeof mo=="object"&&mo)||function(){return this}()||Function("return this")(),mo}var Bv,aq;function Pe(){return aq||(aq=1,Bv=function(r){try{return!!r()}catch{return!0}}),Bv}var Lv,uq;function Pa(){if(uq)return Lv;uq=1;var r=Pe();return Lv=!r(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Lv}var jv,lq;function vl(){if(lq)return jv;lq=1;var r=Pa(),e=Function.prototype,t=e.apply,i=e.call;return jv=typeof Reflect=="object"&&Reflect.apply||(r?i.bind(t):function(){return i.apply(t,arguments)}),jv}var zv,cq;function xe(){if(cq)return zv;cq=1;var r=Pa(),e=Function.prototype,t=e.call,i=r&&e.bind.bind(t,t);return zv=r?i:function(n){return function(){return t.apply(n,arguments)}},zv}var Hv,dq;function Ur(){if(dq)return Hv;dq=1;var r=xe(),e=r({}.toString),t=r("".slice);return Hv=function(i){return t(e(i),8,-1)},Hv}var Wv,hq;function b0(){if(hq)return Wv;hq=1;var r=Ur(),e=xe();return Wv=function(t){if(r(t)==="Function")return e(t)},Wv}var Uv,fq;function $t(){if(fq)return Uv;fq=1;var r=typeof document=="object"&&document.all;return Uv=typeof r>"u"&&r!==void 0?function(e){return typeof e=="function"||e===r}:function(e){return typeof e=="function"},Uv}var Vv={},Kv,pq;function lt(){if(pq)return Kv;pq=1;var r=Pe();return Kv=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Kv}var Gv,vq;function er(){if(vq)return Gv;vq=1;var r=Pa(),e=Function.prototype.call;return Gv=r?e.bind(e):function(){return e.apply(e,arguments)},Gv}var Yv={},gq;function gl(){if(gq)return Yv;gq=1;var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!r.call({1:2},1);return Yv.f=t?function(n){var s=e(this,n);return!!s&&s.enumerable}:r,Yv}var Xv,mq;function Ra(){return mq||(mq=1,Xv=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}),Xv}var Jv,yq;function ml(){if(yq)return Jv;yq=1;var r=xe(),e=Pe(),t=Ur(),i=Object,n=r("".split);return Jv=e(function(){return!i("z").propertyIsEnumerable(0)})?function(s){return t(s)==="String"?n(s,""):i(s)}:i,Jv}var Qv,bq;function Gs(){return bq||(bq=1,Qv=function(r){return r==null}),Qv}var Zv,_q;function yi(){if(_q)return Zv;_q=1;var r=Gs(),e=TypeError;return Zv=function(t){if(r(t))throw new e("Can't call method on "+t);return t},Zv}var eg,wq;function xr(){if(wq)return eg;wq=1;var r=ml(),e=yi();return eg=function(t){return r(e(t))},eg}var tg,Eq;function Pt(){if(Eq)return tg;Eq=1;var r=$t();return tg=function(e){return typeof e=="object"?e!==null:r(e)},tg}var rg,Sq;function je(){return Sq||(Sq=1,rg={}),rg}var ig,Oq;function nr(){if(Oq)return ig;Oq=1;var r=je(),e=Ze(),t=$t(),i=function(n){return t(n)?n:void 0};return ig=function(n,s){return arguments.length<2?i(r[n])||i(e[n]):r[n]&&r[n][s]||e[n]&&e[n][s]},ig}var ng,Iq;function mt(){if(Iq)return ng;Iq=1;var r=xe();return ng=r({}.isPrototypeOf),ng}var sg,Tq;function Ys(){if(Tq)return sg;Tq=1;var r=Ze(),e=r.navigator,t=e&&e.userAgent;return sg=t?String(t):"",sg}var og,$q;function Ca(){if($q)return og;$q=1;var r=Ze(),e=Ys(),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]))),og=a,og}var ag,Pq;function Xs(){if(Pq)return ag;Pq=1;var r=Ca(),e=Pe(),t=Ze(),i=t.String;return ag=!!Object.getOwnPropertySymbols&&!e(function(){var n=Symbol("symbol detection");return!i(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&r&&r<41}),ag}var ug,Rq;function s5(){if(Rq)return ug;Rq=1;var r=Xs();return ug=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ug}var lg,Cq;function xa(){if(Cq)return lg;Cq=1;var r=nr(),e=$t(),t=mt(),i=s5(),n=Object;return lg=i?function(s){return typeof s=="symbol"}:function(s){var o=r("Symbol");return e(o)&&t(o.prototype,n(s))},lg}var cg,xq;function Js(){if(xq)return cg;xq=1;var r=String;return cg=function(e){try{return r(e)}catch{return"Object"}},cg}var dg,qq;function bi(){if(qq)return dg;qq=1;var r=$t(),e=Js(),t=TypeError;return dg=function(i){if(r(i))return i;throw new t(e(i)+" is not a function")},dg}var hg,Aq;function _0(){if(Aq)return hg;Aq=1;var r=bi(),e=Gs();return hg=function(t,i){var n=t[i];return e(n)?void 0:r(n)},hg}var fg,Dq;function BY(){if(Dq)return fg;Dq=1;var r=er(),e=$t(),t=Pt(),i=TypeError;return fg=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")},fg}var pg={exports:{}},vg,Mq;function Qs(){return Mq||(Mq=1,vg=!0),vg}var gg,Nq;function LY(){if(Nq)return gg;Nq=1;var r=Ze(),e=Object.defineProperty;return gg=function(t,i){try{e(r,t,{value:i,configurable:!0,writable:!0})}catch{r[t]=i}return i},gg}var Fq;function w0(){if(Fq)return pg.exports;Fq=1;var r=Qs(),e=Ze(),t=LY(),i="__core-js_shared__",n=pg.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"}),pg.exports}var mg,kq;function Zs(){if(kq)return mg;kq=1;var r=w0();return mg=function(e,t){return r[e]||(r[e]=t||{})},mg}var yg,Bq;function sr(){if(Bq)return yg;Bq=1;var r=yi(),e=Object;return yg=function(t){return e(r(t))},yg}var bg,Lq;function qt(){if(Lq)return bg;Lq=1;var r=xe(),e=sr(),t=r({}.hasOwnProperty);return bg=Object.hasOwn||function(n,s){return t(e(n),s)},bg}var _g,jq;function yl(){if(jq)return _g;jq=1;var r=xe(),e=0,t=Math.random(),i=r(1.1.toString);return _g=function(n){return"Symbol("+(n===void 0?"":n)+")_"+i(++e+t,36)},_g}var wg,zq;function yt(){if(zq)return wg;zq=1;var r=Ze(),e=Zs(),t=qt(),i=yl(),n=Xs(),s=s5(),o=r.Symbol,a=e("wks"),u=s?o.for||o:o&&o.withoutSetter||i;return wg=function(l){return t(a,l)||(a[l]=n&&t(o,l)?o[l]:u("Symbol."+l)),a[l]},wg}var Eg,Hq;function o5(){if(Hq)return Eg;Hq=1;var r=er(),e=Pt(),t=xa(),i=_0(),n=BY(),s=yt(),o=TypeError,a=s("toPrimitive");return Eg=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)},Eg}var Sg,Wq;function E0(){if(Wq)return Sg;Wq=1;var r=o5(),e=xa();return Sg=function(t){var i=r(t,"string");return e(i)?i:i+""},Sg}var Og,Uq;function a5(){if(Uq)return Og;Uq=1;var r=Ze(),e=Pt(),t=r.document,i=e(t)&&e(t.createElement);return Og=function(n){return i?t.createElement(n):{}},Og}var Ig,Vq;function u5(){if(Vq)return Ig;Vq=1;var r=lt(),e=Pe(),t=a5();return Ig=!r&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),Ig}var Kq;function bl(){if(Kq)return Vv;Kq=1;var r=lt(),e=er(),t=gl(),i=Ra(),n=xr(),s=E0(),o=qt(),a=u5(),u=Object.getOwnPropertyDescriptor;return Vv.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])},Vv}var Tg,Gq;function jY(){if(Gq)return Tg;Gq=1;var r=Pe(),e=$t(),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 Tg=i,Tg}var $g,Yq;function _l(){if(Yq)return $g;Yq=1;var r=b0(),e=bi(),t=Pa(),i=r(r.bind);return $g=function(n,s){return e(n),s===void 0?n:t?i(n,s):function(){return n.apply(s,arguments)}},$g}var Pg={},Rg,Xq;function l5(){if(Xq)return Rg;Xq=1;var r=lt(),e=Pe();return Rg=r&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Rg}var Cg,Jq;function Vr(){if(Jq)return Cg;Jq=1;var r=Pt(),e=String,t=TypeError;return Cg=function(i){if(r(i))return i;throw new t(e(i)+" is not an object")},Cg}var Qq;function mr(){if(Qq)return Pg;Qq=1;var r=lt(),e=u5(),t=l5(),i=Vr(),n=E0(),s=TypeError,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Pg.f=r?t?function(h,f,p){if(i(h),f=n(f),i(p),typeof h=="function"&&f==="prototype"&&"value"in p&&c in p&&!p[c]){var v=a(h,f);v&&v[c]&&(h[f]=p.value,p={configurable:l in p?p[l]:v[l],enumerable:u in p?p[u]:v[u],writable:!1})}return o(h,f,p)}:o:function(h,f,p){if(i(h),f=n(f),i(p),e)try{return o(h,f,p)}catch{}if("get"in p||"set"in p)throw new s("Accessors not supported");return"value"in p&&(h[f]=p.value),h},Pg}var xg,Zq;function eo(){if(Zq)return xg;Zq=1;var r=lt(),e=mr(),t=Ra();return xg=r?function(i,n,s){return e.f(i,n,t(1,s))}:function(i,n,s){return i[n]=s,i},xg}var qg,eA;function de(){if(eA)return qg;eA=1;var r=Ze(),e=vl(),t=b0(),i=$t(),n=bl().f,s=jY(),o=je(),a=_l(),u=eo(),l=qt(),c=function(d){var h=function(f,p,v){if(this instanceof h){switch(arguments.length){case 0:return new d;case 1:return new d(f);case 2:return new d(f,p)}return new d(f,p,v)}return e(d,this,arguments)};return h.prototype=d.prototype,h};return qg=function(d,h){var f=d.target,p=d.global,v=d.stat,_=d.proto,m=p?r:v?r[f]:r[f]&&r[f].prototype,g=p?o:o[f]||u(o,f,{})[f],E=g.prototype,y,I,O,T,b,w,R,P,S;for(T in h)y=s(p?T:f+(v?".":"#")+T,d.forced),I=!y&&m&&l(m,T),w=g[T],I&&(d.dontCallGetSet?(S=n(m,T),R=S&&S.value):R=m[T]),b=I&&R?R:h[T],!(!y&&!_&&typeof w==typeof b)&&(d.bind&&I?P=a(b,r):d.wrap&&I?P=c(b):_&&i(b)?P=t(b):P=b,(d.sham||b&&b.sham||w&&w.sham)&&u(P,"sham",!0),u(g,T,P),_&&(O=f+"Prototype",l(o,O)||u(o,O,{}),u(o[O],T,b),d.real&&E&&(y||!E[T])&&u(E,T,b)))},qg}var Ag,tA;function zY(){if(tA)return Ag;tA=1;var r=Math.ceil,e=Math.floor;return Ag=Math.trunc||function(i){var n=+i;return(n>0?e:r)(n)},Ag}var Dg,rA;function to(){if(rA)return Dg;rA=1;var r=zY();return Dg=function(e){var t=+e;return t!==t||t===0?0:r(t)},Dg}var Mg,iA;function wl(){if(iA)return Mg;iA=1;var r=to(),e=Math.max,t=Math.min;return Mg=function(i,n){var s=r(i);return s<0?e(s+n,0):t(s,n)},Mg}var Ng,nA;function c5(){if(nA)return Ng;nA=1;var r=to(),e=Math.min;return Ng=function(t){var i=r(t);return i>0?e(i,9007199254740991):0},Ng}var Fg,sA;function _i(){if(sA)return Fg;sA=1;var r=c5();return Fg=function(e){return r(e.length)},Fg}var kg,oA;function S0(){if(oA)return kg;oA=1;var r=xr(),e=wl(),t=_i(),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 kg={includes:i(!0),indexOf:i(!1)},kg}var Bg,aA;function qa(){return aA||(aA=1,Bg={}),Bg}var Lg,uA;function d5(){if(uA)return Lg;uA=1;var r=xe(),e=qt(),t=xr(),i=S0().indexOf,n=qa(),s=r([].push);return Lg=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},Lg}var jg,lA;function O0(){return lA||(lA=1,jg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),jg}var zg,cA;function Aa(){if(cA)return zg;cA=1;var r=d5(),e=O0();return zg=Object.keys||function(i){return r(i,e)},zg}var Hg={},dA;function El(){return dA||(dA=1,Hg.f=Object.getOwnPropertySymbols),Hg}var Wg,hA;function HY(){if(hA)return Wg;hA=1;var r=lt(),e=xe(),t=er(),i=Pe(),n=Aa(),s=El(),o=gl(),a=sr(),u=ml(),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={},p=Symbol("assign detection"),v="abcdefghijklmnopqrst";return h[p]=7,v.split("").forEach(function(_){f[_]=_}),l({},h)[p]!==7||n(l({},f)).join("")!==v})?function(f,p){for(var v=a(f),_=arguments.length,m=1,g=s.f,E=o.f;_>m;)for(var y=u(arguments[m++]),I=g?d(n(y),g(y)):n(y),O=I.length,T=0,b;O>T;)b=I[T++],(!r||t(E,y,b))&&(v[b]=y[b]);return v}:l,Wg}var fA;function WY(){if(fA)return sq;fA=1;var r=de(),e=HY();return r({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e}),sq}var Ug,pA;function UY(){if(pA)return Ug;pA=1,WY();var r=je();return Ug=r.Object.assign,Ug}var Vg,vA;function VY(){if(vA)return Vg;vA=1;var r=UY();return Vg=r,Vg}var Kg,gA;function KY(){return gA||(gA=1,Kg=VY()),Kg}var GY=KY(),ft=ge(GY),mA={},Gg,yA;function ro(){if(yA)return Gg;yA=1;var r=xe();return Gg=r([].slice),Gg}var Yg,bA;function YY(){if(bA)return Yg;bA=1;var r=xe(),e=bi(),t=Pt(),i=qt(),n=ro(),s=Pa(),o=Function,a=r([].concat),u=r([].join),l={},c=function(d,h,f){if(!i(l,h)){for(var p=[],v=0;v=.1;)p=+s[d++%o],p>c&&(p=c),f=Math.sqrt(p*p/(1+l*l)),f=a<0?-f:f,e+=f,t+=l*f,h===!0?r.lineTo(e,t):r.moveTo(e,t),c-=p,h=!h}function aX(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},im}var nm,xA;function Sl(){if(xA)return nm;xA=1;var r=lt(),e=mr(),t=Ra();return nm=function(i,n,s){r?e.f(i,n,t(0,s)):i[n]=s},nm}var sm,qA;function T0(){if(qA)return sm;qA=1;var r=yt(),e=r("toStringTag"),t={};return t[e]="z",sm=String(t)==="[object z]",sm}var om,AA;function io(){if(AA)return om;AA=1;var r=T0(),e=$t(),t=Ur(),i=yt(),n=i("toStringTag"),s=Object,o=t(function(){return arguments}())==="Arguments",a=function(u,l){try{return u[l]}catch{}};return om=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},om}var am,DA;function dX(){if(DA)return am;DA=1;var r=xe(),e=$t(),t=w0(),i=r(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(n){return i(n)}),am=t.inspectSource,am}var um,MA;function m5(){if(MA)return um;MA=1;var r=xe(),e=Pe(),t=$t(),i=io(),n=nr(),s=dX(),o=function(){},a=n("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=r(u.exec),c=!u.test(o),d=function(p){if(!t(p))return!1;try{return a(o,[],p),!0}catch{return!1}},h=function(p){if(!t(p))return!1;switch(i(p)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,s(p))}catch{return!0}};return h.sham=!0,um=!a||e(function(){var f;return d(d.call)||!d(Object)||!d(function(){f=!0})||f})?h:d,um}var lm,NA;function hX(){if(NA)return lm;NA=1;var r=Kn(),e=m5(),t=Pt(),i=yt(),n=i("species"),s=Array;return lm=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},lm}var cm,FA;function $0(){if(FA)return cm;FA=1;var r=hX();return cm=function(e,t){return new(r(e))(t===0?0:t)},cm}var dm,kA;function Da(){if(kA)return dm;kA=1;var r=Pe(),e=yt(),t=Ca(),i=e("species");return dm=function(n){return t>=51||!r(function(){var s=[],o=s.constructor={};return o[i]=function(){return{foo:1}},s[n](Boolean).foo!==1})},dm}var BA;function y5(){if(BA)return PA;BA=1;var r=de(),e=Pe(),t=Kn(),i=Pt(),n=sr(),s=_i(),o=g5(),a=Sl(),u=$0(),l=Da(),c=yt(),d=Ca(),h=c("isConcatSpreadable"),f=d>=51||!e(function(){var _=[];return _[h]=!1,_.concat()[0]!==_}),p=function(_){if(!i(_))return!1;var m=_[h];return m!==void 0?!!m:t(_)},v=!f||!l("concat");return r({target:"Array",proto:!0,arity:1,forced:v},{concat:function(m){var g=n(this),E=u(g,0),y=0,I,O,T,b,w;for(I=-1,T=arguments.length;Ih;)t.f(a,f=c[h++],l[f]);return a},fm}var pm,WA;function fX(){if(WA)return pm;WA=1;var r=nr();return pm=r("document","documentElement"),pm}var vm,UA;function Ol(){if(UA)return vm;UA=1;var r=Zs(),e=yl(),t=r("keys");return vm=function(i){return t[i]||(t[i]=e(i))},vm}var gm,VA;function Ma(){if(VA)return gm;VA=1;var r=Vr(),e=P0(),t=O0(),i=qa(),n=fX(),s=a5(),o=Ol(),a=">",u="<",l="prototype",c="script",d=o("IE_PROTO"),h=function(){},f=function(g){return u+c+a+g+u+"/"+c+a},p=function(g){g.write(f("")),g.close();var E=g.parentWindow.Object;return g=null,E},v=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&&_?p(_):v():p(_);for(var g=t.length;g--;)delete m[l][t[g]];return m()};return i[d]=!0,gm=Object.create||function(E,y){var I;return E!==null?(h[l]=r(E),I=new h,h[l]=null,I[d]=E):I=m(),y===void 0?I:e.f(I,y)},gm}var mm={},KA;function Il(){if(KA)return mm;KA=1;var r=d5(),e=O0(),t=e.concat("length","prototype");return mm.f=Object.getOwnPropertyNames||function(n){return r(n,t)},mm}var ym={},GA;function R0(){if(GA)return ym;GA=1;var r=Ur(),e=xr(),t=Il().f,i=ro(),n=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(o){try{return t(o)}catch{return i(n)}};return ym.f=function(a){return n&&r(a)==="Window"?s(a):t(e(a))},ym}var bm,YA;function Na(){if(YA)return bm;YA=1;var r=eo();return bm=function(e,t,i,n){return n&&n.enumerable?e[t]=i:r(e,t,i),e},bm}var _m,XA;function C0(){if(XA)return _m;XA=1;var r=mr();return _m=function(e,t,i){return r.f(e,t,i)},_m}var wm={},JA;function Tl(){if(JA)return wm;JA=1;var r=yt();return wm.f=r,wm}var Em,QA;function tt(){if(QA)return Em;QA=1;var r=je(),e=qt(),t=Tl(),i=mr().f;return Em=function(n){var s=r.Symbol||(r.Symbol={});e(s,n)||i(s,n,{value:t.f(n)})},Em}var Sm,ZA;function b5(){if(ZA)return Sm;ZA=1;var r=er(),e=nr(),t=yt(),i=Na();return Sm=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})},Sm}var Om,eD;function pX(){if(eD)return Om;eD=1;var r=T0(),e=io();return Om=r?{}.toString:function(){return"[object "+e(this)+"]"},Om}var Im,tD;function Gn(){if(tD)return Im;tD=1;var r=T0(),e=mr().f,t=eo(),i=qt(),n=pX(),s=yt(),o=s("toStringTag");return Im=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))},Im}var Tm,rD;function _5(){if(rD)return Tm;rD=1;var r=Ze(),e=$t(),t=r.WeakMap;return Tm=e(t)&&/native code/.test(String(t)),Tm}var $m,iD;function Yn(){if(iD)return $m;iD=1;var r=_5(),e=Ze(),t=Pt(),i=eo(),n=qt(),s=w0(),o=Ol(),a=qa(),u="Object already initialized",l=e.TypeError,c=e.WeakMap,d,h,f,p=function(g){return f(g)?h(g):d(g,{})},v=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 $m={set:d,get:h,has:f,enforce:p,getterFor:v},$m}var Pm,nD;function en(){if(nD)return Pm;nD=1;var r=_l(),e=xe(),t=ml(),i=sr(),n=_i(),s=$0(),o=e([].push),a=function(u){var l=u===1,c=u===2,d=u===3,h=u===4,f=u===6,p=u===7,v=u===5||f;return function(_,m,g,E){for(var y=i(_),I=t(y),O=n(I),T=r(m,g),b=0,w=E||s,R=l?w(_,O):c||p?w(_,0):void 0,P,S;O>b;b++)if((v||b in I)&&(P=I[b],S=T(P,b,y),u))if(l)R[b]=S;else if(S)switch(u){case 3:return!0;case 5:return P;case 6:return b;case 2:o(R,P)}else switch(u){case 4:return!1;case 7:o(R,P)}return f?-1:d||h?h:R}};return Pm={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},Pm}var sD;function vX(){if(sD)return jA;sD=1;var r=de(),e=Ze(),t=er(),i=xe(),n=Qs(),s=lt(),o=Xs(),a=Pe(),u=qt(),l=mt(),c=Vr(),d=xr(),h=E0(),f=yr(),p=Ra(),v=Ma(),_=Aa(),m=Il(),g=R0(),E=El(),y=bl(),I=mr(),O=P0(),T=gl(),b=Na(),w=C0(),R=Zs(),P=Ol(),S=qa(),$=yl(),q=yt(),F=Tl(),Z=tt(),z=b5(),te=Gn(),ve=Yn(),we=en().forEach,re=P("hidden"),me="Symbol",qe="prototype",De=ve.set,ct=ve.getterFor(me),_e=Object[qe],D=e.Symbol,U=D&&D[qe],X=e.RangeError,ne=e.TypeError,Re=e.QObject,C=y.f,x=I.f,A=g.f,k=T.f,B=i([].push),N=R("symbols"),G=R("op-symbols"),J=R("wks"),V=!Re||!Re[qe]||!Re[qe].findChild,L=function(ae,K,ee){var ie=C(_e,K);ie&&delete _e[K],x(ae,K,ee),ie&&ae!==_e&&x(_e,K,ie)},ce=s&&a(function(){return v(x({},"a",{get:function(){return x(this,"a",{value:7}).a}})).a!==7})?L:x,Q=function(ae,K){var ee=N[ae]=v(U);return De(ee,{type:me,tag:ae,description:K}),s||(ee.description=K),ee},oe=function(K,ee,ie){K===_e&&oe(G,ee,ie),c(K);var se=h(ee);return c(ie),u(N,se)?(ie.enumerable?(u(K,re)&&K[re][se]&&(K[re][se]=!1),ie=v(ie,{enumerable:p(0,!1)})):(u(K,re)||x(K,re,p(1,v(null))),K[re][se]=!0),ce(K,se,ie)):x(K,se,ie)},he=function(K,ee){c(K);var ie=d(ee),se=_(ie).concat(dt(ie));return we(se,function(Ee){(!s||t(Ae,ie,Ee))&&oe(K,Ee,ie[Ee])}),K},Ie=function(K,ee){return ee===void 0?v(K):he(v(K),ee)},Ae=function(K){var ee=h(K),ie=t(k,this,ee);return this===_e&&u(N,ee)&&!u(G,ee)?!1:ie||!u(this,ee)||!u(N,ee)||u(this,re)&&this[re][ee]?ie:!0},Ce=function(K,ee){var ie=d(K),se=h(ee);if(!(ie===_e&&u(N,se)&&!u(G,se))){var Ee=C(ie,se);return Ee&&u(N,se)&&!(u(ie,re)&&ie[re][se])&&(Ee.enumerable=!0),Ee}},bt=function(K){var ee=A(d(K)),ie=[];return we(ee,function(se){!u(N,se)&&!u(S,se)&&B(ie,se)}),ie},dt=function(ae){var K=ae===_e,ee=A(K?G:d(ae)),ie=[];return we(ee,function(se){u(N,se)&&(!K||u(_e,se))&&B(ie,N[se])}),ie};return o||(D=function(){if(l(U,this))throw new ne("Symbol is not a constructor");var K=!arguments.length||arguments[0]===void 0?void 0:f(arguments[0]),ee=$(K),ie=function(se){var Ee=this===void 0?e:this;Ee===_e&&t(ie,G,se),u(Ee,re)&&u(Ee[re],ee)&&(Ee[re][ee]=!1);var wi=p(1,se);try{ce(Ee,ee,wi)}catch(co){if(!(co instanceof X))throw co;L(Ee,ee,wi)}};return s&&V&&ce(_e,ee,{configurable:!0,set:ie}),Q(ee,K)},U=D[qe],b(U,"toString",function(){return ct(this).tag}),b(D,"withoutSetter",function(ae){return Q($(ae),ae)}),T.f=Ae,I.f=oe,O.f=he,y.f=Ce,m.f=g.f=bt,E.f=dt,F.f=function(ae){return Q(q(ae),ae)},s&&(w(U,"description",{configurable:!0,get:function(){return ct(this).description}}),n||b(_e,"propertyIsEnumerable",Ae,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:D}),we(_(J),function(ae){Z(ae)}),r({target:me,stat:!0,forced:!o},{useSetter:function(){V=!0},useSimple:function(){V=!1}}),r({target:"Object",stat:!0,forced:!o,sham:!s},{create:Ie,defineProperty:oe,defineProperties:he,getOwnPropertyDescriptor:Ce}),r({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:bt}),z(),te(D,me),S[re]=!0,jA}var oD={},Rm,aD;function w5(){if(aD)return Rm;aD=1;var r=Xs();return Rm=r&&!!Symbol.for&&!!Symbol.keyFor,Rm}var uD;function gX(){if(uD)return oD;uD=1;var r=de(),e=nr(),t=qt(),i=yr(),n=Zs(),s=w5(),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 lD={},cD;function mX(){if(cD)return lD;cD=1;var r=de(),e=qt(),t=xa(),i=Js(),n=Zs(),s=w5(),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]}}),lD}var dD={},Cm,hD;function yX(){if(hD)return Cm;hD=1;var r=xe(),e=Kn(),t=$t(),i=Ur(),n=yr(),s=r([].push);return Cm=function(o){if(t(o))return o;if(e(o)){for(var a=o.length,u=[],l=0;l=p.length)return f.target=null,o(void 0,!0);switch(f.kind){case"keys":return o(v,!1);case"values":return o(p[v],!1)}return o([v,p[v]],!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 Um}var Vm,dM;function BX(){return dM||(dM=1,Vm={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}),Vm}var hM;function oo(){if(hM)return XD;hM=1,so();var r=BX(),e=Ze(),t=Gn(),i=no();for(var n in r)t(e[n],n),i[n]=i.Array;return XD}var Km,fM;function C5(){if(fM)return Km;fM=1;var r=qX();return oo(),Km=r,Km}var Gm,pM;function LX(){return pM||(pM=1,Gm=C5()),Gm}var jX=LX(),zX=ge(jX),vM={},gM;function HX(){if(gM)return vM;gM=1;var r=de(),e=Kn(),t=m5(),i=Pt(),n=wl(),s=_i(),o=xr(),a=Sl(),u=yt(),l=Da(),c=ro(),d=l("slice"),h=u("species"),f=Array,p=Math.max;return r({target:"Array",proto:!0,forced:!d},{slice:function(_,m){var g=o(this),E=s(g),y=n(_,E),I=n(m===void 0?E:m,E),O,T,b;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,y,I);for(T=new(O===void 0?f:O)(p(I-y,0)),b=0;y1?arguments[1]:void 0)}}),$M}var iy,RM;function rJ(){if(RM)return iy;RM=1,tJ();var r=At();return iy=r("Array","map"),iy}var ny,CM;function iJ(){if(CM)return ny;CM=1;var r=mt(),e=rJ(),t=Array.prototype;return ny=function(i){var n=i.map;return i===t||r(t,i)&&n===t.map?e:n},ny}var sy,xM;function nJ(){if(xM)return sy;xM=1;var r=iJ();return sy=r,sy}var oy,qM;function sJ(){return qM||(qM=1,oy=nJ()),oy}var oJ=sJ(),qs=ge(oJ),AM={},DM;function aJ(){if(DM)return AM;DM=1;var r=de(),e=sr(),t=Aa(),i=Pe(),n=i(function(){t(1)});return r({target:"Object",stat:!0,forced:n},{keys:function(o){return t(e(o))}}),AM}var ay,MM;function uJ(){if(MM)return ay;MM=1,aJ();var r=je();return ay=r.Object.keys,ay}var uy,NM;function lJ(){if(NM)return uy;NM=1;var r=uJ();return uy=r,uy}var ly,FM;function cJ(){return FM||(FM=1,ly=lJ()),ly}var dJ=cJ(),nt=ge(dJ),kM={},BM;function hJ(){if(BM)return kM;BM=1;var r=de(),e=xe(),t=Date,i=e(t.prototype.getTime);return r({target:"Date",stat:!0},{now:function(){return i(new t)}}),kM}var cy,LM;function fJ(){if(LM)return cy;LM=1,hJ();var r=je();return cy=r.Date.now,cy}var dy,jM;function pJ(){if(jM)return dy;jM=1;var r=fJ();return dy=r,dy}var hy,zM;function vJ(){return zM||(zM=1,hy=pJ()),hy}var gJ=vJ(),xu=ge(gJ),HM={},fy,WM;function ao(){if(WM)return fy;WM=1;var r=Pe();return fy=function(e,t){var i=[][e];return!!i&&r(function(){i.call(null,t||function(){return 1},1)})},fy}var py,UM;function mJ(){if(UM)return py;UM=1;var r=en().forEach,e=ao(),t=e("forEach");return py=t?[].forEach:function(n){return r(this,n,arguments.length>1?arguments[1]:void 0)},py}var VM;function yJ(){if(VM)return HM;VM=1;var r=de(),e=mJ();return r({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),HM}var vy,KM;function bJ(){if(KM)return vy;KM=1,yJ();var r=At();return vy=r("Array","forEach"),vy}var gy,GM;function _J(){if(GM)return gy;GM=1;var r=bJ();return gy=r,gy}var my,YM;function wJ(){if(YM)return my;YM=1;var r=io(),e=qt(),t=mt(),i=_J(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return my=function(o){var a=o.forEach;return o===n||t(n,o)&&a===n.forEach||e(s,r(o))?i:a},my}var yy,XM;function EJ(){return XM||(XM=1,yy=wJ()),yy}var SJ=EJ(),He=ge(SJ),JM={},QM;function OJ(){if(QM)return JM;QM=1;var r=de(),e=xe(),t=Kn(),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)}}),JM}var by,ZM;function IJ(){if(ZM)return by;ZM=1,OJ();var r=At();return by=r("Array","reverse"),by}var _y,eN;function TJ(){if(eN)return _y;eN=1;var r=mt(),e=IJ(),t=Array.prototype;return _y=function(i){var n=i.reverse;return i===t||r(t,i)&&n===t.reverse?e:n},_y}var wy,tN;function $J(){if(tN)return wy;tN=1;var r=TJ();return wy=r,wy}var Ey,rN;function PJ(){return rN||(rN=1,Ey=$J()),Ey}var RJ=PJ(),En=ge(RJ),iN={},Sy,nN;function CJ(){if(nN)return Sy;nN=1;var r=lt(),e=Kn(),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 Sy=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},Sy}var Oy,sN;function x5(){if(sN)return Oy;sN=1;var r=Js(),e=TypeError;return Oy=function(t,i){if(!delete t[i])throw new e("Cannot delete property "+r(i)+" of "+r(t))},Oy}var oN;function xJ(){if(oN)return iN;oN=1;var r=de(),e=sr(),t=wl(),i=to(),n=_i(),s=CJ(),o=g5(),a=$0(),u=Sl(),l=x5(),c=Da(),d=c("splice"),h=Math.max,f=Math.min;return r({target:"Array",proto:!0,forced:!d},{splice:function(v,_){var m=e(this),g=n(m),E=t(v,g),y=arguments.length,I,O,T,b,w,R;for(y===0?I=O=0:y===1?(I=0,O=g-E):(I=y-2,O=f(h(i(_),0),g-E)),o(g+I-O),T=a(m,O),b=0;bg-O+I;b--)l(m,b-1)}else if(I>O)for(b=g-O;b>E;b--)w=b+O-1,R=b+I-1,w in m?m[R]=m[w]:l(m,R);for(b=0;b1?arguments[1]:void 0)}}),i("includes"),dN}var Ry,fN;function kJ(){if(fN)return Ry;fN=1,FJ();var r=At();return Ry=r("Array","includes"),Ry}var pN={},Cy,vN;function BJ(){if(vN)return Cy;vN=1;var r=Pt(),e=Ur(),t=yt(),i=t("match");return Cy=function(n){var s;return r(n)&&((s=n[i])!==void 0?!!s:e(n)==="RegExp")},Cy}var xy,gN;function LJ(){if(gN)return xy;gN=1;var r=BJ(),e=TypeError;return xy=function(t){if(r(t))throw new e("The method doesn't accept regular expressions");return t},xy}var qy,mN;function jJ(){if(mN)return qy;mN=1;var r=yt(),e=r("match");return qy=function(t){var i=/./;try{"/./"[t](i)}catch{try{return i[e]=!1,"/./"[t](i)}catch{}}return!1},qy}var yN;function zJ(){if(yN)return pN;yN=1;var r=de(),e=xe(),t=LJ(),i=yi(),n=yr(),s=jJ(),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)}}),pN}var Ay,bN;function HJ(){if(bN)return Ay;bN=1,zJ();var r=At();return Ay=r("String","includes"),Ay}var Dy,_N;function WJ(){if(_N)return Dy;_N=1;var r=mt(),e=kJ(),t=HJ(),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 My,wN;function UJ(){if(wN)return My;wN=1;var r=WJ();return My=r,My}var Ny,EN;function VJ(){return EN||(EN=1,Ny=UJ()),Ny}var KJ=VJ(),ki=ge(KJ),SN={},ON;function GJ(){if(ON)return SN;ON=1;var r=de(),e=Pe(),t=sr(),i=$l(),n=P5(),s=e(function(){i(1)});return r({target:"Object",stat:!0,forced:s,sham:!n},{getPrototypeOf:function(a){return i(t(a))}}),SN}var Fy,IN;function YJ(){if(IN)return Fy;IN=1,GJ();var r=je();return Fy=r.Object.getPrototypeOf,Fy}var ky,TN;function XJ(){if(TN)return ky;TN=1;var r=YJ();return ky=r,ky}var By,$N;function JJ(){return $N||($N=1,By=XJ()),By}var QJ=JJ(),PN=ge(QJ),Ly,RN;function ZJ(){if(RN)return Ly;RN=1,y5();var r=At();return Ly=r("Array","concat"),Ly}var jy,CN;function eQ(){if(CN)return jy;CN=1;var r=mt(),e=ZJ(),t=Array.prototype;return jy=function(i){var n=i.concat;return i===t||r(t,i)&&n===t.concat?e:n},jy}var zy,xN;function tQ(){if(xN)return zy;xN=1;var r=eQ();return zy=r,zy}var Hy,qN;function rQ(){return qN||(qN=1,Hy=tQ()),Hy}var iQ=rQ(),nQ=ge(iQ),AN={},DN;function sQ(){if(DN)return AN;DN=1;var r=de(),e=en().filter,t=Da(),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)}}),AN}var Wy,MN;function oQ(){if(MN)return Wy;MN=1,sQ();var r=At();return Wy=r("Array","filter"),Wy}var Uy,NN;function aQ(){if(NN)return Uy;NN=1;var r=mt(),e=oQ(),t=Array.prototype;return Uy=function(i){var n=i.filter;return i===t||r(t,i)&&n===t.filter?e:n},Uy}var Vy,FN;function uQ(){if(FN)return Vy;FN=1;var r=aQ();return Vy=r,Vy}var Ky,kN;function lQ(){return kN||(kN=1,Ky=uQ()),Ky}var cQ=lQ(),Yt=ge(cQ),BN={},Gy,LN;function dQ(){if(LN)return Gy;LN=1;var r=lt(),e=Pe(),t=xe(),i=$l(),n=Aa(),s=xr(),o=gl().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),p=n(f),v=l&&i(f)===null,_=p.length,m=0,g=[],E;_>m;)E=p[m++],(!r||(v?E in f:a(f,E)))&&u(g,d?[E,f[E]]:f[E]);return g}};return Gy={entries:c(!0),values:c(!1)},Gy}var jN;function hQ(){if(jN)return BN;jN=1;var r=de(),e=dQ().values;return r({target:"Object",stat:!0},{values:function(i){return e(i)}}),BN}var Yy,zN;function fQ(){if(zN)return Yy;zN=1,hQ();var r=je();return Yy=r.Object.values,Yy}var Xy,HN;function pQ(){if(HN)return Xy;HN=1;var r=fQ();return Xy=r,Xy}var Jy,WN;function vQ(){return WN||(WN=1,Jy=pQ()),Jy}var gQ=vQ(),mQ=ge(gQ),UN={},Qy,VN;function D0(){return VN||(VN=1,Qy=` +\v\f\r                 \u2028\u2029\uFEFF`),Qy}var Zy,KN;function q5(){if(KN)return Zy;KN=1;var r=xe(),e=yi(),t=yr(),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 Zy={start:a(1),end:a(2),trim:a(3)},Zy}var eb,GN;function yQ(){if(GN)return eb;GN=1;var r=Ze(),e=Pe(),t=xe(),i=yr(),n=q5().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 eb=d?function(f,p){var v=n(i(f));return o(v,p>>>0||(c(l,v)?16:10))}:o,eb}var YN;function bQ(){if(YN)return UN;YN=1;var r=de(),e=yQ();return r({global:!0,forced:parseInt!==e},{parseInt:e}),UN}var tb,XN;function _Q(){if(XN)return tb;XN=1,bQ();var r=je();return tb=r.parseInt,tb}var rb,JN;function wQ(){if(JN)return rb;JN=1;var r=_Q();return rb=r,rb}var ib,QN;function EQ(){return QN||(QN=1,ib=wQ()),ib}var SQ=EQ(),Er=ge(SQ),ZN={},eF;function OQ(){if(eF)return ZN;eF=1;var r=de(),e=b0(),t=S0().indexOf,i=ao(),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)}}),ZN}var nb,tF;function IQ(){if(tF)return nb;tF=1,OQ();var r=At();return nb=r("Array","indexOf"),nb}var sb,rF;function TQ(){if(rF)return sb;rF=1;var r=mt(),e=IQ(),t=Array.prototype;return sb=function(i){var n=i.indexOf;return i===t||r(t,i)&&n===t.indexOf?e:n},sb}var ob,iF;function $Q(){if(iF)return ob;iF=1;var r=TQ();return ob=r,ob}var ab,nF;function PQ(){return nF||(nF=1,ab=$Q()),ab}var RQ=PQ(),Be=ge(RQ),sF={},oF;function CQ(){if(oF)return sF;oF=1;var r=de(),e=lt(),t=Ma();return r({target:"Object",stat:!0,sham:!e},{create:t}),sF}var ub,aF;function xQ(){if(aF)return ub;aF=1,CQ();var r=je(),e=r.Object;return ub=function(i,n){return e.create(i,n)},ub}var lb,uF;function qQ(){if(uF)return lb;uF=1;var r=xQ();return lb=r,lb}var cb,lF;function AQ(){return lF||(lF=1,cb=qQ()),cb}var DQ=AQ(),Sn=ge(DQ),cF={},db,dF;function MQ(){if(dF)return db;dF=1;var r=to(),e=yr(),t=yi(),i=RangeError;return db=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},db}var hb,hF;function NQ(){if(hF)return hb;hF=1;var r=xe(),e=c5(),t=yr(),i=MQ(),n=yi(),s=r(i),o=r("".slice),a=Math.ceil,u=function(l){return function(c,d,h){var f=t(n(c)),p=e(d),v=f.length,_=h===void 0?" ":t(h),m,g;return p<=v||_===""?f:(m=p-v,g=s(_,a(m/_.length)),g.length>m&&(g=o(g,0,m)),l?f+g:g+f)}};return hb={start:u(!1),end:u(!0)},hb}var fb,fF;function FQ(){if(fF)return fb;fF=1;var r=xe(),e=Pe(),t=NQ().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),p=r(o.getUTCMonth),v=r(o.getUTCSeconds);return fb=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(p(m)+1,2,0)+"-"+t(l(m),2,0)+"T"+t(d(m),2,0)+":"+t(f(m),2,0)+":"+t(v(m),2,0)+"."+t(E,3,0)+"Z"}:a,fb}var pF;function kQ(){if(pF)return cF;pF=1;var r=de(),e=er(),t=sr(),i=o5(),n=FQ(),s=Ur(),o=Pe(),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()}}),cF}var pb,vF;function BQ(){if(vF)return pb;vF=1,kQ(),E5();var r=je(),e=vl();return r.JSON||(r.JSON={stringify:JSON.stringify}),pb=function(i,n,s){return e(r.JSON.stringify,null,arguments)},pb}var vb,gF;function LQ(){if(gF)return vb;gF=1;var r=BQ();return vb=r,vb}var gb,mF;function jQ(){return mF||(mF=1,gb=LQ()),gb}var zQ=jQ(),Fa=ge(zQ),yF={},bF={},mb,_F;function A5(){if(_F)return mb;_F=1;var r=Ze(),e=Ys(),t=Ur(),i=function(n){return e.slice(0,n.length)===n};return mb=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"}(),mb}var yb,wF;function HQ(){if(wF)return yb;wF=1;var r=TypeError;return yb=function(e,t){if(ed,v=t(h)?h:a(h),_=p?s(arguments,d):[],m=p?function(){e(v,this,_)}:v;return c?l(m,f):l(m)}:l},bb}var SF;function WQ(){if(SF)return bF;SF=1;var r=de(),e=Ze(),t=D5(),i=t(e.setInterval,!0);return r({global:!0,bind:!0,forced:e.setInterval!==i},{setInterval:i}),bF}var OF={},IF;function UQ(){if(IF)return OF;IF=1;var r=de(),e=Ze(),t=D5(),i=t(e.setTimeout,!0);return r({global:!0,bind:!0,forced:e.setTimeout!==i},{setTimeout:i}),OF}var TF;function M5(){return TF||(TF=1,WQ(),UQ()),yF}var _b,$F;function VQ(){if($F)return _b;$F=1,M5();var r=je();return _b=r.setTimeout,_b}var wb,PF;function KQ(){return PF||(PF=1,wb=VQ()),wb}var GQ=KQ(),ui=ge(GQ),RF={},Eb,CF;function YQ(){if(CF)return Eb;CF=1;var r=sr(),e=wl(),t=_i();return Eb=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},Eb}var xF;function XQ(){if(xF)return RF;xF=1;var r=de(),e=YQ(),t=x0();return r({target:"Array",proto:!0},{fill:e}),t("fill"),RF}var Sb,qF;function JQ(){if(qF)return Sb;qF=1,XQ();var r=At();return Sb=r("Array","fill"),Sb}var Ob,AF;function QQ(){if(AF)return Ob;AF=1;var r=mt(),e=JQ(),t=Array.prototype;return Ob=function(i){var n=i.fill;return i===t||r(t,i)&&n===t.fill?e:n},Ob}var Ib,DF;function ZQ(){if(DF)return Ib;DF=1;var r=QQ();return Ib=r,Ib}var Tb,MF;function eZ(){return MF||(MF=1,Tb=ZQ()),Tb}var tZ=eZ(),ka=ge(tZ);/*! 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 Rr(){return Rr=Object.assign||function(r){for(var e=1;e"u"?{style:{}}:document.createElement("div"),rZ="function",ps=Math.round,qn=Math.abs,M0=Date.now;function Pl(r,e){for(var t,i,n=e[0].toUpperCase()+e.slice(1),s=0;s"u"?li={}:li=window;var N5=Pl(tZ.style,"touchAction"),F5=N5!==void 0;function iZ(){if(!F5)return!1;var r={},e=li.CSS&&li.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return r[t]=e?li.CSS.supports("touch-action",t):!0}),r}var k5="compute",B5="auto",mw="manipulation",On="none",ea="pan-x",ta="pan-y",nu=iZ(),nZ=/mobile|tablet|ip(ad|hone|od)|android/i,L5="ontouchstart"in li,sZ=Pl(li,"PointerEvent")!==void 0,oZ=L5&&nZ.test(navigator.userAgent),Ba="touch",aZ="pen",N0="mouse",uZ="kinect",lZ=25,Vt=1,Xn=2,pt=4,Jt=8,qu=1,La=2,ja=4,za=8,As=16,Hr=La|ja,In=za|As,j5=Hr|In,z5=["x","y"],Au=["clientX","clientY"];function ci(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 cZ(r){if(gn(r,On))return On;var e=gn(r,ea),t=gn(r,ta);return e&&t?On:e||t?e?ea:ta:gn(r,mw)?mw:B5}var H5=function(){function r(t,i){this.manager=t,this.set(i)}var e=r.prototype;return e.set=function(i){i===k5&&(i=this.compute()),F5&&this.manager.element.style&&nu[i]&&(this.manager.element.style[N5]=i),this.actions=i.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var i=[];return ci(this.manager.recognizers,function(n){Rl(n.options.enable,[n])&&(i=i.concat(n.getTouchAction()))}),cZ(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=gn(o,On)&&!nu[On],u=gn(o,ta)&&!nu[ta],l=gn(o,ea)&&!nu[ea];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&Hr||l&&s&In))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 W5(r){var e=r.length;if(e===1)return{x:ps(r[0].clientX),y:ps(r[0].clientY)};for(var t=0,i=0,n=0;n=qn(e)?r<0?La:ja:e<0?za:As}function dZ(r,e){var t=e.center,i=r.offsetDelta||{},n=r.prevDelta||{},s=r.prevInput||{};(e.eventType===Vt||s.eventType===pt)&&(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 V5(r,e,t){return{x:e/r||0,y:t/r||0}}function hZ(r,e){return Du(e[0],e[1],Au)/Du(r[0],r[1],Au)}function fZ(r,e){return yw(e[1],e[0],Au)+yw(r[1],r[0],Au)}function pZ(r,e){var t=r.lastInterval||e,i=e.timeStamp-t.timeStamp,n,s,o,a;if(e.eventType!==Jt&&(i>lZ||t.velocity===void 0)){var u=e.deltaX-t.deltaX,l=e.deltaY-t.deltaY,c=V5(i,u,l);s=c.x,o=c.y,n=qn(c.x)>qn(c.y)?c.x:c.y,a=U5(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 vZ(r,e){var t=r.session,i=e.pointers,n=i.length;t.firstInput||(t.firstInput=FF(e)),n>1&&!t.firstMultiple?t.firstMultiple=FF(e):n===1&&(t.firstMultiple=!1);var s=t.firstInput,o=t.firstMultiple,a=o?o.center:s.center,u=e.center=W5(i);e.timeStamp=M0(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=yw(a,u),e.distance=Du(a,u),dZ(t,e),e.offsetDirection=U5(e.deltaX,e.deltaY);var l=V5(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=qn(l.x)>qn(l.y)?l.x:l.y,e.scale=o?hZ(o.pointers,i):1,e.rotation=o?fZ(o.pointers,i):0,e.maxPointers=t.prevInput?e.pointers.length>t.prevInput.maxPointers?e.pointers.length:t.prevInput.maxPointers:e.pointers.length,pZ(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 gZ(r,e,t){var i=t.pointers.length,n=t.changedPointers.length,s=e&Vt&&i-n===0,o=e&(pt|Jt)&&i-n===0;t.isFirst=!!s,t.isFinal=!!o,s&&(r.session={}),t.eventType=e,vZ(r,t),r.emit("hammer.input",t),r.recognize(t),r.session.prevInput=t}function ra(r){return r.trim().split(/\s+/g)}function Ao(r,e,t){ci(ra(e),function(i){r.addEventListener(i,t,!1)})}function Do(r,e,t){ci(ra(e),function(i){r.removeEventListener(i,t,!1)})}function kF(r){var e=r.ownerDocument||r;return e.defaultView||e.parentWindow||window}var uo=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){Rl(t.options.enable,[t])&&n.handler(s)},this.init()}var e=r.prototype;return e.handler=function(){},e.init=function(){this.evEl&&Ao(this.element,this.evEl,this.domHandler),this.evTarget&&Ao(this.target,this.evTarget,this.domHandler),this.evWin&&Ao(kF(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&Do(this.element,this.evEl,this.domHandler),this.evTarget&&Do(this.target,this.evTarget,this.domHandler),this.evWin&&Do(kF(this.element),this.evWin,this.domHandler)},r}();function An(r,e,t){if(r.indexOf&&!t)return r.indexOf(e);for(var i=0;iu[e]}):i=i.sort()),i}var bZ={touchstart:Vt,touchmove:Xn,touchend:pt,touchcancel:Jt},_Z="touchstart touchmove touchend touchcancel",B0=function(r){br(e,r);function e(){var i;return e.prototype.evTarget=_Z,i=r.apply(this,arguments)||this,i.targetIds={},i}var t=e.prototype;return t.handler=function(n){var s=bZ[n.type],o=wZ.call(this,n,s);o&&this.callback(this.manager,s,{pointers:o[0],changedPointers:o[1],pointerType:Ba,srcEvent:n})},e}(uo);function wZ(r,e){var t=ia(r.touches),i=this.targetIds;if(e&(Vt|Xn)&&t.length===1)return i[t[0].identifier]=!0,[t,t];var n,s,o=ia(r.changedTouches),a=[],u=this.target;if(s=t.filter(function(l){return F0(l.target,u)}),e===Vt)for(n=0;n-1&&n.splice(a,1)};setTimeout(s,IZ)}}function TZ(r,e){r&Vt?(this.primaryTouch=e.changedPointers[0].identifier,LF.call(this,e)):r&(pt|Jt)&&LF.call(this,e)}function $Z(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=Bi&&o(n.options.event+jF(s))},e.tryEmit=function(i){if(this.canEmit())return this.emit(i);this.state=Br},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&fr||!(this.state&fr)&&this.directionTest(n))},t.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var s=J5(n.direction);s&&(n.additionalEvent=this.options.event+s),r.prototype.emit.call(this,n)},e}(Ms),Q5=function(r){br(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Rr({event:"swipe",threshold:10,velocity:.3,direction:Hr|In,pointers:1},i))||this}var t=e.prototype;return t.getTouchAction=function(){return j0.prototype.getTouchAction.call(this)},t.attrTest=function(n){var s=this.options.direction,o;return s&(Hr|In)?o=n.overallVelocity:s&Hr?o=n.overallVelocityX:s&In&&(o=n.overallVelocityY),r.prototype.attrTest.call(this,n)&&s&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&qn(o)>this.options.velocity&&n.eventType&pt},t.emit=function(n){var s=J5(n.offsetDirection);s&&this.manager.emit(this.options.event+s,n),this.manager.emit(this.options.event,n)},e}(Ms),Z5=function(r){br(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Rr({event:"pinch",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[On]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&fr)},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),eH=function(r){br(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Rr({event:"rotate",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[On]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&fr)},e}(Ms),tH=function(r){br(e,r);function e(i){var n;return i===void 0&&(i={}),n=r.call(this,Rr({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[B5]},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&(pt|Jt)&&!l)this.reset();else if(n.eventType&Vt)this.reset(),this._timer=setTimeout(function(){s.state=di,s.tryEmit()},o.time);else if(n.eventType&pt)return di;return Br},t.reset=function(){clearTimeout(this._timer)},t.emit=function(n){this.state===di&&(n&&n.eventType&pt?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=M0(),this.manager.emit(this.options.event,this._input)))},e}(Ha),rH={domEvents:!1,touchAction:k5,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},zF=[[eH,{enable:!1}],[Z5,{enable:!1},["rotate"]],[Q5,{direction:Hr}],[j0,{direction:Hr},["swipe"]],[bw],[bw,{event:"doubletap",taps:2},["tap"]],[tH]],xZ=1,HF=2;function WF(r,e){var t=r.element;if(t.style){var i;ci(r.options.cssProps,function(n,s){i=Pl(t.style,s),e?(r.oldCssProps[i]=t.style[i],t.style[i]=n):t.style[i]=r.oldCssProps[i]||""}),e||(r.oldCssProps={})}}function qZ(r,e){var t=document.createEvent("Event");t.initEvent(r,!0,!0),t.gesture=e,e.target.dispatchEvent(t)}var UF=function(){function r(t,i){var n=this;this.options=xn({},rH,i||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=PZ(this),this.touchAction=new H5(this,this.options.touchAction),WF(this,!0),ci(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 xn(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?HF:xZ},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&di)&&(n.curRecognizer=null,a=null);for(var u=0;u"u"?{style:{}}:document.createElement("div"),iZ="function",ps=Math.round,qn=Math.abs,M0=Date.now;function Pl(r,e){for(var t,i,n=e[0].toUpperCase()+e.slice(1),s=0;s"u"?li={}:li=window;var N5=Pl(rZ.style,"touchAction"),F5=N5!==void 0;function nZ(){if(!F5)return!1;var r={},e=li.CSS&&li.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return r[t]=e?li.CSS.supports("touch-action",t):!0}),r}var k5="compute",B5="auto",mw="manipulation",On="none",ea="pan-x",ta="pan-y",nu=nZ(),sZ=/mobile|tablet|ip(ad|hone|od)|android/i,L5="ontouchstart"in li,oZ=Pl(li,"PointerEvent")!==void 0,aZ=L5&&sZ.test(navigator.userAgent),Ba="touch",uZ="pen",N0="mouse",lZ="kinect",cZ=25,Vt=1,Xn=2,pt=4,Jt=8,qu=1,La=2,ja=4,za=8,As=16,Hr=La|ja,In=za|As,j5=Hr|In,z5=["x","y"],Au=["clientX","clientY"];function ci(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 dZ(r){if(gn(r,On))return On;var e=gn(r,ea),t=gn(r,ta);return e&&t?On:e||t?e?ea:ta:gn(r,mw)?mw:B5}var H5=function(){function r(t,i){this.manager=t,this.set(i)}var e=r.prototype;return e.set=function(i){i===k5&&(i=this.compute()),F5&&this.manager.element.style&&nu[i]&&(this.manager.element.style[N5]=i),this.actions=i.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var i=[];return ci(this.manager.recognizers,function(n){Rl(n.options.enable,[n])&&(i=i.concat(n.getTouchAction()))}),dZ(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=gn(o,On)&&!nu[On],u=gn(o,ta)&&!nu[ta],l=gn(o,ea)&&!nu[ea];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&Hr||l&&s&In))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 W5(r){var e=r.length;if(e===1)return{x:ps(r[0].clientX),y:ps(r[0].clientY)};for(var t=0,i=0,n=0;n=qn(e)?r<0?La:ja:e<0?za:As}function hZ(r,e){var t=e.center,i=r.offsetDelta||{},n=r.prevDelta||{},s=r.prevInput||{};(e.eventType===Vt||s.eventType===pt)&&(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 V5(r,e,t){return{x:e/r||0,y:t/r||0}}function fZ(r,e){return Du(e[0],e[1],Au)/Du(r[0],r[1],Au)}function pZ(r,e){return yw(e[1],e[0],Au)+yw(r[1],r[0],Au)}function vZ(r,e){var t=r.lastInterval||e,i=e.timeStamp-t.timeStamp,n,s,o,a;if(e.eventType!==Jt&&(i>cZ||t.velocity===void 0)){var u=e.deltaX-t.deltaX,l=e.deltaY-t.deltaY,c=V5(i,u,l);s=c.x,o=c.y,n=qn(c.x)>qn(c.y)?c.x:c.y,a=U5(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 gZ(r,e){var t=r.session,i=e.pointers,n=i.length;t.firstInput||(t.firstInput=FF(e)),n>1&&!t.firstMultiple?t.firstMultiple=FF(e):n===1&&(t.firstMultiple=!1);var s=t.firstInput,o=t.firstMultiple,a=o?o.center:s.center,u=e.center=W5(i);e.timeStamp=M0(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=yw(a,u),e.distance=Du(a,u),hZ(t,e),e.offsetDirection=U5(e.deltaX,e.deltaY);var l=V5(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=qn(l.x)>qn(l.y)?l.x:l.y,e.scale=o?fZ(o.pointers,i):1,e.rotation=o?pZ(o.pointers,i):0,e.maxPointers=t.prevInput?e.pointers.length>t.prevInput.maxPointers?e.pointers.length:t.prevInput.maxPointers:e.pointers.length,vZ(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 mZ(r,e,t){var i=t.pointers.length,n=t.changedPointers.length,s=e&Vt&&i-n===0,o=e&(pt|Jt)&&i-n===0;t.isFirst=!!s,t.isFinal=!!o,s&&(r.session={}),t.eventType=e,gZ(r,t),r.emit("hammer.input",t),r.recognize(t),r.session.prevInput=t}function ra(r){return r.trim().split(/\s+/g)}function Ao(r,e,t){ci(ra(e),function(i){r.addEventListener(i,t,!1)})}function Do(r,e,t){ci(ra(e),function(i){r.removeEventListener(i,t,!1)})}function kF(r){var e=r.ownerDocument||r;return e.defaultView||e.parentWindow||window}var uo=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){Rl(t.options.enable,[t])&&n.handler(s)},this.init()}var e=r.prototype;return e.handler=function(){},e.init=function(){this.evEl&&Ao(this.element,this.evEl,this.domHandler),this.evTarget&&Ao(this.target,this.evTarget,this.domHandler),this.evWin&&Ao(kF(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&Do(this.element,this.evEl,this.domHandler),this.evTarget&&Do(this.target,this.evTarget,this.domHandler),this.evWin&&Do(kF(this.element),this.evWin,this.domHandler)},r}();function An(r,e,t){if(r.indexOf&&!t)return r.indexOf(e);for(var i=0;iu[e]}):i=i.sort()),i}var _Z={touchstart:Vt,touchmove:Xn,touchend:pt,touchcancel:Jt},wZ="touchstart touchmove touchend touchcancel",B0=function(r){br(e,r);function e(){var i;return e.prototype.evTarget=wZ,i=r.apply(this,arguments)||this,i.targetIds={},i}var t=e.prototype;return t.handler=function(n){var s=_Z[n.type],o=EZ.call(this,n,s);o&&this.callback(this.manager,s,{pointers:o[0],changedPointers:o[1],pointerType:Ba,srcEvent:n})},e}(uo);function EZ(r,e){var t=ia(r.touches),i=this.targetIds;if(e&(Vt|Xn)&&t.length===1)return i[t[0].identifier]=!0,[t,t];var n,s,o=ia(r.changedTouches),a=[],u=this.target;if(s=t.filter(function(l){return F0(l.target,u)}),e===Vt)for(n=0;n-1&&n.splice(a,1)};setTimeout(s,TZ)}}function $Z(r,e){r&Vt?(this.primaryTouch=e.changedPointers[0].identifier,LF.call(this,e)):r&(pt|Jt)&&LF.call(this,e)}function PZ(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=Bi&&o(n.options.event+jF(s))},e.tryEmit=function(i){if(this.canEmit())return this.emit(i);this.state=Br},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&fr||!(this.state&fr)&&this.directionTest(n))},t.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var s=J5(n.direction);s&&(n.additionalEvent=this.options.event+s),r.prototype.emit.call(this,n)},e}(Ms),Q5=function(r){br(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Rr({event:"swipe",threshold:10,velocity:.3,direction:Hr|In,pointers:1},i))||this}var t=e.prototype;return t.getTouchAction=function(){return j0.prototype.getTouchAction.call(this)},t.attrTest=function(n){var s=this.options.direction,o;return s&(Hr|In)?o=n.overallVelocity:s&Hr?o=n.overallVelocityX:s&In&&(o=n.overallVelocityY),r.prototype.attrTest.call(this,n)&&s&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&qn(o)>this.options.velocity&&n.eventType&pt},t.emit=function(n){var s=J5(n.offsetDirection);s&&this.manager.emit(this.options.event+s,n),this.manager.emit(this.options.event,n)},e}(Ms),Z5=function(r){br(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Rr({event:"pinch",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[On]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&fr)},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),eH=function(r){br(e,r);function e(i){return i===void 0&&(i={}),r.call(this,Rr({event:"rotate",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[On]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&fr)},e}(Ms),tH=function(r){br(e,r);function e(i){var n;return i===void 0&&(i={}),n=r.call(this,Rr({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[B5]},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&(pt|Jt)&&!l)this.reset();else if(n.eventType&Vt)this.reset(),this._timer=setTimeout(function(){s.state=di,s.tryEmit()},o.time);else if(n.eventType&pt)return di;return Br},t.reset=function(){clearTimeout(this._timer)},t.emit=function(n){this.state===di&&(n&&n.eventType&pt?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=M0(),this.manager.emit(this.options.event,this._input)))},e}(Ha),rH={domEvents:!1,touchAction:k5,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},zF=[[eH,{enable:!1}],[Z5,{enable:!1},["rotate"]],[Q5,{direction:Hr}],[j0,{direction:Hr},["swipe"]],[bw],[bw,{event:"doubletap",taps:2},["tap"]],[tH]],qZ=1,HF=2;function WF(r,e){var t=r.element;if(t.style){var i;ci(r.options.cssProps,function(n,s){i=Pl(t.style,s),e?(r.oldCssProps[i]=t.style[i],t.style[i]=n):t.style[i]=r.oldCssProps[i]||""}),e||(r.oldCssProps={})}}function AZ(r,e){var t=document.createEvent("Event");t.initEvent(r,!0,!0),t.gesture=e,e.target.dispatchEvent(t)}var UF=function(){function r(t,i){var n=this;this.options=xn({},rH,i||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=RZ(this),this.touchAction=new H5(this,this.options.touchAction),WF(this,!0),ci(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 xn(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?HF:qZ},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&di)&&(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 nH=iH(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 jZ(){const r=zZ();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 HZ(){const r=()=>{};return{on:r,off:r,destroy:r,emit:r,get(){return{set:r}}}}const z0=typeof window<"u"?window.Hammer||sH:function(){return HZ()};function Lr(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=z0(this._dom.overlay);t.on("tap",H(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{t.destroy()});const i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];He(i).call(i,n=>{t.on(n,s=>{s.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=n=>{WZ(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()}}v5(Lr.prototype);Lr.current=null;Lr.prototype.destroy=function(){this.deactivate();for(const t of En(r=ai(e=this._cleanupQueue).call(e,0)).call(r)){var r,e;t()}};Lr.prototype.activate=function(){Lr.current&&Lr.current.deactivate(),Lr.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)};Lr.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")};Lr.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function WZ(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}const UZ=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,VZ=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,KZ=/^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,GZ=/^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 Ci(r){if(r)for(;r.hasChildNodes()===!0;){const e=r.firstChild;e&&(Ci(e),r.removeChild(e))}}function Ss(r){return r instanceof String||typeof r=="string"}function KF(r){return typeof r=="object"&&r!==null}function Dn(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 oH(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")Dn(r,e,i,t);else{const n=r[i],s=e[i];KF(n)&&KF(s)&&oH(n,s,t)}}function lo(r,e,t){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(st(t))throw new TypeError("Arrays are not supported by deepExtend");for(let n=0;n3&&arguments[3]!==void 0?arguments[3]:!1;if(st(t))throw new TypeError("Arrays are not supported by deepExtend");for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&!ki(r).call(r,n))if(t[n]&&t[n].constructor===Object)e[n]===void 0&&(e[n]={}),e[n].constructor===Object?Ge(e[n],t[n]):Dn(e,t,n,i);else if(st(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&&PN(e[s])===Object.prototype)r[s]===void 0?r[s]=Ge({},e[s],t):typeof r[s]=="object"&&r[s]!==null&&PN(r[s])===Object.prototype?Ge(r[s],e[s],t):Dn(r,e,s,i);else if(st(e[s])){var n;r[s]=Fr(n=e[s]).call(n)}else Dn(r,e,s,i);return r}function Nu(r,e){return[...r,e]}function YZ(r){return Fr(r).call(r)}function XZ(r){return r.getBoundingClientRect().left}function JZ(r){return r.getBoundingClientRect().top}function Te(r,e){if(st(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 p in f)if(Object.prototype.hasOwnProperty.call(f,p))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,p,v){s(f[v])||(f[v]={});const _=p[v],m=f[v];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]=Sn(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 eee={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 xi(r,e){let t;st(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 tee[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),Ss(e)===!0){if(lH(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(ZZ(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(uH(e)===!0){const s=H0(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: "+Fa(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=ft({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",ui(()=>{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=ft({},e)),this.color=e;const i=wo(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=wo(this.color.r,this.color.g,this.color.b);t.v=e/100;const i=gu(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=wo(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),ka(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=H(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=H(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=H(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=H(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 z0(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},ft(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new ree(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(st(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),Yt(e)!==void 0&&(this.options.filter=Yt(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);Yt(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=Yt(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||Be(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(Ew("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&&Be(e).call(e,t)!==-1&&(s=Be(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),p=this._makeItem(i,f,u,d);l!==""&&this.popupHistory[p]!==c&&(this.popupHistory[p]=c,this._setupPopup(l,p))}_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=ui(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=ui(()=>{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=Yt(this.options);let o=!1;for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){n=!0;const u=e[a],l=Nu(t,a);if(typeof s=="function"&&(n=s(a,t),n===!1&&!st(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(st(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=Nu(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),o\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 nH=iH(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 zZ(){const r=HZ();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 WZ(){const r=()=>{};return{on:r,off:r,destroy:r,emit:r,get(){return{set:r}}}}const z0=typeof window<"u"?window.Hammer||sH:function(){return WZ()};function Lr(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=z0(this._dom.overlay);t.on("tap",H(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{t.destroy()});const i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];He(i).call(i,n=>{t.on(n,s=>{s.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=n=>{UZ(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()}}v5(Lr.prototype);Lr.current=null;Lr.prototype.destroy=function(){this.deactivate();for(const t of En(r=ai(e=this._cleanupQueue).call(e,0)).call(r)){var r,e;t()}};Lr.prototype.activate=function(){Lr.current&&Lr.current.deactivate(),Lr.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)};Lr.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")};Lr.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function UZ(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}const VZ=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,KZ=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,GZ=/^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,YZ=/^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 Ci(r){if(r)for(;r.hasChildNodes()===!0;){const e=r.firstChild;e&&(Ci(e),r.removeChild(e))}}function Ss(r){return r instanceof String||typeof r=="string"}function KF(r){return typeof r=="object"&&r!==null}function Dn(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 oH(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")Dn(r,e,i,t);else{const n=r[i],s=e[i];KF(n)&&KF(s)&&oH(n,s,t)}}function lo(r,e,t){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(st(t))throw new TypeError("Arrays are not supported by deepExtend");for(let n=0;n3&&arguments[3]!==void 0?arguments[3]:!1;if(st(t))throw new TypeError("Arrays are not supported by deepExtend");for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&!ki(r).call(r,n))if(t[n]&&t[n].constructor===Object)e[n]===void 0&&(e[n]={}),e[n].constructor===Object?Ge(e[n],t[n]):Dn(e,t,n,i);else if(st(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&&PN(e[s])===Object.prototype)r[s]===void 0?r[s]=Ge({},e[s],t):typeof r[s]=="object"&&r[s]!==null&&PN(r[s])===Object.prototype?Ge(r[s],e[s],t):Dn(r,e,s,i);else if(st(e[s])){var n;r[s]=Fr(n=e[s]).call(n)}else Dn(r,e,s,i);return r}function Nu(r,e){return[...r,e]}function XZ(r){return Fr(r).call(r)}function JZ(r){return r.getBoundingClientRect().left}function QZ(r){return r.getBoundingClientRect().top}function Te(r,e){if(st(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 p in f)if(Object.prototype.hasOwnProperty.call(f,p))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,p,v){s(f[v])||(f[v]={});const _=p[v],m=f[v];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]=Sn(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 tee={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 xi(r,e){let t;st(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 ree[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),Ss(e)===!0){if(lH(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(eee(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(uH(e)===!0){const s=H0(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: "+Fa(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=ft({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",ui(()=>{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=ft({},e)),this.color=e;const i=wo(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=wo(this.color.r,this.color.g,this.color.b);t.v=e/100;const i=gu(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=wo(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),ka(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=H(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=H(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=H(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=H(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 z0(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},ft(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new iee(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(st(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),Yt(e)!==void 0&&(this.options.filter=Yt(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);Yt(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=Yt(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||Be(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(Ew("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&&Be(e).call(e,t)!==-1&&(s=Be(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),p=this._makeItem(i,f,u,d);l!==""&&this.popupHistory[p]!==c&&(this.popupHistory[p]=c,this._setupPopup(l,p))}_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=ui(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=ui(()=>{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=Yt(this.options);let o=!1;for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){n=!0;const u=e[a],l=Nu(t,a);if(typeof s=="function"&&(n=s(a,t),n===!1&&!st(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(st(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=Nu(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 "+rt.printLocation(n.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+rt.printLocation(s.path,s.closestMatch,""):n.distance<=o?u='. Did you mean "'+n.closestMatch+'"?'+rt.printLocation(n.path,e):u=". Did you mean one of these: "+rt.print(nt(t))+rt.printLocation(i,e),console.error('%cUnknown option detected: "'+e+'"'+u,Sw),yo=!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=rt.findInOptions(e,t[d],Nu(i,d));s>f.distance&&(o=f.closestMatch,a=f.path,s=f.distance,l=f.indexMatch)}else{var c;Be(c=d.toLowerCase()).call(c,u)!==-1&&(l=d),h=rt.levenshteinDistance(e,d),s>h&&(o=d,a=YZ(i),s=h)}}return{closestMatch:o,path:a,distance:s,indexMatch:l}}static printLocation(e,t){let n=` +`:s.distance<=a&&n.distance>s.distance?u=" in "+rt.printLocation(n.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+rt.printLocation(s.path,s.closestMatch,""):n.distance<=o?u='. Did you mean "'+n.closestMatch+'"?'+rt.printLocation(n.path,e):u=". Did you mean one of these: "+rt.print(nt(t))+rt.printLocation(i,e),console.error('%cUnknown option detected: "'+e+'"'+u,Sw),yo=!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=rt.findInOptions(e,t[d],Nu(i,d));s>f.distance&&(o=f.closestMatch,a=f.path,s=f.distance,l=f.indexMatch)}else{var c;Be(c=d.toLowerCase()).call(c,u)!==-1&&(l=d),h=rt.levenshteinDistance(e,d),s>h&&(o=d,a=XZ(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 = { @@ -103,13 +103,13 @@ Minimum version required to store current data is: `+P+`. `;for(let s=0;s":!0,"--":!0},Di="",Ns=0,Se="",pe="",Gt=Lt.NULL;function dee(){Ns=0,Se=Di.charAt(0)}function wt(){Ns++,Se=Di.charAt(Ns)}function os(){return Di.charAt(Ns+1)}function XF(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 Wi(r,e){if(r||(r={}),e)for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}function hee(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 hH(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=[]),Be(a=u.nodes).call(a,n)===-1&&u.nodes.push(n)}e.attr&&(n.attr=Wi(n.attr,e.attr))}function fee(r,e){if(r.edges||(r.edges=[]),r.edges.push(e),r.edge){var t=Wi({},r.edge);e.attr=Wi(t,e.attr)}}function fH(r,e,t,i,n){var s={from:e,to:t,type:i};return r.edge&&(s.attr=Wi({},r.edge)),s.attr=Wi(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 Ye(){for(Gt=Lt.NULL,pe="";Se===" "||Se===" "||Se===` +`}static print(e){return Fa(e).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}static levenshteinDistance(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;const i=[];let n;for(n=0;n<=t.length;n++)i[n]=[n];let s;for(s=0;s<=e.length;s++)i[0][s]=s;for(n=1;n<=t.length;n++)for(s=1;s<=e.length;s++)t.charAt(n-1)==e.charAt(s-1)?i[n][s]=i[n-1][s-1]:i[n][s]=Math.min(i[n-1][s-1]+1,Math.min(i[n][s-1]+1,i[n-1][s]+1));return i[t.length][e.length]}};const aee=Lr,uee=nee,Os=z0,lee=see,cH=Sw,cee=oee;function dee(r){return Di=r,vee()}var dH={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},W0=Sn(dH);W0.color="color.color";W0.style="dashes";var Lt={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},YF={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},Di="",Ns=0,Se="",pe="",Gt=Lt.NULL;function hee(){Ns=0,Se=Di.charAt(0)}function wt(){Ns++,Se=Di.charAt(Ns)}function os(){return Di.charAt(Ns+1)}function XF(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 Wi(r,e){if(r||(r={}),e)for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}function fee(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 hH(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=[]),Be(a=u.nodes).call(a,n)===-1&&u.nodes.push(n)}e.attr&&(n.attr=Wi(n.attr,e.attr))}function pee(r,e){if(r.edges||(r.edges=[]),r.edges.push(e),r.edge){var t=Wi({},r.edge);e.attr=Wi(t,e.attr)}}function fH(r,e,t,i,n){var s={from:e,to:t,type:i};return r.edge&&(s.attr=Wi({},r.edge)),s.attr=Wi(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 Ye(){for(Gt=Lt.NULL,pe="";Se===" "||Se===" "||Se===` `||Se==="\r";)wt();do{var r=!1;if(Se==="#"){for(var e=Ns-1;Di.charAt(e)===" "||Di.charAt(e)===" ";)e--;if(Di.charAt(e)===` `||Di.charAt(e)===""){for(;Se!=""&&Se!=` `;)wt();r=!0}}if(Se==="/"&&os()==="/"){for(;Se!=""&&Se!=` `;)wt();r=!0}if(Se==="/"&&os()==="*"){for(;Se!="";)if(Se==="*"&&os()==="/"){wt(),wt();break}else wt();r=!0}for(;Se===" "||Se===" "||Se===` `||Se==="\r";)wt()}while(r);if(Se===""){Gt=Lt.DELIMITER;return}var t=Se+os();if(YF[t]){Gt=Lt.DELIMITER,pe=t,wt(),wt();return}if(YF[Se]){Gt=Lt.DELIMITER,pe=Se,wt();return}if(XF(Se)||Se==="-"){for(pe+=Se,wt();XF(Se);)pe+=Se,wt();pe==="false"?pe=!1:pe==="true"?pe=!0:isNaN(Number(pe))||(pe=Number(pe)),Gt=Lt.IDENTIFIER;return}if(Se==='"'){for(wt();Se!=""&&(Se!='"'||Se==='"'&&os()==='"');)Se==='"'?(pe+=Se,wt()):Se==="\\"&&os()==="n"?(pe+=` -`,wt()):pe+=Se,wt();if(Se!='"')throw jt('End of string " expected');wt(),Gt=Lt.IDENTIFIER;return}for(Gt=Lt.UNKNOWN;Se!="";)pe+=Se,wt();throw new SyntaxError('Syntax error in part "'+mH(pe,30)+'"')}function pee(){var r={};if(dee(),Ye(),pe==="strict"&&(r.strict=!0,Ye()),(pe==="graph"||pe==="digraph")&&(r.type=pe,Ye()),Gt===Lt.IDENTIFIER&&(r.id=pe,Ye()),pe!="{")throw jt("Angle bracket { expected");if(Ye(),pH(r),pe!="}")throw jt("Angle bracket } expected");if(Ye(),pe!=="")throw jt("End of file expected");return Ye(),delete r.node,delete r.edge,delete r.graph,r}function pH(r){for(;pe!==""&&pe!="}";)vee(r),pe===";"&&Ye()}function vee(r){var e=vH(r);if(e){gH(r,e);return}var t=gee(r);if(!t){if(Gt!=Lt.IDENTIFIER)throw jt("Identifier expected");var i=pe;if(Ye(),pe==="="){if(Ye(),Gt!=Lt.IDENTIFIER)throw jt("Identifier expected");r[i]=pe,Ye()}else mee(r,i)}}function vH(r){var e=null;if(pe==="subgraph"&&(e={},e.type="subgraph",Ye(),Gt===Lt.IDENTIFIER&&(e.id=pe,Ye())),pe==="{"){if(Ye(),e||(e={}),e.parent=r,e.node=r.node,e.edge=r.edge,e.graph=r.graph,pH(e),pe!="}")throw jt("Angle bracket } expected");Ye(),delete e.node,delete e.edge,delete e.graph,delete e.parent,r.subgraphs||(r.subgraphs=[]),r.subgraphs.push(e)}return e}function gee(r){return pe==="node"?(Ye(),r.node=Mo(),"node"):pe==="edge"?(Ye(),r.edge=Mo(),"edge"):pe==="graph"?(Ye(),r.graph=Mo(),"graph"):null}function mee(r,e){var t={id:e},i=Mo();i&&(t.attr=i),hH(r,t),gH(r,e)}function gH(r,e){for(;pe==="->"||pe==="--";){var t,i=pe;Ye();var n=vH(r);if(n)t=n;else{if(Gt!=Lt.IDENTIFIER)throw jt("Identifier or subgraph expected");t=pe,hH(r,{id:t}),Ye()}var s=Mo(),o=fH(r,e,t,i,s);fee(r,o),e=t}}function Mo(){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;pe==="[";){for(Ye(),e={};pe!==""&&pe!="]";){if(Gt!=Lt.IDENTIFIER)throw jt("Attribute name expected");var o=pe;if(Ye(),pe!="=")throw jt("Equal sign = expected");if(Ye(),Gt!=Lt.IDENTIFIER)throw jt("Attribute value expected");var a=pe;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),Ye(),pe==","&&Ye()}if(pe!="]")throw jt("Bracket ] expected");Ye()}if(ki(s).call(s,"dir")){var l={};for(l.arrows={},r=0;r"&&(a.arrows="to"),a};He(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;He(l=o.from.edges).call(l,function(d){var h=s(d);t.edges.push(h)})}if(yee(a,u,function(d,h){var f=fH(t,d.id,h.id,o.type,o.attr),p=s(f);t.edges.push(p)}),o.to instanceof Object&&o.to.edges){var c;He(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 _ee(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=qs(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:qs(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 wee={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"},Eee={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"},See={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"},Oee={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"},Iee={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"},Tee={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ó"},$ee={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},Pee={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},Ree={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},Cee={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"},xee={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 qee=Object.freeze({__proto__:null,cn:Pee,cs:xee,de:Eee,en:wee,es:See,fr:Cee,it:Oee,nl:Iee,pt:Tee,ru:$ee,uk:Ree});function Aee(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(iQ(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 Dee{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 Mee{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 Dee;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 QF={},ZF={},Pb={exports:{}},Rb,ek;function Nee(){if(ek)return Rb;ek=1;var r=Pe();return Rb=r(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),Rb}var Cb,tk;function Fee(){if(tk)return Cb;tk=1;var r=Pe(),e=Pt(),t=Ur(),i=Nee(),n=Object.isExtensible,s=r(function(){});return Cb=s||i?function(a){return!e(a)||i&&t(a)==="ArrayBuffer"?!1:n?n(a):!0}:n,Cb}var xb,rk;function yH(){if(rk)return xb;rk=1;var r=Pe();return xb=!r(function(){return Object.isExtensible(Object.preventExtensions({}))}),xb}var ik;function xl(){if(ik)return Pb.exports;ik=1;var r=de(),e=xe(),t=qa(),i=Pt(),n=qt(),s=mr().f,o=Il(),a=R0(),u=Fee(),l=yl(),c=yH(),d=!1,h=l("meta"),f=0,p=function(y){s(y,h,{value:{objectID:"O"+f++,weakData:{}}})},v=function(y,I){if(!i(y))return typeof y=="symbol"?y:(typeof y=="string"?"S":"P")+y;if(!n(y,h)){if(!u(y))return"F";if(!I)return"E";p(y)}return y[h].objectID},_=function(y,I){if(!n(y,h)){if(!u(y))return!0;if(!I)return!1;p(y)}return y[h].weakData},m=function(y){return c&&d&&u(y)&&!n(y,h)&&p(y),y},g=function(){E.enable=function(){},d=!0;var y=o.f,I=e([].splice),O={};O[h]=1,y(O).length&&(o.f=function(T){for(var b=y(T),w=0,R=b.length;wb;b++)if(R=q(f[b]),R&&o(h,R))return R;return new d(!1)}O=a(f,T)}for(P=g?f.next:O.next;!(S=e(P,O)).done;){try{R=q(S.value)}catch(F){l(O,"throw",F)}if(typeof R=="object"&&R&&o(h,R))return R}return new d(!1)},Nb}var Fb,lk;function V0(){if(lk)return Fb;lk=1;var r=mt(),e=TypeError;return Fb=function(t,i){if(r(i,t))return t;throw new e("Incorrect invocation")},Fb}var kb,ck;function K0(){if(ck)return kb;ck=1;var r=de(),e=Ze(),t=xl(),i=Pe(),n=eo(),s=ql(),o=V0(),a=$t(),u=Pt(),l=Gs(),c=Gn(),d=mr().f,h=en().forEach,f=lt(),p=Yn(),v=p.set,_=p.getterFor;return kb=function(m,g,E){var y=m.indexOf("Map")!==-1,I=m.indexOf("Weak")!==-1,O=y?"set":"add",T=e[m],b=T&&T.prototype,w={},R;if(!f||!a(T)||!(I||b.forEach&&!i(function(){new T().entries().next()})))R=E.getConstructor(g,m,y,O),t.enable();else{R=g(function($,q){v(o($,P),{type:m,collection:new T}),l(q)||s(q,$[O],{that:$,AS_ENTRIES:y})});var P=R.prototype,S=_(m);h(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function($){var q=$==="add"||$==="set";$ in b&&!(I&&$==="clear")&&n(P,$,function(F,Z){var z=S(this).collection;if(!q&&I&&!u(F))return $==="get"?void 0:!1;var te=z[$](F===0?0:F,Z);return q?this:te})}),I||d(P,"size",{configurable:!0,get:function(){return S(this).collection.size}})}return c(R,m,!1,!0),w[m]=R,r({global:!0,forced:!0},w),I||E.setStrong(R,m,y),R},kb}var Bb,dk;function G0(){if(dk)return Bb;dk=1;var r=Na();return Bb=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},Bb}var Lb,hk;function Lee(){if(hk)return Lb;hk=1;var r=nr(),e=C0(),t=yt(),i=lt(),n=t("species");return Lb=function(s){var o=r(s);i&&o&&!o[n]&&e(o,n,{configurable:!0,get:function(){return this}})},Lb}var jb,fk;function _H(){if(fk)return jb;fk=1;var r=Ma(),e=C0(),t=G0(),i=_l(),n=V0(),s=Gs(),o=ql(),a=q0(),u=A0(),l=Lee(),c=lt(),d=xl().fastKey,h=Yn(),f=h.set,p=h.getterFor;return jb={getConstructor:function(v,_,m,g){var E=v(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,I=p(_),O=function(b,w,R){var P=I(b),S=T(b,w),$,q;return S?S.value=R:(P.last=S={index:q=d(w,!0),key:w,value:R,previous:$=P.last,next:null,removed:!1},P.first||(P.first=S),$&&($.next=S),c?P.size++:b.size++,q!=="F"&&(P.index[q]=S)),b},T=function(b,w){var R=I(b),P=d(w),S;if(P!=="F")return R.index[P];for(S=R.first;S;S=S.next)if(S.key===w)return S};return t(y,{clear:function(){for(var w=this,R=I(w),P=R.first;P;)P.removed=!0,P.previous&&(P.previous=P.previous.next=null),P=P.next;R.first=R.last=null,R.index=r(null),c?R.size=0:w.size=0},delete:function(b){var w=this,R=I(w),P=T(w,b);if(P){var S=P.next,$=P.previous;delete R.index[P.index],P.removed=!0,$&&($.next=S),S&&(S.previous=$),R.first===P&&(R.first=S),R.last===P&&(R.last=$),c?R.size--:w.size--}return!!P},forEach:function(w){for(var R=I(this),P=i(w,arguments.length>1?arguments[1]:void 0),S;S=S?S.next:R.first;)for(P(S.value,S.key,this);S&&S.removed;)S=S.previous},has:function(w){return!!T(this,w)}}),t(y,m?{get:function(w){var R=T(this,w);return R&&R.value},set:function(w,R){return O(this,w===0?0:w,R)}}:{add:function(w){return O(this,w=w===0?0:w,w)}}),c&&e(y,"size",{configurable:!0,get:function(){return I(this).size}}),E},setStrong:function(v,_,m){var g=_+" Iterator",E=p(_),y=p(g);a(v,_,function(I,O){f(this,{type:g,target:I,state:E(I),kind:O,last:null})},function(){for(var I=y(this),O=I.kind,T=I.last;T&&T.removed;)T=T.previous;return!I.target||!(I.last=T=T?T.next:I.state.first)?(I.target=null,u(void 0,!0)):u(O==="keys"?T.key:O==="values"?T.value:[T.key,T.value],!1)},m?"entries":"values",!m,!0),l(_)}},jb}var pk;function jee(){if(pk)return ZF;pk=1;var r=K0(),e=_H();return r("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),ZF}var vk;function zee(){return vk||(vk=1,jee()),QF}var gk={},zb,mk;function wH(){return mk||(mk=1,zb=function(r,e){return e===1?function(t,i){return t[r](i)}:function(t,i,n){return t[r](i,n)}}),zb}var Hb,yk;function Hee(){if(yk)return Hb;yk=1;var r=nr(),e=wH(),t=r("Map");return Hb={Map:t,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:t.prototype},Hb}var bk;function Wee(){if(bk)return gk;bk=1;var r=de(),e=xe(),t=bi(),i=yi(),n=ql(),s=Hee(),o=Qs(),a=Pe(),u=s.Map,l=s.has,c=s.get,d=s.set,h=e([].push),f=o||a(function(){return u.groupBy("ab",function(p){return p}).get("a").length!==1});return r({target:"Map",stat:!0,forced:o||f},{groupBy:function(v,_){i(v),t(_);var m=new u,g=0;return n(v,function(E){var y=_(E,g++);l(m,y)?h(c(m,y),E):d(m,y,[E])}),m}}),gk}var _k={},Wb,wk;function Uee(){if(wk)return Wb;wk=1;var r=xe(),e=to(),t=yr(),i=yi(),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,p,v;return h<0||h>=f?u?"":void 0:(p=s(d,h),p<55296||p>56319||h+1===f||(v=s(d,h+1))<56320||v>57343?u?n(d,h):p:u?o(d,h,h+2):(p-55296<<10)+(v-56320)+65536)}};return Wb={codeAt:a(!1),charAt:a(!0)},Wb}var Ek;function Y0(){if(Ek)return _k;Ek=1;var r=Uee().charAt,e=yr(),t=Yn(),i=q0(),n=A0(),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))}),_k}var Ub,Sk;function Vee(){if(Sk)return Ub;Sk=1,so(),zee(),Wee(),Y0();var r=je();return Ub=r.Map,Ub}var Vb,Ok;function Kee(){if(Ok)return Vb;Ok=1;var r=Vee();return oo(),Vb=r,Vb}var Kb,Ik;function Gee(){return Ik||(Ik=1,Kb=Kee()),Kb}var Yee=Gee(),X0=ge(Yee);class Xee{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},ft(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)&&Be(t).call(t,i)===-1){const n=e[i];this.add(i,n)}}}clear(){this._groups=new X0,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 Tk={},$k;function Jee(){if($k)return Tk;$k=1;var r=de();return r({target:"Number",stat:!0},{isNaN:function(t){return t!==t}}),Tk}var Gb,Pk;function Qee(){if(Pk)return Gb;Pk=1,Jee();var r=je();return Gb=r.Number.isNaN,Gb}var Yb,Rk;function Zee(){if(Rk)return Yb;Rk=1;var r=Qee();return Yb=r,Yb}var Xb,Ck;function ete(){return Ck||(Ck=1,Xb=Zee()),Xb}var tte=ete(),Ow=ge(tte),xk={},Jb,qk;function rte(){if(qk)return Jb;qk=1;var r=Ze(),e=r.isFinite;return Jb=Number.isFinite||function(i){return typeof i=="number"&&e(i)},Jb}var Ak;function ite(){if(Ak)return xk;Ak=1;var r=de(),e=rte();return r({target:"Number",stat:!0},{isFinite:e}),xk}var Qb,Dk;function nte(){if(Dk)return Qb;Dk=1,ite();var r=je();return Qb=r.Number.isFinite,Qb}var Zb,Mk;function ste(){if(Mk)return Zb;Mk=1;var r=nte();return Zb=r,Zb}var e1,Nk;function ote(){return Nk||(Nk=1,e1=ste()),e1}var ate=ote(),mn=ge(ate),Fk={},kk;function ute(){if(kk)return Fk;kk=1;var r=de(),e=en().some,t=ao(),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)}}),Fk}var t1,Bk;function lte(){if(Bk)return t1;Bk=1,ute();var r=At();return t1=r("Array","some"),t1}var r1,Lk;function cte(){if(Lk)return r1;Lk=1;var r=mt(),e=lte(),t=Array.prototype;return r1=function(i){var n=i.some;return i===t||r(t,i)&&n===t.some?e:n},r1}var i1,jk;function dte(){if(jk)return i1;jk=1;var r=cte();return i1=r,i1}var n1,zk;function hte(){return zk||(zk=1,n1=dte()),n1}var fte=hte(),pte=ge(fte),s1={exports:{}},Hk={},Wk;function vte(){if(Wk)return Hk;Wk=1;var r=de(),e=lt(),t=mr().f;return r({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),Hk}var Uk;function gte(){if(Uk)return s1.exports;Uk=1,vte();var r=je(),e=r.Object,t=s1.exports=function(n,s,o){return e.defineProperty(n,s,o)};return e.defineProperty.sham&&(t.sham=!0),s1.exports}var o1,Vk;function EH(){if(Vk)return o1;Vk=1;var r=gte();return o1=r,o1}var a1,Kk;function mte(){if(Kk)return a1;Kk=1;var r=EH();return a1=r,a1}var u1,Gk;function yte(){if(Gk)return u1;Gk=1;var r=mte();return u1=r,u1}var l1,Yk;function bte(){return Yk||(Yk=1,l1=yte()),l1}var _te=bte(),wte=ge(_te),Xk={},Jk;function Ete(){if(Jk)return Xk;Jk=1;var r=yt(),e=mr().f,t=r("metadata"),i=Function.prototype;return i[t]===void 0&&e(i,t,{value:null}),Xk}var Qk={},Zk;function Ste(){return Zk||(Zk=1,O5()),Qk}var e2={},t2;function Ote(){return t2||(t2=1,I5()),e2}var r2={},i2;function Ite(){if(i2)return r2;i2=1;var r=tt();return r("metadata"),r2}var c1,n2;function Tte(){if(n2)return c1;n2=1;var r=C5();return Ete(),Ste(),Ote(),Ite(),c1=r,c1}var s2={},d1,o2;function SH(){if(o2)return d1;o2=1;var r=nr(),e=xe(),t=r("Symbol"),i=t.keyFor,n=e(t.prototype.valueOf);return d1=t.isRegisteredSymbol||function(o){try{return i(n(o))!==void 0}catch{return!1}},d1}var a2;function $te(){if(a2)return s2;a2=1;var r=de(),e=SH();return r({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),s2}var u2={},h1,l2;function OH(){if(l2)return h1;l2=1;for(var r=Zs(),e=nr(),t=xe(),i=xa(),n=yt(),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;)p=l(u,f=c[h++]),p!==void 0&&s(d,f,p);return d}}),nB}var k1,oB;function Ore(){if(oB)return k1;oB=1,Sre();var r=je();return k1=r.Object.getOwnPropertyDescriptors,k1}var B1,aB;function Ire(){if(aB)return B1;aB=1;var r=Ore();return B1=r,B1}var L1,uB;function Tre(){return uB||(uB=1,L1=Ire()),L1}var $re=Tre(),Vi=ge($re),j1={exports:{}},lB={},cB;function Pre(){if(cB)return lB;cB=1;var r=de(),e=lt(),t=P0().f;return r({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),lB}var dB;function Rre(){if(dB)return j1.exports;dB=1,Pre();var r=je(),e=r.Object,t=j1.exports=function(n,s){return e.defineProperties(n,s)};return e.defineProperties.sham&&(t.sham=!0),j1.exports}var z1,hB;function Cre(){if(hB)return z1;hB=1;var r=Rre();return z1=r,z1}var H1,fB;function xre(){return fB||(fB=1,H1=Cre()),H1}var qre=xre(),Al=ge(qre),W1,pB;function Are(){return pB||(pB=1,W1=EH()),W1}var Dre=Are(),Dl=ge(Dre);function J0(r,e){const t=["node","edge","label"];let i=!0;const n=xi(e,"chosen");if(typeof n=="boolean")i=n;else if(typeof n=="object"){if(Be(t).call(t,r)===-1)throw new Error("choosify: subOption '"+r+"' should be one of '"+t.join("', '")+"'");const s=xi(e,["chosen",r]);(typeof s=="boolean"||typeof s=="function")&&(i=s)}return i}function Iw(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 Fu(r){return typeof r=="string"&&r!==""}function TH(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 U1,vB;function Mre(){if(vB)return U1;vB=1,so();var r=At();return U1=r("Array","values"),U1}var V1,gB;function Nre(){if(gB)return V1;gB=1;var r=Mre();return V1=r,V1}var K1,mB;function Fre(){if(mB)return K1;mB=1,oo();var r=io(),e=qt(),t=mt(),i=Nre(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return K1=function(o){var a=o.values;return o===n||t(n,o)&&a===n.values||e(s,r(o))?i:a},K1}var G1,yB;function kre(){return yB||(yB=1,G1=Fre()),G1}var Bre=kre(),$H=ge(Bre);class Lre{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=ft({},$H(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 bB{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=jre[e];n!==void 0?i=n:i=new RegExp(e),t=e.length}return[i,t]}}class zre{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 Lre(s)}process(e){if(!Fu(e))return this.lines.finalize();const t=this.parent.fontOptions;e=e.replace(/\r\n/g,` +`,wt()):pe+=Se,wt();if(Se!='"')throw jt('End of string " expected');wt(),Gt=Lt.IDENTIFIER;return}for(Gt=Lt.UNKNOWN;Se!="";)pe+=Se,wt();throw new SyntaxError('Syntax error in part "'+mH(pe,30)+'"')}function vee(){var r={};if(hee(),Ye(),pe==="strict"&&(r.strict=!0,Ye()),(pe==="graph"||pe==="digraph")&&(r.type=pe,Ye()),Gt===Lt.IDENTIFIER&&(r.id=pe,Ye()),pe!="{")throw jt("Angle bracket { expected");if(Ye(),pH(r),pe!="}")throw jt("Angle bracket } expected");if(Ye(),pe!=="")throw jt("End of file expected");return Ye(),delete r.node,delete r.edge,delete r.graph,r}function pH(r){for(;pe!==""&&pe!="}";)gee(r),pe===";"&&Ye()}function gee(r){var e=vH(r);if(e){gH(r,e);return}var t=mee(r);if(!t){if(Gt!=Lt.IDENTIFIER)throw jt("Identifier expected");var i=pe;if(Ye(),pe==="="){if(Ye(),Gt!=Lt.IDENTIFIER)throw jt("Identifier expected");r[i]=pe,Ye()}else yee(r,i)}}function vH(r){var e=null;if(pe==="subgraph"&&(e={},e.type="subgraph",Ye(),Gt===Lt.IDENTIFIER&&(e.id=pe,Ye())),pe==="{"){if(Ye(),e||(e={}),e.parent=r,e.node=r.node,e.edge=r.edge,e.graph=r.graph,pH(e),pe!="}")throw jt("Angle bracket } expected");Ye(),delete e.node,delete e.edge,delete e.graph,delete e.parent,r.subgraphs||(r.subgraphs=[]),r.subgraphs.push(e)}return e}function mee(r){return pe==="node"?(Ye(),r.node=Mo(),"node"):pe==="edge"?(Ye(),r.edge=Mo(),"edge"):pe==="graph"?(Ye(),r.graph=Mo(),"graph"):null}function yee(r,e){var t={id:e},i=Mo();i&&(t.attr=i),hH(r,t),gH(r,e)}function gH(r,e){for(;pe==="->"||pe==="--";){var t,i=pe;Ye();var n=vH(r);if(n)t=n;else{if(Gt!=Lt.IDENTIFIER)throw jt("Identifier or subgraph expected");t=pe,hH(r,{id:t}),Ye()}var s=Mo(),o=fH(r,e,t,i,s);pee(r,o),e=t}}function Mo(){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;pe==="[";){for(Ye(),e={};pe!==""&&pe!="]";){if(Gt!=Lt.IDENTIFIER)throw jt("Attribute name expected");var o=pe;if(Ye(),pe!="=")throw jt("Equal sign = expected");if(Ye(),Gt!=Lt.IDENTIFIER)throw jt("Attribute value expected");var a=pe;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),Ye(),pe==","&&Ye()}if(pe!="]")throw jt("Bracket ] expected");Ye()}if(ki(s).call(s,"dir")){var l={};for(l.arrows={},r=0;r"&&(a.arrows="to"),a};He(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;He(l=o.from.edges).call(l,function(d){var h=s(d);t.edges.push(h)})}if(bee(a,u,function(d,h){var f=fH(t,d.id,h.id,o.type,o.attr),p=s(f);t.edges.push(p)}),o.to instanceof Object&&o.to.edges){var c;He(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 wee(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=qs(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:qs(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 Eee={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"},See={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"},Oee={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"},Iee={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"},Tee={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"},$ee={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ó"},Pee={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},Ree={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},Cee={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},xee={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"},qee={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 Aee=Object.freeze({__proto__:null,cn:Ree,cs:qee,de:See,en:Eee,es:Oee,fr:xee,it:Iee,nl:Tee,pt:$ee,ru:Pee,uk:Cee});function Dee(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(nQ(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 Mee{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 Nee{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 Mee;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 QF={},ZF={},Pb={exports:{}},Rb,ek;function Fee(){if(ek)return Rb;ek=1;var r=Pe();return Rb=r(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),Rb}var Cb,tk;function kee(){if(tk)return Cb;tk=1;var r=Pe(),e=Pt(),t=Ur(),i=Fee(),n=Object.isExtensible,s=r(function(){});return Cb=s||i?function(a){return!e(a)||i&&t(a)==="ArrayBuffer"?!1:n?n(a):!0}:n,Cb}var xb,rk;function yH(){if(rk)return xb;rk=1;var r=Pe();return xb=!r(function(){return Object.isExtensible(Object.preventExtensions({}))}),xb}var ik;function xl(){if(ik)return Pb.exports;ik=1;var r=de(),e=xe(),t=qa(),i=Pt(),n=qt(),s=mr().f,o=Il(),a=R0(),u=kee(),l=yl(),c=yH(),d=!1,h=l("meta"),f=0,p=function(y){s(y,h,{value:{objectID:"O"+f++,weakData:{}}})},v=function(y,I){if(!i(y))return typeof y=="symbol"?y:(typeof y=="string"?"S":"P")+y;if(!n(y,h)){if(!u(y))return"F";if(!I)return"E";p(y)}return y[h].objectID},_=function(y,I){if(!n(y,h)){if(!u(y))return!0;if(!I)return!1;p(y)}return y[h].weakData},m=function(y){return c&&d&&u(y)&&!n(y,h)&&p(y),y},g=function(){E.enable=function(){},d=!0;var y=o.f,I=e([].splice),O={};O[h]=1,y(O).length&&(o.f=function(T){for(var b=y(T),w=0,R=b.length;wb;b++)if(R=q(f[b]),R&&o(h,R))return R;return new d(!1)}O=a(f,T)}for(P=g?f.next:O.next;!(S=e(P,O)).done;){try{R=q(S.value)}catch(F){l(O,"throw",F)}if(typeof R=="object"&&R&&o(h,R))return R}return new d(!1)},Nb}var Fb,lk;function V0(){if(lk)return Fb;lk=1;var r=mt(),e=TypeError;return Fb=function(t,i){if(r(i,t))return t;throw new e("Incorrect invocation")},Fb}var kb,ck;function K0(){if(ck)return kb;ck=1;var r=de(),e=Ze(),t=xl(),i=Pe(),n=eo(),s=ql(),o=V0(),a=$t(),u=Pt(),l=Gs(),c=Gn(),d=mr().f,h=en().forEach,f=lt(),p=Yn(),v=p.set,_=p.getterFor;return kb=function(m,g,E){var y=m.indexOf("Map")!==-1,I=m.indexOf("Weak")!==-1,O=y?"set":"add",T=e[m],b=T&&T.prototype,w={},R;if(!f||!a(T)||!(I||b.forEach&&!i(function(){new T().entries().next()})))R=E.getConstructor(g,m,y,O),t.enable();else{R=g(function($,q){v(o($,P),{type:m,collection:new T}),l(q)||s(q,$[O],{that:$,AS_ENTRIES:y})});var P=R.prototype,S=_(m);h(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function($){var q=$==="add"||$==="set";$ in b&&!(I&&$==="clear")&&n(P,$,function(F,Z){var z=S(this).collection;if(!q&&I&&!u(F))return $==="get"?void 0:!1;var te=z[$](F===0?0:F,Z);return q?this:te})}),I||d(P,"size",{configurable:!0,get:function(){return S(this).collection.size}})}return c(R,m,!1,!0),w[m]=R,r({global:!0,forced:!0},w),I||E.setStrong(R,m,y),R},kb}var Bb,dk;function G0(){if(dk)return Bb;dk=1;var r=Na();return Bb=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},Bb}var Lb,hk;function jee(){if(hk)return Lb;hk=1;var r=nr(),e=C0(),t=yt(),i=lt(),n=t("species");return Lb=function(s){var o=r(s);i&&o&&!o[n]&&e(o,n,{configurable:!0,get:function(){return this}})},Lb}var jb,fk;function _H(){if(fk)return jb;fk=1;var r=Ma(),e=C0(),t=G0(),i=_l(),n=V0(),s=Gs(),o=ql(),a=q0(),u=A0(),l=jee(),c=lt(),d=xl().fastKey,h=Yn(),f=h.set,p=h.getterFor;return jb={getConstructor:function(v,_,m,g){var E=v(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,I=p(_),O=function(b,w,R){var P=I(b),S=T(b,w),$,q;return S?S.value=R:(P.last=S={index:q=d(w,!0),key:w,value:R,previous:$=P.last,next:null,removed:!1},P.first||(P.first=S),$&&($.next=S),c?P.size++:b.size++,q!=="F"&&(P.index[q]=S)),b},T=function(b,w){var R=I(b),P=d(w),S;if(P!=="F")return R.index[P];for(S=R.first;S;S=S.next)if(S.key===w)return S};return t(y,{clear:function(){for(var w=this,R=I(w),P=R.first;P;)P.removed=!0,P.previous&&(P.previous=P.previous.next=null),P=P.next;R.first=R.last=null,R.index=r(null),c?R.size=0:w.size=0},delete:function(b){var w=this,R=I(w),P=T(w,b);if(P){var S=P.next,$=P.previous;delete R.index[P.index],P.removed=!0,$&&($.next=S),S&&(S.previous=$),R.first===P&&(R.first=S),R.last===P&&(R.last=$),c?R.size--:w.size--}return!!P},forEach:function(w){for(var R=I(this),P=i(w,arguments.length>1?arguments[1]:void 0),S;S=S?S.next:R.first;)for(P(S.value,S.key,this);S&&S.removed;)S=S.previous},has:function(w){return!!T(this,w)}}),t(y,m?{get:function(w){var R=T(this,w);return R&&R.value},set:function(w,R){return O(this,w===0?0:w,R)}}:{add:function(w){return O(this,w=w===0?0:w,w)}}),c&&e(y,"size",{configurable:!0,get:function(){return I(this).size}}),E},setStrong:function(v,_,m){var g=_+" Iterator",E=p(_),y=p(g);a(v,_,function(I,O){f(this,{type:g,target:I,state:E(I),kind:O,last:null})},function(){for(var I=y(this),O=I.kind,T=I.last;T&&T.removed;)T=T.previous;return!I.target||!(I.last=T=T?T.next:I.state.first)?(I.target=null,u(void 0,!0)):u(O==="keys"?T.key:O==="values"?T.value:[T.key,T.value],!1)},m?"entries":"values",!m,!0),l(_)}},jb}var pk;function zee(){if(pk)return ZF;pk=1;var r=K0(),e=_H();return r("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),ZF}var vk;function Hee(){return vk||(vk=1,zee()),QF}var gk={},zb,mk;function wH(){return mk||(mk=1,zb=function(r,e){return e===1?function(t,i){return t[r](i)}:function(t,i,n){return t[r](i,n)}}),zb}var Hb,yk;function Wee(){if(yk)return Hb;yk=1;var r=nr(),e=wH(),t=r("Map");return Hb={Map:t,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:t.prototype},Hb}var bk;function Uee(){if(bk)return gk;bk=1;var r=de(),e=xe(),t=bi(),i=yi(),n=ql(),s=Wee(),o=Qs(),a=Pe(),u=s.Map,l=s.has,c=s.get,d=s.set,h=e([].push),f=o||a(function(){return u.groupBy("ab",function(p){return p}).get("a").length!==1});return r({target:"Map",stat:!0,forced:o||f},{groupBy:function(v,_){i(v),t(_);var m=new u,g=0;return n(v,function(E){var y=_(E,g++);l(m,y)?h(c(m,y),E):d(m,y,[E])}),m}}),gk}var _k={},Wb,wk;function Vee(){if(wk)return Wb;wk=1;var r=xe(),e=to(),t=yr(),i=yi(),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,p,v;return h<0||h>=f?u?"":void 0:(p=s(d,h),p<55296||p>56319||h+1===f||(v=s(d,h+1))<56320||v>57343?u?n(d,h):p:u?o(d,h,h+2):(p-55296<<10)+(v-56320)+65536)}};return Wb={codeAt:a(!1),charAt:a(!0)},Wb}var Ek;function Y0(){if(Ek)return _k;Ek=1;var r=Vee().charAt,e=yr(),t=Yn(),i=q0(),n=A0(),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))}),_k}var Ub,Sk;function Kee(){if(Sk)return Ub;Sk=1,so(),Hee(),Uee(),Y0();var r=je();return Ub=r.Map,Ub}var Vb,Ok;function Gee(){if(Ok)return Vb;Ok=1;var r=Kee();return oo(),Vb=r,Vb}var Kb,Ik;function Yee(){return Ik||(Ik=1,Kb=Gee()),Kb}var Xee=Yee(),X0=ge(Xee);class Jee{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},ft(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)&&Be(t).call(t,i)===-1){const n=e[i];this.add(i,n)}}}clear(){this._groups=new X0,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 Tk={},$k;function Qee(){if($k)return Tk;$k=1;var r=de();return r({target:"Number",stat:!0},{isNaN:function(t){return t!==t}}),Tk}var Gb,Pk;function Zee(){if(Pk)return Gb;Pk=1,Qee();var r=je();return Gb=r.Number.isNaN,Gb}var Yb,Rk;function ete(){if(Rk)return Yb;Rk=1;var r=Zee();return Yb=r,Yb}var Xb,Ck;function tte(){return Ck||(Ck=1,Xb=ete()),Xb}var rte=tte(),Ow=ge(rte),xk={},Jb,qk;function ite(){if(qk)return Jb;qk=1;var r=Ze(),e=r.isFinite;return Jb=Number.isFinite||function(i){return typeof i=="number"&&e(i)},Jb}var Ak;function nte(){if(Ak)return xk;Ak=1;var r=de(),e=ite();return r({target:"Number",stat:!0},{isFinite:e}),xk}var Qb,Dk;function ste(){if(Dk)return Qb;Dk=1,nte();var r=je();return Qb=r.Number.isFinite,Qb}var Zb,Mk;function ote(){if(Mk)return Zb;Mk=1;var r=ste();return Zb=r,Zb}var e1,Nk;function ate(){return Nk||(Nk=1,e1=ote()),e1}var ute=ate(),mn=ge(ute),Fk={},kk;function lte(){if(kk)return Fk;kk=1;var r=de(),e=en().some,t=ao(),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)}}),Fk}var t1,Bk;function cte(){if(Bk)return t1;Bk=1,lte();var r=At();return t1=r("Array","some"),t1}var r1,Lk;function dte(){if(Lk)return r1;Lk=1;var r=mt(),e=cte(),t=Array.prototype;return r1=function(i){var n=i.some;return i===t||r(t,i)&&n===t.some?e:n},r1}var i1,jk;function hte(){if(jk)return i1;jk=1;var r=dte();return i1=r,i1}var n1,zk;function fte(){return zk||(zk=1,n1=hte()),n1}var pte=fte(),vte=ge(pte),s1={exports:{}},Hk={},Wk;function gte(){if(Wk)return Hk;Wk=1;var r=de(),e=lt(),t=mr().f;return r({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),Hk}var Uk;function mte(){if(Uk)return s1.exports;Uk=1,gte();var r=je(),e=r.Object,t=s1.exports=function(n,s,o){return e.defineProperty(n,s,o)};return e.defineProperty.sham&&(t.sham=!0),s1.exports}var o1,Vk;function EH(){if(Vk)return o1;Vk=1;var r=mte();return o1=r,o1}var a1,Kk;function yte(){if(Kk)return a1;Kk=1;var r=EH();return a1=r,a1}var u1,Gk;function bte(){if(Gk)return u1;Gk=1;var r=yte();return u1=r,u1}var l1,Yk;function _te(){return Yk||(Yk=1,l1=bte()),l1}var wte=_te(),Ete=ge(wte),Xk={},Jk;function Ste(){if(Jk)return Xk;Jk=1;var r=yt(),e=mr().f,t=r("metadata"),i=Function.prototype;return i[t]===void 0&&e(i,t,{value:null}),Xk}var Qk={},Zk;function Ote(){return Zk||(Zk=1,O5()),Qk}var e2={},t2;function Ite(){return t2||(t2=1,I5()),e2}var r2={},i2;function Tte(){if(i2)return r2;i2=1;var r=tt();return r("metadata"),r2}var c1,n2;function $te(){if(n2)return c1;n2=1;var r=C5();return Ste(),Ote(),Ite(),Tte(),c1=r,c1}var s2={},d1,o2;function SH(){if(o2)return d1;o2=1;var r=nr(),e=xe(),t=r("Symbol"),i=t.keyFor,n=e(t.prototype.valueOf);return d1=t.isRegisteredSymbol||function(o){try{return i(n(o))!==void 0}catch{return!1}},d1}var a2;function Pte(){if(a2)return s2;a2=1;var r=de(),e=SH();return r({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),s2}var u2={},h1,l2;function OH(){if(l2)return h1;l2=1;for(var r=Zs(),e=nr(),t=xe(),i=xa(),n=yt(),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;)p=l(u,f=c[h++]),p!==void 0&&s(d,f,p);return d}}),nB}var k1,oB;function Ire(){if(oB)return k1;oB=1,Ore();var r=je();return k1=r.Object.getOwnPropertyDescriptors,k1}var B1,aB;function Tre(){if(aB)return B1;aB=1;var r=Ire();return B1=r,B1}var L1,uB;function $re(){return uB||(uB=1,L1=Tre()),L1}var Pre=$re(),Vi=ge(Pre),j1={exports:{}},lB={},cB;function Rre(){if(cB)return lB;cB=1;var r=de(),e=lt(),t=P0().f;return r({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),lB}var dB;function Cre(){if(dB)return j1.exports;dB=1,Rre();var r=je(),e=r.Object,t=j1.exports=function(n,s){return e.defineProperties(n,s)};return e.defineProperties.sham&&(t.sham=!0),j1.exports}var z1,hB;function xre(){if(hB)return z1;hB=1;var r=Cre();return z1=r,z1}var H1,fB;function qre(){return fB||(fB=1,H1=xre()),H1}var Are=qre(),Al=ge(Are),W1,pB;function Dre(){return pB||(pB=1,W1=EH()),W1}var Mre=Dre(),Dl=ge(Mre);function J0(r,e){const t=["node","edge","label"];let i=!0;const n=xi(e,"chosen");if(typeof n=="boolean")i=n;else if(typeof n=="object"){if(Be(t).call(t,r)===-1)throw new Error("choosify: subOption '"+r+"' should be one of '"+t.join("', '")+"'");const s=xi(e,["chosen",r]);(typeof s=="boolean"||typeof s=="function")&&(i=s)}return i}function Iw(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 Fu(r){return typeof r=="string"&&r!==""}function TH(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 U1,vB;function Nre(){if(vB)return U1;vB=1,so();var r=At();return U1=r("Array","values"),U1}var V1,gB;function Fre(){if(gB)return V1;gB=1;var r=Nre();return V1=r,V1}var K1,mB;function kre(){if(mB)return K1;mB=1,oo();var r=io(),e=qt(),t=mt(),i=Fre(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return K1=function(o){var a=o.values;return o===n||t(n,o)&&a===n.values||e(s,r(o))?i:a},K1}var G1,yB;function Bre(){return yB||(yB=1,G1=kre()),G1}var Lre=Bre(),$H=ge(Lre);class jre{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=ft({},$H(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 bB{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=zre[e];n!==void 0?i=n:i=new RegExp(e),t=e.length}return[i,t]}}class Hre{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 jre(s)}process(e){if(!Fu(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 bB(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(Fr(o).call(o,0,a),t),n[0]=Fr(o).call(o,a)}else{let o=s;n[s-1]===" "?s--:n[o]===" "&&o++;const a=Fr(n).call(n,0,s).join("");s==n.length&&i?this.lines.append(a,t):this.lines.newLine(a,t),n=Fr(n).call(n,o)}}}}const bo=["bold","ital","boldital","mono"];class Is{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),Fu(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(Te(bo,t=>{this.fontOptions[t]={}}),Is.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}Te(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=xi(e,"widthConstraint");if(typeof i=="number")t.maxWdt=Number(i),t.minWdt=Number(i);else if(typeof i=="object"){const s=xi(e,["widthConstraint","maximum"]);typeof s=="number"&&(t.maxWdt=Number(s));const o=xi(e,["widthConstraint","minimum"]);typeof o=="number"&&(t.minWdt=Number(o))}const n=xi(e,"heightConstraint");if(typeof n=="number")t.minHgt=Number(n);else if(typeof n=="object"){const s=xi(e,["heightConstraint","minimum"]);typeof s=="number"&&(t.minHgt=Number(s));const o=xi(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),Ge(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=J0("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)||(Be(bo).call(bo,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=lr(n,o),s=lr(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 zre(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),ka(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 Hre=class extends Jn{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),h5(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 Q0 extends Jn{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),I0(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 Wre=class extends Q0{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 Ure extends Q0{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 rn extends Jn{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),aX(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 _B(r,e){var t=nt(r);if(Ui){var i=Ui(r);e&&(i=Yt(i).call(i,function(n){return tn(r,n).enumerable})),t.push.apply(t,i)}return t}function Vre(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 Gre extends Jn{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),f5(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 Yre=class extends rn{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 Xre extends rn{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 wB extends Jn{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),vw(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 Jre extends Jn{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 Qre=class extends Q0{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=lr(h,o.opacity),f=lr(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),ka(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 Zre extends rn{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 eie extends rn{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 tie extends rn{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 rie extends Jn{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 iie=class extends rn{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 nie extends rn{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 EB(r,e){var t=nt(r);if(Ui){var i=Ui(r);e&&(i=Yt(i).call(i,function(n){return tn(r,n).enumerable})),t.push.apply(t,i)}return t}function SB(r){for(var e=1;et[l]!=null);u.push("font"),Mu(u,e,a),e.color=_w(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(Mu(["color","fixed","shadow"],e,t,i),Je.checkMass(t),e.opacity!==void 0&&(Je.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&&(Je.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&&!Je.checkCoordinateOrigin(t.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+t.shapeProperties.coordinateOrigin),ur(e,t,"shadow",n),t.color!==void 0&&t.color!==null){const a=_w(t.color);oH(e.color,a)}else i===!0&&t.color===null&&(e.color=Li(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=Li(n.font)),Je.updateGroupOptions(e,t,s),t.scaling!==void 0&&ur(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=lr(e.borderColor,t),e.color=lr(e.color,t),e.shadowColor=lr(e.shadowColor,t)}return e}updateLabelModule(e){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),Je.updateGroupOptions(this.options,SB(SB({},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 Hre(this.options,this.body,this.labelModule);break;case"circle":this.shape=new Wre(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new Ure(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new Kre(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new Gre(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new Yre(this.options,this.body,this.labelModule);break;case"dot":this.shape=new Xre(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new wB(this.options,this.body,this.labelModule);break;case"icon":this.shape=new Jre(this.options,this.body,this.labelModule);break;case"image":this.shape=new Qre(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new Zre(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new eie(this.options,this.body,this.labelModule);break;case"star":this.shape=new tie(this.options,this.body,this.labelModule);break;case"text":this.shape=new rie(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new iie(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new nie(this.options,this.body,this.labelModule);break;default:this.shape=new wB(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()&&Iw(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),Iw(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.",cH),e.mass=1}}}class sie{constructor(e,t,i,n){var s;if(this.body=e,this.images=t,this.groups=i,this.layoutEngine=n,this.body.functions.createNode=H(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=Li(this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e,t;this.body.emitter.on("refreshNodes",H(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",H(t=this.refresh).call(t,this)),this.body.emitter.on("destroy",()=>{Te(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(Je.parseOptions(this.options,e),e.opacity!==void 0&&(Ow(e.opacity)||!mn(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 nt(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(n5("id",e))this.body.data.nodes=e;else if(st(e))this.body.data.nodes=new Cu,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new Cu;else throw new TypeError("Array or DataSet expected");if(i&&Te(this.nodesListeners,function(n,s){i.off(s,n)}),this.body.nodes={},this.body.data.nodes){const n=this;Te(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]:Je;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;Te(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(st(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 OB={},IB;function oie(){if(IB)return OB;IB=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)}}),OB}var Y1,TB;function aie(){if(TB)return Y1;TB=1,oie();var r=je();return Y1=r.Math.hypot,Y1}var X1,$B;function uie(){if($B)return X1;$B=1;var r=aie();return X1=r,X1}var J1,PB;function lie(){return PB||(PB=1,J1=uie()),J1}var cie=lie(),die=ge(cie);class ut{static transform(e,t){st(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=st(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)p5(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]=Fr(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=TH(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,p=0;this.options.arrowStrikethrough===!0&&(u===-1?p=this.options.endPointOffset.from:u===1&&(p=this.options.endPointOffset.to));let v=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,_)+p,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,++v}while(o<=a&&v1?c=1:c<0&&(c=0);const d=e+c*a,h=t+c*u,f=d-s,p=h-o;return Math.sqrt(f*f+p*p)}getArrowData(e,t,i,n,s,o){let a,u,l,c,d,h,f;const p=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 v=15*h+3*p;if(l!=c){const E=die(l.x-c.x,l.y-c.y),y=v/E;if(t!=="middle")if(this.options.smooth.enabled===!0){const I=this._findBorderPosition(l,e,{via:i}),O=this.getPoint(I.t+y*(t==="from"?1:-1),i);a=Math.atan2(I.y-O.y,I.x-O.x),u=I}else a=Math.atan2(l.y-c.y,l.x-c.x),u=this._findBorderPosition(l,e);else{const I=(d?-y:y)/2,O=this.getPoint(.5+I,i),T=this.getPoint(.5-I,i);a=Math.atan2(O.y-T.y,O.x-T.x),u=this.getPoint(.5,i)}}else{const[E,y,I]=this._getCircleData(e);if(t==="from"){const O=this.options.selfReference.angle,T=this.options.selfReference.angle+Math.PI,b=this._findBorderPositionCircle(this.from,e,{x:E,y,low:O,high:T,direction:-1});a=b.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,u=b}else if(t==="to"){const O=this.options.selfReference.angle,T=this.options.selfReference.angle+Math.PI,b=this._findBorderPositionCircle(this.from,e,{x:E,y,low:O,high:T,direction:1});a=b.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,u=b}else{const O=this.options.selfReference.angle/(2*Math.PI);u=this._pointOnCircle(E,y,I,O),a=O*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}const _=u.x-v*.9*Math.cos(a),m=u.y-v*.9*Math.sin(a);return{point:u,core:{x:_,y:m},angle:a,length:v,type:f}}drawArrowHead(e,t,i,n,s){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width,PH.draw(e,s)&&(this.enableShadow(e,t),ka(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=st(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 xB(r,e){var t=nt(r);if(Ui){var i=Ui(r);e&&(i=Yt(i).call(i,function(n){return tn(r,n).enumerable})),t.push.apply(t,i)}return t}function qB(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 p=Math.atan2(l.y-c.y,l.x-c.x),v=l.distanceToBorder(t,p)+h,_=Math.sqrt(Math.pow(c.x-l.x,2)+Math.pow(c.y-l.y,2)),m=v-_;if(Math.abs(m)0&&(l=this._getDistanceToLine(p,v,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 DB extends Z0{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 Oie extends Z0{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 p=.1*f;h[0]=Math.pow(1-p,3),h[1]=3*p*Math.pow(1-p,2),h[2]=3*Math.pow(p,2)*(1-p),h[3]=Math.pow(p,3);const v=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,v,_,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 NB extends RH{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 ji{constructor(e,t,i,n,s){if(t===void 0)throw new Error("No body provided");this.options=Li(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 Is(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;ji.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=IH(e.value));const i=[e,this.options,this.defaultOptions];return this.chooser=J0("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(lo(["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&&(mn(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&&(mn(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"))),Fu(t.label)?e.label=t.label:Fu(e.label)||(e.label=void 0),ur(e,t,"smooth",n),ur(e,t,"shadow",n),ur(e,t,"background",n),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:i===!0&&t.dashes===null&&(e.dashes=Sn(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),ur(e.scaling,t.scaling,"label",n.scaling)):i===!0&&t.scaling===null&&(e.scaling=Sn(n.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows=="string"){const a=t.arrows.toLowerCase();e.arrows.to.enabled=Be(a).call(a,"to")!=-1,e.arrows.middle.enabled=Be(a).call(a,"middle")!=-1,e.arrows.from.enabled=Be(a).call(a,"from")!=-1}else if(typeof t.arrows=="object")ur(e.arrows,t.arrows,"to",n.arrows),ur(e.arrows,t.arrows,"middle",n.arrows),ur(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:"+Fa(t.arrows));else i===!0&&t.arrows===null&&(e.arrows=Sn(n.arrows));if(t.color!==void 0&&t.color!==null){const a=Ss(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,u=e.color;if(s)Ge(u,n.color,!1,i);else for(const l in u)Object.prototype.hasOwnProperty.call(u,l)&&delete u[l];if(Ss(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=Li(n.color));i===!0&&t.font===null&&(e.font=Li(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 AB&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof MB&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof DB&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof NB&&e.type.enabled===!1)&&(i=!1),i===!0&&(t=this.cleanup())),i===!0?e.enabled===!0?e.type==="dynamic"?(t=!0,this.edgeType=new AB(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new MB(this.options,this.body,this.labelModule):this.edgeType=new DB(this.options,this.body,this.labelModule):this.edgeType=new NB(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=TH(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();Iw(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 Iie{constructor(e,t,i){var n;this.body=e,this.images=t,this.groups=i,this.body.functions.createEdge=H(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},Ge(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",H(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",H(i=this.refresh).call(i,this)),this.body.emitter.on("destroy",()=>{Te(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){ji.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(n5("id",e))this.body.data.edges=e;else if(st(e))this.body.data.edges=new Cu,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new Cu;else throw new TypeError("Array or DataSet expected");if(i&&Te(this.edgesListeners,(n,s)=>{i.off(s,n)}),this.body.edges={},this.body.data.edges){Te(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;Te(e,n=>{const s=i[n];s!==void 0&&s.remove()}),t&&this.body.emitter.emit("_dataChanged")}refresh(){Te(this.body.edges,(e,t)=>{const i=this.body.data.edges.get(t);i!==void 0&&e.setOptions(i)})}create(e){return new ji(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=[];Te(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=[];He(e).call(e,(n,s)=>{t[s]===void 0&&i.push(s)}),this.add(i,!0)}}class CH{constructor(e,t,i){this.body=e,this.physicsBody=t,this.barnesHutTree,this.setOptions(i),this._rng=Cl("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),p=.5*(o+u),v={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:f-h,maxX:f+h,minY:p-h,maxY:p+h},size:d,calcSize:1/d,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(v.root);for(let _=0;_0&&this._placeInTree(v.root,i);return v}_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 Tie{constructor(e,t,i){this._rng=Cl("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,p=4/3;for(let v=0;v0){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 xie{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}},ft(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,Mu(["stabilization"],this.options,e),ur(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"||Ow(t.x))&&(t.x=0),(typeof t.y!="number"||Ow(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 Rie(this.body,this.physicsBody,e),this.edgesSolver=new Q1(this.body,this.physicsBody,e),this.gravitySolver=new Cie(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new Tie(this.body,this.physicsBody,e),this.edgesSolver=new Q1(this.body,this.physicsBody,e),this.gravitySolver=new mu(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new $ie(this.body,this.physicsBody,e),this.edgesSolver=new Pie(this.body,this.physicsBody,e),this.gravitySolver=new mu(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new CH(this.body,this.physicsBody,e),this.edgesSolver=new Q1(this.body,this.physicsBody,e),this.gravitySolver=new mu(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=H(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=xu();this.physicsTick(),(xu()-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)&&ui(()=>{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,ui(()=>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");Z1=crypto.getRandomValues.bind(crypto)}return Z1(Aie)}const Mie=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var FB={randomUUID:Mie};function Nie(r,e,t){var n;r=r||{};const i=r.random??((n=r.rng)==null?void 0:n.call(r))??Die();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,qie(i)}function No(r,e,t){return FB.randomUUID&&!r?FB.randomUUID():Nie(r)}class Ht{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]}),Te(t.containedNodes,(i,n)=>{this.containedNodes[n]=i}),t.containedNodes={},Te(t.containedEdges,(i,n)=>{this.containedEdges[n]=i}),t.containedEdges={},Te(t.edges,i=>{Te(this.edges,n=>{var s,o;const a=Be(s=n.clusteringEdgeReplacingIds).call(s,i.id);a!==-1&&(Te(i.clusteringEdgeReplacingIds,u=>{n.clusteringEdgeReplacingIds.push(u),this.body.edges[u].edgeReplacedById=n.id}),ai(o=n.clusteringEdgeReplacingIds).call(o,a,1))})}),t.edges=[]}}class kie{constructor(e){this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},ft(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={};Te(this.body.nodes,(s,o)=>{s.options&&e.joinCondition(s.options)===!0&&(i[o]=s,Te(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&&nt(d).length>0&&v===!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=Ht.cloneOptions(s);o[u]=s;for(let d=0;d-1&&(a[p.id]=p)}}this._cluster(o,a,t,n)}_createClusterEdges(e,t,i,n){let s,o,a,u,l,c;const d=nt(e),h=[];for(let v=0;v0&&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=Be(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 p=this.body.nodes[f];c[f]={x:p.x,y:p.y}}const h=t.releaseFunction(d,c);for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)){const p=this.body.nodes[f];h[f]!==void 0&&(p.x=h[f].x===void 0?n.x:h[f].x,p.y=h[f].y===void 0?n.y:h[f].y)}}else Te(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=Ht.cloneOptions(i,"edge");Ge(o,n),o.from=e,o.to=t,o.id="clusterEdge:"+No(),s!==void 0&&Ge(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 ji){const s=t,o={};o[s.id]=s,t=o}if(e instanceof Je){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 Te(e,n=>{t(n)&&i.push(n)}),i}_updateState(){let e;const t=[],i={},n=u=>{Te(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){Te(u.containedEdges,(l,c)=>{!l.endPointsValid()&&!i[c]&&(i[c]=c)})}),Te(this.body.edges,(u,l)=>{let c=!0;const d=u.clusteringEdgeReplacingIds;if(d!==void 0){let h=0;Te(d,f=>{const p=this.body.edges[f];p!==void 0&&p.endPointsValid()&&(h+=1)}),c=h>0}(!u.endPointsValid()||!c)&&(i[l]=l)}),n(u=>{Te(i,l=>{delete u.containedEdges[l],Te(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})})}),Te(i,u=>{delete this.clusteredEdges[u]}),Te(i,u=>{delete this.body.edges[u]});const s=nt(this.body.edges);Te(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=nt(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 Bie{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},ft(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=ui(()=>{var t;this.zooming=!1,H(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",H(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&&lo(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"],this.options,e)}_startRendering(){if(this.renderingActive===!0&&this.requestAnimationFrameRequestId===void 0){var e;this.requestAnimationFrameRequestId=window.requestAnimationFrame(H(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:-u,y:-u}),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",H(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&&lo(["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=Hie(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(()=>{clearInterval(n)})}const i=H(t=this._onResize).call(t,this);window.addEventListener("resize",i),this._cleanupCallbacks.push(()=>{window.removeEventListener("resize",i)})}}_cleanUp(){var e,t,i;He(e=En(t=ai(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(Be(e).call(e,"%")!==-1||Be(e).call(e,"px")!==-1)return e;if(Be(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 Os(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:Os.DIRECTION_ALL}),ku(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 Os(this.frame),xH(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 Uie(r,e){const t=ft({nodes:e,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},r??{});if(!st(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 Vie{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",H(i=this.fit).call(i,this)),this.body.emitter.on("animationFinished",()=>{this.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",H(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=Uie(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=Ht.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=Ht.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=Ht.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,!mn(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,!mn(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,!mn(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,!mn(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=H(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=H(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=eee[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=H(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 LB(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]=H(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=LB({container:window,preventDefault:!0}):this.keycharm=LB({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,p,v,_,m,g,E,y,I,O,T,b;H(e=this.keycharm).call(e,"up",()=>{this.bindToRedraw("_moveUp")},"keydown"),H(t=this.keycharm).call(t,"down",()=>{this.bindToRedraw("_moveDown")},"keydown"),H(i=this.keycharm).call(i,"left",()=>{this.bindToRedraw("_moveLeft")},"keydown"),H(n=this.keycharm).call(n,"right",()=>{this.bindToRedraw("_moveRight")},"keydown"),H(s=this.keycharm).call(s,"=",()=>{this.bindToRedraw("_zoomIn")},"keydown"),H(o=this.keycharm).call(o,"num+",()=>{this.bindToRedraw("_zoomIn")},"keydown"),H(a=this.keycharm).call(a,"num-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),H(u=this.keycharm).call(u,"-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),H(l=this.keycharm).call(l,"[",()=>{this.bindToRedraw("_zoomOut")},"keydown"),H(c=this.keycharm).call(c,"]",()=>{this.bindToRedraw("_zoomIn")},"keydown"),H(d=this.keycharm).call(d,"pageup",()=>{this.bindToRedraw("_zoomIn")},"keydown"),H(h=this.keycharm).call(h,"pagedown",()=>{this.bindToRedraw("_zoomOut")},"keydown"),H(f=this.keycharm).call(f,"up",()=>{this.unbindFromRedraw("_moveUp")},"keyup"),H(p=this.keycharm).call(p,"down",()=>{this.unbindFromRedraw("_moveDown")},"keyup"),H(v=this.keycharm).call(v,"left",()=>{this.unbindFromRedraw("_moveLeft")},"keyup"),H(_=this.keycharm).call(_,"right",()=>{this.unbindFromRedraw("_moveRight")},"keyup"),H(m=this.keycharm).call(m,"=",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),H(g=this.keycharm).call(g,"num+",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),H(E=this.keycharm).call(E,"num-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),H(y=this.keycharm).call(y,"-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),H(I=this.keycharm).call(I,"[",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),H(O=this.keycharm).call(O,"]",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),H(T=this.keycharm).call(T,"pageup",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),H(b=this.keycharm).call(b,"pagedown",()=>{this.unbindFromRedraw("_zoomOut")},"keyup")}}}class Gie{constructor(e,t,i){var n,s,o,a,u,l,c,d,h,f,p,v,_;this.body=e,this.canvas=t,this.selectionHandler=i,this.navigationHandler=new Kie(e,t),this.body.eventListeners.onTap=H(n=this.onTap).call(n,this),this.body.eventListeners.onTouch=H(s=this.onTouch).call(s,this),this.body.eventListeners.onDoubleTap=H(o=this.onDoubleTap).call(o,this),this.body.eventListeners.onHold=H(a=this.onHold).call(a,this),this.body.eventListeners.onDragStart=H(u=this.onDragStart).call(u,this),this.body.eventListeners.onDrag=H(l=this.onDrag).call(l,this),this.body.eventListeners.onDragEnd=H(c=this.onDragEnd).call(c,this),this.body.eventListeners.onMouseWheel=H(d=this.onMouseWheel).call(d,this),this.body.eventListeners.onPinch=H(h=this.onPinch).call(h,this),this.body.eventListeners.onMouseMove=H(f=this.onMouseMove).call(f,this),this.body.eventListeners.onRelease=H(p=this.onRelease).call(p,this),this.body.eventListeners.onContext=H(v=this.onContext).call(v,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=H(_=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},ft(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&&(Mu(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"],this.options,e),ur(this.options,e,"keyboard"),e.tooltip&&(ft(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=_w(e.tooltip.color)))),this.navigationHandler.setOptions(this.options)}getPointer(e){return{x:e.x-XZ(this.canvas.frame.canvas),y:e.y-JZ(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=Yt(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});He(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?(He(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 uee(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 jB={},zB={},HB;function Yie(){if(HB)return zB;HB=1;var r=K0(),e=_H();return r("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),zB}var WB;function Xie(){return WB||(WB=1,Yie()),jB}var UB={},r_,VB;function Qn(){if(VB)return r_;VB=1;var r=Js(),e=TypeError;return r_=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")},r_}var i_,KB;function Zn(){if(KB)return i_;KB=1;var r=nr(),e=wH(),t=r("Set"),i=t.prototype;return i_={Set:t,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:i},i_}var n_,GB;function es(){if(GB)return n_;GB=1;var r=er();return n_=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},n_}var s_,YB;function Wa(){if(YB)return s_;YB=1;var r=es();return s_=function(e,t,i){return i?r(e.keys(),t,!0):e.forEach(t)},s_}var o_,XB;function eE(){if(XB)return o_;XB=1;var r=Zn(),e=Wa(),t=r.Set,i=r.add;return o_=function(n){var s=new t;return e(n,function(o){i(s,o)}),s},o_}var a_,JB;function Ua(){return JB||(JB=1,a_=function(r){return r.size}),a_}var u_,QB;function Jie(){return QB||(QB=1,u_=function(r){return{iterator:r,next:r.next,done:!1}}),u_}var l_,ZB;function ts(){if(ZB)return l_;ZB=1;var r=bi(),e=Vr(),t=er(),i=to(),n=Jie(),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)}},l_=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)},l_}var c_,eL;function Qie(){if(eL)return c_;eL=1;var r=Qn(),e=Zn(),t=eE(),i=Ua(),n=ts(),s=Wa(),o=es(),a=e.has,u=e.remove;return c_=function(c){var d=r(this),h=n(c),f=t(d);return i(d)<=h.size?s(d,function(p){h.includes(p)&&u(f,p)}):o(h.getIterator(),function(p){a(f,p)&&u(f,p)}),f},c_}var d_,tL;function rs(){return tL||(tL=1,d_=function(){return!1}),d_}var rL;function Zie(){if(rL)return UB;rL=1;var r=de(),e=Qie(),t=Pe(),i=rs(),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}),UB}var iL={},h_,nL;function ene(){if(nL)return h_;nL=1;var r=Qn(),e=Zn(),t=Ua(),i=ts(),n=Wa(),s=es(),o=e.Set,a=e.add,u=e.has;return h_=function(c){var d=r(this),h=i(c),f=new o;return t(d)>h.size?s(h.getIterator(),function(p){u(d,p)&&a(f,p)}):n(d,function(p){h.includes(p)&&a(f,p)}),f},h_}var sL;function tne(){if(sL)return iL;sL=1;var r=de(),e=Pe(),t=ene(),i=rs(),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}),iL}var oL={},f_,aL;function rne(){if(aL)return f_;aL=1;var r=Qn(),e=Zn().has,t=Ua(),i=ts(),n=Wa(),s=es(),o=U0();return f_=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},f_}var uL;function ine(){if(uL)return oL;uL=1;var r=de(),e=rne(),t=rs(),i=!t("isDisjointFrom",function(n){return!n});return r({target:"Set",proto:!0,real:!0,forced:i},{isDisjointFrom:e}),oL}var lL={},p_,cL;function nne(){if(cL)return p_;cL=1;var r=Qn(),e=Ua(),t=Wa(),i=ts();return p_=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},p_}var dL;function sne(){if(dL)return lL;dL=1;var r=de(),e=nne(),t=rs(),i=!t("isSubsetOf",function(n){return n});return r({target:"Set",proto:!0,real:!0,forced:i},{isSubsetOf:e}),lL}var hL={},v_,fL;function one(){if(fL)return v_;fL=1;var r=Qn(),e=Zn().has,t=Ua(),i=ts(),n=es(),s=U0();return v_=function(a){var u=r(this),l=i(a);if(t(u)0&&arguments[0]!==void 0?arguments[0]:()=>{};Fo(this,un,new DL),Fo(this,ln,new DL),Fo(this,T_,void 0),Tw(T_,this,e)}get sizeNodes(){return Ke(un,this).size}get sizeEdges(){return Ke(ln,this).size}getNodes(){return Ke(un,this).getSelection()}getEdges(){return Ke(ln,this).getSelection()}addNodes(){Ke(un,this).add(...arguments)}addEdges(){Ke(ln,this).add(...arguments)}deleteNodes(e){Ke(un,this).delete(e)}deleteEdges(e){Ke(ln,this).delete(e)}clear(){Ke(un,this).clear(),Ke(ln,this).clear()}commit(){const e={nodes:Ke(un,this).commit(),edges:Ke(ln,this).commit()};for(var t=arguments.length,i=new Array(t),n=0;n{this.updateSelection()})}setOptions(e){e!==void 0&&lo(["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 Je?(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 qs(e=this._selectionAccumulator.getNodes()).call(e,t=>t.id)}getSelectedEdgeIds(){var e;return qs(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 ML={},$_,NL;function Tne(){if(NL)return $_;NL=1;var r=ro(),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,p=0,v=0;p3)){if(d)return!0;if(f)return f<603;var T="",b,w,R,P;for(b=65;b<76;b++){switch(w=String.fromCharCode(b),b){case 66:case 69:case 70:case 72:R=3;break;case 68:case 71:R=4;break;default:R=2}for(P=0;P<47;P++)p.push({k:w+P,v:R})}for(p.sort(function(S,$){return $.v-S.v}),P=0;Po(w)?1:-1}};return r({target:"Array",proto:!0,forced:I},{sort:function(b){b!==void 0&&t(b);var w=i(this);if(y)return b===void 0?v(w):v(w,b);var R=[],P=n(w),S,$;for($=0;$=0:p>v;v+=_)v in f&&(d=l(d,f[v],v,h));return d}};return M_={left:o(!1),right:o(!0)},M_}var N_,KL;function Fne(){if(KL)return N_;KL=1;var r=A5();return N_=r==="NODE",N_}var GL;function kne(){if(GL)return UL;GL=1;var r=de(),e=Nne().left,t=ao(),i=Ca(),n=Fne(),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)}}),UL}var F_,YL;function Bne(){if(YL)return F_;YL=1,kne();var r=At();return F_=r("Array","reduce"),F_}var k_,XL;function Lne(){if(XL)return k_;XL=1;var r=mt(),e=Bne(),t=Array.prototype;return k_=function(i){var n=i.reduce;return i===t||r(t,i)&&n===t.reduce?e:n},k_}var B_,JL;function jne(){if(JL)return B_;JL=1;var r=Lne();return B_=r,B_}var L_,QL;function zne(){return QL||(QL=1,L_=jne()),L_}var Hne=zne(),DH=ge(Hne);class MH{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 Wne extends MH{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){Ts(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 Une extends MH{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){Ts(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 ZL={},ej;function Vne(){if(ej)return ZL;ej=1;var r=de(),e=en().every,t=ao(),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)}}),ZL}var j_,tj;function Kne(){if(tj)return j_;tj=1,Vne();var r=At();return j_=r("Array","every"),j_}var z_,rj;function Gne(){if(rj)return z_;rj=1;var r=mt(),e=Kne(),t=Array.prototype;return z_=function(i){var n=i.every;return i===t||r(t,i)&&n===t.every?e:n},z_}var H_,ij;function Yne(){if(ij)return H_;ij=1;var r=Gne();return H_=r,H_}var W_,nj;function Xne(){return nj||(nj=1,W_=Yne()),W_}var Jne=Xne(),NH=ge(Jne);function Qne(r,e){const t=new Ai;return He(r).call(r,i=>{var n;He(n=i.edges).call(n,s=>{s.connected&&t.add(s)})}),He(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 Zne(r){return FH(e=>{var t,i;return NH(t=Yt(i=e.edges).call(i,n=>r.has(n.toId))).call(t,n=>n.to===e)},(e,t)=>t>e,"from",r)}function ese(r){return FH(e=>{var t,i;return NH(t=Yt(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 p=0,v;for(;v=f.pop();){var l,c;if(!i.has(d))continue;const _=s[v.id]+u;if(He(l=Yt(c=v.edges).call(c,m=>m.connected&&m.to!==m.from&&m[t]!==v&&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]))}),p>o)return Qne(i,s);++p}}return s}class tse{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(lo(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),ur(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"),Ge(t,this.optionsBackup)}return t}_resetRNG(e){this.initialRandomSeed=e,this._rng=Cl(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 tse;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,I=1e9,O=-1e9;for(const T in m)if(Object.prototype.hasOwnProperty.call(m,T)){const b=e.body.nodes[T],w=e.hierarchical.levels[b.id],R=e.direction.getPosition(b),[P,S]=e._getSpaceAroundNode(b,m);E=Math.min(P,E),y=Math.min(S,y),w<=g&&(I=Math.min(R,I),O=Math.max(R,O))}return[I,O,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 I=0;I1)for(let b=0;b2&&arguments[2]!==void 0?arguments[2]:!1;const y=e.direction.getPosition(m),I=e.direction.getPosition(g),O=Math.abs(I-y),T=e.options.hierarchical.nodeSpacing;if(O>T){const b={},w={};a(m,b),a(g,w);const R=l(m,g),P=u(b,R),S=u(w,R),$=P[1],q=S[0],F=S[2];if(Math.abs($-q)>T){let z=$-q+T;z<-F+T&&(z=-F+T),z<0&&(e._shiftBlock(g.id,z),t=!0,E===!0&&e._centerParent(g))}}},h=(m,g)=>{const E=g.id,y=g.edges,I=this.hierarchical.levels[g.id],O=this.options.hierarchical.levelSeparation*this.options.hierarchical.levelSeparation,T={},b=[];for(let F=0;F{let z=0;for(let te=0;te{let z=0;for(let te=0;te{let z=this.direction.getPosition(g);const te={};for(let ve=0;ve{const Z=this.direction.getPosition(g);if(i[g.id]===void 0){const me={};a(g,me),i[g.id]=me}const z=u(i[g.id]),te=z[2],ve=z[3],we=F-Z;let re=0;we>0?re=Math.min(we,ve-this.options.hierarchical.nodeSpacing):we<0&&(re=-Math.min(-we,te-this.options.hierarchical.nodeSpacing)),re!=0&&(this._shiftBlock(g.id,re),t=!0)},$=F=>{const Z=this.direction.getPosition(g),[z,te]=this._getSpaceAroundNode(g),ve=F-Z;let we=Z;ve>0?we=Math.min(Z+(te-this.options.hierarchical.nodeSpacing),F):ve<0&&(we=Math.max(Z-(z-this.options.hierarchical.nodeSpacing),F)),we!==Z&&(this.direction.setPosition(g,we),t=!0)};let q=P(m,b);S(q),q=P(m,y),$(q)},f=m=>{let g=this.hierarchical.getLevels();g=En(g).call(g);for(let E=0;E{let g=this.hierarchical.getLevels();g=En(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=En(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;Be(n=this.body.edgeIndices).call(n,i.id)!==-1&&t.push(i)}),t}_getHubSizes(){const e={},t=this.body.nodeIndices;Te(t,n=>{const s=this.body.nodes[n],o=this._getActiveEdges(s).length;e[o]=!0});const i=[];return Te(e,n=>{i.push(Number(n))}),Ts(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(Ht.cloneOptions(n,"node"),Ht.cloneOptions(s,"node"),Ht.cloneOptions(o,"edge"));this.hierarchical.levels[s.id]=a+u};this._crawlNetwork(i),this.hierarchical.setMinLevelToZero()}_determineLevelsDirected(){var e;const t=DH(e=this.body.nodeIndices).call(e,(i,n)=>(i.set(n,this.body.nodes[n]),i),new X0);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=ese(t):this.hierarchical.levels=Zne(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",H(s=this._restore).call(s,this)),this.body.emitter.on("_resetData",H(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,Ge(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,H(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",H(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,H(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent("click",H(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=Ge({},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,H(o=this.toggleEditMode).call(o,this))}this._temporaryBindUI("onTouch",H(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",H(t=this._finishConnect).call(t,this)),this._temporaryBindUI("onDrag",H(i=this._dragControlNode).call(i,this)),this._temporaryBindUI("onRelease",H(n=this._finishConnect).call(n,this)),this._temporaryBindUI("onDragStart",H(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,H(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",H(t=this._controlNodeTouch).call(t,this)),this._temporaryBindUI("onTap",()=>{}),this._temporaryBindUI("onHold",()=>{}),this._temporaryBindUI("onDragStart",H(i=this._controlNodeDragStart).call(i,this)),this._temporaryBindUI("onDrag",H(n=this._controlNodeDrag).call(n,this)),this._temporaryBindUI("onDragEnd",H(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=Ge({},this.options.controlNodeStyle);i.id="targetNode"+No(),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={},Ci(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,H(e=this.toggleEditMode).call(e,this))}_clean(){this.inMode=!1,this.guiEnabled===!0&&(Ci(this.editModeDiv),Ci(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}_cleanupDOMEventListeners(){for(const t of ai(e=this._domEventListenerCleanupQueue).call(e,0)){var e;t()}}_removeManipulationDOM(){this._clean(),Ci(this.manipulationDiv),Ci(this.editModeDiv),Ci(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,H(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,H(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,H(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,H(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,H(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,H(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: "+Fa(nt(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=ft({},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"+No(),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(Be(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(Be(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:No(),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 Y="string",j="boolean",M="number",Eo="array",le="object",kH="dom",nse="any",U_=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],V_={borderWidth:{number:M},borderWidthSelected:{number:M,undefined:"undefined"},brokenImage:{string:Y,undefined:"undefined"},chosen:{label:{boolean:j,function:"function"},node:{boolean:j,function:"function"},__type__:{object:le,boolean:j}},color:{border:{string:Y},background:{string:Y},highlight:{border:{string:Y},background:{string:Y},__type__:{object:le,string:Y}},hover:{border:{string:Y},background:{string:Y},__type__:{object:le,string:Y}},__type__:{object:le,string:Y}},opacity:{number:M,undefined:"undefined"},fixed:{x:{boolean:j},y:{boolean:j},__type__:{object:le,boolean:j}},font:{align:{string:Y},color:{string:Y},size:{number:M},face:{string:Y},background:{string:Y},strokeWidth:{number:M},strokeColor:{string:Y},vadjust:{number:M},multi:{boolean:j,string:Y},bold:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},boldital:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},ital:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},mono:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},__type__:{object:le,string:Y}},group:{string:Y,number:M,undefined:"undefined"},heightConstraint:{minimum:{number:M},valign:{string:Y},__type__:{object:le,boolean:j,number:M}},hidden:{boolean:j},icon:{face:{string:Y},code:{string:Y},size:{number:M},color:{string:Y},weight:{string:Y,number:M},__type__:{object:le}},id:{string:Y,number:M},image:{selected:{string:Y,undefined:"undefined"},unselected:{string:Y,undefined:"undefined"},__type__:{object:le,string:Y}},imagePadding:{top:{number:M},right:{number:M},bottom:{number:M},left:{number:M},__type__:{object:le,number:M}},label:{string:Y,undefined:"undefined"},labelHighlightBold:{boolean:j},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:j},scaling:{min:{number:M},max:{number:M},label:{enabled:{boolean:j},min:{number:M},max:{number:M},maxVisible:{number:M},drawThreshold:{number:M},__type__:{object:le,boolean:j}},customScalingFunction:{function:"function"},__type__:{object:le}},shadow:{enabled:{boolean:j},color:{string:Y},size:{number:M},x:{number:M},y:{number:M},__type__:{object:le,boolean:j}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:j,array:Eo},borderRadius:{number:M},interpolation:{boolean:j},useImageSize:{boolean:j},useBorderWithImage:{boolean:j},coordinateOrigin:{string:["center","top-left"]},__type__:{object:le}},size:{number:M},title:{string:Y,dom:kH,undefined:"undefined"},value:{number:M,undefined:"undefined"},widthConstraint:{minimum:{number:M},maximum:{number:M},__type__:{object:le,boolean:j,number:M}},x:{number:M},y:{number:M},__type__:{object:le}},sse={configure:{enabled:{boolean:j},filter:{boolean:j,string:Y,array:Eo,function:"function"},container:{dom:kH},showButton:{boolean:j},__type__:{object:le,boolean:j,string:Y,array:Eo,function:"function"}},edges:{arrows:{to:{enabled:{boolean:j},scaleFactor:{number:M},type:{string:U_},imageHeight:{number:M},imageWidth:{number:M},src:{string:Y},__type__:{object:le,boolean:j}},middle:{enabled:{boolean:j},scaleFactor:{number:M},type:{string:U_},imageWidth:{number:M},imageHeight:{number:M},src:{string:Y},__type__:{object:le,boolean:j}},from:{enabled:{boolean:j},scaleFactor:{number:M},type:{string:U_},imageWidth:{number:M},imageHeight:{number:M},src:{string:Y},__type__:{object:le,boolean:j}},__type__:{string:["from","to","middle"],object:le}},endPointOffset:{from:{number:M},to:{number:M},__type__:{object:le,number:M}},arrowStrikethrough:{boolean:j},background:{enabled:{boolean:j},color:{string:Y},size:{number:M},dashes:{boolean:j,array:Eo},__type__:{object:le,boolean:j}},chosen:{label:{boolean:j,function:"function"},edge:{boolean:j,function:"function"},__type__:{object:le,boolean:j}},color:{color:{string:Y},highlight:{string:Y},hover:{string:Y},inherit:{string:["from","to","both"],boolean:j},opacity:{number:M},__type__:{object:le,string:Y}},dashes:{boolean:j,array:Eo},font:{color:{string:Y},size:{number:M},face:{string:Y},background:{string:Y},strokeWidth:{number:M},strokeColor:{string:Y},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:M},multi:{boolean:j,string:Y},bold:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},boldital:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},ital:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},mono:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},__type__:{object:le,string:Y}},hidden:{boolean:j},hoverWidth:{function:"function",number:M},label:{string:Y,undefined:"undefined"},labelHighlightBold:{boolean:j},length:{number:M,undefined:"undefined"},physics:{boolean:j},scaling:{min:{number:M},max:{number:M},label:{enabled:{boolean:j},min:{number:M},max:{number:M},maxVisible:{number:M},drawThreshold:{number:M},__type__:{object:le,boolean:j}},customScalingFunction:{function:"function"},__type__:{object:le}},selectionWidth:{function:"function",number:M},selfReferenceSize:{number:M},selfReference:{size:{number:M},angle:{number:M},renderBehindTheNode:{boolean:j},__type__:{object:le}},shadow:{enabled:{boolean:j},color:{string:Y},size:{number:M},x:{number:M},y:{number:M},__type__:{object:le,boolean:j}},smooth:{enabled:{boolean:j},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:M},forceDirection:{string:["horizontal","vertical","none"],boolean:j},__type__:{object:le,boolean:j}},title:{string:Y,undefined:"undefined"},width:{number:M},widthConstraint:{maximum:{number:M},__type__:{object:le,boolean:j,number:M}},value:{number:M,undefined:"undefined"},__type__:{object:le}},groups:{useDefaultGroups:{boolean:j},__any__:V_,__type__:{object:le}},interaction:{dragNodes:{boolean:j},dragView:{boolean:j},hideEdgesOnDrag:{boolean:j},hideEdgesOnZoom:{boolean:j},hideNodesOnDrag:{boolean:j},hover:{boolean:j},keyboard:{enabled:{boolean:j},speed:{x:{number:M},y:{number:M},zoom:{number:M},__type__:{object:le}},bindToWindow:{boolean:j},autoFocus:{boolean:j},__type__:{object:le,boolean:j}},multiselect:{boolean:j},navigationButtons:{boolean:j},selectable:{boolean:j},selectConnectedEdges:{boolean:j},hoverConnectedEdges:{boolean:j},tooltipDelay:{number:M},zoomView:{boolean:j},zoomSpeed:{number:M},__type__:{object:le}},layout:{randomSeed:{undefined:"undefined",number:M,string:Y},improvedLayout:{boolean:j},clusterThreshold:{number:M},hierarchical:{enabled:{boolean:j},levelSeparation:{number:M},nodeSpacing:{number:M},treeSpacing:{number:M},blockShifting:{boolean:j},edgeMinimization:{boolean:j},parentCentralization:{boolean:j},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:le,boolean:j}},__type__:{object:le}},manipulation:{enabled:{boolean:j},initiallyActive:{boolean:j},addNode:{boolean:j,function:"function"},addEdge:{boolean:j,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:le,boolean:j,function:"function"}},deleteNode:{boolean:j,function:"function"},deleteEdge:{boolean:j,function:"function"},controlNodeStyle:V_,__type__:{object:le,boolean:j}},nodes:V_,physics:{enabled:{boolean:j},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:j},iterations:{number:M},updateInterval:{number:M},onlyDynamicEdges:{boolean:j},fit:{boolean:j},__type__:{object:le,boolean:j}},timestep:{number:M},adaptiveTimestep:{boolean:j},wind:{x:{number:M},y:{number:M},__type__:{object:le}},__type__:{object:le,boolean:j}},autoResize:{boolean:j},clickToUse:{boolean:j},locale:{string:Y},locales:{__any__:{any:nse},__type__:{object:le}},height:{string:Y},width:{string:Y},__type__:{object:le}},BH={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]}}},ose=(r,e,t)=>{var i;return!!(ki(r).call(r,"physics")&&ki(i=BH.physics.solver).call(i,e)&&t.physics.solver!==e&&e!=="wind")};class ase{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,p=0,v=0;for(;c>s&&ao&&vthis.body.emitter.emit("_requestRedraw")),this.groups=new Xee,this.canvas=new Wie(this.body),this.selectionHandler=new Ine(this.body,this.canvas),this.interactionHandler=new Gie(this.body,this.canvas,this.selectionHandler),this.view=new Vie(this.body,this.canvas),this.renderer=new Bie(this.body,this.canvas),this.physics=new xie(this.body),this.layoutEngine=new rse(this.body),this.clustering=new kie(this.body),this.manipulation=new ise(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new sie(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new Iie(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new use(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(t),this.setData(e)}v5(ue.prototype);ue.prototype.setOptions=function(r){if(r===null&&(r=void 0),r!==void 0){if(lee.validate(r,sse)===!0&&console.error("%cErrors have been found in the supplied options object.",cH),lo(["locale","locales","clickToUse"],this.options,r),r.locale!==void 0&&(r.locale=Aee(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 aee(this,this.body.container,BH,this.canvas.pixelRatio,ose)),this.configurator.setOptions(r.configure)),this.configurator&&this.configurator.options.enabled===!0){const i={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};Ge(i.nodes,this.nodesHandler.options),Ge(i.edges,this.edgesHandler.options),Ge(i.layout,this.layoutEngine.options),Ge(i.interaction,this.selectionHandler.options),Ge(i.interaction,this.renderer.options),Ge(i.interaction,this.interactionHandler.options),Ge(i.manipulation,this.manipulation.options),Ge(i.physics,this.physics.options),Ge(i.global,this.canvas.options),Ge(i.global,this.options),this.configurator.setModuleOptions(i)}r.clickToUse!==void 0?r.clickToUse===!0?this.activator===void 0&&(this.activator=new oee(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=bee(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=_ee(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];Ci(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 lse={class:"data-container text-container"},cse={class:"messages-block",ref:"scrollContainer"},dse={class:"center-block-custom"},hse=["onClick","id"],fse={key:0},pse={class:"message-content"},vse={key:1,class:"hr"},gse={key:0},mse={key:1},yse={class:"nodes-container"},bse={class:"checkbox-green"},_se={class:"checkbox-green"},wse={class:"scroll-y"},Ese=["onMouseenter"],Sse=["onClick"],Ose={key:0},Ise=["onClick"],Tse={class:"edit-node-container"},$se={class:"scroll-y-right"},Pse={key:0,class:"tb-5"},Rse=["onClick"],Cse=["onUpdate:modelValue"],xse=["onUpdate:modelValue"],qse=["onUpdate:modelValue"],Ase=["onClick"],Dse=["onUpdate:modelValue"],Mse=["onClick"],Nse=pr({__name:"EditorWindow",setup(r){const e=it(),t=it({nodes:[],edges:[]}),i={code:"",name:"",text:"",image:"",applications:[],hidden:!1,doors:[],id:"",label:"",links:[]},n=it(""),s=it({code:"",name:"",text:"",image:"",applications:[],hidden:!1,doors:[],id:"",label:"",links:[]}),o=it({code:"",name:"",text:"",image:"",applications:[],hidden:!1,doors:[],id:"",label:"",links:[]});let a={},u={};const l=it(0),c=it(0),d=it(!1),h=it(!0);async function f(){t.value=await PV(),c.value=t.value.edges.length,h.value&&(t.value.edges=t.value.edges.filter(function(P){return P.type!=="application"})),t.value.edges.map(function(P){P.type=="application"&&(P.color="#aaaaaa")}),t.value.nodes=t.value.nodes.map(function(P){return P.id=P.code,P.label=P.name,P}),l.value=t.value.edges.length,u={nodes:t.value.nodes,edges:t.value.edges.sort(function(P,S){return P.type=="application"?1:S.type=="application"?-1:0})},a.setData(u),console.log(t.value.edges)}ua(async()=>{if(!e.value)return;const P={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,P),a.on("click",function(S){if(console.log("click graph:",S),S.nodes.length>0){const $=t.value.nodes.find(function(q){return q.code==S.nodes[0]});$!==void 0&&g($)}else S.edges.length>0&&console.log("Clicked edge:",S.edges[0])}),await f(),g(t.value.nodes[0])});function p(){s.value.applications.push({name:""})}function v(P){s.value.applications=s.value.applications.filter(function(S){return S.name!=P})}function _(){s.value.doors.push({code:"",name:"",show:!1})}function m(P){s.value.doors=s.value.doors.filter(function(S){return S.code!=P})}function g(P){var $;console.log("Select node:",P),n.value=P.code,s.value=P;const S=t.value.edges.filter(function(q){return q.from==P.code}).map(function(q){const F=q.to;return t.value.nodes.filter(function(z){return z.code==F})[0]});s.value.links=S,a.selectNodes([s.value.code]),d.value||($=window.document.getElementById(P.code))==null||$.scrollIntoView({behavior:"smooth",block:"center"})}function E(P){console.log("Focus node:",P.code),o.value=P}function y(P){console.log("Focus node:",P.code),navigator.clipboard.writeText("(["+P.code+"])"),o.value=i}async function I(){console.log("Update node:",s.value),await Xl(n.value,s.value),await f();const P=t.value.nodes.filter(function(S){return S.code==s.value.code});g(P[0])}async function O(){console.log("Delete node:",s.value),s.value.code="",await Xl(n.value,s.value),await f()}async function T(){console.log("Add node:",s.value),s.value.code=n.value,await Xl("",s.value),await f();const P=t.value.nodes.filter(function(S){return S.code==s.value.code});g(P[0])}function b(P){return t.value.nodes.filter(function($){return $.code==P})[0]}function w(P){return P==null?"undefined":"["+P.code+"]: "+P.name}function R(P){d.value=P,d.value&&f()}return(P,S)=>(Oe(),Ne(Qe,null,[at(Gw,null,{default:bn(()=>S[11]||(S[11]=[W("div",null," Редактор сценариев ",-1)])),_:1}),W("div",{class:qi([d.value?"text-container-disable":""])},[W("div",lse,[W("div",cse,[W("div",dse,[(Oe(!0),Ne(Qe,null,Xr(t.value.nodes,$=>(Oe(),Ne("div",{key:$.id,onClick:q=>g($),id:$.code},[W("div",{class:qi(["message-cloud",[$.code==s.value.code?"selected-message-cloud":""]])},[W("div",{class:qi(["message-header",[$.code==s.value.code?"selected-message-header":""]])},Xe($.code)+": "+Xe($.name),3),$.image!==""?(Oe(),Ne("div",fse,Xe($.image),1)):Jr("",!0),S[12]||(S[12]=W("hr",{class:"hr"},null,-1)),W("div",pse,Xe($.text),1),$.applications.length?(Oe(),Ne("hr",vse)):Jr("",!0),(Oe(!0),Ne(Qe,null,Xr($.doors,q=>(Oe(),Ne("div",{class:"message-footer",key:q.code},[q.show?(Oe(),Ne("span",gse,"Кнопка: ")):Jr("",!0),q.show?Jr("",!0):(Oe(),Ne("span",mse,"Дверь: ")),ar(" "+Xe(w(b(q.code))),1)]))),128)),(Oe(!0),Ne(Qe,null,Xr($.applications,q=>(Oe(),Ne("div",{class:"message-footer",key:q.name}," Приложение: "+Xe(q.name),1))),128))],2)],8,hse))),128))])],512)])],2),W("div",{class:qi([d.value?"":"graph-container-disable"])},[W("div",{ref_key:"network",ref:e,class:"data-container graph-container"},null,512)],2),W("div",yse,[S[17]||(S[17]=W("h2",null,"Точки",-1)),W("div",null,"Всего точек: "+Xe(t.value.nodes.length),1),W("div",null,[S[14]||(S[14]=ar(" Отображать граф: ")),W("label",bse,[W("input",{type:"checkbox",onClick:S[0]||(S[0]=$=>R(!d.value))}),S[13]||(S[13]=W("span",{class:"checkbox-green-switch","data-label-on":"Да","data-label-off":"Нет"},null,-1))])]),W("div",null,[ar(" Всего связей: "+Xe(c.value)+", показано: "+Xe(l.value)+" ",1),W("div",null,[S[16]||(S[16]=ar(" Показать все связи: ")),W("label",_se,[W("input",{type:"checkbox",onClick:S[1]||(S[1]=$=>(h.value=!h.value,f()))}),S[15]||(S[15]=W("span",{class:"checkbox-green-switch","data-label-on":"Да","data-label-off":"Нет"},null,-1))])])]),S[18]||(S[18]=W("hr",{class:"hr"},null,-1)),W("div",wse,[(Oe(!0),Ne(Qe,null,Xr(t.value.nodes,$=>(Oe(),Ne("div",{key:$.code},[W("span",{onMouseenter:q=>E($),onMouseleave:S[2]||(S[2]=q=>E(i))},[W("span",{class:qi([[$.code==s.value.code?"selected-node":""],"node-select-button"]),onClick:q=>g($)},Xe(w($)),11,Sse),$.applications.length>0?(Oe(),Ne("span",Ose," ("+Xe($.applications.length)+")",1)):Jr("",!0),$.code==o.value.code?(Oe(),Ne("span",{key:1,class:"copy-node-link",onClick:q=>y($)}," Ссылка ",8,Ise)):Jr("",!0)],40,Ese)]))),128))])]),W("div",Tse,[W("div",$se,[S[23]||(S[23]=W("h2",null,"Редактирование точки",-1)),W("div",null,[Ii(W("input",{"onUpdate:modelValue":S[3]||(S[3]=$=>n.value=$),type:"text",class:"node-code-edit-field",maxlength:"5"},null,512),[[dn,n.value]]),S[19]||(S[19]=ar(" - ")),Ii(W("input",{"onUpdate:modelValue":S[4]||(S[4]=$=>s.value.name=$),type:"text",class:"node-name-edit-field"},null,512),[[dn,s.value.name]])]),W("div",null,[Ii(W("textarea",{class:"node-text-edit-field",rows:"15","onUpdate:modelValue":S[5]||(S[5]=$=>s.value.text=$)},null,512),[[dn,s.value.text]])]),W("div",null,[W("h3",null,[ar("Двери: "+Xe(s.value.doors.length)+" ",1),W("button",{class:"editor-button application-add-button",onClick:S[6]||(S[6]=$=>_())},"+")]),s.value.doors.length>0?(Oe(),Ne("div",Pse,[(Oe(!0),Ne(Qe,null,Xr(s.value.doors,($,q)=>(Oe(),Ne("div",{key:q},[W("button",{class:"editor-button application-remove-button",onClick:F=>m($.code)},"-",8,Rse),Ii(W("input",{class:"node-code-edit-field","onUpdate:modelValue":F=>$.code=F,type:"text",maxlength:"5"},null,8,Cse),[[dn,$.code]]),S[20]||(S[20]=ar(" - ")),Ii(W("input",{class:"node-name-edit-field","onUpdate:modelValue":F=>$.name=F,type:"text"},null,8,xse),[[dn,$.name]]),S[21]||(S[21]=ar(" - ")),Ii(W("input",{class:"node-code-edit-field","onUpdate:modelValue":F=>$.show=F,type:"checkbox"},null,8,qse),[[sU,$.show]])]))),128))])):Jr("",!0)]),W("div",null,[W("h3",null,[ar("Приложения: "+Xe(s.value.applications.length)+" ",1),W("button",{class:"editor-button application-add-button",onClick:S[7]||(S[7]=$=>p())},"+")]),(Oe(!0),Ne(Qe,null,Xr(s.value.applications,($,q)=>(Oe(),Ne("div",{key:q},[W("button",{class:"editor-button application-remove-button",onClick:F=>v($.name)},"-",8,Ase),Ii(W("textarea",{class:"node-text-edit-field",rows:"2","onUpdate:modelValue":F=>$.name=F},null,8,Dse),[[dn,$.name]])]))),128))]),W("div",null,[W("h3",null,"Ссылки: "+Xe(s.value.links.length),1),(Oe(!0),Ne(Qe,null,Xr(s.value.links,$=>(Oe(),Ne("div",{key:$.code},[W("div",{class:"node-select-button",onClick:q=>g($)}," - "+Xe(w($)),9,Mse)]))),128))]),W("div",null,[S[22]||(S[22]=W("hr",{class:"hr"},null,-1)),W("div",null,[W("button",{class:"editor-button",onClick:S[8]||(S[8]=$=>I())},"Сохранить"),W("button",{class:"editor-button",onClick:S[9]||(S[9]=$=>T())},"Добавить"),W("button",{class:"editor-button",onClick:S[10]||(S[10]=$=>O())},"Удалить")])])])])],64))}}),Fse=ca(Nse,[["__scopeId","data-v-206916ac"]]),kse=pr({__name:"EditorView",setup(r){return(e,t)=>(Oe(),hi(Fse))}}),Bse=pr({__name:"GamesWindow",setup(r){return(e,t)=>(Oe(),hi(Gw,null,{default:bn(()=>t[0]||(t[0]=[W("div",null," Каталог игр ",-1)])),_:1}))}}),Lse=pr({__name:"GamesView",setup(r){return(e,t)=>(Oe(),hi(Bse))}}),$w=gV({history:VU("/"),routes:[{path:"/",name:"home",component:mK},{path:"/editor",name:"editor",component:kse},{path:"/games",name:"games",component:Lse}]}),tE=dU(yV);tE.use(vU());tE.use($w);tE.mount("#app"); +`),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 bB(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(Fr(o).call(o,0,a),t),n[0]=Fr(o).call(o,a)}else{let o=s;n[s-1]===" "?s--:n[o]===" "&&o++;const a=Fr(n).call(n,0,s).join("");s==n.length&&i?this.lines.append(a,t):this.lines.newLine(a,t),n=Fr(n).call(n,o)}}}}const bo=["bold","ital","boldital","mono"];class Is{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),Fu(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(Te(bo,t=>{this.fontOptions[t]={}}),Is.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}Te(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=xi(e,"widthConstraint");if(typeof i=="number")t.maxWdt=Number(i),t.minWdt=Number(i);else if(typeof i=="object"){const s=xi(e,["widthConstraint","maximum"]);typeof s=="number"&&(t.maxWdt=Number(s));const o=xi(e,["widthConstraint","minimum"]);typeof o=="number"&&(t.minWdt=Number(o))}const n=xi(e,"heightConstraint");if(typeof n=="number")t.minHgt=Number(n);else if(typeof n=="object"){const s=xi(e,["heightConstraint","minimum"]);typeof s=="number"&&(t.minHgt=Number(s));const o=xi(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),Ge(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=J0("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)||(Be(bo).call(bo,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=lr(n,o),s=lr(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 Hre(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),ka(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 Wre=class extends Jn{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),h5(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 Q0 extends Jn{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),I0(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 Ure=class extends Q0{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 Vre extends Q0{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 rn extends Jn{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),uX(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 _B(r,e){var t=nt(r);if(Ui){var i=Ui(r);e&&(i=Yt(i).call(i,function(n){return tn(r,n).enumerable})),t.push.apply(t,i)}return t}function Kre(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 Yre extends Jn{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),f5(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 Xre=class extends rn{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 Jre extends rn{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 wB extends Jn{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),vw(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 Qre extends Jn{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 Zre=class extends Q0{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=lr(h,o.opacity),f=lr(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),ka(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 eie extends rn{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 tie extends rn{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 rie extends rn{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 iie extends Jn{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 nie=class extends rn{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 sie extends rn{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 EB(r,e){var t=nt(r);if(Ui){var i=Ui(r);e&&(i=Yt(i).call(i,function(n){return tn(r,n).enumerable})),t.push.apply(t,i)}return t}function SB(r){for(var e=1;et[l]!=null);u.push("font"),Mu(u,e,a),e.color=_w(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(Mu(["color","fixed","shadow"],e,t,i),Je.checkMass(t),e.opacity!==void 0&&(Je.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&&(Je.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&&!Je.checkCoordinateOrigin(t.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+t.shapeProperties.coordinateOrigin),ur(e,t,"shadow",n),t.color!==void 0&&t.color!==null){const a=_w(t.color);oH(e.color,a)}else i===!0&&t.color===null&&(e.color=Li(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=Li(n.font)),Je.updateGroupOptions(e,t,s),t.scaling!==void 0&&ur(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=lr(e.borderColor,t),e.color=lr(e.color,t),e.shadowColor=lr(e.shadowColor,t)}return e}updateLabelModule(e){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),Je.updateGroupOptions(this.options,SB(SB({},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 Wre(this.options,this.body,this.labelModule);break;case"circle":this.shape=new Ure(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new Vre(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new Gre(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new Yre(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new Xre(this.options,this.body,this.labelModule);break;case"dot":this.shape=new Jre(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new wB(this.options,this.body,this.labelModule);break;case"icon":this.shape=new Qre(this.options,this.body,this.labelModule);break;case"image":this.shape=new Zre(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new eie(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new tie(this.options,this.body,this.labelModule);break;case"star":this.shape=new rie(this.options,this.body,this.labelModule);break;case"text":this.shape=new iie(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new nie(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new sie(this.options,this.body,this.labelModule);break;default:this.shape=new wB(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()&&Iw(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),Iw(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.",cH),e.mass=1}}}class oie{constructor(e,t,i,n){var s;if(this.body=e,this.images=t,this.groups=i,this.layoutEngine=n,this.body.functions.createNode=H(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=Li(this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e,t;this.body.emitter.on("refreshNodes",H(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",H(t=this.refresh).call(t,this)),this.body.emitter.on("destroy",()=>{Te(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(Je.parseOptions(this.options,e),e.opacity!==void 0&&(Ow(e.opacity)||!mn(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 nt(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(n5("id",e))this.body.data.nodes=e;else if(st(e))this.body.data.nodes=new Cu,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new Cu;else throw new TypeError("Array or DataSet expected");if(i&&Te(this.nodesListeners,function(n,s){i.off(s,n)}),this.body.nodes={},this.body.data.nodes){const n=this;Te(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]:Je;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;Te(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(st(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 OB={},IB;function aie(){if(IB)return OB;IB=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)}}),OB}var Y1,TB;function uie(){if(TB)return Y1;TB=1,aie();var r=je();return Y1=r.Math.hypot,Y1}var X1,$B;function lie(){if($B)return X1;$B=1;var r=uie();return X1=r,X1}var J1,PB;function cie(){return PB||(PB=1,J1=lie()),J1}var die=cie(),hie=ge(die);class ut{static transform(e,t){st(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=st(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)p5(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]=Fr(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=TH(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,p=0;this.options.arrowStrikethrough===!0&&(u===-1?p=this.options.endPointOffset.from:u===1&&(p=this.options.endPointOffset.to));let v=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,_)+p,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,++v}while(o<=a&&v1?c=1:c<0&&(c=0);const d=e+c*a,h=t+c*u,f=d-s,p=h-o;return Math.sqrt(f*f+p*p)}getArrowData(e,t,i,n,s,o){let a,u,l,c,d,h,f;const p=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 v=15*h+3*p;if(l!=c){const E=hie(l.x-c.x,l.y-c.y),y=v/E;if(t!=="middle")if(this.options.smooth.enabled===!0){const I=this._findBorderPosition(l,e,{via:i}),O=this.getPoint(I.t+y*(t==="from"?1:-1),i);a=Math.atan2(I.y-O.y,I.x-O.x),u=I}else a=Math.atan2(l.y-c.y,l.x-c.x),u=this._findBorderPosition(l,e);else{const I=(d?-y:y)/2,O=this.getPoint(.5+I,i),T=this.getPoint(.5-I,i);a=Math.atan2(O.y-T.y,O.x-T.x),u=this.getPoint(.5,i)}}else{const[E,y,I]=this._getCircleData(e);if(t==="from"){const O=this.options.selfReference.angle,T=this.options.selfReference.angle+Math.PI,b=this._findBorderPositionCircle(this.from,e,{x:E,y,low:O,high:T,direction:-1});a=b.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,u=b}else if(t==="to"){const O=this.options.selfReference.angle,T=this.options.selfReference.angle+Math.PI,b=this._findBorderPositionCircle(this.from,e,{x:E,y,low:O,high:T,direction:1});a=b.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,u=b}else{const O=this.options.selfReference.angle/(2*Math.PI);u=this._pointOnCircle(E,y,I,O),a=O*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}const _=u.x-v*.9*Math.cos(a),m=u.y-v*.9*Math.sin(a);return{point:u,core:{x:_,y:m},angle:a,length:v,type:f}}drawArrowHead(e,t,i,n,s){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width,PH.draw(e,s)&&(this.enableShadow(e,t),ka(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=st(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 xB(r,e){var t=nt(r);if(Ui){var i=Ui(r);e&&(i=Yt(i).call(i,function(n){return tn(r,n).enumerable})),t.push.apply(t,i)}return t}function qB(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 p=Math.atan2(l.y-c.y,l.x-c.x),v=l.distanceToBorder(t,p)+h,_=Math.sqrt(Math.pow(c.x-l.x,2)+Math.pow(c.y-l.y,2)),m=v-_;if(Math.abs(m)0&&(l=this._getDistanceToLine(p,v,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 DB extends Z0{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 Iie extends Z0{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 p=.1*f;h[0]=Math.pow(1-p,3),h[1]=3*p*Math.pow(1-p,2),h[2]=3*Math.pow(p,2)*(1-p),h[3]=Math.pow(p,3);const v=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,v,_,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 NB extends RH{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 ji{constructor(e,t,i,n,s){if(t===void 0)throw new Error("No body provided");this.options=Li(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 Is(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;ji.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=IH(e.value));const i=[e,this.options,this.defaultOptions];return this.chooser=J0("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(lo(["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&&(mn(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&&(mn(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"))),Fu(t.label)?e.label=t.label:Fu(e.label)||(e.label=void 0),ur(e,t,"smooth",n),ur(e,t,"shadow",n),ur(e,t,"background",n),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:i===!0&&t.dashes===null&&(e.dashes=Sn(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),ur(e.scaling,t.scaling,"label",n.scaling)):i===!0&&t.scaling===null&&(e.scaling=Sn(n.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows=="string"){const a=t.arrows.toLowerCase();e.arrows.to.enabled=Be(a).call(a,"to")!=-1,e.arrows.middle.enabled=Be(a).call(a,"middle")!=-1,e.arrows.from.enabled=Be(a).call(a,"from")!=-1}else if(typeof t.arrows=="object")ur(e.arrows,t.arrows,"to",n.arrows),ur(e.arrows,t.arrows,"middle",n.arrows),ur(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:"+Fa(t.arrows));else i===!0&&t.arrows===null&&(e.arrows=Sn(n.arrows));if(t.color!==void 0&&t.color!==null){const a=Ss(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,u=e.color;if(s)Ge(u,n.color,!1,i);else for(const l in u)Object.prototype.hasOwnProperty.call(u,l)&&delete u[l];if(Ss(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=Li(n.color));i===!0&&t.font===null&&(e.font=Li(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 AB&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof MB&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof DB&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof NB&&e.type.enabled===!1)&&(i=!1),i===!0&&(t=this.cleanup())),i===!0?e.enabled===!0?e.type==="dynamic"?(t=!0,this.edgeType=new AB(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new MB(this.options,this.body,this.labelModule):this.edgeType=new DB(this.options,this.body,this.labelModule):this.edgeType=new NB(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=TH(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();Iw(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 Tie{constructor(e,t,i){var n;this.body=e,this.images=t,this.groups=i,this.body.functions.createEdge=H(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},Ge(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",H(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",H(i=this.refresh).call(i,this)),this.body.emitter.on("destroy",()=>{Te(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){ji.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(n5("id",e))this.body.data.edges=e;else if(st(e))this.body.data.edges=new Cu,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new Cu;else throw new TypeError("Array or DataSet expected");if(i&&Te(this.edgesListeners,(n,s)=>{i.off(s,n)}),this.body.edges={},this.body.data.edges){Te(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;Te(e,n=>{const s=i[n];s!==void 0&&s.remove()}),t&&this.body.emitter.emit("_dataChanged")}refresh(){Te(this.body.edges,(e,t)=>{const i=this.body.data.edges.get(t);i!==void 0&&e.setOptions(i)})}create(e){return new ji(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=[];Te(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=[];He(e).call(e,(n,s)=>{t[s]===void 0&&i.push(s)}),this.add(i,!0)}}class CH{constructor(e,t,i){this.body=e,this.physicsBody=t,this.barnesHutTree,this.setOptions(i),this._rng=Cl("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),p=.5*(o+u),v={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:f-h,maxX:f+h,minY:p-h,maxY:p+h},size:d,calcSize:1/d,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(v.root);for(let _=0;_0&&this._placeInTree(v.root,i);return v}_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 $ie{constructor(e,t,i){this._rng=Cl("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,p=4/3;for(let v=0;v0){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 qie{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}},ft(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,Mu(["stabilization"],this.options,e),ur(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"||Ow(t.x))&&(t.x=0),(typeof t.y!="number"||Ow(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 Cie(this.body,this.physicsBody,e),this.edgesSolver=new Q1(this.body,this.physicsBody,e),this.gravitySolver=new xie(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new $ie(this.body,this.physicsBody,e),this.edgesSolver=new Q1(this.body,this.physicsBody,e),this.gravitySolver=new mu(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new Pie(this.body,this.physicsBody,e),this.edgesSolver=new Rie(this.body,this.physicsBody,e),this.gravitySolver=new mu(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new CH(this.body,this.physicsBody,e),this.edgesSolver=new Q1(this.body,this.physicsBody,e),this.gravitySolver=new mu(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=H(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=xu();this.physicsTick(),(xu()-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)&&ui(()=>{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,ui(()=>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");Z1=crypto.getRandomValues.bind(crypto)}return Z1(Die)}const Nie=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var FB={randomUUID:Nie};function Fie(r,e,t){var n;r=r||{};const i=r.random??((n=r.rng)==null?void 0:n.call(r))??Mie();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,Aie(i)}function No(r,e,t){return FB.randomUUID&&!r?FB.randomUUID():Fie(r)}class Ht{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]}),Te(t.containedNodes,(i,n)=>{this.containedNodes[n]=i}),t.containedNodes={},Te(t.containedEdges,(i,n)=>{this.containedEdges[n]=i}),t.containedEdges={},Te(t.edges,i=>{Te(this.edges,n=>{var s,o;const a=Be(s=n.clusteringEdgeReplacingIds).call(s,i.id);a!==-1&&(Te(i.clusteringEdgeReplacingIds,u=>{n.clusteringEdgeReplacingIds.push(u),this.body.edges[u].edgeReplacedById=n.id}),ai(o=n.clusteringEdgeReplacingIds).call(o,a,1))})}),t.edges=[]}}class Bie{constructor(e){this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},ft(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={};Te(this.body.nodes,(s,o)=>{s.options&&e.joinCondition(s.options)===!0&&(i[o]=s,Te(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&&nt(d).length>0&&v===!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=Ht.cloneOptions(s);o[u]=s;for(let d=0;d-1&&(a[p.id]=p)}}this._cluster(o,a,t,n)}_createClusterEdges(e,t,i,n){let s,o,a,u,l,c;const d=nt(e),h=[];for(let v=0;v0&&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=Be(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 p=this.body.nodes[f];c[f]={x:p.x,y:p.y}}const h=t.releaseFunction(d,c);for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)){const p=this.body.nodes[f];h[f]!==void 0&&(p.x=h[f].x===void 0?n.x:h[f].x,p.y=h[f].y===void 0?n.y:h[f].y)}}else Te(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=Ht.cloneOptions(i,"edge");Ge(o,n),o.from=e,o.to=t,o.id="clusterEdge:"+No(),s!==void 0&&Ge(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 ji){const s=t,o={};o[s.id]=s,t=o}if(e instanceof Je){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 Te(e,n=>{t(n)&&i.push(n)}),i}_updateState(){let e;const t=[],i={},n=u=>{Te(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){Te(u.containedEdges,(l,c)=>{!l.endPointsValid()&&!i[c]&&(i[c]=c)})}),Te(this.body.edges,(u,l)=>{let c=!0;const d=u.clusteringEdgeReplacingIds;if(d!==void 0){let h=0;Te(d,f=>{const p=this.body.edges[f];p!==void 0&&p.endPointsValid()&&(h+=1)}),c=h>0}(!u.endPointsValid()||!c)&&(i[l]=l)}),n(u=>{Te(i,l=>{delete u.containedEdges[l],Te(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})})}),Te(i,u=>{delete this.clusteredEdges[u]}),Te(i,u=>{delete this.body.edges[u]});const s=nt(this.body.edges);Te(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=nt(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 Lie{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},ft(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=ui(()=>{var t;this.zooming=!1,H(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",H(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&&lo(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"],this.options,e)}_startRendering(){if(this.renderingActive===!0&&this.requestAnimationFrameRequestId===void 0){var e;this.requestAnimationFrameRequestId=window.requestAnimationFrame(H(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:-u,y:-u}),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",H(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&&lo(["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=Wie(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(()=>{clearInterval(n)})}const i=H(t=this._onResize).call(t,this);window.addEventListener("resize",i),this._cleanupCallbacks.push(()=>{window.removeEventListener("resize",i)})}}_cleanUp(){var e,t,i;He(e=En(t=ai(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(Be(e).call(e,"%")!==-1||Be(e).call(e,"px")!==-1)return e;if(Be(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 Os(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:Os.DIRECTION_ALL}),ku(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 Os(this.frame),xH(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 Vie(r,e){const t=ft({nodes:e,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},r??{});if(!st(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 Kie{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",H(i=this.fit).call(i,this)),this.body.emitter.on("animationFinished",()=>{this.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",H(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=Vie(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=Ht.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=Ht.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=Ht.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,!mn(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,!mn(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,!mn(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,!mn(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=H(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=H(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=tee[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=H(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 LB(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]=H(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=LB({container:window,preventDefault:!0}):this.keycharm=LB({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,p,v,_,m,g,E,y,I,O,T,b;H(e=this.keycharm).call(e,"up",()=>{this.bindToRedraw("_moveUp")},"keydown"),H(t=this.keycharm).call(t,"down",()=>{this.bindToRedraw("_moveDown")},"keydown"),H(i=this.keycharm).call(i,"left",()=>{this.bindToRedraw("_moveLeft")},"keydown"),H(n=this.keycharm).call(n,"right",()=>{this.bindToRedraw("_moveRight")},"keydown"),H(s=this.keycharm).call(s,"=",()=>{this.bindToRedraw("_zoomIn")},"keydown"),H(o=this.keycharm).call(o,"num+",()=>{this.bindToRedraw("_zoomIn")},"keydown"),H(a=this.keycharm).call(a,"num-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),H(u=this.keycharm).call(u,"-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),H(l=this.keycharm).call(l,"[",()=>{this.bindToRedraw("_zoomOut")},"keydown"),H(c=this.keycharm).call(c,"]",()=>{this.bindToRedraw("_zoomIn")},"keydown"),H(d=this.keycharm).call(d,"pageup",()=>{this.bindToRedraw("_zoomIn")},"keydown"),H(h=this.keycharm).call(h,"pagedown",()=>{this.bindToRedraw("_zoomOut")},"keydown"),H(f=this.keycharm).call(f,"up",()=>{this.unbindFromRedraw("_moveUp")},"keyup"),H(p=this.keycharm).call(p,"down",()=>{this.unbindFromRedraw("_moveDown")},"keyup"),H(v=this.keycharm).call(v,"left",()=>{this.unbindFromRedraw("_moveLeft")},"keyup"),H(_=this.keycharm).call(_,"right",()=>{this.unbindFromRedraw("_moveRight")},"keyup"),H(m=this.keycharm).call(m,"=",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),H(g=this.keycharm).call(g,"num+",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),H(E=this.keycharm).call(E,"num-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),H(y=this.keycharm).call(y,"-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),H(I=this.keycharm).call(I,"[",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),H(O=this.keycharm).call(O,"]",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),H(T=this.keycharm).call(T,"pageup",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),H(b=this.keycharm).call(b,"pagedown",()=>{this.unbindFromRedraw("_zoomOut")},"keyup")}}}class Yie{constructor(e,t,i){var n,s,o,a,u,l,c,d,h,f,p,v,_;this.body=e,this.canvas=t,this.selectionHandler=i,this.navigationHandler=new Gie(e,t),this.body.eventListeners.onTap=H(n=this.onTap).call(n,this),this.body.eventListeners.onTouch=H(s=this.onTouch).call(s,this),this.body.eventListeners.onDoubleTap=H(o=this.onDoubleTap).call(o,this),this.body.eventListeners.onHold=H(a=this.onHold).call(a,this),this.body.eventListeners.onDragStart=H(u=this.onDragStart).call(u,this),this.body.eventListeners.onDrag=H(l=this.onDrag).call(l,this),this.body.eventListeners.onDragEnd=H(c=this.onDragEnd).call(c,this),this.body.eventListeners.onMouseWheel=H(d=this.onMouseWheel).call(d,this),this.body.eventListeners.onPinch=H(h=this.onPinch).call(h,this),this.body.eventListeners.onMouseMove=H(f=this.onMouseMove).call(f,this),this.body.eventListeners.onRelease=H(p=this.onRelease).call(p,this),this.body.eventListeners.onContext=H(v=this.onContext).call(v,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=H(_=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},ft(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&&(Mu(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"],this.options,e),ur(this.options,e,"keyboard"),e.tooltip&&(ft(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=_w(e.tooltip.color)))),this.navigationHandler.setOptions(this.options)}getPointer(e){return{x:e.x-JZ(this.canvas.frame.canvas),y:e.y-QZ(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=Yt(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});He(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?(He(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 lee(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 jB={},zB={},HB;function Xie(){if(HB)return zB;HB=1;var r=K0(),e=_H();return r("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),zB}var WB;function Jie(){return WB||(WB=1,Xie()),jB}var UB={},r_,VB;function Qn(){if(VB)return r_;VB=1;var r=Js(),e=TypeError;return r_=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")},r_}var i_,KB;function Zn(){if(KB)return i_;KB=1;var r=nr(),e=wH(),t=r("Set"),i=t.prototype;return i_={Set:t,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:i},i_}var n_,GB;function es(){if(GB)return n_;GB=1;var r=er();return n_=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},n_}var s_,YB;function Wa(){if(YB)return s_;YB=1;var r=es();return s_=function(e,t,i){return i?r(e.keys(),t,!0):e.forEach(t)},s_}var o_,XB;function eE(){if(XB)return o_;XB=1;var r=Zn(),e=Wa(),t=r.Set,i=r.add;return o_=function(n){var s=new t;return e(n,function(o){i(s,o)}),s},o_}var a_,JB;function Ua(){return JB||(JB=1,a_=function(r){return r.size}),a_}var u_,QB;function Qie(){return QB||(QB=1,u_=function(r){return{iterator:r,next:r.next,done:!1}}),u_}var l_,ZB;function ts(){if(ZB)return l_;ZB=1;var r=bi(),e=Vr(),t=er(),i=to(),n=Qie(),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)}},l_=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)},l_}var c_,eL;function Zie(){if(eL)return c_;eL=1;var r=Qn(),e=Zn(),t=eE(),i=Ua(),n=ts(),s=Wa(),o=es(),a=e.has,u=e.remove;return c_=function(c){var d=r(this),h=n(c),f=t(d);return i(d)<=h.size?s(d,function(p){h.includes(p)&&u(f,p)}):o(h.getIterator(),function(p){a(f,p)&&u(f,p)}),f},c_}var d_,tL;function rs(){return tL||(tL=1,d_=function(){return!1}),d_}var rL;function ene(){if(rL)return UB;rL=1;var r=de(),e=Zie(),t=Pe(),i=rs(),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}),UB}var iL={},h_,nL;function tne(){if(nL)return h_;nL=1;var r=Qn(),e=Zn(),t=Ua(),i=ts(),n=Wa(),s=es(),o=e.Set,a=e.add,u=e.has;return h_=function(c){var d=r(this),h=i(c),f=new o;return t(d)>h.size?s(h.getIterator(),function(p){u(d,p)&&a(f,p)}):n(d,function(p){h.includes(p)&&a(f,p)}),f},h_}var sL;function rne(){if(sL)return iL;sL=1;var r=de(),e=Pe(),t=tne(),i=rs(),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}),iL}var oL={},f_,aL;function ine(){if(aL)return f_;aL=1;var r=Qn(),e=Zn().has,t=Ua(),i=ts(),n=Wa(),s=es(),o=U0();return f_=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},f_}var uL;function nne(){if(uL)return oL;uL=1;var r=de(),e=ine(),t=rs(),i=!t("isDisjointFrom",function(n){return!n});return r({target:"Set",proto:!0,real:!0,forced:i},{isDisjointFrom:e}),oL}var lL={},p_,cL;function sne(){if(cL)return p_;cL=1;var r=Qn(),e=Ua(),t=Wa(),i=ts();return p_=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},p_}var dL;function one(){if(dL)return lL;dL=1;var r=de(),e=sne(),t=rs(),i=!t("isSubsetOf",function(n){return n});return r({target:"Set",proto:!0,real:!0,forced:i},{isSubsetOf:e}),lL}var hL={},v_,fL;function ane(){if(fL)return v_;fL=1;var r=Qn(),e=Zn().has,t=Ua(),i=ts(),n=es(),s=U0();return v_=function(a){var u=r(this),l=i(a);if(t(u)0&&arguments[0]!==void 0?arguments[0]:()=>{};Fo(this,un,new DL),Fo(this,ln,new DL),Fo(this,T_,void 0),Tw(T_,this,e)}get sizeNodes(){return Ke(un,this).size}get sizeEdges(){return Ke(ln,this).size}getNodes(){return Ke(un,this).getSelection()}getEdges(){return Ke(ln,this).getSelection()}addNodes(){Ke(un,this).add(...arguments)}addEdges(){Ke(ln,this).add(...arguments)}deleteNodes(e){Ke(un,this).delete(e)}deleteEdges(e){Ke(ln,this).delete(e)}clear(){Ke(un,this).clear(),Ke(ln,this).clear()}commit(){const e={nodes:Ke(un,this).commit(),edges:Ke(ln,this).commit()};for(var t=arguments.length,i=new Array(t),n=0;n{this.updateSelection()})}setOptions(e){e!==void 0&&lo(["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 Je?(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 qs(e=this._selectionAccumulator.getNodes()).call(e,t=>t.id)}getSelectedEdgeIds(){var e;return qs(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 ML={},$_,NL;function $ne(){if(NL)return $_;NL=1;var r=ro(),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,p=0,v=0;p3)){if(d)return!0;if(f)return f<603;var T="",b,w,R,P;for(b=65;b<76;b++){switch(w=String.fromCharCode(b),b){case 66:case 69:case 70:case 72:R=3;break;case 68:case 71:R=4;break;default:R=2}for(P=0;P<47;P++)p.push({k:w+P,v:R})}for(p.sort(function(S,$){return $.v-S.v}),P=0;Po(w)?1:-1}};return r({target:"Array",proto:!0,forced:I},{sort:function(b){b!==void 0&&t(b);var w=i(this);if(y)return b===void 0?v(w):v(w,b);var R=[],P=n(w),S,$;for($=0;$=0:p>v;v+=_)v in f&&(d=l(d,f[v],v,h));return d}};return M_={left:o(!1),right:o(!0)},M_}var N_,KL;function kne(){if(KL)return N_;KL=1;var r=A5();return N_=r==="NODE",N_}var GL;function Bne(){if(GL)return UL;GL=1;var r=de(),e=Fne().left,t=ao(),i=Ca(),n=kne(),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)}}),UL}var F_,YL;function Lne(){if(YL)return F_;YL=1,Bne();var r=At();return F_=r("Array","reduce"),F_}var k_,XL;function jne(){if(XL)return k_;XL=1;var r=mt(),e=Lne(),t=Array.prototype;return k_=function(i){var n=i.reduce;return i===t||r(t,i)&&n===t.reduce?e:n},k_}var B_,JL;function zne(){if(JL)return B_;JL=1;var r=jne();return B_=r,B_}var L_,QL;function Hne(){return QL||(QL=1,L_=zne()),L_}var Wne=Hne(),DH=ge(Wne);class MH{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 Une extends MH{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){Ts(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 Vne extends MH{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){Ts(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 ZL={},ej;function Kne(){if(ej)return ZL;ej=1;var r=de(),e=en().every,t=ao(),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)}}),ZL}var j_,tj;function Gne(){if(tj)return j_;tj=1,Kne();var r=At();return j_=r("Array","every"),j_}var z_,rj;function Yne(){if(rj)return z_;rj=1;var r=mt(),e=Gne(),t=Array.prototype;return z_=function(i){var n=i.every;return i===t||r(t,i)&&n===t.every?e:n},z_}var H_,ij;function Xne(){if(ij)return H_;ij=1;var r=Yne();return H_=r,H_}var W_,nj;function Jne(){return nj||(nj=1,W_=Xne()),W_}var Qne=Jne(),NH=ge(Qne);function Zne(r,e){const t=new Ai;return He(r).call(r,i=>{var n;He(n=i.edges).call(n,s=>{s.connected&&t.add(s)})}),He(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 ese(r){return FH(e=>{var t,i;return NH(t=Yt(i=e.edges).call(i,n=>r.has(n.toId))).call(t,n=>n.to===e)},(e,t)=>t>e,"from",r)}function tse(r){return FH(e=>{var t,i;return NH(t=Yt(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 p=0,v;for(;v=f.pop();){var l,c;if(!i.has(d))continue;const _=s[v.id]+u;if(He(l=Yt(c=v.edges).call(c,m=>m.connected&&m.to!==m.from&&m[t]!==v&&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]))}),p>o)return Zne(i,s);++p}}return s}class rse{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(lo(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),ur(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"),Ge(t,this.optionsBackup)}return t}_resetRNG(e){this.initialRandomSeed=e,this._rng=Cl(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 rse;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,I=1e9,O=-1e9;for(const T in m)if(Object.prototype.hasOwnProperty.call(m,T)){const b=e.body.nodes[T],w=e.hierarchical.levels[b.id],R=e.direction.getPosition(b),[P,S]=e._getSpaceAroundNode(b,m);E=Math.min(P,E),y=Math.min(S,y),w<=g&&(I=Math.min(R,I),O=Math.max(R,O))}return[I,O,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 I=0;I1)for(let b=0;b2&&arguments[2]!==void 0?arguments[2]:!1;const y=e.direction.getPosition(m),I=e.direction.getPosition(g),O=Math.abs(I-y),T=e.options.hierarchical.nodeSpacing;if(O>T){const b={},w={};a(m,b),a(g,w);const R=l(m,g),P=u(b,R),S=u(w,R),$=P[1],q=S[0],F=S[2];if(Math.abs($-q)>T){let z=$-q+T;z<-F+T&&(z=-F+T),z<0&&(e._shiftBlock(g.id,z),t=!0,E===!0&&e._centerParent(g))}}},h=(m,g)=>{const E=g.id,y=g.edges,I=this.hierarchical.levels[g.id],O=this.options.hierarchical.levelSeparation*this.options.hierarchical.levelSeparation,T={},b=[];for(let F=0;F{let z=0;for(let te=0;te{let z=0;for(let te=0;te{let z=this.direction.getPosition(g);const te={};for(let ve=0;ve{const Z=this.direction.getPosition(g);if(i[g.id]===void 0){const me={};a(g,me),i[g.id]=me}const z=u(i[g.id]),te=z[2],ve=z[3],we=F-Z;let re=0;we>0?re=Math.min(we,ve-this.options.hierarchical.nodeSpacing):we<0&&(re=-Math.min(-we,te-this.options.hierarchical.nodeSpacing)),re!=0&&(this._shiftBlock(g.id,re),t=!0)},$=F=>{const Z=this.direction.getPosition(g),[z,te]=this._getSpaceAroundNode(g),ve=F-Z;let we=Z;ve>0?we=Math.min(Z+(te-this.options.hierarchical.nodeSpacing),F):ve<0&&(we=Math.max(Z-(z-this.options.hierarchical.nodeSpacing),F)),we!==Z&&(this.direction.setPosition(g,we),t=!0)};let q=P(m,b);S(q),q=P(m,y),$(q)},f=m=>{let g=this.hierarchical.getLevels();g=En(g).call(g);for(let E=0;E{let g=this.hierarchical.getLevels();g=En(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=En(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;Be(n=this.body.edgeIndices).call(n,i.id)!==-1&&t.push(i)}),t}_getHubSizes(){const e={},t=this.body.nodeIndices;Te(t,n=>{const s=this.body.nodes[n],o=this._getActiveEdges(s).length;e[o]=!0});const i=[];return Te(e,n=>{i.push(Number(n))}),Ts(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(Ht.cloneOptions(n,"node"),Ht.cloneOptions(s,"node"),Ht.cloneOptions(o,"edge"));this.hierarchical.levels[s.id]=a+u};this._crawlNetwork(i),this.hierarchical.setMinLevelToZero()}_determineLevelsDirected(){var e;const t=DH(e=this.body.nodeIndices).call(e,(i,n)=>(i.set(n,this.body.nodes[n]),i),new X0);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=tse(t):this.hierarchical.levels=ese(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",H(s=this._restore).call(s,this)),this.body.emitter.on("_resetData",H(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,Ge(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,H(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",H(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,H(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent("click",H(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=Ge({},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,H(o=this.toggleEditMode).call(o,this))}this._temporaryBindUI("onTouch",H(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",H(t=this._finishConnect).call(t,this)),this._temporaryBindUI("onDrag",H(i=this._dragControlNode).call(i,this)),this._temporaryBindUI("onRelease",H(n=this._finishConnect).call(n,this)),this._temporaryBindUI("onDragStart",H(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,H(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",H(t=this._controlNodeTouch).call(t,this)),this._temporaryBindUI("onTap",()=>{}),this._temporaryBindUI("onHold",()=>{}),this._temporaryBindUI("onDragStart",H(i=this._controlNodeDragStart).call(i,this)),this._temporaryBindUI("onDrag",H(n=this._controlNodeDrag).call(n,this)),this._temporaryBindUI("onDragEnd",H(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=Ge({},this.options.controlNodeStyle);i.id="targetNode"+No(),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={},Ci(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,H(e=this.toggleEditMode).call(e,this))}_clean(){this.inMode=!1,this.guiEnabled===!0&&(Ci(this.editModeDiv),Ci(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}_cleanupDOMEventListeners(){for(const t of ai(e=this._domEventListenerCleanupQueue).call(e,0)){var e;t()}}_removeManipulationDOM(){this._clean(),Ci(this.manipulationDiv),Ci(this.editModeDiv),Ci(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,H(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,H(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,H(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,H(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,H(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,H(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: "+Fa(nt(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=ft({},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"+No(),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(Be(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(Be(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:No(),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 Y="string",j="boolean",M="number",Eo="array",le="object",kH="dom",sse="any",U_=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],V_={borderWidth:{number:M},borderWidthSelected:{number:M,undefined:"undefined"},brokenImage:{string:Y,undefined:"undefined"},chosen:{label:{boolean:j,function:"function"},node:{boolean:j,function:"function"},__type__:{object:le,boolean:j}},color:{border:{string:Y},background:{string:Y},highlight:{border:{string:Y},background:{string:Y},__type__:{object:le,string:Y}},hover:{border:{string:Y},background:{string:Y},__type__:{object:le,string:Y}},__type__:{object:le,string:Y}},opacity:{number:M,undefined:"undefined"},fixed:{x:{boolean:j},y:{boolean:j},__type__:{object:le,boolean:j}},font:{align:{string:Y},color:{string:Y},size:{number:M},face:{string:Y},background:{string:Y},strokeWidth:{number:M},strokeColor:{string:Y},vadjust:{number:M},multi:{boolean:j,string:Y},bold:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},boldital:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},ital:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},mono:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},__type__:{object:le,string:Y}},group:{string:Y,number:M,undefined:"undefined"},heightConstraint:{minimum:{number:M},valign:{string:Y},__type__:{object:le,boolean:j,number:M}},hidden:{boolean:j},icon:{face:{string:Y},code:{string:Y},size:{number:M},color:{string:Y},weight:{string:Y,number:M},__type__:{object:le}},id:{string:Y,number:M},image:{selected:{string:Y,undefined:"undefined"},unselected:{string:Y,undefined:"undefined"},__type__:{object:le,string:Y}},imagePadding:{top:{number:M},right:{number:M},bottom:{number:M},left:{number:M},__type__:{object:le,number:M}},label:{string:Y,undefined:"undefined"},labelHighlightBold:{boolean:j},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:j},scaling:{min:{number:M},max:{number:M},label:{enabled:{boolean:j},min:{number:M},max:{number:M},maxVisible:{number:M},drawThreshold:{number:M},__type__:{object:le,boolean:j}},customScalingFunction:{function:"function"},__type__:{object:le}},shadow:{enabled:{boolean:j},color:{string:Y},size:{number:M},x:{number:M},y:{number:M},__type__:{object:le,boolean:j}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:j,array:Eo},borderRadius:{number:M},interpolation:{boolean:j},useImageSize:{boolean:j},useBorderWithImage:{boolean:j},coordinateOrigin:{string:["center","top-left"]},__type__:{object:le}},size:{number:M},title:{string:Y,dom:kH,undefined:"undefined"},value:{number:M,undefined:"undefined"},widthConstraint:{minimum:{number:M},maximum:{number:M},__type__:{object:le,boolean:j,number:M}},x:{number:M},y:{number:M},__type__:{object:le}},ose={configure:{enabled:{boolean:j},filter:{boolean:j,string:Y,array:Eo,function:"function"},container:{dom:kH},showButton:{boolean:j},__type__:{object:le,boolean:j,string:Y,array:Eo,function:"function"}},edges:{arrows:{to:{enabled:{boolean:j},scaleFactor:{number:M},type:{string:U_},imageHeight:{number:M},imageWidth:{number:M},src:{string:Y},__type__:{object:le,boolean:j}},middle:{enabled:{boolean:j},scaleFactor:{number:M},type:{string:U_},imageWidth:{number:M},imageHeight:{number:M},src:{string:Y},__type__:{object:le,boolean:j}},from:{enabled:{boolean:j},scaleFactor:{number:M},type:{string:U_},imageWidth:{number:M},imageHeight:{number:M},src:{string:Y},__type__:{object:le,boolean:j}},__type__:{string:["from","to","middle"],object:le}},endPointOffset:{from:{number:M},to:{number:M},__type__:{object:le,number:M}},arrowStrikethrough:{boolean:j},background:{enabled:{boolean:j},color:{string:Y},size:{number:M},dashes:{boolean:j,array:Eo},__type__:{object:le,boolean:j}},chosen:{label:{boolean:j,function:"function"},edge:{boolean:j,function:"function"},__type__:{object:le,boolean:j}},color:{color:{string:Y},highlight:{string:Y},hover:{string:Y},inherit:{string:["from","to","both"],boolean:j},opacity:{number:M},__type__:{object:le,string:Y}},dashes:{boolean:j,array:Eo},font:{color:{string:Y},size:{number:M},face:{string:Y},background:{string:Y},strokeWidth:{number:M},strokeColor:{string:Y},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:M},multi:{boolean:j,string:Y},bold:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},boldital:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},ital:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},mono:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},__type__:{object:le,string:Y}},hidden:{boolean:j},hoverWidth:{function:"function",number:M},label:{string:Y,undefined:"undefined"},labelHighlightBold:{boolean:j},length:{number:M,undefined:"undefined"},physics:{boolean:j},scaling:{min:{number:M},max:{number:M},label:{enabled:{boolean:j},min:{number:M},max:{number:M},maxVisible:{number:M},drawThreshold:{number:M},__type__:{object:le,boolean:j}},customScalingFunction:{function:"function"},__type__:{object:le}},selectionWidth:{function:"function",number:M},selfReferenceSize:{number:M},selfReference:{size:{number:M},angle:{number:M},renderBehindTheNode:{boolean:j},__type__:{object:le}},shadow:{enabled:{boolean:j},color:{string:Y},size:{number:M},x:{number:M},y:{number:M},__type__:{object:le,boolean:j}},smooth:{enabled:{boolean:j},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:M},forceDirection:{string:["horizontal","vertical","none"],boolean:j},__type__:{object:le,boolean:j}},title:{string:Y,undefined:"undefined"},width:{number:M},widthConstraint:{maximum:{number:M},__type__:{object:le,boolean:j,number:M}},value:{number:M,undefined:"undefined"},__type__:{object:le}},groups:{useDefaultGroups:{boolean:j},__any__:V_,__type__:{object:le}},interaction:{dragNodes:{boolean:j},dragView:{boolean:j},hideEdgesOnDrag:{boolean:j},hideEdgesOnZoom:{boolean:j},hideNodesOnDrag:{boolean:j},hover:{boolean:j},keyboard:{enabled:{boolean:j},speed:{x:{number:M},y:{number:M},zoom:{number:M},__type__:{object:le}},bindToWindow:{boolean:j},autoFocus:{boolean:j},__type__:{object:le,boolean:j}},multiselect:{boolean:j},navigationButtons:{boolean:j},selectable:{boolean:j},selectConnectedEdges:{boolean:j},hoverConnectedEdges:{boolean:j},tooltipDelay:{number:M},zoomView:{boolean:j},zoomSpeed:{number:M},__type__:{object:le}},layout:{randomSeed:{undefined:"undefined",number:M,string:Y},improvedLayout:{boolean:j},clusterThreshold:{number:M},hierarchical:{enabled:{boolean:j},levelSeparation:{number:M},nodeSpacing:{number:M},treeSpacing:{number:M},blockShifting:{boolean:j},edgeMinimization:{boolean:j},parentCentralization:{boolean:j},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:le,boolean:j}},__type__:{object:le}},manipulation:{enabled:{boolean:j},initiallyActive:{boolean:j},addNode:{boolean:j,function:"function"},addEdge:{boolean:j,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:le,boolean:j,function:"function"}},deleteNode:{boolean:j,function:"function"},deleteEdge:{boolean:j,function:"function"},controlNodeStyle:V_,__type__:{object:le,boolean:j}},nodes:V_,physics:{enabled:{boolean:j},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:j},iterations:{number:M},updateInterval:{number:M},onlyDynamicEdges:{boolean:j},fit:{boolean:j},__type__:{object:le,boolean:j}},timestep:{number:M},adaptiveTimestep:{boolean:j},wind:{x:{number:M},y:{number:M},__type__:{object:le}},__type__:{object:le,boolean:j}},autoResize:{boolean:j},clickToUse:{boolean:j},locale:{string:Y},locales:{__any__:{any:sse},__type__:{object:le}},height:{string:Y},width:{string:Y},__type__:{object:le}},BH={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]}}},ase=(r,e,t)=>{var i;return!!(ki(r).call(r,"physics")&&ki(i=BH.physics.solver).call(i,e)&&t.physics.solver!==e&&e!=="wind")};class use{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,p=0,v=0;for(;c>s&&ao&&vthis.body.emitter.emit("_requestRedraw")),this.groups=new Jee,this.canvas=new Uie(this.body),this.selectionHandler=new Tne(this.body,this.canvas),this.interactionHandler=new Yie(this.body,this.canvas,this.selectionHandler),this.view=new Kie(this.body,this.canvas),this.renderer=new Lie(this.body,this.canvas),this.physics=new qie(this.body),this.layoutEngine=new ise(this.body),this.clustering=new Bie(this.body),this.manipulation=new nse(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new oie(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new Tie(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new lse(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(t),this.setData(e)}v5(ue.prototype);ue.prototype.setOptions=function(r){if(r===null&&(r=void 0),r!==void 0){if(cee.validate(r,ose)===!0&&console.error("%cErrors have been found in the supplied options object.",cH),lo(["locale","locales","clickToUse"],this.options,r),r.locale!==void 0&&(r.locale=Dee(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 uee(this,this.body.container,BH,this.canvas.pixelRatio,ase)),this.configurator.setOptions(r.configure)),this.configurator&&this.configurator.options.enabled===!0){const i={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};Ge(i.nodes,this.nodesHandler.options),Ge(i.edges,this.edgesHandler.options),Ge(i.layout,this.layoutEngine.options),Ge(i.interaction,this.selectionHandler.options),Ge(i.interaction,this.renderer.options),Ge(i.interaction,this.interactionHandler.options),Ge(i.manipulation,this.manipulation.options),Ge(i.physics,this.physics.options),Ge(i.global,this.canvas.options),Ge(i.global,this.options),this.configurator.setModuleOptions(i)}r.clickToUse!==void 0?r.clickToUse===!0?this.activator===void 0&&(this.activator=new aee(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=_ee(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=wee(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];Ci(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 cse={class:"data-container text-container"},dse={class:"messages-block",ref:"scrollContainer"},hse={class:"center-block-custom"},fse=["onClick","id"],pse={key:0},vse={class:"message-content"},gse={key:1,class:"hr"},mse={key:0},yse={key:1},bse={class:"nodes-container"},_se={class:"checkbox-green"},wse={class:"checkbox-green"},Ese={class:"scroll-y"},Sse=["onMouseenter"],Ose=["onClick"],Ise={key:0},Tse=["onClick"],$se={class:"edit-node-container"},Pse={class:"scroll-y-right"},Rse={key:0,class:"tb-5"},Cse=["onClick"],xse=["onUpdate:modelValue"],qse=["onUpdate:modelValue"],Ase=["onUpdate:modelValue"],Dse=["onClick"],Mse=["onUpdate:modelValue"],Nse=["onClick"],Fse=pr({__name:"EditorWindow",setup(r){const e=it(),t=it({nodes:[],edges:[]}),i={code:"",name:"",text:"",image:"",applications:[],hidden:!1,doors:[],id:"",label:"",links:[]},n=it(""),s=it({code:"",name:"",text:"",image:"",applications:[],hidden:!1,doors:[],id:"",label:"",links:[]}),o=it({code:"",name:"",text:"",image:"",applications:[],hidden:!1,doors:[],id:"",label:"",links:[]});let a={},u={};const l=it(0),c=it(0),d=it(!1),h=it(!0);async function f(){t.value=await RV(),c.value=t.value.edges.length,h.value&&(t.value.edges=t.value.edges.filter(function(P){return P.type!=="application"})),t.value.edges.map(function(P){P.type=="application"&&(P.color="#aaaaaa")}),t.value.nodes=t.value.nodes.map(function(P){return P.id=P.code,P.label=P.name,P}),l.value=t.value.edges.length,u={nodes:t.value.nodes,edges:t.value.edges.sort(function(P,S){return P.type=="application"?1:S.type=="application"?-1:0})},a.setData(u),console.log(t.value.edges)}ua(async()=>{if(!e.value)return;const P={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,P),a.on("click",function(S){if(console.log("click graph:",S),S.nodes.length>0){const $=t.value.nodes.find(function(q){return q.code==S.nodes[0]});$!==void 0&&g($)}else S.edges.length>0&&console.log("Clicked edge:",S.edges[0])}),await f(),g(t.value.nodes[0])});function p(){s.value.applications.push({name:""})}function v(P){s.value.applications=s.value.applications.filter(function(S){return S.name!=P})}function _(){s.value.doors.push({code:"",name:"",show:!1})}function m(P){s.value.doors=s.value.doors.filter(function(S){return S.code!=P})}function g(P){var $;console.log("Select node:",P),n.value=P.code,s.value=P;const S=t.value.edges.filter(function(q){return q.from==P.code}).map(function(q){const F=q.to;return t.value.nodes.filter(function(z){return z.code==F})[0]});s.value.links=S,a.selectNodes([s.value.code]),d.value||($=window.document.getElementById(P.code))==null||$.scrollIntoView({behavior:"smooth",block:"center"})}function E(P){console.log("Focus node:",P.code),o.value=P}function y(P){console.log("Focus node:",P.code),navigator.clipboard.writeText("(["+P.code+"])"),o.value=i}async function I(){console.log("Update node:",s.value),await Xl(n.value,s.value),await f();const P=t.value.nodes.filter(function(S){return S.code==s.value.code});g(P[0])}async function O(){console.log("Delete node:",s.value),s.value.code="",await Xl(n.value,s.value),await f()}async function T(){console.log("Add node:",s.value),s.value.code=n.value,await Xl("",s.value),await f();const P=t.value.nodes.filter(function(S){return S.code==s.value.code});g(P[0])}function b(P){return t.value.nodes.filter(function($){return $.code==P})[0]}function w(P){return P==null?"undefined":"["+P.code+"]: "+P.name}function R(P){d.value=P,d.value&&f()}return(P,S)=>(Oe(),Ne(Qe,null,[at(Gw,null,{default:bn(()=>S[11]||(S[11]=[W("div",null," Редактор сценариев ",-1)])),_:1}),W("div",{class:qi([d.value?"text-container-disable":""])},[W("div",cse,[W("div",dse,[W("div",hse,[(Oe(!0),Ne(Qe,null,Xr(t.value.nodes,$=>(Oe(),Ne("div",{key:$.id,onClick:q=>g($),id:$.code},[W("div",{class:qi(["message-cloud",[$.code==s.value.code?"selected-message-cloud":""]])},[W("div",{class:qi(["message-header",[$.code==s.value.code?"selected-message-header":""]])},Xe($.code)+": "+Xe($.name),3),$.image!==""?(Oe(),Ne("div",pse,Xe($.image),1)):Jr("",!0),S[12]||(S[12]=W("hr",{class:"hr"},null,-1)),W("div",vse,Xe($.text),1),$.applications.length?(Oe(),Ne("hr",gse)):Jr("",!0),(Oe(!0),Ne(Qe,null,Xr($.doors,q=>(Oe(),Ne("div",{class:"message-footer",key:q.code},[q.show?(Oe(),Ne("span",mse,"Кнопка: ")):Jr("",!0),q.show?Jr("",!0):(Oe(),Ne("span",yse,"Дверь: ")),ar(" "+Xe(w(b(q.code))),1)]))),128)),(Oe(!0),Ne(Qe,null,Xr($.applications,q=>(Oe(),Ne("div",{class:"message-footer",key:q.name}," Приложение: "+Xe(q.name),1))),128))],2)],8,fse))),128))])],512)])],2),W("div",{class:qi([d.value?"":"graph-container-disable"])},[W("div",{ref_key:"network",ref:e,class:"data-container graph-container"},null,512)],2),W("div",bse,[S[17]||(S[17]=W("h2",null,"Точки",-1)),W("div",null,"Всего точек: "+Xe(t.value.nodes.length),1),W("div",null,[S[14]||(S[14]=ar(" Отображать граф: ")),W("label",_se,[W("input",{type:"checkbox",onClick:S[0]||(S[0]=$=>R(!d.value))}),S[13]||(S[13]=W("span",{class:"checkbox-green-switch","data-label-on":"Да","data-label-off":"Нет"},null,-1))])]),W("div",null,[ar(" Всего связей: "+Xe(c.value)+", показано: "+Xe(l.value)+" ",1),W("div",null,[S[16]||(S[16]=ar(" Показать все связи: ")),W("label",wse,[W("input",{type:"checkbox",onClick:S[1]||(S[1]=$=>(h.value=!h.value,f()))}),S[15]||(S[15]=W("span",{class:"checkbox-green-switch","data-label-on":"Да","data-label-off":"Нет"},null,-1))])])]),S[18]||(S[18]=W("hr",{class:"hr"},null,-1)),W("div",Ese,[(Oe(!0),Ne(Qe,null,Xr(t.value.nodes,$=>(Oe(),Ne("div",{key:$.code},[W("span",{onMouseenter:q=>E($),onMouseleave:S[2]||(S[2]=q=>E(i))},[W("span",{class:qi([[$.code==s.value.code?"selected-node":""],"node-select-button"]),onClick:q=>g($)},Xe(w($)),11,Ose),$.applications.length>0?(Oe(),Ne("span",Ise," ("+Xe($.applications.length)+")",1)):Jr("",!0),$.code==o.value.code?(Oe(),Ne("span",{key:1,class:"copy-node-link",onClick:q=>y($)}," Ссылка ",8,Tse)):Jr("",!0)],40,Sse)]))),128))])]),W("div",$se,[W("div",Pse,[S[23]||(S[23]=W("h2",null,"Редактирование точки",-1)),W("div",null,[Ii(W("input",{"onUpdate:modelValue":S[3]||(S[3]=$=>n.value=$),type:"text",class:"node-code-edit-field",maxlength:"5"},null,512),[[dn,n.value]]),S[19]||(S[19]=ar(" - ")),Ii(W("input",{"onUpdate:modelValue":S[4]||(S[4]=$=>s.value.name=$),type:"text",class:"node-name-edit-field"},null,512),[[dn,s.value.name]])]),W("div",null,[Ii(W("textarea",{class:"node-text-edit-field",rows:"15","onUpdate:modelValue":S[5]||(S[5]=$=>s.value.text=$)},null,512),[[dn,s.value.text]])]),W("div",null,[W("h3",null,[ar("Двери: "+Xe(s.value.doors.length)+" ",1),W("button",{class:"editor-button application-add-button",onClick:S[6]||(S[6]=$=>_())},"+")]),s.value.doors.length>0?(Oe(),Ne("div",Rse,[(Oe(!0),Ne(Qe,null,Xr(s.value.doors,($,q)=>(Oe(),Ne("div",{key:q},[W("button",{class:"editor-button application-remove-button",onClick:F=>m($.code)},"-",8,Cse),Ii(W("input",{class:"node-code-edit-field","onUpdate:modelValue":F=>$.code=F,type:"text",maxlength:"5"},null,8,xse),[[dn,$.code]]),S[20]||(S[20]=ar(" - ")),Ii(W("input",{class:"node-name-edit-field","onUpdate:modelValue":F=>$.name=F,type:"text"},null,8,qse),[[dn,$.name]]),S[21]||(S[21]=ar(" - ")),Ii(W("input",{class:"node-code-edit-field","onUpdate:modelValue":F=>$.show=F,type:"checkbox"},null,8,Ase),[[sU,$.show]])]))),128))])):Jr("",!0)]),W("div",null,[W("h3",null,[ar("Приложения: "+Xe(s.value.applications.length)+" ",1),W("button",{class:"editor-button application-add-button",onClick:S[7]||(S[7]=$=>p())},"+")]),(Oe(!0),Ne(Qe,null,Xr(s.value.applications,($,q)=>(Oe(),Ne("div",{key:q},[W("button",{class:"editor-button application-remove-button",onClick:F=>v($.name)},"-",8,Dse),Ii(W("textarea",{class:"node-text-edit-field",rows:"2","onUpdate:modelValue":F=>$.name=F},null,8,Mse),[[dn,$.name]])]))),128))]),W("div",null,[W("h3",null,"Ссылки: "+Xe(s.value.links.length),1),(Oe(!0),Ne(Qe,null,Xr(s.value.links,$=>(Oe(),Ne("div",{key:$.code},[W("div",{class:"node-select-button",onClick:q=>g($)}," - "+Xe(w($)),9,Nse)]))),128))]),W("div",null,[S[22]||(S[22]=W("hr",{class:"hr"},null,-1)),W("div",null,[W("button",{class:"editor-button",onClick:S[8]||(S[8]=$=>I())},"Сохранить"),W("button",{class:"editor-button",onClick:S[9]||(S[9]=$=>T())},"Добавить"),W("button",{class:"editor-button",onClick:S[10]||(S[10]=$=>O())},"Удалить")])])])])],64))}}),kse=ca(Fse,[["__scopeId","data-v-206916ac"]]),Bse=pr({__name:"EditorView",setup(r){return(e,t)=>(Oe(),hi(kse))}}),Lse=pr({__name:"GamesWindow",setup(r){return(e,t)=>(Oe(),hi(Gw,null,{default:bn(()=>t[0]||(t[0]=[W("div",null," Каталог игр ",-1)])),_:1}))}}),jse=pr({__name:"GamesView",setup(r){return(e,t)=>(Oe(),hi(Lse))}}),$w=gV({history:VU("/"),routes:[{path:"/",name:"home",component:yK},{path:"/editor",name:"editor",component:Bse},{path:"/games",name:"games",component:jse}]}),tE=dU(yV);tE.use(vU());tE.use($w);tE.mount("#app"); diff --git a/cmd/evening_detective/static/admin/index.html b/cmd/evening_detective/static/admin/index.html index 5d4bd37..77865fb 100644 --- a/cmd/evening_detective/static/admin/index.html +++ b/cmd/evening_detective/static/admin/index.html @@ -5,7 +5,7 @@ ВД Админка - + diff --git a/cmd/evening_detective/static/user/assets/index-fGX07waq.js b/cmd/evening_detective/static/user/assets/index-CQcj9qbi.js similarity index 75% rename from cmd/evening_detective/static/user/assets/index-fGX07waq.js rename to cmd/evening_detective/static/user/assets/index-CQcj9qbi.js index e9746f7..949b5f3 100644 --- a/cmd/evening_detective/static/user/assets/index-fGX07waq.js +++ b/cmd/evening_detective/static/user/assets/index-CQcj9qbi.js @@ -2,19 +2,19 @@ * @vue/shared v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function es(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const te={},Dt=[],et=()=>{},Il=()=>!1,kn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ts=e=>e.startsWith("onUpdate:"),ve=Object.assign,ns=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Ml=Object.prototype.hasOwnProperty,oe=(e,t)=>Ml.call(e,t),W=Array.isArray,Ft=e=>Un(e)==="[object Map]",Yo=e=>Un(e)==="[object Set]",Q=e=>typeof e=="function",pe=e=>typeof e=="string",ct=e=>typeof e=="symbol",he=e=>e!==null&&typeof e=="object",Qo=e=>(he(e)||Q(e))&&Q(e.then)&&Q(e.catch),Xo=Object.prototype.toString,Un=e=>Xo.call(e),Bl=e=>Un(e).slice(8,-1),Zo=e=>Un(e)==="[object Object]",rs=e=>pe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,tn=es(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Hn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Nl=/-(\w)/g,lt=Hn(e=>e.replace(Nl,(t,n)=>n?n.toUpperCase():"")),Ol=/\B([A-Z])/g,bt=Hn(e=>e.replace(Ol,"-$1").toLowerCase()),ei=Hn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Zn=Hn(e=>e?`on${ei(e)}`:""),Ie=(e,t)=>!Object.is(e,t),Rn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Dr=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let xs;const Vn=()=>xs||(xs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ss(e){if(W(e)){const t={};for(let n=0;n{if(n){const r=n.split($l);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function os(e){let t="";if(pe(e))t=e;else if(W(e))for(let n=0;n!!(e&&e.__v_isRef===!0),Xe=e=>pe(e)?e:e==null?"":W(e)||he(e)&&(e.toString===Xo||!Q(e.toString))?ri(e)?Xe(e.value):JSON.stringify(e,si,2):String(e),si=(e,t)=>ri(t)?si(e,t.value):Ft(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],o)=>(n[er(r,o)+" =>"]=s,n),{})}:Yo(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>er(n))}:ct(t)?er(t):he(t)&&!W(t)&&!Zo(t)?String(t):t,er=(e,t="")=>{var n;return ct(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +**//*! #__NO_SIDE_EFFECTS__ */function es(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const te={},Dt=[],et=()=>{},xl=()=>!1,Un=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ts=e=>e.startsWith("onUpdate:"),ve=Object.assign,ns=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Ml=Object.prototype.hasOwnProperty,oe=(e,t)=>Ml.call(e,t),W=Array.isArray,Ft=e=>kn(e)==="[object Map]",Yo=e=>kn(e)==="[object Set]",Q=e=>typeof e=="function",pe=e=>typeof e=="string",ct=e=>typeof e=="symbol",he=e=>e!==null&&typeof e=="object",Qo=e=>(he(e)||Q(e))&&Q(e.then)&&Q(e.catch),Xo=Object.prototype.toString,kn=e=>Xo.call(e),Bl=e=>kn(e).slice(8,-1),Zo=e=>kn(e)==="[object Object]",rs=e=>pe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,tn=es(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Hn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Nl=/-(\w)/g,lt=Hn(e=>e.replace(Nl,(t,n)=>n?n.toUpperCase():"")),Ol=/\B([A-Z])/g,bt=Hn(e=>e.replace(Ol,"-$1").toLowerCase()),ei=Hn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Zn=Hn(e=>e?`on${ei(e)}`:""),xe=(e,t)=>!Object.is(e,t),Rn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Dr=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Is;const Vn=()=>Is||(Is=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ss(e){if(W(e)){const t={};for(let n=0;n{if(n){const r=n.split($l);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function os(e){let t="";if(pe(e))t=e;else if(W(e))for(let n=0;n!!(e&&e.__v_isRef===!0),Xe=e=>pe(e)?e:e==null?"":W(e)||he(e)&&(e.toString===Xo||!Q(e.toString))?ri(e)?Xe(e.value):JSON.stringify(e,si,2):String(e),si=(e,t)=>ri(t)?si(e,t.value):Ft(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],o)=>(n[er(r,o)+" =>"]=s,n),{})}:Yo(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>er(n))}:ct(t)?er(t):he(t)&&!W(t)&&!Zo(t)?String(t):t,er=(e,t="")=>{var n;return ct(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** * @vue/reactivity v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Le;class oi{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Le,!t&&Le&&(this.index=(Le.scopes||(Le.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0)return;if(rn){let t=rn;for(rn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;nn;){let t=nn;for(nn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function ui(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ai(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),cs(r),jl(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function Fr(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(fi(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function fi(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===an))return;e.globalVersion=an;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Fr(e)){e.flags&=-3;return}const n=ae,r=Ve;ae=e,Ve=!0;try{ui(e);const s=e.fn(e._value);(t.version===0||Ie(s,e._value))&&(e._value=s,t.version++)}catch(s){throw t.version++,s}finally{ae=n,Ve=r,ai(e),e.flags&=-3}}function cs(e,t=!1){const{dep:n,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)cs(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function jl(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ve=!0;const di=[];function wt(){di.push(Ve),Ve=!1}function Et(){const e=di.pop();Ve=e===void 0?!0:e}function Is(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ae;ae=void 0;try{t()}finally{ae=n}}}let an=0;class ql{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class jn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!ae||!Ve||ae===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ae)n=this.activeLink=new ql(ae,this),ae.deps?(n.prevDep=ae.depsTail,ae.depsTail.nextDep=n,ae.depsTail=n):ae.deps=ae.depsTail=n,hi(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=ae.depsTail,n.nextDep=void 0,ae.depsTail.nextDep=n,ae.depsTail=n,ae.deps===n&&(ae.deps=r)}return n}trigger(t){this.version++,an++,this.notify(t)}notify(t){is();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{ls()}}}function hi(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)hi(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const kr=new WeakMap,Pt=Symbol(""),Ur=Symbol(""),fn=Symbol("");function be(e,t,n){if(Ve&&ae){let r=kr.get(e);r||kr.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new jn),s.map=r,s.key=n),s.track()}}function ot(e,t,n,r,s,o){const i=kr.get(e);if(!i){an++;return}const c=l=>{l&&l.trigger()};if(is(),t==="clear")i.forEach(c);else{const l=W(e),a=l&&rs(n);if(l&&n==="length"){const u=Number(r);i.forEach((f,g)=>{(g==="length"||g===fn||!ct(g)&&g>=u)&&c(f)})}else switch((n!==void 0||i.has(void 0))&&c(i.get(n)),a&&c(i.get(fn)),t){case"add":l?a&&c(i.get("length")):(c(i.get(Pt)),Ft(e)&&c(i.get(Ur)));break;case"delete":l||(c(i.get(Pt)),Ft(e)&&c(i.get(Ur)));break;case"set":Ft(e)&&c(i.get(Pt));break}}ls()}function Bt(e){const t=se(e);return t===e?t:(be(t,"iterate",fn),Fe(e)?t:t.map(we))}function qn(e){return be(e=se(e),"iterate",fn),e}const Kl={__proto__:null,[Symbol.iterator](){return nr(this,Symbol.iterator,we)},concat(...e){return Bt(this).concat(...e.map(t=>W(t)?Bt(t):t))},entries(){return nr(this,"entries",e=>(e[1]=we(e[1]),e))},every(e,t){return nt(this,"every",e,t,void 0,arguments)},filter(e,t){return nt(this,"filter",e,t,n=>n.map(we),arguments)},find(e,t){return nt(this,"find",e,t,we,arguments)},findIndex(e,t){return nt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return nt(this,"findLast",e,t,we,arguments)},findLastIndex(e,t){return nt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return nt(this,"forEach",e,t,void 0,arguments)},includes(...e){return rr(this,"includes",e)},indexOf(...e){return rr(this,"indexOf",e)},join(e){return Bt(this).join(e)},lastIndexOf(...e){return rr(this,"lastIndexOf",e)},map(e,t){return nt(this,"map",e,t,void 0,arguments)},pop(){return Wt(this,"pop")},push(...e){return Wt(this,"push",e)},reduce(e,...t){return Ms(this,"reduce",e,t)},reduceRight(e,...t){return Ms(this,"reduceRight",e,t)},shift(){return Wt(this,"shift")},some(e,t){return nt(this,"some",e,t,void 0,arguments)},splice(...e){return Wt(this,"splice",e)},toReversed(){return Bt(this).toReversed()},toSorted(e){return Bt(this).toSorted(e)},toSpliced(...e){return Bt(this).toSpliced(...e)},unshift(...e){return Wt(this,"unshift",e)},values(){return nr(this,"values",we)}};function nr(e,t,n){const r=qn(e),s=r[t]();return r!==e&&!Fe(e)&&(s._next=s.next,s.next=()=>{const o=s._next();return o.value&&(o.value=n(o.value)),o}),s}const zl=Array.prototype;function nt(e,t,n,r,s,o){const i=qn(e),c=i!==e&&!Fe(e),l=i[t];if(l!==zl[t]){const f=l.apply(e,o);return c?we(f):f}let a=n;i!==e&&(c?a=function(f,g){return n.call(this,we(f),g,e)}:n.length>2&&(a=function(f,g){return n.call(this,f,g,e)}));const u=l.call(i,a,r);return c&&s?s(u):u}function Ms(e,t,n,r){const s=qn(e);let o=n;return s!==e&&(Fe(e)?n.length>3&&(o=function(i,c,l){return n.call(this,i,c,l,e)}):o=function(i,c,l){return n.call(this,i,we(c),l,e)}),s[t](o,...r)}function rr(e,t,n){const r=se(e);be(r,"iterate",fn);const s=r[t](...n);return(s===-1||s===!1)&&fs(n[0])?(n[0]=se(n[0]),r[t](...n)):s}function Wt(e,t,n=[]){wt(),is();const r=se(e)[t].apply(e,n);return ls(),Et(),r}const Gl=es("__proto__,__v_isRef,__isVue"),pi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ct));function Wl(e){ct(e)||(e=String(e));const t=se(this);return be(t,"has",e),t.hasOwnProperty(e)}class gi{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(s?o?sc:vi:o?yi:_i).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=W(t);if(!s){let l;if(i&&(l=Kl[n]))return l;if(n==="hasOwnProperty")return Wl}const c=Reflect.get(t,n,Se(t)?t:r);return(ct(n)?pi.has(n):Gl(n))||(s||be(t,"get",n),o)?c:Se(c)?i&&rs(n)?c:c.value:he(c)?s?wi(c):Kn(c):c}}class mi extends gi{constructor(t=!1){super(!1,t)}set(t,n,r,s){let o=t[n];if(!this._isShallow){const l=At(o);if(!Fe(r)&&!At(r)&&(o=se(o),r=se(r)),!W(t)&&Se(o)&&!Se(r))return l?!1:(o.value=r,!0)}const i=W(t)&&rs(n)?Number(n)e,wn=e=>Reflect.getPrototypeOf(e);function Zl(e,t,n){return function(...r){const s=this.__v_raw,o=se(s),i=Ft(o),c=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,a=s[e](...r),u=n?Hr:t?Vr:we;return!t&&be(o,"iterate",l?Ur:Pt),{next(){const{value:f,done:g}=a.next();return g?{value:f,done:g}:{value:c?[u(f[0]),u(f[1])]:u(f),done:g}},[Symbol.iterator](){return this}}}}function En(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ec(e,t){const n={get(s){const o=this.__v_raw,i=se(o),c=se(s);e||(Ie(s,c)&&be(i,"get",s),be(i,"get",c));const{has:l}=wn(i),a=t?Hr:e?Vr:we;if(l.call(i,s))return a(o.get(s));if(l.call(i,c))return a(o.get(c));o!==i&&o.get(s)},get size(){const s=this.__v_raw;return!e&&be(se(s),"iterate",Pt),Reflect.get(s,"size",s)},has(s){const o=this.__v_raw,i=se(o),c=se(s);return e||(Ie(s,c)&&be(i,"has",s),be(i,"has",c)),s===c?o.has(s):o.has(s)||o.has(c)},forEach(s,o){const i=this,c=i.__v_raw,l=se(c),a=t?Hr:e?Vr:we;return!e&&be(l,"iterate",Pt),c.forEach((u,f)=>s.call(o,a(u),a(f),i))}};return ve(n,e?{add:En("add"),set:En("set"),delete:En("delete"),clear:En("clear")}:{add(s){!t&&!Fe(s)&&!At(s)&&(s=se(s));const o=se(this);return wn(o).has.call(o,s)||(o.add(s),ot(o,"add",s,s)),this},set(s,o){!t&&!Fe(o)&&!At(o)&&(o=se(o));const i=se(this),{has:c,get:l}=wn(i);let a=c.call(i,s);a||(s=se(s),a=c.call(i,s));const u=l.call(i,s);return i.set(s,o),a?Ie(o,u)&&ot(i,"set",s,o):ot(i,"add",s,o),this},delete(s){const o=se(this),{has:i,get:c}=wn(o);let l=i.call(o,s);l||(s=se(s),l=i.call(o,s)),c&&c.call(o,s);const a=o.delete(s);return l&&ot(o,"delete",s,void 0),a},clear(){const s=se(this),o=s.size!==0,i=s.clear();return o&&ot(s,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=Zl(s,e,t)}),n}function us(e,t){const n=ec(e,t);return(r,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(oe(n,s)&&s in r?n:r,s,o)}const tc={get:us(!1,!1)},nc={get:us(!1,!0)},rc={get:us(!0,!1)};const _i=new WeakMap,yi=new WeakMap,vi=new WeakMap,sc=new WeakMap;function oc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ic(e){return e.__v_skip||!Object.isExtensible(e)?0:oc(Bl(e))}function Kn(e){return At(e)?e:as(e,!1,Yl,tc,_i)}function bi(e){return as(e,!1,Xl,nc,yi)}function wi(e){return as(e,!0,Ql,rc,vi)}function as(e,t,n,r,s){if(!he(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=s.get(e);if(o)return o;const i=ic(e);if(i===0)return e;const c=new Proxy(e,i===2?r:n);return s.set(e,c),c}function kt(e){return At(e)?kt(e.__v_raw):!!(e&&e.__v_isReactive)}function At(e){return!!(e&&e.__v_isReadonly)}function Fe(e){return!!(e&&e.__v_isShallow)}function fs(e){return e?!!e.__v_raw:!1}function se(e){const t=e&&e.__v_raw;return t?se(t):e}function Ei(e){return!oe(e,"__v_skip")&&Object.isExtensible(e)&&ti(e,"__v_skip",!0),e}const we=e=>he(e)?Kn(e):e,Vr=e=>he(e)?wi(e):e;function Se(e){return e?e.__v_isRef===!0:!1}function me(e){return Si(e,!1)}function lc(e){return Si(e,!0)}function Si(e,t){return Se(e)?e:new cc(e,t)}class cc{constructor(t,n){this.dep=new jn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:se(t),this._value=n?t:we(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Fe(t)||At(t);t=r?t:se(t),Ie(t,n)&&(this._rawValue=t,this._value=r?t:we(t),this.dep.trigger())}}function _t(e){return Se(e)?e.value:e}const uc={get:(e,t,n)=>t==="__v_raw"?e:_t(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return Se(s)&&!Se(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function Ci(e){return kt(e)?e:new Proxy(e,uc)}class ac{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new jn,{get:r,set:s}=t(n.track.bind(n),n.trigger.bind(n));this._get=r,this._set=s}get value(){return this._value=this._get()}set value(t){this._set(t)}}function fc(e){return new ac(e)}class dc{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new jn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=an-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&ae!==this)return ci(this,!0),!0}get value(){const t=this.dep.track();return fi(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function hc(e,t,n=!1){let r,s;return Q(e)?r=e:(r=e.get,s=e.set),new dc(r,s,n)}const Sn={},xn=new WeakMap;let Rt;function pc(e,t=!1,n=Rt){if(n){let r=xn.get(n);r||xn.set(n,r=[]),r.push(e)}}function gc(e,t,n=te){const{immediate:r,deep:s,once:o,scheduler:i,augmentJob:c,call:l}=n,a=_=>s?_:Fe(_)||s===!1||s===0?it(_,1):it(_);let u,f,g,p,b=!1,w=!1;if(Se(e)?(f=()=>e.value,b=Fe(e)):kt(e)?(f=()=>a(e),b=!0):W(e)?(w=!0,b=e.some(_=>kt(_)||Fe(_)),f=()=>e.map(_=>{if(Se(_))return _.value;if(kt(_))return a(_);if(Q(_))return l?l(_,2):_()})):Q(e)?t?f=l?()=>l(e,2):e:f=()=>{if(g){wt();try{g()}finally{Et()}}const _=Rt;Rt=u;try{return l?l(e,3,[p]):e(p)}finally{Rt=_}}:f=et,t&&s){const _=f,G=s===!0?1/0:s;f=()=>it(_(),G)}const B=Vl(),S=()=>{u.stop(),B&&B.active&&ns(B.effects,u)};if(o&&t){const _=t;t=(...G)=>{_(...G),S()}}let R=w?new Array(e.length).fill(Sn):Sn;const P=_=>{if(!(!(u.flags&1)||!u.dirty&&!_))if(t){const G=u.run();if(s||b||(w?G.some((N,L)=>Ie(N,R[L])):Ie(G,R))){g&&g();const N=Rt;Rt=u;try{const L=[G,R===Sn?void 0:w&&R[0]===Sn?[]:R,p];l?l(t,3,L):t(...L),R=G}finally{Rt=N}}}else u.run()};return c&&c(P),u=new ii(f),u.scheduler=i?()=>i(P,!1):P,p=_=>pc(_,!1,u),g=u.onStop=()=>{const _=xn.get(u);if(_){if(l)l(_,4);else for(const G of _)G();xn.delete(u)}},t?r?P(!0):R=u.run():i?i(P.bind(null,!0),!0):u.run(),S.pause=u.pause.bind(u),S.resume=u.resume.bind(u),S.stop=S,S}function it(e,t=1/0,n){if(t<=0||!he(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Se(e))it(e.value,t,n);else if(W(e))for(let r=0;r{it(r,t,n)});else if(Zo(e)){for(const r in e)it(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&it(e[r],t,n)}return e}/** +**/let Le;class oi{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Le,!t&&Le&&(this.index=(Le.scopes||(Le.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0)return;if(rn){let t=rn;for(rn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;nn;){let t=nn;for(nn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function ui(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ai(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),cs(r),jl(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function Fr(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(fi(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function fi(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===an))return;e.globalVersion=an;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Fr(e)){e.flags&=-3;return}const n=ae,r=Ve;ae=e,Ve=!0;try{ui(e);const s=e.fn(e._value);(t.version===0||xe(s,e._value))&&(e._value=s,t.version++)}catch(s){throw t.version++,s}finally{ae=n,Ve=r,ai(e),e.flags&=-3}}function cs(e,t=!1){const{dep:n,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)cs(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function jl(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ve=!0;const di=[];function wt(){di.push(Ve),Ve=!1}function Et(){const e=di.pop();Ve=e===void 0?!0:e}function xs(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ae;ae=void 0;try{t()}finally{ae=n}}}let an=0;class ql{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class jn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!ae||!Ve||ae===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ae)n=this.activeLink=new ql(ae,this),ae.deps?(n.prevDep=ae.depsTail,ae.depsTail.nextDep=n,ae.depsTail=n):ae.deps=ae.depsTail=n,hi(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=ae.depsTail,n.nextDep=void 0,ae.depsTail.nextDep=n,ae.depsTail=n,ae.deps===n&&(ae.deps=r)}return n}trigger(t){this.version++,an++,this.notify(t)}notify(t){is();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{ls()}}}function hi(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)hi(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ur=new WeakMap,Pt=Symbol(""),kr=Symbol(""),fn=Symbol("");function be(e,t,n){if(Ve&&ae){let r=Ur.get(e);r||Ur.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new jn),s.map=r,s.key=n),s.track()}}function ot(e,t,n,r,s,o){const i=Ur.get(e);if(!i){an++;return}const c=l=>{l&&l.trigger()};if(is(),t==="clear")i.forEach(c);else{const l=W(e),a=l&&rs(n);if(l&&n==="length"){const u=Number(r);i.forEach((f,g)=>{(g==="length"||g===fn||!ct(g)&&g>=u)&&c(f)})}else switch((n!==void 0||i.has(void 0))&&c(i.get(n)),a&&c(i.get(fn)),t){case"add":l?a&&c(i.get("length")):(c(i.get(Pt)),Ft(e)&&c(i.get(kr)));break;case"delete":l||(c(i.get(Pt)),Ft(e)&&c(i.get(kr)));break;case"set":Ft(e)&&c(i.get(Pt));break}}ls()}function Bt(e){const t=se(e);return t===e?t:(be(t,"iterate",fn),Fe(e)?t:t.map(we))}function qn(e){return be(e=se(e),"iterate",fn),e}const Kl={__proto__:null,[Symbol.iterator](){return nr(this,Symbol.iterator,we)},concat(...e){return Bt(this).concat(...e.map(t=>W(t)?Bt(t):t))},entries(){return nr(this,"entries",e=>(e[1]=we(e[1]),e))},every(e,t){return nt(this,"every",e,t,void 0,arguments)},filter(e,t){return nt(this,"filter",e,t,n=>n.map(we),arguments)},find(e,t){return nt(this,"find",e,t,we,arguments)},findIndex(e,t){return nt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return nt(this,"findLast",e,t,we,arguments)},findLastIndex(e,t){return nt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return nt(this,"forEach",e,t,void 0,arguments)},includes(...e){return rr(this,"includes",e)},indexOf(...e){return rr(this,"indexOf",e)},join(e){return Bt(this).join(e)},lastIndexOf(...e){return rr(this,"lastIndexOf",e)},map(e,t){return nt(this,"map",e,t,void 0,arguments)},pop(){return Wt(this,"pop")},push(...e){return Wt(this,"push",e)},reduce(e,...t){return Ms(this,"reduce",e,t)},reduceRight(e,...t){return Ms(this,"reduceRight",e,t)},shift(){return Wt(this,"shift")},some(e,t){return nt(this,"some",e,t,void 0,arguments)},splice(...e){return Wt(this,"splice",e)},toReversed(){return Bt(this).toReversed()},toSorted(e){return Bt(this).toSorted(e)},toSpliced(...e){return Bt(this).toSpliced(...e)},unshift(...e){return Wt(this,"unshift",e)},values(){return nr(this,"values",we)}};function nr(e,t,n){const r=qn(e),s=r[t]();return r!==e&&!Fe(e)&&(s._next=s.next,s.next=()=>{const o=s._next();return o.value&&(o.value=n(o.value)),o}),s}const zl=Array.prototype;function nt(e,t,n,r,s,o){const i=qn(e),c=i!==e&&!Fe(e),l=i[t];if(l!==zl[t]){const f=l.apply(e,o);return c?we(f):f}let a=n;i!==e&&(c?a=function(f,g){return n.call(this,we(f),g,e)}:n.length>2&&(a=function(f,g){return n.call(this,f,g,e)}));const u=l.call(i,a,r);return c&&s?s(u):u}function Ms(e,t,n,r){const s=qn(e);let o=n;return s!==e&&(Fe(e)?n.length>3&&(o=function(i,c,l){return n.call(this,i,c,l,e)}):o=function(i,c,l){return n.call(this,i,we(c),l,e)}),s[t](o,...r)}function rr(e,t,n){const r=se(e);be(r,"iterate",fn);const s=r[t](...n);return(s===-1||s===!1)&&fs(n[0])?(n[0]=se(n[0]),r[t](...n)):s}function Wt(e,t,n=[]){wt(),is();const r=se(e)[t].apply(e,n);return ls(),Et(),r}const Gl=es("__proto__,__v_isRef,__isVue"),pi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ct));function Wl(e){ct(e)||(e=String(e));const t=se(this);return be(t,"has",e),t.hasOwnProperty(e)}class gi{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(s?o?sc:vi:o?yi:_i).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=W(t);if(!s){let l;if(i&&(l=Kl[n]))return l;if(n==="hasOwnProperty")return Wl}const c=Reflect.get(t,n,Se(t)?t:r);return(ct(n)?pi.has(n):Gl(n))||(s||be(t,"get",n),o)?c:Se(c)?i&&rs(n)?c:c.value:he(c)?s?wi(c):Kn(c):c}}class mi extends gi{constructor(t=!1){super(!1,t)}set(t,n,r,s){let o=t[n];if(!this._isShallow){const l=At(o);if(!Fe(r)&&!At(r)&&(o=se(o),r=se(r)),!W(t)&&Se(o)&&!Se(r))return l?!1:(o.value=r,!0)}const i=W(t)&&rs(n)?Number(n)e,wn=e=>Reflect.getPrototypeOf(e);function Zl(e,t,n){return function(...r){const s=this.__v_raw,o=se(s),i=Ft(o),c=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,a=s[e](...r),u=n?Hr:t?Vr:we;return!t&&be(o,"iterate",l?kr:Pt),{next(){const{value:f,done:g}=a.next();return g?{value:f,done:g}:{value:c?[u(f[0]),u(f[1])]:u(f),done:g}},[Symbol.iterator](){return this}}}}function En(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ec(e,t){const n={get(s){const o=this.__v_raw,i=se(o),c=se(s);e||(xe(s,c)&&be(i,"get",s),be(i,"get",c));const{has:l}=wn(i),a=t?Hr:e?Vr:we;if(l.call(i,s))return a(o.get(s));if(l.call(i,c))return a(o.get(c));o!==i&&o.get(s)},get size(){const s=this.__v_raw;return!e&&be(se(s),"iterate",Pt),Reflect.get(s,"size",s)},has(s){const o=this.__v_raw,i=se(o),c=se(s);return e||(xe(s,c)&&be(i,"has",s),be(i,"has",c)),s===c?o.has(s):o.has(s)||o.has(c)},forEach(s,o){const i=this,c=i.__v_raw,l=se(c),a=t?Hr:e?Vr:we;return!e&&be(l,"iterate",Pt),c.forEach((u,f)=>s.call(o,a(u),a(f),i))}};return ve(n,e?{add:En("add"),set:En("set"),delete:En("delete"),clear:En("clear")}:{add(s){!t&&!Fe(s)&&!At(s)&&(s=se(s));const o=se(this);return wn(o).has.call(o,s)||(o.add(s),ot(o,"add",s,s)),this},set(s,o){!t&&!Fe(o)&&!At(o)&&(o=se(o));const i=se(this),{has:c,get:l}=wn(i);let a=c.call(i,s);a||(s=se(s),a=c.call(i,s));const u=l.call(i,s);return i.set(s,o),a?xe(o,u)&&ot(i,"set",s,o):ot(i,"add",s,o),this},delete(s){const o=se(this),{has:i,get:c}=wn(o);let l=i.call(o,s);l||(s=se(s),l=i.call(o,s)),c&&c.call(o,s);const a=o.delete(s);return l&&ot(o,"delete",s,void 0),a},clear(){const s=se(this),o=s.size!==0,i=s.clear();return o&&ot(s,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=Zl(s,e,t)}),n}function us(e,t){const n=ec(e,t);return(r,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(oe(n,s)&&s in r?n:r,s,o)}const tc={get:us(!1,!1)},nc={get:us(!1,!0)},rc={get:us(!0,!1)};const _i=new WeakMap,yi=new WeakMap,vi=new WeakMap,sc=new WeakMap;function oc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ic(e){return e.__v_skip||!Object.isExtensible(e)?0:oc(Bl(e))}function Kn(e){return At(e)?e:as(e,!1,Yl,tc,_i)}function bi(e){return as(e,!1,Xl,nc,yi)}function wi(e){return as(e,!0,Ql,rc,vi)}function as(e,t,n,r,s){if(!he(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=s.get(e);if(o)return o;const i=ic(e);if(i===0)return e;const c=new Proxy(e,i===2?r:n);return s.set(e,c),c}function Ut(e){return At(e)?Ut(e.__v_raw):!!(e&&e.__v_isReactive)}function At(e){return!!(e&&e.__v_isReadonly)}function Fe(e){return!!(e&&e.__v_isShallow)}function fs(e){return e?!!e.__v_raw:!1}function se(e){const t=e&&e.__v_raw;return t?se(t):e}function Ei(e){return!oe(e,"__v_skip")&&Object.isExtensible(e)&&ti(e,"__v_skip",!0),e}const we=e=>he(e)?Kn(e):e,Vr=e=>he(e)?wi(e):e;function Se(e){return e?e.__v_isRef===!0:!1}function me(e){return Si(e,!1)}function lc(e){return Si(e,!0)}function Si(e,t){return Se(e)?e:new cc(e,t)}class cc{constructor(t,n){this.dep=new jn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:se(t),this._value=n?t:we(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Fe(t)||At(t);t=r?t:se(t),xe(t,n)&&(this._rawValue=t,this._value=r?t:we(t),this.dep.trigger())}}function _t(e){return Se(e)?e.value:e}const uc={get:(e,t,n)=>t==="__v_raw"?e:_t(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return Se(s)&&!Se(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function Ci(e){return Ut(e)?e:new Proxy(e,uc)}class ac{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new jn,{get:r,set:s}=t(n.track.bind(n),n.trigger.bind(n));this._get=r,this._set=s}get value(){return this._value=this._get()}set value(t){this._set(t)}}function fc(e){return new ac(e)}class dc{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new jn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=an-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&ae!==this)return ci(this,!0),!0}get value(){const t=this.dep.track();return fi(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function hc(e,t,n=!1){let r,s;return Q(e)?r=e:(r=e.get,s=e.set),new dc(r,s,n)}const Sn={},In=new WeakMap;let Rt;function pc(e,t=!1,n=Rt){if(n){let r=In.get(n);r||In.set(n,r=[]),r.push(e)}}function gc(e,t,n=te){const{immediate:r,deep:s,once:o,scheduler:i,augmentJob:c,call:l}=n,a=_=>s?_:Fe(_)||s===!1||s===0?it(_,1):it(_);let u,f,g,p,b=!1,w=!1;if(Se(e)?(f=()=>e.value,b=Fe(e)):Ut(e)?(f=()=>a(e),b=!0):W(e)?(w=!0,b=e.some(_=>Ut(_)||Fe(_)),f=()=>e.map(_=>{if(Se(_))return _.value;if(Ut(_))return a(_);if(Q(_))return l?l(_,2):_()})):Q(e)?t?f=l?()=>l(e,2):e:f=()=>{if(g){wt();try{g()}finally{Et()}}const _=Rt;Rt=u;try{return l?l(e,3,[p]):e(p)}finally{Rt=_}}:f=et,t&&s){const _=f,G=s===!0?1/0:s;f=()=>it(_(),G)}const B=Vl(),S=()=>{u.stop(),B&&B.active&&ns(B.effects,u)};if(o&&t){const _=t;t=(...G)=>{_(...G),S()}}let R=w?new Array(e.length).fill(Sn):Sn;const P=_=>{if(!(!(u.flags&1)||!u.dirty&&!_))if(t){const G=u.run();if(s||b||(w?G.some((N,L)=>xe(N,R[L])):xe(G,R))){g&&g();const N=Rt;Rt=u;try{const L=[G,R===Sn?void 0:w&&R[0]===Sn?[]:R,p];l?l(t,3,L):t(...L),R=G}finally{Rt=N}}}else u.run()};return c&&c(P),u=new ii(f),u.scheduler=i?()=>i(P,!1):P,p=_=>pc(_,!1,u),g=u.onStop=()=>{const _=In.get(u);if(_){if(l)l(_,4);else for(const G of _)G();In.delete(u)}},t?r?P(!0):R=u.run():i?i(P.bind(null,!0),!0):u.run(),S.pause=u.pause.bind(u),S.resume=u.resume.bind(u),S.stop=S,S}function it(e,t=1/0,n){if(t<=0||!he(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Se(e))it(e.value,t,n);else if(W(e))for(let r=0;r{it(r,t,n)});else if(Zo(e)){for(const r in e)it(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&it(e[r],t,n)}return e}/** * @vue/runtime-core v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function yn(e,t,n,r){try{return r?e(...r):e()}catch(s){zn(s,t,n)}}function tt(e,t,n,r){if(Q(e)){const s=yn(e,t,n,r);return s&&Qo(s)&&s.catch(o=>{zn(o,t,n)}),s}if(W(e)){const s=[];for(let o=0;o>>1,s=Te[r],o=dn(s);o=dn(n)?Te.push(e):Te.splice(_c(t),0,e),e.flags|=1,Pi()}}function Pi(){In||(In=Ri.then(Ti))}function yc(e){W(e)?Ut.push(...e):pt&&e.id===-1?pt.splice(Ot+1,0,e):e.flags&1||(Ut.push(e),e.flags|=1),Pi()}function Bs(e,t,n=Qe+1){for(;ndn(n)-dn(r));if(Ut.length=0,pt){pt.push(...t);return}for(pt=t,Ot=0;Ote.id==null?e.flags&2?-1:1/0:e.id;function Ti(e){try{for(Qe=0;Qe{r._d&&Us(-1);const o=Mn(t);let i;try{i=e(...s)}finally{Mn(o),r._d&&Us(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function Bn(e,t){if(ye===null)return e;const n=Yn(ye),r=e.dirs||(e.dirs=[]);for(let s=0;se.__isTeleport;function ps(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ps(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}/*! #__NO_SIDE_EFFECTS__ */function Me(e,t){return Q(e)?ve({name:e.name},t,{setup:e}):e}function Ii(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Nn(e,t,n,r,s=!1){if(W(e)){e.forEach((b,w)=>Nn(b,t&&(W(t)?t[w]:t),n,r,s));return}if(Ht(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Nn(e,t,n,r.component.subTree);return}const o=r.shapeFlag&4?Yn(r.component):r.el,i=s?null:o,{i:c,r:l}=e,a=t&&t.r,u=c.refs===te?c.refs={}:c.refs,f=c.setupState,g=se(f),p=f===te?()=>!1:b=>oe(g,b);if(a!=null&&a!==l&&(pe(a)?(u[a]=null,p(a)&&(f[a]=null)):Se(a)&&(a.value=null)),Q(l))yn(l,c,12,[i,u]);else{const b=pe(l),w=Se(l);if(b||w){const B=()=>{if(e.f){const S=b?p(l)?f[l]:u[l]:l.value;s?W(S)&&ns(S,o):W(S)?S.includes(o)||S.push(o):b?(u[l]=[o],p(l)&&(f[l]=u[l])):(l.value=[o],e.k&&(u[e.k]=l.value))}else b?(u[l]=i,p(l)&&(f[l]=i)):w&&(l.value=i,e.k&&(u[e.k]=i))};i?(B.id=-1,Oe(B,n)):B()}}}Vn().requestIdleCallback;Vn().cancelIdleCallback;const Ht=e=>!!e.type.__asyncLoader,Mi=e=>e.type.__isKeepAlive;function wc(e,t){Bi(e,"a",t)}function Ec(e,t){Bi(e,"da",t)}function Bi(e,t,n=Ee){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Gn(t,r,n),n){let s=n.parent;for(;s&&s.parent;)Mi(s.parent.vnode)&&Sc(r,t,n,s),s=s.parent}}function Sc(e,t,n,r){const s=Gn(t,e,r,!0);Ni(()=>{ns(r[t],s)},n)}function Gn(e,t,n=Ee,r=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{wt();const c=bn(n),l=tt(t,n,e,i);return c(),Et(),l});return r?s.unshift(o):s.push(o),o}}const ut=e=>(t,n=Ee)=>{(!gn||e==="sp")&&Gn(e,(...r)=>t(...r),n)},Cc=ut("bm"),gs=ut("m"),Rc=ut("bu"),Pc=ut("u"),Ac=ut("bum"),Ni=ut("um"),Tc=ut("sp"),xc=ut("rtg"),Ic=ut("rtc");function Mc(e,t=Ee){Gn("ec",e,t)}const Bc=Symbol.for("v-ndc");function jr(e,t,n,r){let s;const o=n,i=W(e);if(i||pe(e)){const c=i&&kt(e);let l=!1;c&&(l=!Fe(e),e=qn(e)),s=new Array(e.length);for(let a=0,u=e.length;at(c,l,void 0,o));else{const c=Object.keys(e);s=new Array(c.length);for(let l=0,a=c.length;lpn(t)?!(t.type===vt||t.type===_e&&!Oi(t.children)):!0)?e:null}const qr=e=>e?rl(e)?Yn(e):qr(e.parent):null,sn=ve(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>qr(e.parent),$root:e=>qr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Di(e),$forceUpdate:e=>e.f||(e.f=()=>{hs(e.update)}),$nextTick:e=>e.n||(e.n=ds.bind(e.proxy)),$watch:e=>eu.bind(e)}),sr=(e,t)=>e!==te&&!e.__isScriptSetup&&oe(e,t),Nc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:o,accessCache:i,type:c,appContext:l}=e;let a;if(t[0]!=="$"){const p=i[t];if(p!==void 0)switch(p){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(sr(r,t))return i[t]=1,r[t];if(s!==te&&oe(s,t))return i[t]=2,s[t];if((a=e.propsOptions[0])&&oe(a,t))return i[t]=3,o[t];if(n!==te&&oe(n,t))return i[t]=4,n[t];Kr&&(i[t]=0)}}const u=sn[t];let f,g;if(u)return t==="$attrs"&&be(e.attrs,"get",""),u(e);if((f=c.__cssModules)&&(f=f[t]))return f;if(n!==te&&oe(n,t))return i[t]=4,n[t];if(g=l.config.globalProperties,oe(g,t))return g[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:o}=e;return sr(s,t)?(s[t]=n,!0):r!==te&&oe(r,t)?(r[t]=n,!0):oe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:o}},i){let c;return!!n[i]||e!==te&&oe(e,i)||sr(t,i)||(c=o[0])&&oe(c,i)||oe(r,i)||oe(sn,i)||oe(s.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:oe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function On(e){return W(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Li(e,t){return!e||!t?e||t:W(e)&&W(t)?e.concat(t):ve({},On(e),On(t))}let Kr=!0;function Oc(e){const t=Di(e),n=e.proxy,r=e.ctx;Kr=!1,t.beforeCreate&&Ns(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:i,watch:c,provide:l,inject:a,created:u,beforeMount:f,mounted:g,beforeUpdate:p,updated:b,activated:w,deactivated:B,beforeDestroy:S,beforeUnmount:R,destroyed:P,unmounted:_,render:G,renderTracked:N,renderTriggered:L,errorCaptured:U,serverPrefetch:D,expose:V,inheritAttrs:H,components:j,directives:k,filters:J}=t;if(a&&Lc(a,r,null),i)for(const ne in i){const Z=i[ne];Q(Z)&&(r[ne]=Z.bind(n))}if(s){const ne=s.call(n,n);he(ne)&&(e.data=Kn(ne))}if(Kr=!0,o)for(const ne in o){const Z=o[ne],Ue=Q(Z)?Z.bind(n,n):Q(Z.get)?Z.get.bind(n,n):et,De=!Q(Z)&&Q(Z.set)?Z.set.bind(n):et,Re=He({get:Ue,set:De});Object.defineProperty(r,ne,{enumerable:!0,configurable:!0,get:()=>Re.value,set:ge=>Re.value=ge})}if(c)for(const ne in c)$i(c[ne],r,n,ne);if(l){const ne=Q(l)?l.call(n):l;Reflect.ownKeys(ne).forEach(Z=>{Pn(Z,ne[Z])})}u&&Ns(u,e,"c");function de(ne,Z){W(Z)?Z.forEach(Ue=>ne(Ue.bind(n))):Z&&ne(Z.bind(n))}if(de(Cc,f),de(gs,g),de(Rc,p),de(Pc,b),de(wc,w),de(Ec,B),de(Mc,U),de(Ic,N),de(xc,L),de(Ac,R),de(Ni,_),de(Tc,D),W(V))if(V.length){const ne=e.exposed||(e.exposed={});V.forEach(Z=>{Object.defineProperty(ne,Z,{get:()=>n[Z],set:Ue=>n[Z]=Ue})})}else e.exposed||(e.exposed={});G&&e.render===et&&(e.render=G),H!=null&&(e.inheritAttrs=H),j&&(e.components=j),k&&(e.directives=k),D&&Ii(e)}function Lc(e,t,n=et){W(e)&&(e=zr(e));for(const r in e){const s=e[r];let o;he(s)?"default"in s?o=je(s.from||r,s.default,!0):o=je(s.from||r):o=je(s),Se(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[r]=o}}function Ns(e,t,n){tt(W(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function $i(e,t,n,r){let s=r.includes(".")?Yi(n,r):()=>n[r];if(pe(e)){const o=t[e];Q(o)&&on(s,o)}else if(Q(e))on(s,e.bind(n));else if(he(e))if(W(e))e.forEach(o=>$i(o,t,n,r));else{const o=Q(e.handler)?e.handler.bind(n):t[e.handler];Q(o)&&on(s,o,e)}}function Di(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,c=o.get(t);let l;return c?l=c:!s.length&&!n&&!r?l=t:(l={},s.length&&s.forEach(a=>Ln(l,a,i,!0)),Ln(l,t,i)),he(t)&&o.set(t,l),l}function Ln(e,t,n,r=!1){const{mixins:s,extends:o}=t;o&&Ln(e,o,n,!0),s&&s.forEach(i=>Ln(e,i,n,!0));for(const i in t)if(!(r&&i==="expose")){const c=$c[i]||n&&n[i];e[i]=c?c(e[i],t[i]):t[i]}return e}const $c={data:Os,props:Ls,emits:Ls,methods:Zt,computed:Zt,beforeCreate:Ae,created:Ae,beforeMount:Ae,mounted:Ae,beforeUpdate:Ae,updated:Ae,beforeDestroy:Ae,beforeUnmount:Ae,destroyed:Ae,unmounted:Ae,activated:Ae,deactivated:Ae,errorCaptured:Ae,serverPrefetch:Ae,components:Zt,directives:Zt,watch:Fc,provide:Os,inject:Dc};function Os(e,t){return t?e?function(){return ve(Q(e)?e.call(this,this):e,Q(t)?t.call(this,this):t)}:t:e}function Dc(e,t){return Zt(zr(e),zr(t))}function zr(e){if(W(e)){const t={};for(let n=0;n1)return n&&Q(t)?t.call(r&&r.proxy):t}}const ki={},Ui=()=>Object.create(ki),Hi=e=>Object.getPrototypeOf(e)===ki;function Hc(e,t,n,r=!1){const s={},o=Ui();e.propsDefaults=Object.create(null),Vi(e,t,s,o);for(const i in e.propsOptions[0])i in s||(s[i]=void 0);n?e.props=r?s:bi(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function Vc(e,t,n,r){const{props:s,attrs:o,vnode:{patchFlag:i}}=e,c=se(s),[l]=e.propsOptions;let a=!1;if((r||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let f=0;f{l=!0;const[g,p]=ji(f,t,!0);ve(i,g),p&&c.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!l)return he(e)&&r.set(e,Dt),Dt;if(W(o))for(let u=0;ue[0]==="_"||e==="$stable",ms=e=>W(e)?e.map(Ze):[Ze(e)],qc=(e,t,n)=>{if(t._n)return t;const r=yt((...s)=>ms(t(...s)),n);return r._c=!1,r},Ki=(e,t,n)=>{const r=e._ctx;for(const s in e){if(qi(s))continue;const o=e[s];if(Q(o))t[s]=qc(s,o,r);else if(o!=null){const i=ms(o);t[s]=()=>i}}},zi=(e,t)=>{const n=ms(t);e.slots.default=()=>n},Gi=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},Kc=(e,t,n)=>{const r=e.slots=Ui();if(e.vnode.shapeFlag&32){const s=t._;s?(Gi(r,t,n),n&&ti(r,"_",s,!0)):Ki(t,r)}else t&&zi(e,t)},zc=(e,t,n)=>{const{vnode:r,slots:s}=e;let o=!0,i=te;if(r.shapeFlag&32){const c=t._;c?n&&c===1?o=!1:Gi(s,t,n):(o=!t.$stable,Ki(t,s)),i=t}else t&&(zi(e,t),i={default:1});if(o)for(const c in s)!qi(c)&&i[c]==null&&delete s[c]},Oe=iu;function Gc(e){return Wc(e)}function Wc(e,t){const n=Vn();n.__VUE__=!0;const{insert:r,remove:s,patchProp:o,createElement:i,createText:c,createComment:l,setText:a,setElementText:u,parentNode:f,nextSibling:g,setScopeId:p=et,insertStaticContent:b}=e,w=(d,h,m,v=null,C=null,E=null,O=void 0,I=null,T=!!h.dynamicChildren)=>{if(d===h)return;d&&!Jt(d,h)&&(v=y(d),ge(d,C,E,!0),d=null),h.patchFlag===-2&&(T=!1,h.dynamicChildren=null);const{type:A,ref:z,shapeFlag:$}=h;switch(A){case Jn:B(d,h,m,v);break;case vt:S(d,h,m,v);break;case ir:d==null&&R(h,m,v,O);break;case _e:j(d,h,m,v,C,E,O,I,T);break;default:$&1?G(d,h,m,v,C,E,O,I,T):$&6?k(d,h,m,v,C,E,O,I,T):($&64||$&128)&&A.process(d,h,m,v,C,E,O,I,T,F)}z!=null&&C&&Nn(z,d&&d.ref,E,h||d,!h)},B=(d,h,m,v)=>{if(d==null)r(h.el=c(h.children),m,v);else{const C=h.el=d.el;h.children!==d.children&&a(C,h.children)}},S=(d,h,m,v)=>{d==null?r(h.el=l(h.children||""),m,v):h.el=d.el},R=(d,h,m,v)=>{[d.el,d.anchor]=b(d.children,h,m,v,d.el,d.anchor)},P=({el:d,anchor:h},m,v)=>{let C;for(;d&&d!==h;)C=g(d),r(d,m,v),d=C;r(h,m,v)},_=({el:d,anchor:h})=>{let m;for(;d&&d!==h;)m=g(d),s(d),d=m;s(h)},G=(d,h,m,v,C,E,O,I,T)=>{h.type==="svg"?O="svg":h.type==="math"&&(O="mathml"),d==null?N(h,m,v,C,E,O,I,T):D(d,h,C,E,O,I,T)},N=(d,h,m,v,C,E,O,I)=>{let T,A;const{props:z,shapeFlag:$,transition:q,dirs:Y}=d;if(T=d.el=i(d.type,E,z&&z.is,z),$&8?u(T,d.children):$&16&&U(d.children,T,null,v,C,or(d,E),O,I),Y&&St(d,null,v,"created"),L(T,d,d.scopeId,O,v),z){for(const ue in z)ue!=="value"&&!tn(ue)&&o(T,ue,null,z[ue],E,v);"value"in z&&o(T,"value",null,z.value,E),(A=z.onVnodeBeforeMount)&&Je(A,v,d)}Y&&St(d,null,v,"beforeMount");const X=Jc(C,q);X&&q.beforeEnter(T),r(T,h,m),((A=z&&z.onVnodeMounted)||X||Y)&&Oe(()=>{A&&Je(A,v,d),X&&q.enter(T),Y&&St(d,null,v,"mounted")},C)},L=(d,h,m,v,C)=>{if(m&&p(d,m),v)for(let E=0;E{for(let A=T;A{const I=h.el=d.el;let{patchFlag:T,dynamicChildren:A,dirs:z}=h;T|=d.patchFlag&16;const $=d.props||te,q=h.props||te;let Y;if(m&&Ct(m,!1),(Y=q.onVnodeBeforeUpdate)&&Je(Y,m,h,d),z&&St(h,d,m,"beforeUpdate"),m&&Ct(m,!0),($.innerHTML&&q.innerHTML==null||$.textContent&&q.textContent==null)&&u(I,""),A?V(d.dynamicChildren,A,I,m,v,or(h,C),E):O||Z(d,h,I,null,m,v,or(h,C),E,!1),T>0){if(T&16)H(I,$,q,m,C);else if(T&2&&$.class!==q.class&&o(I,"class",null,q.class,C),T&4&&o(I,"style",$.style,q.style,C),T&8){const X=h.dynamicProps;for(let ue=0;ue{Y&&Je(Y,m,h,d),z&&St(h,d,m,"updated")},v)},V=(d,h,m,v,C,E,O)=>{for(let I=0;I{if(h!==m){if(h!==te)for(const E in h)!tn(E)&&!(E in m)&&o(d,E,h[E],null,C,v);for(const E in m){if(tn(E))continue;const O=m[E],I=h[E];O!==I&&E!=="value"&&o(d,E,I,O,C,v)}"value"in m&&o(d,"value",h.value,m.value,C)}},j=(d,h,m,v,C,E,O,I,T)=>{const A=h.el=d?d.el:c(""),z=h.anchor=d?d.anchor:c("");let{patchFlag:$,dynamicChildren:q,slotScopeIds:Y}=h;Y&&(I=I?I.concat(Y):Y),d==null?(r(A,m,v),r(z,m,v),U(h.children||[],m,z,C,E,O,I,T)):$>0&&$&64&&q&&d.dynamicChildren?(V(d.dynamicChildren,q,m,C,E,O,I),(h.key!=null||C&&h===C.subTree)&&Wi(d,h,!0)):Z(d,h,m,z,C,E,O,I,T)},k=(d,h,m,v,C,E,O,I,T)=>{h.slotScopeIds=I,d==null?h.shapeFlag&512?C.ctx.activate(h,m,v,O,T):J(h,m,v,C,E,O,T):Ce(d,h,T)},J=(d,h,m,v,C,E,O)=>{const I=d.component=hu(d,v,C);if(Mi(d)&&(I.ctx.renderer=F),gu(I,!1,O),I.asyncDep){if(C&&C.registerDep(I,de,O),!d.el){const T=I.subTree=ie(vt);S(null,T,h,m)}}else de(I,d,h,m,C,E,O)},Ce=(d,h,m)=>{const v=h.component=d.component;if(su(d,h,m))if(v.asyncDep&&!v.asyncResolved){ne(v,h,m);return}else v.next=h,v.update();else h.el=d.el,v.vnode=h},de=(d,h,m,v,C,E,O)=>{const I=()=>{if(d.isMounted){let{next:$,bu:q,u:Y,parent:X,vnode:ue}=d;{const Ge=Ji(d);if(Ge){$&&($.el=ue.el,ne(d,$,O)),Ge.asyncDep.then(()=>{d.isUnmounted||I()});return}}let le=$,Be;Ct(d,!1),$?($.el=ue.el,ne(d,$,O)):$=ue,q&&Rn(q),(Be=$.props&&$.props.onVnodeBeforeUpdate)&&Je(Be,X,$,ue),Ct(d,!0);const xe=Fs(d),ze=d.subTree;d.subTree=xe,w(ze,xe,f(ze.el),y(ze),d,C,E),$.el=xe.el,le===null&&ou(d,xe.el),Y&&Oe(Y,C),(Be=$.props&&$.props.onVnodeUpdated)&&Oe(()=>Je(Be,X,$,ue),C)}else{let $;const{el:q,props:Y}=h,{bm:X,m:ue,parent:le,root:Be,type:xe}=d,ze=Ht(h);Ct(d,!1),X&&Rn(X),!ze&&($=Y&&Y.onVnodeBeforeMount)&&Je($,le,h),Ct(d,!0);{Be.ce&&Be.ce._injectChildStyle(xe);const Ge=d.subTree=Fs(d);w(null,Ge,m,v,d,C,E),h.el=Ge.el}if(ue&&Oe(ue,C),!ze&&($=Y&&Y.onVnodeMounted)){const Ge=h;Oe(()=>Je($,le,Ge),C)}(h.shapeFlag&256||le&&Ht(le.vnode)&&le.vnode.shapeFlag&256)&&d.a&&Oe(d.a,C),d.isMounted=!0,h=m=v=null}};d.scope.on();const T=d.effect=new ii(I);d.scope.off();const A=d.update=T.run.bind(T),z=d.job=T.runIfDirty.bind(T);z.i=d,z.id=d.uid,T.scheduler=()=>hs(z),Ct(d,!0),A()},ne=(d,h,m)=>{h.component=d;const v=d.vnode.props;d.vnode=h,d.next=null,Vc(d,h.props,v,m),zc(d,h.children,m),wt(),Bs(d),Et()},Z=(d,h,m,v,C,E,O,I,T=!1)=>{const A=d&&d.children,z=d?d.shapeFlag:0,$=h.children,{patchFlag:q,shapeFlag:Y}=h;if(q>0){if(q&128){De(A,$,m,v,C,E,O,I,T);return}else if(q&256){Ue(A,$,m,v,C,E,O,I,T);return}}Y&8?(z&16&&Pe(A,C,E),$!==A&&u(m,$)):z&16?Y&16?De(A,$,m,v,C,E,O,I,T):Pe(A,C,E,!0):(z&8&&u(m,""),Y&16&&U($,m,v,C,E,O,I,T))},Ue=(d,h,m,v,C,E,O,I,T)=>{d=d||Dt,h=h||Dt;const A=d.length,z=h.length,$=Math.min(A,z);let q;for(q=0;q<$;q++){const Y=h[q]=T?gt(h[q]):Ze(h[q]);w(d[q],Y,m,null,C,E,O,I,T)}A>z?Pe(d,C,E,!0,!1,$):U(h,m,v,C,E,O,I,T,$)},De=(d,h,m,v,C,E,O,I,T)=>{let A=0;const z=h.length;let $=d.length-1,q=z-1;for(;A<=$&&A<=q;){const Y=d[A],X=h[A]=T?gt(h[A]):Ze(h[A]);if(Jt(Y,X))w(Y,X,m,null,C,E,O,I,T);else break;A++}for(;A<=$&&A<=q;){const Y=d[$],X=h[q]=T?gt(h[q]):Ze(h[q]);if(Jt(Y,X))w(Y,X,m,null,C,E,O,I,T);else break;$--,q--}if(A>$){if(A<=q){const Y=q+1,X=Yq)for(;A<=$;)ge(d[A],C,E,!0),A++;else{const Y=A,X=A,ue=new Map;for(A=X;A<=q;A++){const Ne=h[A]=T?gt(h[A]):Ze(h[A]);Ne.key!=null&&ue.set(Ne.key,A)}let le,Be=0;const xe=q-X+1;let ze=!1,Ge=0;const Gt=new Array(xe);for(A=0;A=xe){ge(Ne,C,E,!0);continue}let We;if(Ne.key!=null)We=ue.get(Ne.key);else for(le=X;le<=q;le++)if(Gt[le-X]===0&&Jt(Ne,h[le])){We=le;break}We===void 0?ge(Ne,C,E,!0):(Gt[We-X]=A+1,We>=Ge?Ge=We:ze=!0,w(Ne,h[We],m,null,C,E,O,I,T),Be++)}const As=ze?Yc(Gt):Dt;for(le=As.length-1,A=xe-1;A>=0;A--){const Ne=X+A,We=h[Ne],Ts=Ne+1{const{el:E,type:O,transition:I,children:T,shapeFlag:A}=d;if(A&6){Re(d.component.subTree,h,m,v);return}if(A&128){d.suspense.move(h,m,v);return}if(A&64){O.move(d,h,m,F);return}if(O===_e){r(E,h,m);for(let $=0;$I.enter(E),C);else{const{leave:$,delayLeave:q,afterLeave:Y}=I,X=()=>r(E,h,m),ue=()=>{$(E,()=>{X(),Y&&Y()})};q?q(E,X,ue):ue()}else r(E,h,m)},ge=(d,h,m,v=!1,C=!1)=>{const{type:E,props:O,ref:I,children:T,dynamicChildren:A,shapeFlag:z,patchFlag:$,dirs:q,cacheIndex:Y}=d;if($===-2&&(C=!1),I!=null&&Nn(I,null,m,d,!0),Y!=null&&(h.renderCache[Y]=void 0),z&256){h.ctx.deactivate(d);return}const X=z&1&&q,ue=!Ht(d);let le;if(ue&&(le=O&&O.onVnodeBeforeUnmount)&&Je(le,h,d),z&6)ft(d.component,m,v);else{if(z&128){d.suspense.unmount(m,v);return}X&&St(d,null,h,"beforeUnmount"),z&64?d.type.remove(d,h,m,F,v):A&&!A.hasOnce&&(E!==_e||$>0&&$&64)?Pe(A,h,m,!1,!0):(E===_e&&$&384||!C&&z&16)&&Pe(T,h,m),v&&Ke(d)}(ue&&(le=O&&O.onVnodeUnmounted)||X)&&Oe(()=>{le&&Je(le,h,d),X&&St(d,null,h,"unmounted")},m)},Ke=d=>{const{type:h,el:m,anchor:v,transition:C}=d;if(h===_e){at(m,v);return}if(h===ir){_(d);return}const E=()=>{s(m),C&&!C.persisted&&C.afterLeave&&C.afterLeave()};if(d.shapeFlag&1&&C&&!C.persisted){const{leave:O,delayLeave:I}=C,T=()=>O(m,E);I?I(d.el,E,T):T()}else E()},at=(d,h)=>{let m;for(;d!==h;)m=g(d),s(d),d=m;s(h)},ft=(d,h,m)=>{const{bum:v,scope:C,job:E,subTree:O,um:I,m:T,a:A}=d;Ds(T),Ds(A),v&&Rn(v),C.stop(),E&&(E.flags|=8,ge(O,d,h,m)),I&&Oe(I,h),Oe(()=>{d.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&d.asyncDep&&!d.asyncResolved&&d.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve())},Pe=(d,h,m,v=!1,C=!1,E=0)=>{for(let O=E;O{if(d.shapeFlag&6)return y(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const h=g(d.anchor||d.el),m=h&&h[vc];return m?g(m):h};let M=!1;const x=(d,h,m)=>{d==null?h._vnode&&ge(h._vnode,null,null,!0):w(h._vnode||null,d,h,null,null,null,m),h._vnode=d,M||(M=!0,Bs(),Ai(),M=!1)},F={p:w,um:ge,m:Re,r:Ke,mt:J,mc:U,pc:Z,pbc:V,n:y,o:e};return{render:x,hydrate:void 0,createApp:Uc(x)}}function or({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Ct({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Jc(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Wi(e,t,n=!1){const r=e.children,s=t.children;if(W(r)&&W(s))for(let o=0;o>1,e[n[c]]0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function Ji(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ji(t)}function Ds(e){if(e)for(let t=0;tje(Qc);function Zc(e,t){return _s(e,null,{flush:"sync"})}function on(e,t,n){return _s(e,t,n)}function _s(e,t,n=te){const{immediate:r,deep:s,flush:o,once:i}=n,c=ve({},n),l=t&&r||!t&&o!=="post";let a;if(gn){if(o==="sync"){const p=Xc();a=p.__watcherHandles||(p.__watcherHandles=[])}else if(!l){const p=()=>{};return p.stop=et,p.resume=et,p.pause=et,p}}const u=Ee;c.call=(p,b,w)=>tt(p,u,b,w);let f=!1;o==="post"?c.scheduler=p=>{Oe(p,u&&u.suspense)}:o!=="sync"&&(f=!0,c.scheduler=(p,b)=>{b?p():hs(p)}),c.augmentJob=p=>{t&&(p.flags|=4),f&&(p.flags|=2,u&&(p.id=u.uid,p.i=u))};const g=gc(e,t,c);return gn&&(a?a.push(g):l&&g()),g}function eu(e,t,n){const r=this.proxy,s=pe(e)?e.includes(".")?Yi(r,e):()=>r[e]:e.bind(r,r);let o;Q(t)?o=t:(o=t.handler,n=t);const i=bn(this),c=_s(s,o.bind(r),n);return i(),c}function Yi(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;s{let u,f=te,g;return Zc(()=>{const p=e[s];Ie(u,p)&&(u=p,a())}),{get(){return l(),n.get?n.get(u):u},set(p){const b=n.set?n.set(p):p;if(!Ie(b,u)&&!(f!==te&&Ie(p,f)))return;const w=r.vnode.props;w&&(t in w||s in w||o in w)&&(`onUpdate:${t}`in w||`onUpdate:${s}`in w||`onUpdate:${o}`in w)||(u=p,a()),r.emit(`update:${t}`,b),Ie(p,b)&&Ie(p,f)&&!Ie(b,g)&&a(),f=p,g=b}}});return c[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?i||te:c,done:!1}:{done:!0}}}},c}const Xi=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${lt(t)}Modifiers`]||e[`${bt(t)}Modifiers`];function tu(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||te;let s=n;const o=t.startsWith("update:"),i=o&&Xi(r,t.slice(7));i&&(i.trim&&(s=n.map(u=>pe(u)?u.trim():u)),i.number&&(s=n.map(Dr)));let c,l=r[c=Zn(t)]||r[c=Zn(lt(t))];!l&&o&&(l=r[c=Zn(bt(t))]),l&&tt(l,e,6,s);const a=r[c+"Once"];if(a){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,tt(a,e,6,s)}}function Zi(e,t,n=!1){const r=t.emitsCache,s=r.get(e);if(s!==void 0)return s;const o=e.emits;let i={},c=!1;if(!Q(e)){const l=a=>{const u=Zi(a,t,!0);u&&(c=!0,ve(i,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!c?(he(e)&&r.set(e,null),null):(W(o)?o.forEach(l=>i[l]=null):ve(i,o),he(e)&&r.set(e,i),i)}function Wn(e,t){return!e||!kn(t)?!1:(t=t.slice(2).replace(/Once$/,""),oe(e,t[0].toLowerCase()+t.slice(1))||oe(e,bt(t))||oe(e,t))}function Fs(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[o],slots:i,attrs:c,emit:l,render:a,renderCache:u,props:f,data:g,setupState:p,ctx:b,inheritAttrs:w}=e,B=Mn(e);let S,R;try{if(n.shapeFlag&4){const _=s||r,G=_;S=Ze(a.call(G,_,u,f,p,g,b)),R=c}else{const _=t;S=Ze(_.length>1?_(f,{attrs:c,slots:i,emit:l}):_(f,null)),R=t.props?c:nu(c)}}catch(_){ln.length=0,zn(_,e,1),S=ie(vt)}let P=S;if(R&&w!==!1){const _=Object.keys(R),{shapeFlag:G}=P;_.length&&G&7&&(o&&_.some(ts)&&(R=ru(R,o)),P=qt(P,R,!1,!0))}return n.dirs&&(P=qt(P,null,!1,!0),P.dirs=P.dirs?P.dirs.concat(n.dirs):n.dirs),n.transition&&ps(P,n.transition),S=P,Mn(B),S}const nu=e=>{let t;for(const n in e)(n==="class"||n==="style"||kn(n))&&((t||(t={}))[n]=e[n]);return t},ru=(e,t)=>{const n={};for(const r in e)(!ts(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function su(e,t,n){const{props:r,children:s,component:o}=e,{props:i,children:c,patchFlag:l}=t,a=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?ks(r,i,a):!!i;if(l&8){const u=t.dynamicProps;for(let f=0;fe.__isSuspense;function iu(e,t){t&&t.pendingBranch?W(e)?t.effects.push(...e):t.effects.push(e):yc(e)}const _e=Symbol.for("v-fgt"),Jn=Symbol.for("v-txt"),vt=Symbol.for("v-cmt"),ir=Symbol.for("v-stc"),ln=[];let $e=null;function ee(e=!1){ln.push($e=e?null:[])}function lu(){ln.pop(),$e=ln[ln.length-1]||null}let hn=1;function Us(e,t=!1){hn+=e,e<0&&$e&&t&&($e.hasOnce=!0)}function tl(e){return e.dynamicChildren=hn>0?$e||Dt:null,lu(),hn>0&&$e&&$e.push(e),e}function fe(e,t,n,r,s,o){return tl(K(e,t,n,r,s,o,!0))}function Tt(e,t,n,r,s){return tl(ie(e,t,n,r,s,!0))}function pn(e){return e?e.__v_isVNode===!0:!1}function Jt(e,t){return e.type===t.type&&e.key===t.key}const nl=({key:e})=>e??null,An=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?pe(e)||Se(e)||Q(e)?{i:ye,r:e,k:t,f:!!n}:e:null);function K(e,t=null,n=null,r=0,s=null,o=e===_e?0:1,i=!1,c=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&nl(t),ref:t&&An(t),scopeId:xi,slotScopeIds:null,children:n,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:o,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:ye};return c?(ys(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=pe(n)?8:16),hn>0&&!i&&$e&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&$e.push(l),l}const ie=cu;function cu(e,t=null,n=null,r=0,s=null,o=!1){if((!e||e===Bc)&&(e=vt),pn(e)){const c=qt(e,t,!0);return n&&ys(c,n),hn>0&&!o&&$e&&(c.shapeFlag&6?$e[$e.indexOf(e)]=c:$e.push(c)),c.patchFlag=-2,c}if(vu(e)&&(e=e.__vccOpts),t){t=uu(t);let{class:c,style:l}=t;c&&!pe(c)&&(t.class=os(c)),he(l)&&(fs(l)&&!W(l)&&(l=ve({},l)),t.style=ss(l))}const i=pe(e)?1:el(e)?128:bc(e)?64:he(e)?4:Q(e)?2:0;return K(e,t,n,r,s,i,o,!0)}function uu(e){return e?fs(e)||Hi(e)?ve({},e):e:null}function qt(e,t,n=!1,r=!1){const{props:s,ref:o,patchFlag:i,children:c,transition:l}=e,a=t?au(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&nl(a),ref:t&&t.ref?n&&o?W(o)?o.concat(An(t)):[o,An(t)]:An(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:c,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==_e?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&qt(e.ssContent),ssFallback:e.ssFallback&&qt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&ps(u,l.clone(u)),u}function jt(e=" ",t=0){return ie(Jn,null,e,t)}function en(e="",t=!1){return t?(ee(),Tt(vt,null,e)):ie(vt,null,e)}function Ze(e){return e==null||typeof e=="boolean"?ie(vt):W(e)?ie(_e,null,e.slice()):pn(e)?gt(e):ie(Jn,null,String(e))}function gt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:qt(e)}function ys(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(W(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),ys(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!Hi(t)?t._ctx=ye:s===3&&ye&&(ye.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Q(t)?(t={default:t,_ctx:ye},n=32):(t=String(t),r&64?(n=16,t=[jt(t)]):n=8);e.children=t,e.shapeFlag|=n}function au(...e){const t={};for(let n=0;nEe||ye;let $n,Wr;{const e=Vn(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),o=>{s.length>1?s.forEach(i=>i(o)):s[0](o)}};$n=t("__VUE_INSTANCE_SETTERS__",n=>Ee=n),Wr=t("__VUE_SSR_SETTERS__",n=>gn=n)}const bn=e=>{const t=Ee;return $n(e),e.scope.on(),()=>{e.scope.off(),$n(t)}},Hs=()=>{Ee&&Ee.scope.off(),$n(null)};function rl(e){return e.vnode.shapeFlag&4}let gn=!1;function gu(e,t=!1,n=!1){t&&Wr(t);const{props:r,children:s}=e.vnode,o=rl(e);Hc(e,r,o,t),Kc(e,s,n);const i=o?mu(e,t):void 0;return t&&Wr(!1),i}function mu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Nc);const{setup:r}=n;if(r){wt();const s=e.setupContext=r.length>1?yu(e):null,o=bn(e),i=yn(r,e,0,[e.props,s]),c=Qo(i);if(Et(),o(),(c||e.sp)&&!Ht(e)&&Ii(e),c){if(i.then(Hs,Hs),t)return i.then(l=>{Vs(e,l)}).catch(l=>{zn(l,e,0)});e.asyncDep=i}else Vs(e,i)}else sl(e)}function Vs(e,t,n){Q(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:he(t)&&(e.setupState=Ci(t)),sl(e)}function sl(e,t,n){const r=e.type;e.render||(e.render=r.render||et);{const s=bn(e);wt();try{Oc(e)}finally{Et(),s()}}}const _u={get(e,t){return be(e,"get",""),e[t]}};function yu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,_u),slots:e.slots,emit:e.emit,expose:t}}function Yn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ci(Ei(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in sn)return sn[n](e)},has(t,n){return n in t||n in sn}})):e.proxy}function vu(e){return Q(e)&&"__vccOpts"in e}const He=(e,t)=>hc(e,t,gn);function vs(e,t,n){const r=arguments.length;return r===2?he(t)&&!W(t)?pn(t)?ie(e,null,[t]):ie(e,t):ie(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&pn(n)&&(n=[n]),ie(e,t,n))}const bu="3.5.13";/** +**/function yn(e,t,n,r){try{return r?e(...r):e()}catch(s){zn(s,t,n)}}function tt(e,t,n,r){if(Q(e)){const s=yn(e,t,n,r);return s&&Qo(s)&&s.catch(o=>{zn(o,t,n)}),s}if(W(e)){const s=[];for(let o=0;o>>1,s=Te[r],o=dn(s);o=dn(n)?Te.push(e):Te.splice(_c(t),0,e),e.flags|=1,Pi()}}function Pi(){xn||(xn=Ri.then(Ti))}function yc(e){W(e)?kt.push(...e):pt&&e.id===-1?pt.splice(Ot+1,0,e):e.flags&1||(kt.push(e),e.flags|=1),Pi()}function Bs(e,t,n=Qe+1){for(;ndn(n)-dn(r));if(kt.length=0,pt){pt.push(...t);return}for(pt=t,Ot=0;Ote.id==null?e.flags&2?-1:1/0:e.id;function Ti(e){try{for(Qe=0;Qe{r._d&&ks(-1);const o=Mn(t);let i;try{i=e(...s)}finally{Mn(o),r._d&&ks(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function Bn(e,t){if(ye===null)return e;const n=Yn(ye),r=e.dirs||(e.dirs=[]);for(let s=0;se.__isTeleport;function ps(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ps(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}/*! #__NO_SIDE_EFFECTS__ */function Me(e,t){return Q(e)?ve({name:e.name},t,{setup:e}):e}function xi(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Nn(e,t,n,r,s=!1){if(W(e)){e.forEach((b,w)=>Nn(b,t&&(W(t)?t[w]:t),n,r,s));return}if(Ht(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Nn(e,t,n,r.component.subTree);return}const o=r.shapeFlag&4?Yn(r.component):r.el,i=s?null:o,{i:c,r:l}=e,a=t&&t.r,u=c.refs===te?c.refs={}:c.refs,f=c.setupState,g=se(f),p=f===te?()=>!1:b=>oe(g,b);if(a!=null&&a!==l&&(pe(a)?(u[a]=null,p(a)&&(f[a]=null)):Se(a)&&(a.value=null)),Q(l))yn(l,c,12,[i,u]);else{const b=pe(l),w=Se(l);if(b||w){const B=()=>{if(e.f){const S=b?p(l)?f[l]:u[l]:l.value;s?W(S)&&ns(S,o):W(S)?S.includes(o)||S.push(o):b?(u[l]=[o],p(l)&&(f[l]=u[l])):(l.value=[o],e.k&&(u[e.k]=l.value))}else b?(u[l]=i,p(l)&&(f[l]=i)):w&&(l.value=i,e.k&&(u[e.k]=i))};i?(B.id=-1,Oe(B,n)):B()}}}Vn().requestIdleCallback;Vn().cancelIdleCallback;const Ht=e=>!!e.type.__asyncLoader,Mi=e=>e.type.__isKeepAlive;function wc(e,t){Bi(e,"a",t)}function Ec(e,t){Bi(e,"da",t)}function Bi(e,t,n=Ee){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Gn(t,r,n),n){let s=n.parent;for(;s&&s.parent;)Mi(s.parent.vnode)&&Sc(r,t,n,s),s=s.parent}}function Sc(e,t,n,r){const s=Gn(t,e,r,!0);Ni(()=>{ns(r[t],s)},n)}function Gn(e,t,n=Ee,r=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{wt();const c=bn(n),l=tt(t,n,e,i);return c(),Et(),l});return r?s.unshift(o):s.push(o),o}}const ut=e=>(t,n=Ee)=>{(!gn||e==="sp")&&Gn(e,(...r)=>t(...r),n)},Cc=ut("bm"),gs=ut("m"),Rc=ut("bu"),Pc=ut("u"),Ac=ut("bum"),Ni=ut("um"),Tc=ut("sp"),Ic=ut("rtg"),xc=ut("rtc");function Mc(e,t=Ee){Gn("ec",e,t)}const Bc=Symbol.for("v-ndc");function jr(e,t,n,r){let s;const o=n,i=W(e);if(i||pe(e)){const c=i&&Ut(e);let l=!1;c&&(l=!Fe(e),e=qn(e)),s=new Array(e.length);for(let a=0,u=e.length;at(c,l,void 0,o));else{const c=Object.keys(e);s=new Array(c.length);for(let l=0,a=c.length;lpn(t)?!(t.type===vt||t.type===_e&&!Oi(t.children)):!0)?e:null}const qr=e=>e?rl(e)?Yn(e):qr(e.parent):null,sn=ve(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>qr(e.parent),$root:e=>qr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Di(e),$forceUpdate:e=>e.f||(e.f=()=>{hs(e.update)}),$nextTick:e=>e.n||(e.n=ds.bind(e.proxy)),$watch:e=>eu.bind(e)}),sr=(e,t)=>e!==te&&!e.__isScriptSetup&&oe(e,t),Nc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:o,accessCache:i,type:c,appContext:l}=e;let a;if(t[0]!=="$"){const p=i[t];if(p!==void 0)switch(p){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(sr(r,t))return i[t]=1,r[t];if(s!==te&&oe(s,t))return i[t]=2,s[t];if((a=e.propsOptions[0])&&oe(a,t))return i[t]=3,o[t];if(n!==te&&oe(n,t))return i[t]=4,n[t];Kr&&(i[t]=0)}}const u=sn[t];let f,g;if(u)return t==="$attrs"&&be(e.attrs,"get",""),u(e);if((f=c.__cssModules)&&(f=f[t]))return f;if(n!==te&&oe(n,t))return i[t]=4,n[t];if(g=l.config.globalProperties,oe(g,t))return g[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:o}=e;return sr(s,t)?(s[t]=n,!0):r!==te&&oe(r,t)?(r[t]=n,!0):oe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:o}},i){let c;return!!n[i]||e!==te&&oe(e,i)||sr(t,i)||(c=o[0])&&oe(c,i)||oe(r,i)||oe(sn,i)||oe(s.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:oe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function On(e){return W(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Li(e,t){return!e||!t?e||t:W(e)&&W(t)?e.concat(t):ve({},On(e),On(t))}let Kr=!0;function Oc(e){const t=Di(e),n=e.proxy,r=e.ctx;Kr=!1,t.beforeCreate&&Ns(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:i,watch:c,provide:l,inject:a,created:u,beforeMount:f,mounted:g,beforeUpdate:p,updated:b,activated:w,deactivated:B,beforeDestroy:S,beforeUnmount:R,destroyed:P,unmounted:_,render:G,renderTracked:N,renderTriggered:L,errorCaptured:k,serverPrefetch:D,expose:V,inheritAttrs:H,components:j,directives:U,filters:J}=t;if(a&&Lc(a,r,null),i)for(const ne in i){const Z=i[ne];Q(Z)&&(r[ne]=Z.bind(n))}if(s){const ne=s.call(n,n);he(ne)&&(e.data=Kn(ne))}if(Kr=!0,o)for(const ne in o){const Z=o[ne],ke=Q(Z)?Z.bind(n,n):Q(Z.get)?Z.get.bind(n,n):et,De=!Q(Z)&&Q(Z.set)?Z.set.bind(n):et,Re=He({get:ke,set:De});Object.defineProperty(r,ne,{enumerable:!0,configurable:!0,get:()=>Re.value,set:ge=>Re.value=ge})}if(c)for(const ne in c)$i(c[ne],r,n,ne);if(l){const ne=Q(l)?l.call(n):l;Reflect.ownKeys(ne).forEach(Z=>{Pn(Z,ne[Z])})}u&&Ns(u,e,"c");function de(ne,Z){W(Z)?Z.forEach(ke=>ne(ke.bind(n))):Z&&ne(Z.bind(n))}if(de(Cc,f),de(gs,g),de(Rc,p),de(Pc,b),de(wc,w),de(Ec,B),de(Mc,k),de(xc,N),de(Ic,L),de(Ac,R),de(Ni,_),de(Tc,D),W(V))if(V.length){const ne=e.exposed||(e.exposed={});V.forEach(Z=>{Object.defineProperty(ne,Z,{get:()=>n[Z],set:ke=>n[Z]=ke})})}else e.exposed||(e.exposed={});G&&e.render===et&&(e.render=G),H!=null&&(e.inheritAttrs=H),j&&(e.components=j),U&&(e.directives=U),D&&xi(e)}function Lc(e,t,n=et){W(e)&&(e=zr(e));for(const r in e){const s=e[r];let o;he(s)?"default"in s?o=je(s.from||r,s.default,!0):o=je(s.from||r):o=je(s),Se(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[r]=o}}function Ns(e,t,n){tt(W(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function $i(e,t,n,r){let s=r.includes(".")?Yi(n,r):()=>n[r];if(pe(e)){const o=t[e];Q(o)&&on(s,o)}else if(Q(e))on(s,e.bind(n));else if(he(e))if(W(e))e.forEach(o=>$i(o,t,n,r));else{const o=Q(e.handler)?e.handler.bind(n):t[e.handler];Q(o)&&on(s,o,e)}}function Di(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,c=o.get(t);let l;return c?l=c:!s.length&&!n&&!r?l=t:(l={},s.length&&s.forEach(a=>Ln(l,a,i,!0)),Ln(l,t,i)),he(t)&&o.set(t,l),l}function Ln(e,t,n,r=!1){const{mixins:s,extends:o}=t;o&&Ln(e,o,n,!0),s&&s.forEach(i=>Ln(e,i,n,!0));for(const i in t)if(!(r&&i==="expose")){const c=$c[i]||n&&n[i];e[i]=c?c(e[i],t[i]):t[i]}return e}const $c={data:Os,props:Ls,emits:Ls,methods:Zt,computed:Zt,beforeCreate:Ae,created:Ae,beforeMount:Ae,mounted:Ae,beforeUpdate:Ae,updated:Ae,beforeDestroy:Ae,beforeUnmount:Ae,destroyed:Ae,unmounted:Ae,activated:Ae,deactivated:Ae,errorCaptured:Ae,serverPrefetch:Ae,components:Zt,directives:Zt,watch:Fc,provide:Os,inject:Dc};function Os(e,t){return t?e?function(){return ve(Q(e)?e.call(this,this):e,Q(t)?t.call(this,this):t)}:t:e}function Dc(e,t){return Zt(zr(e),zr(t))}function zr(e){if(W(e)){const t={};for(let n=0;n1)return n&&Q(t)?t.call(r&&r.proxy):t}}const Ui={},ki=()=>Object.create(Ui),Hi=e=>Object.getPrototypeOf(e)===Ui;function Hc(e,t,n,r=!1){const s={},o=ki();e.propsDefaults=Object.create(null),Vi(e,t,s,o);for(const i in e.propsOptions[0])i in s||(s[i]=void 0);n?e.props=r?s:bi(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function Vc(e,t,n,r){const{props:s,attrs:o,vnode:{patchFlag:i}}=e,c=se(s),[l]=e.propsOptions;let a=!1;if((r||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let f=0;f{l=!0;const[g,p]=ji(f,t,!0);ve(i,g),p&&c.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!l)return he(e)&&r.set(e,Dt),Dt;if(W(o))for(let u=0;ue[0]==="_"||e==="$stable",ms=e=>W(e)?e.map(Ze):[Ze(e)],qc=(e,t,n)=>{if(t._n)return t;const r=yt((...s)=>ms(t(...s)),n);return r._c=!1,r},Ki=(e,t,n)=>{const r=e._ctx;for(const s in e){if(qi(s))continue;const o=e[s];if(Q(o))t[s]=qc(s,o,r);else if(o!=null){const i=ms(o);t[s]=()=>i}}},zi=(e,t)=>{const n=ms(t);e.slots.default=()=>n},Gi=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},Kc=(e,t,n)=>{const r=e.slots=ki();if(e.vnode.shapeFlag&32){const s=t._;s?(Gi(r,t,n),n&&ti(r,"_",s,!0)):Ki(t,r)}else t&&zi(e,t)},zc=(e,t,n)=>{const{vnode:r,slots:s}=e;let o=!0,i=te;if(r.shapeFlag&32){const c=t._;c?n&&c===1?o=!1:Gi(s,t,n):(o=!t.$stable,Ki(t,s)),i=t}else t&&(zi(e,t),i={default:1});if(o)for(const c in s)!qi(c)&&i[c]==null&&delete s[c]},Oe=iu;function Gc(e){return Wc(e)}function Wc(e,t){const n=Vn();n.__VUE__=!0;const{insert:r,remove:s,patchProp:o,createElement:i,createText:c,createComment:l,setText:a,setElementText:u,parentNode:f,nextSibling:g,setScopeId:p=et,insertStaticContent:b}=e,w=(d,h,m,v=null,C=null,E=null,O=void 0,x=null,T=!!h.dynamicChildren)=>{if(d===h)return;d&&!Jt(d,h)&&(v=y(d),ge(d,C,E,!0),d=null),h.patchFlag===-2&&(T=!1,h.dynamicChildren=null);const{type:A,ref:z,shapeFlag:$}=h;switch(A){case Jn:B(d,h,m,v);break;case vt:S(d,h,m,v);break;case ir:d==null&&R(h,m,v,O);break;case _e:j(d,h,m,v,C,E,O,x,T);break;default:$&1?G(d,h,m,v,C,E,O,x,T):$&6?U(d,h,m,v,C,E,O,x,T):($&64||$&128)&&A.process(d,h,m,v,C,E,O,x,T,F)}z!=null&&C&&Nn(z,d&&d.ref,E,h||d,!h)},B=(d,h,m,v)=>{if(d==null)r(h.el=c(h.children),m,v);else{const C=h.el=d.el;h.children!==d.children&&a(C,h.children)}},S=(d,h,m,v)=>{d==null?r(h.el=l(h.children||""),m,v):h.el=d.el},R=(d,h,m,v)=>{[d.el,d.anchor]=b(d.children,h,m,v,d.el,d.anchor)},P=({el:d,anchor:h},m,v)=>{let C;for(;d&&d!==h;)C=g(d),r(d,m,v),d=C;r(h,m,v)},_=({el:d,anchor:h})=>{let m;for(;d&&d!==h;)m=g(d),s(d),d=m;s(h)},G=(d,h,m,v,C,E,O,x,T)=>{h.type==="svg"?O="svg":h.type==="math"&&(O="mathml"),d==null?N(h,m,v,C,E,O,x,T):D(d,h,C,E,O,x,T)},N=(d,h,m,v,C,E,O,x)=>{let T,A;const{props:z,shapeFlag:$,transition:q,dirs:Y}=d;if(T=d.el=i(d.type,E,z&&z.is,z),$&8?u(T,d.children):$&16&&k(d.children,T,null,v,C,or(d,E),O,x),Y&&St(d,null,v,"created"),L(T,d,d.scopeId,O,v),z){for(const ue in z)ue!=="value"&&!tn(ue)&&o(T,ue,null,z[ue],E,v);"value"in z&&o(T,"value",null,z.value,E),(A=z.onVnodeBeforeMount)&&Je(A,v,d)}Y&&St(d,null,v,"beforeMount");const X=Jc(C,q);X&&q.beforeEnter(T),r(T,h,m),((A=z&&z.onVnodeMounted)||X||Y)&&Oe(()=>{A&&Je(A,v,d),X&&q.enter(T),Y&&St(d,null,v,"mounted")},C)},L=(d,h,m,v,C)=>{if(m&&p(d,m),v)for(let E=0;E{for(let A=T;A{const x=h.el=d.el;let{patchFlag:T,dynamicChildren:A,dirs:z}=h;T|=d.patchFlag&16;const $=d.props||te,q=h.props||te;let Y;if(m&&Ct(m,!1),(Y=q.onVnodeBeforeUpdate)&&Je(Y,m,h,d),z&&St(h,d,m,"beforeUpdate"),m&&Ct(m,!0),($.innerHTML&&q.innerHTML==null||$.textContent&&q.textContent==null)&&u(x,""),A?V(d.dynamicChildren,A,x,m,v,or(h,C),E):O||Z(d,h,x,null,m,v,or(h,C),E,!1),T>0){if(T&16)H(x,$,q,m,C);else if(T&2&&$.class!==q.class&&o(x,"class",null,q.class,C),T&4&&o(x,"style",$.style,q.style,C),T&8){const X=h.dynamicProps;for(let ue=0;ue{Y&&Je(Y,m,h,d),z&&St(h,d,m,"updated")},v)},V=(d,h,m,v,C,E,O)=>{for(let x=0;x{if(h!==m){if(h!==te)for(const E in h)!tn(E)&&!(E in m)&&o(d,E,h[E],null,C,v);for(const E in m){if(tn(E))continue;const O=m[E],x=h[E];O!==x&&E!=="value"&&o(d,E,x,O,C,v)}"value"in m&&o(d,"value",h.value,m.value,C)}},j=(d,h,m,v,C,E,O,x,T)=>{const A=h.el=d?d.el:c(""),z=h.anchor=d?d.anchor:c("");let{patchFlag:$,dynamicChildren:q,slotScopeIds:Y}=h;Y&&(x=x?x.concat(Y):Y),d==null?(r(A,m,v),r(z,m,v),k(h.children||[],m,z,C,E,O,x,T)):$>0&&$&64&&q&&d.dynamicChildren?(V(d.dynamicChildren,q,m,C,E,O,x),(h.key!=null||C&&h===C.subTree)&&Wi(d,h,!0)):Z(d,h,m,z,C,E,O,x,T)},U=(d,h,m,v,C,E,O,x,T)=>{h.slotScopeIds=x,d==null?h.shapeFlag&512?C.ctx.activate(h,m,v,O,T):J(h,m,v,C,E,O,T):Ce(d,h,T)},J=(d,h,m,v,C,E,O)=>{const x=d.component=hu(d,v,C);if(Mi(d)&&(x.ctx.renderer=F),gu(x,!1,O),x.asyncDep){if(C&&C.registerDep(x,de,O),!d.el){const T=x.subTree=ie(vt);S(null,T,h,m)}}else de(x,d,h,m,C,E,O)},Ce=(d,h,m)=>{const v=h.component=d.component;if(su(d,h,m))if(v.asyncDep&&!v.asyncResolved){ne(v,h,m);return}else v.next=h,v.update();else h.el=d.el,v.vnode=h},de=(d,h,m,v,C,E,O)=>{const x=()=>{if(d.isMounted){let{next:$,bu:q,u:Y,parent:X,vnode:ue}=d;{const Ge=Ji(d);if(Ge){$&&($.el=ue.el,ne(d,$,O)),Ge.asyncDep.then(()=>{d.isUnmounted||x()});return}}let le=$,Be;Ct(d,!1),$?($.el=ue.el,ne(d,$,O)):$=ue,q&&Rn(q),(Be=$.props&&$.props.onVnodeBeforeUpdate)&&Je(Be,X,$,ue),Ct(d,!0);const Ie=Fs(d),ze=d.subTree;d.subTree=Ie,w(ze,Ie,f(ze.el),y(ze),d,C,E),$.el=Ie.el,le===null&&ou(d,Ie.el),Y&&Oe(Y,C),(Be=$.props&&$.props.onVnodeUpdated)&&Oe(()=>Je(Be,X,$,ue),C)}else{let $;const{el:q,props:Y}=h,{bm:X,m:ue,parent:le,root:Be,type:Ie}=d,ze=Ht(h);Ct(d,!1),X&&Rn(X),!ze&&($=Y&&Y.onVnodeBeforeMount)&&Je($,le,h),Ct(d,!0);{Be.ce&&Be.ce._injectChildStyle(Ie);const Ge=d.subTree=Fs(d);w(null,Ge,m,v,d,C,E),h.el=Ge.el}if(ue&&Oe(ue,C),!ze&&($=Y&&Y.onVnodeMounted)){const Ge=h;Oe(()=>Je($,le,Ge),C)}(h.shapeFlag&256||le&&Ht(le.vnode)&&le.vnode.shapeFlag&256)&&d.a&&Oe(d.a,C),d.isMounted=!0,h=m=v=null}};d.scope.on();const T=d.effect=new ii(x);d.scope.off();const A=d.update=T.run.bind(T),z=d.job=T.runIfDirty.bind(T);z.i=d,z.id=d.uid,T.scheduler=()=>hs(z),Ct(d,!0),A()},ne=(d,h,m)=>{h.component=d;const v=d.vnode.props;d.vnode=h,d.next=null,Vc(d,h.props,v,m),zc(d,h.children,m),wt(),Bs(d),Et()},Z=(d,h,m,v,C,E,O,x,T=!1)=>{const A=d&&d.children,z=d?d.shapeFlag:0,$=h.children,{patchFlag:q,shapeFlag:Y}=h;if(q>0){if(q&128){De(A,$,m,v,C,E,O,x,T);return}else if(q&256){ke(A,$,m,v,C,E,O,x,T);return}}Y&8?(z&16&&Pe(A,C,E),$!==A&&u(m,$)):z&16?Y&16?De(A,$,m,v,C,E,O,x,T):Pe(A,C,E,!0):(z&8&&u(m,""),Y&16&&k($,m,v,C,E,O,x,T))},ke=(d,h,m,v,C,E,O,x,T)=>{d=d||Dt,h=h||Dt;const A=d.length,z=h.length,$=Math.min(A,z);let q;for(q=0;q<$;q++){const Y=h[q]=T?gt(h[q]):Ze(h[q]);w(d[q],Y,m,null,C,E,O,x,T)}A>z?Pe(d,C,E,!0,!1,$):k(h,m,v,C,E,O,x,T,$)},De=(d,h,m,v,C,E,O,x,T)=>{let A=0;const z=h.length;let $=d.length-1,q=z-1;for(;A<=$&&A<=q;){const Y=d[A],X=h[A]=T?gt(h[A]):Ze(h[A]);if(Jt(Y,X))w(Y,X,m,null,C,E,O,x,T);else break;A++}for(;A<=$&&A<=q;){const Y=d[$],X=h[q]=T?gt(h[q]):Ze(h[q]);if(Jt(Y,X))w(Y,X,m,null,C,E,O,x,T);else break;$--,q--}if(A>$){if(A<=q){const Y=q+1,X=Yq)for(;A<=$;)ge(d[A],C,E,!0),A++;else{const Y=A,X=A,ue=new Map;for(A=X;A<=q;A++){const Ne=h[A]=T?gt(h[A]):Ze(h[A]);Ne.key!=null&&ue.set(Ne.key,A)}let le,Be=0;const Ie=q-X+1;let ze=!1,Ge=0;const Gt=new Array(Ie);for(A=0;A=Ie){ge(Ne,C,E,!0);continue}let We;if(Ne.key!=null)We=ue.get(Ne.key);else for(le=X;le<=q;le++)if(Gt[le-X]===0&&Jt(Ne,h[le])){We=le;break}We===void 0?ge(Ne,C,E,!0):(Gt[We-X]=A+1,We>=Ge?Ge=We:ze=!0,w(Ne,h[We],m,null,C,E,O,x,T),Be++)}const As=ze?Yc(Gt):Dt;for(le=As.length-1,A=Ie-1;A>=0;A--){const Ne=X+A,We=h[Ne],Ts=Ne+1{const{el:E,type:O,transition:x,children:T,shapeFlag:A}=d;if(A&6){Re(d.component.subTree,h,m,v);return}if(A&128){d.suspense.move(h,m,v);return}if(A&64){O.move(d,h,m,F);return}if(O===_e){r(E,h,m);for(let $=0;$x.enter(E),C);else{const{leave:$,delayLeave:q,afterLeave:Y}=x,X=()=>r(E,h,m),ue=()=>{$(E,()=>{X(),Y&&Y()})};q?q(E,X,ue):ue()}else r(E,h,m)},ge=(d,h,m,v=!1,C=!1)=>{const{type:E,props:O,ref:x,children:T,dynamicChildren:A,shapeFlag:z,patchFlag:$,dirs:q,cacheIndex:Y}=d;if($===-2&&(C=!1),x!=null&&Nn(x,null,m,d,!0),Y!=null&&(h.renderCache[Y]=void 0),z&256){h.ctx.deactivate(d);return}const X=z&1&&q,ue=!Ht(d);let le;if(ue&&(le=O&&O.onVnodeBeforeUnmount)&&Je(le,h,d),z&6)ft(d.component,m,v);else{if(z&128){d.suspense.unmount(m,v);return}X&&St(d,null,h,"beforeUnmount"),z&64?d.type.remove(d,h,m,F,v):A&&!A.hasOnce&&(E!==_e||$>0&&$&64)?Pe(A,h,m,!1,!0):(E===_e&&$&384||!C&&z&16)&&Pe(T,h,m),v&&Ke(d)}(ue&&(le=O&&O.onVnodeUnmounted)||X)&&Oe(()=>{le&&Je(le,h,d),X&&St(d,null,h,"unmounted")},m)},Ke=d=>{const{type:h,el:m,anchor:v,transition:C}=d;if(h===_e){at(m,v);return}if(h===ir){_(d);return}const E=()=>{s(m),C&&!C.persisted&&C.afterLeave&&C.afterLeave()};if(d.shapeFlag&1&&C&&!C.persisted){const{leave:O,delayLeave:x}=C,T=()=>O(m,E);x?x(d.el,E,T):T()}else E()},at=(d,h)=>{let m;for(;d!==h;)m=g(d),s(d),d=m;s(h)},ft=(d,h,m)=>{const{bum:v,scope:C,job:E,subTree:O,um:x,m:T,a:A}=d;Ds(T),Ds(A),v&&Rn(v),C.stop(),E&&(E.flags|=8,ge(O,d,h,m)),x&&Oe(x,h),Oe(()=>{d.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&d.asyncDep&&!d.asyncResolved&&d.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve())},Pe=(d,h,m,v=!1,C=!1,E=0)=>{for(let O=E;O{if(d.shapeFlag&6)return y(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const h=g(d.anchor||d.el),m=h&&h[vc];return m?g(m):h};let M=!1;const I=(d,h,m)=>{d==null?h._vnode&&ge(h._vnode,null,null,!0):w(h._vnode||null,d,h,null,null,null,m),h._vnode=d,M||(M=!0,Bs(),Ai(),M=!1)},F={p:w,um:ge,m:Re,r:Ke,mt:J,mc:k,pc:Z,pbc:V,n:y,o:e};return{render:I,hydrate:void 0,createApp:kc(I)}}function or({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Ct({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Jc(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Wi(e,t,n=!1){const r=e.children,s=t.children;if(W(r)&&W(s))for(let o=0;o>1,e[n[c]]0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function Ji(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ji(t)}function Ds(e){if(e)for(let t=0;tje(Qc);function Zc(e,t){return _s(e,null,{flush:"sync"})}function on(e,t,n){return _s(e,t,n)}function _s(e,t,n=te){const{immediate:r,deep:s,flush:o,once:i}=n,c=ve({},n),l=t&&r||!t&&o!=="post";let a;if(gn){if(o==="sync"){const p=Xc();a=p.__watcherHandles||(p.__watcherHandles=[])}else if(!l){const p=()=>{};return p.stop=et,p.resume=et,p.pause=et,p}}const u=Ee;c.call=(p,b,w)=>tt(p,u,b,w);let f=!1;o==="post"?c.scheduler=p=>{Oe(p,u&&u.suspense)}:o!=="sync"&&(f=!0,c.scheduler=(p,b)=>{b?p():hs(p)}),c.augmentJob=p=>{t&&(p.flags|=4),f&&(p.flags|=2,u&&(p.id=u.uid,p.i=u))};const g=gc(e,t,c);return gn&&(a?a.push(g):l&&g()),g}function eu(e,t,n){const r=this.proxy,s=pe(e)?e.includes(".")?Yi(r,e):()=>r[e]:e.bind(r,r);let o;Q(t)?o=t:(o=t.handler,n=t);const i=bn(this),c=_s(s,o.bind(r),n);return i(),c}function Yi(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;s{let u,f=te,g;return Zc(()=>{const p=e[s];xe(u,p)&&(u=p,a())}),{get(){return l(),n.get?n.get(u):u},set(p){const b=n.set?n.set(p):p;if(!xe(b,u)&&!(f!==te&&xe(p,f)))return;const w=r.vnode.props;w&&(t in w||s in w||o in w)&&(`onUpdate:${t}`in w||`onUpdate:${s}`in w||`onUpdate:${o}`in w)||(u=p,a()),r.emit(`update:${t}`,b),xe(p,b)&&xe(p,f)&&!xe(b,g)&&a(),f=p,g=b}}});return c[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?i||te:c,done:!1}:{done:!0}}}},c}const Xi=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${lt(t)}Modifiers`]||e[`${bt(t)}Modifiers`];function tu(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||te;let s=n;const o=t.startsWith("update:"),i=o&&Xi(r,t.slice(7));i&&(i.trim&&(s=n.map(u=>pe(u)?u.trim():u)),i.number&&(s=n.map(Dr)));let c,l=r[c=Zn(t)]||r[c=Zn(lt(t))];!l&&o&&(l=r[c=Zn(bt(t))]),l&&tt(l,e,6,s);const a=r[c+"Once"];if(a){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,tt(a,e,6,s)}}function Zi(e,t,n=!1){const r=t.emitsCache,s=r.get(e);if(s!==void 0)return s;const o=e.emits;let i={},c=!1;if(!Q(e)){const l=a=>{const u=Zi(a,t,!0);u&&(c=!0,ve(i,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!c?(he(e)&&r.set(e,null),null):(W(o)?o.forEach(l=>i[l]=null):ve(i,o),he(e)&&r.set(e,i),i)}function Wn(e,t){return!e||!Un(t)?!1:(t=t.slice(2).replace(/Once$/,""),oe(e,t[0].toLowerCase()+t.slice(1))||oe(e,bt(t))||oe(e,t))}function Fs(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[o],slots:i,attrs:c,emit:l,render:a,renderCache:u,props:f,data:g,setupState:p,ctx:b,inheritAttrs:w}=e,B=Mn(e);let S,R;try{if(n.shapeFlag&4){const _=s||r,G=_;S=Ze(a.call(G,_,u,f,p,g,b)),R=c}else{const _=t;S=Ze(_.length>1?_(f,{attrs:c,slots:i,emit:l}):_(f,null)),R=t.props?c:nu(c)}}catch(_){ln.length=0,zn(_,e,1),S=ie(vt)}let P=S;if(R&&w!==!1){const _=Object.keys(R),{shapeFlag:G}=P;_.length&&G&7&&(o&&_.some(ts)&&(R=ru(R,o)),P=qt(P,R,!1,!0))}return n.dirs&&(P=qt(P,null,!1,!0),P.dirs=P.dirs?P.dirs.concat(n.dirs):n.dirs),n.transition&&ps(P,n.transition),S=P,Mn(B),S}const nu=e=>{let t;for(const n in e)(n==="class"||n==="style"||Un(n))&&((t||(t={}))[n]=e[n]);return t},ru=(e,t)=>{const n={};for(const r in e)(!ts(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function su(e,t,n){const{props:r,children:s,component:o}=e,{props:i,children:c,patchFlag:l}=t,a=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Us(r,i,a):!!i;if(l&8){const u=t.dynamicProps;for(let f=0;fe.__isSuspense;function iu(e,t){t&&t.pendingBranch?W(e)?t.effects.push(...e):t.effects.push(e):yc(e)}const _e=Symbol.for("v-fgt"),Jn=Symbol.for("v-txt"),vt=Symbol.for("v-cmt"),ir=Symbol.for("v-stc"),ln=[];let $e=null;function ee(e=!1){ln.push($e=e?null:[])}function lu(){ln.pop(),$e=ln[ln.length-1]||null}let hn=1;function ks(e,t=!1){hn+=e,e<0&&$e&&t&&($e.hasOnce=!0)}function tl(e){return e.dynamicChildren=hn>0?$e||Dt:null,lu(),hn>0&&$e&&$e.push(e),e}function fe(e,t,n,r,s,o){return tl(K(e,t,n,r,s,o,!0))}function Tt(e,t,n,r,s){return tl(ie(e,t,n,r,s,!0))}function pn(e){return e?e.__v_isVNode===!0:!1}function Jt(e,t){return e.type===t.type&&e.key===t.key}const nl=({key:e})=>e??null,An=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?pe(e)||Se(e)||Q(e)?{i:ye,r:e,k:t,f:!!n}:e:null);function K(e,t=null,n=null,r=0,s=null,o=e===_e?0:1,i=!1,c=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&nl(t),ref:t&&An(t),scopeId:Ii,slotScopeIds:null,children:n,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:o,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:ye};return c?(ys(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=pe(n)?8:16),hn>0&&!i&&$e&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&$e.push(l),l}const ie=cu;function cu(e,t=null,n=null,r=0,s=null,o=!1){if((!e||e===Bc)&&(e=vt),pn(e)){const c=qt(e,t,!0);return n&&ys(c,n),hn>0&&!o&&$e&&(c.shapeFlag&6?$e[$e.indexOf(e)]=c:$e.push(c)),c.patchFlag=-2,c}if(vu(e)&&(e=e.__vccOpts),t){t=uu(t);let{class:c,style:l}=t;c&&!pe(c)&&(t.class=os(c)),he(l)&&(fs(l)&&!W(l)&&(l=ve({},l)),t.style=ss(l))}const i=pe(e)?1:el(e)?128:bc(e)?64:he(e)?4:Q(e)?2:0;return K(e,t,n,r,s,i,o,!0)}function uu(e){return e?fs(e)||Hi(e)?ve({},e):e:null}function qt(e,t,n=!1,r=!1){const{props:s,ref:o,patchFlag:i,children:c,transition:l}=e,a=t?au(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&nl(a),ref:t&&t.ref?n&&o?W(o)?o.concat(An(t)):[o,An(t)]:An(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:c,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==_e?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&qt(e.ssContent),ssFallback:e.ssFallback&&qt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&ps(u,l.clone(u)),u}function jt(e=" ",t=0){return ie(Jn,null,e,t)}function en(e="",t=!1){return t?(ee(),Tt(vt,null,e)):ie(vt,null,e)}function Ze(e){return e==null||typeof e=="boolean"?ie(vt):W(e)?ie(_e,null,e.slice()):pn(e)?gt(e):ie(Jn,null,String(e))}function gt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:qt(e)}function ys(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(W(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),ys(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!Hi(t)?t._ctx=ye:s===3&&ye&&(ye.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Q(t)?(t={default:t,_ctx:ye},n=32):(t=String(t),r&64?(n=16,t=[jt(t)]):n=8);e.children=t,e.shapeFlag|=n}function au(...e){const t={};for(let n=0;nEe||ye;let $n,Wr;{const e=Vn(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),o=>{s.length>1?s.forEach(i=>i(o)):s[0](o)}};$n=t("__VUE_INSTANCE_SETTERS__",n=>Ee=n),Wr=t("__VUE_SSR_SETTERS__",n=>gn=n)}const bn=e=>{const t=Ee;return $n(e),e.scope.on(),()=>{e.scope.off(),$n(t)}},Hs=()=>{Ee&&Ee.scope.off(),$n(null)};function rl(e){return e.vnode.shapeFlag&4}let gn=!1;function gu(e,t=!1,n=!1){t&&Wr(t);const{props:r,children:s}=e.vnode,o=rl(e);Hc(e,r,o,t),Kc(e,s,n);const i=o?mu(e,t):void 0;return t&&Wr(!1),i}function mu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Nc);const{setup:r}=n;if(r){wt();const s=e.setupContext=r.length>1?yu(e):null,o=bn(e),i=yn(r,e,0,[e.props,s]),c=Qo(i);if(Et(),o(),(c||e.sp)&&!Ht(e)&&xi(e),c){if(i.then(Hs,Hs),t)return i.then(l=>{Vs(e,l)}).catch(l=>{zn(l,e,0)});e.asyncDep=i}else Vs(e,i)}else sl(e)}function Vs(e,t,n){Q(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:he(t)&&(e.setupState=Ci(t)),sl(e)}function sl(e,t,n){const r=e.type;e.render||(e.render=r.render||et);{const s=bn(e);wt();try{Oc(e)}finally{Et(),s()}}}const _u={get(e,t){return be(e,"get",""),e[t]}};function yu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,_u),slots:e.slots,emit:e.emit,expose:t}}function Yn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ci(Ei(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in sn)return sn[n](e)},has(t,n){return n in t||n in sn}})):e.proxy}function vu(e){return Q(e)&&"__vccOpts"in e}const He=(e,t)=>hc(e,t,gn);function vs(e,t,n){const r=arguments.length;return r===2?he(t)&&!W(t)?pn(t)?ie(e,null,[t]):ie(e,t):ie(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&pn(n)&&(n=[n]),ie(e,t,n))}const bu="3.5.13";/** * @vue/runtime-dom v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Jr;const js=typeof window<"u"&&window.trustedTypes;if(js)try{Jr=js.createPolicy("vue",{createHTML:e=>e})}catch{}const ol=Jr?e=>Jr.createHTML(e):e=>e,wu="http://www.w3.org/2000/svg",Eu="http://www.w3.org/1998/Math/MathML",st=typeof document<"u"?document:null,qs=st&&st.createElement("template"),Su={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?st.createElementNS(wu,e):t==="mathml"?st.createElementNS(Eu,e):n?st.createElement(e,{is:n}):st.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>st.createTextNode(e),createComment:e=>st.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>st.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,o){const i=n?n.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{qs.innerHTML=ol(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);const c=qs.content;if(r==="svg"||r==="mathml"){const l=c.firstChild;for(;l.firstChild;)c.appendChild(l.firstChild);c.removeChild(l)}t.insertBefore(c,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Cu=Symbol("_vtc");function Ru(e,t,n){const r=e[Cu];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Dn=Symbol("_vod"),il=Symbol("_vsh"),Pu={beforeMount(e,{value:t},{transition:n}){e[Dn]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Yt(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Yt(e,!0),r.enter(e)):r.leave(e,()=>{Yt(e,!1)}):Yt(e,t))},beforeUnmount(e,{value:t}){Yt(e,t)}};function Yt(e,t){e.style.display=t?e[Dn]:"none",e[il]=!t}const Au=Symbol(""),Tu=/(^|;)\s*display\s*:/;function xu(e,t,n){const r=e.style,s=pe(n);let o=!1;if(n&&!s){if(t)if(pe(t))for(const i of t.split(";")){const c=i.slice(0,i.indexOf(":")).trim();n[c]==null&&Tn(r,c,"")}else for(const i in t)n[i]==null&&Tn(r,i,"");for(const i in n)i==="display"&&(o=!0),Tn(r,i,n[i])}else if(s){if(t!==n){const i=r[Au];i&&(n+=";"+i),r.cssText=n,o=Tu.test(n)}}else t&&e.removeAttribute("style");Dn in e&&(e[Dn]=o?r.display:"",e[il]&&(r.display="none"))}const Ks=/\s*!important$/;function Tn(e,t,n){if(W(n))n.forEach(r=>Tn(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Iu(e,t);Ks.test(n)?e.setProperty(bt(r),n.replace(Ks,""),"important"):e[r]=n}}const zs=["Webkit","Moz","ms"],lr={};function Iu(e,t){const n=lr[t];if(n)return n;let r=lt(t);if(r!=="filter"&&r in e)return lr[t]=r;r=ei(r);for(let s=0;scr||(Ou.then(()=>cr=0),cr=Date.now());function $u(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;tt(Du(r,n.value),t,5,[r])};return n.value=e,n.attached=Lu(),n}function Du(e,t){if(W(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const Xs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Fu=(e,t,n,r,s,o)=>{const i=s==="svg";t==="class"?Ru(e,r,i):t==="style"?xu(e,n,r):kn(t)?ts(t)||Bu(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ku(e,t,r,i))?(Js(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ws(e,t,r,i,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!pe(r))?Js(e,lt(t),r,o,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Ws(e,t,r,i))};function ku(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Xs(t)&&Q(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Xs(t)&&pe(n)?!1:t in e}const Zs=e=>{const t=e.props["onUpdate:modelValue"]||!1;return W(t)?n=>Rn(t,n):t};function Uu(e){e.target.composing=!0}function eo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ur=Symbol("_assign"),Yr={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[ur]=Zs(s);const o=r||s.props&&s.props.type==="number";Lt(e,t?"change":"input",i=>{if(i.target.composing)return;let c=e.value;n&&(c=c.trim()),o&&(c=Dr(c)),e[ur](c)}),n&&Lt(e,"change",()=>{e.value=e.value.trim()}),t||(Lt(e,"compositionstart",Uu),Lt(e,"compositionend",eo),Lt(e,"change",eo))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:o}},i){if(e[ur]=Zs(i),e.composing)return;const c=(o||e.type==="number")&&!/^0\d/.test(e.value)?Dr(e.value):e.value,l=t??"";c!==l&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===l)||(e.value=l))}},Hu=["ctrl","shift","alt","meta"],Vu={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Hu.some(n=>e[`${n}Key`]&&!t.includes(n))},ll=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(s,...o)=>{for(let i=0;i{const t=qu().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=Gu(r);if(!s)return;const o=t._component;!Q(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const i=n(s,!1,zu(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),i},t};function zu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Gu(e){return pe(e)?document.querySelector(e):e}/*! +**/let Jr;const js=typeof window<"u"&&window.trustedTypes;if(js)try{Jr=js.createPolicy("vue",{createHTML:e=>e})}catch{}const ol=Jr?e=>Jr.createHTML(e):e=>e,wu="http://www.w3.org/2000/svg",Eu="http://www.w3.org/1998/Math/MathML",st=typeof document<"u"?document:null,qs=st&&st.createElement("template"),Su={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?st.createElementNS(wu,e):t==="mathml"?st.createElementNS(Eu,e):n?st.createElement(e,{is:n}):st.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>st.createTextNode(e),createComment:e=>st.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>st.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,o){const i=n?n.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{qs.innerHTML=ol(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);const c=qs.content;if(r==="svg"||r==="mathml"){const l=c.firstChild;for(;l.firstChild;)c.appendChild(l.firstChild);c.removeChild(l)}t.insertBefore(c,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Cu=Symbol("_vtc");function Ru(e,t,n){const r=e[Cu];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Dn=Symbol("_vod"),il=Symbol("_vsh"),Pu={beforeMount(e,{value:t},{transition:n}){e[Dn]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Yt(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Yt(e,!0),r.enter(e)):r.leave(e,()=>{Yt(e,!1)}):Yt(e,t))},beforeUnmount(e,{value:t}){Yt(e,t)}};function Yt(e,t){e.style.display=t?e[Dn]:"none",e[il]=!t}const Au=Symbol(""),Tu=/(^|;)\s*display\s*:/;function Iu(e,t,n){const r=e.style,s=pe(n);let o=!1;if(n&&!s){if(t)if(pe(t))for(const i of t.split(";")){const c=i.slice(0,i.indexOf(":")).trim();n[c]==null&&Tn(r,c,"")}else for(const i in t)n[i]==null&&Tn(r,i,"");for(const i in n)i==="display"&&(o=!0),Tn(r,i,n[i])}else if(s){if(t!==n){const i=r[Au];i&&(n+=";"+i),r.cssText=n,o=Tu.test(n)}}else t&&e.removeAttribute("style");Dn in e&&(e[Dn]=o?r.display:"",e[il]&&(r.display="none"))}const Ks=/\s*!important$/;function Tn(e,t,n){if(W(n))n.forEach(r=>Tn(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=xu(e,t);Ks.test(n)?e.setProperty(bt(r),n.replace(Ks,""),"important"):e[r]=n}}const zs=["Webkit","Moz","ms"],lr={};function xu(e,t){const n=lr[t];if(n)return n;let r=lt(t);if(r!=="filter"&&r in e)return lr[t]=r;r=ei(r);for(let s=0;scr||(Ou.then(()=>cr=0),cr=Date.now());function $u(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;tt(Du(r,n.value),t,5,[r])};return n.value=e,n.attached=Lu(),n}function Du(e,t){if(W(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const Xs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Fu=(e,t,n,r,s,o)=>{const i=s==="svg";t==="class"?Ru(e,r,i):t==="style"?Iu(e,n,r):Un(t)?ts(t)||Bu(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Uu(e,t,r,i))?(Js(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ws(e,t,r,i,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!pe(r))?Js(e,lt(t),r,o,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Ws(e,t,r,i))};function Uu(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Xs(t)&&Q(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Xs(t)&&pe(n)?!1:t in e}const Zs=e=>{const t=e.props["onUpdate:modelValue"]||!1;return W(t)?n=>Rn(t,n):t};function ku(e){e.target.composing=!0}function eo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ur=Symbol("_assign"),Yr={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[ur]=Zs(s);const o=r||s.props&&s.props.type==="number";Lt(e,t?"change":"input",i=>{if(i.target.composing)return;let c=e.value;n&&(c=c.trim()),o&&(c=Dr(c)),e[ur](c)}),n&&Lt(e,"change",()=>{e.value=e.value.trim()}),t||(Lt(e,"compositionstart",ku),Lt(e,"compositionend",eo),Lt(e,"change",eo))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:o}},i){if(e[ur]=Zs(i),e.composing)return;const c=(o||e.type==="number")&&!/^0\d/.test(e.value)?Dr(e.value):e.value,l=t??"";c!==l&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===l)||(e.value=l))}},Hu=["ctrl","shift","alt","meta"],Vu={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Hu.some(n=>e[`${n}Key`]&&!t.includes(n))},ll=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(s,...o)=>{for(let i=0;i{const t=qu().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=Gu(r);if(!s)return;const o=t._component;!Q(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const i=n(s,!1,zu(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),i},t};function zu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Gu(e){return pe(e)?document.querySelector(e):e}/*! * pinia v3.0.2 * (c) 2025 Eduardo San Martin Morote * @license MIT @@ -22,11 +22,11 @@ * vue-router v4.5.1 * (c) 2025 Eduardo San Martin Morote * @license MIT - */const $t=typeof document<"u";function cl(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Yu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&cl(e.default)}const re=Object.assign;function ar(e,t){const n={};for(const r in t){const s=t[r];n[r]=qe(s)?s.map(e):e(s)}return n}const cn=()=>{},qe=Array.isArray,ul=/#/g,Qu=/&/g,Xu=/\//g,Zu=/=/g,ea=/\?/g,al=/\+/g,ta=/%5B/g,na=/%5D/g,fl=/%5E/g,ra=/%60/g,dl=/%7B/g,sa=/%7C/g,hl=/%7D/g,oa=/%20/g;function bs(e){return encodeURI(""+e).replace(sa,"|").replace(ta,"[").replace(na,"]")}function ia(e){return bs(e).replace(dl,"{").replace(hl,"}").replace(fl,"^")}function Qr(e){return bs(e).replace(al,"%2B").replace(oa,"+").replace(ul,"%23").replace(Qu,"%26").replace(ra,"`").replace(dl,"{").replace(hl,"}").replace(fl,"^")}function la(e){return Qr(e).replace(Zu,"%3D")}function ca(e){return bs(e).replace(ul,"%23").replace(ea,"%3F")}function ua(e){return e==null?"":ca(e).replace(Xu,"%2F")}function mn(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const aa=/\/$/,fa=e=>e.replace(aa,"");function fr(e,t,n="/"){let r,s={},o="",i="";const c=t.indexOf("#");let l=t.indexOf("?");return c=0&&(l=-1),l>-1&&(r=t.slice(0,l),o=t.slice(l+1,c>-1?c:t.length),s=e(o)),c>-1&&(r=r||t.slice(0,c),i=t.slice(c,t.length)),r=ga(r??t,n),{fullPath:r+(o&&"?")+o+i,path:r,query:s,hash:mn(i)}}function da(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function ro(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function ha(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&Kt(t.matched[r],n.matched[s])&&pl(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Kt(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function pl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!pa(e[n],t[n]))return!1;return!0}function pa(e,t){return qe(e)?so(e,t):qe(t)?so(t,e):e===t}function so(e,t){return qe(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function ga(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let o=n.length-1,i,c;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(i).join("/")}const dt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var _n;(function(e){e.pop="pop",e.push="push"})(_n||(_n={}));var un;(function(e){e.back="back",e.forward="forward",e.unknown=""})(un||(un={}));function ma(e){if(!e)if($t){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),fa(e)}const _a=/^[^#]+#/;function ya(e,t){return e.replace(_a,"#")+t}function va(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Qn=()=>({left:window.scrollX,top:window.scrollY});function ba(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=va(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function oo(e,t){return(history.state?history.state.position-t:-1)+e}const Xr=new Map;function wa(e,t){Xr.set(e,t)}function Ea(e){const t=Xr.get(e);return Xr.delete(e),t}let Sa=()=>location.protocol+"//"+location.host;function gl(e,t){const{pathname:n,search:r,hash:s}=t,o=e.indexOf("#");if(o>-1){let c=s.includes(e.slice(o))?e.slice(o).length:1,l=s.slice(c);return l[0]!=="/"&&(l="/"+l),ro(l,"")}return ro(n,e)+r+s}function Ca(e,t,n,r){let s=[],o=[],i=null;const c=({state:g})=>{const p=gl(e,location),b=n.value,w=t.value;let B=0;if(g){if(n.value=p,t.value=g,i&&i===b){i=null;return}B=w?g.position-w.position:0}else r(p);s.forEach(S=>{S(n.value,b,{delta:B,type:_n.pop,direction:B?B>0?un.forward:un.back:un.unknown})})};function l(){i=n.value}function a(g){s.push(g);const p=()=>{const b=s.indexOf(g);b>-1&&s.splice(b,1)};return o.push(p),p}function u(){const{history:g}=window;g.state&&g.replaceState(re({},g.state,{scroll:Qn()}),"")}function f(){for(const g of o)g();o=[],window.removeEventListener("popstate",c),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",c),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:a,destroy:f}}function io(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?Qn():null}}function Ra(e){const{history:t,location:n}=window,r={value:gl(e,n)},s={value:t.state};s.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(l,a,u){const f=e.indexOf("#"),g=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+l:Sa()+e+l;try{t[u?"replaceState":"pushState"](a,"",g),s.value=a}catch(p){console.error(p),n[u?"replace":"assign"](g)}}function i(l,a){const u=re({},t.state,io(s.value.back,l,s.value.forward,!0),a,{position:s.value.position});o(l,u,!0),r.value=l}function c(l,a){const u=re({},s.value,t.state,{forward:l,scroll:Qn()});o(u.current,u,!0);const f=re({},io(r.value,l,null),{position:u.position+1},a);o(l,f,!1),r.value=l}return{location:r,state:s,push:c,replace:i}}function Pa(e){e=ma(e);const t=Ra(e),n=Ca(e,t.state,t.location,t.replace);function r(o,i=!0){i||n.pauseListeners(),history.go(o)}const s=re({location:"",base:e,go:r,createHref:ya.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function Aa(e){return typeof e=="string"||e&&typeof e=="object"}function ml(e){return typeof e=="string"||typeof e=="symbol"}const _l=Symbol("");var lo;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(lo||(lo={}));function zt(e,t){return re(new Error,{type:e,[_l]:!0},t)}function rt(e,t){return e instanceof Error&&_l in e&&(t==null||!!(e.type&t))}const co="[^/]+?",Ta={sensitive:!1,strict:!1,start:!0,end:!0},xa=/[.+*?^${}()[\]/\\]/g;function Ia(e,t){const n=re({},Ta,t),r=[];let s=n.start?"^":"";const o=[];for(const a of e){const u=a.length?[]:[90];n.strict&&!a.length&&(s+="/");for(let f=0;ft.length?t.length===1&&t[0]===80?1:-1:0}function yl(e,t){let n=0;const r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}const Ba={type:0,value:""},Na=/[a-zA-Z0-9_]/;function Oa(e){if(!e)return[[]];if(e==="/")return[[Ba]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${a}": ${p}`)}let n=0,r=n;const s=[];let o;function i(){o&&s.push(o),o=[]}let c=0,l,a="",u="";function f(){a&&(n===0?o.push({type:0,value:a}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:a,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),a="")}function g(){a+=l}for(;c{i(P)}:cn}function i(f){if(ml(f)){const g=r.get(f);g&&(r.delete(f),n.splice(n.indexOf(g),1),g.children.forEach(i),g.alias.forEach(i))}else{const g=n.indexOf(f);g>-1&&(n.splice(g,1),f.record.name&&r.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function c(){return n}function l(f){const g=ka(f,n);n.splice(g,0,f),f.record.name&&!ho(f)&&r.set(f.record.name,f)}function a(f,g){let p,b={},w,B;if("name"in f&&f.name){if(p=r.get(f.name),!p)throw zt(1,{location:f});B=p.record.name,b=re(ao(g.params,p.keys.filter(P=>!P.optional).concat(p.parent?p.parent.keys.filter(P=>P.optional):[]).map(P=>P.name)),f.params&&ao(f.params,p.keys.map(P=>P.name))),w=p.stringify(b)}else if(f.path!=null)w=f.path,p=n.find(P=>P.re.test(w)),p&&(b=p.parse(w),B=p.record.name);else{if(p=g.name?r.get(g.name):n.find(P=>P.re.test(g.path)),!p)throw zt(1,{location:f,currentLocation:g});B=p.record.name,b=re({},g.params,f.params),w=p.stringify(b)}const S=[];let R=p;for(;R;)S.unshift(R.record),R=R.parent;return{name:B,path:w,params:b,matched:S,meta:Fa(S)}}e.forEach(f=>o(f));function u(){n.length=0,r.clear()}return{addRoute:o,resolve:a,removeRoute:i,clearRoutes:u,getRoutes:c,getRecordMatcher:s}}function ao(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function fo(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Da(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Da(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function ho(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Fa(e){return e.reduce((t,n)=>re(t,n.meta),{})}function po(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function ka(e,t){let n=0,r=t.length;for(;n!==r;){const o=n+r>>1;yl(e,t[o])<0?r=o:n=o+1}const s=Ua(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function Ua(e){let t=e;for(;t=t.parent;)if(vl(t)&&yl(e,t)===0)return t}function vl({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Ha(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&Qr(o)):[r&&Qr(r)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function Va(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=qe(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const ja=Symbol(""),mo=Symbol(""),Xn=Symbol(""),ws=Symbol(""),Zr=Symbol("");function Qt(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function mt(e,t,n,r,s,o=i=>i()){const i=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((c,l)=>{const a=g=>{g===!1?l(zt(4,{from:n,to:t})):g instanceof Error?l(g):Aa(g)?l(zt(2,{from:t,to:g})):(i&&r.enterCallbacks[s]===i&&typeof g=="function"&&i.push(g),c())},u=o(()=>e.call(r&&r.instances[s],t,n,a));let f=Promise.resolve(u);e.length<3&&(f=f.then(a)),f.catch(g=>l(g))})}function dr(e,t,n,r,s=o=>o()){const o=[];for(const i of e)for(const c in i.components){let l=i.components[c];if(!(t!=="beforeRouteEnter"&&!i.instances[c]))if(cl(l)){const u=(l.__vccOpts||l)[t];u&&o.push(mt(u,n,r,i,c,s))}else{let a=l();o.push(()=>a.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${c}" at "${i.path}"`);const f=Yu(u)?u.default:u;i.mods[c]=u,i.components[c]=f;const p=(f.__vccOpts||f)[t];return p&&mt(p,n,r,i,c,s)()}))}}return o}function _o(e){const t=je(Xn),n=je(ws),r=He(()=>{const l=_t(e.to);return t.resolve(l)}),s=He(()=>{const{matched:l}=r.value,{length:a}=l,u=l[a-1],f=n.matched;if(!u||!f.length)return-1;const g=f.findIndex(Kt.bind(null,u));if(g>-1)return g;const p=yo(l[a-2]);return a>1&&yo(u)===p&&f[f.length-1].path!==p?f.findIndex(Kt.bind(null,l[a-2])):g}),o=He(()=>s.value>-1&&Wa(n.params,r.value.params)),i=He(()=>s.value>-1&&s.value===n.matched.length-1&&pl(n.params,r.value.params));function c(l={}){if(Ga(l)){const a=t[_t(e.replace)?"replace":"push"](_t(e.to)).catch(cn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>a),a}return Promise.resolve()}return{route:r,href:He(()=>r.value.href),isActive:o,isExactActive:i,navigate:c}}function qa(e){return e.length===1?e[0]:e}const Ka=Me({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:_o,setup(e,{slots:t}){const n=Kn(_o(e)),{options:r}=je(Xn),s=He(()=>({[vo(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[vo(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&qa(t.default(n));return e.custom?o:vs("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),za=Ka;function Ga(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Wa(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!qe(s)||s.length!==r.length||r.some((o,i)=>o!==s[i]))return!1}return!0}function yo(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const vo=(e,t,n)=>e??t??n,Ja=Me({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=je(Zr),s=He(()=>e.route||r.value),o=je(mo,0),i=He(()=>{let a=_t(o);const{matched:u}=s.value;let f;for(;(f=u[a])&&!f.components;)a++;return a}),c=He(()=>s.value.matched[i.value]);Pn(mo,He(()=>i.value+1)),Pn(ja,c),Pn(Zr,s);const l=me();return on(()=>[l.value,c.value,e.name],([a,u,f],[g,p,b])=>{u&&(u.instances[f]=a,p&&p!==u&&a&&a===g&&(u.leaveGuards.size||(u.leaveGuards=p.leaveGuards),u.updateGuards.size||(u.updateGuards=p.updateGuards))),a&&u&&(!p||!Kt(u,p)||!g)&&(u.enterCallbacks[f]||[]).forEach(w=>w(a))},{flush:"post"}),()=>{const a=s.value,u=e.name,f=c.value,g=f&&f.components[u];if(!g)return bo(n.default,{Component:g,route:a});const p=f.props[u],b=p?p===!0?a.params:typeof p=="function"?p(a):p:null,B=vs(g,re({},b,t,{onVnodeUnmounted:S=>{S.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return bo(n.default,{Component:B,route:a})||B}}});function bo(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const bl=Ja;function Ya(e){const t=$a(e.routes,e),n=e.parseQuery||Ha,r=e.stringifyQuery||go,s=e.history,o=Qt(),i=Qt(),c=Qt(),l=lc(dt);let a=dt;$t&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=ar.bind(null,y=>""+y),f=ar.bind(null,ua),g=ar.bind(null,mn);function p(y,M){let x,F;return ml(y)?(x=t.getRecordMatcher(y),F=M):F=y,t.addRoute(F,x)}function b(y){const M=t.getRecordMatcher(y);M&&t.removeRoute(M)}function w(){return t.getRoutes().map(y=>y.record)}function B(y){return!!t.getRecordMatcher(y)}function S(y,M){if(M=re({},M||l.value),typeof y=="string"){const m=fr(n,y,M.path),v=t.resolve({path:m.path},M),C=s.createHref(m.fullPath);return re(m,v,{params:g(v.params),hash:mn(m.hash),redirectedFrom:void 0,href:C})}let x;if(y.path!=null)x=re({},y,{path:fr(n,y.path,M.path).path});else{const m=re({},y.params);for(const v in m)m[v]==null&&delete m[v];x=re({},y,{params:f(m)}),M.params=f(M.params)}const F=t.resolve(x,M),ce=y.hash||"";F.params=u(g(F.params));const d=da(r,re({},y,{hash:ia(ce),path:F.path})),h=s.createHref(d);return re({fullPath:d,hash:ce,query:r===go?Va(y.query):y.query||{}},F,{redirectedFrom:void 0,href:h})}function R(y){return typeof y=="string"?fr(n,y,l.value.path):re({},y)}function P(y,M){if(a!==y)return zt(8,{from:M,to:y})}function _(y){return L(y)}function G(y){return _(re(R(y),{replace:!0}))}function N(y){const M=y.matched[y.matched.length-1];if(M&&M.redirect){const{redirect:x}=M;let F=typeof x=="function"?x(y):x;return typeof F=="string"&&(F=F.includes("?")||F.includes("#")?F=R(F):{path:F},F.params={}),re({query:y.query,hash:y.hash,params:F.path!=null?{}:y.params},F)}}function L(y,M){const x=a=S(y),F=l.value,ce=y.state,d=y.force,h=y.replace===!0,m=N(x);if(m)return L(re(R(m),{state:typeof m=="object"?re({},ce,m.state):ce,force:d,replace:h}),M||x);const v=x;v.redirectedFrom=M;let C;return!d&&ha(r,F,x)&&(C=zt(16,{to:v,from:F}),Re(F,F,!0,!1)),(C?Promise.resolve(C):V(v,F)).catch(E=>rt(E)?rt(E,2)?E:De(E):Z(E,v,F)).then(E=>{if(E){if(rt(E,2))return L(re({replace:h},R(E.to),{state:typeof E.to=="object"?re({},ce,E.to.state):ce,force:d}),M||v)}else E=j(v,F,!0,h,ce);return H(v,F,E),E})}function U(y,M){const x=P(y,M);return x?Promise.reject(x):Promise.resolve()}function D(y){const M=at.values().next().value;return M&&typeof M.runWithContext=="function"?M.runWithContext(y):y()}function V(y,M){let x;const[F,ce,d]=Qa(y,M);x=dr(F.reverse(),"beforeRouteLeave",y,M);for(const m of F)m.leaveGuards.forEach(v=>{x.push(mt(v,y,M))});const h=U.bind(null,y,M);return x.push(h),Pe(x).then(()=>{x=[];for(const m of o.list())x.push(mt(m,y,M));return x.push(h),Pe(x)}).then(()=>{x=dr(ce,"beforeRouteUpdate",y,M);for(const m of ce)m.updateGuards.forEach(v=>{x.push(mt(v,y,M))});return x.push(h),Pe(x)}).then(()=>{x=[];for(const m of d)if(m.beforeEnter)if(qe(m.beforeEnter))for(const v of m.beforeEnter)x.push(mt(v,y,M));else x.push(mt(m.beforeEnter,y,M));return x.push(h),Pe(x)}).then(()=>(y.matched.forEach(m=>m.enterCallbacks={}),x=dr(d,"beforeRouteEnter",y,M,D),x.push(h),Pe(x))).then(()=>{x=[];for(const m of i.list())x.push(mt(m,y,M));return x.push(h),Pe(x)}).catch(m=>rt(m,8)?m:Promise.reject(m))}function H(y,M,x){c.list().forEach(F=>D(()=>F(y,M,x)))}function j(y,M,x,F,ce){const d=P(y,M);if(d)return d;const h=M===dt,m=$t?history.state:{};x&&(F||h?s.replace(y.fullPath,re({scroll:h&&m&&m.scroll},ce)):s.push(y.fullPath,ce)),l.value=y,Re(y,M,x,h),De()}let k;function J(){k||(k=s.listen((y,M,x)=>{if(!ft.listening)return;const F=S(y),ce=N(F);if(ce){L(re(ce,{replace:!0,force:!0}),F).catch(cn);return}a=F;const d=l.value;$t&&wa(oo(d.fullPath,x.delta),Qn()),V(F,d).catch(h=>rt(h,12)?h:rt(h,2)?(L(re(R(h.to),{force:!0}),F).then(m=>{rt(m,20)&&!x.delta&&x.type===_n.pop&&s.go(-1,!1)}).catch(cn),Promise.reject()):(x.delta&&s.go(-x.delta,!1),Z(h,F,d))).then(h=>{h=h||j(F,d,!1),h&&(x.delta&&!rt(h,8)?s.go(-x.delta,!1):x.type===_n.pop&&rt(h,20)&&s.go(-1,!1)),H(F,d,h)}).catch(cn)}))}let Ce=Qt(),de=Qt(),ne;function Z(y,M,x){De(y);const F=de.list();return F.length?F.forEach(ce=>ce(y,M,x)):console.error(y),Promise.reject(y)}function Ue(){return ne&&l.value!==dt?Promise.resolve():new Promise((y,M)=>{Ce.add([y,M])})}function De(y){return ne||(ne=!y,J(),Ce.list().forEach(([M,x])=>y?x(y):M()),Ce.reset()),y}function Re(y,M,x,F){const{scrollBehavior:ce}=e;if(!$t||!ce)return Promise.resolve();const d=!x&&Ea(oo(y.fullPath,0))||(F||!x)&&history.state&&history.state.scroll||null;return ds().then(()=>ce(y,M,d)).then(h=>h&&ba(h)).catch(h=>Z(h,y,M))}const ge=y=>s.go(y);let Ke;const at=new Set,ft={currentRoute:l,listening:!0,addRoute:p,removeRoute:b,clearRoutes:t.clearRoutes,hasRoute:B,getRoutes:w,resolve:S,options:e,push:_,replace:G,go:ge,back:()=>ge(-1),forward:()=>ge(1),beforeEach:o.add,beforeResolve:i.add,afterEach:c.add,onError:de.add,isReady:Ue,install(y){const M=this;y.component("RouterLink",za),y.component("RouterView",bl),y.config.globalProperties.$router=M,Object.defineProperty(y.config.globalProperties,"$route",{enumerable:!0,get:()=>_t(l)}),$t&&!Ke&&l.value===dt&&(Ke=!0,_(s.location).catch(ce=>{}));const x={};for(const ce in dt)Object.defineProperty(x,ce,{get:()=>l.value[ce],enumerable:!0});y.provide(Xn,M),y.provide(ws,bi(x)),y.provide(Zr,l);const F=y.unmount;at.add(y),y.unmount=function(){at.delete(y),at.size<1&&(a=dt,k&&k(),k=null,l.value=dt,Ke=!1,ne=!1),F()}}};function Pe(y){return y.reduce((M,x)=>M.then(()=>D(x)),Promise.resolve())}return ft}function Qa(e,t){const n=[],r=[],s=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;iKt(a,c))?r.push(c):n.push(c));const l=e.matched[i];l&&(t.matched.find(a=>Kt(a,l))||s.push(l))}return[n,r,s]}function wl(){return je(Xn)}function Xa(e){return je(ws)}const Za=Me({__name:"App",setup(e){return(t,n)=>(ee(),Tt(_t(bl)))}}),ke=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},ef=ke(Za,[["__scopeId","data-v-913ef6b1"]]),tf="/assets/logo_belt-DPdjjAgZ.png",nf={},rf={class:"belt-block"};function sf(e,t){return ee(),fe("div",null,[t[0]||(t[0]=K("div",{class:"shadow"},null,-1)),K("div",rf,[vn(e.$slots,"default",{},void 0)])])}const of=ke(nf,[["render",sf],["__scopeId","data-v-5ed18f32"]]),lf={},cf={class:"belt-block"};function uf(e,t){return ee(),fe("div",null,[t[0]||(t[0]=K("div",{class:"shadow shadow-top"},null,-1)),t[1]||(t[1]=K("div",{class:"shadow shadow-bottom"},null,-1)),K("div",cf,[vn(e.$slots,"default",{},void 0)])])}const El=ke(lf,[["render",uf],["__scopeId","data-v-0effe39e"]]),af={class:"text-with-font"},ff=Me({__name:"HeaderText",setup(e){return(t,n)=>(ee(),fe("span",af,[vn(t.$slots,"default",{},void 0)]))}}),Sl=ke(ff,[["__scopeId","data-v-33b571eb"]]),df={},hf={class:"plate-block"},pf={class:"metal-plate-block"};function gf(e,t){return ee(),fe("div",hf,[K("div",pf,[vn(e.$slots,"default",{},void 0)]),t[0]||(t[0]=K("div",{class:"pin pin-top-left"},null,-1)),t[1]||(t[1]=K("div",{class:"pin pin-top-right"},null,-1)),t[2]||(t[2]=K("div",{class:"pin pin-bottom-right"},null,-1)),t[3]||(t[3]=K("div",{class:"pin pin-bottom-left"},null,-1))])}const Fn=ke(df,[["render",gf],["__scopeId","data-v-34e952c0"]]),mf={class:"game-header"},_f={class:"center"},yf={class:"position-right-center-block"},vf=Me({__name:"GameHeader",setup(e){return(t,n)=>(ee(),fe("div",mf,[K("div",_f,[ie(Fn,{class:"controller-metal controller-metal-left"}),ie(Fn,{class:"controller-metal controller-metal-right"}),n[1]||(n[1]=K("img",{alt:"Вечерний детектив",class:"logo",src:tf},null,-1)),ie(of,{class:"belt-mini"}),ie(El,{class:"belt"},{default:yt(()=>[K("div",yf,[ie(Sl,null,{default:yt(()=>n[0]||(n[0]=[jt("Вечерний детектив")])),_:1})])]),_:1})])]))}}),bf=ke(vf,[["__scopeId","data-v-b87f05d7"]]);class xt extends Error{constructor(t="Пользователь не авторизован (401)"){super(t),this.name="UnauthorizedError",Object.setPrototypeOf(this,xt.prototype)}}const Cl=async(e,t)=>{try{const n=await fetch(Es("/team"),{method:"GET",headers:{"X-Id":Ss(e),"X-Password":t}});if(n.status===401)throw new xt("Ошибка авторизации");if(!n.ok)throw new Error(`http error status: ${n.status}`);return await n.json()}catch(n){throw console.error("[apiGetTeam] error:",n),n}},Rl=async(e,t,n)=>{try{const r=await fetch(Es("/team/actions"),{method:"POST",headers:{"X-Id":Ss(e),"X-Password":t},body:JSON.stringify({place:n})});if(r.status===401)throw new xt("Ошибка авторизации");if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiLetsgo] error:",r),r}},wf=async(e,t)=>{try{const n=await fetch(Es("/game"),{method:"GET",headers:{"X-Id":Ss(e),"X-Password":t}});if(n.status===401)throw new xt("Ошибка авторизации");if(!n.ok)throw new Error(`http error status: ${n.status}`);return await n.json()}catch(n){throw console.error("[apiGetGame] error:",n),n}};function Es(e){return"http://"+window.location.host.split(":")[0]+":8090"+e}function Ss(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(t,n)=>String.fromCharCode(parseInt(n,16))))}var Nt={},hr,wo;function Ef(){return wo||(wo=1,hr=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),hr}var pr={},ht={},Eo;function It(){if(Eo)return ht;Eo=1;let e;const t=[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 ht.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},ht.getSymbolTotalCodewords=function(r){return t[r]},ht.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},ht.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},ht.isKanjiModeEnabled=function(){return typeof e<"u"},ht.toSJIS=function(r){return e(r)},ht}var gr={},So;function Cs(){return So||(So=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,s){if(e.isValid(r))return r;try{return t(r)}catch{return s}}}(gr)),gr}var mr,Co;function Sf(){if(Co)return mr;Co=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let r=0;r>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},mr=e,mr}var _r,Ro;function Cf(){if(Ro)return _r;Ro=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,r,s){const o=t*this.size+n;this.data[o]=r,s&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},_r=e,_r}var yr={},Po;function Rf(){return Po||(Po=1,function(e){const t=It().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const s=Math.floor(r/7)+2,o=t(r),i=o===145?26:Math.ceil((o-13)/(2*s-2))*2,c=[o-7];for(let l=1;l=0&&s<=7},e.from=function(s){return e.isValid(s)?parseInt(s,10):void 0},e.getPenaltyN1=function(s){const o=s.size;let i=0,c=0,l=0,a=null,u=null;for(let f=0;f=5&&(i+=t.N1+(c-5)),a=p,c=1),p=s.get(g,f),p===u?l++:(l>=5&&(i+=t.N1+(l-5)),u=p,l=1)}c>=5&&(i+=t.N1+(c-5)),l>=5&&(i+=t.N1+(l-5))}return i},e.getPenaltyN2=function(s){const o=s.size;let i=0;for(let c=0;c=10&&(c===1488||c===93)&&i++,l=l<<1&2047|s.get(u,a),u>=10&&(l===1488||l===93)&&i++}return i*t.N3},e.getPenaltyN4=function(s){let o=0;const i=s.data.length;for(let l=0;l=0;){const i=o[0];for(let l=0;l0){const c=new Uint8Array(this.degree);return c.set(o,i),c}return o},Er=t,Er}var Sr={},Cr={},Rr={},No;function Al(){return No||(No=1,Rr.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Rr}var Ye={},Oo;function Tl(){if(Oo)return Ye;Oo=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r -]))+`;Ye.KANJI=new RegExp(n,"g"),Ye.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Ye.BYTE=new RegExp(r,"g"),Ye.NUMERIC=new RegExp(e,"g"),Ye.ALPHANUMERIC=new RegExp(t,"g");const s=new RegExp("^"+n+"$"),o=new RegExp("^"+e+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Ye.testKanji=function(l){return s.test(l)},Ye.testNumeric=function(l){return o.test(l)},Ye.testAlphanumeric=function(l){return i.test(l)},Ye}var Lo;function Mt(){return Lo||(Lo=1,function(e){const t=Al(),n=Tl();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(o,i){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!t.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?o.ccBits[0]:i<27?o.ccBits[1]:o.ccBits[2]},e.getBestModeForData=function(o){return n.testNumeric(o)?e.NUMERIC:n.testAlphanumeric(o)?e.ALPHANUMERIC:n.testKanji(o)?e.KANJI:e.BYTE},e.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},e.isValid=function(o){return o&&o.bit&&o.ccBits};function r(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+s)}}e.from=function(o,i){if(e.isValid(o))return o;try{return r(o)}catch{return i}}}(Cr)),Cr}var $o;function Mf(){return $o||($o=1,function(e){const t=It(),n=Pl(),r=Cs(),s=Mt(),o=Al(),i=7973,c=t.getBCHDigit(i);function l(g,p,b){for(let w=1;w<=40;w++)if(p<=e.getCapacity(w,b,g))return w}function a(g,p){return s.getCharCountIndicator(g,p)+4}function u(g,p){let b=0;return g.forEach(function(w){const B=a(w.mode,p);b+=B+w.getBitsLength()}),b}function f(g,p){for(let b=1;b<=40;b++)if(u(g,b)<=e.getCapacity(b,p,s.MIXED))return b}e.from=function(p,b){return o.isValid(p)?parseInt(p,10):b},e.getCapacity=function(p,b,w){if(!o.isValid(p))throw new Error("Invalid QR Code version");typeof w>"u"&&(w=s.BYTE);const B=t.getSymbolTotalCodewords(p),S=n.getTotalCodewordsCount(p,b),R=(B-S)*8;if(w===s.MIXED)return R;const P=R-a(w,p);switch(w){case s.NUMERIC:return Math.floor(P/10*3);case s.ALPHANUMERIC:return Math.floor(P/11*2);case s.KANJI:return Math.floor(P/13);case s.BYTE:default:return Math.floor(P/8)}},e.getBestVersionForData=function(p,b){let w;const B=r.from(b,r.M);if(Array.isArray(p)){if(p.length>1)return f(p,B);if(p.length===0)return 1;w=p[0]}else w=p;return l(w.mode,w.getLength(),B)},e.getEncodedBits=function(p){if(!o.isValid(p)||p<7)throw new Error("Invalid QR Code version");let b=p<<12;for(;t.getBCHDigit(b)-c>=0;)b^=i<=0;)l^=t<0&&(o=this.data.substr(s),i=parseInt(o,10),r.put(i,c*3+1))},Tr=t,Tr}var xr,ko;function Of(){if(ko)return xr;ko=1;const e=Mt(),t=["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 n(r){this.mode=e.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(s){return 11*Math.floor(s/2)+6*(s%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(s){let o;for(o=0;o+2<=this.data.length;o+=2){let i=t.indexOf(this.data[o])*45;i+=t.indexOf(this.data[o+1]),s.put(i,11)}this.data.length%2&&s.put(t.indexOf(this.data[o]),6)},xr=n,xr}var Ir,Uo;function Lf(){if(Uo)return Ir;Uo=1;const e=Mt();function t(n){this.mode=e.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}return t.getBitsLength=function(r){return r*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){for(let r=0,s=this.data.length;r=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw new Error("Invalid SJIS character: "+this.data[s]+` -Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),r.put(o,13)}},Mr=n,Mr}var Br={exports:{}},Vo;function Df(){return Vo||(Vo=1,function(e){var t={single_source_shortest_paths:function(n,r,s){var o={},i={};i[r]=0;var c=t.PriorityQueue.make();c.push(r,0);for(var l,a,u,f,g,p,b,w,B;!c.empty();){l=c.pop(),a=l.value,f=l.cost,g=n[a]||{};for(u in g)g.hasOwnProperty(u)&&(p=g[u],b=f+p,w=i[u],B=typeof i[u]>"u",(B||w>b)&&(i[u]=b,c.push(u,b),o[u]=a))}if(typeof s<"u"&&typeof i[s]>"u"){var S=["Could not find a path from ",r," to ",s,"."].join("");throw new Error(S)}return o},extract_shortest_path_from_predecessor_list:function(n,r){for(var s=[],o=r;o;)s.push(o),n[o],o=n[o];return s.reverse(),s},find_path:function(n,r,s){var o=t.single_source_shortest_paths(n,r,s);return t.extract_shortest_path_from_predecessor_list(o,s)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,s={},o;n=n||{};for(o in r)r.hasOwnProperty(o)&&(s[o]=r[o]);return s.queue=[],s.sorter=n.sorter||r.default_sorter,s},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var s={value:n,cost:r};this.queue.push(s),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t}(Br)),Br.exports}var jo;function Ff(){return jo||(jo=1,function(e){const t=Mt(),n=Nf(),r=Of(),s=Lf(),o=$f(),i=Tl(),c=It(),l=Df();function a(S){return unescape(encodeURIComponent(S)).length}function u(S,R,P){const _=[];let G;for(;(G=S.exec(P))!==null;)_.push({data:G[0],index:G.index,mode:R,length:G[0].length});return _}function f(S){const R=u(i.NUMERIC,t.NUMERIC,S),P=u(i.ALPHANUMERIC,t.ALPHANUMERIC,S);let _,G;return c.isKanjiModeEnabled()?(_=u(i.BYTE,t.BYTE,S),G=u(i.KANJI,t.KANJI,S)):(_=u(i.BYTE_KANJI,t.BYTE,S),G=[]),R.concat(P,_,G).sort(function(L,U){return L.index-U.index}).map(function(L){return{data:L.data,mode:L.mode,length:L.length}})}function g(S,R){switch(R){case t.NUMERIC:return n.getBitsLength(S);case t.ALPHANUMERIC:return r.getBitsLength(S);case t.KANJI:return o.getBitsLength(S);case t.BYTE:return s.getBitsLength(S)}}function p(S){return S.reduce(function(R,P){const _=R.length-1>=0?R[R.length-1]:null;return _&&_.mode===P.mode?(R[R.length-1].data+=P.data,R):(R.push(P),R)},[])}function b(S){const R=[];for(let P=0;P=0&&k<=6&&(J===0||J===6)||J>=0&&J<=6&&(k===0||k===6)||k>=2&&k<=4&&J>=2&&J<=4?N.set(H+k,j+J,!0,!0):N.set(H+k,j+J,!1,!0))}}function b(N){const L=N.size;for(let U=8;U>k&1)===1,N.set(V,H,j,!0),N.set(H,V,j,!0)}function S(N,L,U){const D=N.size,V=u.getEncodedBits(L,U);let H,j;for(H=0;H<15;H++)j=(V>>H&1)===1,H<6?N.set(H,8,j,!0):H<8?N.set(H+1,8,j,!0):N.set(D-15+H,8,j,!0),H<8?N.set(8,D-H-1,j,!0):H<9?N.set(8,15-H-1+1,j,!0):N.set(8,15-H-1,j,!0);N.set(D-8,8,1,!0)}function R(N,L){const U=N.size;let D=-1,V=U-1,H=7,j=0;for(let k=U-1;k>0;k-=2)for(k===6&&k--;;){for(let J=0;J<2;J++)if(!N.isReserved(V,k-J)){let Ce=!1;j>>H&1)===1),N.set(V,k-J,Ce),H--,H===-1&&(j++,H=7)}if(V+=D,V<0||U<=V){V-=D,D=-D;break}}}function P(N,L,U){const D=new n;U.forEach(function(J){D.put(J.mode.bit,4),D.put(J.getLength(),f.getCharCountIndicator(J.mode,N)),J.write(D)});const V=e.getSymbolTotalCodewords(N),H=c.getTotalCodewordsCount(N,L),j=(V-H)*8;for(D.getLengthInBits()+4<=j&&D.put(0,4);D.getLengthInBits()%8!==0;)D.putBit(0);const k=(j-D.getLengthInBits())/8;for(let J=0;J{},qe=Array.isArray,ul=/#/g,Qu=/&/g,Xu=/\//g,Zu=/=/g,ea=/\?/g,al=/\+/g,ta=/%5B/g,na=/%5D/g,fl=/%5E/g,ra=/%60/g,dl=/%7B/g,sa=/%7C/g,hl=/%7D/g,oa=/%20/g;function bs(e){return encodeURI(""+e).replace(sa,"|").replace(ta,"[").replace(na,"]")}function ia(e){return bs(e).replace(dl,"{").replace(hl,"}").replace(fl,"^")}function Qr(e){return bs(e).replace(al,"%2B").replace(oa,"+").replace(ul,"%23").replace(Qu,"%26").replace(ra,"`").replace(dl,"{").replace(hl,"}").replace(fl,"^")}function la(e){return Qr(e).replace(Zu,"%3D")}function ca(e){return bs(e).replace(ul,"%23").replace(ea,"%3F")}function ua(e){return e==null?"":ca(e).replace(Xu,"%2F")}function mn(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const aa=/\/$/,fa=e=>e.replace(aa,"");function fr(e,t,n="/"){let r,s={},o="",i="";const c=t.indexOf("#");let l=t.indexOf("?");return c=0&&(l=-1),l>-1&&(r=t.slice(0,l),o=t.slice(l+1,c>-1?c:t.length),s=e(o)),c>-1&&(r=r||t.slice(0,c),i=t.slice(c,t.length)),r=ga(r??t,n),{fullPath:r+(o&&"?")+o+i,path:r,query:s,hash:mn(i)}}function da(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function ro(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function ha(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&Kt(t.matched[r],n.matched[s])&&pl(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Kt(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function pl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!pa(e[n],t[n]))return!1;return!0}function pa(e,t){return qe(e)?so(e,t):qe(t)?so(t,e):e===t}function so(e,t){return qe(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function ga(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let o=n.length-1,i,c;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(i).join("/")}const dt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var _n;(function(e){e.pop="pop",e.push="push"})(_n||(_n={}));var un;(function(e){e.back="back",e.forward="forward",e.unknown=""})(un||(un={}));function ma(e){if(!e)if($t){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),fa(e)}const _a=/^[^#]+#/;function ya(e,t){return e.replace(_a,"#")+t}function va(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Qn=()=>({left:window.scrollX,top:window.scrollY});function ba(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=va(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function oo(e,t){return(history.state?history.state.position-t:-1)+e}const Xr=new Map;function wa(e,t){Xr.set(e,t)}function Ea(e){const t=Xr.get(e);return Xr.delete(e),t}let Sa=()=>location.protocol+"//"+location.host;function gl(e,t){const{pathname:n,search:r,hash:s}=t,o=e.indexOf("#");if(o>-1){let c=s.includes(e.slice(o))?e.slice(o).length:1,l=s.slice(c);return l[0]!=="/"&&(l="/"+l),ro(l,"")}return ro(n,e)+r+s}function Ca(e,t,n,r){let s=[],o=[],i=null;const c=({state:g})=>{const p=gl(e,location),b=n.value,w=t.value;let B=0;if(g){if(n.value=p,t.value=g,i&&i===b){i=null;return}B=w?g.position-w.position:0}else r(p);s.forEach(S=>{S(n.value,b,{delta:B,type:_n.pop,direction:B?B>0?un.forward:un.back:un.unknown})})};function l(){i=n.value}function a(g){s.push(g);const p=()=>{const b=s.indexOf(g);b>-1&&s.splice(b,1)};return o.push(p),p}function u(){const{history:g}=window;g.state&&g.replaceState(re({},g.state,{scroll:Qn()}),"")}function f(){for(const g of o)g();o=[],window.removeEventListener("popstate",c),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",c),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:a,destroy:f}}function io(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?Qn():null}}function Ra(e){const{history:t,location:n}=window,r={value:gl(e,n)},s={value:t.state};s.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(l,a,u){const f=e.indexOf("#"),g=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+l:Sa()+e+l;try{t[u?"replaceState":"pushState"](a,"",g),s.value=a}catch(p){console.error(p),n[u?"replace":"assign"](g)}}function i(l,a){const u=re({},t.state,io(s.value.back,l,s.value.forward,!0),a,{position:s.value.position});o(l,u,!0),r.value=l}function c(l,a){const u=re({},s.value,t.state,{forward:l,scroll:Qn()});o(u.current,u,!0);const f=re({},io(r.value,l,null),{position:u.position+1},a);o(l,f,!1),r.value=l}return{location:r,state:s,push:c,replace:i}}function Pa(e){e=ma(e);const t=Ra(e),n=Ca(e,t.state,t.location,t.replace);function r(o,i=!0){i||n.pauseListeners(),history.go(o)}const s=re({location:"",base:e,go:r,createHref:ya.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function Aa(e){return typeof e=="string"||e&&typeof e=="object"}function ml(e){return typeof e=="string"||typeof e=="symbol"}const _l=Symbol("");var lo;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(lo||(lo={}));function zt(e,t){return re(new Error,{type:e,[_l]:!0},t)}function rt(e,t){return e instanceof Error&&_l in e&&(t==null||!!(e.type&t))}const co="[^/]+?",Ta={sensitive:!1,strict:!1,start:!0,end:!0},Ia=/[.+*?^${}()[\]/\\]/g;function xa(e,t){const n=re({},Ta,t),r=[];let s=n.start?"^":"";const o=[];for(const a of e){const u=a.length?[]:[90];n.strict&&!a.length&&(s+="/");for(let f=0;ft.length?t.length===1&&t[0]===80?1:-1:0}function yl(e,t){let n=0;const r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}const Ba={type:0,value:""},Na=/[a-zA-Z0-9_]/;function Oa(e){if(!e)return[[]];if(e==="/")return[[Ba]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${a}": ${p}`)}let n=0,r=n;const s=[];let o;function i(){o&&s.push(o),o=[]}let c=0,l,a="",u="";function f(){a&&(n===0?o.push({type:0,value:a}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:a,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),a="")}function g(){a+=l}for(;c{i(P)}:cn}function i(f){if(ml(f)){const g=r.get(f);g&&(r.delete(f),n.splice(n.indexOf(g),1),g.children.forEach(i),g.alias.forEach(i))}else{const g=n.indexOf(f);g>-1&&(n.splice(g,1),f.record.name&&r.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function c(){return n}function l(f){const g=Ua(f,n);n.splice(g,0,f),f.record.name&&!ho(f)&&r.set(f.record.name,f)}function a(f,g){let p,b={},w,B;if("name"in f&&f.name){if(p=r.get(f.name),!p)throw zt(1,{location:f});B=p.record.name,b=re(ao(g.params,p.keys.filter(P=>!P.optional).concat(p.parent?p.parent.keys.filter(P=>P.optional):[]).map(P=>P.name)),f.params&&ao(f.params,p.keys.map(P=>P.name))),w=p.stringify(b)}else if(f.path!=null)w=f.path,p=n.find(P=>P.re.test(w)),p&&(b=p.parse(w),B=p.record.name);else{if(p=g.name?r.get(g.name):n.find(P=>P.re.test(g.path)),!p)throw zt(1,{location:f,currentLocation:g});B=p.record.name,b=re({},g.params,f.params),w=p.stringify(b)}const S=[];let R=p;for(;R;)S.unshift(R.record),R=R.parent;return{name:B,path:w,params:b,matched:S,meta:Fa(S)}}e.forEach(f=>o(f));function u(){n.length=0,r.clear()}return{addRoute:o,resolve:a,removeRoute:i,clearRoutes:u,getRoutes:c,getRecordMatcher:s}}function ao(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function fo(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Da(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Da(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function ho(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Fa(e){return e.reduce((t,n)=>re(t,n.meta),{})}function po(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Ua(e,t){let n=0,r=t.length;for(;n!==r;){const o=n+r>>1;yl(e,t[o])<0?r=o:n=o+1}const s=ka(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function ka(e){let t=e;for(;t=t.parent;)if(vl(t)&&yl(e,t)===0)return t}function vl({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Ha(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&Qr(o)):[r&&Qr(r)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function Va(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=qe(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const ja=Symbol(""),mo=Symbol(""),Xn=Symbol(""),ws=Symbol(""),Zr=Symbol("");function Qt(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function mt(e,t,n,r,s,o=i=>i()){const i=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((c,l)=>{const a=g=>{g===!1?l(zt(4,{from:n,to:t})):g instanceof Error?l(g):Aa(g)?l(zt(2,{from:t,to:g})):(i&&r.enterCallbacks[s]===i&&typeof g=="function"&&i.push(g),c())},u=o(()=>e.call(r&&r.instances[s],t,n,a));let f=Promise.resolve(u);e.length<3&&(f=f.then(a)),f.catch(g=>l(g))})}function dr(e,t,n,r,s=o=>o()){const o=[];for(const i of e)for(const c in i.components){let l=i.components[c];if(!(t!=="beforeRouteEnter"&&!i.instances[c]))if(cl(l)){const u=(l.__vccOpts||l)[t];u&&o.push(mt(u,n,r,i,c,s))}else{let a=l();o.push(()=>a.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${c}" at "${i.path}"`);const f=Yu(u)?u.default:u;i.mods[c]=u,i.components[c]=f;const p=(f.__vccOpts||f)[t];return p&&mt(p,n,r,i,c,s)()}))}}return o}function _o(e){const t=je(Xn),n=je(ws),r=He(()=>{const l=_t(e.to);return t.resolve(l)}),s=He(()=>{const{matched:l}=r.value,{length:a}=l,u=l[a-1],f=n.matched;if(!u||!f.length)return-1;const g=f.findIndex(Kt.bind(null,u));if(g>-1)return g;const p=yo(l[a-2]);return a>1&&yo(u)===p&&f[f.length-1].path!==p?f.findIndex(Kt.bind(null,l[a-2])):g}),o=He(()=>s.value>-1&&Wa(n.params,r.value.params)),i=He(()=>s.value>-1&&s.value===n.matched.length-1&&pl(n.params,r.value.params));function c(l={}){if(Ga(l)){const a=t[_t(e.replace)?"replace":"push"](_t(e.to)).catch(cn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>a),a}return Promise.resolve()}return{route:r,href:He(()=>r.value.href),isActive:o,isExactActive:i,navigate:c}}function qa(e){return e.length===1?e[0]:e}const Ka=Me({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:_o,setup(e,{slots:t}){const n=Kn(_o(e)),{options:r}=je(Xn),s=He(()=>({[vo(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[vo(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&qa(t.default(n));return e.custom?o:vs("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),za=Ka;function Ga(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Wa(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!qe(s)||s.length!==r.length||r.some((o,i)=>o!==s[i]))return!1}return!0}function yo(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const vo=(e,t,n)=>e??t??n,Ja=Me({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=je(Zr),s=He(()=>e.route||r.value),o=je(mo,0),i=He(()=>{let a=_t(o);const{matched:u}=s.value;let f;for(;(f=u[a])&&!f.components;)a++;return a}),c=He(()=>s.value.matched[i.value]);Pn(mo,He(()=>i.value+1)),Pn(ja,c),Pn(Zr,s);const l=me();return on(()=>[l.value,c.value,e.name],([a,u,f],[g,p,b])=>{u&&(u.instances[f]=a,p&&p!==u&&a&&a===g&&(u.leaveGuards.size||(u.leaveGuards=p.leaveGuards),u.updateGuards.size||(u.updateGuards=p.updateGuards))),a&&u&&(!p||!Kt(u,p)||!g)&&(u.enterCallbacks[f]||[]).forEach(w=>w(a))},{flush:"post"}),()=>{const a=s.value,u=e.name,f=c.value,g=f&&f.components[u];if(!g)return bo(n.default,{Component:g,route:a});const p=f.props[u],b=p?p===!0?a.params:typeof p=="function"?p(a):p:null,B=vs(g,re({},b,t,{onVnodeUnmounted:S=>{S.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return bo(n.default,{Component:B,route:a})||B}}});function bo(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const bl=Ja;function Ya(e){const t=$a(e.routes,e),n=e.parseQuery||Ha,r=e.stringifyQuery||go,s=e.history,o=Qt(),i=Qt(),c=Qt(),l=lc(dt);let a=dt;$t&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=ar.bind(null,y=>""+y),f=ar.bind(null,ua),g=ar.bind(null,mn);function p(y,M){let I,F;return ml(y)?(I=t.getRecordMatcher(y),F=M):F=y,t.addRoute(F,I)}function b(y){const M=t.getRecordMatcher(y);M&&t.removeRoute(M)}function w(){return t.getRoutes().map(y=>y.record)}function B(y){return!!t.getRecordMatcher(y)}function S(y,M){if(M=re({},M||l.value),typeof y=="string"){const m=fr(n,y,M.path),v=t.resolve({path:m.path},M),C=s.createHref(m.fullPath);return re(m,v,{params:g(v.params),hash:mn(m.hash),redirectedFrom:void 0,href:C})}let I;if(y.path!=null)I=re({},y,{path:fr(n,y.path,M.path).path});else{const m=re({},y.params);for(const v in m)m[v]==null&&delete m[v];I=re({},y,{params:f(m)}),M.params=f(M.params)}const F=t.resolve(I,M),ce=y.hash||"";F.params=u(g(F.params));const d=da(r,re({},y,{hash:ia(ce),path:F.path})),h=s.createHref(d);return re({fullPath:d,hash:ce,query:r===go?Va(y.query):y.query||{}},F,{redirectedFrom:void 0,href:h})}function R(y){return typeof y=="string"?fr(n,y,l.value.path):re({},y)}function P(y,M){if(a!==y)return zt(8,{from:M,to:y})}function _(y){return L(y)}function G(y){return _(re(R(y),{replace:!0}))}function N(y){const M=y.matched[y.matched.length-1];if(M&&M.redirect){const{redirect:I}=M;let F=typeof I=="function"?I(y):I;return typeof F=="string"&&(F=F.includes("?")||F.includes("#")?F=R(F):{path:F},F.params={}),re({query:y.query,hash:y.hash,params:F.path!=null?{}:y.params},F)}}function L(y,M){const I=a=S(y),F=l.value,ce=y.state,d=y.force,h=y.replace===!0,m=N(I);if(m)return L(re(R(m),{state:typeof m=="object"?re({},ce,m.state):ce,force:d,replace:h}),M||I);const v=I;v.redirectedFrom=M;let C;return!d&&ha(r,F,I)&&(C=zt(16,{to:v,from:F}),Re(F,F,!0,!1)),(C?Promise.resolve(C):V(v,F)).catch(E=>rt(E)?rt(E,2)?E:De(E):Z(E,v,F)).then(E=>{if(E){if(rt(E,2))return L(re({replace:h},R(E.to),{state:typeof E.to=="object"?re({},ce,E.to.state):ce,force:d}),M||v)}else E=j(v,F,!0,h,ce);return H(v,F,E),E})}function k(y,M){const I=P(y,M);return I?Promise.reject(I):Promise.resolve()}function D(y){const M=at.values().next().value;return M&&typeof M.runWithContext=="function"?M.runWithContext(y):y()}function V(y,M){let I;const[F,ce,d]=Qa(y,M);I=dr(F.reverse(),"beforeRouteLeave",y,M);for(const m of F)m.leaveGuards.forEach(v=>{I.push(mt(v,y,M))});const h=k.bind(null,y,M);return I.push(h),Pe(I).then(()=>{I=[];for(const m of o.list())I.push(mt(m,y,M));return I.push(h),Pe(I)}).then(()=>{I=dr(ce,"beforeRouteUpdate",y,M);for(const m of ce)m.updateGuards.forEach(v=>{I.push(mt(v,y,M))});return I.push(h),Pe(I)}).then(()=>{I=[];for(const m of d)if(m.beforeEnter)if(qe(m.beforeEnter))for(const v of m.beforeEnter)I.push(mt(v,y,M));else I.push(mt(m.beforeEnter,y,M));return I.push(h),Pe(I)}).then(()=>(y.matched.forEach(m=>m.enterCallbacks={}),I=dr(d,"beforeRouteEnter",y,M,D),I.push(h),Pe(I))).then(()=>{I=[];for(const m of i.list())I.push(mt(m,y,M));return I.push(h),Pe(I)}).catch(m=>rt(m,8)?m:Promise.reject(m))}function H(y,M,I){c.list().forEach(F=>D(()=>F(y,M,I)))}function j(y,M,I,F,ce){const d=P(y,M);if(d)return d;const h=M===dt,m=$t?history.state:{};I&&(F||h?s.replace(y.fullPath,re({scroll:h&&m&&m.scroll},ce)):s.push(y.fullPath,ce)),l.value=y,Re(y,M,I,h),De()}let U;function J(){U||(U=s.listen((y,M,I)=>{if(!ft.listening)return;const F=S(y),ce=N(F);if(ce){L(re(ce,{replace:!0,force:!0}),F).catch(cn);return}a=F;const d=l.value;$t&&wa(oo(d.fullPath,I.delta),Qn()),V(F,d).catch(h=>rt(h,12)?h:rt(h,2)?(L(re(R(h.to),{force:!0}),F).then(m=>{rt(m,20)&&!I.delta&&I.type===_n.pop&&s.go(-1,!1)}).catch(cn),Promise.reject()):(I.delta&&s.go(-I.delta,!1),Z(h,F,d))).then(h=>{h=h||j(F,d,!1),h&&(I.delta&&!rt(h,8)?s.go(-I.delta,!1):I.type===_n.pop&&rt(h,20)&&s.go(-1,!1)),H(F,d,h)}).catch(cn)}))}let Ce=Qt(),de=Qt(),ne;function Z(y,M,I){De(y);const F=de.list();return F.length?F.forEach(ce=>ce(y,M,I)):console.error(y),Promise.reject(y)}function ke(){return ne&&l.value!==dt?Promise.resolve():new Promise((y,M)=>{Ce.add([y,M])})}function De(y){return ne||(ne=!y,J(),Ce.list().forEach(([M,I])=>y?I(y):M()),Ce.reset()),y}function Re(y,M,I,F){const{scrollBehavior:ce}=e;if(!$t||!ce)return Promise.resolve();const d=!I&&Ea(oo(y.fullPath,0))||(F||!I)&&history.state&&history.state.scroll||null;return ds().then(()=>ce(y,M,d)).then(h=>h&&ba(h)).catch(h=>Z(h,y,M))}const ge=y=>s.go(y);let Ke;const at=new Set,ft={currentRoute:l,listening:!0,addRoute:p,removeRoute:b,clearRoutes:t.clearRoutes,hasRoute:B,getRoutes:w,resolve:S,options:e,push:_,replace:G,go:ge,back:()=>ge(-1),forward:()=>ge(1),beforeEach:o.add,beforeResolve:i.add,afterEach:c.add,onError:de.add,isReady:ke,install(y){const M=this;y.component("RouterLink",za),y.component("RouterView",bl),y.config.globalProperties.$router=M,Object.defineProperty(y.config.globalProperties,"$route",{enumerable:!0,get:()=>_t(l)}),$t&&!Ke&&l.value===dt&&(Ke=!0,_(s.location).catch(ce=>{}));const I={};for(const ce in dt)Object.defineProperty(I,ce,{get:()=>l.value[ce],enumerable:!0});y.provide(Xn,M),y.provide(ws,bi(I)),y.provide(Zr,l);const F=y.unmount;at.add(y),y.unmount=function(){at.delete(y),at.size<1&&(a=dt,U&&U(),U=null,l.value=dt,Ke=!1,ne=!1),F()}}};function Pe(y){return y.reduce((M,I)=>M.then(()=>D(I)),Promise.resolve())}return ft}function Qa(e,t){const n=[],r=[],s=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;iKt(a,c))?r.push(c):n.push(c));const l=e.matched[i];l&&(t.matched.find(a=>Kt(a,l))||s.push(l))}return[n,r,s]}function wl(){return je(Xn)}function Xa(e){return je(ws)}const Za=Me({__name:"App",setup(e){return(t,n)=>(ee(),Tt(_t(bl)))}}),Ue=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},ef=Ue(Za,[["__scopeId","data-v-913ef6b1"]]),tf="/assets/logo_belt-DPdjjAgZ.png",nf={},rf={class:"belt-block"};function sf(e,t){return ee(),fe("div",null,[t[0]||(t[0]=K("div",{class:"shadow"},null,-1)),K("div",rf,[vn(e.$slots,"default",{},void 0)])])}const of=Ue(nf,[["render",sf],["__scopeId","data-v-5ed18f32"]]),lf={},cf={class:"belt-block"};function uf(e,t){return ee(),fe("div",null,[t[0]||(t[0]=K("div",{class:"shadow shadow-top"},null,-1)),t[1]||(t[1]=K("div",{class:"shadow shadow-bottom"},null,-1)),K("div",cf,[vn(e.$slots,"default",{},void 0)])])}const El=Ue(lf,[["render",uf],["__scopeId","data-v-0effe39e"]]),af={class:"text-with-font"},ff=Me({__name:"HeaderText",setup(e){return(t,n)=>(ee(),fe("span",af,[vn(t.$slots,"default",{},void 0)]))}}),Sl=Ue(ff,[["__scopeId","data-v-33b571eb"]]),df={},hf={class:"plate-block"},pf={class:"metal-plate-block"};function gf(e,t){return ee(),fe("div",hf,[K("div",pf,[vn(e.$slots,"default",{},void 0)]),t[0]||(t[0]=K("div",{class:"pin pin-top-left"},null,-1)),t[1]||(t[1]=K("div",{class:"pin pin-top-right"},null,-1)),t[2]||(t[2]=K("div",{class:"pin pin-bottom-right"},null,-1)),t[3]||(t[3]=K("div",{class:"pin pin-bottom-left"},null,-1))])}const Fn=Ue(df,[["render",gf],["__scopeId","data-v-34e952c0"]]),mf={class:"game-header"},_f={class:"center"},yf={class:"position-right-center-block"},vf=Me({__name:"GameHeader",setup(e){return(t,n)=>(ee(),fe("div",mf,[K("div",_f,[ie(Fn,{class:"controller-metal controller-metal-left"}),ie(Fn,{class:"controller-metal controller-metal-right"}),n[1]||(n[1]=K("img",{alt:"Вечерний детектив",class:"logo",src:tf},null,-1)),ie(of,{class:"belt-mini"}),ie(El,{class:"belt"},{default:yt(()=>[K("div",yf,[ie(Sl,null,{default:yt(()=>n[0]||(n[0]=[jt("Вечерний детектив")])),_:1})])]),_:1})])]))}}),bf=Ue(vf,[["__scopeId","data-v-b87f05d7"]]);class It extends Error{constructor(t="Пользователь не авторизован (401)"){super(t),this.name="UnauthorizedError",Object.setPrototypeOf(this,It.prototype)}}const wf="https://evening-detective-api.crabs-games.art",Cl=async(e,t)=>{try{const n=await fetch(Es("/team"),{method:"GET",headers:{"X-Id":Ss(e),"X-Password":t}});if(n.status===401)throw new It("Ошибка авторизации");if(!n.ok)throw new Error(`http error status: ${n.status}`);return await n.json()}catch(n){throw console.error("[apiGetTeam] error:",n),n}},Rl=async(e,t,n)=>{try{const r=await fetch(Es("/team/actions"),{method:"POST",headers:{"X-Id":Ss(e),"X-Password":t},body:JSON.stringify({place:n})});if(r.status===401)throw new It("Ошибка авторизации");if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiLetsgo] error:",r),r}},Ef=async(e,t)=>{try{const n=await fetch(Es("/game"),{method:"GET",headers:{"X-Id":Ss(e),"X-Password":t}});if(n.status===401)throw new It("Ошибка авторизации");if(!n.ok)throw new Error(`http error status: ${n.status}`);return await n.json()}catch(n){throw console.error("[apiGetGame] error:",n),n}};function Es(e){return wf+e}function Ss(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(t,n)=>String.fromCharCode(parseInt(n,16))))}var Nt={},hr,wo;function Sf(){return wo||(wo=1,hr=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),hr}var pr={},ht={},Eo;function xt(){if(Eo)return ht;Eo=1;let e;const t=[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 ht.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},ht.getSymbolTotalCodewords=function(r){return t[r]},ht.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},ht.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},ht.isKanjiModeEnabled=function(){return typeof e<"u"},ht.toSJIS=function(r){return e(r)},ht}var gr={},So;function Cs(){return So||(So=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,s){if(e.isValid(r))return r;try{return t(r)}catch{return s}}}(gr)),gr}var mr,Co;function Cf(){if(Co)return mr;Co=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let r=0;r>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},mr=e,mr}var _r,Ro;function Rf(){if(Ro)return _r;Ro=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,r,s){const o=t*this.size+n;this.data[o]=r,s&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},_r=e,_r}var yr={},Po;function Pf(){return Po||(Po=1,function(e){const t=xt().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const s=Math.floor(r/7)+2,o=t(r),i=o===145?26:Math.ceil((o-13)/(2*s-2))*2,c=[o-7];for(let l=1;l=0&&s<=7},e.from=function(s){return e.isValid(s)?parseInt(s,10):void 0},e.getPenaltyN1=function(s){const o=s.size;let i=0,c=0,l=0,a=null,u=null;for(let f=0;f=5&&(i+=t.N1+(c-5)),a=p,c=1),p=s.get(g,f),p===u?l++:(l>=5&&(i+=t.N1+(l-5)),u=p,l=1)}c>=5&&(i+=t.N1+(c-5)),l>=5&&(i+=t.N1+(l-5))}return i},e.getPenaltyN2=function(s){const o=s.size;let i=0;for(let c=0;c=10&&(c===1488||c===93)&&i++,l=l<<1&2047|s.get(u,a),u>=10&&(l===1488||l===93)&&i++}return i*t.N3},e.getPenaltyN4=function(s){let o=0;const i=s.data.length;for(let l=0;l=0;){const i=o[0];for(let l=0;l0){const c=new Uint8Array(this.degree);return c.set(o,i),c}return o},Er=t,Er}var Sr={},Cr={},Rr={},No;function Al(){return No||(No=1,Rr.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Rr}var Ye={},Oo;function Tl(){if(Oo)return Ye;Oo=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r +]))+`;Ye.KANJI=new RegExp(n,"g"),Ye.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Ye.BYTE=new RegExp(r,"g"),Ye.NUMERIC=new RegExp(e,"g"),Ye.ALPHANUMERIC=new RegExp(t,"g");const s=new RegExp("^"+n+"$"),o=new RegExp("^"+e+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Ye.testKanji=function(l){return s.test(l)},Ye.testNumeric=function(l){return o.test(l)},Ye.testAlphanumeric=function(l){return i.test(l)},Ye}var Lo;function Mt(){return Lo||(Lo=1,function(e){const t=Al(),n=Tl();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(o,i){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!t.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?o.ccBits[0]:i<27?o.ccBits[1]:o.ccBits[2]},e.getBestModeForData=function(o){return n.testNumeric(o)?e.NUMERIC:n.testAlphanumeric(o)?e.ALPHANUMERIC:n.testKanji(o)?e.KANJI:e.BYTE},e.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},e.isValid=function(o){return o&&o.bit&&o.ccBits};function r(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+s)}}e.from=function(o,i){if(e.isValid(o))return o;try{return r(o)}catch{return i}}}(Cr)),Cr}var $o;function Bf(){return $o||($o=1,function(e){const t=xt(),n=Pl(),r=Cs(),s=Mt(),o=Al(),i=7973,c=t.getBCHDigit(i);function l(g,p,b){for(let w=1;w<=40;w++)if(p<=e.getCapacity(w,b,g))return w}function a(g,p){return s.getCharCountIndicator(g,p)+4}function u(g,p){let b=0;return g.forEach(function(w){const B=a(w.mode,p);b+=B+w.getBitsLength()}),b}function f(g,p){for(let b=1;b<=40;b++)if(u(g,b)<=e.getCapacity(b,p,s.MIXED))return b}e.from=function(p,b){return o.isValid(p)?parseInt(p,10):b},e.getCapacity=function(p,b,w){if(!o.isValid(p))throw new Error("Invalid QR Code version");typeof w>"u"&&(w=s.BYTE);const B=t.getSymbolTotalCodewords(p),S=n.getTotalCodewordsCount(p,b),R=(B-S)*8;if(w===s.MIXED)return R;const P=R-a(w,p);switch(w){case s.NUMERIC:return Math.floor(P/10*3);case s.ALPHANUMERIC:return Math.floor(P/11*2);case s.KANJI:return Math.floor(P/13);case s.BYTE:default:return Math.floor(P/8)}},e.getBestVersionForData=function(p,b){let w;const B=r.from(b,r.M);if(Array.isArray(p)){if(p.length>1)return f(p,B);if(p.length===0)return 1;w=p[0]}else w=p;return l(w.mode,w.getLength(),B)},e.getEncodedBits=function(p){if(!o.isValid(p)||p<7)throw new Error("Invalid QR Code version");let b=p<<12;for(;t.getBCHDigit(b)-c>=0;)b^=i<=0;)l^=t<0&&(o=this.data.substr(s),i=parseInt(o,10),r.put(i,c*3+1))},Tr=t,Tr}var Ir,Uo;function Lf(){if(Uo)return Ir;Uo=1;const e=Mt(),t=["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 n(r){this.mode=e.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(s){return 11*Math.floor(s/2)+6*(s%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(s){let o;for(o=0;o+2<=this.data.length;o+=2){let i=t.indexOf(this.data[o])*45;i+=t.indexOf(this.data[o+1]),s.put(i,11)}this.data.length%2&&s.put(t.indexOf(this.data[o]),6)},Ir=n,Ir}var xr,ko;function $f(){if(ko)return xr;ko=1;const e=Mt();function t(n){this.mode=e.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}return t.getBitsLength=function(r){return r*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){for(let r=0,s=this.data.length;r=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw new Error("Invalid SJIS character: "+this.data[s]+` +Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),r.put(o,13)}},Mr=n,Mr}var Br={exports:{}},Vo;function Ff(){return Vo||(Vo=1,function(e){var t={single_source_shortest_paths:function(n,r,s){var o={},i={};i[r]=0;var c=t.PriorityQueue.make();c.push(r,0);for(var l,a,u,f,g,p,b,w,B;!c.empty();){l=c.pop(),a=l.value,f=l.cost,g=n[a]||{};for(u in g)g.hasOwnProperty(u)&&(p=g[u],b=f+p,w=i[u],B=typeof i[u]>"u",(B||w>b)&&(i[u]=b,c.push(u,b),o[u]=a))}if(typeof s<"u"&&typeof i[s]>"u"){var S=["Could not find a path from ",r," to ",s,"."].join("");throw new Error(S)}return o},extract_shortest_path_from_predecessor_list:function(n,r){for(var s=[],o=r;o;)s.push(o),n[o],o=n[o];return s.reverse(),s},find_path:function(n,r,s){var o=t.single_source_shortest_paths(n,r,s);return t.extract_shortest_path_from_predecessor_list(o,s)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,s={},o;n=n||{};for(o in r)r.hasOwnProperty(o)&&(s[o]=r[o]);return s.queue=[],s.sorter=n.sorter||r.default_sorter,s},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var s={value:n,cost:r};this.queue.push(s),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t}(Br)),Br.exports}var jo;function Uf(){return jo||(jo=1,function(e){const t=Mt(),n=Of(),r=Lf(),s=$f(),o=Df(),i=Tl(),c=xt(),l=Ff();function a(S){return unescape(encodeURIComponent(S)).length}function u(S,R,P){const _=[];let G;for(;(G=S.exec(P))!==null;)_.push({data:G[0],index:G.index,mode:R,length:G[0].length});return _}function f(S){const R=u(i.NUMERIC,t.NUMERIC,S),P=u(i.ALPHANUMERIC,t.ALPHANUMERIC,S);let _,G;return c.isKanjiModeEnabled()?(_=u(i.BYTE,t.BYTE,S),G=u(i.KANJI,t.KANJI,S)):(_=u(i.BYTE_KANJI,t.BYTE,S),G=[]),R.concat(P,_,G).sort(function(L,k){return L.index-k.index}).map(function(L){return{data:L.data,mode:L.mode,length:L.length}})}function g(S,R){switch(R){case t.NUMERIC:return n.getBitsLength(S);case t.ALPHANUMERIC:return r.getBitsLength(S);case t.KANJI:return o.getBitsLength(S);case t.BYTE:return s.getBitsLength(S)}}function p(S){return S.reduce(function(R,P){const _=R.length-1>=0?R[R.length-1]:null;return _&&_.mode===P.mode?(R[R.length-1].data+=P.data,R):(R.push(P),R)},[])}function b(S){const R=[];for(let P=0;P=0&&U<=6&&(J===0||J===6)||J>=0&&J<=6&&(U===0||U===6)||U>=2&&U<=4&&J>=2&&J<=4?N.set(H+U,j+J,!0,!0):N.set(H+U,j+J,!1,!0))}}function b(N){const L=N.size;for(let k=8;k>U&1)===1,N.set(V,H,j,!0),N.set(H,V,j,!0)}function S(N,L,k){const D=N.size,V=u.getEncodedBits(L,k);let H,j;for(H=0;H<15;H++)j=(V>>H&1)===1,H<6?N.set(H,8,j,!0):H<8?N.set(H+1,8,j,!0):N.set(D-15+H,8,j,!0),H<8?N.set(8,D-H-1,j,!0):H<9?N.set(8,15-H-1+1,j,!0):N.set(8,15-H-1,j,!0);N.set(D-8,8,1,!0)}function R(N,L){const k=N.size;let D=-1,V=k-1,H=7,j=0;for(let U=k-1;U>0;U-=2)for(U===6&&U--;;){for(let J=0;J<2;J++)if(!N.isReserved(V,U-J)){let Ce=!1;j>>H&1)===1),N.set(V,U-J,Ce),H--,H===-1&&(j++,H=7)}if(V+=D,V<0||k<=V){V-=D,D=-D;break}}}function P(N,L,k){const D=new n;k.forEach(function(J){D.put(J.mode.bit,4),D.put(J.getLength(),f.getCharCountIndicator(J.mode,N)),J.write(D)});const V=e.getSymbolTotalCodewords(N),H=c.getTotalCodewordsCount(N,L),j=(V-H)*8;for(D.getLengthInBits()+4<=j&&D.put(0,4);D.getLengthInBits()%8!==0;)D.putBit(0);const U=(j-D.getLengthInBits())/8;for(let J=0;J=7&&B(J,L),R(J,j),isNaN(D)&&(D=i.getBestMask(J,S.bind(null,J,U))),i.applyMask(D,J),S(J,U,D),{modules:J,version:L,errorCorrectionLevel:U,maskPattern:D,segments:V}}return pr.create=function(L,U){if(typeof L>"u"||L==="")throw new Error("No input text");let D=t.M,V,H;return typeof U<"u"&&(D=t.from(U.errorCorrectionLevel,t.M),V=a.from(U.version),H=i.from(U.maskPattern),U.toSJISFunc&&e.setToSJISFunction(U.toSJISFunc)),G(L,V,D,H)},pr}var Nr={},Or={},Ko;function xl(){return Ko||(Ko=1,function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(o){return[o,o]}))),r.length===6&&r.push("F","F");const s=parseInt(r.join(""),16);return{r:s>>24&255,g:s>>16&255,b:s>>8&255,a:s&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const s=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,o=r.width&&r.width>=21?r.width:void 0,i=r.scale||4;return{width:o,scale:o?4:i,margin:s,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,s){return s.width&&s.width>=r+s.margin*2?s.width/(r+s.margin*2):s.scale},e.getImageWidth=function(r,s){const o=e.getScale(r,s);return Math.floor((r+s.margin*2)*o)},e.qrToImageData=function(r,s,o){const i=s.modules.size,c=s.modules.data,l=e.getScale(i,o),a=Math.floor((i+o.margin*2)*l),u=o.margin*l,f=[o.color.light,o.color.dark];for(let g=0;g=u&&p>=u&&g"u"&&(!i||!i.getContext)&&(l=i,i=void 0),i||(a=r()),l=t.getOptions(l);const u=t.getImageWidth(o.modules.size,l),f=a.getContext("2d"),g=f.createImageData(u,u);return t.qrToImageData(g.data,o,l),n(f,a,u),f.putImageData(g,0,0),a},e.renderToDataURL=function(o,i,c){let l=c;typeof l>"u"&&(!i||!i.getContext)&&(l=i,i=void 0),l||(l={});const a=e.render(o,i,l),u=l.type||"image/png",f=l.rendererOpts||{};return a.toDataURL(u,f.quality)}}(Nr)),Nr}var Lr={},Go;function Hf(){if(Go)return Lr;Go=1;const e=xl();function t(s,o){const i=s.a/255,c=o+'="'+s.hex+'"';return i<1?c+" "+o+'-opacity="'+i.toFixed(2).slice(1)+'"':c}function n(s,o,i){let c=s+o;return typeof i<"u"&&(c+=" "+i),c}function r(s,o,i){let c="",l=0,a=!1,u=0;for(let f=0;f0&&g>0&&s[f-1]||(c+=a?n("M",g+i,.5+p+i):n("m",l,0),l=0,a=!1),g+1':"",p="',b='viewBox="0 0 '+f+" "+f+'"',B=''+g+p+` -`;return typeof c=="function"&&c(null,B),B},Lr}var Wo;function Vf(){if(Wo)return Nt;Wo=1;const e=Ef(),t=kf(),n=Uf(),r=Hf();function s(o,i,c,l,a){const u=[].slice.call(arguments,1),f=u.length,g=typeof u[f-1]=="function";if(!g&&!e())throw new Error("Callback required as last argument");if(g){if(f<2)throw new Error("Too few arguments provided");f===2?(a=c,c=i,i=l=void 0):f===3&&(i.getContext&&typeof a>"u"?(a=l,l=void 0):(a=l,l=c,c=i,i=void 0))}else{if(f<1)throw new Error("Too few arguments provided");return f===1?(c=i,i=l=void 0):f===2&&!i.getContext&&(l=c,c=i,i=void 0),new Promise(function(p,b){try{const w=t.create(c,l);p(o(w,i,l))}catch(w){b(w)}})}try{const p=t.create(c,l);a(null,o(p,i,l))}catch(p){a(p)}}return Nt.create=t.create,Nt.toCanvas=s.bind(null,n.render),Nt.toDataURL=s.bind(null,n.renderToDataURL),Nt.toString=s.bind(null,function(o,i,c){return r.render(o,c)}),Nt}var $r=Vf();/*! vue-qrcode v2.0.0 | (c) 2018-present Chen Fengyuan | MIT */const Jo="ready";var jf=Me({name:"VueQrcode",props:{value:{type:String,default:void 0},options:{type:Object,default:void 0},tag:{type:String,default:"canvas"}},emits:[Jo],watch:{$props:{deep:!0,immediate:!0,handler(){this.$el&&this.generate()}}},mounted(){this.generate()},methods:{generate(){const e=this.options||{},t=String(this.value),n=()=>{this.$emit(Jo,this.$el)};switch(this.tag){case"canvas":$r.toCanvas(this.$el,t,e,r=>{if(r)throw r;n()});break;case"img":$r.toDataURL(t,e,(r,s)=>{if(r)throw r;this.$el.src=s,this.$el.onload=n});break;case"svg":$r.toString(t,e,(r,s)=>{if(r)throw r;const o=document.createElement("div");o.innerHTML=s;const i=o.querySelector("svg");if(i){const{attributes:c,childNodes:l}=i;Object.keys(c).forEach(a=>{const u=c[Number(a)];this.$el.setAttribute(u.name,u.value)}),Object.keys(l).forEach(a=>{const u=l[Number(a)];this.$el.appendChild(u.cloneNode(!0))}),n()}});break}}},render(){return vs(this.tag,this.$slots.default)}});const qf={class:"main"},Kf={class:"message-cloud"},zf=Me({__name:"MessagePaper",setup(e){return(t,n)=>(ee(),fe("div",qf,[n[0]||(n[0]=K("div",{class:"message-cloud-3"},null,-1)),n[1]||(n[1]=K("div",{class:"message-cloud-2"},null,-1)),K("div",Kf,[vn(t.$slots,"default",{},void 0)])]))}}),Rs=ke(zf,[["__scopeId","data-v-d5fe1f79"]]),Gf={class:"qr"},Wf={class:"team-name"},Jf=Me({__name:"WelcomeGameBlock",props:{qrurl:{},team:{}},setup(e){const t=me({width:200,margin:1,color:{dark:"#303030",light:"#f0f0f0"}}),n=e;return(r,s)=>(ee(),fe("div",null,[ie(Rs,null,{default:yt(()=>[K("div",Gf,[K("div",Wf,Xe(r.team),1),ie(_t(jf),{value:n.qrurl,options:t.value,tag:"svg",class:"qr-code"},null,8,["value","options"]),s[0]||(s[0]=K("div",{class:"message"}," Пора решать загадку ",-1))])]),_:1})]))}}),Yf=ke(Jf,[["__scopeId","data-v-7828595e"]]),Qf={class:"message-header"},Xf={class:"message-content"},Zf={key:0},ed={class:"message-image-border"},td=["src"],nd={key:0},rd={key:0,class:"hr"},sd=["onClick","disabled"],od={class:"button-dialog-text"},id={key:1,class:"hr"},ld={class:"application-label"},cd=Me({__name:"MessageCloud",props:Li({action:{},gameState:{},login:{},password:{},index:{},count:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=Qi(e,"modelValue");function r(){t.action.isOpen=!t.action.isOpen}async function s(o){n.value=!0,await Rl(t.login,t.password,o)}return(o,i)=>(ee(),Tt(Rs,null,{default:yt(()=>{var c;return[K("div",Qf,[jt(Xe(t.action.place)+": "+Xe(t.action.name)+" ",1),t.action.isOpen?(ee(),fe("span",{key:0,class:"collapse-icon collapse-icon-up",onClick:r})):(ee(),fe("span",{key:1,class:"collapse-icon",onClick:r}))]),Bn(K("div",null,[i[0]||(i[0]=K("hr",{class:"hr"},null,-1)),K("div",Xf,[t.action.image.length?(ee(),fe("div",Zf,[K("div",ed,[K("img",{src:t.action.image,class:"message-image"},null,8,td)])])):en("",!0),jt(Xe(t.action.text),1)]),o.index==o.count-1?(ee(),fe("div",nd,[(c=t.action.buttons)!=null&&c.length?(ee(),fe("hr",rd)):en("",!0),(ee(!0),fe(_e,null,jr(t.action.buttons,l=>(ee(),fe("div",{key:l.code,class:"button-dialog",onClick:a=>s(l.code),disabled:o.gameState!=="RUN"||!l.show},[K("div",od,Xe(l.name),1)],8,sd))),128))])):en("",!0),t.action.applications.length?(ee(),fe("hr",id)):en("",!0),(ee(!0),fe(_e,null,jr(t.action.applications,l=>(ee(),fe("div",{class:"message-footer",key:l.name},[jt(" Приложение: "+Xe(l.name)+" ",1),K("div",ld,Xe(l.number),1)]))),128))],512),[[Pu,t.action.isOpen]])]}),_:1}))}}),ud=ke(cd,[["__scopeId","data-v-cd72111e"]]),ad={class:"form-custom"},fd={class:"center-block-custom"},dd={class:"controller"},hd={class:"game-input"},pd=["disabled"],gd=["disabled"],md=Me({__name:"GameInputForm",props:Li({gameState:{},login:{},password:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=me(""),n=e,r=Qi(e,"modelValue");async function s(){r.value=!0;const o=t.value.trim();if(o===""){t.value="";return}await Rl(n.login,n.password,o),t.value=""}return(o,i)=>(ee(),fe("div",ad,[ie(El,{class:"input-form"},{default:yt(()=>[ie(Fn,{class:"controller-metal controller-metal-left"}),ie(Fn,{class:"controller-metal controller-metal-right"}),K("div",fd,[K("form",{onSubmit:ll(s,["prevent"])},[K("div",dd,[K("div",hd,[Bn(K("input",{id:"run",class:"game-input-run","onUpdate:modelValue":i[0]||(i[0]=c=>t.value=c),type:"text",placeholder:"Место назначения",disabled:n.gameState!=="RUN"},null,8,pd),[[Yr,t.value]])]),i[2]||(i[2]=K("div",{class:"game-button-run-shadow"},null,-1)),K("button",{class:"game-button-run",type:"submit",disabled:n.gameState!=="RUN"},[ie(Sl,null,{default:yt(()=>i[1]||(i[1]=[jt("Поехали")])),_:1})],8,gd)])],32)])]),_:1})]))}}),_d=ke(md,[["__scopeId","data-v-1272527b"]]),yd={key:0},vd={class:"messages-block center-container"},bd={key:1},wd={class:"center-block-custom"},Ed={key:0,class:"modal-overlay"},Sd=Me({__name:"GameWindow",setup(e){const t=wl(),n=Xa(),r=me(!1),s=me(""),o=me(""),i=me({name:"",actions:[]}),c=me([]),l=me(),a=me("STOP"),u=me(""),f=me("-");async function g(){var P;let B;try{B=await Cl(s.value,o.value)}catch(_){_ instanceof xt?t.push("/login"):console.error("Неизвестная ошибка:",_);return}const S=i.value.actions;i.value=B;const R=(P=i.value)==null?void 0:P.actions;R.forEach(_=>{_.isOpen=!0});for(let _=0;_N.show)}}const p=async(B="smooth")=>{await ds(),l.value&&l.value.scrollTo({top:l.value.scrollHeight,behavior:B})};async function b(){f.value=location.href;const B=await wf(s.value,o.value);a.value=B.state,B.state==="NEW"&&(u.value="Игра ещё не началась"),B.state==="RUN"&&(u.value=""),B.state==="STOP"&&(u.value="Игра остановлена")}on(c,()=>{r.value!==!1&&(p(),r.value=!1)},{deep:!0});let w=0;return gs(()=>{var B,S;s.value=sessionStorage.getItem("teamId")||"",o.value=sessionStorage.getItem("password")||"",s.value==""&&(s.value=((B=n.query.name)==null?void 0:B.toString())||"",o.value=((S=n.query.password)==null?void 0:S.toString())||"",sessionStorage.setItem("teamId",s.value),sessionStorage.setItem("password",o.value)),g(),w=setInterval(()=>{g(),b()},2e3),t.beforeEach((R,P,_)=>{clearInterval(w),_()})}),(B,S)=>(ee(),fe(_e,null,[K("div",null,[ie(bf),ie(_d,{modelValue:r.value,"onUpdate:modelValue":S[0]||(S[0]=R=>r.value=R),gameState:a.value,login:s.value,password:o.value},null,8,["modelValue","gameState","login","password"]),!i.value||!i.value.actions.length?(ee(),fe("div",yd,[K("div",vd,[ie(Yf,{qrurl:f.value,team:i.value.name},null,8,["qrurl","team"])])])):(ee(),fe("div",bd,[K("div",{class:"messages-block",ref_key:"scrollContainer",ref:l},[K("div",wd,[(ee(!0),fe(_e,null,jr(i.value.actions,(R,P)=>(ee(),fe("div",{key:R.id},[ie(ud,{modelValue:r.value,"onUpdate:modelValue":S[1]||(S[1]=_=>r.value=_),action:R,gameState:a.value,login:s.value,password:o.value,index:P,count:i.value.actions.length},null,8,["modelValue","action","gameState","login","password","index","count"])]))),128))])],512)]))]),a.value=="STOP"?(ee(),fe("div",Ed,S[2]||(S[2]=[K("div",{class:"modal-content"},[K("div",{class:"modal-body"})],-1)]))):en("",!0)],64))}}),Cd=ke(Sd,[["__scopeId","data-v-0bc4d193"]]),Rd=Me({__name:"HomeView",setup(e){return(t,n)=>(ee(),Tt(Cd))}}),Pd={class:"center-message"},Ad={class:"button-container"},Td={class:"button-custom",type:"submit"},xd={class:"error-message"},Id=Me({__name:"LoginWindow",setup(e){const t=wl(),n=me(""),r=me(""),s=me("Вход"),o=me("");async function i(){const c=s.value;s.value="Загрузка...",o.value="";try{await Cl(n.value,r.value)}catch(l){if(l instanceof xt){if(n.value==""&&r.value=="")return;o.value="Не верны название команды или пароль"}else o.value="Сервер не доступен";return}finally{s.value=c}sessionStorage.setItem("teamId",n.value),sessionStorage.setItem("password",r.value),t.push("/")}return gs(()=>{n.value=sessionStorage.getItem("teamId")||"",r.value=sessionStorage.getItem("password")||"",i()}),(c,l)=>(ee(),fe(_e,null,[l[2]||(l[2]=K("div",{class:"header-block"}," Вечерний детектив ",-1)),K("div",Pd,[ie(Rs,null,{default:yt(()=>[K("form",{onSubmit:ll(i,["prevent"])},[K("div",null,[Bn(K("input",{class:"input-custom","onUpdate:modelValue":l[0]||(l[0]=a=>n.value=a),type:"text",placeholder:"Название команды"},null,512),[[Yr,n.value]])]),K("div",null,[Bn(K("input",{class:"input-custom","onUpdate:modelValue":l[1]||(l[1]=a=>r.value=a),type:"text",placeholder:"Пароль",autocapitalize:"off"},null,512),[[Yr,r.value]])]),K("div",Ad,[K("button",Td,Xe(s.value),1)]),K("div",xd,Xe(o.value),1)],32)]),_:1})])],64))}}),Md=ke(Id,[["__scopeId","data-v-7028a494"]]),Bd=Me({__name:"LoginView",setup(e){return(t,n)=>(ee(),Tt(Md))}}),Nd=Ya({history:Pa("/"),routes:[{path:"/",name:"home",component:Rd},{path:"/login",name:"login",component:Bd}]}),Ps=Ku(ef);Ps.use(Ju());Ps.use(Nd);Ps.mount("#app"); +`);const j=P(L,k,V),U=e.getSymbolSize(L),J=new r(U);return p(J,L),b(J),w(J,L),S(J,k,0),L>=7&&B(J,L),R(J,j),isNaN(D)&&(D=i.getBestMask(J,S.bind(null,J,k))),i.applyMask(D,J),S(J,k,D),{modules:J,version:L,errorCorrectionLevel:k,maskPattern:D,segments:V}}return pr.create=function(L,k){if(typeof L>"u"||L==="")throw new Error("No input text");let D=t.M,V,H;return typeof k<"u"&&(D=t.from(k.errorCorrectionLevel,t.M),V=a.from(k.version),H=i.from(k.maskPattern),k.toSJISFunc&&e.setToSJISFunction(k.toSJISFunc)),G(L,V,D,H)},pr}var Nr={},Or={},Ko;function Il(){return Ko||(Ko=1,function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(o){return[o,o]}))),r.length===6&&r.push("F","F");const s=parseInt(r.join(""),16);return{r:s>>24&255,g:s>>16&255,b:s>>8&255,a:s&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const s=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,o=r.width&&r.width>=21?r.width:void 0,i=r.scale||4;return{width:o,scale:o?4:i,margin:s,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,s){return s.width&&s.width>=r+s.margin*2?s.width/(r+s.margin*2):s.scale},e.getImageWidth=function(r,s){const o=e.getScale(r,s);return Math.floor((r+s.margin*2)*o)},e.qrToImageData=function(r,s,o){const i=s.modules.size,c=s.modules.data,l=e.getScale(i,o),a=Math.floor((i+o.margin*2)*l),u=o.margin*l,f=[o.color.light,o.color.dark];for(let g=0;g=u&&p>=u&&g"u"&&(!i||!i.getContext)&&(l=i,i=void 0),i||(a=r()),l=t.getOptions(l);const u=t.getImageWidth(o.modules.size,l),f=a.getContext("2d"),g=f.createImageData(u,u);return t.qrToImageData(g.data,o,l),n(f,a,u),f.putImageData(g,0,0),a},e.renderToDataURL=function(o,i,c){let l=c;typeof l>"u"&&(!i||!i.getContext)&&(l=i,i=void 0),l||(l={});const a=e.render(o,i,l),u=l.type||"image/png",f=l.rendererOpts||{};return a.toDataURL(u,f.quality)}}(Nr)),Nr}var Lr={},Go;function Vf(){if(Go)return Lr;Go=1;const e=Il();function t(s,o){const i=s.a/255,c=o+'="'+s.hex+'"';return i<1?c+" "+o+'-opacity="'+i.toFixed(2).slice(1)+'"':c}function n(s,o,i){let c=s+o;return typeof i<"u"&&(c+=" "+i),c}function r(s,o,i){let c="",l=0,a=!1,u=0;for(let f=0;f0&&g>0&&s[f-1]||(c+=a?n("M",g+i,.5+p+i):n("m",l,0),l=0,a=!1),g+1':"",p="',b='viewBox="0 0 '+f+" "+f+'"',B=''+g+p+` +`;return typeof c=="function"&&c(null,B),B},Lr}var Wo;function jf(){if(Wo)return Nt;Wo=1;const e=Sf(),t=kf(),n=Hf(),r=Vf();function s(o,i,c,l,a){const u=[].slice.call(arguments,1),f=u.length,g=typeof u[f-1]=="function";if(!g&&!e())throw new Error("Callback required as last argument");if(g){if(f<2)throw new Error("Too few arguments provided");f===2?(a=c,c=i,i=l=void 0):f===3&&(i.getContext&&typeof a>"u"?(a=l,l=void 0):(a=l,l=c,c=i,i=void 0))}else{if(f<1)throw new Error("Too few arguments provided");return f===1?(c=i,i=l=void 0):f===2&&!i.getContext&&(l=c,c=i,i=void 0),new Promise(function(p,b){try{const w=t.create(c,l);p(o(w,i,l))}catch(w){b(w)}})}try{const p=t.create(c,l);a(null,o(p,i,l))}catch(p){a(p)}}return Nt.create=t.create,Nt.toCanvas=s.bind(null,n.render),Nt.toDataURL=s.bind(null,n.renderToDataURL),Nt.toString=s.bind(null,function(o,i,c){return r.render(o,c)}),Nt}var $r=jf();/*! vue-qrcode v2.0.0 | (c) 2018-present Chen Fengyuan | MIT */const Jo="ready";var qf=Me({name:"VueQrcode",props:{value:{type:String,default:void 0},options:{type:Object,default:void 0},tag:{type:String,default:"canvas"}},emits:[Jo],watch:{$props:{deep:!0,immediate:!0,handler(){this.$el&&this.generate()}}},mounted(){this.generate()},methods:{generate(){const e=this.options||{},t=String(this.value),n=()=>{this.$emit(Jo,this.$el)};switch(this.tag){case"canvas":$r.toCanvas(this.$el,t,e,r=>{if(r)throw r;n()});break;case"img":$r.toDataURL(t,e,(r,s)=>{if(r)throw r;this.$el.src=s,this.$el.onload=n});break;case"svg":$r.toString(t,e,(r,s)=>{if(r)throw r;const o=document.createElement("div");o.innerHTML=s;const i=o.querySelector("svg");if(i){const{attributes:c,childNodes:l}=i;Object.keys(c).forEach(a=>{const u=c[Number(a)];this.$el.setAttribute(u.name,u.value)}),Object.keys(l).forEach(a=>{const u=l[Number(a)];this.$el.appendChild(u.cloneNode(!0))}),n()}});break}}},render(){return vs(this.tag,this.$slots.default)}});const Kf={class:"main"},zf={class:"message-cloud"},Gf=Me({__name:"MessagePaper",setup(e){return(t,n)=>(ee(),fe("div",Kf,[n[0]||(n[0]=K("div",{class:"message-cloud-3"},null,-1)),n[1]||(n[1]=K("div",{class:"message-cloud-2"},null,-1)),K("div",zf,[vn(t.$slots,"default",{},void 0)])]))}}),Rs=Ue(Gf,[["__scopeId","data-v-d5fe1f79"]]),Wf={class:"qr"},Jf={class:"team-name"},Yf=Me({__name:"WelcomeGameBlock",props:{qrurl:{},team:{}},setup(e){const t=me({width:200,margin:1,color:{dark:"#303030",light:"#f0f0f0"}}),n=e;return(r,s)=>(ee(),fe("div",null,[ie(Rs,null,{default:yt(()=>[K("div",Wf,[K("div",Jf,Xe(r.team),1),ie(_t(qf),{value:n.qrurl,options:t.value,tag:"svg",class:"qr-code"},null,8,["value","options"]),s[0]||(s[0]=K("div",{class:"message"}," Пора решать загадку ",-1))])]),_:1})]))}}),Qf=Ue(Yf,[["__scopeId","data-v-7828595e"]]),Xf={class:"message-header"},Zf={class:"message-content"},ed={key:0},td={class:"message-image-border"},nd=["src"],rd={key:0},sd={key:0,class:"hr"},od=["onClick","disabled"],id={class:"button-dialog-text"},ld={key:1,class:"hr"},cd={class:"application-label"},ud=Me({__name:"MessageCloud",props:Li({action:{},gameState:{},login:{},password:{},index:{},count:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=Qi(e,"modelValue");function r(){t.action.isOpen=!t.action.isOpen}async function s(o){n.value=!0,await Rl(t.login,t.password,o)}return(o,i)=>(ee(),Tt(Rs,null,{default:yt(()=>{var c;return[K("div",Xf,[jt(Xe(t.action.place)+": "+Xe(t.action.name)+" ",1),t.action.isOpen?(ee(),fe("span",{key:0,class:"collapse-icon collapse-icon-up",onClick:r})):(ee(),fe("span",{key:1,class:"collapse-icon",onClick:r}))]),Bn(K("div",null,[i[0]||(i[0]=K("hr",{class:"hr"},null,-1)),K("div",Zf,[t.action.image.length?(ee(),fe("div",ed,[K("div",td,[K("img",{src:t.action.image,class:"message-image"},null,8,nd)])])):en("",!0),jt(Xe(t.action.text),1)]),o.index==o.count-1?(ee(),fe("div",rd,[(c=t.action.buttons)!=null&&c.length?(ee(),fe("hr",sd)):en("",!0),(ee(!0),fe(_e,null,jr(t.action.buttons,l=>(ee(),fe("div",{key:l.code,class:"button-dialog",onClick:a=>s(l.code),disabled:o.gameState!=="RUN"||!l.show},[K("div",id,Xe(l.name),1)],8,od))),128))])):en("",!0),t.action.applications.length?(ee(),fe("hr",ld)):en("",!0),(ee(!0),fe(_e,null,jr(t.action.applications,l=>(ee(),fe("div",{class:"message-footer",key:l.name},[jt(" Приложение: "+Xe(l.name)+" ",1),K("div",cd,Xe(l.number),1)]))),128))],512),[[Pu,t.action.isOpen]])]}),_:1}))}}),ad=Ue(ud,[["__scopeId","data-v-cd72111e"]]),fd={class:"form-custom"},dd={class:"center-block-custom"},hd={class:"controller"},pd={class:"game-input"},gd=["disabled"],md=["disabled"],_d=Me({__name:"GameInputForm",props:Li({gameState:{},login:{},password:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=me(""),n=e,r=Qi(e,"modelValue");async function s(){r.value=!0;const o=t.value.trim();if(o===""){t.value="";return}await Rl(n.login,n.password,o),t.value=""}return(o,i)=>(ee(),fe("div",fd,[ie(El,{class:"input-form"},{default:yt(()=>[ie(Fn,{class:"controller-metal controller-metal-left"}),ie(Fn,{class:"controller-metal controller-metal-right"}),K("div",dd,[K("form",{onSubmit:ll(s,["prevent"])},[K("div",hd,[K("div",pd,[Bn(K("input",{id:"run",class:"game-input-run","onUpdate:modelValue":i[0]||(i[0]=c=>t.value=c),type:"text",placeholder:"Место назначения",disabled:n.gameState!=="RUN"},null,8,gd),[[Yr,t.value]])]),i[2]||(i[2]=K("div",{class:"game-button-run-shadow"},null,-1)),K("button",{class:"game-button-run",type:"submit",disabled:n.gameState!=="RUN"},[ie(Sl,null,{default:yt(()=>i[1]||(i[1]=[jt("Поехали")])),_:1})],8,md)])],32)])]),_:1})]))}}),yd=Ue(_d,[["__scopeId","data-v-1272527b"]]),vd={key:0},bd={class:"messages-block center-container"},wd={key:1},Ed={class:"center-block-custom"},Sd={key:0,class:"modal-overlay"},Cd=Me({__name:"GameWindow",setup(e){const t=wl(),n=Xa(),r=me(!1),s=me(""),o=me(""),i=me({name:"",actions:[]}),c=me([]),l=me(),a=me("STOP"),u=me(""),f=me("-");async function g(){var P;let B;try{B=await Cl(s.value,o.value)}catch(_){_ instanceof It?t.push("/login"):console.error("Неизвестная ошибка:",_);return}const S=i.value.actions;i.value=B;const R=(P=i.value)==null?void 0:P.actions;R.forEach(_=>{_.isOpen=!0});for(let _=0;_N.show)}}const p=async(B="smooth")=>{await ds(),l.value&&l.value.scrollTo({top:l.value.scrollHeight,behavior:B})};async function b(){f.value=location.href;const B=await Ef(s.value,o.value);a.value=B.state,B.state==="NEW"&&(u.value="Игра ещё не началась"),B.state==="RUN"&&(u.value=""),B.state==="STOP"&&(u.value="Игра остановлена")}on(c,()=>{r.value!==!1&&(p(),r.value=!1)},{deep:!0});let w=0;return gs(()=>{var B,S;s.value=sessionStorage.getItem("teamId")||"",o.value=sessionStorage.getItem("password")||"",s.value==""&&(s.value=((B=n.query.name)==null?void 0:B.toString())||"",o.value=((S=n.query.password)==null?void 0:S.toString())||"",sessionStorage.setItem("teamId",s.value),sessionStorage.setItem("password",o.value)),g(),w=setInterval(()=>{g(),b()},2e3),t.beforeEach((R,P,_)=>{clearInterval(w),_()})}),(B,S)=>(ee(),fe(_e,null,[K("div",null,[ie(bf),ie(yd,{modelValue:r.value,"onUpdate:modelValue":S[0]||(S[0]=R=>r.value=R),gameState:a.value,login:s.value,password:o.value},null,8,["modelValue","gameState","login","password"]),!i.value||!i.value.actions.length?(ee(),fe("div",vd,[K("div",bd,[ie(Qf,{qrurl:f.value,team:i.value.name},null,8,["qrurl","team"])])])):(ee(),fe("div",wd,[K("div",{class:"messages-block",ref_key:"scrollContainer",ref:l},[K("div",Ed,[(ee(!0),fe(_e,null,jr(i.value.actions,(R,P)=>(ee(),fe("div",{key:R.id},[ie(ad,{modelValue:r.value,"onUpdate:modelValue":S[1]||(S[1]=_=>r.value=_),action:R,gameState:a.value,login:s.value,password:o.value,index:P,count:i.value.actions.length},null,8,["modelValue","action","gameState","login","password","index","count"])]))),128))])],512)]))]),a.value=="STOP"?(ee(),fe("div",Sd,S[2]||(S[2]=[K("div",{class:"modal-content"},[K("div",{class:"modal-body"})],-1)]))):en("",!0)],64))}}),Rd=Ue(Cd,[["__scopeId","data-v-0bc4d193"]]),Pd=Me({__name:"HomeView",setup(e){return(t,n)=>(ee(),Tt(Rd))}}),Ad={class:"center-message"},Td={class:"button-container"},Id={class:"button-custom",type:"submit"},xd={class:"error-message"},Md=Me({__name:"LoginWindow",setup(e){const t=wl(),n=me(""),r=me(""),s=me("Вход"),o=me("");async function i(){const c=s.value;s.value="Загрузка...",o.value="";try{await Cl(n.value,r.value)}catch(l){if(l instanceof It){if(n.value==""&&r.value=="")return;o.value="Не верны название команды или пароль"}else o.value="Сервер не доступен";return}finally{s.value=c}sessionStorage.setItem("teamId",n.value),sessionStorage.setItem("password",r.value),t.push("/")}return gs(()=>{n.value=sessionStorage.getItem("teamId")||"",r.value=sessionStorage.getItem("password")||"",i()}),(c,l)=>(ee(),fe(_e,null,[l[2]||(l[2]=K("div",{class:"header-block"}," Вечерний детектив ",-1)),K("div",Ad,[ie(Rs,null,{default:yt(()=>[K("form",{onSubmit:ll(i,["prevent"])},[K("div",null,[Bn(K("input",{class:"input-custom","onUpdate:modelValue":l[0]||(l[0]=a=>n.value=a),type:"text",placeholder:"Название команды"},null,512),[[Yr,n.value]])]),K("div",null,[Bn(K("input",{class:"input-custom","onUpdate:modelValue":l[1]||(l[1]=a=>r.value=a),type:"text",placeholder:"Пароль",autocapitalize:"off"},null,512),[[Yr,r.value]])]),K("div",Td,[K("button",Id,Xe(s.value),1)]),K("div",xd,Xe(o.value),1)],32)]),_:1})])],64))}}),Bd=Ue(Md,[["__scopeId","data-v-7028a494"]]),Nd=Me({__name:"LoginView",setup(e){return(t,n)=>(ee(),Tt(Bd))}}),Od=Ya({history:Pa("/"),routes:[{path:"/",name:"home",component:Pd},{path:"/login",name:"login",component:Nd}]}),Ps=Ku(ef);Ps.use(Ju());Ps.use(Od);Ps.mount("#app"); diff --git a/cmd/evening_detective/static/user/index.html b/cmd/evening_detective/static/user/index.html index 398d13c..e26e896 100644 --- a/cmd/evening_detective/static/user/index.html +++ b/cmd/evening_detective/static/user/index.html @@ -5,7 +5,7 @@ Вечерний детектив - +