@kestra-io/ui-libs 0.0.235 → 0.0.237

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";const W=require("@vue-flow/core"),I=require("./FlowYamlUtils-DvtepVr2.cjs"),mi=require("vue"),Lo=require("humanize-duration"),qi=require("moment"),Po=require("moment-timezone"),Mo={TASKS:"TASKS",TRIGGERS:"TRIGGERS",TASK_RUNNERS:"TASK_RUNNERS"},Fo={EDIT:"edit",DELETE:"delete",SHOW_DESCRIPTION:"showDescription",COLLAPSE:"collapse",EXPAND:"expand",OPEN_LINK:"openLink",ADD_TASK:"addTask",SHOW_LOGS:"showLogs",MOUSE_OVER:"mouseover",MOUSE_LEAVE:"mouseleave",ADD_ERROR:"addError",EXPAND_DEPENDENCIES:"expandDependencies",SHOW_CONDITION:"showCondition",RUN_TASK:"runTask"},se="cluster_",Go={EXECUTIONS:"executions",TASKRUNS:"taskruns"},Do={ALL:"all",ERROR:"error",HIDDEN:"hidden",DEFAULT:"all"},ee={TASK_WIDTH:184,TASK_HEIGHT:44,TRIGGER_WIDTH:184,TRIGGER_HEIGHT:44,DOT_WIDTH:5,DOT_HEIGHT:5,COLLAPSED_CLUSTER_WIDTH:150,COLLAPSED_CLUSTER_HEIGHT:44,TRIGGER_CLUSTER_WIDTH:350,TRIGGER_CLUSTER_HEIGHT:180},Uo={STORAGE_KEY:"view-type",SOURCE:"source",SOURCE_TOPOLOGY:"source-topology",SOURCE_DOC:"source-doc",TOPOLOGY:"topology",SOURCE_BLUEPRINTS:"source-blueprints"},Bo={DISPLAY_EXECUTIONS_COLUMNS:"displayExecutionsColumns",DISPLAY_FLOW_EXECUTIONS_COLUMNS:"displayFlowExecutionsColumns",SELECTED_TENANT:"selectedTenant",EXECUTE_FLOW_BEHAVIOUR:"executeFlowBehaviour",SHOW_CHART:"showChart",SHOW_FLOWS_CHART:"showFlowsChart",SHOW_LOGS_CHART:"showLogsChart",DEFAULT_NAMESPACE:"defaultNamespace",LATEST_NAMESPACE:"latestNamespace",PAGINATION_SIZE:"paginationSize",IMPERSONATE:"impersonate",EDITOR_VIEW_TYPE:"editorViewType"},Ho={SAME_TAB:"same tab",NEW_TAB:"new tab"},Wo={INPROGRESS:"IN-PROGRESS"};var Oe,Ei;function Vo(){if(Ei)return Oe;Ei=1;function e(a){return function(u,n,r){for(var t=-1,s=Object(u),i=r(u),f=i.length;f--;){var d=i[a?f:++t];if(n(s[d],d,s)===!1)break}return u}}return Oe=e,Oe}var Ne,wi;function ei(){if(wi)return Ne;wi=1;var e=Vo(),a=e();return Ne=a,Ne}var xe,Ri;function ri(){if(Ri)return xe;Ri=1;var e=ei(),a=I.requireKeys();function u(n,r){return n&&e(n,r,a)}return xe=u,xe}var ke,Ii;function jo(){if(Ii)return ke;Ii=1;var e="__lodash_hash_undefined__";function a(u){return this.__data__.set(u,e),this}return ke=a,ke}var Le,Ti;function Ko(){if(Ti)return Le;Ti=1;function e(a){return this.__data__.has(a)}return Le=e,Le}var Pe,Si;function Vs(){if(Si)return Pe;Si=1;var e=I.require_MapCache(),a=jo(),u=Ko();function n(r){var t=-1,s=r==null?0:r.length;for(this.__data__=new e;++t<s;)this.add(r[t])}return n.prototype.add=n.prototype.push=a,n.prototype.has=u,Pe=n,Pe}var Me,Ci;function zo(){if(Ci)return Me;Ci=1;function e(a,u){for(var n=-1,r=a==null?0:a.length;++n<r;)if(u(a[n],n,a))return!0;return!1}return Me=e,Me}var Fe,Ai;function js(){if(Ai)return Fe;Ai=1;function e(a,u){return a.has(u)}return Fe=e,Fe}var Ge,Oi;function Ks(){if(Oi)return Ge;Oi=1;var e=Vs(),a=zo(),u=js(),n=1,r=2;function t(s,i,f,d,o,c){var h=f&n,l=s.length,m=i.length;if(l!=m&&!(h&&m>l))return!1;var p=c.get(s),v=c.get(i);if(p&&v)return p==i&&v==s;var g=-1,b=!0,_=f&r?new e:void 0;for(c.set(s,i),c.set(i,s);++g<l;){var y=s[g],q=i[g];if(d)var R=h?d(q,y,g,i,s,c):d(y,q,g,s,i,c);if(R!==void 0){if(R)continue;b=!1;break}if(_){if(!a(i,function(E,C){if(!u(_,C)&&(y===E||o(y,E,f,d,c)))return _.push(C)})){b=!1;break}}else if(!(y===q||o(y,q,f,d,c))){b=!1;break}}return c.delete(s),c.delete(i),b}return Ge=t,Ge}var De,Ni;function Yo(){if(Ni)return De;Ni=1;function e(a){var u=-1,n=Array(a.size);return a.forEach(function(r,t){n[++u]=[t,r]}),n}return De=e,De}var Ue,xi;function ni(){if(xi)return Ue;xi=1;function e(a){var u=-1,n=Array(a.size);return a.forEach(function(r){n[++u]=r}),n}return Ue=e,Ue}var Be,ki;function $o(){if(ki)return Be;ki=1;var e=I.require_Symbol(),a=I.require_Uint8Array(),u=I.requireEq(),n=Ks(),r=Yo(),t=ni(),s=1,i=2,f="[object Boolean]",d="[object Date]",o="[object Error]",c="[object Map]",h="[object Number]",l="[object RegExp]",m="[object Set]",p="[object String]",v="[object Symbol]",g="[object ArrayBuffer]",b="[object DataView]",_=e?e.prototype:void 0,y=_?_.valueOf:void 0;function q(R,E,C,O,S,k,L){switch(C){case b:if(R.byteLength!=E.byteLength||R.byteOffset!=E.byteOffset)return!1;R=R.buffer,E=E.buffer;case g:return!(R.byteLength!=E.byteLength||!k(new a(R),new a(E)));case f:case d:case h:return u(+R,+E);case o:return R.name==E.name&&R.message==E.message;case l:case p:return R==E+"";case c:var P=r;case m:var M=O&s;if(P||(P=t),R.size!=E.size&&!M)return!1;var G=L.get(R);if(G)return G==E;O|=i,L.set(R,E);var B=n(P(R),P(E),O,S,k,L);return L.delete(R),B;case v:if(y)return y.call(R)==y.call(E)}return!1}return Be=q,Be}var He,Li;function Xo(){if(Li)return He;Li=1;var e=I.require_getAllKeys(),a=1,u=Object.prototype,n=u.hasOwnProperty;function r(t,s,i,f,d,o){var c=i&a,h=e(t),l=h.length,m=e(s),p=m.length;if(l!=p&&!c)return!1;for(var v=l;v--;){var g=h[v];if(!(c?g in s:n.call(s,g)))return!1}var b=o.get(t),_=o.get(s);if(b&&_)return b==s&&_==t;var y=!0;o.set(t,s),o.set(s,t);for(var q=c;++v<l;){g=h[v];var R=t[g],E=s[g];if(f)var C=c?f(E,R,g,s,t,o):f(R,E,g,t,s,o);if(!(C===void 0?R===E||d(R,E,i,f,o):C)){y=!1;break}q||(q=g=="constructor")}if(y&&!q){var O=t.constructor,S=s.constructor;O!=S&&"constructor"in t&&"constructor"in s&&!(typeof O=="function"&&O instanceof O&&typeof S=="function"&&S instanceof S)&&(y=!1)}return o.delete(t),o.delete(s),y}return He=r,He}var We,Pi;function Zo(){if(Pi)return We;Pi=1;var e=I.require_Stack(),a=Ks(),u=$o(),n=Xo(),r=I.require_getTag(),t=I.requireIsArray(),s=I.requireIsBuffer(),i=I.requireIsTypedArray(),f=1,d="[object Arguments]",o="[object Array]",c="[object Object]",h=Object.prototype,l=h.hasOwnProperty;function m(p,v,g,b,_,y){var q=t(p),R=t(v),E=q?o:r(p),C=R?o:r(v);E=E==d?c:E,C=C==d?c:C;var O=E==c,S=C==c,k=E==C;if(k&&s(p)){if(!s(v))return!1;q=!0,O=!1}if(k&&!O)return y||(y=new e),q||i(p)?a(p,v,g,b,_,y):u(p,v,E,g,b,_,y);if(!(g&f)){var L=O&&l.call(p,"__wrapped__"),P=S&&l.call(v,"__wrapped__");if(L||P){var M=L?p.value():p,G=P?v.value():v;return y||(y=new e),_(M,G,g,b,y)}}return k?(y||(y=new e),n(p,v,g,b,_,y)):!1}return We=m,We}var Ve,Mi;function ti(){if(Mi)return Ve;Mi=1;var e=Zo(),a=I.requireIsObjectLike();function u(n,r,t,s,i){return n===r?!0:n==null||r==null||!a(n)&&!a(r)?n!==n&&r!==r:e(n,r,t,s,u,i)}return Ve=u,Ve}var je,Fi;function Qo(){if(Fi)return je;Fi=1;var e=I.require_Stack(),a=ti(),u=1,n=2;function r(t,s,i,f){var d=i.length,o=d,c=!f;if(t==null)return!o;for(t=Object(t);d--;){var h=i[d];if(c&&h[2]?h[1]!==t[h[0]]:!(h[0]in t))return!1}for(;++d<o;){h=i[d];var l=h[0],m=t[l],p=h[1];if(c&&h[2]){if(m===void 0&&!(l in t))return!1}else{var v=new e;if(f)var g=f(m,p,l,t,s,v);if(!(g===void 0?a(p,m,u|n,f,v):g))return!1}}return!0}return je=r,je}var Ke,Gi;function zs(){if(Gi)return Ke;Gi=1;var e=I.requireIsObject();function a(u){return u===u&&!e(u)}return Ke=a,Ke}var ze,Di;function Jo(){if(Di)return ze;Di=1;var e=zs(),a=I.requireKeys();function u(n){for(var r=a(n),t=r.length;t--;){var s=r[t],i=n[s];r[t]=[s,i,e(i)]}return r}return ze=u,ze}var Ye,Ui;function Ys(){if(Ui)return Ye;Ui=1;function e(a,u){return function(n){return n==null?!1:n[a]===u&&(u!==void 0||a in Object(n))}}return Ye=e,Ye}var $e,Bi;function ef(){if(Bi)return $e;Bi=1;var e=Qo(),a=Jo(),u=Ys();function n(r){var t=a(r);return t.length==1&&t[0][2]?u(t[0][0],t[0][1]):function(s){return s===r||e(s,r,t)}}return $e=n,$e}var Xe,Hi;function oe(){if(Hi)return Xe;Hi=1;var e=I.require_baseGetTag(),a=I.requireIsObjectLike(),u="[object Symbol]";function n(r){return typeof r=="symbol"||a(r)&&e(r)==u}return Xe=n,Xe}var Ze,Wi;function ii(){if(Wi)return Ze;Wi=1;var e=I.requireIsArray(),a=oe(),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function r(t,s){if(e(t))return!1;var i=typeof t;return i=="number"||i=="symbol"||i=="boolean"||t==null||a(t)?!0:n.test(t)||!u.test(t)||s!=null&&t in Object(s)}return Ze=r,Ze}var Qe,Vi;function rf(){if(Vi)return Qe;Vi=1;var e=I.require_MapCache(),a="Expected a function";function u(n,r){if(typeof n!="function"||r!=null&&typeof r!="function")throw new TypeError(a);var t=function(){var s=arguments,i=r?r.apply(this,s):s[0],f=t.cache;if(f.has(i))return f.get(i);var d=n.apply(this,s);return t.cache=f.set(i,d)||f,d};return t.cache=new(u.Cache||e),t}return u.Cache=e,Qe=u,Qe}var Je,ji;function nf(){if(ji)return Je;ji=1;var e=rf(),a=500;function u(n){var r=e(n,function(s){return t.size===a&&t.clear(),s}),t=r.cache;return r}return Je=u,Je}var er,Ki;function tf(){if(Ki)return er;Ki=1;var e=nf(),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,n=e(function(r){var t=[];return r.charCodeAt(0)===46&&t.push(""),r.replace(a,function(s,i,f,d){t.push(f?d.replace(u,"$1"):i||s)}),t});return er=n,er}var rr,zi;function be(){if(zi)return rr;zi=1;function e(a,u){for(var n=-1,r=a==null?0:a.length,t=Array(r);++n<r;)t[n]=u(a[n],n,a);return t}return rr=e,rr}var nr,Yi;function af(){if(Yi)return nr;Yi=1;var e=I.require_Symbol(),a=be(),u=I.requireIsArray(),n=oe(),r=e?e.prototype:void 0,t=r?r.toString:void 0;function s(i){if(typeof i=="string")return i;if(u(i))return a(i,s)+"";if(n(i))return t?t.call(i):"";var f=i+"";return f=="0"&&1/i==-1/0?"-0":f}return nr=s,nr}var tr,$i;function $s(){if($i)return tr;$i=1;var e=af();function a(u){return u==null?"":e(u)}return tr=a,tr}var ir,Xi;function ye(){if(Xi)return ir;Xi=1;var e=I.requireIsArray(),a=ii(),u=tf(),n=$s();function r(t,s){return e(t)?t:a(t,s)?[t]:u(n(t))}return ir=r,ir}var ar,Zi;function le(){if(Zi)return ar;Zi=1;var e=oe();function a(u){if(typeof u=="string"||e(u))return u;var n=u+"";return n=="0"&&1/u==-1/0?"-0":n}return ar=a,ar}var ur,Qi;function me(){if(Qi)return ur;Qi=1;var e=ye(),a=le();function u(n,r){r=e(r,n);for(var t=0,s=r.length;n!=null&&t<s;)n=n[a(r[t++])];return t&&t==s?n:void 0}return ur=u,ur}var sr,Ji;function uf(){if(Ji)return sr;Ji=1;var e=me();function a(u,n,r){var t=u==null?void 0:e(u,n);return t===void 0?r:t}return sr=a,sr}var or,ea;function sf(){if(ea)return or;ea=1;function e(a,u){return a!=null&&u in Object(a)}return or=e,or}var fr,ra;function Xs(){if(ra)return fr;ra=1;var e=ye(),a=I.requireIsArguments(),u=I.requireIsArray(),n=I.require_isIndex(),r=I.requireIsLength(),t=le();function s(i,f,d){f=e(f,i);for(var o=-1,c=f.length,h=!1;++o<c;){var l=t(f[o]);if(!(h=i!=null&&d(i,l)))break;i=i[l]}return h||++o!=c?h:(c=i==null?0:i.length,!!c&&r(c)&&n(l,c)&&(u(i)||a(i)))}return fr=s,fr}var dr,na;function Zs(){if(na)return dr;na=1;var e=sf(),a=Xs();function u(n,r){return n!=null&&a(n,r,e)}return dr=u,dr}var cr,ta;function of(){if(ta)return cr;ta=1;var e=ti(),a=uf(),u=Zs(),n=ii(),r=zs(),t=Ys(),s=le(),i=1,f=2;function d(o,c){return n(o)&&r(c)?t(s(o),c):function(h){var l=a(h,o);return l===void 0&&l===c?u(h,o):e(c,l,i|f)}}return cr=d,cr}var hr,ia;function ae(){if(ia)return hr;ia=1;function e(a){return a}return hr=e,hr}var lr,aa;function Qs(){if(aa)return lr;aa=1;function e(a){return function(u){return u==null?void 0:u[a]}}return lr=e,lr}var vr,ua;function ff(){if(ua)return vr;ua=1;var e=me();function a(u){return function(n){return e(n,u)}}return vr=a,vr}var pr,sa;function df(){if(sa)return pr;sa=1;var e=Qs(),a=ff(),u=ii(),n=le();function r(t){return u(t)?e(n(t)):a(t)}return pr=r,pr}var gr,oa;function re(){if(oa)return gr;oa=1;var e=ef(),a=of(),u=ae(),n=I.requireIsArray(),r=df();function t(s){return typeof s=="function"?s:s==null?u:typeof s=="object"?n(s)?a(s[0],s[1]):e(s):r(s)}return gr=t,gr}var _r,fa;function Js(){if(fa)return _r;fa=1;var e=I.require_baseAssignValue(),a=ri(),u=re();function n(r,t){var s={};return t=u(t,3),a(r,function(i,f,d){e(s,f,t(i,f,d))}),s}return _r=n,_r}const cf={en:{y:()=>"y",mo:()=>"mo",w:()=>"w",d:()=>"d",h:()=>"h",m:()=>"m",s:()=>"s",ms:()=>"ms"},fr:{y:()=>"a",mo:()=>"mo",w:()=>"se",d:()=>"j",h:()=>"h",m:()=>"m",s:()=>"s",ms:()=>"ms"}},hf="dateFormat",lf="timezone",vf=e=>e.charAt(0).toUpperCase()+e.slice(1),eo=(e,a)=>{var t,s;const u=(t=mi.getCurrentInstance())==null?void 0:t.appContext.config.globalProperties.$moment().locale(),n=(s=mi.getCurrentInstance())==null?void 0:s.appContext.config.globalProperties.$moment(e).locale(u);let r;return a==="iso"?r="YYYY-MM-DD HH:mm:ss.SSS":r=a??localStorage.getItem(hf)??"llll",n.tz(localStorage.getItem(lf)??Po.tz.guess()).format(r)};function pf(e,a){return e.split(a).slice(1).join(a)}function ro(e){return qi.duration(e,qi.ISO_8601).asMilliseconds()/1e3}function no(e,a){return a=a||{maxDecimalPoints:2},a.spacer="",a.language=localStorage.getItem("lang")||"en",a.languages=cf,a.largest=2,typeof e!="number"&&(e=ro(e)),Lo(e*1e3,a).replace(/\.([0-9])s$/i,".$10s")}function to(e){return e.split(".").pop()}function gf(e,a,u){return u.indexOf(e)===a}const pe={capitalize:vf,dateFilter:eo,splitFirst:pf,duration:ro,humanDuration:no,afterLastDot:to,distinctFilter:gf};function ai(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var br,da;function _f(){if(da)return br;da=1;var e=I.require_baseClone(),a=4;function u(n){return e(n,a)}return br=u,br}var yr,ca;function ui(){if(ca)return yr;ca=1;function e(a){return function(){return a}}return yr=e,yr}var mr,ha;function bf(){if(ha)return mr;ha=1;var e=I.requireIsArrayLike();function a(u,n){return function(r,t){if(r==null)return r;if(!e(r))return u(r,t);for(var s=r.length,i=n?s:-1,f=Object(r);(n?i--:++i<s)&&t(f[i],i,f)!==!1;);return r}}return mr=a,mr}var qr,la;function qe(){if(la)return qr;la=1;var e=ri(),a=bf(),u=a(e);return qr=u,qr}var Er,va;function io(){if(va)return Er;va=1;var e=ae();function a(u){return typeof u=="function"?u:e}return Er=a,Er}var wr,pa;function ao(){if(pa)return wr;pa=1;var e=I.require_arrayEach(),a=qe(),u=io(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:a;return i(t,u(s))}return wr=r,wr}var Rr,ga;function uo(){return ga||(ga=1,Rr=ao()),Rr}var Ir,_a;function yf(){if(_a)return Ir;_a=1;var e=qe();function a(u,n){var r=[];return e(u,function(t,s,i){n(t,s,i)&&r.push(t)}),r}return Ir=a,Ir}var Tr,ba;function so(){if(ba)return Tr;ba=1;var e=I.require_arrayFilter(),a=yf(),u=re(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:a;return i(t,u(s,3))}return Tr=r,Tr}var Sr,ya;function mf(){if(ya)return Sr;ya=1;var e=Object.prototype,a=e.hasOwnProperty;function u(n,r){return n!=null&&a.call(n,r)}return Sr=u,Sr}var Cr,ma;function oo(){if(ma)return Cr;ma=1;var e=mf(),a=Xs();function u(n,r){return n!=null&&a(n,r,e)}return Cr=u,Cr}var Ar,qa;function qf(){if(qa)return Ar;qa=1;var e=I.require_baseKeys(),a=I.require_getTag(),u=I.requireIsArguments(),n=I.requireIsArray(),r=I.requireIsArrayLike(),t=I.requireIsBuffer(),s=I.require_isPrototype(),i=I.requireIsTypedArray(),f="[object Map]",d="[object Set]",o=Object.prototype,c=o.hasOwnProperty;function h(l){if(l==null)return!0;if(r(l)&&(n(l)||typeof l=="string"||typeof l.splice=="function"||t(l)||i(l)||u(l)))return!l.length;var m=a(l);if(m==f||m==d)return!l.size;if(s(l))return!e(l).length;for(var p in l)if(c.call(l,p))return!1;return!0}return Ar=h,Ar}var Or,Ea;function fo(){if(Ea)return Or;Ea=1;function e(a){return a===void 0}return Or=e,Or}var Nr,wa;function co(){if(wa)return Nr;wa=1;var e=qe(),a=I.requireIsArrayLike();function u(n,r){var t=-1,s=a(n)?Array(n.length):[];return e(n,function(i,f,d){s[++t]=r(i,f,d)}),s}return Nr=u,Nr}var xr,Ra;function ho(){if(Ra)return xr;Ra=1;var e=be(),a=re(),u=co(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:u;return i(t,a(s,3))}return xr=r,xr}var kr,Ia;function Ef(){if(Ia)return kr;Ia=1;function e(a,u,n,r){var t=-1,s=a==null?0:a.length;for(r&&s&&(n=a[++t]);++t<s;)n=u(n,a[t],t,a);return n}return kr=e,kr}var Lr,Ta;function wf(){if(Ta)return Lr;Ta=1;function e(a,u,n,r,t){return t(a,function(s,i,f){n=r?(r=!1,s):u(n,s,i,f)}),n}return Lr=e,Lr}var Pr,Sa;function lo(){if(Sa)return Pr;Sa=1;var e=Ef(),a=qe(),u=re(),n=wf(),r=I.requireIsArray();function t(s,i,f){var d=r(s)?e:n,o=arguments.length<3;return d(s,u(i,4),f,o,a)}return Pr=t,Pr}var Mr,Ca;function Rf(){if(Ca)return Mr;Ca=1;var e=I.require_baseGetTag(),a=I.requireIsArray(),u=I.requireIsObjectLike(),n="[object String]";function r(t){return typeof t=="string"||!a(t)&&u(t)&&e(t)==n}return Mr=r,Mr}var Fr,Aa;function If(){if(Aa)return Fr;Aa=1;var e=Qs(),a=e("length");return Fr=a,Fr}var Gr,Oa;function Tf(){if(Oa)return Gr;Oa=1;var e="\\ud800-\\udfff",a="\\u0300-\\u036f",u="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",r=a+u+n,t="\\ufe0e\\ufe0f",s="\\u200d",i=RegExp("["+s+e+r+t+"]");function f(d){return i.test(d)}return Gr=f,Gr}var Dr,Na;function Sf(){if(Na)return Dr;Na=1;var e="\\ud800-\\udfff",a="\\u0300-\\u036f",u="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",r=a+u+n,t="\\ufe0e\\ufe0f",s="["+e+"]",i="["+r+"]",f="\\ud83c[\\udffb-\\udfff]",d="(?:"+i+"|"+f+")",o="[^"+e+"]",c="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",l="\\u200d",m=d+"?",p="["+t+"]?",v="(?:"+l+"(?:"+[o,c,h].join("|")+")"+p+m+")*",g=p+m+v,b="(?:"+[o+i+"?",i,c,h,s].join("|")+")",_=RegExp(f+"(?="+f+")|"+b+g,"g");function y(q){for(var R=_.lastIndex=0;_.test(q);)++R;return R}return Dr=y,Dr}var Ur,xa;function Cf(){if(xa)return Ur;xa=1;var e=If(),a=Tf(),u=Sf();function n(r){return a(r)?u(r):e(r)}return Ur=n,Ur}var Br,ka;function Af(){if(ka)return Br;ka=1;var e=I.require_baseKeys(),a=I.require_getTag(),u=I.requireIsArrayLike(),n=Rf(),r=Cf(),t="[object Map]",s="[object Set]";function i(f){if(f==null)return 0;if(u(f))return n(f)?r(f):f.length;var d=a(f);return d==t||d==s?f.size:e(f).length}return Br=i,Br}var Hr,La;function Of(){if(La)return Hr;La=1;var e=I.require_arrayEach(),a=I.require_baseCreate(),u=ri(),n=re(),r=I.require_getPrototype(),t=I.requireIsArray(),s=I.requireIsBuffer(),i=I.requireIsFunction(),f=I.requireIsObject(),d=I.requireIsTypedArray();function o(c,h,l){var m=t(c),p=m||s(c)||d(c);if(h=n(h,4),l==null){var v=c&&c.constructor;p?l=m?new v:[]:f(c)?l=i(v)?a(r(c)):{}:l={}}return(p?e:u)(c,function(g,b,_){return h(l,g,b,_)}),l}return Hr=o,Hr}var Wr,Pa;function Nf(){if(Pa)return Wr;Pa=1;var e=I.require_Symbol(),a=I.requireIsArguments(),u=I.requireIsArray(),n=e?e.isConcatSpreadable:void 0;function r(t){return u(t)||a(t)||!!(n&&t&&t[n])}return Wr=r,Wr}var Vr,Ma;function si(){if(Ma)return Vr;Ma=1;var e=I.require_arrayPush(),a=Nf();function u(n,r,t,s,i){var f=-1,d=n.length;for(t||(t=a),i||(i=[]);++f<d;){var o=n[f];r>0&&t(o)?r>1?u(o,r-1,t,s,i):e(i,o):s||(i[i.length]=o)}return i}return Vr=u,Vr}var jr,Fa;function xf(){if(Fa)return jr;Fa=1;function e(a,u,n){switch(n.length){case 0:return a.call(u);case 1:return a.call(u,n[0]);case 2:return a.call(u,n[0],n[1]);case 3:return a.call(u,n[0],n[1],n[2])}return a.apply(u,n)}return jr=e,jr}var Kr,Ga;function vo(){if(Ga)return Kr;Ga=1;var e=xf(),a=Math.max;function u(n,r,t){return r=a(r===void 0?n.length-1:r,0),function(){for(var s=arguments,i=-1,f=a(s.length-r,0),d=Array(f);++i<f;)d[i]=s[r+i];i=-1;for(var o=Array(r+1);++i<r;)o[i]=s[i];return o[r]=t(d),e(n,this,o)}}return Kr=u,Kr}var zr,Da;function kf(){if(Da)return zr;Da=1;var e=ui(),a=I.require_defineProperty(),u=ae(),n=a?function(r,t){return a(r,"toString",{configurable:!0,enumerable:!1,value:e(t),writable:!0})}:u;return zr=n,zr}var Yr,Ua;function Lf(){if(Ua)return Yr;Ua=1;var e=800,a=16,u=Date.now;function n(r){var t=0,s=0;return function(){var i=u(),f=a-(i-s);if(s=i,f>0){if(++t>=e)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}return Yr=n,Yr}var $r,Ba;function po(){if(Ba)return $r;Ba=1;var e=kf(),a=Lf(),u=a(e);return $r=u,$r}var Xr,Ha;function Ee(){if(Ha)return Xr;Ha=1;var e=ae(),a=vo(),u=po();function n(r,t){return u(a(r,t,e),r+"")}return Xr=n,Xr}var Zr,Wa;function go(){if(Wa)return Zr;Wa=1;function e(a,u,n,r){for(var t=a.length,s=n+(r?1:-1);r?s--:++s<t;)if(u(a[s],s,a))return s;return-1}return Zr=e,Zr}var Qr,Va;function Pf(){if(Va)return Qr;Va=1;function e(a){return a!==a}return Qr=e,Qr}var Jr,ja;function Mf(){if(ja)return Jr;ja=1;function e(a,u,n){for(var r=n-1,t=a.length;++r<t;)if(a[r]===u)return r;return-1}return Jr=e,Jr}var en,Ka;function Ff(){if(Ka)return en;Ka=1;var e=go(),a=Pf(),u=Mf();function n(r,t,s){return t===t?u(r,t,s):e(r,a,s)}return en=n,en}var rn,za;function Gf(){if(za)return rn;za=1;var e=Ff();function a(u,n){var r=u==null?0:u.length;return!!r&&e(u,n,0)>-1}return rn=a,rn}var nn,Ya;function Df(){if(Ya)return nn;Ya=1;function e(a,u,n){for(var r=-1,t=a==null?0:a.length;++r<t;)if(n(u,a[r]))return!0;return!1}return nn=e,nn}var tn,$a;function Uf(){if($a)return tn;$a=1;function e(){}return tn=e,tn}var an,Xa;function Bf(){if(Xa)return an;Xa=1;var e=I.require_Set(),a=Uf(),u=ni(),n=1/0,r=e&&1/u(new e([,-0]))[1]==n?function(t){return new e(t)}:a;return an=r,an}var un,Za;function Hf(){if(Za)return un;Za=1;var e=Vs(),a=Gf(),u=Df(),n=js(),r=Bf(),t=ni(),s=200;function i(f,d,o){var c=-1,h=a,l=f.length,m=!0,p=[],v=p;if(o)m=!1,h=u;else if(l>=s){var g=d?null:r(f);if(g)return t(g);m=!1,h=n,v=new e}else v=d?[]:p;e:for(;++c<l;){var b=f[c],_=d?d(b):b;if(b=o||b!==0?b:0,m&&_===_){for(var y=v.length;y--;)if(v[y]===_)continue e;d&&v.push(_),p.push(b)}else h(v,_,o)||(v!==p&&v.push(_),p.push(b))}return p}return un=i,un}var sn,Qa;function _o(){if(Qa)return sn;Qa=1;var e=I.requireIsArrayLike(),a=I.requireIsObjectLike();function u(n){return a(n)&&e(n)}return sn=u,sn}var on,Ja;function Wf(){if(Ja)return on;Ja=1;var e=si(),a=Ee(),u=Hf(),n=_o(),r=a(function(t){return u(e(t,1,n,!0))});return on=r,on}var fn,eu;function Vf(){if(eu)return fn;eu=1;var e=be();function a(u,n){return e(n,function(r){return u[r]})}return fn=a,fn}var dn,ru;function bo(){if(ru)return dn;ru=1;var e=Vf(),a=I.requireKeys();function u(n){return n==null?[]:e(n,a(n))}return dn=u,dn}var cn,nu;function X(){if(nu)return cn;nu=1;var e;if(typeof ai=="function")try{e={clone:_f(),constant:ui(),each:uo(),filter:so(),has:oo(),isArray:I.requireIsArray(),isEmpty:qf(),isFunction:I.requireIsFunction(),isUndefined:fo(),keys:I.requireKeys(),map:ho(),reduce:lo(),size:Af(),transform:Of(),union:Wf(),values:bo()}}catch{}return e||(e=window._),cn=e,cn}var hn,tu;function oi(){if(tu)return hn;tu=1;var e=X();hn=r;var a="\0",u="\0",n="";function r(o){this._isDirected=e.has(o,"directed")?o.directed:!0,this._isMultigraph=e.has(o,"multigraph")?o.multigraph:!1,this._isCompound=e.has(o,"compound")?o.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[u]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}r.prototype._nodeCount=0,r.prototype._edgeCount=0,r.prototype.isDirected=function(){return this._isDirected},r.prototype.isMultigraph=function(){return this._isMultigraph},r.prototype.isCompound=function(){return this._isCompound},r.prototype.setGraph=function(o){return this._label=o,this},r.prototype.graph=function(){return this._label},r.prototype.setDefaultNodeLabel=function(o){return e.isFunction(o)||(o=e.constant(o)),this._defaultNodeLabelFn=o,this},r.prototype.nodeCount=function(){return this._nodeCount},r.prototype.nodes=function(){return e.keys(this._nodes)},r.prototype.sources=function(){var o=this;return e.filter(this.nodes(),function(c){return e.isEmpty(o._in[c])})},r.prototype.sinks=function(){var o=this;return e.filter(this.nodes(),function(c){return e.isEmpty(o._out[c])})},r.prototype.setNodes=function(o,c){var h=arguments,l=this;return e.each(o,function(m){h.length>1?l.setNode(m,c):l.setNode(m)}),this},r.prototype.setNode=function(o,c){return e.has(this._nodes,o)?(arguments.length>1&&(this._nodes[o]=c),this):(this._nodes[o]=arguments.length>1?c:this._defaultNodeLabelFn(o),this._isCompound&&(this._parent[o]=u,this._children[o]={},this._children[u][o]=!0),this._in[o]={},this._preds[o]={},this._out[o]={},this._sucs[o]={},++this._nodeCount,this)},r.prototype.node=function(o){return this._nodes[o]},r.prototype.hasNode=function(o){return e.has(this._nodes,o)},r.prototype.removeNode=function(o){var c=this;if(e.has(this._nodes,o)){var h=function(l){c.removeEdge(c._edgeObjs[l])};delete this._nodes[o],this._isCompound&&(this._removeFromParentsChildList(o),delete this._parent[o],e.each(this.children(o),function(l){c.setParent(l)}),delete this._children[o]),e.each(e.keys(this._in[o]),h),delete this._in[o],delete this._preds[o],e.each(e.keys(this._out[o]),h),delete this._out[o],delete this._sucs[o],--this._nodeCount}return this},r.prototype.setParent=function(o,c){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(c))c=u;else{c+="";for(var h=c;!e.isUndefined(h);h=this.parent(h))if(h===o)throw new Error("Setting "+c+" as parent of "+o+" would create a cycle");this.setNode(c)}return this.setNode(o),this._removeFromParentsChildList(o),this._parent[o]=c,this._children[c][o]=!0,this},r.prototype._removeFromParentsChildList=function(o){delete this._children[this._parent[o]][o]},r.prototype.parent=function(o){if(this._isCompound){var c=this._parent[o];if(c!==u)return c}},r.prototype.children=function(o){if(e.isUndefined(o)&&(o=u),this._isCompound){var c=this._children[o];if(c)return e.keys(c)}else{if(o===u)return this.nodes();if(this.hasNode(o))return[]}},r.prototype.predecessors=function(o){var c=this._preds[o];if(c)return e.keys(c)},r.prototype.successors=function(o){var c=this._sucs[o];if(c)return e.keys(c)},r.prototype.neighbors=function(o){var c=this.predecessors(o);if(c)return e.union(c,this.successors(o))},r.prototype.isLeaf=function(o){var c;return this.isDirected()?c=this.successors(o):c=this.neighbors(o),c.length===0},r.prototype.filterNodes=function(o){var c=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});c.setGraph(this.graph());var h=this;e.each(this._nodes,function(p,v){o(v)&&c.setNode(v,p)}),e.each(this._edgeObjs,function(p){c.hasNode(p.v)&&c.hasNode(p.w)&&c.setEdge(p,h.edge(p))});var l={};function m(p){var v=h.parent(p);return v===void 0||c.hasNode(v)?(l[p]=v,v):v in l?l[v]:m(v)}return this._isCompound&&e.each(c.nodes(),function(p){c.setParent(p,m(p))}),c},r.prototype.setDefaultEdgeLabel=function(o){return e.isFunction(o)||(o=e.constant(o)),this._defaultEdgeLabelFn=o,this},r.prototype.edgeCount=function(){return this._edgeCount},r.prototype.edges=function(){return e.values(this._edgeObjs)},r.prototype.setPath=function(o,c){var h=this,l=arguments;return e.reduce(o,function(m,p){return l.length>1?h.setEdge(m,p,c):h.setEdge(m,p),p}),this},r.prototype.setEdge=function(){var o,c,h,l,m=!1,p=arguments[0];typeof p=="object"&&p!==null&&"v"in p?(o=p.v,c=p.w,h=p.name,arguments.length===2&&(l=arguments[1],m=!0)):(o=p,c=arguments[1],h=arguments[3],arguments.length>2&&(l=arguments[2],m=!0)),o=""+o,c=""+c,e.isUndefined(h)||(h=""+h);var v=i(this._isDirected,o,c,h);if(e.has(this._edgeLabels,v))return m&&(this._edgeLabels[v]=l),this;if(!e.isUndefined(h)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(o),this.setNode(c),this._edgeLabels[v]=m?l:this._defaultEdgeLabelFn(o,c,h);var g=f(this._isDirected,o,c,h);return o=g.v,c=g.w,Object.freeze(g),this._edgeObjs[v]=g,t(this._preds[c],o),t(this._sucs[o],c),this._in[c][v]=g,this._out[o][v]=g,this._edgeCount++,this},r.prototype.edge=function(o,c,h){var l=arguments.length===1?d(this._isDirected,arguments[0]):i(this._isDirected,o,c,h);return this._edgeLabels[l]},r.prototype.hasEdge=function(o,c,h){var l=arguments.length===1?d(this._isDirected,arguments[0]):i(this._isDirected,o,c,h);return e.has(this._edgeLabels,l)},r.prototype.removeEdge=function(o,c,h){var l=arguments.length===1?d(this._isDirected,arguments[0]):i(this._isDirected,o,c,h),m=this._edgeObjs[l];return m&&(o=m.v,c=m.w,delete this._edgeLabels[l],delete this._edgeObjs[l],s(this._preds[c],o),s(this._sucs[o],c),delete this._in[c][l],delete this._out[o][l],this._edgeCount--),this},r.prototype.inEdges=function(o,c){var h=this._in[o];if(h){var l=e.values(h);return c?e.filter(l,function(m){return m.v===c}):l}},r.prototype.outEdges=function(o,c){var h=this._out[o];if(h){var l=e.values(h);return c?e.filter(l,function(m){return m.w===c}):l}},r.prototype.nodeEdges=function(o,c){var h=this.inEdges(o,c);if(h)return h.concat(this.outEdges(o,c))};function t(o,c){o[c]?o[c]++:o[c]=1}function s(o,c){--o[c]||delete o[c]}function i(o,c,h,l){var m=""+c,p=""+h;if(!o&&m>p){var v=m;m=p,p=v}return m+n+p+n+(e.isUndefined(l)?a:l)}function f(o,c,h,l){var m=""+c,p=""+h;if(!o&&m>p){var v=m;m=p,p=v}var g={v:m,w:p};return l&&(g.name=l),g}function d(o,c){return i(o,c.v,c.w,c.name)}return hn}var ln,iu;function jf(){return iu||(iu=1,ln="2.1.8"),ln}var vn,au;function Kf(){return au||(au=1,vn={Graph:oi(),version:jf()}),vn}var pn,uu;function zf(){if(uu)return pn;uu=1;var e=X(),a=oi();pn={write:u,read:t};function u(s){var i={options:{directed:s.isDirected(),multigraph:s.isMultigraph(),compound:s.isCompound()},nodes:n(s),edges:r(s)};return e.isUndefined(s.graph())||(i.value=e.clone(s.graph())),i}function n(s){return e.map(s.nodes(),function(i){var f=s.node(i),d=s.parent(i),o={v:i};return e.isUndefined(f)||(o.value=f),e.isUndefined(d)||(o.parent=d),o})}function r(s){return e.map(s.edges(),function(i){var f=s.edge(i),d={v:i.v,w:i.w};return e.isUndefined(i.name)||(d.name=i.name),e.isUndefined(f)||(d.value=f),d})}function t(s){var i=new a(s.options).setGraph(s.value);return e.each(s.nodes,function(f){i.setNode(f.v,f.value),f.parent&&i.setParent(f.v,f.parent)}),e.each(s.edges,function(f){i.setEdge({v:f.v,w:f.w,name:f.name},f.value)}),i}return pn}var gn,su;function Yf(){if(su)return gn;su=1;var e=X();gn=a;function a(u){var n={},r=[],t;function s(i){e.has(n,i)||(n[i]=!0,t.push(i),e.each(u.successors(i),s),e.each(u.predecessors(i),s))}return e.each(u.nodes(),function(i){t=[],s(i),t.length&&r.push(t)}),r}return gn}var _n,ou;function yo(){if(ou)return _n;ou=1;var e=X();_n=a;function a(){this._arr=[],this._keyIndices={}}return a.prototype.size=function(){return this._arr.length},a.prototype.keys=function(){return this._arr.map(function(u){return u.key})},a.prototype.has=function(u){return e.has(this._keyIndices,u)},a.prototype.priority=function(u){var n=this._keyIndices[u];if(n!==void 0)return this._arr[n].priority},a.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},a.prototype.add=function(u,n){var r=this._keyIndices;if(u=String(u),!e.has(r,u)){var t=this._arr,s=t.length;return r[u]=s,t.push({key:u,priority:n}),this._decrease(s),!0}return!1},a.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var u=this._arr.pop();return delete this._keyIndices[u.key],this._heapify(0),u.key},a.prototype.decrease=function(u,n){var r=this._keyIndices[u];if(n>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+u+" Old: "+this._arr[r].priority+" New: "+n);this._arr[r].priority=n,this._decrease(r)},a.prototype._heapify=function(u){var n=this._arr,r=2*u,t=r+1,s=u;r<n.length&&(s=n[r].priority<n[s].priority?r:s,t<n.length&&(s=n[t].priority<n[s].priority?t:s),s!==u&&(this._swap(u,s),this._heapify(s)))},a.prototype._decrease=function(u){for(var n=this._arr,r=n[u].priority,t;u!==0&&(t=u>>1,!(n[t].priority<r));)this._swap(u,t),u=t},a.prototype._swap=function(u,n){var r=this._arr,t=this._keyIndices,s=r[u],i=r[n];r[u]=i,r[n]=s,t[i.key]=u,t[s.key]=n},_n}var bn,fu;function mo(){if(fu)return bn;fu=1;var e=X(),a=yo();bn=n;var u=e.constant(1);function n(t,s,i,f){return r(t,String(s),i||u,f||function(d){return t.outEdges(d)})}function r(t,s,i,f){var d={},o=new a,c,h,l=function(m){var p=m.v!==c?m.v:m.w,v=d[p],g=i(m),b=h.distance+g;if(g<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+m+" Weight: "+g);b<v.distance&&(v.distance=b,v.predecessor=c,o.decrease(p,b))};for(t.nodes().forEach(function(m){var p=m===s?0:Number.POSITIVE_INFINITY;d[m]={distance:p},o.add(m,p)});o.size()>0&&(c=o.removeMin(),h=d[c],h.distance!==Number.POSITIVE_INFINITY);)f(c).forEach(l);return d}return bn}var yn,du;function $f(){if(du)return yn;du=1;var e=mo(),a=X();yn=u;function u(n,r,t){return a.transform(n.nodes(),function(s,i){s[i]=e(n,i,r,t)},{})}return yn}var mn,cu;function qo(){if(cu)return mn;cu=1;var e=X();mn=a;function a(u){var n=0,r=[],t={},s=[];function i(f){var d=t[f]={onStack:!0,lowlink:n,index:n++};if(r.push(f),u.successors(f).forEach(function(h){e.has(t,h)?t[h].onStack&&(d.lowlink=Math.min(d.lowlink,t[h].index)):(i(h),d.lowlink=Math.min(d.lowlink,t[h].lowlink))}),d.lowlink===d.index){var o=[],c;do c=r.pop(),t[c].onStack=!1,o.push(c);while(f!==c);s.push(o)}}return u.nodes().forEach(function(f){e.has(t,f)||i(f)}),s}return mn}var qn,hu;function Xf(){if(hu)return qn;hu=1;var e=X(),a=qo();qn=u;function u(n){return e.filter(a(n),function(r){return r.length>1||r.length===1&&n.hasEdge(r[0],r[0])})}return qn}var En,lu;function Zf(){if(lu)return En;lu=1;var e=X();En=u;var a=e.constant(1);function u(r,t,s){return n(r,t||a,s||function(i){return r.outEdges(i)})}function n(r,t,s){var i={},f=r.nodes();return f.forEach(function(d){i[d]={},i[d][d]={distance:0},f.forEach(function(o){d!==o&&(i[d][o]={distance:Number.POSITIVE_INFINITY})}),s(d).forEach(function(o){var c=o.v===d?o.w:o.v,h=t(o);i[d][c]={distance:h,predecessor:d}})}),f.forEach(function(d){var o=i[d];f.forEach(function(c){var h=i[c];f.forEach(function(l){var m=h[d],p=o[l],v=h[l],g=m.distance+p.distance;g<v.distance&&(v.distance=g,v.predecessor=p.predecessor)})})}),i}return En}var wn,vu;function Eo(){if(vu)return wn;vu=1;var e=X();wn=a,a.CycleException=u;function a(n){var r={},t={},s=[];function i(f){if(e.has(t,f))throw new u;e.has(r,f)||(t[f]=!0,r[f]=!0,e.each(n.predecessors(f),i),delete t[f],s.push(f))}if(e.each(n.sinks(),i),e.size(r)!==n.nodeCount())throw new u;return s}function u(){}return u.prototype=new Error,wn}var Rn,pu;function Qf(){if(pu)return Rn;pu=1;var e=Eo();Rn=a;function a(u){try{e(u)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return Rn}var In,gu;function wo(){if(gu)return In;gu=1;var e=X();In=a;function a(n,r,t){e.isArray(r)||(r=[r]);var s=(n.isDirected()?n.successors:n.neighbors).bind(n),i=[],f={};return e.each(r,function(d){if(!n.hasNode(d))throw new Error("Graph does not have node: "+d);u(n,d,t==="post",f,s,i)}),i}function u(n,r,t,s,i,f){e.has(s,r)||(s[r]=!0,t||f.push(r),e.each(i(r),function(d){u(n,d,t,s,i,f)}),t&&f.push(r))}return In}var Tn,_u;function Jf(){if(_u)return Tn;_u=1;var e=wo();Tn=a;function a(u,n){return e(u,n,"post")}return Tn}var Sn,bu;function ed(){if(bu)return Sn;bu=1;var e=wo();Sn=a;function a(u,n){return e(u,n,"pre")}return Sn}var Cn,yu;function rd(){if(yu)return Cn;yu=1;var e=X(),a=oi(),u=yo();Cn=n;function n(r,t){var s=new a,i={},f=new u,d;function o(h){var l=h.v===d?h.w:h.v,m=f.priority(l);if(m!==void 0){var p=t(h);p<m&&(i[l]=d,f.decrease(l,p))}}if(r.nodeCount()===0)return s;e.each(r.nodes(),function(h){f.add(h,Number.POSITIVE_INFINITY),s.setNode(h)}),f.decrease(r.nodes()[0],0);for(var c=!1;f.size()>0;){if(d=f.removeMin(),e.has(i,d))s.setEdge(d,i[d]);else{if(c)throw new Error("Input graph is not connected: "+r);c=!0}r.nodeEdges(d).forEach(o)}return s}return Cn}var An,mu;function nd(){return mu||(mu=1,An={components:Yf(),dijkstra:mo(),dijkstraAll:$f(),findCycles:Xf(),floydWarshall:Zf(),isAcyclic:Qf(),postorder:Jf(),preorder:ed(),prim:rd(),tarjan:qo(),topsort:Eo()}),An}var On,qu;function td(){if(qu)return On;qu=1;var e=Kf();return On={Graph:e.Graph,json:zf(),alg:nd(),version:e.version},On}var Nn,Eu;function Z(){if(Eu)return Nn;Eu=1;var e;if(typeof ai=="function")try{e=td()}catch{}return e||(e=window.graphlib),Nn=e,Nn}var xn,wu;function we(){if(wu)return xn;wu=1;var e=I.requireEq(),a=I.requireIsArrayLike(),u=I.require_isIndex(),n=I.requireIsObject();function r(t,s,i){if(!n(i))return!1;var f=typeof s;return(f=="number"?a(i)&&u(s,i.length):f=="string"&&s in i)?e(i[s],t):!1}return xn=r,xn}var kn,Ru;function id(){if(Ru)return kn;Ru=1;var e=Ee(),a=I.requireEq(),u=we(),n=I.requireKeysIn(),r=Object.prototype,t=r.hasOwnProperty,s=e(function(i,f){i=Object(i);var d=-1,o=f.length,c=o>2?f[2]:void 0;for(c&&u(f[0],f[1],c)&&(o=1);++d<o;)for(var h=f[d],l=n(h),m=-1,p=l.length;++m<p;){var v=l[m],g=i[v];(g===void 0||a(g,r[v])&&!t.call(i,v))&&(i[v]=h[v])}return i});return kn=s,kn}var Ln,Iu;function ad(){if(Iu)return Ln;Iu=1;var e=re(),a=I.requireIsArrayLike(),u=I.requireKeys();function n(r){return function(t,s,i){var f=Object(t);if(!a(t)){var d=e(s,3);t=u(t),s=function(c){return d(f[c],c,f)}}var o=r(t,s,i);return o>-1?f[d?t[o]:o]:void 0}}return Ln=n,Ln}var Pn,Tu;function ud(){if(Tu)return Pn;Tu=1;var e=/\s/;function a(u){for(var n=u.length;n--&&e.test(u.charAt(n)););return n}return Pn=a,Pn}var Mn,Su;function sd(){if(Su)return Mn;Su=1;var e=ud(),a=/^\s+/;function u(n){return n&&n.slice(0,e(n)+1).replace(a,"")}return Mn=u,Mn}var Fn,Cu;function od(){if(Cu)return Fn;Cu=1;var e=sd(),a=I.requireIsObject(),u=oe(),n=NaN,r=/^[-+]0x[0-9a-f]+$/i,t=/^0b[01]+$/i,s=/^0o[0-7]+$/i,i=parseInt;function f(d){if(typeof d=="number")return d;if(u(d))return n;if(a(d)){var o=typeof d.valueOf=="function"?d.valueOf():d;d=a(o)?o+"":o}if(typeof d!="string")return d===0?d:+d;d=e(d);var c=t.test(d);return c||s.test(d)?i(d.slice(2),c?2:8):r.test(d)?n:+d}return Fn=f,Fn}var Gn,Au;function Ro(){if(Au)return Gn;Au=1;var e=od(),a=1/0,u=17976931348623157e292;function n(r){if(!r)return r===0?r:0;if(r=e(r),r===a||r===-1/0){var t=r<0?-1:1;return t*u}return r===r?r:0}return Gn=n,Gn}var Dn,Ou;function fd(){if(Ou)return Dn;Ou=1;var e=Ro();function a(u){var n=e(u),r=n%1;return n===n?r?n-r:n:0}return Dn=a,Dn}var Un,Nu;function dd(){if(Nu)return Un;Nu=1;var e=go(),a=re(),u=fd(),n=Math.max;function r(t,s,i){var f=t==null?0:t.length;if(!f)return-1;var d=i==null?0:u(i);return d<0&&(d=n(f+d,0)),e(t,a(s,3),d)}return Un=r,Un}var Bn,xu;function cd(){if(xu)return Bn;xu=1;var e=ad(),a=dd(),u=e(a);return Bn=u,Bn}var Hn,ku;function Io(){if(ku)return Hn;ku=1;var e=si();function a(u){var n=u==null?0:u.length;return n?e(u,1):[]}return Hn=a,Hn}var Wn,Lu;function hd(){if(Lu)return Wn;Lu=1;var e=ei(),a=io(),u=I.requireKeysIn();function n(r,t){return r==null?r:e(r,a(t),u)}return Wn=n,Wn}var Vn,Pu;function ld(){if(Pu)return Vn;Pu=1;function e(a){var u=a==null?0:a.length;return u?a[u-1]:void 0}return Vn=e,Vn}var jn,Mu;function fi(){if(Mu)return jn;Mu=1;var e=oe();function a(u,n,r){for(var t=-1,s=u.length;++t<s;){var i=u[t],f=n(i);if(f!=null&&(d===void 0?f===f&&!e(f):r(f,d)))var d=f,o=i}return o}return jn=a,jn}var Kn,Fu;function vd(){if(Fu)return Kn;Fu=1;function e(a,u){return a>u}return Kn=e,Kn}var zn,Gu;function pd(){if(Gu)return zn;Gu=1;var e=fi(),a=vd(),u=ae();function n(r){return r&&r.length?e(r,u,a):void 0}return zn=n,zn}var Yn,Du;function To(){if(Du)return Yn;Du=1;var e=I.require_baseAssignValue(),a=I.requireEq();function u(n,r,t){(t!==void 0&&!a(n[r],t)||t===void 0&&!(r in n))&&e(n,r,t)}return Yn=u,Yn}var $n,Uu;function gd(){if(Uu)return $n;Uu=1;var e=I.require_baseGetTag(),a=I.require_getPrototype(),u=I.requireIsObjectLike(),n="[object Object]",r=Function.prototype,t=Object.prototype,s=r.toString,i=t.hasOwnProperty,f=s.call(Object);function d(o){if(!u(o)||e(o)!=n)return!1;var c=a(o);if(c===null)return!0;var h=i.call(c,"constructor")&&c.constructor;return typeof h=="function"&&h instanceof h&&s.call(h)==f}return $n=d,$n}var Xn,Bu;function So(){if(Bu)return Xn;Bu=1;function e(a,u){if(!(u==="constructor"&&typeof a[u]=="function")&&u!="__proto__")return a[u]}return Xn=e,Xn}var Zn,Hu;function _d(){if(Hu)return Zn;Hu=1;var e=I.require_copyObject(),a=I.requireKeysIn();function u(n){return e(n,a(n))}return Zn=u,Zn}var Qn,Wu;function bd(){if(Wu)return Qn;Wu=1;var e=To(),a=I.require_cloneBuffer(),u=I.require_cloneTypedArray(),n=I.require_copyArray(),r=I.require_initCloneObject(),t=I.requireIsArguments(),s=I.requireIsArray(),i=_o(),f=I.requireIsBuffer(),d=I.requireIsFunction(),o=I.requireIsObject(),c=gd(),h=I.requireIsTypedArray(),l=So(),m=_d();function p(v,g,b,_,y,q,R){var E=l(v,b),C=l(g,b),O=R.get(C);if(O){e(v,b,O);return}var S=q?q(E,C,b+"",v,g,R):void 0,k=S===void 0;if(k){var L=s(C),P=!L&&f(C),M=!L&&!P&&h(C);S=C,L||P||M?s(E)?S=E:i(E)?S=n(E):P?(k=!1,S=a(C,!0)):M?(k=!1,S=u(C,!0)):S=[]:c(C)||t(C)?(S=E,t(E)?S=m(E):(!o(E)||d(E))&&(S=r(C))):k=!1}k&&(R.set(C,S),y(S,C,_,q,R),R.delete(C)),e(v,b,S)}return Qn=p,Qn}var Jn,Vu;function yd(){if(Vu)return Jn;Vu=1;var e=I.require_Stack(),a=To(),u=ei(),n=bd(),r=I.requireIsObject(),t=I.requireKeysIn(),s=So();function i(f,d,o,c,h){f!==d&&u(d,function(l,m){if(h||(h=new e),r(l))n(f,d,m,o,i,c,h);else{var p=c?c(s(f,m),l,m+"",f,d,h):void 0;p===void 0&&(p=l),a(f,m,p)}},t)}return Jn=i,Jn}var et,ju;function md(){if(ju)return et;ju=1;var e=Ee(),a=we();function u(n){return e(function(r,t){var s=-1,i=t.length,f=i>1?t[i-1]:void 0,d=i>2?t[2]:void 0;for(f=n.length>3&&typeof f=="function"?(i--,f):void 0,d&&a(t[0],t[1],d)&&(f=i<3?void 0:f,i=1),r=Object(r);++s<i;){var o=t[s];o&&n(r,o,s,f)}return r})}return et=u,et}var rt,Ku;function qd(){if(Ku)return rt;Ku=1;var e=yd(),a=md(),u=a(function(n,r,t){e(n,r,t)});return rt=u,rt}var nt,zu;function Co(){if(zu)return nt;zu=1;function e(a,u){return a<u}return nt=e,nt}var tt,Yu;function Ed(){if(Yu)return tt;Yu=1;var e=fi(),a=Co(),u=ae();function n(r){return r&&r.length?e(r,u,a):void 0}return tt=n,tt}var it,$u;function wd(){if($u)return it;$u=1;var e=fi(),a=re(),u=Co();function n(r,t){return r&&r.length?e(r,a(t,2),u):void 0}return it=n,it}var at,Xu;function Rd(){if(Xu)return at;Xu=1;var e=I.require_root(),a=function(){return e.Date.now()};return at=a,at}var ut,Zu;function Id(){if(Zu)return ut;Zu=1;var e=I.require_assignValue(),a=ye(),u=I.require_isIndex(),n=I.requireIsObject(),r=le();function t(s,i,f,d){if(!n(s))return s;i=a(i,s);for(var o=-1,c=i.length,h=c-1,l=s;l!=null&&++o<c;){var m=r(i[o]),p=f;if(m==="__proto__"||m==="constructor"||m==="prototype")return s;if(o!=h){var v=l[m];p=d?d(v,m,l):void 0,p===void 0&&(p=n(v)?v:u(i[o+1])?[]:{})}e(l,m,p),l=l[m]}return s}return ut=t,ut}var st,Qu;function Td(){if(Qu)return st;Qu=1;var e=me(),a=Id(),u=ye();function n(r,t,s){for(var i=-1,f=t.length,d={};++i<f;){var o=t[i],c=e(r,o);s(c,o)&&a(d,u(o,r),c)}return d}return st=n,st}var ot,Ju;function Sd(){if(Ju)return ot;Ju=1;var e=Td(),a=Zs();function u(n,r){return e(n,r,function(t,s){return a(n,s)})}return ot=u,ot}var ft,es;function Cd(){if(es)return ft;es=1;var e=Io(),a=vo(),u=po();function n(r){return u(a(r,void 0,e),r+"")}return ft=n,ft}var dt,rs;function Ad(){if(rs)return dt;rs=1;var e=Sd(),a=Cd(),u=a(function(n,r){return n==null?{}:e(n,r)});return dt=u,dt}var ct,ns;function Od(){if(ns)return ct;ns=1;var e=Math.ceil,a=Math.max;function u(n,r,t,s){for(var i=-1,f=a(e((r-n)/(t||1)),0),d=Array(f);f--;)d[s?f:++i]=n,n+=t;return d}return ct=u,ct}var ht,ts;function Nd(){if(ts)return ht;ts=1;var e=Od(),a=we(),u=Ro();function n(r){return function(t,s,i){return i&&typeof i!="number"&&a(t,s,i)&&(s=i=void 0),t=u(t),s===void 0?(s=t,t=0):s=u(s),i=i===void 0?t<s?1:-1:u(i),e(t,s,i,r)}}return ht=n,ht}var lt,is;function xd(){if(is)return lt;is=1;var e=Nd(),a=e();return lt=a,lt}var vt,as;function kd(){if(as)return vt;as=1;function e(a,u){var n=a.length;for(a.sort(u);n--;)a[n]=a[n].value;return a}return vt=e,vt}var pt,us;function Ld(){if(us)return pt;us=1;var e=oe();function a(u,n){if(u!==n){var r=u!==void 0,t=u===null,s=u===u,i=e(u),f=n!==void 0,d=n===null,o=n===n,c=e(n);if(!d&&!c&&!i&&u>n||i&&f&&o&&!d&&!c||t&&f&&o||!r&&o||!s)return 1;if(!t&&!i&&!c&&u<n||c&&r&&s&&!t&&!i||d&&r&&s||!f&&s||!o)return-1}return 0}return pt=a,pt}var gt,ss;function Pd(){if(ss)return gt;ss=1;var e=Ld();function a(u,n,r){for(var t=-1,s=u.criteria,i=n.criteria,f=s.length,d=r.length;++t<f;){var o=e(s[t],i[t]);if(o){if(t>=d)return o;var c=r[t];return o*(c=="desc"?-1:1)}}return u.index-n.index}return gt=a,gt}var _t,os;function Md(){if(os)return _t;os=1;var e=be(),a=me(),u=re(),n=co(),r=kd(),t=I.require_baseUnary(),s=Pd(),i=ae(),f=I.requireIsArray();function d(o,c,h){c.length?c=e(c,function(p){return f(p)?function(v){return a(v,p.length===1?p[0]:p)}:p}):c=[i];var l=-1;c=e(c,t(u));var m=n(o,function(p,v,g){var b=e(c,function(_){return _(p)});return{criteria:b,index:++l,value:p}});return r(m,function(p,v){return s(p,v,h)})}return _t=d,_t}var bt,fs;function Fd(){if(fs)return bt;fs=1;var e=si(),a=Md(),u=Ee(),n=we(),r=u(function(t,s){if(t==null)return[];var i=s.length;return i>1&&n(t,s[0],s[1])?s=[]:i>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),a(t,e(s,1),[])});return bt=r,bt}var yt,ds;function Gd(){if(ds)return yt;ds=1;var e=$s(),a=0;function u(n){var r=++a;return e(n)+r}return yt=u,yt}var mt,cs;function Dd(){if(cs)return mt;cs=1;function e(a,u,n){for(var r=-1,t=a.length,s=u.length,i={};++r<t;){var f=r<s?u[r]:void 0;n(i,a[r],f)}return i}return mt=e,mt}var qt,hs;function Ud(){if(hs)return qt;hs=1;var e=I.require_assignValue(),a=Dd();function u(n,r){return a(n||[],r||[],e)}return qt=u,qt}var Et,ls;function D(){if(ls)return Et;ls=1;var e;if(typeof ai=="function")try{e={cloneDeep:I.requireCloneDeep(),constant:ui(),defaults:id(),each:uo(),filter:so(),find:cd(),flatten:Io(),forEach:ao(),forIn:hd(),has:oo(),isUndefined:fo(),last:ld(),map:ho(),mapValues:Js(),max:pd(),merge:qd(),min:Ed(),minBy:wd(),now:Rd(),pick:Ad(),range:xd(),reduce:lo(),sortBy:Fd(),uniqueId:Gd(),values:bo(),zipObject:Ud()}}catch{}return e||(e=window._),Et=e,Et}var wt,vs;function Bd(){if(vs)return wt;vs=1,wt=e;function e(){var n={};n._next=n._prev=n,this._sentinel=n}e.prototype.dequeue=function(){var n=this._sentinel,r=n._prev;if(r!==n)return a(r),r},e.prototype.enqueue=function(n){var r=this._sentinel;n._prev&&n._next&&a(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r},e.prototype.toString=function(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,u)),t=t._prev;return"["+n.join(", ")+"]"};function a(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function u(n,r){if(n!=="_next"&&n!=="_prev")return r}return wt}var Rt,ps;function Hd(){if(ps)return Rt;ps=1;var e=D(),a=Z().Graph,u=Bd();Rt=r;var n=e.constant(1);function r(d,o){if(d.nodeCount()<=1)return[];var c=i(d,o||n),h=t(c.graph,c.buckets,c.zeroIdx);return e.flatten(e.map(h,function(l){return d.outEdges(l.v,l.w)}),!0)}function t(d,o,c){for(var h=[],l=o[o.length-1],m=o[0],p;d.nodeCount();){for(;p=m.dequeue();)s(d,o,c,p);for(;p=l.dequeue();)s(d,o,c,p);if(d.nodeCount()){for(var v=o.length-2;v>0;--v)if(p=o[v].dequeue(),p){h=h.concat(s(d,o,c,p,!0));break}}}return h}function s(d,o,c,h,l){var m=l?[]:void 0;return e.forEach(d.inEdges(h.v),function(p){var v=d.edge(p),g=d.node(p.v);l&&m.push({v:p.v,w:p.w}),g.out-=v,f(o,c,g)}),e.forEach(d.outEdges(h.v),function(p){var v=d.edge(p),g=p.w,b=d.node(g);b.in-=v,f(o,c,b)}),d.removeNode(h.v),m}function i(d,o){var c=new a,h=0,l=0;e.forEach(d.nodes(),function(v){c.setNode(v,{v,in:0,out:0})}),e.forEach(d.edges(),function(v){var g=c.edge(v.v,v.w)||0,b=o(v),_=g+b;c.setEdge(v.v,v.w,_),l=Math.max(l,c.node(v.v).out+=b),h=Math.max(h,c.node(v.w).in+=b)});var m=e.range(l+h+3).map(function(){return new u}),p=h+1;return e.forEach(c.nodes(),function(v){f(m,p,c.node(v))}),{graph:c,buckets:m,zeroIdx:p}}function f(d,o,c){c.out?c.in?d[c.out-c.in+o].enqueue(c):d[d.length-1].enqueue(c):d[0].enqueue(c)}return Rt}var It,gs;function Wd(){if(gs)return It;gs=1;var e=D(),a=Hd();It={run:u,undo:r};function u(t){var s=t.graph().acyclicer==="greedy"?a(t,i(t)):n(t);e.forEach(s,function(f){var d=t.edge(f);t.removeEdge(f),d.forwardName=f.name,d.reversed=!0,t.setEdge(f.w,f.v,d,e.uniqueId("rev"))});function i(f){return function(d){return f.edge(d).weight}}}function n(t){var s=[],i={},f={};function d(o){e.has(f,o)||(f[o]=!0,i[o]=!0,e.forEach(t.outEdges(o),function(c){e.has(i,c.w)?s.push(c):d(c.w)}),delete i[o])}return e.forEach(t.nodes(),d),s}function r(t){e.forEach(t.edges(),function(s){var i=t.edge(s);if(i.reversed){t.removeEdge(s);var f=i.forwardName;delete i.reversed,delete i.forwardName,t.setEdge(s.w,s.v,i,f)}})}return It}var Tt,_s;function z(){if(_s)return Tt;_s=1;var e=D(),a=Z().Graph;Tt={addDummyNode:u,simplify:n,asNonCompoundGraph:r,successorWeights:t,predecessorWeights:s,intersectRect:i,buildLayerMatrix:f,normalizeRanks:d,removeEmptyRanks:o,addBorderNode:c,maxRank:h,partition:l,time:m,notime:p};function u(v,g,b,_){var y;do y=e.uniqueId(_);while(v.hasNode(y));return b.dummy=g,v.setNode(y,b),y}function n(v){var g=new a().setGraph(v.graph());return e.forEach(v.nodes(),function(b){g.setNode(b,v.node(b))}),e.forEach(v.edges(),function(b){var _=g.edge(b.v,b.w)||{weight:0,minlen:1},y=v.edge(b);g.setEdge(b.v,b.w,{weight:_.weight+y.weight,minlen:Math.max(_.minlen,y.minlen)})}),g}function r(v){var g=new a({multigraph:v.isMultigraph()}).setGraph(v.graph());return e.forEach(v.nodes(),function(b){v.children(b).length||g.setNode(b,v.node(b))}),e.forEach(v.edges(),function(b){g.setEdge(b,v.edge(b))}),g}function t(v){var g=e.map(v.nodes(),function(b){var _={};return e.forEach(v.outEdges(b),function(y){_[y.w]=(_[y.w]||0)+v.edge(y).weight}),_});return e.zipObject(v.nodes(),g)}function s(v){var g=e.map(v.nodes(),function(b){var _={};return e.forEach(v.inEdges(b),function(y){_[y.v]=(_[y.v]||0)+v.edge(y).weight}),_});return e.zipObject(v.nodes(),g)}function i(v,g){var b=v.x,_=v.y,y=g.x-b,q=g.y-_,R=v.width/2,E=v.height/2;if(!y&&!q)throw new Error("Not possible to find intersection inside of the rectangle");var C,O;return Math.abs(q)*R>Math.abs(y)*E?(q<0&&(E=-E),C=E*y/q,O=E):(y<0&&(R=-R),C=R,O=R*q/y),{x:b+C,y:_+O}}function f(v){var g=e.map(e.range(h(v)+1),function(){return[]});return e.forEach(v.nodes(),function(b){var _=v.node(b),y=_.rank;e.isUndefined(y)||(g[y][_.order]=b)}),g}function d(v){var g=e.min(e.map(v.nodes(),function(b){return v.node(b).rank}));e.forEach(v.nodes(),function(b){var _=v.node(b);e.has(_,"rank")&&(_.rank-=g)})}function o(v){var g=e.min(e.map(v.nodes(),function(q){return v.node(q).rank})),b=[];e.forEach(v.nodes(),function(q){var R=v.node(q).rank-g;b[R]||(b[R]=[]),b[R].push(q)});var _=0,y=v.graph().nodeRankFactor;e.forEach(b,function(q,R){e.isUndefined(q)&&R%y!==0?--_:_&&e.forEach(q,function(E){v.node(E).rank+=_})})}function c(v,g,b,_){var y={width:0,height:0};return arguments.length>=4&&(y.rank=b,y.order=_),u(v,"border",y,g)}function h(v){return e.max(e.map(v.nodes(),function(g){var b=v.node(g).rank;if(!e.isUndefined(b))return b}))}function l(v,g){var b={lhs:[],rhs:[]};return e.forEach(v,function(_){g(_)?b.lhs.push(_):b.rhs.push(_)}),b}function m(v,g){var b=e.now();try{return g()}finally{console.log(v+" time: "+(e.now()-b)+"ms")}}function p(v,g){return g()}return Tt}var St,bs;function Vd(){if(bs)return St;bs=1;var e=D(),a=z();St={run:u,undo:r};function u(t){t.graph().dummyChains=[],e.forEach(t.edges(),function(s){n(t,s)})}function n(t,s){var i=s.v,f=t.node(i).rank,d=s.w,o=t.node(d).rank,c=s.name,h=t.edge(s),l=h.labelRank;if(o!==f+1){t.removeEdge(s);var m,p,v;for(v=0,++f;f<o;++v,++f)h.points=[],p={width:0,height:0,edgeLabel:h,edgeObj:s,rank:f},m=a.addDummyNode(t,"edge",p,"_d"),f===l&&(p.width=h.width,p.height=h.height,p.dummy="edge-label",p.labelpos=h.labelpos),t.setEdge(i,m,{weight:h.weight},c),v===0&&t.graph().dummyChains.push(m),i=m;t.setEdge(i,d,{weight:h.weight},c)}}function r(t){e.forEach(t.graph().dummyChains,function(s){var i=t.node(s),f=i.edgeLabel,d;for(t.setEdge(i.edgeObj,f);i.dummy;)d=t.successors(s)[0],t.removeNode(s),f.points.push({x:i.x,y:i.y}),i.dummy==="edge-label"&&(f.x=i.x,f.y=i.y,f.width=i.width,f.height=i.height),s=d,i=t.node(s)})}return St}var Ct,ys;function ge(){if(ys)return Ct;ys=1;var e=D();Ct={longestPath:a,slack:u};function a(n){var r={};function t(s){var i=n.node(s);if(e.has(r,s))return i.rank;r[s]=!0;var f=e.min(e.map(n.outEdges(s),function(d){return t(d.w)-n.edge(d).minlen}));return(f===Number.POSITIVE_INFINITY||f===void 0||f===null)&&(f=0),i.rank=f}e.forEach(n.sources(),t)}function u(n,r){return n.node(r.w).rank-n.node(r.v).rank-n.edge(r).minlen}return Ct}var At,ms;function Ao(){if(ms)return At;ms=1;var e=D(),a=Z().Graph,u=ge().slack;At=n;function n(i){var f=new a({directed:!1}),d=i.nodes()[0],o=i.nodeCount();f.setNode(d,{});for(var c,h;r(f,i)<o;)c=t(f,i),h=f.hasNode(c.v)?u(i,c):-u(i,c),s(f,i,h);return f}function r(i,f){function d(o){e.forEach(f.nodeEdges(o),function(c){var h=c.v,l=o===h?c.w:h;!i.hasNode(l)&&!u(f,c)&&(i.setNode(l,{}),i.setEdge(o,l,{}),d(l))})}return e.forEach(i.nodes(),d),i.nodeCount()}function t(i,f){return e.minBy(f.edges(),function(d){if(i.hasNode(d.v)!==i.hasNode(d.w))return u(f,d)})}function s(i,f,d){e.forEach(i.nodes(),function(o){f.node(o).rank+=d})}return At}var Ot,qs;function jd(){if(qs)return Ot;qs=1;var e=D(),a=Ao(),u=ge().slack,n=ge().longestPath,r=Z().alg.preorder,t=Z().alg.postorder,s=z().simplify;Ot=i,i.initLowLimValues=c,i.initCutValues=f,i.calcCutValue=o,i.leaveEdge=l,i.enterEdge=m,i.exchangeEdges=p;function i(_){_=s(_),n(_);var y=a(_);c(y),f(y,_);for(var q,R;q=l(y);)R=m(y,_,q),p(y,_,q,R)}function f(_,y){var q=t(_,_.nodes());q=q.slice(0,q.length-1),e.forEach(q,function(R){d(_,y,R)})}function d(_,y,q){var R=_.node(q),E=R.parent;_.edge(q,E).cutvalue=o(_,y,q)}function o(_,y,q){var R=_.node(q),E=R.parent,C=!0,O=y.edge(q,E),S=0;return O||(C=!1,O=y.edge(E,q)),S=O.weight,e.forEach(y.nodeEdges(q),function(k){var L=k.v===q,P=L?k.w:k.v;if(P!==E){var M=L===C,G=y.edge(k).weight;if(S+=M?G:-G,g(_,q,P)){var B=_.edge(q,P).cutvalue;S+=M?-B:B}}}),S}function c(_,y){arguments.length<2&&(y=_.nodes()[0]),h(_,{},1,y)}function h(_,y,q,R,E){var C=q,O=_.node(R);return y[R]=!0,e.forEach(_.neighbors(R),function(S){e.has(y,S)||(q=h(_,y,q,S,R))}),O.low=C,O.lim=q++,E?O.parent=E:delete O.parent,q}function l(_){return e.find(_.edges(),function(y){return _.edge(y).cutvalue<0})}function m(_,y,q){var R=q.v,E=q.w;y.hasEdge(R,E)||(R=q.w,E=q.v);var C=_.node(R),O=_.node(E),S=C,k=!1;C.lim>O.lim&&(S=O,k=!0);var L=e.filter(y.edges(),function(P){return k===b(_,_.node(P.v),S)&&k!==b(_,_.node(P.w),S)});return e.minBy(L,function(P){return u(y,P)})}function p(_,y,q,R){var E=q.v,C=q.w;_.removeEdge(E,C),_.setEdge(R.v,R.w,{}),c(_),f(_,y),v(_,y)}function v(_,y){var q=e.find(_.nodes(),function(E){return!y.node(E).parent}),R=r(_,q);R=R.slice(1),e.forEach(R,function(E){var C=_.node(E).parent,O=y.edge(E,C),S=!1;O||(O=y.edge(C,E),S=!0),y.node(E).rank=y.node(C).rank+(S?O.minlen:-O.minlen)})}function g(_,y,q){return _.hasEdge(y,q)}function b(_,y,q){return q.low<=y.lim&&y.lim<=q.lim}return Ot}var Nt,Es;function Kd(){if(Es)return Nt;Es=1;var e=ge(),a=e.longestPath,u=Ao(),n=jd();Nt=r;function r(f){switch(f.graph().ranker){case"network-simplex":i(f);break;case"tight-tree":s(f);break;case"longest-path":t(f);break;default:i(f)}}var t=a;function s(f){a(f),u(f)}function i(f){n(f)}return Nt}var xt,ws;function zd(){if(ws)return xt;ws=1;var e=D();xt=a;function a(r){var t=n(r);e.forEach(r.graph().dummyChains,function(s){for(var i=r.node(s),f=i.edgeObj,d=u(r,t,f.v,f.w),o=d.path,c=d.lca,h=0,l=o[h],m=!0;s!==f.w;){if(i=r.node(s),m){for(;(l=o[h])!==c&&r.node(l).maxRank<i.rank;)h++;l===c&&(m=!1)}if(!m){for(;h<o.length-1&&r.node(l=o[h+1]).minRank<=i.rank;)h++;l=o[h]}r.setParent(s,l),s=r.successors(s)[0]}})}function u(r,t,s,i){var f=[],d=[],o=Math.min(t[s].low,t[i].low),c=Math.max(t[s].lim,t[i].lim),h,l;h=s;do h=r.parent(h),f.push(h);while(h&&(t[h].low>o||c>t[h].lim));for(l=h,h=i;(h=r.parent(h))!==l;)d.push(h);return{path:f.concat(d.reverse()),lca:l}}function n(r){var t={},s=0;function i(f){var d=s;e.forEach(r.children(f),i),t[f]={low:d,lim:s++}}return e.forEach(r.children(),i),t}return xt}var kt,Rs;function Yd(){if(Rs)return kt;Rs=1;var e=D(),a=z();kt={run:u,cleanup:s};function u(i){var f=a.addDummyNode(i,"root",{},"_root"),d=r(i),o=e.max(e.values(d))-1,c=2*o+1;i.graph().nestingRoot=f,e.forEach(i.edges(),function(l){i.edge(l).minlen*=c});var h=t(i)+1;e.forEach(i.children(),function(l){n(i,f,c,h,o,d,l)}),i.graph().nodeRankFactor=c}function n(i,f,d,o,c,h,l){var m=i.children(l);if(!m.length){l!==f&&i.setEdge(f,l,{weight:0,minlen:d});return}var p=a.addBorderNode(i,"_bt"),v=a.addBorderNode(i,"_bb"),g=i.node(l);i.setParent(p,l),g.borderTop=p,i.setParent(v,l),g.borderBottom=v,e.forEach(m,function(b){n(i,f,d,o,c,h,b);var _=i.node(b),y=_.borderTop?_.borderTop:b,q=_.borderBottom?_.borderBottom:b,R=_.borderTop?o:2*o,E=y!==q?1:c-h[l]+1;i.setEdge(p,y,{weight:R,minlen:E,nestingEdge:!0}),i.setEdge(q,v,{weight:R,minlen:E,nestingEdge:!0})}),i.parent(l)||i.setEdge(f,p,{weight:0,minlen:c+h[l]})}function r(i){var f={};function d(o,c){var h=i.children(o);h&&h.length&&e.forEach(h,function(l){d(l,c+1)}),f[o]=c}return e.forEach(i.children(),function(o){d(o,1)}),f}function t(i){return e.reduce(i.edges(),function(f,d){return f+i.edge(d).weight},0)}function s(i){var f=i.graph();i.removeNode(f.nestingRoot),delete f.nestingRoot,e.forEach(i.edges(),function(d){var o=i.edge(d);o.nestingEdge&&i.removeEdge(d)})}return kt}var Lt,Is;function $d(){if(Is)return Lt;Is=1;var e=D(),a=z();Lt=u;function u(r){function t(s){var i=r.children(s),f=r.node(s);if(i.length&&e.forEach(i,t),e.has(f,"minRank")){f.borderLeft=[],f.borderRight=[];for(var d=f.minRank,o=f.maxRank+1;d<o;++d)n(r,"borderLeft","_bl",s,f,d),n(r,"borderRight","_br",s,f,d)}}e.forEach(r.children(),t)}function n(r,t,s,i,f,d){var o={width:0,height:0,rank:d,borderType:t},c=f[t][d-1],h=a.addDummyNode(r,"border",o,s);f[t][d]=h,r.setParent(h,i),c&&r.setEdge(c,h,{weight:1})}return Lt}var Pt,Ts;function Xd(){if(Ts)return Pt;Ts=1;var e=D();Pt={adjust:a,undo:u};function a(d){var o=d.graph().rankdir.toLowerCase();(o==="lr"||o==="rl")&&n(d)}function u(d){var o=d.graph().rankdir.toLowerCase();(o==="bt"||o==="rl")&&t(d),(o==="lr"||o==="rl")&&(i(d),n(d))}function n(d){e.forEach(d.nodes(),function(o){r(d.node(o))}),e.forEach(d.edges(),function(o){r(d.edge(o))})}function r(d){var o=d.width;d.width=d.height,d.height=o}function t(d){e.forEach(d.nodes(),function(o){s(d.node(o))}),e.forEach(d.edges(),function(o){var c=d.edge(o);e.forEach(c.points,s),e.has(c,"y")&&s(c)})}function s(d){d.y=-d.y}function i(d){e.forEach(d.nodes(),function(o){f(d.node(o))}),e.forEach(d.edges(),function(o){var c=d.edge(o);e.forEach(c.points,f),e.has(c,"x")&&f(c)})}function f(d){var o=d.x;d.x=d.y,d.y=o}return Pt}var Mt,Ss;function Zd(){if(Ss)return Mt;Ss=1;var e=D();Mt=a;function a(u){var n={},r=e.filter(u.nodes(),function(d){return!u.children(d).length}),t=e.max(e.map(r,function(d){return u.node(d).rank})),s=e.map(e.range(t+1),function(){return[]});function i(d){if(!e.has(n,d)){n[d]=!0;var o=u.node(d);s[o.rank].push(d),e.forEach(u.successors(d),i)}}var f=e.sortBy(r,function(d){return u.node(d).rank});return e.forEach(f,i),s}return Mt}var Ft,Cs;function Qd(){if(Cs)return Ft;Cs=1;var e=D();Ft=a;function a(n,r){for(var t=0,s=1;s<r.length;++s)t+=u(n,r[s-1],r[s]);return t}function u(n,r,t){for(var s=e.zipObject(t,e.map(t,function(h,l){return l})),i=e.flatten(e.map(r,function(h){return e.sortBy(e.map(n.outEdges(h),function(l){return{pos:s[l.w],weight:n.edge(l).weight}}),"pos")}),!0),f=1;f<t.length;)f<<=1;var d=2*f-1;f-=1;var o=e.map(new Array(d),function(){return 0}),c=0;return e.forEach(i.forEach(function(h){var l=h.pos+f;o[l]+=h.weight;for(var m=0;l>0;)l%2&&(m+=o[l+1]),l=l-1>>1,o[l]+=h.weight;c+=h.weight*m})),c}return Ft}var Gt,As;function Jd(){if(As)return Gt;As=1;var e=D();Gt=a;function a(u,n){return e.map(n,function(r){var t=u.inEdges(r);if(t.length){var s=e.reduce(t,function(i,f){var d=u.edge(f),o=u.node(f.v);return{sum:i.sum+d.weight*o.order,weight:i.weight+d.weight}},{sum:0,weight:0});return{v:r,barycenter:s.sum/s.weight,weight:s.weight}}else return{v:r}})}return Gt}var Dt,Os;function ec(){if(Os)return Dt;Os=1;var e=D();Dt=a;function a(r,t){var s={};e.forEach(r,function(f,d){var o=s[f.v]={indegree:0,in:[],out:[],vs:[f.v],i:d};e.isUndefined(f.barycenter)||(o.barycenter=f.barycenter,o.weight=f.weight)}),e.forEach(t.edges(),function(f){var d=s[f.v],o=s[f.w];!e.isUndefined(d)&&!e.isUndefined(o)&&(o.indegree++,d.out.push(s[f.w]))});var i=e.filter(s,function(f){return!f.indegree});return u(i)}function u(r){var t=[];function s(d){return function(o){o.merged||(e.isUndefined(o.barycenter)||e.isUndefined(d.barycenter)||o.barycenter>=d.barycenter)&&n(d,o)}}function i(d){return function(o){o.in.push(d),--o.indegree===0&&r.push(o)}}for(;r.length;){var f=r.pop();t.push(f),e.forEach(f.in.reverse(),s(f)),e.forEach(f.out,i(f))}return e.map(e.filter(t,function(d){return!d.merged}),function(d){return e.pick(d,["vs","i","barycenter","weight"])})}function n(r,t){var s=0,i=0;r.weight&&(s+=r.barycenter*r.weight,i+=r.weight),t.weight&&(s+=t.barycenter*t.weight,i+=t.weight),r.vs=t.vs.concat(r.vs),r.barycenter=s/i,r.weight=i,r.i=Math.min(t.i,r.i),t.merged=!0}return Dt}var Ut,Ns;function rc(){if(Ns)return Ut;Ns=1;var e=D(),a=z();Ut=u;function u(t,s){var i=a.partition(t,function(p){return e.has(p,"barycenter")}),f=i.lhs,d=e.sortBy(i.rhs,function(p){return-p.i}),o=[],c=0,h=0,l=0;f.sort(r(!!s)),l=n(o,d,l),e.forEach(f,function(p){l+=p.vs.length,o.push(p.vs),c+=p.barycenter*p.weight,h+=p.weight,l=n(o,d,l)});var m={vs:e.flatten(o,!0)};return h&&(m.barycenter=c/h,m.weight=h),m}function n(t,s,i){for(var f;s.length&&(f=e.last(s)).i<=i;)s.pop(),t.push(f.vs),i++;return i}function r(t){return function(s,i){return s.barycenter<i.barycenter?-1:s.barycenter>i.barycenter?1:t?i.i-s.i:s.i-i.i}}return Ut}var Bt,xs;function nc(){if(xs)return Bt;xs=1;var e=D(),a=Jd(),u=ec(),n=rc();Bt=r;function r(i,f,d,o){var c=i.children(f),h=i.node(f),l=h?h.borderLeft:void 0,m=h?h.borderRight:void 0,p={};l&&(c=e.filter(c,function(q){return q!==l&&q!==m}));var v=a(i,c);e.forEach(v,function(q){if(i.children(q.v).length){var R=r(i,q.v,d,o);p[q.v]=R,e.has(R,"barycenter")&&s(q,R)}});var g=u(v,d);t(g,p);var b=n(g,o);if(l&&(b.vs=e.flatten([l,b.vs,m],!0),i.predecessors(l).length)){var _=i.node(i.predecessors(l)[0]),y=i.node(i.predecessors(m)[0]);e.has(b,"barycenter")||(b.barycenter=0,b.weight=0),b.barycenter=(b.barycenter*b.weight+_.order+y.order)/(b.weight+2),b.weight+=2}return b}function t(i,f){e.forEach(i,function(d){d.vs=e.flatten(d.vs.map(function(o){return f[o]?f[o].vs:o}),!0)})}function s(i,f){e.isUndefined(i.barycenter)?(i.barycenter=f.barycenter,i.weight=f.weight):(i.barycenter=(i.barycenter*i.weight+f.barycenter*f.weight)/(i.weight+f.weight),i.weight+=f.weight)}return Bt}var Ht,ks;function tc(){if(ks)return Ht;ks=1;var e=D(),a=Z().Graph;Ht=u;function u(r,t,s){var i=n(r),f=new a({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(d){return r.node(d)});return e.forEach(r.nodes(),function(d){var o=r.node(d),c=r.parent(d);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(f.setNode(d),f.setParent(d,c||i),e.forEach(r[s](d),function(h){var l=h.v===d?h.w:h.v,m=f.edge(l,d),p=e.isUndefined(m)?0:m.weight;f.setEdge(l,d,{weight:r.edge(h).weight+p})}),e.has(o,"minRank")&&f.setNode(d,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),f}function n(r){for(var t;r.hasNode(t=e.uniqueId("_root")););return t}return Ht}var Wt,Ls;function ic(){if(Ls)return Wt;Ls=1;var e=D();Wt=a;function a(u,n,r){var t={},s;e.forEach(r,function(i){for(var f=u.parent(i),d,o;f;){if(d=u.parent(f),d?(o=t[d],t[d]=f):(o=s,s=f),o&&o!==f){n.setEdge(o,f);return}f=d}})}return Wt}var Vt,Ps;function ac(){if(Ps)return Vt;Ps=1;var e=D(),a=Zd(),u=Qd(),n=nc(),r=tc(),t=ic(),s=Z().Graph,i=z();Vt=f;function f(h){var l=i.maxRank(h),m=d(h,e.range(1,l+1),"inEdges"),p=d(h,e.range(l-1,-1,-1),"outEdges"),v=a(h);c(h,v);for(var g=Number.POSITIVE_INFINITY,b,_=0,y=0;y<4;++_,++y){o(_%2?m:p,_%4>=2),v=i.buildLayerMatrix(h);var q=u(h,v);q<g&&(y=0,b=e.cloneDeep(v),g=q)}c(h,b)}function d(h,l,m){return e.map(l,function(p){return r(h,p,m)})}function o(h,l){var m=new s;e.forEach(h,function(p){var v=p.graph().root,g=n(p,v,m,l);e.forEach(g.vs,function(b,_){p.node(b).order=_}),t(p,m,g.vs)})}function c(h,l){e.forEach(l,function(m){e.forEach(m,function(p,v){h.node(p).order=v})})}return Vt}var jt,Ms;function uc(){if(Ms)return jt;Ms=1;var e=D(),a=Z().Graph,u=z();jt={positionX:m,findType1Conflicts:n,findType2Conflicts:r,addConflict:s,hasConflict:i,verticalAlignment:f,horizontalCompaction:d,alignCoordinates:h,findSmallestWidthAlignment:c,balance:l};function n(g,b){var _={};function y(q,R){var E=0,C=0,O=q.length,S=e.last(R);return e.forEach(R,function(k,L){var P=t(g,k),M=P?g.node(P).order:O;(P||k===S)&&(e.forEach(R.slice(C,L+1),function(G){e.forEach(g.predecessors(G),function(B){var te=g.node(B),ie=te.order;(ie<E||M<ie)&&!(te.dummy&&g.node(G).dummy)&&s(_,B,G)})}),C=L+1,E=M)}),R}return e.reduce(b,y),_}function r(g,b){var _={};function y(R,E,C,O,S){var k;e.forEach(e.range(E,C),function(L){k=R[L],g.node(k).dummy&&e.forEach(g.predecessors(k),function(P){var M=g.node(P);M.dummy&&(M.order<O||M.order>S)&&s(_,P,k)})})}function q(R,E){var C=-1,O,S=0;return e.forEach(E,function(k,L){if(g.node(k).dummy==="border"){var P=g.predecessors(k);P.length&&(O=g.node(P[0]).order,y(E,S,L,C,O),S=L,C=O)}y(E,S,E.length,O,R.length)}),E}return e.reduce(b,q),_}function t(g,b){if(g.node(b).dummy)return e.find(g.predecessors(b),function(_){return g.node(_).dummy})}function s(g,b,_){if(b>_){var y=b;b=_,_=y}var q=g[b];q||(g[b]=q={}),q[_]=!0}function i(g,b,_){if(b>_){var y=b;b=_,_=y}return e.has(g[b],_)}function f(g,b,_,y){var q={},R={},E={};return e.forEach(b,function(C){e.forEach(C,function(O,S){q[O]=O,R[O]=O,E[O]=S})}),e.forEach(b,function(C){var O=-1;e.forEach(C,function(S){var k=y(S);if(k.length){k=e.sortBy(k,function(B){return E[B]});for(var L=(k.length-1)/2,P=Math.floor(L),M=Math.ceil(L);P<=M;++P){var G=k[P];R[S]===S&&O<E[G]&&!i(_,S,G)&&(R[G]=S,R[S]=q[S]=q[G],O=E[G])}}})}),{root:q,align:R}}function d(g,b,_,y,q){var R={},E=o(g,b,_,q),C=q?"borderLeft":"borderRight";function O(L,P){for(var M=E.nodes(),G=M.pop(),B={};G;)B[G]?L(G):(B[G]=!0,M.push(G),M=M.concat(P(G))),G=M.pop()}function S(L){R[L]=E.inEdges(L).reduce(function(P,M){return Math.max(P,R[M.v]+E.edge(M))},0)}function k(L){var P=E.outEdges(L).reduce(function(G,B){return Math.min(G,R[B.w]-E.edge(B))},Number.POSITIVE_INFINITY),M=g.node(L);P!==Number.POSITIVE_INFINITY&&M.borderType!==C&&(R[L]=Math.max(R[L],P))}return O(S,E.predecessors.bind(E)),O(k,E.successors.bind(E)),e.forEach(y,function(L){R[L]=R[_[L]]}),R}function o(g,b,_,y){var q=new a,R=g.graph(),E=p(R.nodesep,R.edgesep,y);return e.forEach(b,function(C){var O;e.forEach(C,function(S){var k=_[S];if(q.setNode(k),O){var L=_[O],P=q.edge(L,k);q.setEdge(L,k,Math.max(E(g,S,O),P||0))}O=S})}),q}function c(g,b){return e.minBy(e.values(b),function(_){var y=Number.NEGATIVE_INFINITY,q=Number.POSITIVE_INFINITY;return e.forIn(_,function(R,E){var C=v(g,E)/2;y=Math.max(R+C,y),q=Math.min(R-C,q)}),y-q})}function h(g,b){var _=e.values(b),y=e.min(_),q=e.max(_);e.forEach(["u","d"],function(R){e.forEach(["l","r"],function(E){var C=R+E,O=g[C],S;if(O!==b){var k=e.values(O);S=E==="l"?y-e.min(k):q-e.max(k),S&&(g[C]=e.mapValues(O,function(L){return L+S}))}})})}function l(g,b){return e.mapValues(g.ul,function(_,y){if(b)return g[b.toLowerCase()][y];var q=e.sortBy(e.map(g,y));return(q[1]+q[2])/2})}function m(g){var b=u.buildLayerMatrix(g),_=e.merge(n(g,b),r(g,b)),y={},q;e.forEach(["u","d"],function(E){q=E==="u"?b:e.values(b).reverse(),e.forEach(["l","r"],function(C){C==="r"&&(q=e.map(q,function(L){return e.values(L).reverse()}));var O=(E==="u"?g.predecessors:g.successors).bind(g),S=f(g,q,_,O),k=d(g,q,S.root,S.align,C==="r");C==="r"&&(k=e.mapValues(k,function(L){return-L})),y[E+C]=k})});var R=c(g,y);return h(y,R),l(y,g.graph().align)}function p(g,b,_){return function(y,q,R){var E=y.node(q),C=y.node(R),O=0,S;if(O+=E.width/2,e.has(E,"labelpos"))switch(E.labelpos.toLowerCase()){case"l":S=-E.width/2;break;case"r":S=E.width/2;break}if(S&&(O+=_?S:-S),S=0,O+=(E.dummy?b:g)/2,O+=(C.dummy?b:g)/2,O+=C.width/2,e.has(C,"labelpos"))switch(C.labelpos.toLowerCase()){case"l":S=C.width/2;break;case"r":S=-C.width/2;break}return S&&(O+=_?S:-S),S=0,O}}function v(g,b){return g.node(b).width}return jt}var Kt,Fs;function sc(){if(Fs)return Kt;Fs=1;var e=D(),a=z(),u=uc().positionX;Kt=n;function n(t){t=a.asNonCompoundGraph(t),r(t),e.forEach(u(t),function(s,i){t.node(i).x=s})}function r(t){var s=a.buildLayerMatrix(t),i=t.graph().ranksep,f=0;e.forEach(s,function(d){var o=e.max(e.map(d,function(c){return t.node(c).height}));e.forEach(d,function(c){t.node(c).y=f+o/2}),f+=o+i})}return Kt}var zt,Gs;function oc(){if(Gs)return zt;Gs=1;var e=D(),a=Wd(),u=Vd(),n=Kd(),r=z().normalizeRanks,t=zd(),s=z().removeEmptyRanks,i=Yd(),f=$d(),d=Xd(),o=ac(),c=sc(),h=z(),l=Z().Graph;zt=m;function m(w,T){var A=T&&T.debugTiming?h.time:h.notime;A("layout",function(){var x=A(" buildLayoutGraph",function(){return O(w)});A(" runLayout",function(){p(x,A)}),A(" updateInputGraph",function(){v(w,x)})})}function p(w,T){T(" makeSpaceForEdgeLabels",function(){S(w)}),T(" removeSelfEdges",function(){N(w)}),T(" acyclic",function(){a.run(w)}),T(" nestingGraph.run",function(){i.run(w)}),T(" rank",function(){n(h.asNonCompoundGraph(w))}),T(" injectEdgeLabelProxies",function(){k(w)}),T(" removeEmptyRanks",function(){s(w)}),T(" nestingGraph.cleanup",function(){i.cleanup(w)}),T(" normalizeRanks",function(){r(w)}),T(" assignRankMinMax",function(){L(w)}),T(" removeEdgeLabelProxies",function(){P(w)}),T(" normalize.run",function(){u.run(w)}),T(" parentDummyChains",function(){t(w)}),T(" addBorderSegments",function(){f(w)}),T(" order",function(){o(w)}),T(" insertSelfEdges",function(){V(w)}),T(" adjustCoordinateSystem",function(){d.adjust(w)}),T(" position",function(){c(w)}),T(" positionSelfEdges",function(){j(w)}),T(" removeBorderNodes",function(){ie(w)}),T(" normalize.undo",function(){u.undo(w)}),T(" fixupEdgeLabelCoords",function(){B(w)}),T(" undoCoordinateSystem",function(){d.undo(w)}),T(" translateGraph",function(){M(w)}),T(" assignNodeIntersects",function(){G(w)}),T(" reversePoints",function(){te(w)}),T(" acyclic.undo",function(){a.undo(w)})}function v(w,T){e.forEach(w.nodes(),function(A){var x=w.node(A),F=T.node(A);x&&(x.x=F.x,x.y=F.y,T.children(A).length&&(x.width=F.width,x.height=F.height))}),e.forEach(w.edges(),function(A){var x=w.edge(A),F=T.edge(A);x.points=F.points,e.has(F,"x")&&(x.x=F.x,x.y=F.y)}),w.graph().width=T.graph().width,w.graph().height=T.graph().height}var g=["nodesep","edgesep","ranksep","marginx","marginy"],b={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],y=["width","height"],q={width:0,height:0},R=["minlen","weight","width","height","labeloffset"],E={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},C=["labelpos"];function O(w){var T=new l({multigraph:!0,compound:!0}),A=J(w.graph());return T.setGraph(e.merge({},b,Q(A,g),e.pick(A,_))),e.forEach(w.nodes(),function(x){var F=J(w.node(x));T.setNode(x,e.defaults(Q(F,y),q)),T.setParent(x,w.parent(x))}),e.forEach(w.edges(),function(x){var F=J(w.edge(x));T.setEdge(x,e.merge({},E,Q(F,R),e.pick(F,C)))}),T}function S(w){var T=w.graph();T.ranksep/=2,e.forEach(w.edges(),function(A){var x=w.edge(A);x.minlen*=2,x.labelpos.toLowerCase()!=="c"&&(T.rankdir==="TB"||T.rankdir==="BT"?x.width+=x.labeloffset:x.height+=x.labeloffset)})}function k(w){e.forEach(w.edges(),function(T){var A=w.edge(T);if(A.width&&A.height){var x=w.node(T.v),F=w.node(T.w),U={rank:(F.rank-x.rank)/2+x.rank,e:T};h.addDummyNode(w,"edge-proxy",U,"_ep")}})}function L(w){var T=0;e.forEach(w.nodes(),function(A){var x=w.node(A);x.borderTop&&(x.minRank=w.node(x.borderTop).rank,x.maxRank=w.node(x.borderBottom).rank,T=e.max(T,x.maxRank))}),w.graph().maxRank=T}function P(w){e.forEach(w.nodes(),function(T){var A=w.node(T);A.dummy==="edge-proxy"&&(w.edge(A.e).labelRank=A.rank,w.removeNode(T))})}function M(w){var T=Number.POSITIVE_INFINITY,A=0,x=Number.POSITIVE_INFINITY,F=0,U=w.graph(),H=U.marginx||0,Y=U.marginy||0;function _i($){var K=$.x,fe=$.y,bi=$.width,yi=$.height;T=Math.min(T,K-bi/2),A=Math.max(A,K+bi/2),x=Math.min(x,fe-yi/2),F=Math.max(F,fe+yi/2)}e.forEach(w.nodes(),function($){_i(w.node($))}),e.forEach(w.edges(),function($){var K=w.edge($);e.has(K,"x")&&_i(K)}),T-=H,x-=Y,e.forEach(w.nodes(),function($){var K=w.node($);K.x-=T,K.y-=x}),e.forEach(w.edges(),function($){var K=w.edge($);e.forEach(K.points,function(fe){fe.x-=T,fe.y-=x}),e.has(K,"x")&&(K.x-=T),e.has(K,"y")&&(K.y-=x)}),U.width=A-T+H,U.height=F-x+Y}function G(w){e.forEach(w.edges(),function(T){var A=w.edge(T),x=w.node(T.v),F=w.node(T.w),U,H;A.points?(U=A.points[0],H=A.points[A.points.length-1]):(A.points=[],U=F,H=x),A.points.unshift(h.intersectRect(x,U)),A.points.push(h.intersectRect(F,H))})}function B(w){e.forEach(w.edges(),function(T){var A=w.edge(T);if(e.has(A,"x"))switch((A.labelpos==="l"||A.labelpos==="r")&&(A.width-=A.labeloffset),A.labelpos){case"l":A.x-=A.width/2+A.labeloffset;break;case"r":A.x+=A.width/2+A.labeloffset;break}})}function te(w){e.forEach(w.edges(),function(T){var A=w.edge(T);A.reversed&&A.points.reverse()})}function ie(w){e.forEach(w.nodes(),function(T){if(w.children(T).length){var A=w.node(T),x=w.node(A.borderTop),F=w.node(A.borderBottom),U=w.node(e.last(A.borderLeft)),H=w.node(e.last(A.borderRight));A.width=Math.abs(H.x-U.x),A.height=Math.abs(F.y-x.y),A.x=U.x+A.width/2,A.y=x.y+A.height/2}}),e.forEach(w.nodes(),function(T){w.node(T).dummy==="border"&&w.removeNode(T)})}function N(w){e.forEach(w.edges(),function(T){if(T.v===T.w){var A=w.node(T.v);A.selfEdges||(A.selfEdges=[]),A.selfEdges.push({e:T,label:w.edge(T)}),w.removeEdge(T)}})}function V(w){var T=h.buildLayerMatrix(w);e.forEach(T,function(A){var x=0;e.forEach(A,function(F,U){var H=w.node(F);H.order=U+x,e.forEach(H.selfEdges,function(Y){h.addDummyNode(w,"selfedge",{width:Y.label.width,height:Y.label.height,rank:H.rank,order:U+ ++x,e:Y.e,label:Y.label},"_se")}),delete H.selfEdges})})}function j(w){e.forEach(w.nodes(),function(T){var A=w.node(T);if(A.dummy==="selfedge"){var x=w.node(A.e.v),F=x.x+x.width/2,U=x.y,H=A.x-F,Y=x.height/2;w.setEdge(A.e,A.label),w.removeNode(T),A.label.points=[{x:F+2*H/3,y:U-Y},{x:F+5*H/6,y:U-Y},{x:F+H,y:U},{x:F+5*H/6,y:U+Y},{x:F+2*H/3,y:U+Y}],A.label.x=A.x,A.label.y=A.y}})}function Q(w,T){return e.mapValues(e.pick(w,T),Number)}function J(w){var T={};return e.forEach(w,function(A,x){T[x.toLowerCase()]=A}),T}return zt}var Yt,Ds;function fc(){if(Ds)return Yt;Ds=1;var e=D(),a=z(),u=Z().Graph;Yt={debugOrdering:n};function n(r){var t=a.buildLayerMatrix(r),s=new u({compound:!0,multigraph:!0}).setGraph({});return e.forEach(r.nodes(),function(i){s.setNode(i,{label:i}),s.setParent(i,"layer"+r.node(i).rank)}),e.forEach(r.edges(),function(i){s.setEdge(i.v,i.w,{},i.name)}),e.forEach(t,function(i,f){var d="layer"+f;s.setNode(d,{rank:"same"}),e.reduce(i,function(o,c){return s.setEdge(o,c,{style:"invis"}),c})}),s}return Yt}var $t,Us;function dc(){return Us||(Us=1,$t="0.8.5"),$t}var Xt,Bs;function cc(){return Bs||(Bs=1,Xt={graphlib:Z(),layout:oc(),debug:fc(),util:{time:z().time,notime:z().notime},version:dc()}),Xt}var hc=cc();const Hs=I.getDefaultExportFromCjs(hc);var Zt,Ws;function lc(){if(Ws)return Zt;Ws=1;var e=ti();function a(u,n){return e(u,n)}return Zt=a,Zt}var vc=lc();const pc=I.getDefaultExportFromCjs(vc),ne="root.Triggers";function Re(e,a){const{getEdges:u}=W.useVueFlow(e),n=[];for(const r of u.value)if(r.target===a){n.push(r);const t=Re(e,r.source);t.length>0&&n.push(...t)}return n}function Ie(e,a){const{getEdges:u}=W.useVueFlow(e),n=[];for(const r of u.value)if(r.source===a){n.push(r);const t=Ie(e,r.target);t.length>0&&n.push(...t)}return n}function Te(e,a){const{getEdges:u,findNode:n}=W.useVueFlow(e),r=n(a),t=r?[r]:[];for(const s of u.value)if(s.target===a){t.push(s.sourceNode);const i=Te(e,s.source);i.length>0&&t.push(...i)}return t}function Se(e,a){const{getEdges:u,findNode:n}=W.useVueFlow(e),r=[n(a)];for(const t of u.value)if(t.source===a){r.push(t.targetNode);const s=Se(e,t.target);s.length>0&&r.push(...s)}return r}function Oo(e,a){return[...Re(e,a),...Te(e,a),...Ie(e,a),...Se(e,a)]}function di(e,a,u,n,r,t,s){const i=new Hs.graphlib.Graph({compound:!0});i.setDefaultEdgeLabel(()=>({})),i.setGraph({rankdir:u?"LR":"TB"});for(const f of e.nodes)a.includes(f.uid)||i.setNode(f.uid,{width:ce(f),height:he(f)});for(const f of e.clusters||[]){const d=f.cluster.uid.replace(se,"");if(n.includes(f.cluster.uid)&&t.has(d)){const o={uid:d,type:"collapsedcluster"};i.setNode(d,{width:ce(o),height:he(o)}),s.push(o);continue}if(!r[f.cluster.uid]){i.setNode(f.cluster.uid,{clusterLabelPos:"top"});for(const o of f.nodes||[])a.includes(o)||i.setParent(o,f.cluster.uid)}if(f.parents){const o=r[f.cluster.uid]?r[f.cluster.uid]:f.cluster.uid;a.includes(o)||i.setParent(o,f.parents[f.parents.length-1])}}for(const f of e.edges||[]){const d=Ae(f.source,f.target,r,a);d&&i.setEdge(d.source,d.target)}return Hs.layout(i),i}function de(e,a){const u={x:e.x-e.width/2,y:e.y-e.height/2};if(a){const n=de(a);u.x=u.x-n.x,u.y=u.y-n.y}return u}function ce(e){return Ce(e)||ve(e)?ee.TASK_WIDTH:ue(e)?ee.COLLAPSED_CLUSTER_WIDTH:ee.DOT_WIDTH}function he(e){return Ce(e)||ve(e)?ee.TASK_HEIGHT:ue(e)?ee.COLLAPSED_CLUSTER_HEIGHT:ee.DOT_HEIGHT}function Ce(e){return["GraphTask","SubflowGraphTask$1"].some(a=>e.type.endsWith(a))}function ve(e){return e.type.endsWith("GraphTrigger")}function ue(e){return e.type==="collapsedcluster"}function Ae(e,a,u,n){const r=u[e]?u[e]:e,t=u[a]?u[a]:a;return r===t||n.includes(r)||n.includes(t)?null:{target:t,source:r}}function No(e){const{getEdges:a,getNodes:u,getElements:n,removeEdges:r,removeNodes:t,removeSelectedElements:s}=W.useVueFlow(e);r(a.value),t(u.value),s(n.value)}function ci(e){return e?I.flowHaveTasks(e):!1}function hi(e,a){return e.uid===ne||ve(e)||ue(e)?"success":e.type.endsWith("SubflowGraphTask")?"primary":e.branchType=="ERROR"?"danger":e.branchType=="FINALLY"?"warning":a.has(e.uid)?"blue":"default"}function li(e,a,u,n){var d,o,c;if(n.some(h=>e.source.startsWith(h)&&e.target.startsWith(h))||u.includes(e.target)||e.source.startsWith(ne)||e.target.startsWith(ne))return;const r=e.target.split(".");r.pop();const t=r.join("."),s=pe.afterLastDot(t),i=a[e.target];if(i.type.endsWith("GraphClusterEnd")&&((c=(o=(d=a[t])==null?void 0:d.task)==null?void 0:o.type)!=null&&c.endsWith("Parallel")))return;if(i.type.endsWith("GraphClusterRoot"))return[s,"before"];const f=a[e.source].type.endsWith("GraphClusterEnd");if(!f&&i.type.endsWith("GraphClusterEnd"))return[pe.afterLastDot(e.source),"after"];if(f){const h=e.source.split(".");return[h[h.length-2],"after"]}return[pe.afterLastDot(e.target),"before"]}function vi(e,a,u){const n=s=>{var f,d;const i=s.split(".");for(let o=1;o<=i.length;o++){const c=i.slice(0,o).join("."),h=(f=u[c])==null?void 0:f.branchType;if(h)return h}return((d=a[s])==null?void 0:d.branchType)??null},r=n(e.source),t=n(e.target);return[r,t].includes("ERROR")?"danger":[r,t].includes("FINALLY")?"warning":null}function xo(e,a,u,n,r,t,s,i,f,d,o,c,h){var E,C,O,S,k,L,P,M,G,B,te,ie;const l=[],m=[se+ne];if(!n||r&&!ci(r)){l.push({id:"start",type:"dot",position:{x:0,y:0},style:{width:"5px",height:"5px"},sourcePosition:s?W.Position.Right:W.Position.Bottom,targetPosition:s?W.Position.Left:W.Position.Top,parentNode:void 0,draggable:!1}),l.push({id:"end",type:"dot",position:s?{x:50,y:0}:{x:0,y:50},style:{width:"5px",height:"5px"},sourcePosition:s?W.Position.Right:W.Position.Bottom,targetPosition:s?W.Position.Left:W.Position.Top,parentNode:void 0,draggable:!1}),l.push({id:"start|end",source:"start",target:"end",type:"edge",data:{edge:{relation:{relationType:"SEQUENTIAL"}},isFlowable:!1,initTask:!0,color:"primary"}});return}const p=di(n,t,s,m,i,f,d),v={},g=n.clusters||[],b=g.map(N=>N.cluster),_=b.filter(N=>N.type.endsWith("SubflowGraphCluster")).map(N=>N.taskNode.uid),y=Object.fromEntries(n.nodes.concat(d).map(N=>[N.uid,N]));for(const N of g)if(!i[N.cluster.uid]&&!f.has(N.cluster.uid)){((C=(E=N.cluster.taskNode)==null?void 0:E.task)==null?void 0:C.type)==="io.kestra.core.tasks.flows.Dag"&&_.push(N.cluster.taskNode.uid);for(const w of N.nodes)v[w]=N.cluster;const V=N.cluster.uid,j=p.node(V),Q=N.parents?N.parents[N.parents.length-1]:void 0,J=pi(N.cluster);l.push({id:V,type:"cluster",parentNode:Q,position:de(j,Q?p.node(Q):void 0),style:{width:V===ne&&s?ee.TRIGGER_CLUSTER_WIDTH+"px":j.width+"px",height:V===ne&&!s?ee.TRIGGER_CLUSTER_HEIGHT+"px":j.height+"px"},data:{collapsable:!0,color:J,taskNode:N.cluster.taskNode,unused:N.cluster.taskNode?y[N.cluster.taskNode.uid].unused:!1},class:`ks-topology-${J}-border rounded p-2`})}for(const N of n.nodes.concat(d))if(!t.includes(N.uid)){const V=p.node(N.uid);let j="task";_e(N)?j="dot":N.type.includes("GraphTrigger")?j="trigger":N.type==="collapsedcluster"&&(j="collapsedcluster");const Q=hi(N,f),J=o||((S=(O=N.task)==null?void 0:O.type)==null?void 0:S.includes("$"))||_.some(w=>N.uid.startsWith(w+"."));l.push({id:N.uid,type:j,position:de(V,v[N.uid]?p.node(v[N.uid].uid):void 0),style:{width:ce(N)+"px",height:he(N)+"px"},sourcePosition:s?W.Position.Right:W.Position.Bottom,targetPosition:s?W.Position.Left:W.Position.Top,parentNode:v[N.uid]?v[N.uid].uid:void 0,draggable:j==="task"?!J:!1,data:{node:N,parent:v[N.uid]?v[N.uid]:void 0,namespace:((P=(L=(k=v[N.uid])==null?void 0:k.taskNode)==null?void 0:L.task)==null?void 0:P.namespace)??u,flowId:((B=(G=(M=v[N.uid])==null?void 0:M.taskNode)==null?void 0:G.task)==null?void 0:B.flowId)??a,isFlowable:((te=v[N.uid])==null?void 0:te.uid)===se+N.uid&&!N.type.endsWith("SubflowGraphTask"),color:Q,expandable:gi(N,v,i,h),isReadOnly:J,iconComponent:ue(N)?"lightning-bolt":null,executionId:N.executionId,unused:N.unused},class:N.type==="collapsedcluster"?`ks-topology-${Q}-border rounded`:""})}const q=b.filter(N=>N.taskNode).map(N=>N.taskNode.uid),R=n.edges??[];for(const N of R){const V=Ae(N.source,N.target,i,t);if(V){const j=vi(N,y,v);l.push({id:V.source+"|"+V.target,source:V.source,target:V.target,type:"edge",markerEnd:_e(y[V.target])?"":{id:"marker-"+(y[V.target].branchType?(ie=y[V.target].branchType)==null?void 0:ie.toLocaleLowerCase():"custom"),type:W.MarkerType.ArrowClosed,color:j?`var(--ks-border-${j})`:"var(--ks-topology-edge-color)"},data:{haveAdd:!o&&c&&li(N,y,q,_),haveDashArray:y[N.source].type.endsWith("GraphTrigger")||y[N.target].type.endsWith("GraphTrigger")||N.source.startsWith(ne),color:j,unused:N.unused},style:{zIndex:10}})}}return l}function _e(e){return["GraphClusterRoot","GraphClusterFinally","GraphClusterAfterExecution","GraphClusterEnd"].some(a=>e.type.endsWith(a))}function pi(e){return e.uid===se+ne?"success":e.type.endsWith("SubflowGraphCluster")?"primary":e.branchType==="ERROR"?"danger":"blue"}function gi(e,a,u,n){var r,t;return Object.values(u).includes(e.uid)||ue(e)?!0:e.type.endsWith("SubflowGraphTask")&&((t=(r=a[e.uid])==null?void 0:r.uid)==null?void 0:t.replace(se,""))!==e.uid&&n}function Qt(e){const u=e.nodes.map(n=>n.uid).filter(n=>!e.edges.some(r=>r.target===n));return e.nodes.filter(n=>u.includes(n.uid))}function ko(e,a){if(a)return e.edges.filter(u=>u.source===a&&u.target)}function Jt(e,a){let u,n,r=[a.uid];do{if(u=r.flatMap(t=>ko(e,t)).filter(Boolean),u.length===0)return[];r=u.map(t=>t.target),n=e.nodes.filter(t=>r.includes(t.uid)&&t.task)}while(!n.length);return n}function gc(e,a,u){if(!u)return!1;let n=Qt(e),r=Qt(a);if(n.length!==r.length)return!1;let t=120;do{if(r=r.flatMap(s=>Jt(a,s)),r.some(s=>s.task.id===u))return!0;if(n=n.flatMap(s=>Jt(e,s)),n.length!==r.length)return!1;for(const s of r){const i=n.find(o=>{var c,h;return((c=o.task)==null?void 0:c.id)===((h=s.task)==null?void 0:h.id)}),f=(i==null?void 0:i.task)??{},d=s.task??{};if(!i||Object.keys(f).length!==Object.keys(d).length||!pc(f,d))return!1}}while(n.length&&r.length&&t-- >0);return t<=0?(console.warn("areTasksIdenticalInGraphUntilTask: Infinite loop detected, stopping comparison."),!1):!0}const _c={isClusterRootOrEnd:_e,computeClusterColor:pi,isExpandableTask:gi,generateGraph:xo,generateDagreGraph:di,getNodePosition:de,getNodeWidth:ce,getNodeHeight:he,isTaskNode:Ce,isTriggerNode:ve,isCollapsedCluster:ue,replaceIfCollapsed:Ae,cleanGraph:No,flowHaveTasks:ci,nodeColor:hi,haveAdd:li,getEdgeColor:vi,predecessorsEdge:Re,successorsEdge:Ie,predecessorsNode:Te,successorsNode:Se,linkedElements:Oo};exports.CLUSTER_PREFIX=se;exports.EVENTS=Fo;exports.NODE_SIZES=ee;exports.SECTIONS=Mo;exports.Utils=pe;exports.VueFlowUtils=_c;exports.afterLastDot=to;exports.areTasksIdenticalInGraphUntilTask=gc;exports.cleanGraph=No;exports.computeClusterColor=pi;exports.dateFilter=eo;exports.editorViewTypes=Uo;exports.executeFlowBehaviours=Ho;exports.flowHaveTasks=ci;exports.generateDagreGraph=di;exports.generateGraph=xo;exports.getEdgeColor=vi;exports.getNextTaskNodes=Jt;exports.getNodeHeight=he;exports.getNodePosition=de;exports.getNodeWidth=ce;exports.getRootNodes=Qt;exports.getTargetNodesEdges=ko;exports.haveAdd=li;exports.humanDuration=no;exports.isClusterRootOrEnd=_e;exports.isCollapsedCluster=ue;exports.isExpandableTask=gi;exports.isTaskNode=Ce;exports.isTriggerNode=ve;exports.linkedElements=Oo;exports.logDisplayTypes=Do;exports.nodeColor=hi;exports.predecessorsEdge=Re;exports.predecessorsNode=Te;exports.replaceIfCollapsed=Ae;exports.requireMapValues=Js;exports.stateDisplayValues=Wo;exports.stateGlobalChartTypes=Go;exports.storageKeys=Bo;exports.successorsEdge=Ie;exports.successorsNode=Se;
2
- //# sourceMappingURL=VueFlowUtils-B2OVrQPC.cjs.map
1
+ "use strict";const W=require("@vue-flow/core"),I=require("./FlowYamlUtils-DvtepVr2.cjs"),mi=require("vue"),Lo=require("humanize-duration"),qi=require("moment"),Po=require("moment-timezone"),Mo={TASKS:"TASKS",TRIGGERS:"TRIGGERS",TASK_RUNNERS:"TASK_RUNNERS"},Fo={EDIT:"edit",DELETE:"delete",SHOW_DESCRIPTION:"showDescription",COLLAPSE:"collapse",EXPAND:"expand",OPEN_LINK:"openLink",ADD_TASK:"addTask",SHOW_LOGS:"showLogs",MOUSE_OVER:"mouseover",MOUSE_LEAVE:"mouseleave",ADD_ERROR:"addError",EXPAND_DEPENDENCIES:"expandDependencies",SHOW_CONDITION:"showCondition",RUN_TASK:"runTask"},se="cluster_",Go={EXECUTIONS:"executions",TASKRUNS:"taskruns"},Do={ALL:"all",ERROR:"error",HIDDEN:"hidden",DEFAULT:"all"},ee={TASK_WIDTH:184,TASK_HEIGHT:44,TRIGGER_WIDTH:184,TRIGGER_HEIGHT:44,DOT_WIDTH:5,DOT_HEIGHT:5,COLLAPSED_CLUSTER_WIDTH:150,COLLAPSED_CLUSTER_HEIGHT:44,TRIGGER_CLUSTER_WIDTH:350,TRIGGER_CLUSTER_HEIGHT:180},Uo={STORAGE_KEY:"view-type",SOURCE:"source",SOURCE_TOPOLOGY:"source-topology",SOURCE_DOC:"source-doc",TOPOLOGY:"topology",SOURCE_BLUEPRINTS:"source-blueprints"},Bo={DISPLAY_EXECUTIONS_COLUMNS:"displayExecutionsColumns",DISPLAY_FLOW_EXECUTIONS_COLUMNS:"displayFlowExecutionsColumns",SELECTED_TENANT:"selectedTenant",EXECUTE_FLOW_BEHAVIOUR:"executeFlowBehaviour",SHOW_CHART:"showChart",SHOW_FLOWS_CHART:"showFlowsChart",SHOW_LOGS_CHART:"showLogsChart",DEFAULT_NAMESPACE:"defaultNamespace",LATEST_NAMESPACE:"latestNamespace",PAGINATION_SIZE:"paginationSize",IMPERSONATE:"impersonate",EDITOR_VIEW_TYPE:"editorViewType"},Ho={SAME_TAB:"same tab",NEW_TAB:"new tab"},Wo={INPROGRESS:"IN-PROGRESS"};var Oe,Ei;function Vo(){if(Ei)return Oe;Ei=1;function e(a){return function(u,n,r){for(var t=-1,s=Object(u),i=r(u),f=i.length;f--;){var d=i[a?f:++t];if(n(s[d],d,s)===!1)break}return u}}return Oe=e,Oe}var Ne,wi;function ei(){if(wi)return Ne;wi=1;var e=Vo(),a=e();return Ne=a,Ne}var xe,Ri;function ri(){if(Ri)return xe;Ri=1;var e=ei(),a=I.requireKeys();function u(n,r){return n&&e(n,r,a)}return xe=u,xe}var ke,Ii;function jo(){if(Ii)return ke;Ii=1;var e="__lodash_hash_undefined__";function a(u){return this.__data__.set(u,e),this}return ke=a,ke}var Le,Ti;function Ko(){if(Ti)return Le;Ti=1;function e(a){return this.__data__.has(a)}return Le=e,Le}var Pe,Si;function Vs(){if(Si)return Pe;Si=1;var e=I.require_MapCache(),a=jo(),u=Ko();function n(r){var t=-1,s=r==null?0:r.length;for(this.__data__=new e;++t<s;)this.add(r[t])}return n.prototype.add=n.prototype.push=a,n.prototype.has=u,Pe=n,Pe}var Me,Ci;function zo(){if(Ci)return Me;Ci=1;function e(a,u){for(var n=-1,r=a==null?0:a.length;++n<r;)if(u(a[n],n,a))return!0;return!1}return Me=e,Me}var Fe,Ai;function js(){if(Ai)return Fe;Ai=1;function e(a,u){return a.has(u)}return Fe=e,Fe}var Ge,Oi;function Ks(){if(Oi)return Ge;Oi=1;var e=Vs(),a=zo(),u=js(),n=1,r=2;function t(s,i,f,d,o,c){var h=f&n,l=s.length,m=i.length;if(l!=m&&!(h&&m>l))return!1;var p=c.get(s),v=c.get(i);if(p&&v)return p==i&&v==s;var g=-1,b=!0,_=f&r?new e:void 0;for(c.set(s,i),c.set(i,s);++g<l;){var y=s[g],q=i[g];if(d)var R=h?d(q,y,g,i,s,c):d(y,q,g,s,i,c);if(R!==void 0){if(R)continue;b=!1;break}if(_){if(!a(i,function(E,C){if(!u(_,C)&&(y===E||o(y,E,f,d,c)))return _.push(C)})){b=!1;break}}else if(!(y===q||o(y,q,f,d,c))){b=!1;break}}return c.delete(s),c.delete(i),b}return Ge=t,Ge}var De,Ni;function Yo(){if(Ni)return De;Ni=1;function e(a){var u=-1,n=Array(a.size);return a.forEach(function(r,t){n[++u]=[t,r]}),n}return De=e,De}var Ue,xi;function ni(){if(xi)return Ue;xi=1;function e(a){var u=-1,n=Array(a.size);return a.forEach(function(r){n[++u]=r}),n}return Ue=e,Ue}var Be,ki;function $o(){if(ki)return Be;ki=1;var e=I.require_Symbol(),a=I.require_Uint8Array(),u=I.requireEq(),n=Ks(),r=Yo(),t=ni(),s=1,i=2,f="[object Boolean]",d="[object Date]",o="[object Error]",c="[object Map]",h="[object Number]",l="[object RegExp]",m="[object Set]",p="[object String]",v="[object Symbol]",g="[object ArrayBuffer]",b="[object DataView]",_=e?e.prototype:void 0,y=_?_.valueOf:void 0;function q(R,E,C,O,S,k,L){switch(C){case b:if(R.byteLength!=E.byteLength||R.byteOffset!=E.byteOffset)return!1;R=R.buffer,E=E.buffer;case g:return!(R.byteLength!=E.byteLength||!k(new a(R),new a(E)));case f:case d:case h:return u(+R,+E);case o:return R.name==E.name&&R.message==E.message;case l:case p:return R==E+"";case c:var P=r;case m:var M=O&s;if(P||(P=t),R.size!=E.size&&!M)return!1;var G=L.get(R);if(G)return G==E;O|=i,L.set(R,E);var B=n(P(R),P(E),O,S,k,L);return L.delete(R),B;case v:if(y)return y.call(R)==y.call(E)}return!1}return Be=q,Be}var He,Li;function Xo(){if(Li)return He;Li=1;var e=I.require_getAllKeys(),a=1,u=Object.prototype,n=u.hasOwnProperty;function r(t,s,i,f,d,o){var c=i&a,h=e(t),l=h.length,m=e(s),p=m.length;if(l!=p&&!c)return!1;for(var v=l;v--;){var g=h[v];if(!(c?g in s:n.call(s,g)))return!1}var b=o.get(t),_=o.get(s);if(b&&_)return b==s&&_==t;var y=!0;o.set(t,s),o.set(s,t);for(var q=c;++v<l;){g=h[v];var R=t[g],E=s[g];if(f)var C=c?f(E,R,g,s,t,o):f(R,E,g,t,s,o);if(!(C===void 0?R===E||d(R,E,i,f,o):C)){y=!1;break}q||(q=g=="constructor")}if(y&&!q){var O=t.constructor,S=s.constructor;O!=S&&"constructor"in t&&"constructor"in s&&!(typeof O=="function"&&O instanceof O&&typeof S=="function"&&S instanceof S)&&(y=!1)}return o.delete(t),o.delete(s),y}return He=r,He}var We,Pi;function Zo(){if(Pi)return We;Pi=1;var e=I.require_Stack(),a=Ks(),u=$o(),n=Xo(),r=I.require_getTag(),t=I.requireIsArray(),s=I.requireIsBuffer(),i=I.requireIsTypedArray(),f=1,d="[object Arguments]",o="[object Array]",c="[object Object]",h=Object.prototype,l=h.hasOwnProperty;function m(p,v,g,b,_,y){var q=t(p),R=t(v),E=q?o:r(p),C=R?o:r(v);E=E==d?c:E,C=C==d?c:C;var O=E==c,S=C==c,k=E==C;if(k&&s(p)){if(!s(v))return!1;q=!0,O=!1}if(k&&!O)return y||(y=new e),q||i(p)?a(p,v,g,b,_,y):u(p,v,E,g,b,_,y);if(!(g&f)){var L=O&&l.call(p,"__wrapped__"),P=S&&l.call(v,"__wrapped__");if(L||P){var M=L?p.value():p,G=P?v.value():v;return y||(y=new e),_(M,G,g,b,y)}}return k?(y||(y=new e),n(p,v,g,b,_,y)):!1}return We=m,We}var Ve,Mi;function ti(){if(Mi)return Ve;Mi=1;var e=Zo(),a=I.requireIsObjectLike();function u(n,r,t,s,i){return n===r?!0:n==null||r==null||!a(n)&&!a(r)?n!==n&&r!==r:e(n,r,t,s,u,i)}return Ve=u,Ve}var je,Fi;function Qo(){if(Fi)return je;Fi=1;var e=I.require_Stack(),a=ti(),u=1,n=2;function r(t,s,i,f){var d=i.length,o=d,c=!f;if(t==null)return!o;for(t=Object(t);d--;){var h=i[d];if(c&&h[2]?h[1]!==t[h[0]]:!(h[0]in t))return!1}for(;++d<o;){h=i[d];var l=h[0],m=t[l],p=h[1];if(c&&h[2]){if(m===void 0&&!(l in t))return!1}else{var v=new e;if(f)var g=f(m,p,l,t,s,v);if(!(g===void 0?a(p,m,u|n,f,v):g))return!1}}return!0}return je=r,je}var Ke,Gi;function zs(){if(Gi)return Ke;Gi=1;var e=I.requireIsObject();function a(u){return u===u&&!e(u)}return Ke=a,Ke}var ze,Di;function Jo(){if(Di)return ze;Di=1;var e=zs(),a=I.requireKeys();function u(n){for(var r=a(n),t=r.length;t--;){var s=r[t],i=n[s];r[t]=[s,i,e(i)]}return r}return ze=u,ze}var Ye,Ui;function Ys(){if(Ui)return Ye;Ui=1;function e(a,u){return function(n){return n==null?!1:n[a]===u&&(u!==void 0||a in Object(n))}}return Ye=e,Ye}var $e,Bi;function ef(){if(Bi)return $e;Bi=1;var e=Qo(),a=Jo(),u=Ys();function n(r){var t=a(r);return t.length==1&&t[0][2]?u(t[0][0],t[0][1]):function(s){return s===r||e(s,r,t)}}return $e=n,$e}var Xe,Hi;function oe(){if(Hi)return Xe;Hi=1;var e=I.require_baseGetTag(),a=I.requireIsObjectLike(),u="[object Symbol]";function n(r){return typeof r=="symbol"||a(r)&&e(r)==u}return Xe=n,Xe}var Ze,Wi;function ii(){if(Wi)return Ze;Wi=1;var e=I.requireIsArray(),a=oe(),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function r(t,s){if(e(t))return!1;var i=typeof t;return i=="number"||i=="symbol"||i=="boolean"||t==null||a(t)?!0:n.test(t)||!u.test(t)||s!=null&&t in Object(s)}return Ze=r,Ze}var Qe,Vi;function rf(){if(Vi)return Qe;Vi=1;var e=I.require_MapCache(),a="Expected a function";function u(n,r){if(typeof n!="function"||r!=null&&typeof r!="function")throw new TypeError(a);var t=function(){var s=arguments,i=r?r.apply(this,s):s[0],f=t.cache;if(f.has(i))return f.get(i);var d=n.apply(this,s);return t.cache=f.set(i,d)||f,d};return t.cache=new(u.Cache||e),t}return u.Cache=e,Qe=u,Qe}var Je,ji;function nf(){if(ji)return Je;ji=1;var e=rf(),a=500;function u(n){var r=e(n,function(s){return t.size===a&&t.clear(),s}),t=r.cache;return r}return Je=u,Je}var er,Ki;function tf(){if(Ki)return er;Ki=1;var e=nf(),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,n=e(function(r){var t=[];return r.charCodeAt(0)===46&&t.push(""),r.replace(a,function(s,i,f,d){t.push(f?d.replace(u,"$1"):i||s)}),t});return er=n,er}var rr,zi;function be(){if(zi)return rr;zi=1;function e(a,u){for(var n=-1,r=a==null?0:a.length,t=Array(r);++n<r;)t[n]=u(a[n],n,a);return t}return rr=e,rr}var nr,Yi;function af(){if(Yi)return nr;Yi=1;var e=I.require_Symbol(),a=be(),u=I.requireIsArray(),n=oe(),r=e?e.prototype:void 0,t=r?r.toString:void 0;function s(i){if(typeof i=="string")return i;if(u(i))return a(i,s)+"";if(n(i))return t?t.call(i):"";var f=i+"";return f=="0"&&1/i==-1/0?"-0":f}return nr=s,nr}var tr,$i;function $s(){if($i)return tr;$i=1;var e=af();function a(u){return u==null?"":e(u)}return tr=a,tr}var ir,Xi;function ye(){if(Xi)return ir;Xi=1;var e=I.requireIsArray(),a=ii(),u=tf(),n=$s();function r(t,s){return e(t)?t:a(t,s)?[t]:u(n(t))}return ir=r,ir}var ar,Zi;function le(){if(Zi)return ar;Zi=1;var e=oe();function a(u){if(typeof u=="string"||e(u))return u;var n=u+"";return n=="0"&&1/u==-1/0?"-0":n}return ar=a,ar}var ur,Qi;function me(){if(Qi)return ur;Qi=1;var e=ye(),a=le();function u(n,r){r=e(r,n);for(var t=0,s=r.length;n!=null&&t<s;)n=n[a(r[t++])];return t&&t==s?n:void 0}return ur=u,ur}var sr,Ji;function uf(){if(Ji)return sr;Ji=1;var e=me();function a(u,n,r){var t=u==null?void 0:e(u,n);return t===void 0?r:t}return sr=a,sr}var or,ea;function sf(){if(ea)return or;ea=1;function e(a,u){return a!=null&&u in Object(a)}return or=e,or}var fr,ra;function Xs(){if(ra)return fr;ra=1;var e=ye(),a=I.requireIsArguments(),u=I.requireIsArray(),n=I.require_isIndex(),r=I.requireIsLength(),t=le();function s(i,f,d){f=e(f,i);for(var o=-1,c=f.length,h=!1;++o<c;){var l=t(f[o]);if(!(h=i!=null&&d(i,l)))break;i=i[l]}return h||++o!=c?h:(c=i==null?0:i.length,!!c&&r(c)&&n(l,c)&&(u(i)||a(i)))}return fr=s,fr}var dr,na;function Zs(){if(na)return dr;na=1;var e=sf(),a=Xs();function u(n,r){return n!=null&&a(n,r,e)}return dr=u,dr}var cr,ta;function of(){if(ta)return cr;ta=1;var e=ti(),a=uf(),u=Zs(),n=ii(),r=zs(),t=Ys(),s=le(),i=1,f=2;function d(o,c){return n(o)&&r(c)?t(s(o),c):function(h){var l=a(h,o);return l===void 0&&l===c?u(h,o):e(c,l,i|f)}}return cr=d,cr}var hr,ia;function ae(){if(ia)return hr;ia=1;function e(a){return a}return hr=e,hr}var lr,aa;function Qs(){if(aa)return lr;aa=1;function e(a){return function(u){return u==null?void 0:u[a]}}return lr=e,lr}var vr,ua;function ff(){if(ua)return vr;ua=1;var e=me();function a(u){return function(n){return e(n,u)}}return vr=a,vr}var pr,sa;function df(){if(sa)return pr;sa=1;var e=Qs(),a=ff(),u=ii(),n=le();function r(t){return u(t)?e(n(t)):a(t)}return pr=r,pr}var gr,oa;function re(){if(oa)return gr;oa=1;var e=ef(),a=of(),u=ae(),n=I.requireIsArray(),r=df();function t(s){return typeof s=="function"?s:s==null?u:typeof s=="object"?n(s)?a(s[0],s[1]):e(s):r(s)}return gr=t,gr}var _r,fa;function Js(){if(fa)return _r;fa=1;var e=I.require_baseAssignValue(),a=ri(),u=re();function n(r,t){var s={};return t=u(t,3),a(r,function(i,f,d){e(s,f,t(i,f,d))}),s}return _r=n,_r}const cf={en:{y:()=>"y",mo:()=>"mo",w:()=>"w",d:()=>"d",h:()=>"h",m:()=>"m",s:()=>"s",ms:()=>"ms"},fr:{y:()=>"a",mo:()=>"mo",w:()=>"se",d:()=>"j",h:()=>"h",m:()=>"m",s:()=>"s",ms:()=>"ms"}},hf="dateFormat",lf="timezone",vf=e=>e.charAt(0).toUpperCase()+e.slice(1),eo=(e,a)=>{var t,s;const u=(t=mi.getCurrentInstance())==null?void 0:t.appContext.config.globalProperties.$moment().locale(),n=(s=mi.getCurrentInstance())==null?void 0:s.appContext.config.globalProperties.$moment(e).locale(u);let r;return a==="iso"?r="YYYY-MM-DD HH:mm:ss.SSS":r=a??localStorage.getItem(hf)??"llll",n.tz(localStorage.getItem(lf)??Po.tz.guess()).format(r)};function pf(e,a){return e.split(a).slice(1).join(a)}function ro(e){return qi.duration(e,qi.ISO_8601).asMilliseconds()/1e3}function no(e,a){return a=a||{maxDecimalPoints:2},a.spacer="",a.language=localStorage.getItem("lang")||"en",a.languages=cf,a.largest=2,typeof e!="number"&&(e=ro(e)),Lo(e*1e3,a).replace(/\.([0-9])s$/i,".$10s")}function to(e){return e.split(".").pop()}function gf(e,a,u){return u.indexOf(e)===a}const pe={capitalize:vf,dateFilter:eo,splitFirst:pf,duration:ro,humanDuration:no,afterLastDot:to,distinctFilter:gf};function ai(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var br,da;function _f(){if(da)return br;da=1;var e=I.require_baseClone(),a=4;function u(n){return e(n,a)}return br=u,br}var yr,ca;function ui(){if(ca)return yr;ca=1;function e(a){return function(){return a}}return yr=e,yr}var mr,ha;function bf(){if(ha)return mr;ha=1;var e=I.requireIsArrayLike();function a(u,n){return function(r,t){if(r==null)return r;if(!e(r))return u(r,t);for(var s=r.length,i=n?s:-1,f=Object(r);(n?i--:++i<s)&&t(f[i],i,f)!==!1;);return r}}return mr=a,mr}var qr,la;function qe(){if(la)return qr;la=1;var e=ri(),a=bf(),u=a(e);return qr=u,qr}var Er,va;function io(){if(va)return Er;va=1;var e=ae();function a(u){return typeof u=="function"?u:e}return Er=a,Er}var wr,pa;function ao(){if(pa)return wr;pa=1;var e=I.require_arrayEach(),a=qe(),u=io(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:a;return i(t,u(s))}return wr=r,wr}var Rr,ga;function uo(){return ga||(ga=1,Rr=ao()),Rr}var Ir,_a;function yf(){if(_a)return Ir;_a=1;var e=qe();function a(u,n){var r=[];return e(u,function(t,s,i){n(t,s,i)&&r.push(t)}),r}return Ir=a,Ir}var Tr,ba;function so(){if(ba)return Tr;ba=1;var e=I.require_arrayFilter(),a=yf(),u=re(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:a;return i(t,u(s,3))}return Tr=r,Tr}var Sr,ya;function mf(){if(ya)return Sr;ya=1;var e=Object.prototype,a=e.hasOwnProperty;function u(n,r){return n!=null&&a.call(n,r)}return Sr=u,Sr}var Cr,ma;function oo(){if(ma)return Cr;ma=1;var e=mf(),a=Xs();function u(n,r){return n!=null&&a(n,r,e)}return Cr=u,Cr}var Ar,qa;function qf(){if(qa)return Ar;qa=1;var e=I.require_baseKeys(),a=I.require_getTag(),u=I.requireIsArguments(),n=I.requireIsArray(),r=I.requireIsArrayLike(),t=I.requireIsBuffer(),s=I.require_isPrototype(),i=I.requireIsTypedArray(),f="[object Map]",d="[object Set]",o=Object.prototype,c=o.hasOwnProperty;function h(l){if(l==null)return!0;if(r(l)&&(n(l)||typeof l=="string"||typeof l.splice=="function"||t(l)||i(l)||u(l)))return!l.length;var m=a(l);if(m==f||m==d)return!l.size;if(s(l))return!e(l).length;for(var p in l)if(c.call(l,p))return!1;return!0}return Ar=h,Ar}var Or,Ea;function fo(){if(Ea)return Or;Ea=1;function e(a){return a===void 0}return Or=e,Or}var Nr,wa;function co(){if(wa)return Nr;wa=1;var e=qe(),a=I.requireIsArrayLike();function u(n,r){var t=-1,s=a(n)?Array(n.length):[];return e(n,function(i,f,d){s[++t]=r(i,f,d)}),s}return Nr=u,Nr}var xr,Ra;function ho(){if(Ra)return xr;Ra=1;var e=be(),a=re(),u=co(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:u;return i(t,a(s,3))}return xr=r,xr}var kr,Ia;function Ef(){if(Ia)return kr;Ia=1;function e(a,u,n,r){var t=-1,s=a==null?0:a.length;for(r&&s&&(n=a[++t]);++t<s;)n=u(n,a[t],t,a);return n}return kr=e,kr}var Lr,Ta;function wf(){if(Ta)return Lr;Ta=1;function e(a,u,n,r,t){return t(a,function(s,i,f){n=r?(r=!1,s):u(n,s,i,f)}),n}return Lr=e,Lr}var Pr,Sa;function lo(){if(Sa)return Pr;Sa=1;var e=Ef(),a=qe(),u=re(),n=wf(),r=I.requireIsArray();function t(s,i,f){var d=r(s)?e:n,o=arguments.length<3;return d(s,u(i,4),f,o,a)}return Pr=t,Pr}var Mr,Ca;function Rf(){if(Ca)return Mr;Ca=1;var e=I.require_baseGetTag(),a=I.requireIsArray(),u=I.requireIsObjectLike(),n="[object String]";function r(t){return typeof t=="string"||!a(t)&&u(t)&&e(t)==n}return Mr=r,Mr}var Fr,Aa;function If(){if(Aa)return Fr;Aa=1;var e=Qs(),a=e("length");return Fr=a,Fr}var Gr,Oa;function Tf(){if(Oa)return Gr;Oa=1;var e="\\ud800-\\udfff",a="\\u0300-\\u036f",u="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",r=a+u+n,t="\\ufe0e\\ufe0f",s="\\u200d",i=RegExp("["+s+e+r+t+"]");function f(d){return i.test(d)}return Gr=f,Gr}var Dr,Na;function Sf(){if(Na)return Dr;Na=1;var e="\\ud800-\\udfff",a="\\u0300-\\u036f",u="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",r=a+u+n,t="\\ufe0e\\ufe0f",s="["+e+"]",i="["+r+"]",f="\\ud83c[\\udffb-\\udfff]",d="(?:"+i+"|"+f+")",o="[^"+e+"]",c="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",l="\\u200d",m=d+"?",p="["+t+"]?",v="(?:"+l+"(?:"+[o,c,h].join("|")+")"+p+m+")*",g=p+m+v,b="(?:"+[o+i+"?",i,c,h,s].join("|")+")",_=RegExp(f+"(?="+f+")|"+b+g,"g");function y(q){for(var R=_.lastIndex=0;_.test(q);)++R;return R}return Dr=y,Dr}var Ur,xa;function Cf(){if(xa)return Ur;xa=1;var e=If(),a=Tf(),u=Sf();function n(r){return a(r)?u(r):e(r)}return Ur=n,Ur}var Br,ka;function Af(){if(ka)return Br;ka=1;var e=I.require_baseKeys(),a=I.require_getTag(),u=I.requireIsArrayLike(),n=Rf(),r=Cf(),t="[object Map]",s="[object Set]";function i(f){if(f==null)return 0;if(u(f))return n(f)?r(f):f.length;var d=a(f);return d==t||d==s?f.size:e(f).length}return Br=i,Br}var Hr,La;function Of(){if(La)return Hr;La=1;var e=I.require_arrayEach(),a=I.require_baseCreate(),u=ri(),n=re(),r=I.require_getPrototype(),t=I.requireIsArray(),s=I.requireIsBuffer(),i=I.requireIsFunction(),f=I.requireIsObject(),d=I.requireIsTypedArray();function o(c,h,l){var m=t(c),p=m||s(c)||d(c);if(h=n(h,4),l==null){var v=c&&c.constructor;p?l=m?new v:[]:f(c)?l=i(v)?a(r(c)):{}:l={}}return(p?e:u)(c,function(g,b,_){return h(l,g,b,_)}),l}return Hr=o,Hr}var Wr,Pa;function Nf(){if(Pa)return Wr;Pa=1;var e=I.require_Symbol(),a=I.requireIsArguments(),u=I.requireIsArray(),n=e?e.isConcatSpreadable:void 0;function r(t){return u(t)||a(t)||!!(n&&t&&t[n])}return Wr=r,Wr}var Vr,Ma;function si(){if(Ma)return Vr;Ma=1;var e=I.require_arrayPush(),a=Nf();function u(n,r,t,s,i){var f=-1,d=n.length;for(t||(t=a),i||(i=[]);++f<d;){var o=n[f];r>0&&t(o)?r>1?u(o,r-1,t,s,i):e(i,o):s||(i[i.length]=o)}return i}return Vr=u,Vr}var jr,Fa;function xf(){if(Fa)return jr;Fa=1;function e(a,u,n){switch(n.length){case 0:return a.call(u);case 1:return a.call(u,n[0]);case 2:return a.call(u,n[0],n[1]);case 3:return a.call(u,n[0],n[1],n[2])}return a.apply(u,n)}return jr=e,jr}var Kr,Ga;function vo(){if(Ga)return Kr;Ga=1;var e=xf(),a=Math.max;function u(n,r,t){return r=a(r===void 0?n.length-1:r,0),function(){for(var s=arguments,i=-1,f=a(s.length-r,0),d=Array(f);++i<f;)d[i]=s[r+i];i=-1;for(var o=Array(r+1);++i<r;)o[i]=s[i];return o[r]=t(d),e(n,this,o)}}return Kr=u,Kr}var zr,Da;function kf(){if(Da)return zr;Da=1;var e=ui(),a=I.require_defineProperty(),u=ae(),n=a?function(r,t){return a(r,"toString",{configurable:!0,enumerable:!1,value:e(t),writable:!0})}:u;return zr=n,zr}var Yr,Ua;function Lf(){if(Ua)return Yr;Ua=1;var e=800,a=16,u=Date.now;function n(r){var t=0,s=0;return function(){var i=u(),f=a-(i-s);if(s=i,f>0){if(++t>=e)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}return Yr=n,Yr}var $r,Ba;function po(){if(Ba)return $r;Ba=1;var e=kf(),a=Lf(),u=a(e);return $r=u,$r}var Xr,Ha;function Ee(){if(Ha)return Xr;Ha=1;var e=ae(),a=vo(),u=po();function n(r,t){return u(a(r,t,e),r+"")}return Xr=n,Xr}var Zr,Wa;function go(){if(Wa)return Zr;Wa=1;function e(a,u,n,r){for(var t=a.length,s=n+(r?1:-1);r?s--:++s<t;)if(u(a[s],s,a))return s;return-1}return Zr=e,Zr}var Qr,Va;function Pf(){if(Va)return Qr;Va=1;function e(a){return a!==a}return Qr=e,Qr}var Jr,ja;function Mf(){if(ja)return Jr;ja=1;function e(a,u,n){for(var r=n-1,t=a.length;++r<t;)if(a[r]===u)return r;return-1}return Jr=e,Jr}var en,Ka;function Ff(){if(Ka)return en;Ka=1;var e=go(),a=Pf(),u=Mf();function n(r,t,s){return t===t?u(r,t,s):e(r,a,s)}return en=n,en}var rn,za;function Gf(){if(za)return rn;za=1;var e=Ff();function a(u,n){var r=u==null?0:u.length;return!!r&&e(u,n,0)>-1}return rn=a,rn}var nn,Ya;function Df(){if(Ya)return nn;Ya=1;function e(a,u,n){for(var r=-1,t=a==null?0:a.length;++r<t;)if(n(u,a[r]))return!0;return!1}return nn=e,nn}var tn,$a;function Uf(){if($a)return tn;$a=1;function e(){}return tn=e,tn}var an,Xa;function Bf(){if(Xa)return an;Xa=1;var e=I.require_Set(),a=Uf(),u=ni(),n=1/0,r=e&&1/u(new e([,-0]))[1]==n?function(t){return new e(t)}:a;return an=r,an}var un,Za;function Hf(){if(Za)return un;Za=1;var e=Vs(),a=Gf(),u=Df(),n=js(),r=Bf(),t=ni(),s=200;function i(f,d,o){var c=-1,h=a,l=f.length,m=!0,p=[],v=p;if(o)m=!1,h=u;else if(l>=s){var g=d?null:r(f);if(g)return t(g);m=!1,h=n,v=new e}else v=d?[]:p;e:for(;++c<l;){var b=f[c],_=d?d(b):b;if(b=o||b!==0?b:0,m&&_===_){for(var y=v.length;y--;)if(v[y]===_)continue e;d&&v.push(_),p.push(b)}else h(v,_,o)||(v!==p&&v.push(_),p.push(b))}return p}return un=i,un}var sn,Qa;function _o(){if(Qa)return sn;Qa=1;var e=I.requireIsArrayLike(),a=I.requireIsObjectLike();function u(n){return a(n)&&e(n)}return sn=u,sn}var on,Ja;function Wf(){if(Ja)return on;Ja=1;var e=si(),a=Ee(),u=Hf(),n=_o(),r=a(function(t){return u(e(t,1,n,!0))});return on=r,on}var fn,eu;function Vf(){if(eu)return fn;eu=1;var e=be();function a(u,n){return e(n,function(r){return u[r]})}return fn=a,fn}var dn,ru;function bo(){if(ru)return dn;ru=1;var e=Vf(),a=I.requireKeys();function u(n){return n==null?[]:e(n,a(n))}return dn=u,dn}var cn,nu;function X(){if(nu)return cn;nu=1;var e;if(typeof ai=="function")try{e={clone:_f(),constant:ui(),each:uo(),filter:so(),has:oo(),isArray:I.requireIsArray(),isEmpty:qf(),isFunction:I.requireIsFunction(),isUndefined:fo(),keys:I.requireKeys(),map:ho(),reduce:lo(),size:Af(),transform:Of(),union:Wf(),values:bo()}}catch{}return e||(e=window._),cn=e,cn}var hn,tu;function oi(){if(tu)return hn;tu=1;var e=X();hn=r;var a="\0",u="\0",n="";function r(o){this._isDirected=e.has(o,"directed")?o.directed:!0,this._isMultigraph=e.has(o,"multigraph")?o.multigraph:!1,this._isCompound=e.has(o,"compound")?o.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[u]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}r.prototype._nodeCount=0,r.prototype._edgeCount=0,r.prototype.isDirected=function(){return this._isDirected},r.prototype.isMultigraph=function(){return this._isMultigraph},r.prototype.isCompound=function(){return this._isCompound},r.prototype.setGraph=function(o){return this._label=o,this},r.prototype.graph=function(){return this._label},r.prototype.setDefaultNodeLabel=function(o){return e.isFunction(o)||(o=e.constant(o)),this._defaultNodeLabelFn=o,this},r.prototype.nodeCount=function(){return this._nodeCount},r.prototype.nodes=function(){return e.keys(this._nodes)},r.prototype.sources=function(){var o=this;return e.filter(this.nodes(),function(c){return e.isEmpty(o._in[c])})},r.prototype.sinks=function(){var o=this;return e.filter(this.nodes(),function(c){return e.isEmpty(o._out[c])})},r.prototype.setNodes=function(o,c){var h=arguments,l=this;return e.each(o,function(m){h.length>1?l.setNode(m,c):l.setNode(m)}),this},r.prototype.setNode=function(o,c){return e.has(this._nodes,o)?(arguments.length>1&&(this._nodes[o]=c),this):(this._nodes[o]=arguments.length>1?c:this._defaultNodeLabelFn(o),this._isCompound&&(this._parent[o]=u,this._children[o]={},this._children[u][o]=!0),this._in[o]={},this._preds[o]={},this._out[o]={},this._sucs[o]={},++this._nodeCount,this)},r.prototype.node=function(o){return this._nodes[o]},r.prototype.hasNode=function(o){return e.has(this._nodes,o)},r.prototype.removeNode=function(o){var c=this;if(e.has(this._nodes,o)){var h=function(l){c.removeEdge(c._edgeObjs[l])};delete this._nodes[o],this._isCompound&&(this._removeFromParentsChildList(o),delete this._parent[o],e.each(this.children(o),function(l){c.setParent(l)}),delete this._children[o]),e.each(e.keys(this._in[o]),h),delete this._in[o],delete this._preds[o],e.each(e.keys(this._out[o]),h),delete this._out[o],delete this._sucs[o],--this._nodeCount}return this},r.prototype.setParent=function(o,c){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(c))c=u;else{c+="";for(var h=c;!e.isUndefined(h);h=this.parent(h))if(h===o)throw new Error("Setting "+c+" as parent of "+o+" would create a cycle");this.setNode(c)}return this.setNode(o),this._removeFromParentsChildList(o),this._parent[o]=c,this._children[c][o]=!0,this},r.prototype._removeFromParentsChildList=function(o){delete this._children[this._parent[o]][o]},r.prototype.parent=function(o){if(this._isCompound){var c=this._parent[o];if(c!==u)return c}},r.prototype.children=function(o){if(e.isUndefined(o)&&(o=u),this._isCompound){var c=this._children[o];if(c)return e.keys(c)}else{if(o===u)return this.nodes();if(this.hasNode(o))return[]}},r.prototype.predecessors=function(o){var c=this._preds[o];if(c)return e.keys(c)},r.prototype.successors=function(o){var c=this._sucs[o];if(c)return e.keys(c)},r.prototype.neighbors=function(o){var c=this.predecessors(o);if(c)return e.union(c,this.successors(o))},r.prototype.isLeaf=function(o){var c;return this.isDirected()?c=this.successors(o):c=this.neighbors(o),c.length===0},r.prototype.filterNodes=function(o){var c=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});c.setGraph(this.graph());var h=this;e.each(this._nodes,function(p,v){o(v)&&c.setNode(v,p)}),e.each(this._edgeObjs,function(p){c.hasNode(p.v)&&c.hasNode(p.w)&&c.setEdge(p,h.edge(p))});var l={};function m(p){var v=h.parent(p);return v===void 0||c.hasNode(v)?(l[p]=v,v):v in l?l[v]:m(v)}return this._isCompound&&e.each(c.nodes(),function(p){c.setParent(p,m(p))}),c},r.prototype.setDefaultEdgeLabel=function(o){return e.isFunction(o)||(o=e.constant(o)),this._defaultEdgeLabelFn=o,this},r.prototype.edgeCount=function(){return this._edgeCount},r.prototype.edges=function(){return e.values(this._edgeObjs)},r.prototype.setPath=function(o,c){var h=this,l=arguments;return e.reduce(o,function(m,p){return l.length>1?h.setEdge(m,p,c):h.setEdge(m,p),p}),this},r.prototype.setEdge=function(){var o,c,h,l,m=!1,p=arguments[0];typeof p=="object"&&p!==null&&"v"in p?(o=p.v,c=p.w,h=p.name,arguments.length===2&&(l=arguments[1],m=!0)):(o=p,c=arguments[1],h=arguments[3],arguments.length>2&&(l=arguments[2],m=!0)),o=""+o,c=""+c,e.isUndefined(h)||(h=""+h);var v=i(this._isDirected,o,c,h);if(e.has(this._edgeLabels,v))return m&&(this._edgeLabels[v]=l),this;if(!e.isUndefined(h)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(o),this.setNode(c),this._edgeLabels[v]=m?l:this._defaultEdgeLabelFn(o,c,h);var g=f(this._isDirected,o,c,h);return o=g.v,c=g.w,Object.freeze(g),this._edgeObjs[v]=g,t(this._preds[c],o),t(this._sucs[o],c),this._in[c][v]=g,this._out[o][v]=g,this._edgeCount++,this},r.prototype.edge=function(o,c,h){var l=arguments.length===1?d(this._isDirected,arguments[0]):i(this._isDirected,o,c,h);return this._edgeLabels[l]},r.prototype.hasEdge=function(o,c,h){var l=arguments.length===1?d(this._isDirected,arguments[0]):i(this._isDirected,o,c,h);return e.has(this._edgeLabels,l)},r.prototype.removeEdge=function(o,c,h){var l=arguments.length===1?d(this._isDirected,arguments[0]):i(this._isDirected,o,c,h),m=this._edgeObjs[l];return m&&(o=m.v,c=m.w,delete this._edgeLabels[l],delete this._edgeObjs[l],s(this._preds[c],o),s(this._sucs[o],c),delete this._in[c][l],delete this._out[o][l],this._edgeCount--),this},r.prototype.inEdges=function(o,c){var h=this._in[o];if(h){var l=e.values(h);return c?e.filter(l,function(m){return m.v===c}):l}},r.prototype.outEdges=function(o,c){var h=this._out[o];if(h){var l=e.values(h);return c?e.filter(l,function(m){return m.w===c}):l}},r.prototype.nodeEdges=function(o,c){var h=this.inEdges(o,c);if(h)return h.concat(this.outEdges(o,c))};function t(o,c){o[c]?o[c]++:o[c]=1}function s(o,c){--o[c]||delete o[c]}function i(o,c,h,l){var m=""+c,p=""+h;if(!o&&m>p){var v=m;m=p,p=v}return m+n+p+n+(e.isUndefined(l)?a:l)}function f(o,c,h,l){var m=""+c,p=""+h;if(!o&&m>p){var v=m;m=p,p=v}var g={v:m,w:p};return l&&(g.name=l),g}function d(o,c){return i(o,c.v,c.w,c.name)}return hn}var ln,iu;function jf(){return iu||(iu=1,ln="2.1.8"),ln}var vn,au;function Kf(){return au||(au=1,vn={Graph:oi(),version:jf()}),vn}var pn,uu;function zf(){if(uu)return pn;uu=1;var e=X(),a=oi();pn={write:u,read:t};function u(s){var i={options:{directed:s.isDirected(),multigraph:s.isMultigraph(),compound:s.isCompound()},nodes:n(s),edges:r(s)};return e.isUndefined(s.graph())||(i.value=e.clone(s.graph())),i}function n(s){return e.map(s.nodes(),function(i){var f=s.node(i),d=s.parent(i),o={v:i};return e.isUndefined(f)||(o.value=f),e.isUndefined(d)||(o.parent=d),o})}function r(s){return e.map(s.edges(),function(i){var f=s.edge(i),d={v:i.v,w:i.w};return e.isUndefined(i.name)||(d.name=i.name),e.isUndefined(f)||(d.value=f),d})}function t(s){var i=new a(s.options).setGraph(s.value);return e.each(s.nodes,function(f){i.setNode(f.v,f.value),f.parent&&i.setParent(f.v,f.parent)}),e.each(s.edges,function(f){i.setEdge({v:f.v,w:f.w,name:f.name},f.value)}),i}return pn}var gn,su;function Yf(){if(su)return gn;su=1;var e=X();gn=a;function a(u){var n={},r=[],t;function s(i){e.has(n,i)||(n[i]=!0,t.push(i),e.each(u.successors(i),s),e.each(u.predecessors(i),s))}return e.each(u.nodes(),function(i){t=[],s(i),t.length&&r.push(t)}),r}return gn}var _n,ou;function yo(){if(ou)return _n;ou=1;var e=X();_n=a;function a(){this._arr=[],this._keyIndices={}}return a.prototype.size=function(){return this._arr.length},a.prototype.keys=function(){return this._arr.map(function(u){return u.key})},a.prototype.has=function(u){return e.has(this._keyIndices,u)},a.prototype.priority=function(u){var n=this._keyIndices[u];if(n!==void 0)return this._arr[n].priority},a.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},a.prototype.add=function(u,n){var r=this._keyIndices;if(u=String(u),!e.has(r,u)){var t=this._arr,s=t.length;return r[u]=s,t.push({key:u,priority:n}),this._decrease(s),!0}return!1},a.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var u=this._arr.pop();return delete this._keyIndices[u.key],this._heapify(0),u.key},a.prototype.decrease=function(u,n){var r=this._keyIndices[u];if(n>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+u+" Old: "+this._arr[r].priority+" New: "+n);this._arr[r].priority=n,this._decrease(r)},a.prototype._heapify=function(u){var n=this._arr,r=2*u,t=r+1,s=u;r<n.length&&(s=n[r].priority<n[s].priority?r:s,t<n.length&&(s=n[t].priority<n[s].priority?t:s),s!==u&&(this._swap(u,s),this._heapify(s)))},a.prototype._decrease=function(u){for(var n=this._arr,r=n[u].priority,t;u!==0&&(t=u>>1,!(n[t].priority<r));)this._swap(u,t),u=t},a.prototype._swap=function(u,n){var r=this._arr,t=this._keyIndices,s=r[u],i=r[n];r[u]=i,r[n]=s,t[i.key]=u,t[s.key]=n},_n}var bn,fu;function mo(){if(fu)return bn;fu=1;var e=X(),a=yo();bn=n;var u=e.constant(1);function n(t,s,i,f){return r(t,String(s),i||u,f||function(d){return t.outEdges(d)})}function r(t,s,i,f){var d={},o=new a,c,h,l=function(m){var p=m.v!==c?m.v:m.w,v=d[p],g=i(m),b=h.distance+g;if(g<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+m+" Weight: "+g);b<v.distance&&(v.distance=b,v.predecessor=c,o.decrease(p,b))};for(t.nodes().forEach(function(m){var p=m===s?0:Number.POSITIVE_INFINITY;d[m]={distance:p},o.add(m,p)});o.size()>0&&(c=o.removeMin(),h=d[c],h.distance!==Number.POSITIVE_INFINITY);)f(c).forEach(l);return d}return bn}var yn,du;function $f(){if(du)return yn;du=1;var e=mo(),a=X();yn=u;function u(n,r,t){return a.transform(n.nodes(),function(s,i){s[i]=e(n,i,r,t)},{})}return yn}var mn,cu;function qo(){if(cu)return mn;cu=1;var e=X();mn=a;function a(u){var n=0,r=[],t={},s=[];function i(f){var d=t[f]={onStack:!0,lowlink:n,index:n++};if(r.push(f),u.successors(f).forEach(function(h){e.has(t,h)?t[h].onStack&&(d.lowlink=Math.min(d.lowlink,t[h].index)):(i(h),d.lowlink=Math.min(d.lowlink,t[h].lowlink))}),d.lowlink===d.index){var o=[],c;do c=r.pop(),t[c].onStack=!1,o.push(c);while(f!==c);s.push(o)}}return u.nodes().forEach(function(f){e.has(t,f)||i(f)}),s}return mn}var qn,hu;function Xf(){if(hu)return qn;hu=1;var e=X(),a=qo();qn=u;function u(n){return e.filter(a(n),function(r){return r.length>1||r.length===1&&n.hasEdge(r[0],r[0])})}return qn}var En,lu;function Zf(){if(lu)return En;lu=1;var e=X();En=u;var a=e.constant(1);function u(r,t,s){return n(r,t||a,s||function(i){return r.outEdges(i)})}function n(r,t,s){var i={},f=r.nodes();return f.forEach(function(d){i[d]={},i[d][d]={distance:0},f.forEach(function(o){d!==o&&(i[d][o]={distance:Number.POSITIVE_INFINITY})}),s(d).forEach(function(o){var c=o.v===d?o.w:o.v,h=t(o);i[d][c]={distance:h,predecessor:d}})}),f.forEach(function(d){var o=i[d];f.forEach(function(c){var h=i[c];f.forEach(function(l){var m=h[d],p=o[l],v=h[l],g=m.distance+p.distance;g<v.distance&&(v.distance=g,v.predecessor=p.predecessor)})})}),i}return En}var wn,vu;function Eo(){if(vu)return wn;vu=1;var e=X();wn=a,a.CycleException=u;function a(n){var r={},t={},s=[];function i(f){if(e.has(t,f))throw new u;e.has(r,f)||(t[f]=!0,r[f]=!0,e.each(n.predecessors(f),i),delete t[f],s.push(f))}if(e.each(n.sinks(),i),e.size(r)!==n.nodeCount())throw new u;return s}function u(){}return u.prototype=new Error,wn}var Rn,pu;function Qf(){if(pu)return Rn;pu=1;var e=Eo();Rn=a;function a(u){try{e(u)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return Rn}var In,gu;function wo(){if(gu)return In;gu=1;var e=X();In=a;function a(n,r,t){e.isArray(r)||(r=[r]);var s=(n.isDirected()?n.successors:n.neighbors).bind(n),i=[],f={};return e.each(r,function(d){if(!n.hasNode(d))throw new Error("Graph does not have node: "+d);u(n,d,t==="post",f,s,i)}),i}function u(n,r,t,s,i,f){e.has(s,r)||(s[r]=!0,t||f.push(r),e.each(i(r),function(d){u(n,d,t,s,i,f)}),t&&f.push(r))}return In}var Tn,_u;function Jf(){if(_u)return Tn;_u=1;var e=wo();Tn=a;function a(u,n){return e(u,n,"post")}return Tn}var Sn,bu;function ed(){if(bu)return Sn;bu=1;var e=wo();Sn=a;function a(u,n){return e(u,n,"pre")}return Sn}var Cn,yu;function rd(){if(yu)return Cn;yu=1;var e=X(),a=oi(),u=yo();Cn=n;function n(r,t){var s=new a,i={},f=new u,d;function o(h){var l=h.v===d?h.w:h.v,m=f.priority(l);if(m!==void 0){var p=t(h);p<m&&(i[l]=d,f.decrease(l,p))}}if(r.nodeCount()===0)return s;e.each(r.nodes(),function(h){f.add(h,Number.POSITIVE_INFINITY),s.setNode(h)}),f.decrease(r.nodes()[0],0);for(var c=!1;f.size()>0;){if(d=f.removeMin(),e.has(i,d))s.setEdge(d,i[d]);else{if(c)throw new Error("Input graph is not connected: "+r);c=!0}r.nodeEdges(d).forEach(o)}return s}return Cn}var An,mu;function nd(){return mu||(mu=1,An={components:Yf(),dijkstra:mo(),dijkstraAll:$f(),findCycles:Xf(),floydWarshall:Zf(),isAcyclic:Qf(),postorder:Jf(),preorder:ed(),prim:rd(),tarjan:qo(),topsort:Eo()}),An}var On,qu;function td(){if(qu)return On;qu=1;var e=Kf();return On={Graph:e.Graph,json:zf(),alg:nd(),version:e.version},On}var Nn,Eu;function Z(){if(Eu)return Nn;Eu=1;var e;if(typeof ai=="function")try{e=td()}catch{}return e||(e=window.graphlib),Nn=e,Nn}var xn,wu;function we(){if(wu)return xn;wu=1;var e=I.requireEq(),a=I.requireIsArrayLike(),u=I.require_isIndex(),n=I.requireIsObject();function r(t,s,i){if(!n(i))return!1;var f=typeof s;return(f=="number"?a(i)&&u(s,i.length):f=="string"&&s in i)?e(i[s],t):!1}return xn=r,xn}var kn,Ru;function id(){if(Ru)return kn;Ru=1;var e=Ee(),a=I.requireEq(),u=we(),n=I.requireKeysIn(),r=Object.prototype,t=r.hasOwnProperty,s=e(function(i,f){i=Object(i);var d=-1,o=f.length,c=o>2?f[2]:void 0;for(c&&u(f[0],f[1],c)&&(o=1);++d<o;)for(var h=f[d],l=n(h),m=-1,p=l.length;++m<p;){var v=l[m],g=i[v];(g===void 0||a(g,r[v])&&!t.call(i,v))&&(i[v]=h[v])}return i});return kn=s,kn}var Ln,Iu;function ad(){if(Iu)return Ln;Iu=1;var e=re(),a=I.requireIsArrayLike(),u=I.requireKeys();function n(r){return function(t,s,i){var f=Object(t);if(!a(t)){var d=e(s,3);t=u(t),s=function(c){return d(f[c],c,f)}}var o=r(t,s,i);return o>-1?f[d?t[o]:o]:void 0}}return Ln=n,Ln}var Pn,Tu;function ud(){if(Tu)return Pn;Tu=1;var e=/\s/;function a(u){for(var n=u.length;n--&&e.test(u.charAt(n)););return n}return Pn=a,Pn}var Mn,Su;function sd(){if(Su)return Mn;Su=1;var e=ud(),a=/^\s+/;function u(n){return n&&n.slice(0,e(n)+1).replace(a,"")}return Mn=u,Mn}var Fn,Cu;function od(){if(Cu)return Fn;Cu=1;var e=sd(),a=I.requireIsObject(),u=oe(),n=NaN,r=/^[-+]0x[0-9a-f]+$/i,t=/^0b[01]+$/i,s=/^0o[0-7]+$/i,i=parseInt;function f(d){if(typeof d=="number")return d;if(u(d))return n;if(a(d)){var o=typeof d.valueOf=="function"?d.valueOf():d;d=a(o)?o+"":o}if(typeof d!="string")return d===0?d:+d;d=e(d);var c=t.test(d);return c||s.test(d)?i(d.slice(2),c?2:8):r.test(d)?n:+d}return Fn=f,Fn}var Gn,Au;function Ro(){if(Au)return Gn;Au=1;var e=od(),a=1/0,u=17976931348623157e292;function n(r){if(!r)return r===0?r:0;if(r=e(r),r===a||r===-1/0){var t=r<0?-1:1;return t*u}return r===r?r:0}return Gn=n,Gn}var Dn,Ou;function fd(){if(Ou)return Dn;Ou=1;var e=Ro();function a(u){var n=e(u),r=n%1;return n===n?r?n-r:n:0}return Dn=a,Dn}var Un,Nu;function dd(){if(Nu)return Un;Nu=1;var e=go(),a=re(),u=fd(),n=Math.max;function r(t,s,i){var f=t==null?0:t.length;if(!f)return-1;var d=i==null?0:u(i);return d<0&&(d=n(f+d,0)),e(t,a(s,3),d)}return Un=r,Un}var Bn,xu;function cd(){if(xu)return Bn;xu=1;var e=ad(),a=dd(),u=e(a);return Bn=u,Bn}var Hn,ku;function Io(){if(ku)return Hn;ku=1;var e=si();function a(u){var n=u==null?0:u.length;return n?e(u,1):[]}return Hn=a,Hn}var Wn,Lu;function hd(){if(Lu)return Wn;Lu=1;var e=ei(),a=io(),u=I.requireKeysIn();function n(r,t){return r==null?r:e(r,a(t),u)}return Wn=n,Wn}var Vn,Pu;function ld(){if(Pu)return Vn;Pu=1;function e(a){var u=a==null?0:a.length;return u?a[u-1]:void 0}return Vn=e,Vn}var jn,Mu;function fi(){if(Mu)return jn;Mu=1;var e=oe();function a(u,n,r){for(var t=-1,s=u.length;++t<s;){var i=u[t],f=n(i);if(f!=null&&(d===void 0?f===f&&!e(f):r(f,d)))var d=f,o=i}return o}return jn=a,jn}var Kn,Fu;function vd(){if(Fu)return Kn;Fu=1;function e(a,u){return a>u}return Kn=e,Kn}var zn,Gu;function pd(){if(Gu)return zn;Gu=1;var e=fi(),a=vd(),u=ae();function n(r){return r&&r.length?e(r,u,a):void 0}return zn=n,zn}var Yn,Du;function To(){if(Du)return Yn;Du=1;var e=I.require_baseAssignValue(),a=I.requireEq();function u(n,r,t){(t!==void 0&&!a(n[r],t)||t===void 0&&!(r in n))&&e(n,r,t)}return Yn=u,Yn}var $n,Uu;function gd(){if(Uu)return $n;Uu=1;var e=I.require_baseGetTag(),a=I.require_getPrototype(),u=I.requireIsObjectLike(),n="[object Object]",r=Function.prototype,t=Object.prototype,s=r.toString,i=t.hasOwnProperty,f=s.call(Object);function d(o){if(!u(o)||e(o)!=n)return!1;var c=a(o);if(c===null)return!0;var h=i.call(c,"constructor")&&c.constructor;return typeof h=="function"&&h instanceof h&&s.call(h)==f}return $n=d,$n}var Xn,Bu;function So(){if(Bu)return Xn;Bu=1;function e(a,u){if(!(u==="constructor"&&typeof a[u]=="function")&&u!="__proto__")return a[u]}return Xn=e,Xn}var Zn,Hu;function _d(){if(Hu)return Zn;Hu=1;var e=I.require_copyObject(),a=I.requireKeysIn();function u(n){return e(n,a(n))}return Zn=u,Zn}var Qn,Wu;function bd(){if(Wu)return Qn;Wu=1;var e=To(),a=I.require_cloneBuffer(),u=I.require_cloneTypedArray(),n=I.require_copyArray(),r=I.require_initCloneObject(),t=I.requireIsArguments(),s=I.requireIsArray(),i=_o(),f=I.requireIsBuffer(),d=I.requireIsFunction(),o=I.requireIsObject(),c=gd(),h=I.requireIsTypedArray(),l=So(),m=_d();function p(v,g,b,_,y,q,R){var E=l(v,b),C=l(g,b),O=R.get(C);if(O){e(v,b,O);return}var S=q?q(E,C,b+"",v,g,R):void 0,k=S===void 0;if(k){var L=s(C),P=!L&&f(C),M=!L&&!P&&h(C);S=C,L||P||M?s(E)?S=E:i(E)?S=n(E):P?(k=!1,S=a(C,!0)):M?(k=!1,S=u(C,!0)):S=[]:c(C)||t(C)?(S=E,t(E)?S=m(E):(!o(E)||d(E))&&(S=r(C))):k=!1}k&&(R.set(C,S),y(S,C,_,q,R),R.delete(C)),e(v,b,S)}return Qn=p,Qn}var Jn,Vu;function yd(){if(Vu)return Jn;Vu=1;var e=I.require_Stack(),a=To(),u=ei(),n=bd(),r=I.requireIsObject(),t=I.requireKeysIn(),s=So();function i(f,d,o,c,h){f!==d&&u(d,function(l,m){if(h||(h=new e),r(l))n(f,d,m,o,i,c,h);else{var p=c?c(s(f,m),l,m+"",f,d,h):void 0;p===void 0&&(p=l),a(f,m,p)}},t)}return Jn=i,Jn}var et,ju;function md(){if(ju)return et;ju=1;var e=Ee(),a=we();function u(n){return e(function(r,t){var s=-1,i=t.length,f=i>1?t[i-1]:void 0,d=i>2?t[2]:void 0;for(f=n.length>3&&typeof f=="function"?(i--,f):void 0,d&&a(t[0],t[1],d)&&(f=i<3?void 0:f,i=1),r=Object(r);++s<i;){var o=t[s];o&&n(r,o,s,f)}return r})}return et=u,et}var rt,Ku;function qd(){if(Ku)return rt;Ku=1;var e=yd(),a=md(),u=a(function(n,r,t){e(n,r,t)});return rt=u,rt}var nt,zu;function Co(){if(zu)return nt;zu=1;function e(a,u){return a<u}return nt=e,nt}var tt,Yu;function Ed(){if(Yu)return tt;Yu=1;var e=fi(),a=Co(),u=ae();function n(r){return r&&r.length?e(r,u,a):void 0}return tt=n,tt}var it,$u;function wd(){if($u)return it;$u=1;var e=fi(),a=re(),u=Co();function n(r,t){return r&&r.length?e(r,a(t,2),u):void 0}return it=n,it}var at,Xu;function Rd(){if(Xu)return at;Xu=1;var e=I.require_root(),a=function(){return e.Date.now()};return at=a,at}var ut,Zu;function Id(){if(Zu)return ut;Zu=1;var e=I.require_assignValue(),a=ye(),u=I.require_isIndex(),n=I.requireIsObject(),r=le();function t(s,i,f,d){if(!n(s))return s;i=a(i,s);for(var o=-1,c=i.length,h=c-1,l=s;l!=null&&++o<c;){var m=r(i[o]),p=f;if(m==="__proto__"||m==="constructor"||m==="prototype")return s;if(o!=h){var v=l[m];p=d?d(v,m,l):void 0,p===void 0&&(p=n(v)?v:u(i[o+1])?[]:{})}e(l,m,p),l=l[m]}return s}return ut=t,ut}var st,Qu;function Td(){if(Qu)return st;Qu=1;var e=me(),a=Id(),u=ye();function n(r,t,s){for(var i=-1,f=t.length,d={};++i<f;){var o=t[i],c=e(r,o);s(c,o)&&a(d,u(o,r),c)}return d}return st=n,st}var ot,Ju;function Sd(){if(Ju)return ot;Ju=1;var e=Td(),a=Zs();function u(n,r){return e(n,r,function(t,s){return a(n,s)})}return ot=u,ot}var ft,es;function Cd(){if(es)return ft;es=1;var e=Io(),a=vo(),u=po();function n(r){return u(a(r,void 0,e),r+"")}return ft=n,ft}var dt,rs;function Ad(){if(rs)return dt;rs=1;var e=Sd(),a=Cd(),u=a(function(n,r){return n==null?{}:e(n,r)});return dt=u,dt}var ct,ns;function Od(){if(ns)return ct;ns=1;var e=Math.ceil,a=Math.max;function u(n,r,t,s){for(var i=-1,f=a(e((r-n)/(t||1)),0),d=Array(f);f--;)d[s?f:++i]=n,n+=t;return d}return ct=u,ct}var ht,ts;function Nd(){if(ts)return ht;ts=1;var e=Od(),a=we(),u=Ro();function n(r){return function(t,s,i){return i&&typeof i!="number"&&a(t,s,i)&&(s=i=void 0),t=u(t),s===void 0?(s=t,t=0):s=u(s),i=i===void 0?t<s?1:-1:u(i),e(t,s,i,r)}}return ht=n,ht}var lt,is;function xd(){if(is)return lt;is=1;var e=Nd(),a=e();return lt=a,lt}var vt,as;function kd(){if(as)return vt;as=1;function e(a,u){var n=a.length;for(a.sort(u);n--;)a[n]=a[n].value;return a}return vt=e,vt}var pt,us;function Ld(){if(us)return pt;us=1;var e=oe();function a(u,n){if(u!==n){var r=u!==void 0,t=u===null,s=u===u,i=e(u),f=n!==void 0,d=n===null,o=n===n,c=e(n);if(!d&&!c&&!i&&u>n||i&&f&&o&&!d&&!c||t&&f&&o||!r&&o||!s)return 1;if(!t&&!i&&!c&&u<n||c&&r&&s&&!t&&!i||d&&r&&s||!f&&s||!o)return-1}return 0}return pt=a,pt}var gt,ss;function Pd(){if(ss)return gt;ss=1;var e=Ld();function a(u,n,r){for(var t=-1,s=u.criteria,i=n.criteria,f=s.length,d=r.length;++t<f;){var o=e(s[t],i[t]);if(o){if(t>=d)return o;var c=r[t];return o*(c=="desc"?-1:1)}}return u.index-n.index}return gt=a,gt}var _t,os;function Md(){if(os)return _t;os=1;var e=be(),a=me(),u=re(),n=co(),r=kd(),t=I.require_baseUnary(),s=Pd(),i=ae(),f=I.requireIsArray();function d(o,c,h){c.length?c=e(c,function(p){return f(p)?function(v){return a(v,p.length===1?p[0]:p)}:p}):c=[i];var l=-1;c=e(c,t(u));var m=n(o,function(p,v,g){var b=e(c,function(_){return _(p)});return{criteria:b,index:++l,value:p}});return r(m,function(p,v){return s(p,v,h)})}return _t=d,_t}var bt,fs;function Fd(){if(fs)return bt;fs=1;var e=si(),a=Md(),u=Ee(),n=we(),r=u(function(t,s){if(t==null)return[];var i=s.length;return i>1&&n(t,s[0],s[1])?s=[]:i>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),a(t,e(s,1),[])});return bt=r,bt}var yt,ds;function Gd(){if(ds)return yt;ds=1;var e=$s(),a=0;function u(n){var r=++a;return e(n)+r}return yt=u,yt}var mt,cs;function Dd(){if(cs)return mt;cs=1;function e(a,u,n){for(var r=-1,t=a.length,s=u.length,i={};++r<t;){var f=r<s?u[r]:void 0;n(i,a[r],f)}return i}return mt=e,mt}var qt,hs;function Ud(){if(hs)return qt;hs=1;var e=I.require_assignValue(),a=Dd();function u(n,r){return a(n||[],r||[],e)}return qt=u,qt}var Et,ls;function D(){if(ls)return Et;ls=1;var e;if(typeof ai=="function")try{e={cloneDeep:I.requireCloneDeep(),constant:ui(),defaults:id(),each:uo(),filter:so(),find:cd(),flatten:Io(),forEach:ao(),forIn:hd(),has:oo(),isUndefined:fo(),last:ld(),map:ho(),mapValues:Js(),max:pd(),merge:qd(),min:Ed(),minBy:wd(),now:Rd(),pick:Ad(),range:xd(),reduce:lo(),sortBy:Fd(),uniqueId:Gd(),values:bo(),zipObject:Ud()}}catch{}return e||(e=window._),Et=e,Et}var wt,vs;function Bd(){if(vs)return wt;vs=1,wt=e;function e(){var n={};n._next=n._prev=n,this._sentinel=n}e.prototype.dequeue=function(){var n=this._sentinel,r=n._prev;if(r!==n)return a(r),r},e.prototype.enqueue=function(n){var r=this._sentinel;n._prev&&n._next&&a(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r},e.prototype.toString=function(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,u)),t=t._prev;return"["+n.join(", ")+"]"};function a(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function u(n,r){if(n!=="_next"&&n!=="_prev")return r}return wt}var Rt,ps;function Hd(){if(ps)return Rt;ps=1;var e=D(),a=Z().Graph,u=Bd();Rt=r;var n=e.constant(1);function r(d,o){if(d.nodeCount()<=1)return[];var c=i(d,o||n),h=t(c.graph,c.buckets,c.zeroIdx);return e.flatten(e.map(h,function(l){return d.outEdges(l.v,l.w)}),!0)}function t(d,o,c){for(var h=[],l=o[o.length-1],m=o[0],p;d.nodeCount();){for(;p=m.dequeue();)s(d,o,c,p);for(;p=l.dequeue();)s(d,o,c,p);if(d.nodeCount()){for(var v=o.length-2;v>0;--v)if(p=o[v].dequeue(),p){h=h.concat(s(d,o,c,p,!0));break}}}return h}function s(d,o,c,h,l){var m=l?[]:void 0;return e.forEach(d.inEdges(h.v),function(p){var v=d.edge(p),g=d.node(p.v);l&&m.push({v:p.v,w:p.w}),g.out-=v,f(o,c,g)}),e.forEach(d.outEdges(h.v),function(p){var v=d.edge(p),g=p.w,b=d.node(g);b.in-=v,f(o,c,b)}),d.removeNode(h.v),m}function i(d,o){var c=new a,h=0,l=0;e.forEach(d.nodes(),function(v){c.setNode(v,{v,in:0,out:0})}),e.forEach(d.edges(),function(v){var g=c.edge(v.v,v.w)||0,b=o(v),_=g+b;c.setEdge(v.v,v.w,_),l=Math.max(l,c.node(v.v).out+=b),h=Math.max(h,c.node(v.w).in+=b)});var m=e.range(l+h+3).map(function(){return new u}),p=h+1;return e.forEach(c.nodes(),function(v){f(m,p,c.node(v))}),{graph:c,buckets:m,zeroIdx:p}}function f(d,o,c){c.out?c.in?d[c.out-c.in+o].enqueue(c):d[d.length-1].enqueue(c):d[0].enqueue(c)}return Rt}var It,gs;function Wd(){if(gs)return It;gs=1;var e=D(),a=Hd();It={run:u,undo:r};function u(t){var s=t.graph().acyclicer==="greedy"?a(t,i(t)):n(t);e.forEach(s,function(f){var d=t.edge(f);t.removeEdge(f),d.forwardName=f.name,d.reversed=!0,t.setEdge(f.w,f.v,d,e.uniqueId("rev"))});function i(f){return function(d){return f.edge(d).weight}}}function n(t){var s=[],i={},f={};function d(o){e.has(f,o)||(f[o]=!0,i[o]=!0,e.forEach(t.outEdges(o),function(c){e.has(i,c.w)?s.push(c):d(c.w)}),delete i[o])}return e.forEach(t.nodes(),d),s}function r(t){e.forEach(t.edges(),function(s){var i=t.edge(s);if(i.reversed){t.removeEdge(s);var f=i.forwardName;delete i.reversed,delete i.forwardName,t.setEdge(s.w,s.v,i,f)}})}return It}var Tt,_s;function z(){if(_s)return Tt;_s=1;var e=D(),a=Z().Graph;Tt={addDummyNode:u,simplify:n,asNonCompoundGraph:r,successorWeights:t,predecessorWeights:s,intersectRect:i,buildLayerMatrix:f,normalizeRanks:d,removeEmptyRanks:o,addBorderNode:c,maxRank:h,partition:l,time:m,notime:p};function u(v,g,b,_){var y;do y=e.uniqueId(_);while(v.hasNode(y));return b.dummy=g,v.setNode(y,b),y}function n(v){var g=new a().setGraph(v.graph());return e.forEach(v.nodes(),function(b){g.setNode(b,v.node(b))}),e.forEach(v.edges(),function(b){var _=g.edge(b.v,b.w)||{weight:0,minlen:1},y=v.edge(b);g.setEdge(b.v,b.w,{weight:_.weight+y.weight,minlen:Math.max(_.minlen,y.minlen)})}),g}function r(v){var g=new a({multigraph:v.isMultigraph()}).setGraph(v.graph());return e.forEach(v.nodes(),function(b){v.children(b).length||g.setNode(b,v.node(b))}),e.forEach(v.edges(),function(b){g.setEdge(b,v.edge(b))}),g}function t(v){var g=e.map(v.nodes(),function(b){var _={};return e.forEach(v.outEdges(b),function(y){_[y.w]=(_[y.w]||0)+v.edge(y).weight}),_});return e.zipObject(v.nodes(),g)}function s(v){var g=e.map(v.nodes(),function(b){var _={};return e.forEach(v.inEdges(b),function(y){_[y.v]=(_[y.v]||0)+v.edge(y).weight}),_});return e.zipObject(v.nodes(),g)}function i(v,g){var b=v.x,_=v.y,y=g.x-b,q=g.y-_,R=v.width/2,E=v.height/2;if(!y&&!q)throw new Error("Not possible to find intersection inside of the rectangle");var C,O;return Math.abs(q)*R>Math.abs(y)*E?(q<0&&(E=-E),C=E*y/q,O=E):(y<0&&(R=-R),C=R,O=R*q/y),{x:b+C,y:_+O}}function f(v){var g=e.map(e.range(h(v)+1),function(){return[]});return e.forEach(v.nodes(),function(b){var _=v.node(b),y=_.rank;e.isUndefined(y)||(g[y][_.order]=b)}),g}function d(v){var g=e.min(e.map(v.nodes(),function(b){return v.node(b).rank}));e.forEach(v.nodes(),function(b){var _=v.node(b);e.has(_,"rank")&&(_.rank-=g)})}function o(v){var g=e.min(e.map(v.nodes(),function(q){return v.node(q).rank})),b=[];e.forEach(v.nodes(),function(q){var R=v.node(q).rank-g;b[R]||(b[R]=[]),b[R].push(q)});var _=0,y=v.graph().nodeRankFactor;e.forEach(b,function(q,R){e.isUndefined(q)&&R%y!==0?--_:_&&e.forEach(q,function(E){v.node(E).rank+=_})})}function c(v,g,b,_){var y={width:0,height:0};return arguments.length>=4&&(y.rank=b,y.order=_),u(v,"border",y,g)}function h(v){return e.max(e.map(v.nodes(),function(g){var b=v.node(g).rank;if(!e.isUndefined(b))return b}))}function l(v,g){var b={lhs:[],rhs:[]};return e.forEach(v,function(_){g(_)?b.lhs.push(_):b.rhs.push(_)}),b}function m(v,g){var b=e.now();try{return g()}finally{console.log(v+" time: "+(e.now()-b)+"ms")}}function p(v,g){return g()}return Tt}var St,bs;function Vd(){if(bs)return St;bs=1;var e=D(),a=z();St={run:u,undo:r};function u(t){t.graph().dummyChains=[],e.forEach(t.edges(),function(s){n(t,s)})}function n(t,s){var i=s.v,f=t.node(i).rank,d=s.w,o=t.node(d).rank,c=s.name,h=t.edge(s),l=h.labelRank;if(o!==f+1){t.removeEdge(s);var m,p,v;for(v=0,++f;f<o;++v,++f)h.points=[],p={width:0,height:0,edgeLabel:h,edgeObj:s,rank:f},m=a.addDummyNode(t,"edge",p,"_d"),f===l&&(p.width=h.width,p.height=h.height,p.dummy="edge-label",p.labelpos=h.labelpos),t.setEdge(i,m,{weight:h.weight},c),v===0&&t.graph().dummyChains.push(m),i=m;t.setEdge(i,d,{weight:h.weight},c)}}function r(t){e.forEach(t.graph().dummyChains,function(s){var i=t.node(s),f=i.edgeLabel,d;for(t.setEdge(i.edgeObj,f);i.dummy;)d=t.successors(s)[0],t.removeNode(s),f.points.push({x:i.x,y:i.y}),i.dummy==="edge-label"&&(f.x=i.x,f.y=i.y,f.width=i.width,f.height=i.height),s=d,i=t.node(s)})}return St}var Ct,ys;function ge(){if(ys)return Ct;ys=1;var e=D();Ct={longestPath:a,slack:u};function a(n){var r={};function t(s){var i=n.node(s);if(e.has(r,s))return i.rank;r[s]=!0;var f=e.min(e.map(n.outEdges(s),function(d){return t(d.w)-n.edge(d).minlen}));return(f===Number.POSITIVE_INFINITY||f===void 0||f===null)&&(f=0),i.rank=f}e.forEach(n.sources(),t)}function u(n,r){return n.node(r.w).rank-n.node(r.v).rank-n.edge(r).minlen}return Ct}var At,ms;function Ao(){if(ms)return At;ms=1;var e=D(),a=Z().Graph,u=ge().slack;At=n;function n(i){var f=new a({directed:!1}),d=i.nodes()[0],o=i.nodeCount();f.setNode(d,{});for(var c,h;r(f,i)<o;)c=t(f,i),h=f.hasNode(c.v)?u(i,c):-u(i,c),s(f,i,h);return f}function r(i,f){function d(o){e.forEach(f.nodeEdges(o),function(c){var h=c.v,l=o===h?c.w:h;!i.hasNode(l)&&!u(f,c)&&(i.setNode(l,{}),i.setEdge(o,l,{}),d(l))})}return e.forEach(i.nodes(),d),i.nodeCount()}function t(i,f){return e.minBy(f.edges(),function(d){if(i.hasNode(d.v)!==i.hasNode(d.w))return u(f,d)})}function s(i,f,d){e.forEach(i.nodes(),function(o){f.node(o).rank+=d})}return At}var Ot,qs;function jd(){if(qs)return Ot;qs=1;var e=D(),a=Ao(),u=ge().slack,n=ge().longestPath,r=Z().alg.preorder,t=Z().alg.postorder,s=z().simplify;Ot=i,i.initLowLimValues=c,i.initCutValues=f,i.calcCutValue=o,i.leaveEdge=l,i.enterEdge=m,i.exchangeEdges=p;function i(_){_=s(_),n(_);var y=a(_);c(y),f(y,_);for(var q,R;q=l(y);)R=m(y,_,q),p(y,_,q,R)}function f(_,y){var q=t(_,_.nodes());q=q.slice(0,q.length-1),e.forEach(q,function(R){d(_,y,R)})}function d(_,y,q){var R=_.node(q),E=R.parent;_.edge(q,E).cutvalue=o(_,y,q)}function o(_,y,q){var R=_.node(q),E=R.parent,C=!0,O=y.edge(q,E),S=0;return O||(C=!1,O=y.edge(E,q)),S=O.weight,e.forEach(y.nodeEdges(q),function(k){var L=k.v===q,P=L?k.w:k.v;if(P!==E){var M=L===C,G=y.edge(k).weight;if(S+=M?G:-G,g(_,q,P)){var B=_.edge(q,P).cutvalue;S+=M?-B:B}}}),S}function c(_,y){arguments.length<2&&(y=_.nodes()[0]),h(_,{},1,y)}function h(_,y,q,R,E){var C=q,O=_.node(R);return y[R]=!0,e.forEach(_.neighbors(R),function(S){e.has(y,S)||(q=h(_,y,q,S,R))}),O.low=C,O.lim=q++,E?O.parent=E:delete O.parent,q}function l(_){return e.find(_.edges(),function(y){return _.edge(y).cutvalue<0})}function m(_,y,q){var R=q.v,E=q.w;y.hasEdge(R,E)||(R=q.w,E=q.v);var C=_.node(R),O=_.node(E),S=C,k=!1;C.lim>O.lim&&(S=O,k=!0);var L=e.filter(y.edges(),function(P){return k===b(_,_.node(P.v),S)&&k!==b(_,_.node(P.w),S)});return e.minBy(L,function(P){return u(y,P)})}function p(_,y,q,R){var E=q.v,C=q.w;_.removeEdge(E,C),_.setEdge(R.v,R.w,{}),c(_),f(_,y),v(_,y)}function v(_,y){var q=e.find(_.nodes(),function(E){return!y.node(E).parent}),R=r(_,q);R=R.slice(1),e.forEach(R,function(E){var C=_.node(E).parent,O=y.edge(E,C),S=!1;O||(O=y.edge(C,E),S=!0),y.node(E).rank=y.node(C).rank+(S?O.minlen:-O.minlen)})}function g(_,y,q){return _.hasEdge(y,q)}function b(_,y,q){return q.low<=y.lim&&y.lim<=q.lim}return Ot}var Nt,Es;function Kd(){if(Es)return Nt;Es=1;var e=ge(),a=e.longestPath,u=Ao(),n=jd();Nt=r;function r(f){switch(f.graph().ranker){case"network-simplex":i(f);break;case"tight-tree":s(f);break;case"longest-path":t(f);break;default:i(f)}}var t=a;function s(f){a(f),u(f)}function i(f){n(f)}return Nt}var xt,ws;function zd(){if(ws)return xt;ws=1;var e=D();xt=a;function a(r){var t=n(r);e.forEach(r.graph().dummyChains,function(s){for(var i=r.node(s),f=i.edgeObj,d=u(r,t,f.v,f.w),o=d.path,c=d.lca,h=0,l=o[h],m=!0;s!==f.w;){if(i=r.node(s),m){for(;(l=o[h])!==c&&r.node(l).maxRank<i.rank;)h++;l===c&&(m=!1)}if(!m){for(;h<o.length-1&&r.node(l=o[h+1]).minRank<=i.rank;)h++;l=o[h]}r.setParent(s,l),s=r.successors(s)[0]}})}function u(r,t,s,i){var f=[],d=[],o=Math.min(t[s].low,t[i].low),c=Math.max(t[s].lim,t[i].lim),h,l;h=s;do h=r.parent(h),f.push(h);while(h&&(t[h].low>o||c>t[h].lim));for(l=h,h=i;(h=r.parent(h))!==l;)d.push(h);return{path:f.concat(d.reverse()),lca:l}}function n(r){var t={},s=0;function i(f){var d=s;e.forEach(r.children(f),i),t[f]={low:d,lim:s++}}return e.forEach(r.children(),i),t}return xt}var kt,Rs;function Yd(){if(Rs)return kt;Rs=1;var e=D(),a=z();kt={run:u,cleanup:s};function u(i){var f=a.addDummyNode(i,"root",{},"_root"),d=r(i),o=e.max(e.values(d))-1,c=2*o+1;i.graph().nestingRoot=f,e.forEach(i.edges(),function(l){i.edge(l).minlen*=c});var h=t(i)+1;e.forEach(i.children(),function(l){n(i,f,c,h,o,d,l)}),i.graph().nodeRankFactor=c}function n(i,f,d,o,c,h,l){var m=i.children(l);if(!m.length){l!==f&&i.setEdge(f,l,{weight:0,minlen:d});return}var p=a.addBorderNode(i,"_bt"),v=a.addBorderNode(i,"_bb"),g=i.node(l);i.setParent(p,l),g.borderTop=p,i.setParent(v,l),g.borderBottom=v,e.forEach(m,function(b){n(i,f,d,o,c,h,b);var _=i.node(b),y=_.borderTop?_.borderTop:b,q=_.borderBottom?_.borderBottom:b,R=_.borderTop?o:2*o,E=y!==q?1:c-h[l]+1;i.setEdge(p,y,{weight:R,minlen:E,nestingEdge:!0}),i.setEdge(q,v,{weight:R,minlen:E,nestingEdge:!0})}),i.parent(l)||i.setEdge(f,p,{weight:0,minlen:c+h[l]})}function r(i){var f={};function d(o,c){var h=i.children(o);h&&h.length&&e.forEach(h,function(l){d(l,c+1)}),f[o]=c}return e.forEach(i.children(),function(o){d(o,1)}),f}function t(i){return e.reduce(i.edges(),function(f,d){return f+i.edge(d).weight},0)}function s(i){var f=i.graph();i.removeNode(f.nestingRoot),delete f.nestingRoot,e.forEach(i.edges(),function(d){var o=i.edge(d);o.nestingEdge&&i.removeEdge(d)})}return kt}var Lt,Is;function $d(){if(Is)return Lt;Is=1;var e=D(),a=z();Lt=u;function u(r){function t(s){var i=r.children(s),f=r.node(s);if(i.length&&e.forEach(i,t),e.has(f,"minRank")){f.borderLeft=[],f.borderRight=[];for(var d=f.minRank,o=f.maxRank+1;d<o;++d)n(r,"borderLeft","_bl",s,f,d),n(r,"borderRight","_br",s,f,d)}}e.forEach(r.children(),t)}function n(r,t,s,i,f,d){var o={width:0,height:0,rank:d,borderType:t},c=f[t][d-1],h=a.addDummyNode(r,"border",o,s);f[t][d]=h,r.setParent(h,i),c&&r.setEdge(c,h,{weight:1})}return Lt}var Pt,Ts;function Xd(){if(Ts)return Pt;Ts=1;var e=D();Pt={adjust:a,undo:u};function a(d){var o=d.graph().rankdir.toLowerCase();(o==="lr"||o==="rl")&&n(d)}function u(d){var o=d.graph().rankdir.toLowerCase();(o==="bt"||o==="rl")&&t(d),(o==="lr"||o==="rl")&&(i(d),n(d))}function n(d){e.forEach(d.nodes(),function(o){r(d.node(o))}),e.forEach(d.edges(),function(o){r(d.edge(o))})}function r(d){var o=d.width;d.width=d.height,d.height=o}function t(d){e.forEach(d.nodes(),function(o){s(d.node(o))}),e.forEach(d.edges(),function(o){var c=d.edge(o);e.forEach(c.points,s),e.has(c,"y")&&s(c)})}function s(d){d.y=-d.y}function i(d){e.forEach(d.nodes(),function(o){f(d.node(o))}),e.forEach(d.edges(),function(o){var c=d.edge(o);e.forEach(c.points,f),e.has(c,"x")&&f(c)})}function f(d){var o=d.x;d.x=d.y,d.y=o}return Pt}var Mt,Ss;function Zd(){if(Ss)return Mt;Ss=1;var e=D();Mt=a;function a(u){var n={},r=e.filter(u.nodes(),function(d){return!u.children(d).length}),t=e.max(e.map(r,function(d){return u.node(d).rank})),s=e.map(e.range(t+1),function(){return[]});function i(d){if(!e.has(n,d)){n[d]=!0;var o=u.node(d);s[o.rank].push(d),e.forEach(u.successors(d),i)}}var f=e.sortBy(r,function(d){return u.node(d).rank});return e.forEach(f,i),s}return Mt}var Ft,Cs;function Qd(){if(Cs)return Ft;Cs=1;var e=D();Ft=a;function a(n,r){for(var t=0,s=1;s<r.length;++s)t+=u(n,r[s-1],r[s]);return t}function u(n,r,t){for(var s=e.zipObject(t,e.map(t,function(h,l){return l})),i=e.flatten(e.map(r,function(h){return e.sortBy(e.map(n.outEdges(h),function(l){return{pos:s[l.w],weight:n.edge(l).weight}}),"pos")}),!0),f=1;f<t.length;)f<<=1;var d=2*f-1;f-=1;var o=e.map(new Array(d),function(){return 0}),c=0;return e.forEach(i.forEach(function(h){var l=h.pos+f;o[l]+=h.weight;for(var m=0;l>0;)l%2&&(m+=o[l+1]),l=l-1>>1,o[l]+=h.weight;c+=h.weight*m})),c}return Ft}var Gt,As;function Jd(){if(As)return Gt;As=1;var e=D();Gt=a;function a(u,n){return e.map(n,function(r){var t=u.inEdges(r);if(t.length){var s=e.reduce(t,function(i,f){var d=u.edge(f),o=u.node(f.v);return{sum:i.sum+d.weight*o.order,weight:i.weight+d.weight}},{sum:0,weight:0});return{v:r,barycenter:s.sum/s.weight,weight:s.weight}}else return{v:r}})}return Gt}var Dt,Os;function ec(){if(Os)return Dt;Os=1;var e=D();Dt=a;function a(r,t){var s={};e.forEach(r,function(f,d){var o=s[f.v]={indegree:0,in:[],out:[],vs:[f.v],i:d};e.isUndefined(f.barycenter)||(o.barycenter=f.barycenter,o.weight=f.weight)}),e.forEach(t.edges(),function(f){var d=s[f.v],o=s[f.w];!e.isUndefined(d)&&!e.isUndefined(o)&&(o.indegree++,d.out.push(s[f.w]))});var i=e.filter(s,function(f){return!f.indegree});return u(i)}function u(r){var t=[];function s(d){return function(o){o.merged||(e.isUndefined(o.barycenter)||e.isUndefined(d.barycenter)||o.barycenter>=d.barycenter)&&n(d,o)}}function i(d){return function(o){o.in.push(d),--o.indegree===0&&r.push(o)}}for(;r.length;){var f=r.pop();t.push(f),e.forEach(f.in.reverse(),s(f)),e.forEach(f.out,i(f))}return e.map(e.filter(t,function(d){return!d.merged}),function(d){return e.pick(d,["vs","i","barycenter","weight"])})}function n(r,t){var s=0,i=0;r.weight&&(s+=r.barycenter*r.weight,i+=r.weight),t.weight&&(s+=t.barycenter*t.weight,i+=t.weight),r.vs=t.vs.concat(r.vs),r.barycenter=s/i,r.weight=i,r.i=Math.min(t.i,r.i),t.merged=!0}return Dt}var Ut,Ns;function rc(){if(Ns)return Ut;Ns=1;var e=D(),a=z();Ut=u;function u(t,s){var i=a.partition(t,function(p){return e.has(p,"barycenter")}),f=i.lhs,d=e.sortBy(i.rhs,function(p){return-p.i}),o=[],c=0,h=0,l=0;f.sort(r(!!s)),l=n(o,d,l),e.forEach(f,function(p){l+=p.vs.length,o.push(p.vs),c+=p.barycenter*p.weight,h+=p.weight,l=n(o,d,l)});var m={vs:e.flatten(o,!0)};return h&&(m.barycenter=c/h,m.weight=h),m}function n(t,s,i){for(var f;s.length&&(f=e.last(s)).i<=i;)s.pop(),t.push(f.vs),i++;return i}function r(t){return function(s,i){return s.barycenter<i.barycenter?-1:s.barycenter>i.barycenter?1:t?i.i-s.i:s.i-i.i}}return Ut}var Bt,xs;function nc(){if(xs)return Bt;xs=1;var e=D(),a=Jd(),u=ec(),n=rc();Bt=r;function r(i,f,d,o){var c=i.children(f),h=i.node(f),l=h?h.borderLeft:void 0,m=h?h.borderRight:void 0,p={};l&&(c=e.filter(c,function(q){return q!==l&&q!==m}));var v=a(i,c);e.forEach(v,function(q){if(i.children(q.v).length){var R=r(i,q.v,d,o);p[q.v]=R,e.has(R,"barycenter")&&s(q,R)}});var g=u(v,d);t(g,p);var b=n(g,o);if(l&&(b.vs=e.flatten([l,b.vs,m],!0),i.predecessors(l).length)){var _=i.node(i.predecessors(l)[0]),y=i.node(i.predecessors(m)[0]);e.has(b,"barycenter")||(b.barycenter=0,b.weight=0),b.barycenter=(b.barycenter*b.weight+_.order+y.order)/(b.weight+2),b.weight+=2}return b}function t(i,f){e.forEach(i,function(d){d.vs=e.flatten(d.vs.map(function(o){return f[o]?f[o].vs:o}),!0)})}function s(i,f){e.isUndefined(i.barycenter)?(i.barycenter=f.barycenter,i.weight=f.weight):(i.barycenter=(i.barycenter*i.weight+f.barycenter*f.weight)/(i.weight+f.weight),i.weight+=f.weight)}return Bt}var Ht,ks;function tc(){if(ks)return Ht;ks=1;var e=D(),a=Z().Graph;Ht=u;function u(r,t,s){var i=n(r),f=new a({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(d){return r.node(d)});return e.forEach(r.nodes(),function(d){var o=r.node(d),c=r.parent(d);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(f.setNode(d),f.setParent(d,c||i),e.forEach(r[s](d),function(h){var l=h.v===d?h.w:h.v,m=f.edge(l,d),p=e.isUndefined(m)?0:m.weight;f.setEdge(l,d,{weight:r.edge(h).weight+p})}),e.has(o,"minRank")&&f.setNode(d,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),f}function n(r){for(var t;r.hasNode(t=e.uniqueId("_root")););return t}return Ht}var Wt,Ls;function ic(){if(Ls)return Wt;Ls=1;var e=D();Wt=a;function a(u,n,r){var t={},s;e.forEach(r,function(i){for(var f=u.parent(i),d,o;f;){if(d=u.parent(f),d?(o=t[d],t[d]=f):(o=s,s=f),o&&o!==f){n.setEdge(o,f);return}f=d}})}return Wt}var Vt,Ps;function ac(){if(Ps)return Vt;Ps=1;var e=D(),a=Zd(),u=Qd(),n=nc(),r=tc(),t=ic(),s=Z().Graph,i=z();Vt=f;function f(h){var l=i.maxRank(h),m=d(h,e.range(1,l+1),"inEdges"),p=d(h,e.range(l-1,-1,-1),"outEdges"),v=a(h);c(h,v);for(var g=Number.POSITIVE_INFINITY,b,_=0,y=0;y<4;++_,++y){o(_%2?m:p,_%4>=2),v=i.buildLayerMatrix(h);var q=u(h,v);q<g&&(y=0,b=e.cloneDeep(v),g=q)}c(h,b)}function d(h,l,m){return e.map(l,function(p){return r(h,p,m)})}function o(h,l){var m=new s;e.forEach(h,function(p){var v=p.graph().root,g=n(p,v,m,l);e.forEach(g.vs,function(b,_){p.node(b).order=_}),t(p,m,g.vs)})}function c(h,l){e.forEach(l,function(m){e.forEach(m,function(p,v){h.node(p).order=v})})}return Vt}var jt,Ms;function uc(){if(Ms)return jt;Ms=1;var e=D(),a=Z().Graph,u=z();jt={positionX:m,findType1Conflicts:n,findType2Conflicts:r,addConflict:s,hasConflict:i,verticalAlignment:f,horizontalCompaction:d,alignCoordinates:h,findSmallestWidthAlignment:c,balance:l};function n(g,b){var _={};function y(q,R){var E=0,C=0,O=q.length,S=e.last(R);return e.forEach(R,function(k,L){var P=t(g,k),M=P?g.node(P).order:O;(P||k===S)&&(e.forEach(R.slice(C,L+1),function(G){e.forEach(g.predecessors(G),function(B){var te=g.node(B),ie=te.order;(ie<E||M<ie)&&!(te.dummy&&g.node(G).dummy)&&s(_,B,G)})}),C=L+1,E=M)}),R}return e.reduce(b,y),_}function r(g,b){var _={};function y(R,E,C,O,S){var k;e.forEach(e.range(E,C),function(L){k=R[L],g.node(k).dummy&&e.forEach(g.predecessors(k),function(P){var M=g.node(P);M.dummy&&(M.order<O||M.order>S)&&s(_,P,k)})})}function q(R,E){var C=-1,O,S=0;return e.forEach(E,function(k,L){if(g.node(k).dummy==="border"){var P=g.predecessors(k);P.length&&(O=g.node(P[0]).order,y(E,S,L,C,O),S=L,C=O)}y(E,S,E.length,O,R.length)}),E}return e.reduce(b,q),_}function t(g,b){if(g.node(b).dummy)return e.find(g.predecessors(b),function(_){return g.node(_).dummy})}function s(g,b,_){if(b>_){var y=b;b=_,_=y}var q=g[b];q||(g[b]=q={}),q[_]=!0}function i(g,b,_){if(b>_){var y=b;b=_,_=y}return e.has(g[b],_)}function f(g,b,_,y){var q={},R={},E={};return e.forEach(b,function(C){e.forEach(C,function(O,S){q[O]=O,R[O]=O,E[O]=S})}),e.forEach(b,function(C){var O=-1;e.forEach(C,function(S){var k=y(S);if(k.length){k=e.sortBy(k,function(B){return E[B]});for(var L=(k.length-1)/2,P=Math.floor(L),M=Math.ceil(L);P<=M;++P){var G=k[P];R[S]===S&&O<E[G]&&!i(_,S,G)&&(R[G]=S,R[S]=q[S]=q[G],O=E[G])}}})}),{root:q,align:R}}function d(g,b,_,y,q){var R={},E=o(g,b,_,q),C=q?"borderLeft":"borderRight";function O(L,P){for(var M=E.nodes(),G=M.pop(),B={};G;)B[G]?L(G):(B[G]=!0,M.push(G),M=M.concat(P(G))),G=M.pop()}function S(L){R[L]=E.inEdges(L).reduce(function(P,M){return Math.max(P,R[M.v]+E.edge(M))},0)}function k(L){var P=E.outEdges(L).reduce(function(G,B){return Math.min(G,R[B.w]-E.edge(B))},Number.POSITIVE_INFINITY),M=g.node(L);P!==Number.POSITIVE_INFINITY&&M.borderType!==C&&(R[L]=Math.max(R[L],P))}return O(S,E.predecessors.bind(E)),O(k,E.successors.bind(E)),e.forEach(y,function(L){R[L]=R[_[L]]}),R}function o(g,b,_,y){var q=new a,R=g.graph(),E=p(R.nodesep,R.edgesep,y);return e.forEach(b,function(C){var O;e.forEach(C,function(S){var k=_[S];if(q.setNode(k),O){var L=_[O],P=q.edge(L,k);q.setEdge(L,k,Math.max(E(g,S,O),P||0))}O=S})}),q}function c(g,b){return e.minBy(e.values(b),function(_){var y=Number.NEGATIVE_INFINITY,q=Number.POSITIVE_INFINITY;return e.forIn(_,function(R,E){var C=v(g,E)/2;y=Math.max(R+C,y),q=Math.min(R-C,q)}),y-q})}function h(g,b){var _=e.values(b),y=e.min(_),q=e.max(_);e.forEach(["u","d"],function(R){e.forEach(["l","r"],function(E){var C=R+E,O=g[C],S;if(O!==b){var k=e.values(O);S=E==="l"?y-e.min(k):q-e.max(k),S&&(g[C]=e.mapValues(O,function(L){return L+S}))}})})}function l(g,b){return e.mapValues(g.ul,function(_,y){if(b)return g[b.toLowerCase()][y];var q=e.sortBy(e.map(g,y));return(q[1]+q[2])/2})}function m(g){var b=u.buildLayerMatrix(g),_=e.merge(n(g,b),r(g,b)),y={},q;e.forEach(["u","d"],function(E){q=E==="u"?b:e.values(b).reverse(),e.forEach(["l","r"],function(C){C==="r"&&(q=e.map(q,function(L){return e.values(L).reverse()}));var O=(E==="u"?g.predecessors:g.successors).bind(g),S=f(g,q,_,O),k=d(g,q,S.root,S.align,C==="r");C==="r"&&(k=e.mapValues(k,function(L){return-L})),y[E+C]=k})});var R=c(g,y);return h(y,R),l(y,g.graph().align)}function p(g,b,_){return function(y,q,R){var E=y.node(q),C=y.node(R),O=0,S;if(O+=E.width/2,e.has(E,"labelpos"))switch(E.labelpos.toLowerCase()){case"l":S=-E.width/2;break;case"r":S=E.width/2;break}if(S&&(O+=_?S:-S),S=0,O+=(E.dummy?b:g)/2,O+=(C.dummy?b:g)/2,O+=C.width/2,e.has(C,"labelpos"))switch(C.labelpos.toLowerCase()){case"l":S=C.width/2;break;case"r":S=-C.width/2;break}return S&&(O+=_?S:-S),S=0,O}}function v(g,b){return g.node(b).width}return jt}var Kt,Fs;function sc(){if(Fs)return Kt;Fs=1;var e=D(),a=z(),u=uc().positionX;Kt=n;function n(t){t=a.asNonCompoundGraph(t),r(t),e.forEach(u(t),function(s,i){t.node(i).x=s})}function r(t){var s=a.buildLayerMatrix(t),i=t.graph().ranksep,f=0;e.forEach(s,function(d){var o=e.max(e.map(d,function(c){return t.node(c).height}));e.forEach(d,function(c){t.node(c).y=f+o/2}),f+=o+i})}return Kt}var zt,Gs;function oc(){if(Gs)return zt;Gs=1;var e=D(),a=Wd(),u=Vd(),n=Kd(),r=z().normalizeRanks,t=zd(),s=z().removeEmptyRanks,i=Yd(),f=$d(),d=Xd(),o=ac(),c=sc(),h=z(),l=Z().Graph;zt=m;function m(w,T){var A=T&&T.debugTiming?h.time:h.notime;A("layout",function(){var x=A(" buildLayoutGraph",function(){return O(w)});A(" runLayout",function(){p(x,A)}),A(" updateInputGraph",function(){v(w,x)})})}function p(w,T){T(" makeSpaceForEdgeLabels",function(){S(w)}),T(" removeSelfEdges",function(){N(w)}),T(" acyclic",function(){a.run(w)}),T(" nestingGraph.run",function(){i.run(w)}),T(" rank",function(){n(h.asNonCompoundGraph(w))}),T(" injectEdgeLabelProxies",function(){k(w)}),T(" removeEmptyRanks",function(){s(w)}),T(" nestingGraph.cleanup",function(){i.cleanup(w)}),T(" normalizeRanks",function(){r(w)}),T(" assignRankMinMax",function(){L(w)}),T(" removeEdgeLabelProxies",function(){P(w)}),T(" normalize.run",function(){u.run(w)}),T(" parentDummyChains",function(){t(w)}),T(" addBorderSegments",function(){f(w)}),T(" order",function(){o(w)}),T(" insertSelfEdges",function(){V(w)}),T(" adjustCoordinateSystem",function(){d.adjust(w)}),T(" position",function(){c(w)}),T(" positionSelfEdges",function(){j(w)}),T(" removeBorderNodes",function(){ie(w)}),T(" normalize.undo",function(){u.undo(w)}),T(" fixupEdgeLabelCoords",function(){B(w)}),T(" undoCoordinateSystem",function(){d.undo(w)}),T(" translateGraph",function(){M(w)}),T(" assignNodeIntersects",function(){G(w)}),T(" reversePoints",function(){te(w)}),T(" acyclic.undo",function(){a.undo(w)})}function v(w,T){e.forEach(w.nodes(),function(A){var x=w.node(A),F=T.node(A);x&&(x.x=F.x,x.y=F.y,T.children(A).length&&(x.width=F.width,x.height=F.height))}),e.forEach(w.edges(),function(A){var x=w.edge(A),F=T.edge(A);x.points=F.points,e.has(F,"x")&&(x.x=F.x,x.y=F.y)}),w.graph().width=T.graph().width,w.graph().height=T.graph().height}var g=["nodesep","edgesep","ranksep","marginx","marginy"],b={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],y=["width","height"],q={width:0,height:0},R=["minlen","weight","width","height","labeloffset"],E={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},C=["labelpos"];function O(w){var T=new l({multigraph:!0,compound:!0}),A=J(w.graph());return T.setGraph(e.merge({},b,Q(A,g),e.pick(A,_))),e.forEach(w.nodes(),function(x){var F=J(w.node(x));T.setNode(x,e.defaults(Q(F,y),q)),T.setParent(x,w.parent(x))}),e.forEach(w.edges(),function(x){var F=J(w.edge(x));T.setEdge(x,e.merge({},E,Q(F,R),e.pick(F,C)))}),T}function S(w){var T=w.graph();T.ranksep/=2,e.forEach(w.edges(),function(A){var x=w.edge(A);x.minlen*=2,x.labelpos.toLowerCase()!=="c"&&(T.rankdir==="TB"||T.rankdir==="BT"?x.width+=x.labeloffset:x.height+=x.labeloffset)})}function k(w){e.forEach(w.edges(),function(T){var A=w.edge(T);if(A.width&&A.height){var x=w.node(T.v),F=w.node(T.w),U={rank:(F.rank-x.rank)/2+x.rank,e:T};h.addDummyNode(w,"edge-proxy",U,"_ep")}})}function L(w){var T=0;e.forEach(w.nodes(),function(A){var x=w.node(A);x.borderTop&&(x.minRank=w.node(x.borderTop).rank,x.maxRank=w.node(x.borderBottom).rank,T=e.max(T,x.maxRank))}),w.graph().maxRank=T}function P(w){e.forEach(w.nodes(),function(T){var A=w.node(T);A.dummy==="edge-proxy"&&(w.edge(A.e).labelRank=A.rank,w.removeNode(T))})}function M(w){var T=Number.POSITIVE_INFINITY,A=0,x=Number.POSITIVE_INFINITY,F=0,U=w.graph(),H=U.marginx||0,Y=U.marginy||0;function _i($){var K=$.x,fe=$.y,bi=$.width,yi=$.height;T=Math.min(T,K-bi/2),A=Math.max(A,K+bi/2),x=Math.min(x,fe-yi/2),F=Math.max(F,fe+yi/2)}e.forEach(w.nodes(),function($){_i(w.node($))}),e.forEach(w.edges(),function($){var K=w.edge($);e.has(K,"x")&&_i(K)}),T-=H,x-=Y,e.forEach(w.nodes(),function($){var K=w.node($);K.x-=T,K.y-=x}),e.forEach(w.edges(),function($){var K=w.edge($);e.forEach(K.points,function(fe){fe.x-=T,fe.y-=x}),e.has(K,"x")&&(K.x-=T),e.has(K,"y")&&(K.y-=x)}),U.width=A-T+H,U.height=F-x+Y}function G(w){e.forEach(w.edges(),function(T){var A=w.edge(T),x=w.node(T.v),F=w.node(T.w),U,H;A.points?(U=A.points[0],H=A.points[A.points.length-1]):(A.points=[],U=F,H=x),A.points.unshift(h.intersectRect(x,U)),A.points.push(h.intersectRect(F,H))})}function B(w){e.forEach(w.edges(),function(T){var A=w.edge(T);if(e.has(A,"x"))switch((A.labelpos==="l"||A.labelpos==="r")&&(A.width-=A.labeloffset),A.labelpos){case"l":A.x-=A.width/2+A.labeloffset;break;case"r":A.x+=A.width/2+A.labeloffset;break}})}function te(w){e.forEach(w.edges(),function(T){var A=w.edge(T);A.reversed&&A.points.reverse()})}function ie(w){e.forEach(w.nodes(),function(T){if(w.children(T).length){var A=w.node(T),x=w.node(A.borderTop),F=w.node(A.borderBottom),U=w.node(e.last(A.borderLeft)),H=w.node(e.last(A.borderRight));A.width=Math.abs(H.x-U.x),A.height=Math.abs(F.y-x.y),A.x=U.x+A.width/2,A.y=x.y+A.height/2}}),e.forEach(w.nodes(),function(T){w.node(T).dummy==="border"&&w.removeNode(T)})}function N(w){e.forEach(w.edges(),function(T){if(T.v===T.w){var A=w.node(T.v);A.selfEdges||(A.selfEdges=[]),A.selfEdges.push({e:T,label:w.edge(T)}),w.removeEdge(T)}})}function V(w){var T=h.buildLayerMatrix(w);e.forEach(T,function(A){var x=0;e.forEach(A,function(F,U){var H=w.node(F);H.order=U+x,e.forEach(H.selfEdges,function(Y){h.addDummyNode(w,"selfedge",{width:Y.label.width,height:Y.label.height,rank:H.rank,order:U+ ++x,e:Y.e,label:Y.label},"_se")}),delete H.selfEdges})})}function j(w){e.forEach(w.nodes(),function(T){var A=w.node(T);if(A.dummy==="selfedge"){var x=w.node(A.e.v),F=x.x+x.width/2,U=x.y,H=A.x-F,Y=x.height/2;w.setEdge(A.e,A.label),w.removeNode(T),A.label.points=[{x:F+2*H/3,y:U-Y},{x:F+5*H/6,y:U-Y},{x:F+H,y:U},{x:F+5*H/6,y:U+Y},{x:F+2*H/3,y:U+Y}],A.label.x=A.x,A.label.y=A.y}})}function Q(w,T){return e.mapValues(e.pick(w,T),Number)}function J(w){var T={};return e.forEach(w,function(A,x){T[x.toLowerCase()]=A}),T}return zt}var Yt,Ds;function fc(){if(Ds)return Yt;Ds=1;var e=D(),a=z(),u=Z().Graph;Yt={debugOrdering:n};function n(r){var t=a.buildLayerMatrix(r),s=new u({compound:!0,multigraph:!0}).setGraph({});return e.forEach(r.nodes(),function(i){s.setNode(i,{label:i}),s.setParent(i,"layer"+r.node(i).rank)}),e.forEach(r.edges(),function(i){s.setEdge(i.v,i.w,{},i.name)}),e.forEach(t,function(i,f){var d="layer"+f;s.setNode(d,{rank:"same"}),e.reduce(i,function(o,c){return s.setEdge(o,c,{style:"invis"}),c})}),s}return Yt}var $t,Us;function dc(){return Us||(Us=1,$t="0.8.5"),$t}var Xt,Bs;function cc(){return Bs||(Bs=1,Xt={graphlib:Z(),layout:oc(),debug:fc(),util:{time:z().time,notime:z().notime},version:dc()}),Xt}var hc=cc();const Hs=I.getDefaultExportFromCjs(hc);var Zt,Ws;function lc(){if(Ws)return Zt;Ws=1;var e=ti();function a(u,n){return e(u,n)}return Zt=a,Zt}var vc=lc();const pc=I.getDefaultExportFromCjs(vc),ne="root.Triggers";function Re(e,a){const{getEdges:u}=W.useVueFlow(e),n=[];for(const r of u.value)if(r.target===a){n.push(r);const t=Re(e,r.source);t.length>0&&n.push(...t)}return n}function Ie(e,a){const{getEdges:u}=W.useVueFlow(e),n=[];for(const r of u.value)if(r.source===a){n.push(r);const t=Ie(e,r.target);t.length>0&&n.push(...t)}return n}function Te(e,a){const{getEdges:u,findNode:n}=W.useVueFlow(e),r=n(a),t=r?[r]:[];for(const s of u.value)if(s.target===a){t.push(s.sourceNode);const i=Te(e,s.source);i.length>0&&t.push(...i)}return t}function Se(e,a){const{getEdges:u,findNode:n}=W.useVueFlow(e),r=[n(a)];for(const t of u.value)if(t.source===a){r.push(t.targetNode);const s=Se(e,t.target);s.length>0&&r.push(...s)}return r}function Oo(e,a){return[...Re(e,a),...Te(e,a),...Ie(e,a),...Se(e,a)]}function di(e,a,u,n,r,t,s){const i=new Hs.graphlib.Graph({compound:!0});i.setDefaultEdgeLabel(()=>({})),i.setGraph({rankdir:u?"LR":"TB"});for(const f of e.nodes)a.includes(f.uid)||i.setNode(f.uid,{width:ce(f),height:he(f)});for(const f of e.clusters||[]){const d=f.cluster.uid.replace(se,"");if(n.includes(f.cluster.uid)&&t.has(d)){const o={uid:d,type:"collapsedcluster"};i.setNode(d,{width:ce(o),height:he(o)}),s.push(o);continue}if(!r[f.cluster.uid]){i.setNode(f.cluster.uid,{clusterLabelPos:"top"});for(const o of f.nodes||[])a.includes(o)||i.setParent(o,f.cluster.uid)}if(f.parents){const o=r[f.cluster.uid]?r[f.cluster.uid]:f.cluster.uid;a.includes(o)||i.setParent(o,f.parents[f.parents.length-1])}}for(const f of e.edges||[]){const d=Ae(f.source,f.target,r,a);d&&i.setEdge(d.source,d.target)}return Hs.layout(i),i}function de(e,a){const u={x:e.x-e.width/2,y:e.y-e.height/2};if(a){const n=de(a);u.x=u.x-n.x,u.y=u.y-n.y}return u}function ce(e){return Ce(e)||ve(e)?ee.TASK_WIDTH:ue(e)?ee.COLLAPSED_CLUSTER_WIDTH:ee.DOT_WIDTH}function he(e){return Ce(e)||ve(e)?ee.TASK_HEIGHT:ue(e)?ee.COLLAPSED_CLUSTER_HEIGHT:ee.DOT_HEIGHT}function Ce(e){return["GraphTask","SubflowGraphTask$1"].some(a=>e.type.endsWith(a))}function ve(e){return e.type.endsWith("GraphTrigger")}function ue(e){return e.type==="collapsedcluster"}function Ae(e,a,u,n){const r=u[e]?u[e]:e,t=u[a]?u[a]:a;return r===t||n.includes(r)||n.includes(t)?null:{target:t,source:r}}function No(e){const{getEdges:a,getNodes:u,getElements:n,removeEdges:r,removeNodes:t,removeSelectedElements:s}=W.useVueFlow(e);r(a.value),t(u.value),s(n.value)}function ci(e){return e?I.flowHaveTasks(e):!1}function hi(e,a){return e.uid===ne||ve(e)||ue(e)?"success":e.type.endsWith("SubflowGraphTask")?"primary":e.branchType=="ERROR"?"danger":e.branchType=="FINALLY"?"warning":a.has(e.uid)?"blue":"default"}function li(e,a,u,n){var d,o,c;if(n.some(h=>e.source.startsWith(h)&&e.target.startsWith(h))||u.includes(e.target)||e.source.startsWith(ne)||e.target.startsWith(ne))return;const r=e.target.split(".");r.pop();const t=r.join("."),s=pe.afterLastDot(t),i=a[e.target];if(i.type.endsWith("GraphClusterEnd")&&((c=(o=(d=a[t])==null?void 0:d.task)==null?void 0:o.type)!=null&&c.endsWith("Parallel")))return;if(i.type.endsWith("GraphClusterRoot"))return[s,"before"];const f=a[e.source].type.endsWith("GraphClusterEnd");if(!f&&i.type.endsWith("GraphClusterEnd"))return[pe.afterLastDot(e.source),"after"];if(f){const h=e.source.split(".");return[h[h.length-2],"after"]}return[pe.afterLastDot(e.target),"before"]}function vi(e,a,u){const n=s=>{var f,d;const i=s.split(".");for(let o=1;o<=i.length;o++){const c=i.slice(0,o).join("."),h=(f=u[c])==null?void 0:f.branchType;if(h)return h}return((d=a[s])==null?void 0:d.branchType)??null},r=n(e.source),t=n(e.target);return[r,t].includes("ERROR")?"danger":[r,t].includes("FINALLY")?"warning":null}function xo(e,a,u,n,r,t,s,i,f,d,o,c,h){var E,C,O,S,k,L,P,M,G,B,te,ie;const l=[],m=[se+ne];if(!n||r&&!ci(r)){l.push({id:"start",type:"dot",position:{x:0,y:0},style:{width:"5px",height:"5px"},sourcePosition:s?W.Position.Right:W.Position.Bottom,targetPosition:s?W.Position.Left:W.Position.Top,parentNode:void 0,draggable:!1}),l.push({id:"end",type:"dot",position:s?{x:50,y:0}:{x:0,y:50},style:{width:"5px",height:"5px"},sourcePosition:s?W.Position.Right:W.Position.Bottom,targetPosition:s?W.Position.Left:W.Position.Top,parentNode:void 0,draggable:!1}),l.push({id:"start|end",source:"start",target:"end",type:"edge",data:{edge:{relation:{relationType:"SEQUENTIAL"}},isFlowable:!1,initTask:!0,color:"primary"}});return}const p=di(n,t,s,m,i,f,d),v={},g=n.clusters||[],b=g.map(N=>N.cluster),_=b.filter(N=>N.type.endsWith("SubflowGraphCluster")).map(N=>N.taskNode.uid),y=Object.fromEntries(n.nodes.concat(d).map(N=>[N.uid,N]));for(const N of g)if(!i[N.cluster.uid]&&!f.has(N.cluster.uid)){((C=(E=N.cluster.taskNode)==null?void 0:E.task)==null?void 0:C.type)==="io.kestra.core.tasks.flows.Dag"&&_.push(N.cluster.taskNode.uid);for(const w of N.nodes)v[w]=N.cluster;const V=N.cluster.uid,j=p.node(V),Q=N.parents?N.parents[N.parents.length-1]:void 0,J=pi(N.cluster);l.push({id:V,type:"cluster",parentNode:Q,position:de(j,Q?p.node(Q):void 0),style:{width:V===ne&&s?ee.TRIGGER_CLUSTER_WIDTH+"px":j.width+"px",height:V===ne&&!s?ee.TRIGGER_CLUSTER_HEIGHT+"px":j.height+"px"},data:{collapsable:!0,color:J,taskNode:N.cluster.taskNode,unused:N.cluster.taskNode?y[N.cluster.taskNode.uid].unused:!1},class:`ks-topology-${J}-border rounded p-2`})}for(const N of n.nodes.concat(d))if(!t.includes(N.uid)){const V=p.node(N.uid);let j="task";_e(N)?j="dot":N.type.includes("GraphTrigger")?j="trigger":N.type==="collapsedcluster"&&(j="collapsedcluster");const Q=hi(N,f),J=o||((S=(O=N.task)==null?void 0:O.type)==null?void 0:S.includes("$"))||_.some(w=>N.uid.startsWith(w+"."));l.push({id:N.uid,type:j,position:de(V,v[N.uid]?p.node(v[N.uid].uid):void 0),style:{width:ce(N)+"px",height:he(N)+"px"},sourcePosition:s?W.Position.Right:W.Position.Bottom,targetPosition:s?W.Position.Left:W.Position.Top,parentNode:v[N.uid]?v[N.uid].uid:void 0,draggable:j==="task"?!J:!1,data:{node:N,parent:v[N.uid]?v[N.uid]:void 0,namespace:((P=(L=(k=v[N.uid])==null?void 0:k.taskNode)==null?void 0:L.task)==null?void 0:P.namespace)??u,flowId:((B=(G=(M=v[N.uid])==null?void 0:M.taskNode)==null?void 0:G.task)==null?void 0:B.flowId)??a,isFlowable:((te=v[N.uid])==null?void 0:te.uid)===se+N.uid&&!N.type.endsWith("SubflowGraphTask"),color:Q,expandable:gi(N,v,i,h),isReadOnly:J,iconComponent:ue(N)?"lightning-bolt":null,executionId:N.executionId,unused:N.unused},class:N.type==="collapsedcluster"?`ks-topology-${Q}-border rounded`:""})}const q=b.filter(N=>N.taskNode).map(N=>N.taskNode.uid),R=n.edges??[];for(const N of R){const V=Ae(N.source,N.target,i,t);if(V){const j=vi(N,y,v);l.push({id:V.source+"|"+V.target,source:V.source,target:V.target,type:"edge",markerEnd:_e(y[V.target])?"":{id:"marker-"+(y[V.target].branchType?(ie=y[V.target].branchType)==null?void 0:ie.toLocaleLowerCase():"custom"),type:W.MarkerType.ArrowClosed,color:j?`var(--ks-border-${j})`:"var(--ks-topology-edge-color)"},data:{haveAdd:!o&&c&&li(N,y,q,_),haveDashArray:y[N.source].type.endsWith("GraphTrigger")||y[N.target].type.endsWith("GraphTrigger")||N.source.startsWith(ne),color:j,unused:N.unused},style:{zIndex:10},animated:!0})}}return l}function _e(e){return["GraphClusterRoot","GraphClusterFinally","GraphClusterAfterExecution","GraphClusterEnd"].some(a=>e.type.endsWith(a))}function pi(e){return e.uid===se+ne?"success":e.type.endsWith("SubflowGraphCluster")?"primary":e.branchType==="ERROR"?"danger":"blue"}function gi(e,a,u,n){var r,t;return Object.values(u).includes(e.uid)||ue(e)?!0:e.type.endsWith("SubflowGraphTask")&&((t=(r=a[e.uid])==null?void 0:r.uid)==null?void 0:t.replace(se,""))!==e.uid&&n}function Qt(e){const u=e.nodes.map(n=>n.uid).filter(n=>!e.edges.some(r=>r.target===n));return e.nodes.filter(n=>u.includes(n.uid))}function ko(e,a){if(a)return e.edges.filter(u=>u.source===a&&u.target)}function Jt(e,a){let u,n,r=[a.uid];do{if(u=r.flatMap(t=>ko(e,t)).filter(Boolean),u.length===0)return[];r=u.map(t=>t.target),n=e.nodes.filter(t=>r.includes(t.uid)&&t.task)}while(!n.length);return n}function gc(e,a,u){if(!u)return!1;let n=Qt(e),r=Qt(a);if(n.length!==r.length)return!1;let t=120;do{if(r=r.flatMap(s=>Jt(a,s)),r.some(s=>s.task.id===u))return!0;if(n=n.flatMap(s=>Jt(e,s)),n.length!==r.length)return!1;for(const s of r){const i=n.find(o=>{var c,h;return((c=o.task)==null?void 0:c.id)===((h=s.task)==null?void 0:h.id)}),f=(i==null?void 0:i.task)??{},d=s.task??{};if(!i||Object.keys(f).length!==Object.keys(d).length||!pc(f,d))return!1}}while(n.length&&r.length&&t-- >0);return t<=0?(console.warn("areTasksIdenticalInGraphUntilTask: Infinite loop detected, stopping comparison."),!1):!0}const _c={isClusterRootOrEnd:_e,computeClusterColor:pi,isExpandableTask:gi,generateGraph:xo,generateDagreGraph:di,getNodePosition:de,getNodeWidth:ce,getNodeHeight:he,isTaskNode:Ce,isTriggerNode:ve,isCollapsedCluster:ue,replaceIfCollapsed:Ae,cleanGraph:No,flowHaveTasks:ci,nodeColor:hi,haveAdd:li,getEdgeColor:vi,predecessorsEdge:Re,successorsEdge:Ie,predecessorsNode:Te,successorsNode:Se,linkedElements:Oo};exports.CLUSTER_PREFIX=se;exports.EVENTS=Fo;exports.NODE_SIZES=ee;exports.SECTIONS=Mo;exports.Utils=pe;exports.VueFlowUtils=_c;exports.afterLastDot=to;exports.areTasksIdenticalInGraphUntilTask=gc;exports.cleanGraph=No;exports.computeClusterColor=pi;exports.dateFilter=eo;exports.editorViewTypes=Uo;exports.executeFlowBehaviours=Ho;exports.flowHaveTasks=ci;exports.generateDagreGraph=di;exports.generateGraph=xo;exports.getEdgeColor=vi;exports.getNextTaskNodes=Jt;exports.getNodeHeight=he;exports.getNodePosition=de;exports.getNodeWidth=ce;exports.getRootNodes=Qt;exports.getTargetNodesEdges=ko;exports.haveAdd=li;exports.humanDuration=no;exports.isClusterRootOrEnd=_e;exports.isCollapsedCluster=ue;exports.isExpandableTask=gi;exports.isTaskNode=Ce;exports.isTriggerNode=ve;exports.linkedElements=Oo;exports.logDisplayTypes=Do;exports.nodeColor=hi;exports.predecessorsEdge=Re;exports.predecessorsNode=Te;exports.replaceIfCollapsed=Ae;exports.requireMapValues=Js;exports.stateDisplayValues=Wo;exports.stateGlobalChartTypes=Go;exports.storageKeys=Bo;exports.successorsEdge=Ie;exports.successorsNode=Se;
2
+ //# sourceMappingURL=VueFlowUtils-B_03uBZT.cjs.map