1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6098],{395:(t,e,n)=>{"use strict";var r=n(64245),i="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},o=r.useState,a=r.useEffect,u=r.useLayoutEffect,l=r.useDebugValue;function s(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!i(t,n)}catch(t){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var n=e(),r=o({inst:{value:n,getSnapshot:e}}),i=r[0].inst,c=r[1];return u(function(){i.value=n,i.getSnapshot=e,s(i)&&c({inst:i})},[t,n,e]),a(function(){return s(i)&&c({inst:i}),t(function(){s(i)&&c({inst:i})})},[t]),l(n),n};e.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},1594:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},1896:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]])},6622:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},12554:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},24659:(t,e,n)=>{"use strict";n.d(e,{Do:()=>p,WZ:()=>h,TG:()=>y,ny:()=>f,yX:()=>g,xN:()=>m,Qc:()=>d,I$:()=>rv,aQ:()=>rM,di:()=>rk,kO:()=>rI,rN:()=>n0,bi:()=>rl,_s:()=>nL,_7:()=>nd,aE:()=>nu,kr:()=>nk,Hm:()=>re,tM:()=>e4,tn:()=>e3,xc:()=>e2,us:()=>nP,IO:()=>na,e_:()=>nF,Fp:()=>nZ,Mi:()=>nx,HF:()=>e9,Eo:()=>nO,b5:()=>n6,Tq:()=>nl,qX:()=>nQ,q1:()=>nR,M_:()=>n9,oj:()=>nC,aZ:()=>ni,aW:()=>rt,uD:()=>nI,ih:()=>rn,Jo:()=>nr,U$:()=>no,X6:()=>n_,oN:()=>n3,ah:()=>n1,R4:()=>nN,r8:()=>rh,ZO:()=>e5,bK:()=>e6,b$:()=>e7,uj:()=>nG,v5:()=>nD,Ue:()=>nS,Er:()=>nX,oB:()=>nt,kf:()=>nM,mW:()=>nb,Q6:()=>nj,QE:()=>nH,kM:()=>nm,No:()=>rd,Ff:()=>nE,zj:()=>n$,s_:()=>nA,vS:()=>ra,qn:()=>ry,uL:()=>rf,YN:()=>nB});var r,i,o,a,u,l,s,c,h,f,d,p,y,g,m,v={value:()=>{}};function x(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw Error("illegal type: "+t);r[t]=[]}return new w(r)}function w(t){this._=t}function _(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=v,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}function b(){}function M(t){return null==t?b:function(){return this.querySelector(t)}}function k(){return[]}function A(t){return null==t?k:function(){return this.querySelectorAll(t)}}function E(t){return function(){return this.matches(t)}}function $(t){return function(e){return e.matches(t)}}w.prototype=x.prototype={constructor:w,on:function(t,e){var n,r=this._,i=(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw Error("unknown type: "+t);return{type:t,name:e}}),o=-1,a=i.length;if(arguments.length<2){for(;++o<a;)if((n=(t=i[o]).type)&&(n=function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(r[n],t.name)))return n;return}if(null!=e&&"function"!=typeof e)throw Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=_(r[n],t.name,e);else if(null==e)for(n in r)r[n]=_(r[n],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new w(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(r=this._[t],o=0,n=r.length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var z=Array.prototype.find;function N(){return this.firstElementChild}var S=Array.prototype.filter;function T(){return Array.from(this.children)}function I(t){return Array(t.length)}function H(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function P(t,e,n,r,i,o){for(var a,u=0,l=e.length,s=o.length;u<s;++u)(a=e[u])?(a.__data__=o[u],r[u]=a):n[u]=new H(t,o[u]);for(;u<l;++u)(a=e[u])&&(i[u]=a)}function L(t,e,n,r,i,o,a){var u,l,s,c=new Map,h=e.length,f=o.length,d=Array(h);for(u=0;
1u<h;++u)(l=e[u])&&(d[u]=s=a.call(l,l.__data__,u,e)+"",c.has(s)?i[u]=l:c.set(s,l));for(u=0;u<f;++u)s=a.call(t,o[u],u,o)+"",(l=c.get(s))?(r[u]=l,l.__data__=o[u],c.delete(s)):n[u]=new H(t,o[u]);for(u=0;u<h;++u)(l=e[u])&&c.get(d[u])===l&&(i[u]=l)}function B(t){return t.__data__}function j(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}H.prototype={constructor:H,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var V="http://www.w3.org/1999/xhtml";let O={svg:"http://www.w3.org/2000/svg",xhtml:V,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function C(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),O.hasOwnProperty(e)?{space:O[e],local:t}:t}function q(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function D(t,e){return t.style.getPropertyValue(e)||q(t).getComputedStyle(t,null).getPropertyValue(e)}function X(t){return t.trim().split(/^|\s+/)}function R(t){return t.classList||new Y(t)}function Y(t){this._node=t,this._names=X(t.getAttribute("class")||"")}function F(t,e){for(var n=R(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function K(t,e){for(var n=R(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function W(){this.textContent=""}function Z(){this.innerHTML=""}function U(){this.nextSibling&&this.parentNode.appendChild(this)}function Q(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function G(t){var e=C(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===V&&e.documentElement.namespaceURI===V?e.createElement(t):e.createElementNS(n,t)}})(e)}function J(){return null}function tt(){var t=this.parentNode;t&&t.removeChild(this)}function te(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function tn(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function tr(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)(n=e[r],t.type&&n.type!==t.type||n.name!==t.name)?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function ti(t,e,n){return function(){var r,i=this.__on,o=function(t){e.call(this,t,this.__data__)};if(i){for(var a=0,u=i.length;a<u;++a)if((r=i[a]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),r.value=e;return}}this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function to(t,e,n){var r=q(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}Y.prototype={add:function(t){0>this._names.indexOf(t)&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var ta=[null];function tu(t,e){this._groups=t,this._parents=e}function tl(){return new tu([[document.documentElement]],ta)}function ts(t){return"string"==typeof t?new tu([[document.querySelector(t)]],[document.documentElement]):new tu([[t]],ta)}function tc(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}tu.prototype=tl.prototype={constructor:tu,select:function(t){"function"!=typeof t&&(t=M(t));for(var e=this._groups,n=e.length,r=Array(n),i=0;i<n;++i)for(var o,a,u=e[i],l=u.length,s=r[i]=Array(l),c=0;c<l;++c)(o=u[c])&&(a=t.call(o,o.__data__,c,u))&&("__data__"in o&&(a.__data__=o.__data__),s[c]=a);return new tu(r,this._parents)},selectAll:function(t){if("function"==typeof t){var e;e=t,t=function(){var t;return t=e.apply(this,arguments),null==t?[]:Array.isArray(t)?t:Array.from(t)}}else t=A(t);for(var n=this._groups,r=n.length,i=[],o=[],a=0;a<r;++a)for(var u,l=n[a],s=l.length,c=0;c<s;++c)(u=l[c])&&(i.push(t.call(u,u.__data__,c,l)),o.push(u));return new tu(i,o)},selectChild:function(t){var e;return this.select(null==t?N:(e="function"==typeof t?t:$(t),function(){return z.call(this.children,e)}))},selectChildren:function(t){var e;return this.selectAll(null==t?T:(e="function"==typeof t?t:$(t),function(){return S.call(this.children,e)}))},filter:function(t){"function"!=typeof t&&(t=E(t));for(var e=this._groups,n=e.length,r=Array(n),i=0;i<n;++i)for(var o,a=e[i],u=a.length,l=r[i]=[],s=0;s<u;++s)(o=a[s])&&t.call(o,o.__data__,s,a)&&l.push(o);return new tu(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,B);var n=e?L:P,r=this._parents,i=this._groups;"function"!=typeof t&&(v=t,t=function(){return v});for(var o=i.length,a=Array(o),u=Array(o),l=Array(o),s=0;s<o;++s){var c=r[s],h=i[s],f=h.length,d="object"==typeof(m=t.call(c,c&&c.__data__,s,r))&&"length"in m?m:Array.from(m),p=d.length,y=u[s]=Array(p),g=a[s]=Array(p);n(c,h,y,g,l[s]=Array(f),d,e);for(var m,v,x,w,_=0,b=0;_<p;++_)if(x=y[_]){for(_>=b&&(b=_+1);!(w=g[b])&&++b<p;);x._next=w||null}}return(a=new tu(a,r))._enter=u,a._exit=l,a},enter:function(){return new tu(this._enter||this._groups.map(I),this._parents)},exit:function(){return new tu(this._exit||this._groups.map(I),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),u=Array(i),l=0;l<a;++l)for(var s,c=n[l],h=r[l],f=c.length,d=u[l]=Array(f),p=0;p<f;++p)(s=c[p]||h[p])&&(d[p]=s);for(;l<i;++l)u[l]=n[l];return new tu(u,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=j);for(var n=this._groups,r=n.length,i=Array(r),o=0;o<r;++o){for(var a,u=n[o],l=u.length,s=i[o]=Array(l),c=0;c<l;++c)(a=u[c])&&(s[c]=a);s.sort(e)}return new tu(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let t=0;for(let e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=C(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof e?n.local?function(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}:function(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}:n.local?function(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}:function(t,e){return function(){this.setAttribute(t,e)}})(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof e?function(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}:function(t,e,n){return function(){this.style.setProperty(t,e,n)}})(t,e,null==n?"":n)):D(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?function(t){return function(){delete this[t]}}:"function"==typeof e?function(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}:function(t,e){return function(){this[t]=e}})(t,e)):this.node()[t]},classed:function(t,e){var n=X(t+"");
1if(arguments.length<2){for(var r=R(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?function(t,e){return function(){(e.apply(this,arguments)?F:K)(this,t)}}:e?function(t){return function(){F(this,t)}}:function(t){return function(){K(this,t)}})(n,e))},text:function(t){return arguments.length?this.each(null==t?W:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Z:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(U)},lower:function(){return this.each(Q)},append:function(t){var e="function"==typeof t?t:G(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var n="function"==typeof t?t:G(t),r=null==e?J:"function"==typeof e?e:M(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(tt)},clone:function(t){return this.select(t?tn:te)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}),a=o.length;if(arguments.length<2){var u=this.node().__on;if(u){for(var l,s=0,c=u.length;s<c;++s)for(r=0,l=u[s];r<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value}return}for(r=0,u=e?ti:tr;r<a;++r)this.each(u(o[r],e,n));return this},dispatch:function(t,e){return this.each(("function"==typeof e?function(t,e){return function(){return to(this,t,e.apply(this,arguments))}}:function(t,e){return function(){return to(this,t,e)}})(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};let th={passive:!1},tf={capture:!0,passive:!1};function td(t){t.stopImmediatePropagation()}function tp(t){t.preventDefault(),t.stopImmediatePropagation()}function ty(t){var e=t.document.documentElement,n=ts(t).on("dragstart.drag",tp,tf);"onselectstart"in e?n.on("selectstart.drag",tp,tf):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function tg(t,e){var n=t.document.documentElement,r=ts(t).on("dragstart.drag",null);e&&(r.on("click.drag",tp,tf),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}let tm=t=>()=>t;function tv(t,e){let{sourceEvent:n,subject:r,target:i,identifier:o,active:a,x:u,y:l,dx:s,dy:c,dispatch:h}=e;Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:u,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:s,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:h}})}function tx(t){return!t.ctrlKey&&!t.button}function tw(){return this.parentNode}function t_(t,e){return null==e?{x:t.x,y:t.y}:e}function tb(){return navigator.maxTouchPoints||"ontouchstart"in this}function tM(t){return((t=Math.exp(t))+1/t)/2}tv.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};let tk=function t(e,n,r){function i(t,i){var o,a,u=t[0],l=t[1],s=t[2],c=i[0],h=i[1],f=i[2],d=c-u,p=h-l,y=d*d+p*p;if(y<1e-12)a=Math.log(f/s)/e,o=function(t){return[u+t*d,l+t*p,s*Math.exp(e*t*a)]};else{var g=Math.sqrt(y),m=(f*f-s*s+r*y)/(2*s*n*g),v=(f*f-s*s-r*y)/(2*f*n*g),x=Math.log(Math.sqrt(m*m+1)-m);a=(Math.log(Math.sqrt(v*v+1)-v)-x)/e,o=function(t){var r,i,o=t*a,c=tM(x),h=s/(n*g)*(c*(((r=Math.exp(2*(r=e*o+x)))-1)/(r+1))-((i=Math.exp(i=x))-1/i)/2);return[u+h*d,l+h*p,s*c/tM(e*o+x)]}}return o.duration=1e3*a*e/Math.SQRT2,o}return i.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},i}(Math.SQRT2,2,4);var tA,tE,t$=0,tz=0,tN=0,tS=0,tT=0,tI=0,tH="object"==typeof performance&&performance.now?performance:Date,tP="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function tL(){return tT||(tP(tB),tT=tH.now()+tI)}function tB(){tT=0}function tj(){this._call=this._time=this._next=null}function tV(t,e,n){var r=new tj;return r.restart(t,e,n),r}
1function tO(){tT=(tS=tH.now())+tI,t$=tz=0;try{tL(),++t$;for(var t,e=tA;e;)(t=tT-e._time)>=0&&e._call.call(void 0,t),e=e._next;--t$}finally{t$=0,function(){for(var t,e,n=tA,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:tA=e);tE=t,tq(r)}(),tT=0}}function tC(){var t=tH.now(),e=t-tS;e>1e3&&(tI-=e,tS=t)}function tq(t){!t$&&(tz&&(tz=clearTimeout(tz)),t-tT>24?(t<1/0&&(tz=setTimeout(tO,t-tH.now()-tI)),tN&&(tN=clearInterval(tN))):(tN||(tS=tH.now(),tN=setInterval(tC,1e3)),t$=1,tP(tO)))}function tD(t,e,n){var r=new tj;return e=null==e?0:+e,r.restart(n=>{r.stop(),t(n+e)},e,n),r}tj.prototype=tV.prototype={constructor:tj,restart:function(t,e,n){if("function"!=typeof t)throw TypeError("callback is not a function");n=(null==n?tL():+n)+(null==e?0:+e),this._next||tE===this||(tE?tE._next=this:tA=this,tE=this),this._call=t,this._time=n,tq()},stop:function(){this._call&&(this._call=null,this._time=1/0,tq())}};var tX=x("start","end","cancel","interrupt"),tR=[];function tY(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(l){var s,c,h,f;if(1!==n.state)return u();for(s in i)if((f=i[s]).name===n.name){if(3===f.state)return tD(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[s]):+s<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[s])}if(tD(function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(l))}),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(s=0,n.state=3,r=Array(h=n.tween.length),c=-1;s<h;++s)(f=n.tween[s].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=f);r.length=c+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(u),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=tV(function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)},0,n.time)}(t,n,{name:e,index:r,group:i,on:tX,tween:tR,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function tF(t,e){var n=tW(t,e);if(n.state>0)throw Error("too late; already scheduled");return n}function tK(t,e){var n=tW(t,e);if(n.state>3)throw Error("too late; already running");return n}function tW(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw Error("transition not found");return n}function tZ(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o){if((n=o[i]).name!==e){a=!1;continue}r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]}a&&delete t.__transition}}function tU(t,e){return t*=1,e*=1,function(n){return t*(1-n)+e*n}}var tQ=180/Math.PI,tG={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function tJ(t,e,n,r,i,o){var a,u,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,l/=u),t*r<e*n&&(t=-t,e=-e,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*tQ,skewX:Math.atan(l)*tQ,scaleX:a,scaleY:u}}function t0(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var u,l,s,c,h=[],f=[];return o=t(o),a=t(a),!function(t,r,i,o,a,u){if(t!==i||r!==o){var l=a.push("translate(",null,e,null,n);u.push({i:l-4,x:tU(t,i)},{i:l-2,x:tU(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,h,f),u=o.rotate,l=a.rotate,u!==l?(u-l>180?l+=360:l-u>180&&(u+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:tU(u,l)})):l&&h.push(i(h)+"rotate("+l+r),s=o.skewX,c=a.skewX,s!==c?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:tU(s,c)}):c&&h.push(i(h)+"skewX("+c+r),!function(t,e,n,r,o,a){if(t!==n||e!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:tU(t,n)},{i:u-2,x:tU(e,r)})}else(1!==n||1!==r)&&o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,h,f),o=a=null,function(t){for(var e,n=-1,r=f.length;++n<r;)h[(e=f[n]).i]=e.x(t);return h.join("")}}}var t1=t0(function(t){let e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?tG:tJ(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),t2=t0(function(t){return null==t?tG:(c||(c=document.createElementNS("http://www.w3.org/2000/svg","g")),c.setAttribute("transform",t),t=c.transform.baseVal.consolidate())?tJ((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):tG},", ",")",")");function t5(t,e,n){var r=t._id;return t.each(function(){var t=tK(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return tW(t,r).value[e]}}function t3(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function t4(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function t6(){}var t8="\\s*([+-]?\\d+)\\s*",t9="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",t7="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",et=/^#([0-9a-f]{3,8})$/,ee=RegExp(`^rgb\\(${t8},${t8},${t8}\\)$`),en=RegExp(`^rgb\\(${t7},${t7},${t7}\\)$`),er=RegExp(`^rgba\\(${t8},${t8},${t8},${t9}\\)$`),ei=RegExp(`^rgba\\(${t7},${t7},${t7},${t9}\\)$`),eo=RegExp(`^hsl\\(${t9},${t7},${t7}\\)$`),ea=RegExp(`^hsla\\(${t9},${t7},${t7},${t9}\\)$`),eu={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function el(){return this.rgb().formatHex()}function es(){return this.rgb().formatRgb()}function ec(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=et.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?eh(e):3===n?
1new ep(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ef(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ef(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ee.exec(t))?new ep(e[1],e[2],e[3],1):(e=en.exec(t))?new ep(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=er.exec(t))?ef(e[1],e[2],e[3],e[4]):(e=ei.exec(t))?ef(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=eo.exec(t))?ew(e[1],e[2]/100,e[3]/100,1):(e=ea.exec(t))?ew(e[1],e[2]/100,e[3]/100,e[4]):eu.hasOwnProperty(t)?eh(eu[t]):"transparent"===t?new ep(NaN,NaN,NaN,0):null}function eh(t){return new ep(t>>16&255,t>>8&255,255&t,1)}function ef(t,e,n,r){return r<=0&&(t=e=n=NaN),new ep(t,e,n,r)}function ed(t,e,n,r){var i;return 1==arguments.length?((i=t)instanceof t6||(i=ec(i)),i)?new ep((i=i.rgb()).r,i.g,i.b,i.opacity):new ep:new ep(t,e,n,null==r?1:r)}function ep(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ey(){return`#${ex(this.r)}${ex(this.g)}${ex(this.b)}`}function eg(){let t=em(this.opacity);return`${1===t?"rgb(":"rgba("}${ev(this.r)}, ${ev(this.g)}, ${ev(this.b)}${1===t?")":`, ${t})`}`}function em(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ev(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ex(t){return((t=ev(t))<16?"0":"")+t.toString(16)}function ew(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new eb(t,e,n,r)}function e_(t){if(t instanceof eb)return new eb(t.h,t.s,t.l,t.opacity);if(t instanceof t6||(t=ec(t)),!t)return new eb;if(t instanceof eb)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,u=o-i,l=(o+i)/2;return u?(a=e===o?(n-r)/u+(n<r)*6:n===o?(r-e)/u+2:(e-n)/u+4,u/=l<.5?o+i:2-o-i,a*=60):u=l>0&&l<1?0:a,new eb(a,u,l,t.opacity)}function eb(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function eM(t){return(t=(t||0)%360)<0?t+360:t}function ek(t){return Math.max(0,Math.min(1,t||0))}function eA(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}function eE(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}t3(t6,ec,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:el,formatHex:el,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return e_(this).formatHsl()},formatRgb:es,toString:es}),t3(ep,ed,t4(t6,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new ep(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new ep(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ep(ev(this.r),ev(this.g),ev(this.b),em(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:ey,formatHex:ey,formatHex8:function(){return`#${ex(this.r)}${ex(this.g)}${ex(this.b)}${ex((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:eg,toString:eg})),t3(eb,function(t,e,n,r){return 1==arguments.length?e_(t):new eb(t,e,n,null==r?1:r)},t4(t6,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new eb(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new eb(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ep(eA(t>=240?t-240:t+120,i,r),eA(t,i,r),eA(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new eb(eM(this.h),ek(this.s),ek(this.l),em(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(){let t=em(this.opacity);return`${1===t?"hsl(":"hsla("}${eM(this.h)}, ${100*ek(this.s)}%, ${100*ek(this.l)}%${1===t?")":`, ${t})`}`}}));let e$=t=>()=>t;function ez(t,e){var n=e-t;return n?function(e){return t+e*n}:e$(isNaN(t)?e:t)}let eN=function t(e){var n,r=1==(n=+e)?ez:function(t,e){var r,i,o;return e-t?(r=t,i=e,r=Math.pow(r,o=n),i=Math.pow(i,o)-r,o=1/o,function(t){return Math.pow(r+t*i,o)}):e$(isNaN(t)?e:t)};function i(t,e){var n=r((t=ed(t)).r,(e=ed(e)).r),i=r(t.g,e.g),o=r(t.b,e.b),a=ez(t.opacity,e.opacity);return function(e){return t.r=n(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);function eS(t){return function(e){var n,r,i=e.length,o=Array(i),a=Array(i),u=Array(i);for(n=0;n<i;++n)r=ed(e[n]),o[n]=r.r||0,a[n]=r.g||0,u[n]=r.b||0;return o=t(o),a=t(a),u=t(u),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=u(t),r+""}}}eS(function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=r<e-1?t[r+2]:2*o-i;return eE((n-r/e)*e,a,i,o,u)}}),eS(function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],u=t[(r+2)%e];return eE((n-r/e)*e,i,o,a,u)}});var eT=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,eI=RegExp(eT.source,"g");function eH(t,e){var n,r,i,o,a,u=eT.lastIndex=eI.lastIndex=0,l=-1,s=[],c=[];for(t+="",e+="";(i=eT.exec(t))&&(o=eI.exec(e));)(a=o.index)>u&&(a=e.slice(u,a),s[l]?s[l]+=a:s[++l]=a),(i=i[0])===(o=o[0])?s[l]?s[l]+=o:s[++l]=o:(s[++l]=null,c.push({i:l,x:tU(i,o)})),u=eI.lastIndex;
1return u<e.length&&(a=e.slice(u),s[l]?s[l]+=a:s[++l]=a),s.length<2?c[0]?(n=c[0].x,function(t){return n(t)+""}):(r=e,function(){return r}):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})}function eP(t,e){var n;return("number"==typeof e?tU:e instanceof ec?eN:(n=ec(e))?(e=n,eN):eH)(t,e)}var eL=tl.prototype.constructor;function eB(t){return function(){this.style.removeProperty(t)}}var ej=0;function eV(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}var eO=tl.prototype;eV.prototype=(function(t){return tl().transition(t)}).prototype={constructor:eV,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=M(t));for(var r=this._groups,i=r.length,o=Array(i),a=0;a<i;++a)for(var u,l,s=r[a],c=s.length,h=o[a]=Array(c),f=0;f<c;++f)(u=s[f])&&(l=t.call(u,u.__data__,f,s))&&("__data__"in u&&(l.__data__=u.__data__),h[f]=l,tY(h[f],e,n,f,h,tW(u,n)));return new eV(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=A(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var l,s=r[u],c=s.length,h=0;h<c;++h)if(l=s[h]){for(var f,d=t.call(l,l.__data__,h,s),p=tW(l,n),y=0,g=d.length;y<g;++y)(f=d[y])&&tY(f,e,n,y,d,p);o.push(d),a.push(l)}return new eV(o,a,e,n)},selectChild:eO.selectChild,selectChildren:eO.selectChildren,filter:function(t){"function"!=typeof t&&(t=E(t));for(var e=this._groups,n=e.length,r=Array(n),i=0;i<n;++i)for(var o,a=e[i],u=a.length,l=r[i]=[],s=0;s<u;++s)(o=a[s])&&t.call(o,o.__data__,s,a)&&l.push(o);return new eV(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw Error();for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=Array(r),u=0;u<o;++u)for(var l,s=e[u],c=n[u],h=s.length,f=a[u]=Array(h),d=0;d<h;++d)(l=s[d]||c[d])&&(f[d]=l);for(;u<r;++u)a[u]=e[u];return new eV(a,this._parents,this._name,this._id)},selection:function(){return new eL(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=++ej,r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],l=u.length,s=0;s<l;++s)if(a=u[s]){var c=tW(a,e);tY(a,t,n,s,u,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new eV(r,this._parents,t,n)},call:eO.call,nodes:eO.nodes,node:eO.node,size:eO.size,empty:eO.empty,each:eO.each,on:function(t,e){var n,r,i,o,a,u,l=this._id;return arguments.length<2?tW(this.node(),l).on.on(t):this.each((n=l,r=t,i=e,u=(r+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})?tF:tK,function(){var t=u(this,n),e=t.on;e!==o&&(a=(o=e).copy()).on(r,i),t.on=a}))},attr:function(t,e){var n=C(t),r="transform"===n?t2:eP;return this.attrTween(t,"function"==typeof e?(n.local?function(t,e,n){var r,i,o;return function(){var a,u,l=n(this);return null==l?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local))===(u=l+"")?null:a===r&&u===i?o:(i=u,o=e(r=a,l))}}:function(t,e,n){var r,i,o;return function(){var a,u,l=n(this);return null==l?void this.removeAttribute(t):(a=this.getAttribute(t))===(u=l+"")?null:a===r&&u===i?o:(i=u,o=e(r=a,l))}})(n,r,t5(this,"attr."+t,e)):null==e?(n.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(n):(n.local?function(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}:function(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}})(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw Error();var r=C(t);return this.tween(n,(r.local?function(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(e){this.setAttributeNS(t.space,t.local,i.call(this,e))}),n}return i._value=e,i}:function(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(e){this.setAttribute(t,i.call(this,e))}),n}return i._value=e,i})(r,e))},style:function(t,e,n){var r,i,o,a,u,l,s,c,h,f,d,p,y,g,m,v,x,w,_,b,M,k="transform"==(t+="")?t1:eP;return null==e?this.styleTween(t,(r=t,function(){var t=D(this,r),e=(this.style.removeProperty(r),D(this,r));return t===e?null:t===i&&e===o?a:a=k(i=t,o=e)})).on("end.style."+t,eB(t)):"function"==typeof e?this.styleTween(t,(u=t,l=t5(this,"style."+t,e),function(){var t=D(this,u),e=l(this),n=e+"";return null==e&&(this.style.removeProperty(u),n=e=D(this,u)),t===n?null:t===s&&n===c?h:(c=n,h=k(s=t,e))})).each((f=this._id,x="end."+(v="style."+(d=t)),function(){var t=tK(this,f),e=t.on,n=null==t.value[v]?m||(m=eB(d)):void 0;(e!==p||g!==n)&&(y=(p=e).copy()).on(x,g=n),t.on=y})):this.styleTween(t,(w=t,M=e+"",function(){var t=D(this,w);return t===M?null:t===_?b:b=k(_=t,e)}),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw Error();return this.tween(r,function(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(e){this.style.setProperty(t,o.call(this,e),n)}),r}return o._value=e,o}(t,e,null==n?"":n))},text:function(t){var e,n;return this.tween("text","function"==typeof t?(e=t5(this,"text",t),function(){var t=e(this);this.textContent=null==t?"":t}):(n=null==t?"":t+"",function(){this.textContent=n}))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw Error();return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){this.textContent=r.call(this,t)}),e}return r._value=t,r}(t))},remove:function(){var t;return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=tW(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?function(t,e){var n,r;return function(){var i=tK(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,u=r.length;a<u;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}}i.tween=r}}:function(t,e,n){var r,i;if("function"!=typeof n)throw Error();return function(){var o=tK(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:e,value:n},l=0,s=i.length;l<s;++l)if(i[l].name===e){i[l]=u;break}l===s&&i.push(u)}o.tween=i}})(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){tF(this,t).delay=+e.apply(this,arguments)}}:function(t,e){return e*=1,function(){tF(this,t).delay=e}})(e,t)):tW(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){tK(this,t).duration=+e.apply(this,arguments)}}:function(t,e){return e*=1,function(){tK(this,t).duration=e}})(e,t)):tW(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw Error();return function(){tK(this,t).ease=e}}(e,t)):tW(this.node(),e).ease},easeVarying:function(t){var e;if("function"!=typeof t)throw Error();return this.each((e=this._id,function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw Error();tK(this,e).ease=n}))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var u={value:a},l={value:function(){0==--i&&o()}};n.each(function(){var n=tK(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(u),e._.interrupt.push(u),e._.end.push(l)),n.on=e}),0===i&&o()})},[Symbol.iterator]:eO[Symbol.iterator]};var eC={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};tl.prototype.interrupt=function(t){return this.each(function(){tZ(this,t)})},tl.prototype.transition=function(t){var e,n;t instanceof eV?(e=t._id,t=t._name):(e=++ej,(n=eC).time=tL(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;
1++o)for(var a,u=r[o],l=u.length,s=0;s<l;++s)(a=u[s])&&tY(a,t,e,s,u,n||function(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw Error(`transition ${e} not found`);return n}(a,e));return new eV(r,this._parents,t,e)};let eq=t=>()=>t;function eD(t,e){let{sourceEvent:n,target:r,transform:i,dispatch:o}=e;Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function eX(t,e,n){this.k=t,this.x=e,this.y=n}eX.prototype={constructor:eX,scale:function(t){return 1===t?this:new eX(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new eX(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var eR=new eX(1,0,0);function eY(t){for(;!t.__zoom;)if(!(t=t.parentNode))return eR;return t.__zoom}function eF(t){t.stopImmediatePropagation()}function eK(t){t.preventDefault(),t.stopImmediatePropagation()}function eW(t){return(!t.ctrlKey||"wheel"===t.type)&&!t.button}function eZ(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function eU(){return this.__zoom||eR}function eQ(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function eG(){return navigator.maxTouchPoints||"ontouchstart"in this}function eJ(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function e0(){var t,e,n,r=eW,i=eZ,o=eJ,a=eQ,u=eG,l=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],c=250,h=tk,f=x("start","zoom","end"),d=0,p=10;function y(t){t.property("__zoom",eU).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",k).on("dblclick.zoom",A).filter(u).on("touchstart.zoom",E).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new eX(e,t.x,t.y)}function m(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new eX(t.k,r,i)}function v(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function w(t,e,n,r){t.on("start.zoom",function(){_(this,arguments).event(r).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(r).end()}).tween("zoom",function(){var t=arguments,o=_(this,t).event(r),a=i.apply(this,t),u=null==n?v(a):"function"==typeof n?n.apply(this,t):n,l=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),s=this.__zoom,c="function"==typeof e?e.apply(this,t):e,f=h(s.invert(u).concat(l/s.k),c.invert(u).concat(l/c.k));return function(t){if(1===t)t=c;else{var e=f(t),n=l/e[2];t=new eX(n,u[0]-e[0]*n,u[1]-e[1]*n)}o.zoom(null,t)}})}function _(t,e,n){return!n&&t.__zooming||new b(t,e)}function b(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=i.apply(t,e),this.taps=0}function M(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];if(r.apply(this,arguments)){var u=_(this,n).event(t),c=this.__zoom,h=Math.max(l[0],Math.min(l[1],c.k*Math.pow(2,a.apply(this,arguments)))),f=tc(t);if(u.wheel)(u.mouse[0][0]!==f[0]||u.mouse[0][1]!==f[1])&&(u.mouse[1]=c.invert(u.mouse[0]=f)),clearTimeout(u.wheel);else{if(c.k===h)return;u.mouse=[f,c.invert(f)],tZ(this),u.start()}eK(t),u.wheel=setTimeout(function(){u.wheel=null,u.end()}
vendor: 4,107 bytes, line 1
1,150),u.zoom("mouse",o(m(g(c,h),u.mouse[0],u.mouse[1]),u.extent,s))}}function k(t){for(var e=arguments.length,i=Array(e>1?e-1:0),a=1;a<e;a++)i[a-1]=arguments[a];if(!n&&r.apply(this,arguments)){var u=t.currentTarget,l=_(this,i,!0).event(t),c=ts(t.view).on("mousemove.zoom",function(t){if(eK(t),!l.moved){var e=t.clientX-f,n=t.clientY-p;l.moved=e*e+n*n>d}l.event(t).zoom("mouse",o(m(l.that.__zoom,l.mouse[0]=tc(t,u),l.mouse[1]),l.extent,s))},!0).on("mouseup.zoom",function(t){c.on("mousemove.zoom mouseup.zoom",null),tg(t.view,l.moved),eK(t),l.event(t).end()},!0),h=tc(t,u),f=t.clientX,p=t.clientY;ty(t.view),eF(t),l.mouse=[h,this.__zoom.invert(h)],tZ(this),l.start()}}function A(t){for(var e=arguments.length,n=Array(e>1?e-1:0),a=1;a<e;a++)n[a-1]=arguments[a];if(r.apply(this,arguments)){var u=this.__zoom,l=tc(t.changedTouches?t.changedTouches[0]:t,this),h=u.invert(l),f=u.k*(t.shiftKey?.5:2),d=o(m(g(u,f),l,h),i.apply(this,n),s);eK(t),c>0?ts(this).transition().duration(c).call(w,d,l,t):ts(this).call(y.transform,d,l,t)}}function E(n){for(var i=arguments.length,o=Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];if(r.apply(this,arguments)){var u,l,s,c,h=n.touches,f=h.length,d=_(this,o,n.changedTouches.length===f).event(n);for(eF(n),l=0;l<f;++l)c=[c=tc(s=h[l],this),this.__zoom.invert(c),s.identifier],d.touch0?d.touch1||d.touch0[2]===c[2]||(d.touch1=c,d.taps=0):(d.touch0=c,u=!0,d.taps=1+!!t);t&&(t=clearTimeout(t)),u&&(d.taps<2&&(e=c[0],t=setTimeout(function(){t=null},500)),tZ(this),d.start())}}function $(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(this.__zooming){var i,a,u,l,c=_(this,n).event(t),h=t.changedTouches,f=h.length;for(eK(t),i=0;i<f;++i)u=tc(a=h[i],this),c.touch0&&c.touch0[2]===a.identifier?c.touch0[0]=u:c.touch1&&c.touch1[2]===a.identifier&&(c.touch1[0]=u);if(a=c.that.__zoom,c.touch1){var d=c.touch0[0],p=c.touch0[1],y=c.touch1[0],v=c.touch1[1],x=(x=y[0]-d[0])*x+(x=y[1]-d[1])*x,w=(w=v[0]-p[0])*w+(w=v[1]-p[1])*w;a=g(a,Math.sqrt(x/w)),u=[(d[0]+y[0])/2,(d[1]+y[1])/2],l=[(p[0]+v[0])/2,(p[1]+v[1])/2]}else{if(!c.touch0)return;u=c.touch0[0],l=c.touch0[1]}c.zoom("touch",o(m(a,u,l),c.extent,s))}}function z(t){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];if(this.__zooming){var a,u,l=_(this,i).event(t),s=t.changedTouches,c=s.length;for(eF(t),n&&clearTimeout(n),n=setTimeout(function(){n=null},500),a=0;a<c;++a)u=s[a],l.touch0&&l.touch0[2]===u.identifier?delete l.touch0:l.touch1&&l.touch1[2]===u.identifier&&delete l.touch1;if(l.touch1&&!l.touch0&&(l.touch0=l.touch1,delete l.touch1),l.touch0)l.touch0[1]=this.__zoom.invert(l.touch0[0]);else if(l.end(),2===l.taps&&(u=tc(u,this),Math.hypot(e[0]-u[0],e[1]-u[1])<p)){var h=ts(this).on("dblclick.zoom");h&&h.apply(this,arguments)}}}return y.transform=function(t,e,n,r){var i=t.selection?t.selection():t;i.property("__zoom",eU),t!==i?w(t,e,n,r):i.interrupt().each(function(){_(this,arguments).event(r).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()})},y.scaleBy=function(t,e,n,r){y.scaleTo(t,function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n},n,r)},y.scaleTo=function(t,e,n,r){y.transform(t,function(){var t=i.apply(this,arguments),r=this.__zoom,a=null==n?v(t):"function"==typeof n?n.apply(this,arguments):n,u=r.invert(a),l="function"==typeof e?e.apply(this,arguments):e;return o(m(g(r,l),a,u),t,s)},n,r)},y.translateBy=function(t,e,n,r){y.transform(t,function(){return o(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),i.apply(this,arguments),s)},null,r)},y.translateTo=function(t,e,n,r,a){y.transform(t,function(){var t=i.apply(this,arguments),a=this.__zoom,u=null==r?v(t):"function"==typeof r?r.apply(this,arguments):r;return o(eR.translate(u[0],u[1]).scale(a.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,s)},r,a)},b.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit
1("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=ts(this.that).datum();f.call(t,this.that,new eD(t,{sourceEvent:this.sourceEvent,target:y,type:t,transform:this.that.__zoom,dispatch:f}),e)}},y.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:eq(+t),y):a},y.filter=function(t){return arguments.length?(r="function"==typeof t?t:eq(!!t),y):r},y.touchable=function(t){return arguments.length?(u="function"==typeof t?t:eq(!!t),y):u},y.extent=function(t){return arguments.length?(i="function"==typeof t?t:eq([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),y):i},y.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],y):[l[0],l[1]]},y.translateExtent=function(t){return arguments.length?(s[0][0]=+t[0][0],s[1][0]=+t[1][0],s[0][1]=+t[0][1],s[1][1]=+t[1][1],y):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},y.constrain=function(t){return arguments.length?(o=t,y):o},y.duration=function(t){return arguments.length?(c=+t,y):c},y.interpolate=function(t){return arguments.length?(h=t,y):h},y.on=function(){var t=f.on.apply(f,arguments);return t===f?y:t},y.clickDistance=function(t){return arguments.length?(d=(t*=1)*t,y):Math.sqrt(d)},y.tapDistance=function(t){return arguments.length?(p=+t,y):p},y}function e1(t,e){var n,r,i=typeof e;return null==e||"boolean"===i?e$(e):("number"===i?tU:"string"===i?(r=ec(e))?(e=r,eN):eH:e instanceof ec?eN:e instanceof Date?function(t,e){var n=new Date;return t*=1,e*=1,function(r){return n.setTime(t*(1-r)+e*r),n}}:!ArrayBuffer.isView(n=e)||n instanceof DataView?Array.isArray(e)?function(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=Array(i),a=Array(r);for(n=0;n<i;++n)o[n]=e1(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return function(t){for(n=0;n<i;++n)a[n]=o[n](t);return a}}:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?function(t,e){var n,r={},i={};for(n in(null===t||"object"!=typeof t)&&(t={}),(null===e||"object"!=typeof e)&&(e={}),e)n in t?r[n]=e1(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}:tU:function(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}})(t,e)}eY.prototype=eX.prototype;let e2={error001:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"react";return`Seems like you have not used ${"svelte"===t?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${t}flow.dev/error#001`},error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:t=>`Node type "${t}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,e)=>{let{id:n,sourceHandle:r,targetHandle:i}=e;return`Couldn't create edge for ${t} handle id: "${"source"===t?r:i}", edge id: ${n}.`},error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"react";return`It seems that you haven't loaded the styles. Please import '@xyflow/${t}/dist/style.css' or base.css to make sure everything is working properly.`},error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:t=>`Edge with id "${t}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},e5=[[-1/0,-1/0],[1/0,1/0]],e3=["Enter"," ","Escape"],e4={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":t=>{let{direction:e,x:n,y:r}=t;return`Moved selected node ${e}. New position, x: ${n}, y: ${r}`},"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};(r=h||(h={})).Strict="strict",r.Loose="loose",(i=f||(f={})).Free="free",i.Vertical="vertical",i.Horizontal="horizontal",(o=d||(d={}
1)).Partial="partial",o.Full="full";let e6={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};(a=p||(p={})).Bezier="default",a.Straight="straight",a.Step="step",a.SmoothStep="smoothstep",a.SimpleBezier="simplebezier",(u=y||(y={})).Arrow="arrow",u.ArrowClosed="arrowclosed",(l=g||(g={})).Left="left",l.Top="top",l.Right="right",l.Bottom="bottom";let e8={[g.Left]:g.Right,[g.Right]:g.Left,[g.Top]:g.Bottom,[g.Bottom]:g.Top};function e9(t){return null===t?null:t?"valid":"invalid"}let e7=t=>"id"in t&&"source"in t&&"target"in t,nt=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),ne=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),nn=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0],{width:n,height:r}=nI(t),i=t.origin??e,o=n*i[0],a=r*i[1];return{x:t.position.x-o,y:t.position.y-a}},nr=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{nodeOrigin:[0,0]};return 0===t.length?{x:0,y:0,width:0,height:0}:ng(t.reduce((t,n)=>{let r="string"==typeof n,i=e.nodeLookup||r?void 0:n;return e.nodeLookup&&(i=r?e.nodeLookup.get(n):ne(n)?n:e.nodeLookup.get(n.id)),np(t,i?nv(i,e.nodeOrigin):{x:0,y:0,x2:0,y2:0})},{x:1/0,y:1/0,x2:-1/0,y2:-1/0}))},ni=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return t.forEach(t=>{(void 0===e.filter||e.filter(t))&&(n=np(n,nv(t)),r=!0)}),r?ng(n):{x:0,y:0,width:0,height:0}},no=function(t,e){let[n,r,i]=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0,1],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],u=(e.x-n)/i,l=(e.y-r)/i,s=e.width/i,c=e.height/i,h=[];for(let e of t.values()){let{measured:t,selectable:n=!0,hidden:r=!1}=e;if(a&&!n||r)continue;let i=t.width??e.width??e.initialWidth??0,f=t.height??e.height??e.initialHeight??0,{x:d,y:p}=e.internals.positionAbsolute,y=nw(u,l,s,c,d,p,i,f),g=i*f,m=o&&y>0;(!e.internals.handleBounds||m||y>=g||e.dragging)&&h.push(e)}return h};async function na(t,e){let n,r,{nodes:i,width:o,height:a,panZoom:u,minZoom:l,maxZoom:s}=t;if(0===i.size)return!0;let c=nN(ni((n=new Map,r=e?.nodes?new Set(e.nodes.map(t=>t.id)):null,i.forEach(t=>{t.measured.width&&t.measured.height&&(e?.includeHiddenNodes||!t.hidden)&&(!r||r.has(t.id))&&n.set(t.id,t)}),n)),o,a,e?.minZoom??l,e?.maxZoom??s,e?.padding??.1);return await u.setViewport(c,{duration:e?.duration,ease:e?.ease,interpolate:e?.interpolate}),!0}function nu(t){let{nodeId:e,nextPosition:n,nodeLookup:r,nodeOrigin:i=[0,0],nodeExtent:o,onError:a}=t,u=r.get(e),l=u.parentId?r.get(u.parentId):void 0,{x:s,y:c}=l?l.internals.positionAbsolute:{x:0,y:0},h=u.origin??i,f=u.extent||o;if("parent"!==u.extent||u.expandParent)l&&nT(u.extent)&&(f=[[u.extent[0][0]+s,u.extent[0][1]+c],[u.extent[1][0]+s,u.extent[1][1]+c]]);else if(l){let t=l.measured.width,e=l.measured.height;t&&e&&(f=[[s,c],[s+t,c+e]])}else a?.("005",e2.error005());let d=nT(f)?nc(n,f,u.measured):n;return(void 0===u.measured.width||void 0===u.measured.height)&&a?.("015",e2.error015()),{position:{x:d.x-s+(u.measured.width??0)*h[0],y:d.y-c+(u.measured.height??0)*h[1]},positionAbsolute:d}}async function nl(t){let e,{nodesToRemove:n=[],edgesToRemove:r=[],nodes:i,edges:o,onBeforeDelete:a}=t,u=new Set(n.map(t=>t.id)),l=[];for(let t of i){if(!1===t.deletable)continue;let e=u.has(t.id),n=!e&&t.parentId&&l.find(e=>e.id===t.parentId);(e||n)&&l.push(t)}let s=new Set(r.map(t=>t.id)),c=o.filter(t=>!1!==t.deletable),h=(e=new Set,l.forEach(t=>{e.add(t.id)}),c.filter(t=>e.has(t.source)||e.has(t.target)));for(let t of c)s.has(t.id)&&!h.find(e=>e.id===t.id)&&h.push(t);if(!a)return{edges:h,nodes:l};let f=await a({nodes:l,edges:h});return"boolean"==typeof f?f?{edges:h,nodes:l}:{edges:[],nodes:[]}:f}let ns=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)},nc=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0},e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return{x:ns(t.x,e[0][0],e[1][0]-(n?.width??0)),y:ns(t.y,e[0][1],e[1][1]-(n?.height??0))}};function nh(t,e,n){let{width:r,height:i}=nI(n),{x:o,y:a}=n.internals.positionAbsolute;return nc(t,[[o,a],[o+r,a+i]],e)}let nf=(t,e,n)=>t<e?ns(Math.abs(t-e),1,e)/e:t>n?-ns(Math.abs(t-n),1,e)/e:0,nd=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:15,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:40;return[nf(t.x,r,e.width-r)*n,nf(t.y,r,e.height-r)*n]},np=(t,e)=>({x:Math.min(t.x,e.x),y:Math.min(t.y,e.y),x2:Math.max(t.x2,e.x2),y2:Math.max(t.y2,e.y2)}),ny=t=>{let{x:e,y:n,width:r,height:i}=t;return{x:e,y:n,x2:e+r,y2:n+i}},ng=t=>{let{x:e,y:n,x2:r,y2:i}=t;return{x:e,y:n,width:r-e,height:i-n}},nm=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0],{x:n,y:r}=ne(t)?t.internals.positionAbsolute:nn(t,e);return{x:n,y:r,width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}},nv=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0],{x:n,y:r}=ne(t)?t.internals.positionAbsolute:nn(t,e);return{x:n,y:r,x2:n+(t.measured?.width??t.width??t.initialWidth??0),y2:r+(t.measured?.height??t.height??t.initialHeight??0)}},nx=(t,e)=>ng(np(ny(t),ny(e))),nw=(t,e,n,r,i,o,a,u)=>Math.ceil(Math.max(0,Math.min(t+n,i+a)-Math.max(t,i))*Math.max(0,Math.min(e+r,o+u)-Math.max(e,o))),n_=(t,e)=>nw(t.x,t.y,t.width,t.height,e.x,e.y,e.width,e.height),nb=t=>nM(t.width)&&nM(t.height)&&nM(t.x)&&nM(t.y),nM=t=>!isNaN(t)&&isFinite(t),nk=(t,e)=>(t,e)=>{},nA=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[1,1];return{x:e[0]*Math.round(t.x/e[0]),y:e[1]*Math.round(t.y/e[1])}},nE=function(t,e){let{x:n,y:r}
1=t,[i,o,a]=e,u=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[1,1],s={x:(n-i)/a,y:(r-o)/a};return u?nA(s,l):s},n$=(t,e)=>{let{x:n,y:r}=t,[i,o,a]=e;return{x:n*a+i,y:r*a+o}};function nz(t,e){if("number"==typeof t)return Math.floor((e-e/(1+t))*.5);if("string"==typeof t&&t.endsWith("px")){let e=parseFloat(t);if(!Number.isNaN(e))return Math.floor(e)}if("string"==typeof t&&t.endsWith("%")){let n=parseFloat(t);if(!Number.isNaN(n))return Math.floor(e*n*.01)}return console.error(`The padding value "${t}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}let nN=(t,e,n,r,i,o)=>{let a=function(t,e,n){if("string"==typeof t||"number"==typeof t){let r=nz(t,n),i=nz(t,e);return{top:r,right:i,bottom:r,left:i,x:2*i,y:2*r}}if("object"==typeof t){let r=nz(t.top??t.y??0,n),i=nz(t.bottom??t.y??0,n),o=nz(t.left??t.x??0,e),a=nz(t.right??t.x??0,e);return{top:r,right:a,bottom:i,left:o,x:o+a,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}(o,e,n),u=ns(Math.min((e-a.x)/t.width,(n-a.y)/t.height),r,i),l=t.x+t.width/2,s=t.y+t.height/2,c=e/2-l*u,h=n/2-s*u,f=function(t,e,n,r,i,o){let{x:a,y:u}=n$(t,[e,n,r]),{x:l,y:s}=n$({x:t.x+t.width,y:t.y+t.height},[e,n,r]);return{left:Math.floor(a),top:Math.floor(u),right:Math.floor(i-l),bottom:Math.floor(o-s)}}(t,c,h,u,e,n),d={left:Math.min(f.left-a.left,0),top:Math.min(f.top-a.top,0),right:Math.min(f.right-a.right,0),bottom:Math.min(f.bottom-a.bottom,0)};return{x:c-d.left+d.right,y:h-d.top+d.bottom,zoom:u}},nS=()=>"undefined"!=typeof navigator&&navigator?.userAgent?.indexOf("Mac")>=0;function nT(t){return null!=t&&"parent"!==t}function nI(t){return{width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}}function nH(t){return(t.measured?.width??t.width??t.initialWidth)!==void 0&&(t.measured?.height??t.height??t.initialHeight)!==void 0}function nP(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{width:0,height:0},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,o={...t},a=r.get(n);if(a){let t=a.origin||i;o.x+=a.internals.positionAbsolute.x-(e.width??0)*t[0],o.y+=a.internals.positionAbsolute.y-(e.height??0)*t[1]}return o}function nL(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function nB(){let t,e;return{promise:new Promise((n,r)=>{t=n,e=r}),resolve:t,reject:e}}function nj(t){return{...e4,...t||{}}}function nV(t,e){let{snapGrid:n=[0,0],snapToGrid:r=!1,transform:i,containerBounds:o}=e,{x:a,y:u}=nR(t),l=nE({x:a-(o?.left??0),y:u-(o?.top??0)},i),{x:s,y:c}=r?nA(l,n):l;return{xSnapped:s,ySnapped:c,...l}}let nO=t=>({width:t.offsetWidth,height:t.offsetHeight}),nC=t=>t?.getRootNode?.()||window?.document,nq=["INPUT","SELECT","TEXTAREA"];function nD(t){let e=t.composedPath?.()?.[0]||t.target;return e?.nodeType===1&&(nq.includes(e.nodeName)||e.hasAttribute("contenteditable")||!!e.closest(".nokey"))}let nX=t=>"clientX"in t,nR=(t,e)=>{let n=nX(t),r=n?t.clientX:t.touches?.[0].clientX,i=n?t.clientY:t.touches?.[0].clientY;return{x:r-(e?.left??0),y:i-(e?.top??0)}},nY=(t,e,n,r,i)=>{let o=e.querySelectorAll(`.${t}`);return o&&o.length?Array.from(o).map(e=>{let o=e.getBoundingClientRect();return{id:e.getAttribute("data-handleid"),type:t,nodeId:i,position:e.getAttribute("data-handlepos"),x:(o.left-n.left)/r,y:(o.top-n.top)/r,...nO(e)}}):null};function nF(t){let{sourceX:e,sourceY:n,targetX:r,targetY:i,sourceControlX:o,sourceControlY:a,targetControlX:u,targetControlY:l}=t,s=.125*e+.375*o+.375*u+.125*r,c=.125*n+.375*a+.375*l+.125*i,h=Math.abs(s-e),f=Math.abs(c-n);return[s,c,h,f]}function nK(t,e){return t>=0?.5*t:25*e*Math.sqrt(-t)}function nW(t){let{pos:e,x1:n,y1:r,x2:i,y2:o,c:a}=t;switch(e){case g.Left:return[n-nK(n-i,a),r];case g.Right:return[n+nK(i-n,a),r];case g.Top:return[n,r-nK(r-o,a)];case g.Bottom:return[n,r+nK(o-r,a)]}}function nZ(t){let{sourceX:e,sourceY:n,sourcePosition:r=g.Bottom,targetX:i,targetY:o,targetPosition:a=g.Top,curvature:u=.25}=t,[l,s]=nW({pos:r,x1:e,y1:n,x2:i,y2:o,c:u}),[c,h]=nW({pos:a,x1:i,y1:o,x2:e,y2:n,c:u}),[f,d,p,y]=nF({sourceX:e,sourceY:n,targetX:i,targetY:o,sourceControlX:l,sourceControlY:s,targetControlX:c,targetControlY:h});return[`M${e},${n} C${l},${s} ${c},${h} ${i},${o}`,f,d,p,y]}function nU(t){let{sourceX:e,sourceY:n,targetX:r,targetY:i}=t,o=Math.abs(r-e)/2,a=Math.abs(i-n)/2;return[r<e?r+o:r-o,i<n?i+a:i-a,o,a]}function nQ(t){let{sourceNode:e,targetNode:n,selected:r=!1,zIndex:i=0,elevateOnSelect:o=!1,zIndexMode:a="basic"}=t;if("manual"===a)return i;let u=Math.max(e.parentId||o&&e.selected?e.internals.z:0,n.parentId||o&&n.selected?n.internals.z:0);return(o&&r?i+1e3:i)+u}function nG(t){let{sourceNode:e,targetNode:n,width:r,height:i,transform:o}=t,a=np(nv(e),nv(n));return a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1),n_({x:-o[0]/o[2],y:-o[1]/o[2],width:r/o[2],height:i/o[2]},ng(a))>0}let nJ=t=>{let{source:e,sourceHandle:n,target:r,targetHandle:i}=t;return`xy-edge__${e}${n||""}-${r}${i||""}`},n0=function(t,e){let n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t.source||!t.target)return i.onError?.("006",e2.error006()),e;let o=i.getEdgeId||nJ;return(n=r=e7(t)?{...t}:{...t,id:o(t)},e.some(t=>t.source===n.source&&t.target===n.target&&(t.sourceHandle===n.sourceHandle||!t.sourceHandle&&!n.sourceHandle)&&(t.targetHandle===n.targetHandle||!t.targetHandle&&!n.targetHandle)))?e:(null===r.sourceHandle&&delete r.sourceHandle,null===r.targetHandle&&delete r.targetHandle,e.concat(r))};function n1(t){let{sourceX:e,sourceY:n,targetX:r,targetY:i}=t,[o,a,u,l]=nU({sourceX:e,sourceY:n,targetX:r,targetY:i});return[`M ${e},${n}L ${r},${i}`,o,a,u,l]}let n2={[g.Left]:{x:-1,y:0},[g.Right]:{x:1,y:0},[g.Top]:{x:0,y:-1},[g.Bottom]:{x:0,y:1}},n5=(t,e)=>Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2));function n3(t){let{sourceX:e,sourceY:n,sourcePosition:r=g.Bottom,targetX:i,targetY:o,targetPosition:a=g.Top,borderRadius:u=5,centerX:l,centerY:s,offset:c=20,stepPosition:h=.5}=t,[f,d,p,y,m]=function(t){let e,n,{source:r,sourcePosition:i=g.Bottom,target:o,targetPosition:a=g.Top,center:u,offset:l,stepPosition:s}=t,c=n2[i],h=n2[a],f={x:r.x+c.x*l,y:r.y+c.y*l},d={x:o.x+h.x*l,y:o.y+h.y*l},p=(t=>{let{source:e,sourcePosition:n=g.Bottom,target:r}=t;return n===g.Left||n===g.Right?e.x<r.x?{x:1,y:0}:{x:-1,y:0}:e.y<r.y?{x:0,y:1}:{x:0,y:-1}})({source:f,sourcePosition:i,target:d}),y=0!==p.x?"x":"y",m=p[y],v=[],x={x:0,y:0},w={x:0,y:0},[,,_,b]=nU({sourceX:r.x,sourceY:r.y,targetX:o.x,targetY:o.y});if(c[y]*h[y]==-1){"x"===y?(e=u.x??f.x+(d.x-f.x)*s,n=u.y??(f.y+d.y)/2):(e=u.x??(f.x+d.x)/2,n=u.y??f.y+(d.y-f.y)*s);let t=[{x:e,y:f.y},{x:e,y:d.y}],r=[{x:f.x,y:n},{x:d.x,y:n}];v=c[y]===m?"x"===y?t:r:"x"===y?r:t}else{let t=[{x:f.x,y:d.y}],u=[{x:d.x,y:f.y}];if(v="x"===y?c.x===m?u:t:c.y===m?t:u,i===a){let t=Math.abs(r[y]-o[y]);if(t<=l){let e=Math.min(l-1,l-t);c[y]===m?x[y]=(f[y]>r[y]?-1:1)*e:w[y]=(d[y]>o[y]?-1:1)*e}}if(i!==a){let e="x"===y?"y":"x",n=c[y]===h[e],r=f[e]>
1d[e],i=f[e]<d[e];(1===c[y]&&(!n&&r||n&&i)||1!==c[y]&&(!n&&i||n&&r))&&(v="x"===y?t:u)}let s={x:f.x+x.x,y:f.y+x.y},p={x:d.x+w.x,y:d.y+w.y};Math.max(Math.abs(s.x-v[0].x),Math.abs(p.x-v[0].x))>=Math.max(Math.abs(s.y-v[0].y),Math.abs(p.y-v[0].y))?(e=(s.x+p.x)/2,n=v[0].y):(e=v[0].x,n=(s.y+p.y)/2)}let M={x:f.x+x.x,y:f.y+x.y},k={x:d.x+w.x,y:d.y+w.y};return[[r,...M.x!==v[0].x||M.y!==v[0].y?[M]:[],...v,...k.x!==v[v.length-1].x||k.y!==v[v.length-1].y?[k]:[],o],e,n,_,b]}({source:{x:e,y:n},sourcePosition:r,target:{x:i,y:o},targetPosition:a,center:{x:l,y:s},offset:c,stepPosition:h}),v=`M${f[0].x} ${f[0].y}`;for(let t=1;t<f.length-1;t++)v+=function(t,e,n,r){let i=Math.min(n5(t,e)/2,n5(e,n)/2,r),{x:o,y:a}=e;if(t.x===o&&o===n.x||t.y===a&&a===n.y)return`L${o} ${a}`;if(t.y===a){let e=t.x<n.x?-1:1,r=t.y<n.y?1:-1;return`L ${o+i*e},${a}Q ${o},${a} ${o},${a+i*r}`}let u=t.x<n.x?1:-1,l=t.y<n.y?-1:1;return`L ${o},${a+i*l}Q ${o},${a} ${o+i*u},${a}`}(f[t-1],f[t],f[t+1],u);return[v+=`L${f[f.length-1].x} ${f[f.length-1].y}`,d,p,y,m]}function n4(t){return t&&!!(t.internals.handleBounds||t.handles?.length)&&!!(t.measured.width||t.width||t.initialWidth)}function n6(t){let{sourceNode:e,targetNode:n}=t;if(!n4(e)||!n4(n))return null;let r=e.internals.handleBounds||n8(e.handles),i=n.internals.handleBounds||n8(n.handles),o=n7(r?.source??[],t.sourceHandle),a=n7(t.connectionMode===h.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),t.targetHandle);if(!o||!a)return t.onError?.("008",e2.error008(!o?"source":"target",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;let u=o?.position||g.Bottom,l=a?.position||g.Top,s=n9(e,o,u),c=n9(n,a,l);return{sourceX:s.x,sourceY:s.y,targetX:c.x,targetY:c.y,sourcePosition:u,targetPosition:l}}function n8(t){if(!t)return null;let e=[],n=[];for(let r of t)r.width=r.width??1,r.height=r.height??1,"source"===r.type?e.push(r):"target"===r.type&&n.push(r);return{source:e,target:n}}function n9(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g.Left,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=(e?.x??0)+t.internals.positionAbsolute.x,o=(e?.y??0)+t.internals.positionAbsolute.y,{width:a,height:u}=e??nI(t);if(r)return{x:i+a/2,y:o+u/2};switch(e?.position??n){case g.Top:return{x:i+a/2,y:o};case g.Right:return{x:i+a,y:o+u/2};case g.Bottom:return{x:i+a/2,y:o+u};case g.Left:return{x:i,y:o+u/2}}}function n7(t,e){return t&&(e?t.find(t=>t.id===e):t[0])||null}function rt(t,e){if(!t)return"";if("string"==typeof t)return t;let n=e?`${e}__`:"";return`${n}${Object.keys(t).sort().map(e=>`${e}=${t[e]}`).join("&")}`}function re(t,e){let{id:n,defaultColor:r,defaultMarkerStart:i,defaultMarkerEnd:o}=e,a=new Set;return t.reduce((t,e)=>([e.markerStart||i,e.markerEnd||o].forEach(e=>{if(e&&"object"==typeof e){let i=rt(e,n);a.has(i)||(t.push({id:i,color:e.color||r,...e}),a.add(i))}}),t),[]).sort((t,e)=>t.id.localeCompare(e.id))}function rn(t,e,n,r,i){let o=.5;"start"===i?o=0:"end"===i&&(o=1);let a=[(t.x+t.width*o)*e.zoom+e.x,t.y*e.zoom+e.y-r],u=[-100*o,-100];switch(n){case g.Right:a=[(t.x+t.width)*e.zoom+e.x+r,(t.y+t.height*o)*e.zoom+e.y],u=[0,-100*o];break;case g.Bottom:a[1]=(t.y+t.height)*e.zoom+e.y+r,u[1]=0;break;case g.Left:a=[t.x*e.zoom+e.x-r,(t.y+t.height*o)*e.zoom+e.y],u=[-100,-100*o]}return`translate(${a[0]}px, ${a[1]}px) translate(${u[0]}%, ${u[1]}%)`}let rr={nodeOrigin:[0,0],nodeExtent:e5,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},ri={...rr,checkEquality:!0};function ro(t,e){let n={...t};for(let t in e)void 0!==e[t]&&(n[t]=e[t]);return n}function ra(t,e,n){let r=ro(rr,n);for(let n of t.values())if(n.parentId)rs(n,t,e,r);else{let t=nc(nn(n,r.nodeOrigin),nT(n.extent)?n.extent:r.nodeExtent,nI(n));n.internals.positionAbsolute=t}}function ru(t){return"manual"===t}function rl(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=ro(ri,r),o={i:0},a=new Map(e),u=i?.elevateNodesOnSelect&&!ru(i.zIndexMode)?1e3:0,l=t.length>0,s=!1;for(let c of(e.clear(),n.clear(),t)){let t=a.get(c.id);if(i.checkEquality&&c===t?.internals.userNode)e.set(c.id,t);else{let n=nc(nn(c,i.nodeOrigin),nT(c.extent)?c.extent:i.nodeExtent,nI(c));t={...i.defaults,...c,measured:{width:c.measured?.width,height:c.measured?.height},internals:{positionAbsolute:n,handleBounds:function(t,e){if(!t.handles)return t.measured?e?.internals.handleBounds:void 0;let n=[],r=[];for(let e of t.handles){let i={id:e.id,width:e.width??1,height:e.height??1,nodeId:t.id,x:e.x,y:e.y,position:e.position,type:e.type};"source"===e.type?n.push(i):"target"===e.type&&r.push(i)}return{source:n,target:r}}(c,t),z:rc(c,u,i.zIndexMode),userNode:c}},e.set(c.id,t)}void 0!==t.measured&&void 0!==t.measured.width&&void 0!==t.measured.height||t.hidden||(l=!1),c.parentId&&rs(t,e,n,r,o),s||=c.selected??!1}return{nodesInitialized:l,hasSelectedNodes:s}}function rs(t,e,n,r,i){let{elevateNodesOnSelect:o,nodeOrigin:a,nodeExtent:u,zIndexMode:l}=ro(rr,r),s=t.parentId,c=e.get(s);if(!c)return;!function(t,e){if(!t.parentId)return;let n=e.get(t.parentId);n?n.set(t.id,t):e.set(t.parentId,new Map([[t.id,t]]))}(t,n),i&&!c.parentId&&void 0===c.internals.rootParentIndex&&"auto"===l&&(c.internals.rootParentIndex=++i.i,c.internals.z=c.internals.z+10*i.i),i&&void 0!==c.internals.rootParentIndex&&(i.i=c.internals.rootParentIndex);let{x:h,y:f,z:d}=function(t,e,n,r,i,o){let{x:a,y:u}=e.internals.positionAbsolute,l=nI(t),s=nn(t,n),c=nT(t.extent)?nc(s,t.extent,l):s,h=nc({x:a+c.x,y:u+c.y},r,l);"parent"===t.extent&&(h=nh(h,l,e));let f=rc(t,i,o),d=e.internals.z??0;return{x:h.x,y:h.y,z:d>=f?d+1:f}}(t,c,a,u,o&&!ru(l)?1e3:0,l),{positionAbsolute:p}=t.internals,y=h!==p.x||f!==p.y;
1(y||d!==t.internals.z)&&e.set(t.id,{...t,internals:{...t.internals,positionAbsolute:y?{x:h,y:f}:p,z:d}})}function rc(t,e,n){let r=nM(t.zIndex)?t.zIndex:0;return ru(n)?r:r+(t.selected?e:0)}function rh(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[0,0],i=[],o=new Map;for(let n of t){let t=e.get(n.parentId);if(!t)continue;let r=nx(o.get(n.parentId)?.expandedRect??nm(t),n.rect);o.set(n.parentId,{expandedRect:r,parent:t})}return o.size>0&&o.forEach((e,o)=>{let{expandedRect:a,parent:u}=e,l=u.internals.positionAbsolute,s=nI(u),c=u.origin??r,h=a.x<l.x?Math.round(Math.abs(l.x-a.x)):0,f=a.y<l.y?Math.round(Math.abs(l.y-a.y)):0,d=Math.max(s.width,Math.round(a.width)),p=Math.max(s.height,Math.round(a.height)),y=(d-s.width)*c[0],g=(p-s.height)*c[1];(h>0||f>0||y||g)&&(i.push({id:o,type:"position",position:{x:u.position.x-h+y,y:u.position.y-f+g}}),n.get(o)?.forEach(e=>{t.some(t=>t.id===e.id)||i.push({id:e.id,type:"position",position:{x:e.position.x+h,y:e.position.y+f}})})),(s.width<a.width||s.height<a.height||h||f)&&i.push({id:o,type:"dimensions",setAttributes:!0,dimensions:{width:d+(h?c[0]*h-y:0),height:p+(f?c[1]*f-g:0)}})}),i}function rf(t,e,n,r,i,o,a){let u=r?.querySelector(".xyflow__viewport"),l=!1;if(!u)return{changes:[],updatedInternals:l};let s=[],c=window.getComputedStyle(u),{m22:h}=new window.DOMMatrixReadOnly(c.transform),f=[];for(let r of t.values()){let t=e.get(r.id);if(!t)continue;if(t.hidden){e.set(t.id,{...t,internals:{...t.internals,handleBounds:void 0}}),l=!0;continue}let u=nO(r.nodeElement),c=t.measured.width!==u.width||t.measured.height!==u.height;if(u.width&&u.height&&(c||!t.internals.handleBounds||r.force)){let d=r.nodeElement.getBoundingClientRect(),p=nT(t.extent)?t.extent:o,{positionAbsolute:y}=t.internals;t.parentId&&"parent"===t.extent?y=nh(y,u,e.get(t.parentId)):p&&(y=nc(y,p,u));let g={...t,measured:u,internals:{...t.internals,positionAbsolute:y,handleBounds:{source:nY("source",r.nodeElement,d,h,t.id),target:nY("target",r.nodeElement,d,h,t.id)}}};e.set(t.id,g),t.parentId&&rs(g,e,n,{nodeOrigin:i,zIndexMode:a}),l=!0,c&&(s.push({id:t.id,type:"dimensions",dimensions:u}),t.expandParent&&t.parentId&&f.push({id:t.id,parentId:t.parentId,rect:nm(g,i)}))}}if(f.length>0){let t=rh(f,e,n,i);s.push(...t)}return{changes:s,updatedInternals:l}}async function rd(t){let{delta:e,panZoom:n,transform:r,translateExtent:i,width:o,height:a}=t;if(!n||!e.x&&!e.y)return!1;let u=await n.setViewportConstrained({x:r[0]+e.x,y:r[1]+e.y,zoom:r[2]},[[0,0],[o,a]],i);return!!u&&(u.x!==r[0]||u.y!==r[1]||u.k!==r[2])}function rp(t,e,n,r,i,o){let a=i,u=r.get(a)||new Map;r.set(a,u.set(n,e)),a=`${i}-${t}`;let l=r.get(a)||new Map;if(r.set(a,l.set(n,e)),o){a=`${i}-${t}-${o}`;let u=r.get(a)||new Map;r.set(a,u.set(n,e))}}function ry(t,e,n){for(let r of(t.clear(),e.clear(),n)){let{source:n,target:i,sourceHandle:o=null,targetHandle:a=null}=r,u={edgeId:r.id,source:n,target:i,sourceHandle:o,targetHandle:a},l=`${n}-${o}--${i}-${a}`;rp("source",u,`${i}-${a}--${n}-${o}`,t,n,o),rp("target",u,l,t,i,a),e.set(r.id,r)}}function rg(t,e,n){let r=t;do{if(r?.matches?.(e))return!0;if(r===n)break;r=r?.parentElement}while(r);return!1}function rm(t){let{nodeId:e,dragItems:n,nodeLookup:r,dragging:i=!0}=t,o=[];for(let[t,e]of n){let n=r.get(t)?.internals.userNode;n&&o.push({...n,position:e.position,dragging:i})}if(!e)return[o[0],o];let a=r.get(e)?.internals.userNode;return[a?{...a,position:n.get(e)?.position||a.position,dragging:i}:o[0],o]}function rv(t){let{onNodeMouseDown:e,getStoreItems:n,onDragStart:r,onDrag:i,onDragStop:o}=t,a={x:null,y:null},u=0,l=new Map,s=!1,c={x:0,y:0},h=null,f=!1,d=null,p=!1,y=!1,g=null;return{update:function(t){let{noDragClassName:m,handleSelector:v,domNode:w,isSelectable:_,nodeId:b,nodeClickDistance:M=0}=t;function k(t){let{x:e,y:r}
1=t,{nodeLookup:o,nodeExtent:u,snapGrid:s,snapToGrid:c,nodeOrigin:h,onNodeDrag:f,onSelectionDrag:d,onError:p,updateNodePositions:m}=n();a={x:e,y:r};let v=!1,x=l.size>1,w=x&&u?ny(ni(l)):null,_=x&&c?function(t){let{dragItems:e,snapGrid:n,x:r,y:i}=t,o=e.values().next().value;if(!o)return null;let a={x:r-o.distance.x,y:i-o.distance.y},u=nA(a,n);return{x:u.x-a.x,y:u.y-a.y}}({dragItems:l,snapGrid:s,x:e,y:r}):null;for(let[t,n]of l){if(!o.has(t))continue;let i={x:e-n.distance.x,y:r-n.distance.y};c&&(i=_?{x:Math.round(i.x+_.x),y:Math.round(i.y+_.y)}:nA(i,s));let a=null;if(x&&u&&!n.extent&&w){let{positionAbsolute:t}=n.internals,e=t.x-w.x+u[0][0],r=t.x+n.measured.width-w.x2+u[1][0];a=[[e,t.y-w.y+u[0][1]],[r,t.y+n.measured.height-w.y2+u[1][1]]]}let{position:l,positionAbsolute:f}=nu({nodeId:t,nextPosition:i,nodeLookup:o,nodeExtent:a||u,nodeOrigin:h,onError:p});v=v||n.position.x!==l.x||n.position.y!==l.y,n.position=l,n.internals.positionAbsolute=f}if(y=y||v,v&&(m(l,!0),g&&(i||f||!b&&d))){let[t,e]=rm({nodeId:b,dragItems:l,nodeLookup:o});i?.(g,l,t,e),f?.(g,t,e),b||d?.(g,e)}}async function A(){if(!h)return;let{transform:t,panBy:e,autoPanSpeed:r,autoPanOnNodeDrag:i}=n();if(!i){s=!1,cancelAnimationFrame(u);return}let[o,l]=nd(c,h,r);(0!==o||0!==l)&&(a.x=(a.x??0)-o/t[2],a.y=(a.y??0)-l/t[2],await e({x:o,y:l})&&k(a)),u=requestAnimationFrame(A)}function E(t){let{nodeLookup:i,multiSelectionActive:o,nodesDraggable:u,transform:s,snapGrid:c,snapToGrid:d,selectNodesOnDrag:p,onNodeDragStart:y,onSelectionDragStart:g,unselectNodesAndEdges:m}=n();f=!0,p&&_||o||!b||i.get(b)?.selected||m(),_&&p&&b&&e?.(b);let v=nV(t.sourceEvent,{transform:s,snapGrid:c,snapToGrid:d,containerBounds:h});if(a=v,(l=function(t,e,n,r){let i=new Map;for(let[o,a]of t)if((a.selected||a.id===r)&&(!a.parentId||!function t(e,n){if(!e.parentId)return!1;let r=n.get(e.parentId);return!!r&&(!!r.selected||t(r,n))}(a,t))&&(a.draggable||e&&void 0===a.draggable)){let e=t.get(o);e&&i.set(o,{id:o,position:e.position||{x:0,y:0},distance:{x:n.x-e.internals.positionAbsolute.x,y:n.y-e.internals.positionAbsolute.y},extent:e.extent,parentId:e.parentId,origin:e.origin,expandParent:e.expandParent,internals:{positionAbsolute:e.internals.positionAbsolute||{x:0,y:0}},measured:{width:e.measured.width??0,height:e.measured.height??0}})}return i}(i,u,v,b)).size>0&&(r||y||!b&&g)){let[e,n]=rm({nodeId:b,dragItems:l,nodeLookup:i});r?.(t.sourceEvent,l,e,n),y?.(t.sourceEvent,e,n),b||g?.(t.sourceEvent,n)}}d=ts(w);let $=(function(){var t,e,n,r,i=tx,o=tw,a=t_,u=tb,l={},s=x("start","drag","end"),c=0,h=0;function f(t){t.on("mousedown.drag",d).filter(u).on("touchstart.drag",g).on("touchmove.drag",m,th).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(a,u){if(!r&&i.call(this,a,u)){var l=w(this,o.call(this,a,u),a,u,"mouse");l&&(ts(a.view).on("mousemove.drag",p,tf).on("mouseup.drag",y,tf),ty(a.view),td(a),n=!1,t=a.clientX,e=a.clientY,l("start",a))}}function p(r){if(tp(r),!n){var i=r.clientX-t,o=r.clientY-e;n=i*i+o*o>h}l.mouse("drag",r)}function y(t){ts(t.view).on("mousemove.drag mouseup.drag",null),tg(t.view,n),tp(t),l.mouse("end",t)}function g(t,e){if(i.call(this,t,e)){var n,r,a=t.changedTouches,u=o.call(this,t,e),l=a.length;for(n=0;n<l;++n)(r=w(this,u,t,e,a[n].identifier,a[n]))&&(td(t),r("start",t,a[n]))}}function m(t){var e,n,r=t.changedTouches,i=r.length;for(e=0;e<i;++e)(n=l[r[e].identifier])&&(tp(t),n("drag",t,r[e]))}function v(t){var e,n,i=t.changedTouches,o=i.length;for(r&&clearTimeout(r),r=setTimeout(function(){r=null},500),e=0;e<o;++e)(n=l[i[e].identifier])&&(td(t),n("end",t,i[e]))}function w(t,e,n,r,i,o){var u,h,d,p=s.copy(),y=tc(o||n,e);if(null!=(d=a.call(t,new tv("beforestart",{sourceEvent:n,target:f,identifier:i,active:c,x:y[0],y:y[1],dx:0,dy:0,dispatch:p}),r)))return u=d.x-y[0]||0,h=d.y-y[1]||0,function n(o,a,s){var g,m=y;switch(o){case"start":l[i]=n,g=c++;break;case"end":delete l[i],--c;case"drag":y=tc(s||a,e),g=c}p.call(o,t,new tv(o,{sourceEvent:a,subject:d,target:f,identifier:i,active:g,x:y[0]+u,y:y[1]+h,dx:y[0]-m[0],dy:y[1]-m[1],dispatch:p}),r)}}return f.filter=function(t){return arguments.length?(i="function"==typeof t?t:tm(!!t),f):i},f.container=function(t){return arguments.length?(o="function"==typeof t?t:tm(t),f):o},f.subject=function(t){return arguments.length?(a="function"==typeof t?t:tm(t),f):a},f.touchable=function(t){return arguments.length?(u="function"==typeof t?t:tm(!!t),f):u},f.on=function(){var t=s.on.apply(s,arguments);return t===s?f:t},f.clickDistance=function(t){return arguments.length?(h=(t*=1)*t,f):Math.sqrt(h)},f})().clickDistance(M).on("start",t=>
1{let{domNode:e,nodeDragThreshold:r,transform:i,snapGrid:o,snapToGrid:u}=n();h=e?.getBoundingClientRect()||null,p=!1,y=!1,g=t.sourceEvent,0===r&&E(t),a=nV(t.sourceEvent,{transform:i,snapGrid:o,snapToGrid:u,containerBounds:h}),c=nR(t.sourceEvent,h)}).on("drag",t=>{let{autoPanOnNodeDrag:e,transform:r,snapGrid:i,snapToGrid:o,nodeDragThreshold:u,nodeLookup:d}=n(),y=nV(t.sourceEvent,{transform:r,snapGrid:i,snapToGrid:o,containerBounds:h});if(g=t.sourceEvent,("touchmove"===t.sourceEvent.type&&t.sourceEvent.touches.length>1||b&&!d.has(b))&&(p=!0),!p){if(!s&&e&&f&&(s=!0,A()),!f){let e=nR(t.sourceEvent,h),n=e.x-c.x,r=e.y-c.y;Math.sqrt(n*n+r*r)>u&&E(t)}(a.x!==y.xSnapped||a.y!==y.ySnapped)&&l&&f&&(c=nR(t.sourceEvent,h),k(y))}}).on("end",t=>{if(!f||p){p&&l.size>0&&n().updateNodePositions(l,!1);return}if(s=!1,f=!1,cancelAnimationFrame(u),l.size>0){let{nodeLookup:e,updateNodePositions:r,onNodeDragStop:i,onSelectionDragStop:a}=n();if(y&&(r(l,!1),y=!1),o||i||!b&&a){let[n,r]=rm({nodeId:b,dragItems:l,nodeLookup:e,dragging:!1});o?.(t.sourceEvent,l,n,r),i?.(t.sourceEvent,n,r),b||a?.(t.sourceEvent,r)}}}).filter(t=>{let e=t.target;return!t.button&&(!m||!rg(e,`.${m}`,w))&&(!v||rg(e,v,w))});d.call($)},destroy:function(){d?.on(".drag",null)}}}function rx(t,e,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=r.get(t);if(!a)return null;let u="strict"===i?a.internals.handleBounds?.[e]:[...a.internals.handleBounds?.source??[],...a.internals.handleBounds?.target??[]],l=(n?u?.find(t=>t.id===n):u?.[0])??null;return l&&o?{...l,...n9(a,l,l.position,!0)}:l}function rw(t,e){return t?t:e?.classList.contains("target")?"target":e?.classList.contains("source")?"source":null}let r_=()=>!0;function rb(t,e){let{handle:n,connectionMode:r,fromNodeId:i,fromHandleId:o,fromType:a,doc:u,lib:l,flowId:s,isValidConnection:c=r_,nodeLookup:f}=e,d="target"===a,p=n?u.querySelector(`.${l}-flow__handle[data-id="${s}-${n?.nodeId}-${n?.id}-${n?.type}"]`):null,{x:y,y:g}=nR(t),m=u.elementFromPoint(y,g),v=m?.classList.contains(`${l}-flow__handle`)?m:p,x={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){let t=rw(void 0,v),e=v.getAttribute("data-nodeid"),n=v.getAttribute("data-handleid"),a=v.classList.contains("connectable"),u=v.classList.contains("connectableend");if(!e||!t)return x;let l={source:d?e:i,sourceHandle:d?n:o,target:d?i:e,targetHandle:d?o:n};x.connection=l,x.isValid=a&&u&&(r===h.Strict?d&&"source"===t||!d&&"target"===t:e!==i||n!==o)&&c(l),x.toHandle=rx(e,t,n,f,r,!0)}return x}let rM={onPointerDown:function(t,e){let n,{connectionMode:r,connectionRadius:i,handleId:o,nodeId:a,edgeUpdaterType:u,isTarget:l,domNode:s,nodeLookup:c,lib:h,autoPanOnConnect:f,flowId:d,panBy:p,cancelConnection:y,onConnectStart:m,onConnect:v,onConnectEnd:x,isValidConnection:w=r_,onReconnectEnd:_,updateConnection:b,getTransform:M,getFromHandle:k,autoPanSpeed:A,dragThreshold:E=1,handleDomNode:$}=e,z=nC(t.target),N=0,{x:S,y:T}=nR(t),I=rw(u,$),H=s?.getBoundingClientRect(),P=!1;if(!H||!I)return;let L=rx(a,I,o,c,r);if(!L)return;let B=nR(t,H),j=!1,V=null,O=!1,C=null,q={...L,nodeId:a,type:I,position:L.position},D=c.get(a),X={inProgress:!0,isValid:null,from:n9(D,q,g.Left,!0),fromHandle:q,fromPosition:q.position,fromNode:D,to:B,toHandle:null,toPosition:e8[q.position],toNode:null,pointer:B};function R(){P=!0,b(X),m?.(t,{nodeId:a,handleId:o,handleType:I})}function Y(t){var e,u;let s;if(!P){let{x:e,y:n}=nR(t),r=e-S,i=n-T;if(!(r*r+i*i>E*E))return;R()}if(!k()||!q)return void F(t);let y=M();n=function(t,e,n,r){let i=[],o=1/0;for(let a of function(t,e,n){let r=[],i={x:t.x-n,y:t.y-n,width:2*n,height:2*n};for(let t of e.values())n_(i,nm(t))>0&&r.push(t);return r}(t,n,e+250))for(let n of[...a.internals.handleBounds?.source??[],...a.internals.handleBounds?.target??[]]){if(r.nodeId===n.nodeId&&r.type===n.type&&r.id===n.id)continue;let{x:u,y:l}=n9(a,n,n.position,!0),s=Math.sqrt(Math.pow(u-t.x,2)+Math.pow(l-t.y,2));s>e||(s<o?(i=[{...n,x:u,y:l}],o=s):s===o&&i.push({...n,x:u,y:l}))}if(!i.length)return null;if(i.length>1){let t="source"===r.type?"target":"source";return i.find(e=>e.type===t)??i[0]}return i[0]}(nE(B=nR(t,H),y,!1,[1,1]),i,c,q),j||(!function t(){if(!f||!H)return;let[e,n]=nd(B,H,A);p({x:e,y:n}),N=requestAnimationFrame(t)}(),j=!0);let m=rb(t,{handle:n,connectionMode:r,fromNodeId:a,fromHandleId:o,fromType:l?"target":"source",isValidConnection:w,doc:z,lib:h,flowId:d,nodeLookup:c});
1C=m.handleDomNode,V=m.connection,e=!!n,u=m.isValid,s=null,u?s=!0:e&&!u&&(s=!1),O=s;let v=c.get(a),x=v?n9(v,q,g.Left,!0):X.from,_={...X,from:x,isValid:O,to:m.toHandle&&O?n$({x:m.toHandle.x,y:m.toHandle.y},y):B,toHandle:m.toHandle,toPosition:O&&m.toHandle?m.toHandle.position:e8[q.position],toNode:m.toHandle?c.get(m.toHandle.nodeId):null,pointer:B};b(_),X=_}function F(t){if(!("touches"in t)||!(t.touches.length>0)){if(P){(n||C)&&V&&O&&v?.(V);let{inProgress:e,...r}=X,i={...r,toPosition:X.toHandle?X.toPosition:null};x?.(t,i),u&&_?.(t,i)}y(),cancelAnimationFrame(N),j=!1,O=!1,V=null,C=null,z.removeEventListener("mousemove",Y),z.removeEventListener("mouseup",F),z.removeEventListener("touchmove",Y),z.removeEventListener("touchend",F)}}0===E&&R(),z.addEventListener("mousemove",Y),z.addEventListener("mouseup",F),z.addEventListener("touchmove",Y),z.addEventListener("touchend",F)},isValid:rb};function rk(t){let{domNode:e,panZoom:n,getTransform:r,getViewScale:i}=t,o=ts(e);return{update:function(t){let{translateExtent:e,width:a,height:u,zoomStep:l=1,pannable:s=!0,zoomable:c=!0,inversePan:h=!1}=t,f=[0,0],d=e0().on("start",t=>{("mousedown"===t.sourceEvent.type||"touchstart"===t.sourceEvent.type)&&(f=[t.sourceEvent.clientX??t.sourceEvent.touches[0].clientX,t.sourceEvent.clientY??t.sourceEvent.touches[0].clientY])}).on("zoom",s?t=>{let o=r();if("mousemove"!==t.sourceEvent.type&&"touchmove"!==t.sourceEvent.type||!n)return;let l=[t.sourceEvent.clientX??t.sourceEvent.touches[0].clientX,t.sourceEvent.clientY??t.sourceEvent.touches[0].clientY],s=[l[0]-f[0],l[1]-f[1]];f=l;let c=i()*Math.max(o[2],Math.log(o[2]))*(h?-1:1),d={x:o[0]-s[0]*c,y:o[1]-s[1]*c};n.setViewportConstrained({x:d.x,y:d.y,zoom:o[2]},[[0,0],[a,u]],e)}:null).on("zoom.wheel",c?t=>{if("wheel"!==t.sourceEvent.type||!n)return;let e=r(),i=t.sourceEvent.ctrlKey&&nS()?10:1,o=-t.sourceEvent.deltaY*(1===t.sourceEvent.deltaMode?.05:t.sourceEvent.deltaMode?1:.002)*l,a=e[2]*Math.pow(2,o*i);n.scaleTo(a)}:null);o.call(d,{})},destroy:function(){o.on("zoom",null)},pointer:tc}}let rA=t=>({x:t.x,y:t.y,zoom:t.k}),rE=t=>{let{x:e,y:n,zoom:r}=t;return eR.translate(e,n).scale(r)},r$=(t,e)=>t.target.closest(`.${e}`),rz=(t,e)=>2===e&&Array.isArray(t)&&t.includes(2),rN=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,rS=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:rN,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:()=>{},i="number"==typeof e&&e>0;return i||r(),i?t.transition().duration(e).ease(n).on("end",r):t},rT=t=>{let e=t.ctrlKey&&nS()?10:1;return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*e};function rI(t){let{domNode:e,minZoom:n,maxZoom:r,translateExtent:i,viewport:o,onPanZoom:a,onPanZoomStart:u,onPanZoomEnd:l,onDraggingChange:s}=t,c={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),d=e0().scaleExtent([n,r]).translateExtent(i),p=ts(e).call(d);x({x:o.x,y:o.y,zoom:ns(o.zoom,n,r)},[[0,0],[h.width,h.height]],i);let y=p.on("wheel.zoom"),g=p.on("dblclick.zoom");async function m(t,e){return!!p&&new Promise(n=>{d?.interpolate(e?.interpolate==="linear"?e1:tk).transform(rS(p,e?.duration,e?.ease,()=>n(!0)),t)})}function v(){d.on("zoom",null)}async function x(t,e,n){let r=rE(t),i=d?.constrain()(r,e,n);return i&&await m(i),i}return d.wheelDelta(rT),{update:function(t){let{noWheelClassName:e,noPanClassName:n,onPaneContextMenu:r,userSelectionActive:i,panOnScroll:o,panOnDrag:h,panOnScrollMode:m,panOnScrollSpeed:x,preventScrolling:w,zoomOnPinch:_,zoomOnScroll:b,zoomOnDoubleClick:M,zoomActivationKeyPressed:k,lib:A,onTransformChange:E,connectionInProgress:$,paneClickDistance:z,selectionOnDrag:N}=t;i&&!c.isZoomingOrPanning&&v();let S=o&&!k&&!i;d.clickDistance(N?1/0:!nM(z)||z<0?0:z);let T=S?function(t){let{zoomPanValues:e,noWheelClassName:n,d3Selection:r,d3Zoom:i,panOnScrollMode:o,panOnScrollSpeed:a,zoomOnPinch:u,onPanZoomStart:l,onPanZoom:s,onPanZoomEnd:c}=t;return t=>{if(r$(t,n))return t.ctrlKey&&t.preventDefault(),!1;t.preventDefault(),t.stopImmediatePropagation();let h=r.property("__zoom").k||1;if(t.ctrlKey&&u){let e=tc(t),n=h*Math.pow(2,rT(t));i.scaleTo(r,n,e,t);return}let d=1===t.deltaMode?20:1,p=o===f.Vertical?0:t.deltaX*d,y=o===f.Horizontal?0:t.deltaY*d;!nS()&&t.shiftKey&&o!==f.Vertical&&(p=t.deltaY*d,y=0),i.translateBy(r,-(p/h)*a,-(y/h)*a,{internal:!0});let g=rA(r.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(s?.(t,g),e.panScrollTimeout=setTimeout(()=>{c?.(t,g),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l?.(t,g))}}({zoomPanValues:c,noWheelClassName:e,d3Selection:p,d3Zoom:d,panOnScrollMode:m,panOnScrollSpeed:x,zoomOnPinch:_,onPanZoomStart:u,onPanZoom:a,onPanZoomEnd:l}):function(t){let{noWheelClassName:e,preventScrolling:n,d3ZoomHandler:r}=t;return function(t,i){let o="wheel"===t.type,a=!n&&o&&!t.ctrlKey,u=r$(t,e);if(t.ctrlKey&&o&&u&&t.preventDefault(),a||u)return null;t.preventDefault(),r.call(this,t,i)}}({noWheelClassName:e,preventScrolling:w,d3ZoomHandler:y});p.on("wheel.zoom",T,{passive:!1});let I=function(t){let{zoomPanValues:e,onDraggingChange:n,onPanZoomStart:r}=t;return t=>{if(t.sourceEvent?.internal)return;let i=rA(t.transform);e.mouseButton=t.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,t.sourceEvent?.type==="mousedown"&&n(!0),r&&r?.(t.sourceEvent,i)}}({zoomPanValues:c,onDraggingChange:s,onPanZoomStart:u});d.on("start",I);let H=function(t){let{zoomPanValues:e,panOnDrag:n,onPaneContextMenu:r,onTransformChange:i,onPanZoom:o}=t;return t=>{e.usedRightMouseButton=!!(r&&rz(n,e.mouseButton??0)),t.sourceEvent?.sync||i([t.transform.x,t.transform.y,t.transform.k]),o&&!t.sourceEvent?.internal&&o?.(t.sourceEvent,rA(t.transform))}}({zoomPanValues:c,panOnDrag:h,onPaneContextMenu:!!r,onPanZoom:a,onTransformChange:E});d.on("zoom",H);let P=function(t){let{zoomPanValues:e,panOnDrag:n,panOnScroll:r,onDraggingChange:i,onPanZoomEnd:o,onPaneContextMenu:a}=t;return t=>{if(!t.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&rz(n,e.mouseButton??0)&&!e.usedRightMouseButton&&t.sourceEvent&&a(t.sourceEvent),e.usedRightMouseButton=!1,i(!1),o)){let n=rA(t.transform);e.prevViewport=n,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o?.(t.sourceEvent,n)},150*!!r)}}}({zoomPanValues:c,panOnDrag:h,panOnScroll:o,onPaneContextMenu:r,onPanZoomEnd:l,onDraggingChange:s});d.on("end",P);let L=function(t){let{zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:r,panOnDrag:i,panOnScroll:o,zoomOnDoubleClick:a,userSelectionActive:u,noWheelClassName:l,noPanClassName:s,lib:c,connectionInProgress:h}=t;return t=>{let f=e||n,d=r&&t.ctrlKey,p="wheel"===t.type;if(1===t.button&&"mousedown"===t.type&&(r$(t,`${c}-flow__node`)||r$(t,`${c}-flow__edge`)))return!0;
1if(!i&&!f&&!o&&!a&&!r||u||h&&!p||r$(t,l)&&p||r$(t,s)&&(!p||o&&p&&!e)||!r&&t.ctrlKey&&p)return!1;if(!r&&"touchstart"===t.type&&t.touches?.length>1)return t.preventDefault(),!1;if(!f&&!o&&!d&&p||!i&&("mousedown"===t.type||"touchstart"===t.type)||Array.isArray(i)&&!i.includes(t.button)&&"mousedown"===t.type)return!1;let y=Array.isArray(i)&&i.includes(t.button)||!t.button||t.button<=1;return(!t.ctrlKey||p)&&y}}({zoomActivationKeyPressed:k,panOnDrag:h,zoomOnScroll:b,panOnScroll:o,zoomOnDoubleClick:M,zoomOnPinch:_,userSelectionActive:i,noPanClassName:n,noWheelClassName:e,lib:A,connectionInProgress:$});d.filter(L),M?p.on("dblclick.zoom",g):p.on("dblclick.zoom",null)},destroy:v,setViewport:async function t(t,e){let n=rE(t);return await m(n,e),n},setViewportConstrained:x,getViewport:function(){let t=p?eY(p.node()):{x:0,y:0,k:1};return{x:t.x,y:t.y,zoom:t.k}},scaleTo:async function t(t,e){return!!p&&new Promise(n=>{d?.interpolate(e?.interpolate==="linear"?e1:tk).scaleTo(rS(p,e?.duration,e?.ease,()=>n(!0)),t)})},scaleBy:async function t(t,e){return!!p&&new Promise(n=>{d?.interpolate(e?.interpolate==="linear"?e1:tk).scaleBy(rS(p,e?.duration,e?.ease,()=>n(!0)),t)})},setScaleExtent:function(t){d?.scaleExtent(t)},setTranslateExtent:function(t){d?.translateExtent(t)},syncViewport:function(t){if(p){let e=rE(t),n=p.property("__zoom");(n.k!==t.zoom||n.x!==t.x||n.y!==t.y)&&d?.transform(p,e,null,{sync:!0})}},setClickDistance:function(t){let e=!nM(t)||t<0?0:t;d?.clickDistance(e)}}}(s=m||(m={})).Line="line",s.Handle="handle"},27003:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]])},30663:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("at-sign",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]])},36688:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},38121:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]])},38344:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},41223:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},50045:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("file-x-corner",[["path",{d:"M11 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5",key:"1jo35a"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m15 17 5 5",key:"36xl1x"}],["path",{d:"m20 17-5 5",key:"vdz27y"}]])},56494:(t,e,n)=>{"use strict";n.d(e,{h:()=>h,n:()=>s});var r=n(64245),i=n(77954);let o=t=>{let e,n=new Set,r=(t,r)=>{let i="function"==typeof t?t(e):t;if(!Object.is(i,e)){let t=e;e=(null!=r?r:"object"!=typeof i||null===i)?i:Object.assign({},e,i),n.forEach(n=>n(e,t))}},i=()=>e,o={setState:r,getState:i,getInitialState:()=>a,subscribe:t=>(n.add(t),()=>n.delete(t)),destroy:()=>{n.clear()}},a=e=t(r,i,o);return o},{useDebugValue:a}=r,{useSyncExternalStoreWithSelector:u}=i,l=t=>t;function s(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l,n=arguments.length>2?arguments[2]:void 0,r=u(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return a(r),r}let c=(t,e)=>{let n=t?o(t):o,r=function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return s(n,t,r)};return Object.assign(r,n),r},h=(t,e)=>t?c(t,e):c},59122:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]])},60063:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]])},60105:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},62179:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("image-up",[["path",{d:"M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21",key:"9csbqa"}],["path",{d:"m14 19.5 3-3 3 3",key:"9vmjn0"}],["path",{d:"M17 22v-5.5",key:"1aa6fl"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]])},63474:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},64205:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]])},64228:(t,e,n)=>{"use strict";n.d(e,{A:()=>function t(e){if("string"==typeof e||"number"==typeof e)return""+e;let n="";if(Array.isArray(e))for(let r=0,i;r<e.length;r++)""!==(i=t(e[r]))&&(n+=(n&&" ")+i);else for(let t in e)e[t]&&(n+=(n&&" ")+t);return n}})},67499:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},77754:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},77954:(t,e,n)=>{"use strict";
1t.exports=n(80604)},78656:(t,e,n)=>{"use strict";function r(t,e){if(Object.is(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(let[n,r]of t)if(!Object.is(r,e.get(n)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}let n=Object.keys(t);if(n.length!==Object.keys(e).length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(e,r)||!Object.is(t[r],e[r]))return!1;return!0}n.d(e,{x:()=>r})},80604:(t,e,n)=>{"use strict";var r=n(64245),i=n(90980),o="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},a=i.useSyncExternalStore,u=r.useRef,l=r.useEffect,s=r.useMemo,c=r.useDebugValue;e.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var h=u(null);if(null===h.current){var f={hasValue:!1,value:null};h.current=f}else f=h.current;var d=a(t,(h=s(function(){function t(t){if(!l){if(l=!0,a=t,t=r(t),void 0!==i&&f.hasValue){var e=f.value;if(i(e,t))return u=e}return u=t}if(e=u,o(a,t))return e;var n=r(t);return void 0!==i&&i(e,n)?(a=t,e):(a=t,u=n)}var a,u,l=!1,s=void 0===n?null:n;return[function(){return t(e())},null===s?void 0:function(){return t(s())}]},[e,n,r,i]))[0],h[1]);return l(function(){f.hasValue=!0,f.value=d},[d]),c(d),d}},81842:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},81971:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]])},88688:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]])},90980:(t,e,n)=>{"use strict";t.exports=n(395)},93613:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]])},94545:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]])},97431:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(29210).A)("package-check",[["path",{d:"m16 16 2 2 4-4",key:"gfu2re"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]])},99184:()=>{}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.