adaptorex
Version:
Connect all your live interactive storytelling devices and software
1 lines • 258 kB
JavaScript
import{K as be,L as Xr,M as kt,p as Yr,o as D,b as B,f as Q,h as Ne,N as Se,r as ae,O as ge,P as He,c as U,Q as Ur,R as Oa,S as qr,T as me,q as F,z as we,U as zt,n as mt,d as w,t as ce,k as ee,F as Ee,e as Oe,V as Ve,W as wn,g as $e,X as Zr,Y as Rn,Z as di,$ as ye,a as Ot,a0 as fi,a1 as Wr,a2 as ve,a3 as Pa,a4 as Ba,a5 as Ra,a6 as Vt,a7 as hi,a8 as _t,i as Ue,a9 as Kr,aa as Ho,ab as Va,w as Ce,j as sn,v as Qr,u as yt,E as So,l as Jr,m as Ha,ac as La,ad as Fa,ae as ke,A as Ga,C as jr,J as Te,af as Xa,H as Ya,I as Ua,ag as es}from"./index-BijsIkza.js";import{a as an,_ as qa}from"./SessionLauncher-CDFqAzXW.js";import{_ as Za}from"./FoldOut-riUX07ZO.js";function uo(e){return Zr()?(Rn(e),!0):!1}function it(e){return typeof e=="function"?e():F(e)}const Wa=typeof window<"u"&&typeof document<"u",Ka=e=>typeof e<"u",Qa=Object.prototype.toString,Ja=e=>Qa.call(e)==="[object Object]",ja=()=>{};function el(e,t){function n(...o){return new Promise((i,r)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(i).catch(r)})}return n}const ts=e=>e();function tl(e=ts){const t=ae(!0);function n(){t.value=!1}function o(){t.value=!0}const i=(...r)=>{t.value&&e(...r)};return{isActive:Ra(t),pause:n,resume:o,eventFilter:i}}function Oi(e,t=!1,n="Timeout"){return new Promise((o,i)=>{setTimeout(t?()=>i(n):o,e)})}function nl(e,t,n={}){const{eventFilter:o=ts,...i}=n;return ge(e,el(o,t),i)}function Pt(e,t,n={}){const{eventFilter:o,...i}=n,{eventFilter:r,pause:s,resume:a,isActive:u}=tl(o);return{stop:nl(e,t,{...i,eventFilter:r}),pause:s,resume:a,isActive:u}}function ol(e,t={}){if(!fi(e))return Pa(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const o in e.value)n[o]=Ba(()=>({get(){return e.value[o]},set(i){var r;if((r=it(t.replaceRef))!=null?r:!0)if(Array.isArray(e.value)){const a=[...e.value];a[o]=i,e.value=a}else{const a={...e.value,[o]:i};Object.setPrototypeOf(a,Object.getPrototypeOf(e.value)),e.value=a}else e.value[o]=i}}));return n}function Lo(e,t=!1){function n(d,{flush:f="sync",deep:g=!1,timeout:x,throwOnTimeout:m}={}){let h=null;const b=[new Promise($=>{h=ge(e,S=>{d(S)!==t&&(h==null||h(),$(S))},{flush:f,deep:g,immediate:!0})})];return x!=null&&b.push(Oi(x,m).then(()=>it(e)).finally(()=>h==null?void 0:h())),Promise.race(b)}function o(d,f){if(!fi(d))return n(S=>S===d,f);const{flush:g="sync",deep:x=!1,timeout:m,throwOnTimeout:h}=f??{};let _=null;const $=[new Promise(S=>{_=ge([e,d],([z,I])=>{t!==(z===I)&&(_==null||_(),S(z))},{flush:g,deep:x,immediate:!0})})];return m!=null&&$.push(Oi(m,h).then(()=>it(e)).finally(()=>(_==null||_(),it(e)))),Promise.race($)}function i(d){return n(f=>!!f,d)}function r(d){return o(null,d)}function s(d){return o(void 0,d)}function a(d){return n(Number.isNaN,d)}function u(d,f){return n(g=>{const x=Array.from(g);return x.includes(d)||x.includes(it(d))},f)}function l(d){return c(1,d)}function c(d=1,f){let g=-1;return n(()=>(g+=1,g>=d),f)}return Array.isArray(it(e))?{toMatch:n,toContains:u,changed:l,changedTimes:c,get not(){return Lo(e,!t)}}:{toMatch:n,toBe:o,toBeTruthy:i,toBeNull:r,toBeNaN:a,toBeUndefined:s,changed:l,changedTimes:c,get not(){return Lo(e,!t)}}}function qn(e){return Lo(e)}function il(e){var t;const n=it(e);return(t=n==null?void 0:n.$el)!=null?t:n}const ns=Wa?window:void 0;function os(...e){let t,n,o,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,i]=e,t=ns):[t,n,o,i]=e,!t)return ja;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const r=[],s=()=>{r.forEach(c=>c()),r.length=0},a=(c,d,f,g)=>(c.addEventListener(d,f,g),()=>c.removeEventListener(d,f,g)),u=ge(()=>[il(t),it(i)],([c,d])=>{if(s(),!c)return;const f=Ja(d)?{...d}:d;r.push(...n.flatMap(g=>o.map(x=>a(c,g,x,f))))},{immediate:!0,flush:"post"}),l=()=>{u(),s()};return uo(l),l}function rl(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Pi(...e){let t,n,o={};e.length===3?(t=e[0],n=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:i=ns,eventName:r="keydown",passive:s=!1,dedupe:a=!1}=o,u=rl(t);return os(i,r,c=>{c.repeat&&it(a)||u(c)&&n(c)},s)}function sl(e){return JSON.parse(JSON.stringify(e))}function ln(e,t,n,o={}){var i,r,s;const{clone:a=!1,passive:u=!1,eventName:l,deep:c=!1,defaultValue:d,shouldEmit:f}=o,g=di(),x=n||(g==null?void 0:g.emit)||((i=g==null?void 0:g.$emit)==null?void 0:i.bind(g))||((s=(r=g==null?void 0:g.proxy)==null?void 0:r.$emit)==null?void 0:s.bind(g==null?void 0:g.proxy));let m=l;t||(t="modelValue"),m=m||`update:${t.toString()}`;const h=$=>a?typeof a=="function"?a($):sl($):$,_=()=>Ka(e[t])?h(e[t]):d,b=$=>{f?f($)&&x(m,$):x(m,$)};if(u){const $=_(),S=ae($);let z=!1;return ge(()=>e[t],I=>{z||(z=!0,S.value=h(I),He(()=>z=!1))}),ge(S,I=>{!z&&(I!==e[t]||c)&&b(I)},{deep:c}),S}else return U({get(){return _()},set($){b($)}})}var al={value:()=>{}};function co(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new Vn(n)}function Vn(e){this._=e}function ll(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}Vn.prototype=co.prototype={constructor:Vn,on:function(e,t){var n=this._,o=ll(e+"",n),i,r=-1,s=o.length;if(arguments.length<2){for(;++r<s;)if((i=(e=o[r]).type)&&(i=ul(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++r<s;)if(i=(e=o[r]).type)n[i]=Bi(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Bi(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Vn(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),o=0,i,r;o<i;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,r=o.length;i<r;++i)o[i].value.apply(t,n)}};function ul(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function Bi(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=al,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var Fo="http://www.w3.org/1999/xhtml";const Ri={svg:"http://www.w3.org/2000/svg",xhtml:Fo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function fo(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Ri.hasOwnProperty(t)?{space:Ri[t],local:e}:e}function cl(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Fo&&t.documentElement.namespaceURI===Fo?t.createElement(e):t.createElementNS(n,e)}}function dl(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function is(e){var t=fo(e);return(t.local?dl:cl)(t)}function fl(){}function vi(e){return e==null?fl:function(){return this.querySelector(e)}}function hl(e){typeof e!="function"&&(e=vi(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],s=r.length,a=o[i]=new Array(s),u,l,c=0;c<s;++c)(u=r[c])&&(l=e.call(u,u.__data__,c,r))&&("__data__"in u&&(l.__data__=u.__data__),a[c]=l);return new Le(o,this._parents)}function vl(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function gl(){return[]}function rs(e){return e==null?gl:function(){return this.querySelectorAll(e)}}function pl(e){return function(){return vl(e.apply(this,arguments))}}function ml(e){typeof e=="function"?e=pl(e):e=rs(e);for(var t=this._groups,n=t.length,o=[],i=[],r=0;r<n;++r)for(var s=t[r],a=s.length,u,l=0;l<a;++l)(u=s[l])&&(o.push(e.call(u,u.__data__,l,s)),i.push(u));return new Le(o,i)}function ss(e){return function(){return this.matches(e)}}function as(e){return function(t){return t.matches(e)}}var yl=Array.prototype.find;function _l(e){return function(){return yl.call(this.children,e)}}function wl(){return this.firstElementChild}function $l(e){return this.select(e==null?wl:_l(typeof e=="function"?e:as(e)))}var bl=Array.prototype.filter;function xl(){return Array.from(this.children)}function El(e){return function(){return bl.call(this.children,e)}}function Sl(e){return this.selectAll(e==null?xl:El(typeof e=="function"?e:as(e)))}function Nl(e){typeof e!="function"&&(e=ss(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],s=r.length,a=o[i]=[],u,l=0;l<s;++l)(u=r[l])&&e.call(u,u.__data__,l,r)&&a.push(u);return new Le(o,this._parents)}function ls(e){return new Array(e.length)}function Cl(){return new Le(this._enter||this._groups.map(ls),this._parents)}function Zn(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Zn.prototype={constructor:Zn,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function kl(e){return function(){return e}}function Ml(e,t,n,o,i,r){for(var s=0,a,u=t.length,l=r.length;s<l;++s)(a=t[s])?(a.__data__=r[s],o[s]=a):n[s]=new Zn(e,r[s]);for(;s<u;++s)(a=t[s])&&(i[s]=a)}function Tl(e,t,n,o,i,r,s){var a,u,l=new Map,c=t.length,d=r.length,f=new Array(c),g;for(a=0;a<c;++a)(u=t[a])&&(f[a]=g=s.call(u,u.__data__,a,t)+"",l.has(g)?i[a]=u:l.set(g,u));for(a=0;a<d;++a)g=s.call(e,r[a],a,r)+"",(u=l.get(g))?(o[a]=u,u.__data__=r[a],l.delete(g)):n[a]=new Zn(e,r[a]);for(a=0;a<c;++a)(u=t[a])&&l.get(f[a])===u&&(i[a]=u)}function Il(e){return e.__data__}function Al(e,t){if(!arguments.length)return Array.from(this,Il);var n=t?Tl:Ml,o=this._parents,i=this._groups;typeof e!="function"&&(e=kl(e));for(var r=i.length,s=new Array(r),a=new Array(r),u=new Array(r),l=0;l<r;++l){var c=o[l],d=i[l],f=d.length,g=Dl(e.call(c,c&&c.__data__,l,o)),x=g.length,m=a[l]=new Array(x),h=s[l]=new Array(x),_=u[l]=new Array(f);n(c,d,m,h,_,g,t);for(var b=0,$=0,S,z;b<x;++b)if(S=m[b]){for(b>=$&&($=b+1);!(z=h[$])&&++$<x;);S._next=z||null}}return s=new Le(s,o),s._enter=a,s._exit=u,s}function Dl(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function zl(){return new Le(this._exit||this._groups.map(ls),this._parents)}function Ol(e,t,n){var o=this.enter(),i=this,r=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?r.remove():n(r),o&&i?o.merge(i).order():i}function Pl(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,r=o.length,s=Math.min(i,r),a=new Array(i),u=0;u<s;++u)for(var l=n[u],c=o[u],d=l.length,f=a[u]=new Array(d),g,x=0;x<d;++x)(g=l[x]||c[x])&&(f[x]=g);for(;u<i;++u)a[u]=n[u];return new Le(a,this._parents)}function Bl(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],i=o.length-1,r=o[i],s;--i>=0;)(s=o[i])&&(r&&s.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(s,r),r=s);return this}function Rl(e){e||(e=Vl);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,o=n.length,i=new Array(o),r=0;r<o;++r){for(var s=n[r],a=s.length,u=i[r]=new Array(a),l,c=0;c<a;++c)(l=s[c])&&(u[c]=l);u.sort(t)}return new Le(i,this._parents).order()}function Vl(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Hl(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ll(){return Array.from(this)}function Fl(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length;i<r;++i){var s=o[i];if(s)return s}return null}function Gl(){let e=0;for(const t of this)++e;return e}function Xl(){return!this.node()}function Yl(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i=t[n],r=0,s=i.length,a;r<s;++r)(a=i[r])&&e.call(a,a.__data__,r,i);return this}function Ul(e){return function(){this.removeAttribute(e)}}function ql(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Zl(e,t){return function(){this.setAttribute(e,t)}}function Wl(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Kl(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Ql(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Jl(e,t){var n=fo(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?ql:Ul:typeof t=="function"?n.local?Ql:Kl:n.local?Wl:Zl)(n,t))}function us(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function jl(e){return function(){this.style.removeProperty(e)}}function eu(e,t,n){return function(){this.style.setProperty(e,t,n)}}function tu(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function nu(e,t,n){return arguments.length>1?this.each((t==null?jl:typeof t=="function"?tu:eu)(e,t,n??"")):Xt(this.node(),e)}function Xt(e,t){return e.style.getPropertyValue(t)||us(e).getComputedStyle(e,null).getPropertyValue(t)}function ou(e){return function(){delete this[e]}}function iu(e,t){return function(){this[e]=t}}function ru(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function su(e,t){return arguments.length>1?this.each((t==null?ou:typeof t=="function"?ru:iu)(e,t)):this.node()[e]}function cs(e){return e.trim().split(/^|\s+/)}function gi(e){return e.classList||new ds(e)}function ds(e){this._node=e,this._names=cs(e.getAttribute("class")||"")}ds.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function fs(e,t){for(var n=gi(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function hs(e,t){for(var n=gi(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function au(e){return function(){fs(this,e)}}function lu(e){return function(){hs(this,e)}}function uu(e,t){return function(){(t.apply(this,arguments)?fs:hs)(this,e)}}function cu(e,t){var n=cs(e+"");if(arguments.length<2){for(var o=gi(this.node()),i=-1,r=n.length;++i<r;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?uu:t?au:lu)(n,t))}function du(){this.textContent=""}function fu(e){return function(){this.textContent=e}}function hu(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function vu(e){return arguments.length?this.each(e==null?du:(typeof e=="function"?hu:fu)(e)):this.node().textContent}function gu(){this.innerHTML=""}function pu(e){return function(){this.innerHTML=e}}function mu(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function yu(e){return arguments.length?this.each(e==null?gu:(typeof e=="function"?mu:pu)(e)):this.node().innerHTML}function _u(){this.nextSibling&&this.parentNode.appendChild(this)}function wu(){return this.each(_u)}function $u(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function bu(){return this.each($u)}function xu(e){var t=typeof e=="function"?e:is(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Eu(){return null}function Su(e,t){var n=typeof e=="function"?e:is(e),o=t==null?Eu:typeof t=="function"?t:vi(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function Nu(){var e=this.parentNode;e&&e.removeChild(this)}function Cu(){return this.each(Nu)}function ku(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Mu(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Tu(e){return this.select(e?Mu:ku)}function Iu(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Au(e){return function(t){e.call(this,t,this.__data__)}}function Du(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function zu(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,r;n<i;++n)r=t[n],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):t[++o]=r;++o?t.length=o:delete this.__on}}}function Ou(e,t,n){return function(){var o=this.__on,i,r=Au(t);if(o){for(var s=0,a=o.length;s<a;++s)if((i=o[s]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=r,i.options=n),i.value=t;return}}this.addEventListener(e.type,r,n),i={type:e.type,name:e.name,value:t,listener:r,options:n},o?o.push(i):this.__on=[i]}}function Pu(e,t,n){var o=Du(e+""),i,r=o.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var u=0,l=a.length,c;u<l;++u)for(i=0,c=a[u];i<r;++i)if((s=o[i]).type===c.type&&s.name===c.name)return c.value}return}for(a=t?Ou:zu,i=0;i<r;++i)this.each(a(o[i],t,n));return this}function vs(e,t,n){var o=us(e),i=o.CustomEvent;typeof i=="function"?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Bu(e,t){return function(){return vs(this,e,t)}}function Ru(e,t){return function(){return vs(this,e,t.apply(this,arguments))}}function Vu(e,t){return this.each((typeof t=="function"?Ru:Bu)(e,t))}function*Hu(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length,s;i<r;++i)(s=o[i])&&(yield s)}var gs=[null];function Le(e,t){this._groups=e,this._parents=t}function $n(){return new Le([[document.documentElement]],gs)}function Lu(){return this}Le.prototype=$n.prototype={constructor:Le,select:hl,selectAll:ml,selectChild:$l,selectChildren:Sl,filter:Nl,data:Al,enter:Cl,exit:zl,join:Ol,merge:Pl,selection:Lu,order:Bl,sort:Rl,call:Hl,nodes:Ll,node:Fl,size:Gl,empty:Xl,each:Yl,attr:Jl,style:nu,property:su,classed:cu,text:vu,html:yu,raise:wu,lower:bu,append:xu,insert:Su,remove:Cu,clone:Tu,datum:Iu,on:Pu,dispatch:Vu,[Symbol.iterator]:Hu};function Ge(e){return typeof e=="string"?new Le([[document.querySelector(e)]],[document.documentElement]):new Le([[e]],gs)}function Fu(e){let t;for(;t=e.sourceEvent;)e=t;return e}function We(e,t){if(e=Fu(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const Gu={passive:!1},dn={capture:!0,passive:!1};function No(e){e.stopImmediatePropagation()}function Ht(e){e.preventDefault(),e.stopImmediatePropagation()}function ps(e){var t=e.document.documentElement,n=Ge(e).on("dragstart.drag",Ht,dn);"onselectstart"in t?n.on("selectstart.drag",Ht,dn):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function ms(e,t){var n=e.document.documentElement,o=Ge(e).on("dragstart.drag",null);t&&(o.on("click.drag",Ht,dn),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Sn=e=>()=>e;function Go(e,{sourceEvent:t,subject:n,target:o,identifier:i,active:r,x:s,y:a,dx:u,dy:l,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:r,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:c}})}Go.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Xu(e){return!e.ctrlKey&&!e.button}function Yu(){return this.parentNode}function Uu(e,t){return t??{x:e.x,y:e.y}}function qu(){return navigator.maxTouchPoints||"ontouchstart"in this}function Zu(){var e=Xu,t=Yu,n=Uu,o=qu,i={},r=co("start","drag","end"),s=0,a,u,l,c,d=0;function f(S){S.on("mousedown.drag",g).filter(o).on("touchstart.drag",h).on("touchmove.drag",_,Gu).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(S,z){if(!(c||!e.call(this,S,z))){var I=$(this,t.call(this,S,z),S,z,"mouse");I&&(Ge(S.view).on("mousemove.drag",x,dn).on("mouseup.drag",m,dn),ps(S.view),No(S),l=!1,a=S.clientX,u=S.clientY,I("start",S))}}function x(S){if(Ht(S),!l){var z=S.clientX-a,I=S.clientY-u;l=z*z+I*I>d}i.mouse("drag",S)}function m(S){Ge(S.view).on("mousemove.drag mouseup.drag",null),ms(S.view,l),Ht(S),i.mouse("end",S)}function h(S,z){if(e.call(this,S,z)){var I=S.changedTouches,y=t.call(this,S,z),P=I.length,R,V;for(R=0;R<P;++R)(V=$(this,y,S,z,I[R].identifier,I[R]))&&(No(S),V("start",S,I[R]))}}function _(S){var z=S.changedTouches,I=z.length,y,P;for(y=0;y<I;++y)(P=i[z[y].identifier])&&(Ht(S),P("drag",S,z[y]))}function b(S){var z=S.changedTouches,I=z.length,y,P;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),y=0;y<I;++y)(P=i[z[y].identifier])&&(No(S),P("end",S,z[y]))}function $(S,z,I,y,P,R){var V=r.copy(),L=We(R||I,z),oe,Z,v;if((v=n.call(S,new Go("beforestart",{sourceEvent:I,target:f,identifier:P,active:s,x:L[0],y:L[1],dx:0,dy:0,dispatch:V}),y))!=null)return oe=v.x-L[0]||0,Z=v.y-L[1]||0,function E(p,M,T){var N=L,k;switch(p){case"start":i[P]=E,k=s++;break;case"end":delete i[P],--s;case"drag":L=We(T||M,z),k=s;break}V.call(p,S,new Go(p,{sourceEvent:M,subject:v,target:f,identifier:P,active:k,x:L[0]+oe,y:L[1]+Z,dx:L[0]-N[0],dy:L[1]-N[1],dispatch:V}),y)}}return f.filter=function(S){return arguments.length?(e=typeof S=="function"?S:Sn(!!S),f):e},f.container=function(S){return arguments.length?(t=typeof S=="function"?S:Sn(S),f):t},f.subject=function(S){return arguments.length?(n=typeof S=="function"?S:Sn(S),f):n},f.touchable=function(S){return arguments.length?(o=typeof S=="function"?S:Sn(!!S),f):o},f.on=function(){var S=r.on.apply(r,arguments);return S===r?f:S},f.clickDistance=function(S){return arguments.length?(d=(S=+S)*S,f):Math.sqrt(d)},f}function pi(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ys(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function bn(){}var fn=.7,Wn=1/fn,Lt="\\s*([+-]?\\d+)\\s*",hn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Wu=/^#([0-9a-f]{3,8})$/,Ku=new RegExp(`^rgb\\(${Lt},${Lt},${Lt}\\)$`),Qu=new RegExp(`^rgb\\(${Qe},${Qe},${Qe}\\)$`),Ju=new RegExp(`^rgba\\(${Lt},${Lt},${Lt},${hn}\\)$`),ju=new RegExp(`^rgba\\(${Qe},${Qe},${Qe},${hn}\\)$`),ec=new RegExp(`^hsl\\(${hn},${Qe},${Qe}\\)$`),tc=new RegExp(`^hsla\\(${hn},${Qe},${Qe},${hn}\\)$`),Vi={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};pi(bn,vn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Hi,formatHex:Hi,formatHex8:nc,formatHsl:oc,formatRgb:Li,toString:Li});function Hi(){return this.rgb().formatHex()}function nc(){return this.rgb().formatHex8()}function oc(){return _s(this).formatHsl()}function Li(){return this.rgb().formatRgb()}function vn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Wu.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Fi(t):n===3?new Be(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Nn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Nn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Ku.exec(e))?new Be(t[1],t[2],t[3],1):(t=Qu.exec(e))?new Be(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ju.exec(e))?Nn(t[1],t[2],t[3],t[4]):(t=ju.exec(e))?Nn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ec.exec(e))?Yi(t[1],t[2]/100,t[3]/100,1):(t=tc.exec(e))?Yi(t[1],t[2]/100,t[3]/100,t[4]):Vi.hasOwnProperty(e)?Fi(Vi[e]):e==="transparent"?new Be(NaN,NaN,NaN,0):null}function Fi(e){return new Be(e>>16&255,e>>8&255,e&255,1)}function Nn(e,t,n,o){return o<=0&&(e=t=n=NaN),new Be(e,t,n,o)}function ic(e){return e instanceof bn||(e=vn(e)),e?(e=e.rgb(),new Be(e.r,e.g,e.b,e.opacity)):new Be}function Xo(e,t,n,o){return arguments.length===1?ic(e):new Be(e,t,n,o??1)}function Be(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}pi(Be,Xo,ys(bn,{brighter(e){return e=e==null?Wn:Math.pow(Wn,e),new Be(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?fn:Math.pow(fn,e),new Be(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Be(Et(this.r),Et(this.g),Et(this.b),Kn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Gi,formatHex:Gi,formatHex8:rc,formatRgb:Xi,toString:Xi}));function Gi(){return`#${$t(this.r)}${$t(this.g)}${$t(this.b)}`}function rc(){return`#${$t(this.r)}${$t(this.g)}${$t(this.b)}${$t((isNaN(this.opacity)?1:this.opacity)*255)}`}function Xi(){const e=Kn(this.opacity);return`${e===1?"rgb(":"rgba("}${Et(this.r)}, ${Et(this.g)}, ${Et(this.b)}${e===1?")":`, ${e})`}`}function Kn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Et(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function $t(e){return e=Et(e),(e<16?"0":"")+e.toString(16)}function Yi(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Xe(e,t,n,o)}function _s(e){if(e instanceof Xe)return new Xe(e.h,e.s,e.l,e.opacity);if(e instanceof bn||(e=vn(e)),!e)return new Xe;if(e instanceof Xe)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),r=Math.max(t,n,o),s=NaN,a=r-i,u=(r+i)/2;return a?(t===r?s=(n-o)/a+(n<o)*6:n===r?s=(o-t)/a+2:s=(t-n)/a+4,a/=u<.5?r+i:2-r-i,s*=60):a=u>0&&u<1?0:s,new Xe(s,a,u,e.opacity)}function sc(e,t,n,o){return arguments.length===1?_s(e):new Xe(e,t,n,o??1)}function Xe(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}pi(Xe,sc,ys(bn,{brighter(e){return e=e==null?Wn:Math.pow(Wn,e),new Xe(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?fn:Math.pow(fn,e),new Xe(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new Be(Co(e>=240?e-240:e+120,i,o),Co(e,i,o),Co(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new Xe(Ui(this.h),Cn(this.s),Cn(this.l),Kn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Kn(this.opacity);return`${e===1?"hsl(":"hsla("}${Ui(this.h)}, ${Cn(this.s)*100}%, ${Cn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Ui(e){return e=(e||0)%360,e<0?e+360:e}function Cn(e){return Math.max(0,Math.min(1,e||0))}function Co(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const ws=e=>()=>e;function ac(e,t){return function(n){return e+n*t}}function lc(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function uc(e){return(e=+e)==1?$s:function(t,n){return n-t?lc(t,n,e):ws(isNaN(t)?n:t)}}function $s(e,t){var n=t-e;return n?ac(e,n):ws(isNaN(e)?t:e)}const qi=function e(t){var n=uc(t);function o(i,r){var s=n((i=Xo(i)).r,(r=Xo(r)).r),a=n(i.g,r.g),u=n(i.b,r.b),l=$s(i.opacity,r.opacity);return function(c){return i.r=s(c),i.g=a(c),i.b=u(c),i.opacity=l(c),i+""}}return o.gamma=e,o}(1);function ft(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Yo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ko=new RegExp(Yo.source,"g");function cc(e){return function(){return e}}function dc(e){return function(t){return e(t)+""}}function fc(e,t){var n=Yo.lastIndex=ko.lastIndex=0,o,i,r,s=-1,a=[],u=[];for(e=e+"",t=t+"";(o=Yo.exec(e))&&(i=ko.exec(t));)(r=i.index)>n&&(r=t.slice(n,r),a[s]?a[s]+=r:a[++s]=r),(o=o[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,u.push({i:s,x:ft(o,i)})),n=ko.lastIndex;return n<t.length&&(r=t.slice(n),a[s]?a[s]+=r:a[++s]=r),a.length<2?u[0]?dc(u[0].x):cc(t):(t=u.length,function(l){for(var c=0,d;c<t;++c)a[(d=u[c]).i]=d.x(l);return a.join("")})}var Zi=180/Math.PI,Uo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function bs(e,t,n,o,i,r){var s,a,u;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(u=e*n+t*o)&&(n-=e*u,o-=t*u),(a=Math.sqrt(n*n+o*o))&&(n/=a,o/=a,u/=a),e*o<t*n&&(e=-e,t=-t,u=-u,s=-s),{translateX:i,translateY:r,rotate:Math.atan2(t,e)*Zi,skewX:Math.atan(u)*Zi,scaleX:s,scaleY:a}}var kn;function hc(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Uo:bs(t.a,t.b,t.c,t.d,t.e,t.f)}function vc(e){return e==null||(kn||(kn=document.createElementNS("http://www.w3.org/2000/svg","g")),kn.setAttribute("transform",e),!(e=kn.transform.baseVal.consolidate()))?Uo:(e=e.matrix,bs(e.a,e.b,e.c,e.d,e.e,e.f))}function xs(e,t,n,o){function i(l){return l.length?l.pop()+" ":""}function r(l,c,d,f,g,x){if(l!==d||c!==f){var m=g.push("translate(",null,t,null,n);x.push({i:m-4,x:ft(l,d)},{i:m-2,x:ft(c,f)})}else(d||f)&&g.push("translate("+d+t+f+n)}function s(l,c,d,f){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),f.push({i:d.push(i(d)+"rotate(",null,o)-2,x:ft(l,c)})):c&&d.push(i(d)+"rotate("+c+o)}function a(l,c,d,f){l!==c?f.push({i:d.push(i(d)+"skewX(",null,o)-2,x:ft(l,c)}):c&&d.push(i(d)+"skewX("+c+o)}function u(l,c,d,f,g,x){if(l!==d||c!==f){var m=g.push(i(g)+"scale(",null,",",null,")");x.push({i:m-4,x:ft(l,d)},{i:m-2,x:ft(c,f)})}else(d!==1||f!==1)&&g.push(i(g)+"scale("+d+","+f+")")}return function(l,c){var d=[],f=[];return l=e(l),c=e(c),r(l.translateX,l.translateY,c.translateX,c.translateY,d,f),s(l.rotate,c.rotate,d,f),a(l.skewX,c.skewX,d,f),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,d,f),l=c=null,function(g){for(var x=-1,m=f.length,h;++x<m;)d[(h=f[x]).i]=h.x(g);return d.join("")}}}var gc=xs(hc,"px, ","px)","deg)"),pc=xs(vc,", ",")",")"),mc=1e-12;function Wi(e){return((e=Math.exp(e))+1/e)/2}function yc(e){return((e=Math.exp(e))-1/e)/2}function _c(e){return((e=Math.exp(2*e))-1)/(e+1)}const wc=function e(t,n,o){function i(r,s){var a=r[0],u=r[1],l=r[2],c=s[0],d=s[1],f=s[2],g=c-a,x=d-u,m=g*g+x*x,h,_;if(m<mc)_=Math.log(f/l)/t,h=function(y){return[a+y*g,u+y*x,l*Math.exp(t*y*_)]};else{var b=Math.sqrt(m),$=(f*f-l*l+o*m)/(2*l*n*b),S=(f*f-l*l-o*m)/(2*f*n*b),z=Math.log(Math.sqrt($*$+1)-$),I=Math.log(Math.sqrt(S*S+1)-S);_=(I-z)/t,h=function(y){var P=y*_,R=Wi(z),V=l/(n*b)*(R*_c(t*P+z)-yc(z));return[a+V*g,u+V*x,l*R/Wi(t*P+z)]}}return h.duration=_*1e3*t/Math.SQRT2,h}return i.rho=function(r){var s=Math.max(.001,+r),a=s*s,u=a*a;return e(s,a,u)},i}(Math.SQRT2,2,4);var Yt=0,tn=0,Kt=0,Es=1e3,Qn,nn,Jn=0,Mt=0,ho=0,gn=typeof performance=="object"&&performance.now?performance:Date,Ss=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function mi(){return Mt||(Ss($c),Mt=gn.now()+ho)}function $c(){Mt=0}function jn(){this._call=this._time=this._next=null}jn.prototype=Ns.prototype={constructor:jn,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?mi():+n)+(t==null?0:+t),!this._next&&nn!==this&&(nn?nn._next=this:Qn=this,nn=this),this._call=e,this._time=n,qo()},stop:function(){this._call&&(this._call=null,this._time=1/0,qo())}};function Ns(e,t,n){var o=new jn;return o.restart(e,t,n),o}function bc(){mi(),++Yt;for(var e=Qn,t;e;)(t=Mt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Yt}function Ki(){Mt=(Jn=gn.now())+ho,Yt=tn=0;try{bc()}finally{Yt=0,Ec(),Mt=0}}function xc(){var e=gn.now(),t=e-Jn;t>Es&&(ho-=t,Jn=e)}function Ec(){for(var e,t=Qn,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Qn=n);nn=e,qo(o)}function qo(e){if(!Yt){tn&&(tn=clearTimeout(tn));var t=e-Mt;t>24?(e<1/0&&(tn=setTimeout(Ki,e-gn.now()-ho)),Kt&&(Kt=clearInterval(Kt))):(Kt||(Jn=gn.now(),Kt=setInterval(xc,Es)),Yt=1,Ss(Ki))}}function Qi(e,t,n){var o=new jn;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var Sc=co("start","end","cancel","interrupt"),Nc=[],Cs=0,Ji=1,Zo=2,Hn=3,ji=4,Wo=5,Ln=6;function vo(e,t,n,o,i,r){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;Cc(e,n,{name:t,index:o,group:i,on:Sc,tween:Nc,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:Cs})}function yi(e,t){var n=qe(e,t);if(n.state>Cs)throw new Error("too late; already scheduled");return n}function je(e,t){var n=qe(e,t);if(n.state>Hn)throw new Error("too late; already running");return n}function qe(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Cc(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=Ns(r,0,n.time);function r(l){n.state=Ji,n.timer.restart(s,n.delay,n.time),n.delay<=l&&s(l-n.delay)}function s(l){var c,d,f,g;if(n.state!==Ji)return u();for(c in o)if(g=o[c],g.name===n.name){if(g.state===Hn)return Qi(s);g.state===ji?(g.state=Ln,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete o[c]):+c<t&&(g.state=Ln,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete o[c])}if(Qi(function(){n.state===Hn&&(n.state=ji,n.timer.restart(a,n.delay,n.time),a(l))}),n.state=Zo,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Zo){for(n.state=Hn,i=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(g=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=g);i.length=d+1}}function a(l){for(var c=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(u),n.state=Wo,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===Wo&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=Ln,n.timer.stop(),delete o[t];for(var l in o)return;delete e.__transition}}function Fn(e,t){var n=e.__transition,o,i,r=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((o=n[s]).name!==t){r=!1;continue}i=o.state>Zo&&o.state<Wo,o.state=Ln,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[s]}r&&delete e.__transition}}function kc(e){return this.each(function(){Fn(this,e)})}function Mc(e,t){var n,o;return function(){var i=je(this,e),r=i.tween;if(r!==n){o=n=r;for(var s=0,a=o.length;s<a;++s)if(o[s].name===t){o=o.slice(),o.splice(s,1);break}}i.tween=o}}function Tc(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var r=je(this,e),s=r.tween;if(s!==o){i=(o=s).slice();for(var a={name:t,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===t){i[u]=a;break}u===l&&i.push(a)}r.tween=i}}function Ic(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=qe(this.node(),n).tween,i=0,r=o.length,s;i<r;++i)if((s=o[i]).name===e)return s.value;return null}return this.each((t==null?Mc:Tc)(n,e,t))}function _i(e,t,n){var o=e._id;return e.each(function(){var i=je(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return qe(i,o).value[t]}}function ks(e,t){var n;return(typeof t=="number"?ft:t instanceof vn?qi:(n=vn(t))?(t=n,qi):fc)(e,t)}function Ac(e){return function(){this.removeAttribute(e)}}function Dc(e){return function(){this.removeAttributeNS(e.space,e.local)}}function zc(e,t,n){var o,i=n+"",r;return function(){var s=this.getAttribute(e);return s===i?null:s===o?r:r=t(o=s,n)}}function Oc(e,t,n){var o,i=n+"",r;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===o?r:r=t(o=s,n)}}function Pc(e,t,n){var o,i,r;return function(){var s,a=n(this),u;return a==null?void this.removeAttribute(e):(s=this.getAttribute(e),u=a+"",s===u?null:s===o&&u===i?r:(i=u,r=t(o=s,a)))}}function Bc(e,t,n){var o,i,r;return function(){var s,a=n(this),u;return a==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),u=a+"",s===u?null:s===o&&u===i?r:(i=u,r=t(o=s,a)))}}function Rc(e,t){var n=fo(e),o=n==="transform"?pc:ks;return this.attrTween(e,typeof t=="function"?(n.local?Bc:Pc)(n,o,_i(this,"attr."+e,t)):t==null?(n.local?Dc:Ac)(n):(n.local?Oc:zc)(n,o,t))}function Vc(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Hc(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Lc(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&Hc(e,r)),n}return i._value=t,i}function Fc(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&Vc(e,r)),n}return i._value=t,i}function Gc(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=fo(e);return this.tween(n,(o.local?Lc:Fc)(o,t))}function Xc(e,t){return function(){yi(this,e).delay=+t.apply(this,arguments)}}function Yc(e,t){return t=+t,function(){yi(this,e).delay=t}}function Uc(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Xc:Yc)(t,e)):qe(this.node(),t).delay}function qc(e,t){return function(){je(this,e).duration=+t.apply(this,arguments)}}function Zc(e,t){return t=+t,function(){je(this,e).duration=t}}function Wc(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?qc:Zc)(t,e)):qe(this.node(),t).duration}function Kc(e,t){if(typeof t!="function")throw new Error;return function(){je(this,e).ease=t}}function Qc(e){var t=this._id;return arguments.length?this.each(Kc(t,e)):qe(this.node(),t).ease}function Jc(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;je(this,e).ease=n}}function jc(e){if(typeof e!="function")throw new Error;return this.each(Jc(this._id,e))}function ed(e){typeof e!="function"&&(e=ss(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],s=r.length,a=o[i]=[],u,l=0;l<s;++l)(u=r[l])&&e.call(u,u.__data__,l,r)&&a.push(u);return new at(o,this._parents,this._name,this._id)}function td(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,r=Math.min(o,i),s=new Array(o),a=0;a<r;++a)for(var u=t[a],l=n[a],c=u.length,d=s[a]=new Array(c),f,g=0;g<c;++g)(f=u[g]||l[g])&&(d[g]=f);for(;a<o;++a)s[a]=t[a];return new at(s,this._parents,this._name,this._id)}function nd(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function od(e,t,n){var o,i,r=nd(t)?yi:je;return function(){var s=r(this,e),a=s.on;a!==o&&(i=(o=a).copy()).on(t,n),s.on=i}}function id(e,t){var n=this._id;return arguments.length<2?qe(this.node(),n).on.on(e):this.each(od(n,e,t))}function rd(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function sd(){return this.on("end.remove",rd(this._id))}function ad(e){var t=this._name,n=this._id;typeof e!="function"&&(e=vi(e));for(var o=this._groups,i=o.length,r=new Array(i),s=0;s<i;++s)for(var a=o[s],u=a.length,l=r[s]=new Array(u),c,d,f=0;f<u;++f)(c=a[f])&&(d=e.call(c,c.__data__,f,a))&&("__data__"in c&&(d.__data__=c.__data__),l[f]=d,vo(l[f],t,n,f,l,qe(c,n)));return new at(r,this._parents,t,n)}function ld(e){var t=this._name,n=this._id;typeof e!="function"&&(e=rs(e));for(var o=this._groups,i=o.length,r=[],s=[],a=0;a<i;++a)for(var u=o[a],l=u.length,c,d=0;d<l;++d)if(c=u[d]){for(var f=e.call(c,c.__data__,d,u),g,x=qe(c,n),m=0,h=f.length;m<h;++m)(g=f[m])&&vo(g,t,n,m,f,x);r.push(f),s.push(c)}return new at(r,s,t,n)}var ud=$n.prototype.constructor;function cd(){return new ud(this._groups,this._parents)}function dd(e,t){var n,o,i;return function(){var r=Xt(this,e),s=(this.style.removeProperty(e),Xt(this,e));return r===s?null:r===n&&s===o?i:i=t(n=r,o=s)}}function Ms(e){return function(){this.style.removeProperty(e)}}function fd(e,t,n){var o,i=n+"",r;return function(){var s=Xt(this,e);return s===i?null:s===o?r:r=t(o=s,n)}}function hd(e,t,n){var o,i,r;return function(){var s=Xt(this,e),a=n(this),u=a+"";return a==null&&(u=a=(this.style.removeProperty(e),Xt(this,e))),s===u?null:s===o&&u===i?r:(i=u,r=t(o=s,a))}}function vd(e,t){var n,o,i,r="style."+t,s="end."+r,a;return function(){var u=je(this,e),l=u.on,c=u.value[r]==null?a||(a=Ms(t)):void 0;(l!==n||i!==c)&&(o=(n=l).copy()).on(s,i=c),u.on=o}}function gd(e,t,n){var o=(e+="")=="transform"?gc:ks;return t==null?this.styleTween(e,dd(e,o)).on("end.style."+e,Ms(e)):typeof t=="function"?this.styleTween(e,hd(e,o,_i(this,"style."+e,t))).each(vd(this._id,e)):this.styleTween(e,fd(e,o,t),n).on("end.style."+e,null)}function pd(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function md(e,t,n){var o,i;function r(){var s=t.apply(this,arguments);return s!==i&&(o=(i=s)&&pd(e,s,n)),o}return r._value=t,r}function yd(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,md(e,t,n??""))}function _d(e){return function(){this.textContent=e}}function wd(e){return function(){var t=e(this);this.textContent=t??""}}function $d(e){return this.tween("text",typeof e=="function"?wd(_i(this,"text",e)):_d(e==null?"":e+""))}function bd(e){return function(t){this.textContent=e.call(this,t)}}function xd(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&bd(i)),t}return o._value=e,o}function Ed(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,xd(e))}function Sd(){for(var e=this._name,t=this._id,n=Ts(),o=this._groups,i=o.length,r=0;r<i;++r)for(var s=o[r],a=s.length,u,l=0;l<a;++l)if(u=s[l]){var c=qe(u,t);vo(u,e,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new at(o,this._parents,e,n)}function Nd(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(r,s){var a={value:s},u={value:function(){--i===0&&r()}};n.each(function(){var l=je(this,o),c=l.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(u)),l.on=t}),i===0&&r()})}var Cd=0;function at(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function Ts(){return++Cd}var tt=$n.prototype;at.prototype={constructor:at,select:ad,selectAll:ld,selectChild:tt.selectChild,selectChildren:tt.selectChildren,filter:ed,merge:td,selection:cd,transition:Sd,call:tt.call,nodes:tt.nodes,node:tt.node,size:tt.size,empty:tt.empty,each:tt.each,on:id,attr:Rc,attrTween:Gc,style:gd,styleTween:yd,text:$d,textTween:Ed,remove:sd,tween:Ic,delay:Uc,duration:Wc,ease:Qc,easeVarying:jc,end:Nd,[Symbol.iterator]:tt[Symbol.iterator]};function kd(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Md={time:null,delay:0,duration:250,ease:kd};function Td(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Id(e){var t,n;e instanceof at?(t=e._id,e=e._name):(t=Ts(),(n=Md).time=mi(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,r=0;r<i;++r)for(var s=o[r],a=s.length,u,l=0;l<a;++l)(u=s[l])&&vo(u,e,t,l,s,n||Td(u,t));return new at(o,this._parents,e,t)}$n.prototype.interrupt=kc;$n.prototype.transition=Id;const Mn=e=>()=>e;function Ad(e,{sourceEvent:t,target:n,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function rt(e,t,n){this.k=e,this.x=t,this.y=n}rt.prototype={constructor:rt,scale:function(e){return e===1?this:new rt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new rt(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ut=new rt(1,0,0);rt.prototype;function Mo(e){e.stopImmediatePropagation()}function Qt(e){e.preventDefault(),e.stopImmediatePropagation()}function Dd(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function zd(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function er(){return this.__zoom||Ut}function Od(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Pd(){return navigator.maxTouchPoints||"ontouchstart"in this}function Bd(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s))}function Rd(){var e=Dd,t=zd,n=Bd,o=Od,i=Pd,r=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,u=wc,l=co("start","zoom","end"),c,d,f,g=500,x=150,m=0,h=10;function _(v){v.property("__zoom",er).on("wheel.zoom",P,{passive:!1}).on("mousedown.zoom",R).on("dblclick.zoom",V).filter(i).on("touchstart.zoom",L).on("touchmove.zoom",oe).on("touchend.zoom touchcancel.zoom",Z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(v,E,p,M){var T=v.selection?v.selection():v;T.property("__zoom",er),v!==T?z(v,E,p,M):T.interrupt().each(function(){I(this,arguments).event(M).start().zoom(null,typeof E=="function"?E.apply(this,arguments):E).end()})},_.scaleBy=function(v,E,p,M){_.scaleTo(v,function(){var T=this.__zoom.k,N=typeof E=="function"?E.apply(this,arguments):E;return T*N},p,M)},_.scaleTo=function(v,E,p,M){_.transform(v,function(){var T=t.apply(this,arguments),N=this.__zoom,k=p==null?S(T):typeof p=="function"?p.apply(this,arguments):p,X=N.invert(k),W=typeof E=="function"?E.apply(this,arguments):E;return n($(b(N,W),k,X),T,s)},p,M)},_.translateBy=function(v,E,p,M){_.transform(v,function(){return n(this.__zoom.translate(typeof E=="function"?E.apply(this,arguments):E,typeof p=="function"?p.apply(this,arguments):p),t.apply(this,arguments),s)},null,M)},_.translateTo=function(v,E,p,M,T){_.transform(v,function(){var N=t.apply(this,arguments),k=this.__zoom,X=M==null?S(N):typeof M=="function"?M.apply(this,arguments):M;return n(Ut.translate(X[0],X[1]).scale(k.k).translate(typeof E=="function"?-E.apply(this,arguments):-E,typeof p=="function"?-p.apply(this,arguments):-p),N,s)},M,T)};function b(v,E){return E=Math.max(r[0],Math.min(r[1],E)),E===v.k?v:new rt(E,v.x,v.y)}function $(v,E,p){var M=E[0]-p[0]*v.k,T=E[1]-p[1]*v.k;return M===v.x&&T===v.y?v:new rt(v.k,M,T)}function S(v){return[(+v[0][0]+ +v[1][0])/2,(+v[0][1]+ +v[1][1])/2]}function