clitrigger 0.2.26 → 0.2.28

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
- import{_ as Ve,a as Ih,r as V,u as As,j as C,$ as El,a0 as Cl,a1 as Ah,a2 as Th,a3 as Oh,a4 as Nh,a5 as jh,a6 as Ph,K as kh,a7 as Lh,a8 as Mh,a9 as Sl,aa as Fh,ab as Dh,P as Gh,X as Bh,ac as Ys,ad as Uh,ae as Hh,af as zh,H as Vh,ag as Kh,ah as Wh,ai as $h}from"./index-Df25dsa5.js";import{H as Xs,P as Zs,M as Yh,u as Xh,a as Zh,i as Jh,B as Qh,b as ev,C as rv,c as nv}from"./style-BeBN7DXF.js";import"./value-BTdN53H7.js";import"./with-selector-bfGVmvLm.js";function Ts(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 cr,Js;function tv(){if(Js)return cr;Js=1;function e(){this.__data__=[],this.size=0}return cr=e,cr}var dr,Qs;function Ae(){if(Qs)return dr;Qs=1;function e(a,r){return a===r||a!==a&&r!==r}return dr=e,dr}var lr,eu;function We(){if(eu)return lr;eu=1;var e=Ae();function a(r,t){for(var n=r.length;n--;)if(e(r[n][0],t))return n;return-1}return lr=a,lr}var hr,ru;function av(){if(ru)return hr;ru=1;var e=We(),a=Array.prototype,r=a.splice;function t(n){var i=this.__data__,u=e(i,n);if(u<0)return!1;var s=i.length-1;return u==s?i.pop():r.call(i,u,1),--this.size,!0}return hr=t,hr}var vr,nu;function iv(){if(nu)return vr;nu=1;var e=We();function a(r){var t=this.__data__,n=e(t,r);return n<0?void 0:t[n][1]}return vr=a,vr}var pr,tu;function sv(){if(tu)return pr;tu=1;var e=We();function a(r){return e(this.__data__,r)>-1}return pr=a,pr}var gr,au;function uv(){if(au)return gr;au=1;var e=We();function a(r,t){var n=this.__data__,i=e(n,r);return i<0?(++this.size,n.push([r,t])):n[i][1]=t,this}return gr=a,gr}var _r,iu;function $e(){if(iu)return _r;iu=1;var e=tv(),a=av(),r=iv(),t=sv(),n=uv();function i(u){var s=-1,o=u==null?0:u.length;for(this.clear();++s<o;){var c=u[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=a,i.prototype.get=r,i.prototype.has=t,i.prototype.set=n,_r=i,_r}var br,su;function ov(){if(su)return br;su=1;var e=$e();function a(){this.__data__=new e,this.size=0}return br=a,br}var mr,uu;function fv(){if(uu)return mr;uu=1;function e(a){var r=this.__data__,t=r.delete(a);return this.size=r.size,t}return mr=e,mr}var yr,ou;function cv(){if(ou)return yr;ou=1;function e(a){return this.__data__.get(a)}return yr=e,yr}var qr,fu;function dv(){if(fu)return qr;fu=1;function e(a){return this.__data__.has(a)}return qr=e,qr}var xr,cu;function Il(){if(cu)return xr;cu=1;var e=typeof Ve=="object"&&Ve&&Ve.Object===Object&&Ve;return xr=e,xr}var wr,du;function fe(){if(du)return wr;du=1;var e=Il(),a=typeof self=="object"&&self&&self.Object===Object&&self,r=e||a||Function("return this")();return wr=r,wr}var Rr,lu;function Te(){if(lu)return Rr;lu=1;var e=fe(),a=e.Symbol;return Rr=a,Rr}var Er,hu;function lv(){if(hu)return Er;hu=1;var e=Te(),a=Object.prototype,r=a.hasOwnProperty,t=a.toString,n=e?e.toStringTag:void 0;function i(u){var s=r.call(u,n),o=u[n];try{u[n]=void 0;var c=!0}catch{}var f=t.call(u);return c&&(s?u[n]=o:delete u[n]),f}return Er=i,Er}var Cr,vu;function hv(){if(vu)return Cr;vu=1;var e=Object.prototype,a=e.toString;function r(t){return a.call(t)}return Cr=r,Cr}var Sr,pu;function Re(){if(pu)return Sr;pu=1;var e=Te(),a=lv(),r=hv(),t="[object Null]",n="[object Undefined]",i=e?e.toStringTag:void 0;function u(s){return s==null?s===void 0?n:t:i&&i in Object(s)?a(s):r(s)}return Sr=u,Sr}var Ir,gu;function ae(){if(gu)return Ir;gu=1;function e(a){var r=typeof a;return a!=null&&(r=="object"||r=="function")}return Ir=e,Ir}var Ar,_u;function De(){if(_u)return Ar;_u=1;var e=Re(),a=ae(),r="[object AsyncFunction]",t="[object Function]",n="[object GeneratorFunction]",i="[object Proxy]";function u(s){if(!a(s))return!1;var o=e(s);return o==t||o==n||o==r||o==i}return Ar=u,Ar}var Tr,bu;function vv(){if(bu)return Tr;bu=1;var e=fe(),a=e["__core-js_shared__"];return Tr=a,Tr}var Or,mu;function pv(){if(mu)return Or;mu=1;var e=vv(),a=(function(){var t=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function r(t){return!!a&&a in t}return Or=r,Or}var Nr,yu;function Al(){if(yu)return Nr;yu=1;var e=Function.prototype,a=e.toString;function r(t){if(t!=null){try{return a.call(t)}catch{}try{return t+""}catch{}}return""}return Nr=r,Nr}var jr,qu;function gv(){if(qu)return jr;qu=1;var e=De(),a=pv(),r=ae(),t=Al(),n=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,o=u.toString,c=s.hasOwnProperty,f=RegExp("^"+o.call(c).replace(n,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(l){if(!r(l)||a(l))return!1;var h=e(l)?f:i;return h.test(t(l))}return jr=d,jr}var Pr,xu;function _v(){if(xu)return Pr;xu=1;function e(a,r){return a==null?void 0:a[r]}return Pr=e,Pr}var kr,wu;function Ee(){if(wu)return kr;wu=1;var e=gv(),a=_v();function r(t,n){var i=a(t,n);return e(i)?i:void 0}return kr=r,kr}var Lr,Ru;function Os(){if(Ru)return Lr;Ru=1;var e=Ee(),a=fe(),r=e(a,"Map");return Lr=r,Lr}var Mr,Eu;function Ye(){if(Eu)return Mr;Eu=1;var e=Ee(),a=e(Object,"create");return Mr=a,Mr}var Fr,Cu;function bv(){if(Cu)return Fr;Cu=1;var e=Ye();function a(){this.__data__=e?e(null):{},this.size=0}return Fr=a,Fr}var Dr,Su;function mv(){if(Su)return Dr;Su=1;function e(a){var r=this.has(a)&&delete this.__data__[a];return this.size-=r?1:0,r}return Dr=e,Dr}var Gr,Iu;function yv(){if(Iu)return Gr;Iu=1;var e=Ye(),a="__lodash_hash_undefined__",r=Object.prototype,t=r.hasOwnProperty;function n(i){var u=this.__data__;if(e){var s=u[i];return s===a?void 0:s}return t.call(u,i)?u[i]:void 0}return Gr=n,Gr}var Br,Au;function qv(){if(Au)return Br;Au=1;var e=Ye(),a=Object.prototype,r=a.hasOwnProperty;function t(n){var i=this.__data__;return e?i[n]!==void 0:r.call(i,n)}return Br=t,Br}var Ur,Tu;function xv(){if(Tu)return Ur;Tu=1;var e=Ye(),a="__lodash_hash_undefined__";function r(t,n){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=e&&n===void 0?a:n,this}return Ur=r,Ur}var Hr,Ou;function wv(){if(Ou)return Hr;Ou=1;var e=bv(),a=mv(),r=yv(),t=qv(),n=xv();function i(u){var s=-1,o=u==null?0:u.length;for(this.clear();++s<o;){var c=u[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=a,i.prototype.get=r,i.prototype.has=t,i.prototype.set=n,Hr=i,Hr}var zr,Nu;function Rv(){if(Nu)return zr;Nu=1;var e=wv(),a=$e(),r=Os();function t(){this.size=0,this.__data__={hash:new e,map:new(r||a),string:new e}}return zr=t,zr}var Vr,ju;function Ev(){if(ju)return Vr;ju=1;function e(a){var r=typeof a;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?a!=="__proto__":a===null}return Vr=e,Vr}var Kr,Pu;function Xe(){if(Pu)return Kr;Pu=1;var e=Ev();function a(r,t){var n=r.__data__;return e(t)?n[typeof t=="string"?"string":"hash"]:n.map}return Kr=a,Kr}var Wr,ku;function Cv(){if(ku)return Wr;ku=1;var e=Xe();function a(r){var t=e(this,r).delete(r);return this.size-=t?1:0,t}return Wr=a,Wr}var $r,Lu;function Sv(){if(Lu)return $r;Lu=1;var e=Xe();function a(r){return e(this,r).get(r)}return $r=a,$r}var Yr,Mu;function Iv(){if(Mu)return Yr;Mu=1;var e=Xe();function a(r){return e(this,r).has(r)}return Yr=a,Yr}var Xr,Fu;function Av(){if(Fu)return Xr;Fu=1;var e=Xe();function a(r,t){var n=e(this,r),i=n.size;return n.set(r,t),this.size+=n.size==i?0:1,this}return Xr=a,Xr}var Zr,Du;function Ns(){if(Du)return Zr;Du=1;var e=Rv(),a=Cv(),r=Sv(),t=Iv(),n=Av();function i(u){var s=-1,o=u==null?0:u.length;for(this.clear();++s<o;){var c=u[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=a,i.prototype.get=r,i.prototype.has=t,i.prototype.set=n,Zr=i,Zr}var Jr,Gu;function Tv(){if(Gu)return Jr;Gu=1;var e=$e(),a=Os(),r=Ns(),t=200;function n(i,u){var s=this.__data__;if(s instanceof e){var o=s.__data__;if(!a||o.length<t-1)return o.push([i,u]),this.size=++s.size,this;s=this.__data__=new r(o)}return s.set(i,u),this.size=s.size,this}return Jr=n,Jr}var Qr,Bu;function Ze(){if(Bu)return Qr;Bu=1;var e=$e(),a=ov(),r=fv(),t=cv(),n=dv(),i=Tv();function u(s){var o=this.__data__=new e(s);this.size=o.size}return u.prototype.clear=a,u.prototype.delete=r,u.prototype.get=t,u.prototype.has=n,u.prototype.set=i,Qr=u,Qr}var en,Uu;function js(){if(Uu)return en;Uu=1;function e(a,r){for(var t=-1,n=a==null?0:a.length;++t<n&&r(a[t],t,a)!==!1;);return a}return en=e,en}var rn,Hu;function Tl(){if(Hu)return rn;Hu=1;var e=Ee(),a=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return rn=a,rn}var nn,zu;function Je(){if(zu)return nn;zu=1;var e=Tl();function a(r,t,n){t=="__proto__"&&e?e(r,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):r[t]=n}return nn=a,nn}var tn,Vu;function Qe(){if(Vu)return tn;Vu=1;var e=Je(),a=Ae(),r=Object.prototype,t=r.hasOwnProperty;function n(i,u,s){var o=i[u];(!(t.call(i,u)&&a(o,s))||s===void 0&&!(u in i))&&e(i,u,s)}return tn=n,tn}var an,Ku;function Ge(){if(Ku)return an;Ku=1;var e=Qe(),a=Je();function r(t,n,i,u){var s=!i;i||(i={});for(var o=-1,c=n.length;++o<c;){var f=n[o],d=u?u(i[f],t[f],f,i,t):void 0;d===void 0&&(d=t[f]),s?a(i,f,d):e(i,f,d)}return i}return an=r,an}var sn,Wu;function Ov(){if(Wu)return sn;Wu=1;function e(a,r){for(var t=-1,n=Array(a);++t<a;)n[t]=r(t);return n}return sn=e,sn}var un,$u;function he(){if($u)return un;$u=1;function e(a){return a!=null&&typeof a=="object"}return un=e,un}var on,Yu;function Nv(){if(Yu)return on;Yu=1;var e=Re(),a=he(),r="[object Arguments]";function t(n){return a(n)&&e(n)==r}return on=t,on}var fn,Xu;function Be(){if(Xu)return fn;Xu=1;var e=Nv(),a=he(),r=Object.prototype,t=r.hasOwnProperty,n=r.propertyIsEnumerable,i=e((function(){return arguments})())?e:function(u){return a(u)&&t.call(u,"callee")&&!n.call(u,"callee")};return fn=i,fn}var cn,Zu;function J(){if(Zu)return cn;Zu=1;var e=Array.isArray;return cn=e,cn}var Le={exports:{}},dn,Ju;function jv(){if(Ju)return dn;Ju=1;function e(){return!1}return dn=e,dn}Le.exports;var Qu;function Oe(){return Qu||(Qu=1,(function(e,a){var r=fe(),t=jv(),n=a&&!a.nodeType&&a,i=n&&!0&&e&&!e.nodeType&&e,u=i&&i.exports===n,s=u?r.Buffer:void 0,o=s?s.isBuffer:void 0,c=o||t;e.exports=c})(Le,Le.exports)),Le.exports}var ln,eo;function er(){if(eo)return ln;eo=1;var e=9007199254740991,a=/^(?:0|[1-9]\d*)$/;function r(t,n){var i=typeof t;return n=n??e,!!n&&(i=="number"||i!="symbol"&&a.test(t))&&t>-1&&t%1==0&&t<n}return ln=r,ln}var hn,ro;function Ps(){if(ro)return hn;ro=1;var e=9007199254740991;function a(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return hn=a,hn}var vn,no;function Pv(){if(no)return vn;no=1;var e=Re(),a=Ps(),r=he(),t="[object Arguments]",n="[object Array]",i="[object Boolean]",u="[object Date]",s="[object Error]",o="[object Function]",c="[object Map]",f="[object Number]",d="[object Object]",l="[object RegExp]",h="[object Set]",m="[object String]",p="[object WeakMap]",v="[object ArrayBuffer]",b="[object DataView]",g="[object Float32Array]",_="[object Float64Array]",y="[object Int8Array]",q="[object Int16Array]",x="[object Int32Array]",w="[object Uint8Array]",T="[object Uint8ClampedArray]",I="[object Uint16Array]",A="[object Uint32Array]",O={};O[g]=O[_]=O[y]=O[q]=O[x]=O[w]=O[T]=O[I]=O[A]=!0,O[t]=O[n]=O[v]=O[i]=O[b]=O[u]=O[s]=O[o]=O[c]=O[f]=O[d]=O[l]=O[h]=O[m]=O[p]=!1;function P(L){return r(L)&&a(L.length)&&!!O[e(L)]}return vn=P,vn}var pn,to;function rr(){if(to)return pn;to=1;function e(a){return function(r){return a(r)}}return pn=e,pn}var Me={exports:{}};Me.exports;var ao;function ks(){return ao||(ao=1,(function(e,a){var r=Il(),t=a&&!a.nodeType&&a,n=t&&!0&&e&&!e.nodeType&&e,i=n&&n.exports===t,u=i&&r.process,s=(function(){try{var o=n&&n.require&&n.require("util").types;return o||u&&u.binding&&u.binding("util")}catch{}})();e.exports=s})(Me,Me.exports)),Me.exports}var gn,io;function Ue(){if(io)return gn;io=1;var e=Pv(),a=rr(),r=ks(),t=r&&r.isTypedArray,n=t?a(t):e;return gn=n,gn}var _n,so;function Ol(){if(so)return _n;so=1;var e=Ov(),a=Be(),r=J(),t=Oe(),n=er(),i=Ue(),u=Object.prototype,s=u.hasOwnProperty;function o(c,f){var d=r(c),l=!d&&a(c),h=!d&&!l&&t(c),m=!d&&!l&&!h&&i(c),p=d||l||h||m,v=p?e(c.length,String):[],b=v.length;for(var g in c)(f||s.call(c,g))&&!(p&&(g=="length"||h&&(g=="offset"||g=="parent")||m&&(g=="buffer"||g=="byteLength"||g=="byteOffset")||n(g,b)))&&v.push(g);return v}return _n=o,_n}var bn,uo;function nr(){if(uo)return bn;uo=1;var e=Object.prototype;function a(r){var t=r&&r.constructor,n=typeof t=="function"&&t.prototype||e;return r===n}return bn=a,bn}var mn,oo;function Nl(){if(oo)return mn;oo=1;function e(a,r){return function(t){return a(r(t))}}return mn=e,mn}var yn,fo;function kv(){if(fo)return yn;fo=1;var e=Nl(),a=e(Object.keys,Object);return yn=a,yn}var qn,co;function Ls(){if(co)return qn;co=1;var e=nr(),a=kv(),r=Object.prototype,t=r.hasOwnProperty;function n(i){if(!e(i))return a(i);var u=[];for(var s in Object(i))t.call(i,s)&&s!="constructor"&&u.push(s);return u}return qn=n,qn}var xn,lo;function pe(){if(lo)return xn;lo=1;var e=De(),a=Ps();function r(t){return t!=null&&a(t.length)&&!e(t)}return xn=r,xn}var wn,ho;function qe(){if(ho)return wn;ho=1;var e=Ol(),a=Ls(),r=pe();function t(n){return r(n)?e(n):a(n)}return wn=t,wn}var Rn,vo;function Lv(){if(vo)return Rn;vo=1;var e=Ge(),a=qe();function r(t,n){return t&&e(n,a(n),t)}return Rn=r,Rn}var En,po;function Mv(){if(po)return En;po=1;function e(a){var r=[];if(a!=null)for(var t in Object(a))r.push(t);return r}return En=e,En}var Cn,go;function Fv(){if(go)return Cn;go=1;var e=ae(),a=nr(),r=Mv(),t=Object.prototype,n=t.hasOwnProperty;function i(u){if(!e(u))return r(u);var s=a(u),o=[];for(var c in u)c=="constructor"&&(s||!n.call(u,c))||o.push(c);return o}return Cn=i,Cn}var Sn,_o;function Ce(){if(_o)return Sn;_o=1;var e=Ol(),a=Fv(),r=pe();function t(n){return r(n)?e(n,!0):a(n)}return Sn=t,Sn}var In,bo;function Dv(){if(bo)return In;bo=1;var e=Ge(),a=Ce();function r(t,n){return t&&e(n,a(n),t)}return In=r,In}var Fe={exports:{}};Fe.exports;var mo;function jl(){return mo||(mo=1,(function(e,a){var r=fe(),t=a&&!a.nodeType&&a,n=t&&!0&&e&&!e.nodeType&&e,i=n&&n.exports===t,u=i?r.Buffer:void 0,s=u?u.allocUnsafe:void 0;function o(c,f){if(f)return c.slice();var d=c.length,l=s?s(d):new c.constructor(d);return c.copy(l),l}e.exports=o})(Fe,Fe.exports)),Fe.exports}var An,yo;function Pl(){if(yo)return An;yo=1;function e(a,r){var t=-1,n=a.length;for(r||(r=Array(n));++t<n;)r[t]=a[t];return r}return An=e,An}var Tn,qo;function kl(){if(qo)return Tn;qo=1;function e(a,r){for(var t=-1,n=a==null?0:a.length,i=0,u=[];++t<n;){var s=a[t];r(s,t,a)&&(u[i++]=s)}return u}return Tn=e,Tn}var On,xo;function Ll(){if(xo)return On;xo=1;function e(){return[]}return On=e,On}var Nn,wo;function Ms(){if(wo)return Nn;wo=1;var e=kl(),a=Ll(),r=Object.prototype,t=r.propertyIsEnumerable,n=Object.getOwnPropertySymbols,i=n?function(u){return u==null?[]:(u=Object(u),e(n(u),function(s){return t.call(u,s)}))}:a;return Nn=i,Nn}var jn,Ro;function Gv(){if(Ro)return jn;Ro=1;var e=Ge(),a=Ms();function r(t,n){return e(t,a(t),n)}return jn=r,jn}var Pn,Eo;function Fs(){if(Eo)return Pn;Eo=1;function e(a,r){for(var t=-1,n=r.length,i=a.length;++t<n;)a[i+t]=r[t];return a}return Pn=e,Pn}var kn,Co;function tr(){if(Co)return kn;Co=1;var e=Nl(),a=e(Object.getPrototypeOf,Object);return kn=a,kn}var Ln,So;function Ml(){if(So)return Ln;So=1;var e=Fs(),a=tr(),r=Ms(),t=Ll(),n=Object.getOwnPropertySymbols,i=n?function(u){for(var s=[];u;)e(s,r(u)),u=a(u);return s}:t;return Ln=i,Ln}var Mn,Io;function Bv(){if(Io)return Mn;Io=1;var e=Ge(),a=Ml();function r(t,n){return e(t,a(t),n)}return Mn=r,Mn}var Fn,Ao;function Fl(){if(Ao)return Fn;Ao=1;var e=Fs(),a=J();function r(t,n,i){var u=n(t);return a(t)?u:e(u,i(t))}return Fn=r,Fn}var Dn,To;function Dl(){if(To)return Dn;To=1;var e=Fl(),a=Ms(),r=qe();function t(n){return e(n,r,a)}return Dn=t,Dn}var Gn,Oo;function Uv(){if(Oo)return Gn;Oo=1;var e=Fl(),a=Ml(),r=Ce();function t(n){return e(n,r,a)}return Gn=t,Gn}var Bn,No;function Hv(){if(No)return Bn;No=1;var e=Ee(),a=fe(),r=e(a,"DataView");return Bn=r,Bn}var Un,jo;function zv(){if(jo)return Un;jo=1;var e=Ee(),a=fe(),r=e(a,"Promise");return Un=r,Un}var Hn,Po;function Gl(){if(Po)return Hn;Po=1;var e=Ee(),a=fe(),r=e(a,"Set");return Hn=r,Hn}var zn,ko;function Vv(){if(ko)return zn;ko=1;var e=Ee(),a=fe(),r=e(a,"WeakMap");return zn=r,zn}var Vn,Lo;function Ne(){if(Lo)return Vn;Lo=1;var e=Hv(),a=Os(),r=zv(),t=Gl(),n=Vv(),i=Re(),u=Al(),s="[object Map]",o="[object Object]",c="[object Promise]",f="[object Set]",d="[object WeakMap]",l="[object DataView]",h=u(e),m=u(a),p=u(r),v=u(t),b=u(n),g=i;return(e&&g(new e(new ArrayBuffer(1)))!=l||a&&g(new a)!=s||r&&g(r.resolve())!=c||t&&g(new t)!=f||n&&g(new n)!=d)&&(g=function(_){var y=i(_),q=y==o?_.constructor:void 0,x=q?u(q):"";if(x)switch(x){case h:return l;case m:return s;case p:return c;case v:return f;case b:return d}return y}),Vn=g,Vn}var Kn,Mo;function Kv(){if(Mo)return Kn;Mo=1;var e=Object.prototype,a=e.hasOwnProperty;function r(t){var n=t.length,i=new t.constructor(n);return n&&typeof t[0]=="string"&&a.call(t,"index")&&(i.index=t.index,i.input=t.input),i}return Kn=r,Kn}var Wn,Fo;function Bl(){if(Fo)return Wn;Fo=1;var e=fe(),a=e.Uint8Array;return Wn=a,Wn}var $n,Do;function Ds(){if(Do)return $n;Do=1;var e=Bl();function a(r){var t=new r.constructor(r.byteLength);return new e(t).set(new e(r)),t}return $n=a,$n}var Yn,Go;function Wv(){if(Go)return Yn;Go=1;var e=Ds();function a(r,t){var n=t?e(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.byteLength)}return Yn=a,Yn}var Xn,Bo;function $v(){if(Bo)return Xn;Bo=1;var e=/\w*$/;function a(r){var t=new r.constructor(r.source,e.exec(r));return t.lastIndex=r.lastIndex,t}return Xn=a,Xn}var Zn,Uo;function Yv(){if(Uo)return Zn;Uo=1;var e=Te(),a=e?e.prototype:void 0,r=a?a.valueOf:void 0;function t(n){return r?Object(r.call(n)):{}}return Zn=t,Zn}var Jn,Ho;function Ul(){if(Ho)return Jn;Ho=1;var e=Ds();function a(r,t){var n=t?e(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.length)}return Jn=a,Jn}var Qn,zo;function Xv(){if(zo)return Qn;zo=1;var e=Ds(),a=Wv(),r=$v(),t=Yv(),n=Ul(),i="[object Boolean]",u="[object Date]",s="[object Map]",o="[object Number]",c="[object RegExp]",f="[object Set]",d="[object String]",l="[object Symbol]",h="[object ArrayBuffer]",m="[object DataView]",p="[object Float32Array]",v="[object Float64Array]",b="[object Int8Array]",g="[object Int16Array]",_="[object Int32Array]",y="[object Uint8Array]",q="[object Uint8ClampedArray]",x="[object Uint16Array]",w="[object Uint32Array]";function T(I,A,O){var P=I.constructor;switch(A){case h:return e(I);case i:case u:return new P(+I);case m:return a(I,O);case p:case v:case b:case g:case _:case y:case q:case x:case w:return n(I,O);case s:return new P;case o:case d:return new P(I);case c:return r(I);case f:return new P;case l:return t(I)}}return Qn=T,Qn}var et,Vo;function Hl(){if(Vo)return et;Vo=1;var e=ae(),a=Object.create,r=(function(){function t(){}return function(n){if(!e(n))return{};if(a)return a(n);t.prototype=n;var i=new t;return t.prototype=void 0,i}})();return et=r,et}var rt,Ko;function zl(){if(Ko)return rt;Ko=1;var e=Hl(),a=tr(),r=nr();function t(n){return typeof n.constructor=="function"&&!r(n)?e(a(n)):{}}return rt=t,rt}var nt,Wo;function Zv(){if(Wo)return nt;Wo=1;var e=Ne(),a=he(),r="[object Map]";function t(n){return a(n)&&e(n)==r}return nt=t,nt}var tt,$o;function Jv(){if($o)return tt;$o=1;var e=Zv(),a=rr(),r=ks(),t=r&&r.isMap,n=t?a(t):e;return tt=n,tt}var at,Yo;function Qv(){if(Yo)return at;Yo=1;var e=Ne(),a=he(),r="[object Set]";function t(n){return a(n)&&e(n)==r}return at=t,at}var it,Xo;function ep(){if(Xo)return it;Xo=1;var e=Qv(),a=rr(),r=ks(),t=r&&r.isSet,n=t?a(t):e;return it=n,it}var st,Zo;function Vl(){if(Zo)return st;Zo=1;var e=Ze(),a=js(),r=Qe(),t=Lv(),n=Dv(),i=jl(),u=Pl(),s=Gv(),o=Bv(),c=Dl(),f=Uv(),d=Ne(),l=Kv(),h=Xv(),m=zl(),p=J(),v=Oe(),b=Jv(),g=ae(),_=ep(),y=qe(),q=Ce(),x=1,w=2,T=4,I="[object Arguments]",A="[object Array]",O="[object Boolean]",P="[object Date]",L="[object Error]",M="[object Function]",U="[object GeneratorFunction]",Y="[object Map]",ee="[object Number]",se="[object Object]",ve="[object RegExp]",ce="[object Set]",_e="[object String]",te="[object Symbol]",de="[object WeakMap]",R="[object ArrayBuffer]",S="[object DataView]",E="[object Float32Array]",j="[object Float64Array]",G="[object Int8Array]",K="[object Int16Array]",W="[object Int32Array]",F="[object Uint8Array]",B="[object Uint8ClampedArray]",z="[object Uint16Array]",H="[object Uint32Array]",k={};k[I]=k[A]=k[R]=k[S]=k[O]=k[P]=k[E]=k[j]=k[G]=k[K]=k[W]=k[Y]=k[ee]=k[se]=k[ve]=k[ce]=k[_e]=k[te]=k[F]=k[B]=k[z]=k[H]=!0,k[L]=k[M]=k[de]=!1;function Z(D,re,le,Pe,Ie,ue){var N,$=re&x,Q=re&w,be=re&T;if(le&&(N=Ie?le(D,Pe,Ie,ue):le(D)),N!==void 0)return N;if(!g(D))return D;var xe=p(D);if(xe){if(N=l(D),!$)return u(D,N)}else{var me=d(D),ze=me==M||me==U;if(v(D))return i(D,$);if(me==se||me==I||ze&&!Ie){if(N=Q||ze?{}:m(D),!$)return Q?o(D,n(N,D)):s(D,t(N,D))}else{if(!k[me])return Ie?D:{};N=h(D,me,$)}}ue||(ue=new e);var ke=ue.get(D);if(ke)return ke;ue.set(D,N),_(D)?D.forEach(function(ye){N.add(Z(ye,re,le,ye,D,ue))}):b(D)&&D.forEach(function(ye,we){N.set(we,Z(ye,re,le,we,D,ue))});var Sh=be?Q?f:c:Q?q:y,$s=xe?void 0:Sh(D);return a($s||D,function(ye,we){$s&&(we=ye,ye=D[we]),r(N,we,Z(ye,re,le,we,D,ue))}),N}return st=Z,st}var ut,Jo;function rp(){if(Jo)return ut;Jo=1;var e=Vl(),a=4;function r(t){return e(t,a)}return ut=r,ut}var ot,Qo;function Gs(){if(Qo)return ot;Qo=1;function e(a){return function(){return a}}return ot=e,ot}var ft,ef;function np(){if(ef)return ft;ef=1;function e(a){return function(r,t,n){for(var i=-1,u=Object(r),s=n(r),o=s.length;o--;){var c=s[a?o:++i];if(t(u[c],c,u)===!1)break}return r}}return ft=e,ft}var ct,rf;function Bs(){if(rf)return ct;rf=1;var e=np(),a=e();return ct=a,ct}var dt,nf;function Us(){if(nf)return dt;nf=1;var e=Bs(),a=qe();function r(t,n){return t&&e(t,n,a)}return dt=r,dt}var lt,tf;function tp(){if(tf)return lt;tf=1;var e=pe();function a(r,t){return function(n,i){if(n==null)return n;if(!e(n))return r(n,i);for(var u=n.length,s=t?u:-1,o=Object(n);(t?s--:++s<u)&&i(o[s],s,o)!==!1;);return n}}return lt=a,lt}var ht,af;function ar(){if(af)return ht;af=1;var e=Us(),a=tp(),r=a(e);return ht=r,ht}var vt,sf;function Se(){if(sf)return vt;sf=1;function e(a){return a}return vt=e,vt}var pt,uf;function Kl(){if(uf)return pt;uf=1;var e=Se();function a(r){return typeof r=="function"?r:e}return pt=a,pt}var gt,of;function Wl(){if(of)return gt;of=1;var e=js(),a=ar(),r=Kl(),t=J();function n(i,u){var s=t(i)?e:a;return s(i,r(u))}return gt=n,gt}var _t,ff;function $l(){return ff||(ff=1,_t=Wl()),_t}var bt,cf;function ap(){if(cf)return bt;cf=1;var e=ar();function a(r,t){var n=[];return e(r,function(i,u,s){t(i,u,s)&&n.push(i)}),n}return bt=a,bt}var mt,df;function ip(){if(df)return mt;df=1;var e="__lodash_hash_undefined__";function a(r){return this.__data__.set(r,e),this}return mt=a,mt}var yt,lf;function sp(){if(lf)return yt;lf=1;function e(a){return this.__data__.has(a)}return yt=e,yt}var qt,hf;function Yl(){if(hf)return qt;hf=1;var e=Ns(),a=ip(),r=sp();function t(n){var i=-1,u=n==null?0:n.length;for(this.__data__=new e;++i<u;)this.add(n[i])}return t.prototype.add=t.prototype.push=a,t.prototype.has=r,qt=t,qt}var xt,vf;function up(){if(vf)return xt;vf=1;function e(a,r){for(var t=-1,n=a==null?0:a.length;++t<n;)if(r(a[t],t,a))return!0;return!1}return xt=e,xt}var wt,pf;function Xl(){if(pf)return wt;pf=1;function e(a,r){return a.has(r)}return wt=e,wt}var Rt,gf;function Zl(){if(gf)return Rt;gf=1;var e=Yl(),a=up(),r=Xl(),t=1,n=2;function i(u,s,o,c,f,d){var l=o&t,h=u.length,m=s.length;if(h!=m&&!(l&&m>h))return!1;var p=d.get(u),v=d.get(s);if(p&&v)return p==s&&v==u;var b=-1,g=!0,_=o&n?new e:void 0;for(d.set(u,s),d.set(s,u);++b<h;){var y=u[b],q=s[b];if(c)var x=l?c(q,y,b,s,u,d):c(y,q,b,u,s,d);if(x!==void 0){if(x)continue;g=!1;break}if(_){if(!a(s,function(w,T){if(!r(_,T)&&(y===w||f(y,w,o,c,d)))return _.push(T)})){g=!1;break}}else if(!(y===q||f(y,q,o,c,d))){g=!1;break}}return d.delete(u),d.delete(s),g}return Rt=i,Rt}var Et,_f;function op(){if(_f)return Et;_f=1;function e(a){var r=-1,t=Array(a.size);return a.forEach(function(n,i){t[++r]=[i,n]}),t}return Et=e,Et}var Ct,bf;function Hs(){if(bf)return Ct;bf=1;function e(a){var r=-1,t=Array(a.size);return a.forEach(function(n){t[++r]=n}),t}return Ct=e,Ct}var St,mf;function fp(){if(mf)return St;mf=1;var e=Te(),a=Bl(),r=Ae(),t=Zl(),n=op(),i=Hs(),u=1,s=2,o="[object Boolean]",c="[object Date]",f="[object Error]",d="[object Map]",l="[object Number]",h="[object RegExp]",m="[object Set]",p="[object String]",v="[object Symbol]",b="[object ArrayBuffer]",g="[object DataView]",_=e?e.prototype:void 0,y=_?_.valueOf:void 0;function q(x,w,T,I,A,O,P){switch(T){case g:if(x.byteLength!=w.byteLength||x.byteOffset!=w.byteOffset)return!1;x=x.buffer,w=w.buffer;case b:return!(x.byteLength!=w.byteLength||!O(new a(x),new a(w)));case o:case c:case l:return r(+x,+w);case f:return x.name==w.name&&x.message==w.message;case h:case p:return x==w+"";case d:var L=n;case m:var M=I&u;if(L||(L=i),x.size!=w.size&&!M)return!1;var U=P.get(x);if(U)return U==w;I|=s,P.set(x,w);var Y=t(L(x),L(w),I,A,O,P);return P.delete(x),Y;case v:if(y)return y.call(x)==y.call(w)}return!1}return St=q,St}var It,yf;function cp(){if(yf)return It;yf=1;var e=Dl(),a=1,r=Object.prototype,t=r.hasOwnProperty;function n(i,u,s,o,c,f){var d=s&a,l=e(i),h=l.length,m=e(u),p=m.length;if(h!=p&&!d)return!1;for(var v=h;v--;){var b=l[v];if(!(d?b in u:t.call(u,b)))return!1}var g=f.get(i),_=f.get(u);if(g&&_)return g==u&&_==i;var y=!0;f.set(i,u),f.set(u,i);for(var q=d;++v<h;){b=l[v];var x=i[b],w=u[b];if(o)var T=d?o(w,x,b,u,i,f):o(x,w,b,i,u,f);if(!(T===void 0?x===w||c(x,w,s,o,f):T)){y=!1;break}q||(q=b=="constructor")}if(y&&!q){var I=i.constructor,A=u.constructor;I!=A&&"constructor"in i&&"constructor"in u&&!(typeof I=="function"&&I instanceof I&&typeof A=="function"&&A instanceof A)&&(y=!1)}return f.delete(i),f.delete(u),y}return It=n,It}var At,qf;function dp(){if(qf)return At;qf=1;var e=Ze(),a=Zl(),r=fp(),t=cp(),n=Ne(),i=J(),u=Oe(),s=Ue(),o=1,c="[object Arguments]",f="[object Array]",d="[object Object]",l=Object.prototype,h=l.hasOwnProperty;function m(p,v,b,g,_,y){var q=i(p),x=i(v),w=q?f:n(p),T=x?f:n(v);w=w==c?d:w,T=T==c?d:T;var I=w==d,A=T==d,O=w==T;if(O&&u(p)){if(!u(v))return!1;q=!0,I=!1}if(O&&!I)return y||(y=new e),q||s(p)?a(p,v,b,g,_,y):r(p,v,w,b,g,_,y);if(!(b&o)){var P=I&&h.call(p,"__wrapped__"),L=A&&h.call(v,"__wrapped__");if(P||L){var M=P?p.value():p,U=L?v.value():v;return y||(y=new e),_(M,U,b,g,y)}}return O?(y||(y=new e),t(p,v,b,g,_,y)):!1}return At=m,At}var Tt,xf;function Jl(){if(xf)return Tt;xf=1;var e=dp(),a=he();function r(t,n,i,u,s){return t===n?!0:t==null||n==null||!a(t)&&!a(n)?t!==t&&n!==n:e(t,n,i,u,r,s)}return Tt=r,Tt}var Ot,wf;function lp(){if(wf)return Ot;wf=1;var e=Ze(),a=Jl(),r=1,t=2;function n(i,u,s,o){var c=s.length,f=c,d=!o;if(i==null)return!f;for(i=Object(i);c--;){var l=s[c];if(d&&l[2]?l[1]!==i[l[0]]:!(l[0]in i))return!1}for(;++c<f;){l=s[c];var h=l[0],m=i[h],p=l[1];if(d&&l[2]){if(m===void 0&&!(h in i))return!1}else{var v=new e;if(o)var b=o(m,p,h,i,u,v);if(!(b===void 0?a(p,m,r|t,o,v):b))return!1}}return!0}return Ot=n,Ot}var Nt,Rf;function Ql(){if(Rf)return Nt;Rf=1;var e=ae();function a(r){return r===r&&!e(r)}return Nt=a,Nt}var jt,Ef;function hp(){if(Ef)return jt;Ef=1;var e=Ql(),a=qe();function r(t){for(var n=a(t),i=n.length;i--;){var u=n[i],s=t[u];n[i]=[u,s,e(s)]}return n}return jt=r,jt}var Pt,Cf;function eh(){if(Cf)return Pt;Cf=1;function e(a,r){return function(t){return t==null?!1:t[a]===r&&(r!==void 0||a in Object(t))}}return Pt=e,Pt}var kt,Sf;function vp(){if(Sf)return kt;Sf=1;var e=lp(),a=hp(),r=eh();function t(n){var i=a(n);return i.length==1&&i[0][2]?r(i[0][0],i[0][1]):function(u){return u===n||e(u,n,i)}}return kt=t,kt}var Lt,If;function je(){if(If)return Lt;If=1;var e=Re(),a=he(),r="[object Symbol]";function t(n){return typeof n=="symbol"||a(n)&&e(n)==r}return Lt=t,Lt}var Mt,Af;function zs(){if(Af)return Mt;Af=1;var e=J(),a=je(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,t=/^\w*$/;function n(i,u){if(e(i))return!1;var s=typeof i;return s=="number"||s=="symbol"||s=="boolean"||i==null||a(i)?!0:t.test(i)||!r.test(i)||u!=null&&i in Object(u)}return Mt=n,Mt}var Ft,Tf;function pp(){if(Tf)return Ft;Tf=1;var e=Ns(),a="Expected a function";function r(t,n){if(typeof t!="function"||n!=null&&typeof n!="function")throw new TypeError(a);var i=function(){var u=arguments,s=n?n.apply(this,u):u[0],o=i.cache;if(o.has(s))return o.get(s);var c=t.apply(this,u);return i.cache=o.set(s,c)||o,c};return i.cache=new(r.Cache||e),i}return r.Cache=e,Ft=r,Ft}var Dt,Of;function gp(){if(Of)return Dt;Of=1;var e=pp(),a=500;function r(t){var n=e(t,function(u){return i.size===a&&i.clear(),u}),i=n.cache;return n}return Dt=r,Dt}var Gt,Nf;function _p(){if(Nf)return Gt;Nf=1;var e=gp(),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,t=e(function(n){var i=[];return n.charCodeAt(0)===46&&i.push(""),n.replace(a,function(u,s,o,c){i.push(o?c.replace(r,"$1"):s||u)}),i});return Gt=t,Gt}var Bt,jf;function ir(){if(jf)return Bt;jf=1;function e(a,r){for(var t=-1,n=a==null?0:a.length,i=Array(n);++t<n;)i[t]=r(a[t],t,a);return i}return Bt=e,Bt}var Ut,Pf;function bp(){if(Pf)return Ut;Pf=1;var e=Te(),a=ir(),r=J(),t=je(),n=e?e.prototype:void 0,i=n?n.toString:void 0;function u(s){if(typeof s=="string")return s;if(r(s))return a(s,u)+"";if(t(s))return i?i.call(s):"";var o=s+"";return o=="0"&&1/s==-1/0?"-0":o}return Ut=u,Ut}var Ht,kf;function rh(){if(kf)return Ht;kf=1;var e=bp();function a(r){return r==null?"":e(r)}return Ht=a,Ht}var zt,Lf;function sr(){if(Lf)return zt;Lf=1;var e=J(),a=zs(),r=_p(),t=rh();function n(i,u){return e(i)?i:a(i,u)?[i]:r(t(i))}return zt=n,zt}var Vt,Mf;function He(){if(Mf)return Vt;Mf=1;var e=je();function a(r){if(typeof r=="string"||e(r))return r;var t=r+"";return t=="0"&&1/r==-1/0?"-0":t}return Vt=a,Vt}var Kt,Ff;function ur(){if(Ff)return Kt;Ff=1;var e=sr(),a=He();function r(t,n){n=e(n,t);for(var i=0,u=n.length;t!=null&&i<u;)t=t[a(n[i++])];return i&&i==u?t:void 0}return Kt=r,Kt}var Wt,Df;function mp(){if(Df)return Wt;Df=1;var e=ur();function a(r,t,n){var i=r==null?void 0:e(r,t);return i===void 0?n:i}return Wt=a,Wt}var $t,Gf;function yp(){if(Gf)return $t;Gf=1;function e(a,r){return a!=null&&r in Object(a)}return $t=e,$t}var Yt,Bf;function nh(){if(Bf)return Yt;Bf=1;var e=sr(),a=Be(),r=J(),t=er(),n=Ps(),i=He();function u(s,o,c){o=e(o,s);for(var f=-1,d=o.length,l=!1;++f<d;){var h=i(o[f]);if(!(l=s!=null&&c(s,h)))break;s=s[h]}return l||++f!=d?l:(d=s==null?0:s.length,!!d&&n(d)&&t(h,d)&&(r(s)||a(s)))}return Yt=u,Yt}var Xt,Uf;function th(){if(Uf)return Xt;Uf=1;var e=yp(),a=nh();function r(t,n){return t!=null&&a(t,n,e)}return Xt=r,Xt}var Zt,Hf;function qp(){if(Hf)return Zt;Hf=1;var e=Jl(),a=mp(),r=th(),t=zs(),n=Ql(),i=eh(),u=He(),s=1,o=2;function c(f,d){return t(f)&&n(d)?i(u(f),d):function(l){var h=a(l,f);return h===void 0&&h===d?r(l,f):e(d,h,s|o)}}return Zt=c,Zt}var Jt,zf;function ah(){if(zf)return Jt;zf=1;function e(a){return function(r){return r==null?void 0:r[a]}}return Jt=e,Jt}var Qt,Vf;function xp(){if(Vf)return Qt;Vf=1;var e=ur();function a(r){return function(t){return e(t,r)}}return Qt=a,Qt}var ea,Kf;function wp(){if(Kf)return ea;Kf=1;var e=ah(),a=xp(),r=zs(),t=He();function n(i){return r(i)?e(t(i)):a(i)}return ea=n,ea}var ra,Wf;function ge(){if(Wf)return ra;Wf=1;var e=vp(),a=qp(),r=Se(),t=J(),n=wp();function i(u){return typeof u=="function"?u:u==null?r:typeof u=="object"?t(u)?a(u[0],u[1]):e(u):n(u)}return ra=i,ra}var na,$f;function ih(){if($f)return na;$f=1;var e=kl(),a=ap(),r=ge(),t=J();function n(i,u){var s=t(i)?e:a;return s(i,r(u,3))}return na=n,na}var ta,Yf;function Rp(){if(Yf)return ta;Yf=1;var e=Object.prototype,a=e.hasOwnProperty;function r(t,n){return t!=null&&a.call(t,n)}return ta=r,ta}var aa,Xf;function sh(){if(Xf)return aa;Xf=1;var e=Rp(),a=nh();function r(t,n){return t!=null&&a(t,n,e)}return aa=r,aa}var ia,Zf;function Ep(){if(Zf)return ia;Zf=1;var e=Ls(),a=Ne(),r=Be(),t=J(),n=pe(),i=Oe(),u=nr(),s=Ue(),o="[object Map]",c="[object Set]",f=Object.prototype,d=f.hasOwnProperty;function l(h){if(h==null)return!0;if(n(h)&&(t(h)||typeof h=="string"||typeof h.splice=="function"||i(h)||s(h)||r(h)))return!h.length;var m=a(h);if(m==o||m==c)return!h.size;if(u(h))return!e(h).length;for(var p in h)if(d.call(h,p))return!1;return!0}return ia=l,ia}var sa,Jf;function uh(){if(Jf)return sa;Jf=1;function e(a){return a===void 0}return sa=e,sa}var ua,Qf;function oh(){if(Qf)return ua;Qf=1;var e=ar(),a=pe();function r(t,n){var i=-1,u=a(t)?Array(t.length):[];return e(t,function(s,o,c){u[++i]=n(s,o,c)}),u}return ua=r,ua}var oa,ec;function fh(){if(ec)return oa;ec=1;var e=ir(),a=ge(),r=oh(),t=J();function n(i,u){var s=t(i)?e:r;return s(i,a(u,3))}return oa=n,oa}var fa,rc;function Cp(){if(rc)return fa;rc=1;function e(a,r,t,n){var i=-1,u=a==null?0:a.length;for(n&&u&&(t=a[++i]);++i<u;)t=r(t,a[i],i,a);return t}return fa=e,fa}var ca,nc;function Sp(){if(nc)return ca;nc=1;function e(a,r,t,n,i){return i(a,function(u,s,o){t=n?(n=!1,u):r(t,u,s,o)}),t}return ca=e,ca}var da,tc;function ch(){if(tc)return da;tc=1;var e=Cp(),a=ar(),r=ge(),t=Sp(),n=J();function i(u,s,o){var c=n(u)?e:t,f=arguments.length<3;return c(u,r(s,4),o,f,a)}return da=i,da}var la,ac;function Ip(){if(ac)return la;ac=1;var e=Re(),a=J(),r=he(),t="[object String]";function n(i){return typeof i=="string"||!a(i)&&r(i)&&e(i)==t}return la=n,la}var ha,ic;function Ap(){if(ic)return ha;ic=1;var e=ah(),a=e("length");return ha=a,ha}var va,sc;function Tp(){if(sc)return va;sc=1;var e="\\ud800-\\udfff",a="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",t="\\u20d0-\\u20ff",n=a+r+t,i="\\ufe0e\\ufe0f",u="\\u200d",s=RegExp("["+u+e+n+i+"]");function o(c){return s.test(c)}return va=o,va}var pa,uc;function Op(){if(uc)return pa;uc=1;var e="\\ud800-\\udfff",a="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",t="\\u20d0-\\u20ff",n=a+r+t,i="\\ufe0e\\ufe0f",u="["+e+"]",s="["+n+"]",o="\\ud83c[\\udffb-\\udfff]",c="(?:"+s+"|"+o+")",f="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",l="[\\ud800-\\udbff][\\udc00-\\udfff]",h="\\u200d",m=c+"?",p="["+i+"]?",v="(?:"+h+"(?:"+[f,d,l].join("|")+")"+p+m+")*",b=p+m+v,g="(?:"+[f+s+"?",s,d,l,u].join("|")+")",_=RegExp(o+"(?="+o+")|"+g+b,"g");function y(q){for(var x=_.lastIndex=0;_.test(q);)++x;return x}return pa=y,pa}var ga,oc;function Np(){if(oc)return ga;oc=1;var e=Ap(),a=Tp(),r=Op();function t(n){return a(n)?r(n):e(n)}return ga=t,ga}var _a,fc;function jp(){if(fc)return _a;fc=1;var e=Ls(),a=Ne(),r=pe(),t=Ip(),n=Np(),i="[object Map]",u="[object Set]";function s(o){if(o==null)return 0;if(r(o))return t(o)?n(o):o.length;var c=a(o);return c==i||c==u?o.size:e(o).length}return _a=s,_a}var ba,cc;function Pp(){if(cc)return ba;cc=1;var e=js(),a=Hl(),r=Us(),t=ge(),n=tr(),i=J(),u=Oe(),s=De(),o=ae(),c=Ue();function f(d,l,h){var m=i(d),p=m||u(d)||c(d);if(l=t(l,4),h==null){var v=d&&d.constructor;p?h=m?new v:[]:o(d)?h=s(v)?a(n(d)):{}:h={}}return(p?e:r)(d,function(b,g,_){return l(h,b,g,_)}),h}return ba=f,ba}var ma,dc;function kp(){if(dc)return ma;dc=1;var e=Te(),a=Be(),r=J(),t=e?e.isConcatSpreadable:void 0;function n(i){return r(i)||a(i)||!!(t&&i&&i[t])}return ma=n,ma}var ya,lc;function Vs(){if(lc)return ya;lc=1;var e=Fs(),a=kp();function r(t,n,i,u,s){var o=-1,c=t.length;for(i||(i=a),s||(s=[]);++o<c;){var f=t[o];n>0&&i(f)?n>1?r(f,n-1,i,u,s):e(s,f):u||(s[s.length]=f)}return s}return ya=r,ya}var qa,hc;function Lp(){if(hc)return qa;hc=1;function e(a,r,t){switch(t.length){case 0:return a.call(r);case 1:return a.call(r,t[0]);case 2:return a.call(r,t[0],t[1]);case 3:return a.call(r,t[0],t[1],t[2])}return a.apply(r,t)}return qa=e,qa}var xa,vc;function dh(){if(vc)return xa;vc=1;var e=Lp(),a=Math.max;function r(t,n,i){return n=a(n===void 0?t.length-1:n,0),function(){for(var u=arguments,s=-1,o=a(u.length-n,0),c=Array(o);++s<o;)c[s]=u[n+s];s=-1;for(var f=Array(n+1);++s<n;)f[s]=u[s];return f[n]=i(c),e(t,this,f)}}return xa=r,xa}var wa,pc;function Mp(){if(pc)return wa;pc=1;var e=Gs(),a=Tl(),r=Se(),t=a?function(n,i){return a(n,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:r;return wa=t,wa}var Ra,gc;function Fp(){if(gc)return Ra;gc=1;var e=800,a=16,r=Date.now;function t(n){var i=0,u=0;return function(){var s=r(),o=a-(s-u);if(u=s,o>0){if(++i>=e)return arguments[0]}else i=0;return n.apply(void 0,arguments)}}return Ra=t,Ra}var Ea,_c;function lh(){if(_c)return Ea;_c=1;var e=Mp(),a=Fp(),r=a(e);return Ea=r,Ea}var Ca,bc;function or(){if(bc)return Ca;bc=1;var e=Se(),a=dh(),r=lh();function t(n,i){return r(a(n,i,e),n+"")}return Ca=t,Ca}var Sa,mc;function hh(){if(mc)return Sa;mc=1;function e(a,r,t,n){for(var i=a.length,u=t+(n?1:-1);n?u--:++u<i;)if(r(a[u],u,a))return u;return-1}return Sa=e,Sa}var Ia,yc;function Dp(){if(yc)return Ia;yc=1;function e(a){return a!==a}return Ia=e,Ia}var Aa,qc;function Gp(){if(qc)return Aa;qc=1;function e(a,r,t){for(var n=t-1,i=a.length;++n<i;)if(a[n]===r)return n;return-1}return Aa=e,Aa}var Ta,xc;function Bp(){if(xc)return Ta;xc=1;var e=hh(),a=Dp(),r=Gp();function t(n,i,u){return i===i?r(n,i,u):e(n,a,u)}return Ta=t,Ta}var Oa,wc;function Up(){if(wc)return Oa;wc=1;var e=Bp();function a(r,t){var n=r==null?0:r.length;return!!n&&e(r,t,0)>-1}return Oa=a,Oa}var Na,Rc;function Hp(){if(Rc)return Na;Rc=1;function e(a,r,t){for(var n=-1,i=a==null?0:a.length;++n<i;)if(t(r,a[n]))return!0;return!1}return Na=e,Na}var ja,Ec;function zp(){if(Ec)return ja;Ec=1;function e(){}return ja=e,ja}var Pa,Cc;function Vp(){if(Cc)return Pa;Cc=1;var e=Gl(),a=zp(),r=Hs(),t=1/0,n=e&&1/r(new e([,-0]))[1]==t?function(i){return new e(i)}:a;return Pa=n,Pa}var ka,Sc;function Kp(){if(Sc)return ka;Sc=1;var e=Yl(),a=Up(),r=Hp(),t=Xl(),n=Vp(),i=Hs(),u=200;function s(o,c,f){var d=-1,l=a,h=o.length,m=!0,p=[],v=p;if(f)m=!1,l=r;else if(h>=u){var b=c?null:n(o);if(b)return i(b);m=!1,l=t,v=new e}else v=c?[]:p;e:for(;++d<h;){var g=o[d],_=c?c(g):g;if(g=f||g!==0?g:0,m&&_===_){for(var y=v.length;y--;)if(v[y]===_)continue e;c&&v.push(_),p.push(g)}else l(v,_,f)||(v!==p&&v.push(_),p.push(g))}return p}return ka=s,ka}var La,Ic;function vh(){if(Ic)return La;Ic=1;var e=pe(),a=he();function r(t){return a(t)&&e(t)}return La=r,La}var Ma,Ac;function Wp(){if(Ac)return Ma;Ac=1;var e=Vs(),a=or(),r=Kp(),t=vh(),n=a(function(i){return r(e(i,1,t,!0))});return Ma=n,Ma}var Fa,Tc;function $p(){if(Tc)return Fa;Tc=1;var e=ir();function a(r,t){return e(t,function(n){return r[n]})}return Fa=a,Fa}var Da,Oc;function ph(){if(Oc)return Da;Oc=1;var e=$p(),a=qe();function r(t){return t==null?[]:e(t,a(t))}return Da=r,Da}var Ga,Nc;function ie(){if(Nc)return Ga;Nc=1;var e;if(typeof Ts=="function")try{e={clone:rp(),constant:Gs(),each:$l(),filter:ih(),has:sh(),isArray:J(),isEmpty:Ep(),isFunction:De(),isUndefined:uh(),keys:qe(),map:fh(),reduce:ch(),size:jp(),transform:Pp(),union:Wp(),values:ph()}}catch{}return e||(e=window._),Ga=e,Ga}var Ba,jc;function Ks(){if(jc)return Ba;jc=1;var e=ie();Ba=n;var a="\0",r="\0",t="";function n(f){this._isDirected=e.has(f,"directed")?f.directed:!0,this._isMultigraph=e.has(f,"multigraph")?f.multigraph:!1,this._isCompound=e.has(f,"compound")?f.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[r]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}n.prototype._nodeCount=0,n.prototype._edgeCount=0,n.prototype.isDirected=function(){return this._isDirected},n.prototype.isMultigraph=function(){return this._isMultigraph},n.prototype.isCompound=function(){return this._isCompound},n.prototype.setGraph=function(f){return this._label=f,this},n.prototype.graph=function(){return this._label},n.prototype.setDefaultNodeLabel=function(f){return e.isFunction(f)||(f=e.constant(f)),this._defaultNodeLabelFn=f,this},n.prototype.nodeCount=function(){return this._nodeCount},n.prototype.nodes=function(){return e.keys(this._nodes)},n.prototype.sources=function(){var f=this;return e.filter(this.nodes(),function(d){return e.isEmpty(f._in[d])})},n.prototype.sinks=function(){var f=this;return e.filter(this.nodes(),function(d){return e.isEmpty(f._out[d])})},n.prototype.setNodes=function(f,d){var l=arguments,h=this;return e.each(f,function(m){l.length>1?h.setNode(m,d):h.setNode(m)}),this},n.prototype.setNode=function(f,d){return e.has(this._nodes,f)?(arguments.length>1&&(this._nodes[f]=d),this):(this._nodes[f]=arguments.length>1?d:this._defaultNodeLabelFn(f),this._isCompound&&(this._parent[f]=r,this._children[f]={},this._children[r][f]=!0),this._in[f]={},this._preds[f]={},this._out[f]={},this._sucs[f]={},++this._nodeCount,this)},n.prototype.node=function(f){return this._nodes[f]},n.prototype.hasNode=function(f){return e.has(this._nodes,f)},n.prototype.removeNode=function(f){var d=this;if(e.has(this._nodes,f)){var l=function(h){d.removeEdge(d._edgeObjs[h])};delete this._nodes[f],this._isCompound&&(this._removeFromParentsChildList(f),delete this._parent[f],e.each(this.children(f),function(h){d.setParent(h)}),delete this._children[f]),e.each(e.keys(this._in[f]),l),delete this._in[f],delete this._preds[f],e.each(e.keys(this._out[f]),l),delete this._out[f],delete this._sucs[f],--this._nodeCount}return this},n.prototype.setParent=function(f,d){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(d))d=r;else{d+="";for(var l=d;!e.isUndefined(l);l=this.parent(l))if(l===f)throw new Error("Setting "+d+" as parent of "+f+" would create a cycle");this.setNode(d)}return this.setNode(f),this._removeFromParentsChildList(f),this._parent[f]=d,this._children[d][f]=!0,this},n.prototype._removeFromParentsChildList=function(f){delete this._children[this._parent[f]][f]},n.prototype.parent=function(f){if(this._isCompound){var d=this._parent[f];if(d!==r)return d}},n.prototype.children=function(f){if(e.isUndefined(f)&&(f=r),this._isCompound){var d=this._children[f];if(d)return e.keys(d)}else{if(f===r)return this.nodes();if(this.hasNode(f))return[]}},n.prototype.predecessors=function(f){var d=this._preds[f];if(d)return e.keys(d)},n.prototype.successors=function(f){var d=this._sucs[f];if(d)return e.keys(d)},n.prototype.neighbors=function(f){var d=this.predecessors(f);if(d)return e.union(d,this.successors(f))},n.prototype.isLeaf=function(f){var d;return this.isDirected()?d=this.successors(f):d=this.neighbors(f),d.length===0},n.prototype.filterNodes=function(f){var d=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});d.setGraph(this.graph());var l=this;e.each(this._nodes,function(p,v){f(v)&&d.setNode(v,p)}),e.each(this._edgeObjs,function(p){d.hasNode(p.v)&&d.hasNode(p.w)&&d.setEdge(p,l.edge(p))});var h={};function m(p){var v=l.parent(p);return v===void 0||d.hasNode(v)?(h[p]=v,v):v in h?h[v]:m(v)}return this._isCompound&&e.each(d.nodes(),function(p){d.setParent(p,m(p))}),d},n.prototype.setDefaultEdgeLabel=function(f){return e.isFunction(f)||(f=e.constant(f)),this._defaultEdgeLabelFn=f,this},n.prototype.edgeCount=function(){return this._edgeCount},n.prototype.edges=function(){return e.values(this._edgeObjs)},n.prototype.setPath=function(f,d){var l=this,h=arguments;return e.reduce(f,function(m,p){return h.length>1?l.setEdge(m,p,d):l.setEdge(m,p),p}),this},n.prototype.setEdge=function(){var f,d,l,h,m=!1,p=arguments[0];typeof p=="object"&&p!==null&&"v"in p?(f=p.v,d=p.w,l=p.name,arguments.length===2&&(h=arguments[1],m=!0)):(f=p,d=arguments[1],l=arguments[3],arguments.length>2&&(h=arguments[2],m=!0)),f=""+f,d=""+d,e.isUndefined(l)||(l=""+l);var v=s(this._isDirected,f,d,l);if(e.has(this._edgeLabels,v))return m&&(this._edgeLabels[v]=h),this;if(!e.isUndefined(l)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(f),this.setNode(d),this._edgeLabels[v]=m?h:this._defaultEdgeLabelFn(f,d,l);var b=o(this._isDirected,f,d,l);return f=b.v,d=b.w,Object.freeze(b),this._edgeObjs[v]=b,i(this._preds[d],f),i(this._sucs[f],d),this._in[d][v]=b,this._out[f][v]=b,this._edgeCount++,this},n.prototype.edge=function(f,d,l){var h=arguments.length===1?c(this._isDirected,arguments[0]):s(this._isDirected,f,d,l);return this._edgeLabels[h]},n.prototype.hasEdge=function(f,d,l){var h=arguments.length===1?c(this._isDirected,arguments[0]):s(this._isDirected,f,d,l);return e.has(this._edgeLabels,h)},n.prototype.removeEdge=function(f,d,l){var h=arguments.length===1?c(this._isDirected,arguments[0]):s(this._isDirected,f,d,l),m=this._edgeObjs[h];return m&&(f=m.v,d=m.w,delete this._edgeLabels[h],delete this._edgeObjs[h],u(this._preds[d],f),u(this._sucs[f],d),delete this._in[d][h],delete this._out[f][h],this._edgeCount--),this},n.prototype.inEdges=function(f,d){var l=this._in[f];if(l){var h=e.values(l);return d?e.filter(h,function(m){return m.v===d}):h}},n.prototype.outEdges=function(f,d){var l=this._out[f];if(l){var h=e.values(l);return d?e.filter(h,function(m){return m.w===d}):h}},n.prototype.nodeEdges=function(f,d){var l=this.inEdges(f,d);if(l)return l.concat(this.outEdges(f,d))};function i(f,d){f[d]?f[d]++:f[d]=1}function u(f,d){--f[d]||delete f[d]}function s(f,d,l,h){var m=""+d,p=""+l;if(!f&&m>p){var v=m;m=p,p=v}return m+t+p+t+(e.isUndefined(h)?a:h)}function o(f,d,l,h){var m=""+d,p=""+l;if(!f&&m>p){var v=m;m=p,p=v}var b={v:m,w:p};return h&&(b.name=h),b}function c(f,d){return s(f,d.v,d.w,d.name)}return Ba}var Ua,Pc;function Yp(){return Pc||(Pc=1,Ua="2.1.8"),Ua}var Ha,kc;function Xp(){return kc||(kc=1,Ha={Graph:Ks(),version:Yp()}),Ha}var za,Lc;function Zp(){if(Lc)return za;Lc=1;var e=ie(),a=Ks();za={write:r,read:i};function r(u){var s={options:{directed:u.isDirected(),multigraph:u.isMultigraph(),compound:u.isCompound()},nodes:t(u),edges:n(u)};return e.isUndefined(u.graph())||(s.value=e.clone(u.graph())),s}function t(u){return e.map(u.nodes(),function(s){var o=u.node(s),c=u.parent(s),f={v:s};return e.isUndefined(o)||(f.value=o),e.isUndefined(c)||(f.parent=c),f})}function n(u){return e.map(u.edges(),function(s){var o=u.edge(s),c={v:s.v,w:s.w};return e.isUndefined(s.name)||(c.name=s.name),e.isUndefined(o)||(c.value=o),c})}function i(u){var s=new a(u.options).setGraph(u.value);return e.each(u.nodes,function(o){s.setNode(o.v,o.value),o.parent&&s.setParent(o.v,o.parent)}),e.each(u.edges,function(o){s.setEdge({v:o.v,w:o.w,name:o.name},o.value)}),s}return za}var Va,Mc;function Jp(){if(Mc)return Va;Mc=1;var e=ie();Va=a;function a(r){var t={},n=[],i;function u(s){e.has(t,s)||(t[s]=!0,i.push(s),e.each(r.successors(s),u),e.each(r.predecessors(s),u))}return e.each(r.nodes(),function(s){i=[],u(s),i.length&&n.push(i)}),n}return Va}var Ka,Fc;function gh(){if(Fc)return Ka;Fc=1;var e=ie();Ka=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(r){return r.key})},a.prototype.has=function(r){return e.has(this._keyIndices,r)},a.prototype.priority=function(r){var t=this._keyIndices[r];if(t!==void 0)return this._arr[t].priority},a.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},a.prototype.add=function(r,t){var n=this._keyIndices;if(r=String(r),!e.has(n,r)){var i=this._arr,u=i.length;return n[r]=u,i.push({key:r,priority:t}),this._decrease(u),!0}return!1},a.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var r=this._arr.pop();return delete this._keyIndices[r.key],this._heapify(0),r.key},a.prototype.decrease=function(r,t){var n=this._keyIndices[r];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+r+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},a.prototype._heapify=function(r){var t=this._arr,n=2*r,i=n+1,u=r;n<t.length&&(u=t[n].priority<t[u].priority?n:u,i<t.length&&(u=t[i].priority<t[u].priority?i:u),u!==r&&(this._swap(r,u),this._heapify(u)))},a.prototype._decrease=function(r){for(var t=this._arr,n=t[r].priority,i;r!==0&&(i=r>>1,!(t[i].priority<n));)this._swap(r,i),r=i},a.prototype._swap=function(r,t){var n=this._arr,i=this._keyIndices,u=n[r],s=n[t];n[r]=s,n[t]=u,i[s.key]=r,i[u.key]=t},Ka}var Wa,Dc;function _h(){if(Dc)return Wa;Dc=1;var e=ie(),a=gh();Wa=t;var r=e.constant(1);function t(i,u,s,o){return n(i,String(u),s||r,o||function(c){return i.outEdges(c)})}function n(i,u,s,o){var c={},f=new a,d,l,h=function(m){var p=m.v!==d?m.v:m.w,v=c[p],b=s(m),g=l.distance+b;if(b<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+m+" Weight: "+b);g<v.distance&&(v.distance=g,v.predecessor=d,f.decrease(p,g))};for(i.nodes().forEach(function(m){var p=m===u?0:Number.POSITIVE_INFINITY;c[m]={distance:p},f.add(m,p)});f.size()>0&&(d=f.removeMin(),l=c[d],l.distance!==Number.POSITIVE_INFINITY);)o(d).forEach(h);return c}return Wa}var $a,Gc;function Qp(){if(Gc)return $a;Gc=1;var e=_h(),a=ie();$a=r;function r(t,n,i){return a.transform(t.nodes(),function(u,s){u[s]=e(t,s,n,i)},{})}return $a}var Ya,Bc;function bh(){if(Bc)return Ya;Bc=1;var e=ie();Ya=a;function a(r){var t=0,n=[],i={},u=[];function s(o){var c=i[o]={onStack:!0,lowlink:t,index:t++};if(n.push(o),r.successors(o).forEach(function(l){e.has(i,l)?i[l].onStack&&(c.lowlink=Math.min(c.lowlink,i[l].index)):(s(l),c.lowlink=Math.min(c.lowlink,i[l].lowlink))}),c.lowlink===c.index){var f=[],d;do d=n.pop(),i[d].onStack=!1,f.push(d);while(o!==d);u.push(f)}}return r.nodes().forEach(function(o){e.has(i,o)||s(o)}),u}return Ya}var Xa,Uc;function eg(){if(Uc)return Xa;Uc=1;var e=ie(),a=bh();Xa=r;function r(t){return e.filter(a(t),function(n){return n.length>1||n.length===1&&t.hasEdge(n[0],n[0])})}return Xa}var Za,Hc;function rg(){if(Hc)return Za;Hc=1;var e=ie();Za=r;var a=e.constant(1);function r(n,i,u){return t(n,i||a,u||function(s){return n.outEdges(s)})}function t(n,i,u){var s={},o=n.nodes();return o.forEach(function(c){s[c]={},s[c][c]={distance:0},o.forEach(function(f){c!==f&&(s[c][f]={distance:Number.POSITIVE_INFINITY})}),u(c).forEach(function(f){var d=f.v===c?f.w:f.v,l=i(f);s[c][d]={distance:l,predecessor:c}})}),o.forEach(function(c){var f=s[c];o.forEach(function(d){var l=s[d];o.forEach(function(h){var m=l[c],p=f[h],v=l[h],b=m.distance+p.distance;b<v.distance&&(v.distance=b,v.predecessor=p.predecessor)})})}),s}return Za}var Ja,zc;function mh(){if(zc)return Ja;zc=1;var e=ie();Ja=a,a.CycleException=r;function a(t){var n={},i={},u=[];function s(o){if(e.has(i,o))throw new r;e.has(n,o)||(i[o]=!0,n[o]=!0,e.each(t.predecessors(o),s),delete i[o],u.push(o))}if(e.each(t.sinks(),s),e.size(n)!==t.nodeCount())throw new r;return u}function r(){}return r.prototype=new Error,Ja}var Qa,Vc;function ng(){if(Vc)return Qa;Vc=1;var e=mh();Qa=a;function a(r){try{e(r)}catch(t){if(t instanceof e.CycleException)return!1;throw t}return!0}return Qa}var ei,Kc;function yh(){if(Kc)return ei;Kc=1;var e=ie();ei=a;function a(t,n,i){e.isArray(n)||(n=[n]);var u=(t.isDirected()?t.successors:t.neighbors).bind(t),s=[],o={};return e.each(n,function(c){if(!t.hasNode(c))throw new Error("Graph does not have node: "+c);r(t,c,i==="post",o,u,s)}),s}function r(t,n,i,u,s,o){e.has(u,n)||(u[n]=!0,i||o.push(n),e.each(s(n),function(c){r(t,c,i,u,s,o)}),i&&o.push(n))}return ei}var ri,Wc;function tg(){if(Wc)return ri;Wc=1;var e=yh();ri=a;function a(r,t){return e(r,t,"post")}return ri}var ni,$c;function ag(){if($c)return ni;$c=1;var e=yh();ni=a;function a(r,t){return e(r,t,"pre")}return ni}var ti,Yc;function ig(){if(Yc)return ti;Yc=1;var e=ie(),a=Ks(),r=gh();ti=t;function t(n,i){var u=new a,s={},o=new r,c;function f(l){var h=l.v===c?l.w:l.v,m=o.priority(h);if(m!==void 0){var p=i(l);p<m&&(s[h]=c,o.decrease(h,p))}}if(n.nodeCount()===0)return u;e.each(n.nodes(),function(l){o.add(l,Number.POSITIVE_INFINITY),u.setNode(l)}),o.decrease(n.nodes()[0],0);for(var d=!1;o.size()>0;){if(c=o.removeMin(),e.has(s,c))u.setEdge(c,s[c]);else{if(d)throw new Error("Input graph is not connected: "+n);d=!0}n.nodeEdges(c).forEach(f)}return u}return ti}var ai,Xc;function sg(){return Xc||(Xc=1,ai={components:Jp(),dijkstra:_h(),dijkstraAll:Qp(),findCycles:eg(),floydWarshall:rg(),isAcyclic:ng(),postorder:tg(),preorder:ag(),prim:ig(),tarjan:bh(),topsort:mh()}),ai}var ii,Zc;function ug(){if(Zc)return ii;Zc=1;var e=Xp();return ii={Graph:e.Graph,json:Zp(),alg:sg(),version:e.version},ii}var si,Jc;function oe(){if(Jc)return si;Jc=1;var e;if(typeof Ts=="function")try{e=ug()}catch{}return e||(e=window.graphlib),si=e,si}var ui,Qc;function og(){if(Qc)return ui;Qc=1;var e=Vl(),a=1,r=4;function t(n){return e(n,a|r)}return ui=t,ui}var oi,ed;function fr(){if(ed)return oi;ed=1;var e=Ae(),a=pe(),r=er(),t=ae();function n(i,u,s){if(!t(s))return!1;var o=typeof u;return(o=="number"?a(s)&&r(u,s.length):o=="string"&&u in s)?e(s[u],i):!1}return oi=n,oi}var fi,rd;function fg(){if(rd)return fi;rd=1;var e=or(),a=Ae(),r=fr(),t=Ce(),n=Object.prototype,i=n.hasOwnProperty,u=e(function(s,o){s=Object(s);var c=-1,f=o.length,d=f>2?o[2]:void 0;for(d&&r(o[0],o[1],d)&&(f=1);++c<f;)for(var l=o[c],h=t(l),m=-1,p=h.length;++m<p;){var v=h[m],b=s[v];(b===void 0||a(b,n[v])&&!i.call(s,v))&&(s[v]=l[v])}return s});return fi=u,fi}var ci,nd;function cg(){if(nd)return ci;nd=1;var e=ge(),a=pe(),r=qe();function t(n){return function(i,u,s){var o=Object(i);if(!a(i)){var c=e(u,3);i=r(i),u=function(d){return c(o[d],d,o)}}var f=n(i,u,s);return f>-1?o[c?i[f]:f]:void 0}}return ci=t,ci}var di,td;function dg(){if(td)return di;td=1;var e=/\s/;function a(r){for(var t=r.length;t--&&e.test(r.charAt(t)););return t}return di=a,di}var li,ad;function lg(){if(ad)return li;ad=1;var e=dg(),a=/^\s+/;function r(t){return t&&t.slice(0,e(t)+1).replace(a,"")}return li=r,li}var hi,id;function hg(){if(id)return hi;id=1;var e=lg(),a=ae(),r=je(),t=NaN,n=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,u=/^0o[0-7]+$/i,s=parseInt;function o(c){if(typeof c=="number")return c;if(r(c))return t;if(a(c)){var f=typeof c.valueOf=="function"?c.valueOf():c;c=a(f)?f+"":f}if(typeof c!="string")return c===0?c:+c;c=e(c);var d=i.test(c);return d||u.test(c)?s(c.slice(2),d?2:8):n.test(c)?t:+c}return hi=o,hi}var vi,sd;function qh(){if(sd)return vi;sd=1;var e=hg(),a=1/0,r=17976931348623157e292;function t(n){if(!n)return n===0?n:0;if(n=e(n),n===a||n===-a){var i=n<0?-1:1;return i*r}return n===n?n:0}return vi=t,vi}var pi,ud;function vg(){if(ud)return pi;ud=1;var e=qh();function a(r){var t=e(r),n=t%1;return t===t?n?t-n:t:0}return pi=a,pi}var gi,od;function pg(){if(od)return gi;od=1;var e=hh(),a=ge(),r=vg(),t=Math.max;function n(i,u,s){var o=i==null?0:i.length;if(!o)return-1;var c=s==null?0:r(s);return c<0&&(c=t(o+c,0)),e(i,a(u,3),c)}return gi=n,gi}var _i,fd;function gg(){if(fd)return _i;fd=1;var e=cg(),a=pg(),r=e(a);return _i=r,_i}var bi,cd;function xh(){if(cd)return bi;cd=1;var e=Vs();function a(r){var t=r==null?0:r.length;return t?e(r,1):[]}return bi=a,bi}var mi,dd;function _g(){if(dd)return mi;dd=1;var e=Bs(),a=Kl(),r=Ce();function t(n,i){return n==null?n:e(n,a(i),r)}return mi=t,mi}var yi,ld;function bg(){if(ld)return yi;ld=1;function e(a){var r=a==null?0:a.length;return r?a[r-1]:void 0}return yi=e,yi}var qi,hd;function mg(){if(hd)return qi;hd=1;var e=Je(),a=Us(),r=ge();function t(n,i){var u={};return i=r(i,3),a(n,function(s,o,c){e(u,o,i(s,o,c))}),u}return qi=t,qi}var xi,vd;function Ws(){if(vd)return xi;vd=1;var e=je();function a(r,t,n){for(var i=-1,u=r.length;++i<u;){var s=r[i],o=t(s);if(o!=null&&(c===void 0?o===o&&!e(o):n(o,c)))var c=o,f=s}return f}return xi=a,xi}var wi,pd;function yg(){if(pd)return wi;pd=1;function e(a,r){return a>r}return wi=e,wi}var Ri,gd;function qg(){if(gd)return Ri;gd=1;var e=Ws(),a=yg(),r=Se();function t(n){return n&&n.length?e(n,r,a):void 0}return Ri=t,Ri}var Ei,_d;function wh(){if(_d)return Ei;_d=1;var e=Je(),a=Ae();function r(t,n,i){(i!==void 0&&!a(t[n],i)||i===void 0&&!(n in t))&&e(t,n,i)}return Ei=r,Ei}var Ci,bd;function xg(){if(bd)return Ci;bd=1;var e=Re(),a=tr(),r=he(),t="[object Object]",n=Function.prototype,i=Object.prototype,u=n.toString,s=i.hasOwnProperty,o=u.call(Object);function c(f){if(!r(f)||e(f)!=t)return!1;var d=a(f);if(d===null)return!0;var l=s.call(d,"constructor")&&d.constructor;return typeof l=="function"&&l instanceof l&&u.call(l)==o}return Ci=c,Ci}var Si,md;function Rh(){if(md)return Si;md=1;function e(a,r){if(!(r==="constructor"&&typeof a[r]=="function")&&r!="__proto__")return a[r]}return Si=e,Si}var Ii,yd;function wg(){if(yd)return Ii;yd=1;var e=Ge(),a=Ce();function r(t){return e(t,a(t))}return Ii=r,Ii}var Ai,qd;function Rg(){if(qd)return Ai;qd=1;var e=wh(),a=jl(),r=Ul(),t=Pl(),n=zl(),i=Be(),u=J(),s=vh(),o=Oe(),c=De(),f=ae(),d=xg(),l=Ue(),h=Rh(),m=wg();function p(v,b,g,_,y,q,x){var w=h(v,g),T=h(b,g),I=x.get(T);if(I){e(v,g,I);return}var A=q?q(w,T,g+"",v,b,x):void 0,O=A===void 0;if(O){var P=u(T),L=!P&&o(T),M=!P&&!L&&l(T);A=T,P||L||M?u(w)?A=w:s(w)?A=t(w):L?(O=!1,A=a(T,!0)):M?(O=!1,A=r(T,!0)):A=[]:d(T)||i(T)?(A=w,i(w)?A=m(w):(!f(w)||c(w))&&(A=n(T))):O=!1}O&&(x.set(T,A),y(A,T,_,q,x),x.delete(T)),e(v,g,A)}return Ai=p,Ai}var Ti,xd;function Eg(){if(xd)return Ti;xd=1;var e=Ze(),a=wh(),r=Bs(),t=Rg(),n=ae(),i=Ce(),u=Rh();function s(o,c,f,d,l){o!==c&&r(c,function(h,m){if(l||(l=new e),n(h))t(o,c,m,f,s,d,l);else{var p=d?d(u(o,m),h,m+"",o,c,l):void 0;p===void 0&&(p=h),a(o,m,p)}},i)}return Ti=s,Ti}var Oi,wd;function Cg(){if(wd)return Oi;wd=1;var e=or(),a=fr();function r(t){return e(function(n,i){var u=-1,s=i.length,o=s>1?i[s-1]:void 0,c=s>2?i[2]:void 0;for(o=t.length>3&&typeof o=="function"?(s--,o):void 0,c&&a(i[0],i[1],c)&&(o=s<3?void 0:o,s=1),n=Object(n);++u<s;){var f=i[u];f&&t(n,f,u,o)}return n})}return Oi=r,Oi}var Ni,Rd;function Sg(){if(Rd)return Ni;Rd=1;var e=Eg(),a=Cg(),r=a(function(t,n,i){e(t,n,i)});return Ni=r,Ni}var ji,Ed;function Eh(){if(Ed)return ji;Ed=1;function e(a,r){return a<r}return ji=e,ji}var Pi,Cd;function Ig(){if(Cd)return Pi;Cd=1;var e=Ws(),a=Eh(),r=Se();function t(n){return n&&n.length?e(n,r,a):void 0}return Pi=t,Pi}var ki,Sd;function Ag(){if(Sd)return ki;Sd=1;var e=Ws(),a=ge(),r=Eh();function t(n,i){return n&&n.length?e(n,a(i,2),r):void 0}return ki=t,ki}var Li,Id;function Tg(){if(Id)return Li;Id=1;var e=fe(),a=function(){return e.Date.now()};return Li=a,Li}var Mi,Ad;function Og(){if(Ad)return Mi;Ad=1;var e=Qe(),a=sr(),r=er(),t=ae(),n=He();function i(u,s,o,c){if(!t(u))return u;s=a(s,u);for(var f=-1,d=s.length,l=d-1,h=u;h!=null&&++f<d;){var m=n(s[f]),p=o;if(m==="__proto__"||m==="constructor"||m==="prototype")return u;if(f!=l){var v=h[m];p=c?c(v,m,h):void 0,p===void 0&&(p=t(v)?v:r(s[f+1])?[]:{})}e(h,m,p),h=h[m]}return u}return Mi=i,Mi}var Fi,Td;function Ng(){if(Td)return Fi;Td=1;var e=ur(),a=Og(),r=sr();function t(n,i,u){for(var s=-1,o=i.length,c={};++s<o;){var f=i[s],d=e(n,f);u(d,f)&&a(c,r(f,n),d)}return c}return Fi=t,Fi}var Di,Od;function jg(){if(Od)return Di;Od=1;var e=Ng(),a=th();function r(t,n){return e(t,n,function(i,u){return a(t,u)})}return Di=r,Di}var Gi,Nd;function Pg(){if(Nd)return Gi;Nd=1;var e=xh(),a=dh(),r=lh();function t(n){return r(a(n,void 0,e),n+"")}return Gi=t,Gi}var Bi,jd;function kg(){if(jd)return Bi;jd=1;var e=jg(),a=Pg(),r=a(function(t,n){return t==null?{}:e(t,n)});return Bi=r,Bi}var Ui,Pd;function Lg(){if(Pd)return Ui;Pd=1;var e=Math.ceil,a=Math.max;function r(t,n,i,u){for(var s=-1,o=a(e((n-t)/(i||1)),0),c=Array(o);o--;)c[u?o:++s]=t,t+=i;return c}return Ui=r,Ui}var Hi,kd;function Mg(){if(kd)return Hi;kd=1;var e=Lg(),a=fr(),r=qh();function t(n){return function(i,u,s){return s&&typeof s!="number"&&a(i,u,s)&&(u=s=void 0),i=r(i),u===void 0?(u=i,i=0):u=r(u),s=s===void 0?i<u?1:-1:r(s),e(i,u,s,n)}}return Hi=t,Hi}var zi,Ld;function Fg(){if(Ld)return zi;Ld=1;var e=Mg(),a=e();return zi=a,zi}var Vi,Md;function Dg(){if(Md)return Vi;Md=1;function e(a,r){var t=a.length;for(a.sort(r);t--;)a[t]=a[t].value;return a}return Vi=e,Vi}var Ki,Fd;function Gg(){if(Fd)return Ki;Fd=1;var e=je();function a(r,t){if(r!==t){var n=r!==void 0,i=r===null,u=r===r,s=e(r),o=t!==void 0,c=t===null,f=t===t,d=e(t);if(!c&&!d&&!s&&r>t||s&&o&&f&&!c&&!d||i&&o&&f||!n&&f||!u)return 1;if(!i&&!s&&!d&&r<t||d&&n&&u&&!i&&!s||c&&n&&u||!o&&u||!f)return-1}return 0}return Ki=a,Ki}var Wi,Dd;function Bg(){if(Dd)return Wi;Dd=1;var e=Gg();function a(r,t,n){for(var i=-1,u=r.criteria,s=t.criteria,o=u.length,c=n.length;++i<o;){var f=e(u[i],s[i]);if(f){if(i>=c)return f;var d=n[i];return f*(d=="desc"?-1:1)}}return r.index-t.index}return Wi=a,Wi}var $i,Gd;function Ug(){if(Gd)return $i;Gd=1;var e=ir(),a=ur(),r=ge(),t=oh(),n=Dg(),i=rr(),u=Bg(),s=Se(),o=J();function c(f,d,l){d.length?d=e(d,function(p){return o(p)?function(v){return a(v,p.length===1?p[0]:p)}:p}):d=[s];var h=-1;d=e(d,i(r));var m=t(f,function(p,v,b){var g=e(d,function(_){return _(p)});return{criteria:g,index:++h,value:p}});return n(m,function(p,v){return u(p,v,l)})}return $i=c,$i}var Yi,Bd;function Hg(){if(Bd)return Yi;Bd=1;var e=Vs(),a=Ug(),r=or(),t=fr(),n=r(function(i,u){if(i==null)return[];var s=u.length;return s>1&&t(i,u[0],u[1])?u=[]:s>2&&t(u[0],u[1],u[2])&&(u=[u[0]]),a(i,e(u,1),[])});return Yi=n,Yi}var Xi,Ud;function zg(){if(Ud)return Xi;Ud=1;var e=rh(),a=0;function r(t){var n=++a;return e(t)+n}return Xi=r,Xi}var Zi,Hd;function Vg(){if(Hd)return Zi;Hd=1;function e(a,r,t){for(var n=-1,i=a.length,u=r.length,s={};++n<i;){var o=n<u?r[n]:void 0;t(s,a[n],o)}return s}return Zi=e,Zi}var Ji,zd;function Kg(){if(zd)return Ji;zd=1;var e=Qe(),a=Vg();function r(t,n){return a(t||[],n||[],e)}return Ji=r,Ji}var Qi,Vd;function X(){if(Vd)return Qi;Vd=1;var e;if(typeof Ts=="function")try{e={cloneDeep:og(),constant:Gs(),defaults:fg(),each:$l(),filter:ih(),find:gg(),flatten:xh(),forEach:Wl(),forIn:_g(),has:sh(),isUndefined:uh(),last:bg(),map:fh(),mapValues:mg(),max:qg(),merge:Sg(),min:Ig(),minBy:Ag(),now:Tg(),pick:kg(),range:Fg(),reduce:ch(),sortBy:Hg(),uniqueId:zg(),values:ph(),zipObject:Kg()}}catch{}return e||(e=window._),Qi=e,Qi}var es,Kd;function Wg(){if(Kd)return es;Kd=1,es=e;function e(){var t={};t._next=t._prev=t,this._sentinel=t}e.prototype.dequeue=function(){var t=this._sentinel,n=t._prev;if(n!==t)return a(n),n},e.prototype.enqueue=function(t){var n=this._sentinel;t._prev&&t._next&&a(t),t._next=n._next,n._next._prev=t,n._next=t,t._prev=n},e.prototype.toString=function(){for(var t=[],n=this._sentinel,i=n._prev;i!==n;)t.push(JSON.stringify(i,r)),i=i._prev;return"["+t.join(", ")+"]"};function a(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function r(t,n){if(t!=="_next"&&t!=="_prev")return n}return es}var rs,Wd;function $g(){if(Wd)return rs;Wd=1;var e=X(),a=oe().Graph,r=Wg();rs=n;var t=e.constant(1);function n(c,f){if(c.nodeCount()<=1)return[];var d=s(c,f||t),l=i(d.graph,d.buckets,d.zeroIdx);return e.flatten(e.map(l,function(h){return c.outEdges(h.v,h.w)}),!0)}function i(c,f,d){for(var l=[],h=f[f.length-1],m=f[0],p;c.nodeCount();){for(;p=m.dequeue();)u(c,f,d,p);for(;p=h.dequeue();)u(c,f,d,p);if(c.nodeCount()){for(var v=f.length-2;v>0;--v)if(p=f[v].dequeue(),p){l=l.concat(u(c,f,d,p,!0));break}}}return l}function u(c,f,d,l,h){var m=h?[]:void 0;return e.forEach(c.inEdges(l.v),function(p){var v=c.edge(p),b=c.node(p.v);h&&m.push({v:p.v,w:p.w}),b.out-=v,o(f,d,b)}),e.forEach(c.outEdges(l.v),function(p){var v=c.edge(p),b=p.w,g=c.node(b);g.in-=v,o(f,d,g)}),c.removeNode(l.v),m}function s(c,f){var d=new a,l=0,h=0;e.forEach(c.nodes(),function(v){d.setNode(v,{v,in:0,out:0})}),e.forEach(c.edges(),function(v){var b=d.edge(v.v,v.w)||0,g=f(v),_=b+g;d.setEdge(v.v,v.w,_),h=Math.max(h,d.node(v.v).out+=g),l=Math.max(l,d.node(v.w).in+=g)});var m=e.range(h+l+3).map(function(){return new r}),p=l+1;return e.forEach(d.nodes(),function(v){o(m,p,d.node(v))}),{graph:d,buckets:m,zeroIdx:p}}function o(c,f,d){d.out?d.in?c[d.out-d.in+f].enqueue(d):c[c.length-1].enqueue(d):c[0].enqueue(d)}return rs}var ns,$d;function Yg(){if($d)return ns;$d=1;var e=X(),a=$g();ns={run:r,undo:n};function r(i){var u=i.graph().acyclicer==="greedy"?a(i,s(i)):t(i);e.forEach(u,function(o){var c=i.edge(o);i.removeEdge(o),c.forwardName=o.name,c.reversed=!0,i.setEdge(o.w,o.v,c,e.uniqueId("rev"))});function s(o){return function(c){return o.edge(c).weight}}}function t(i){var u=[],s={},o={};function c(f){e.has(o,f)||(o[f]=!0,s[f]=!0,e.forEach(i.outEdges(f),function(d){e.has(s,d.w)?u.push(d):c(d.w)}),delete s[f])}return e.forEach(i.nodes(),c),u}function n(i){e.forEach(i.edges(),function(u){var s=i.edge(u);if(s.reversed){i.removeEdge(u);var o=s.forwardName;delete s.reversed,delete s.forwardName,i.setEdge(u.w,u.v,s,o)}})}return ns}var ts,Yd;function ne(){if(Yd)return ts;Yd=1;var e=X(),a=oe().Graph;ts={addDummyNode:r,simplify:t,asNonCompoundGraph:n,successorWeights:i,predecessorWeights:u,intersectRect:s,buildLayerMatrix:o,normalizeRanks:c,removeEmptyRanks:f,addBorderNode:d,maxRank:l,partition:h,time:m,notime:p};function r(v,b,g,_){var y;do y=e.uniqueId(_);while(v.hasNode(y));return g.dummy=b,v.setNode(y,g),y}function t(v){var b=new a().setGraph(v.graph());return e.forEach(v.nodes(),function(g){b.setNode(g,v.node(g))}),e.forEach(v.edges(),function(g){var _=b.edge(g.v,g.w)||{weight:0,minlen:1},y=v.edge(g);b.setEdge(g.v,g.w,{weight:_.weight+y.weight,minlen:Math.max(_.minlen,y.minlen)})}),b}function n(v){var b=new a({multigraph:v.isMultigraph()}).setGraph(v.graph());return e.forEach(v.nodes(),function(g){v.children(g).length||b.setNode(g,v.node(g))}),e.forEach(v.edges(),function(g){b.setEdge(g,v.edge(g))}),b}function i(v){var b=e.map(v.nodes(),function(g){var _={};return e.forEach(v.outEdges(g),function(y){_[y.w]=(_[y.w]||0)+v.edge(y).weight}),_});return e.zipObject(v.nodes(),b)}function u(v){var b=e.map(v.nodes(),function(g){var _={};return e.forEach(v.inEdges(g),function(y){_[y.v]=(_[y.v]||0)+v.edge(y).weight}),_});return e.zipObject(v.nodes(),b)}function s(v,b){var g=v.x,_=v.y,y=b.x-g,q=b.y-_,x=v.width/2,w=v.height/2;if(!y&&!q)throw new Error("Not possible to find intersection inside of the rectangle");var T,I;return Math.abs(q)*x>Math.abs(y)*w?(q<0&&(w=-w),T=w*y/q,I=w):(y<0&&(x=-x),T=x,I=x*q/y),{x:g+T,y:_+I}}function o(v){var b=e.map(e.range(l(v)+1),function(){return[]});return e.forEach(v.nodes(),function(g){var _=v.node(g),y=_.rank;e.isUndefined(y)||(b[y][_.order]=g)}),b}function c(v){var b=e.min(e.map(v.nodes(),function(g){return v.node(g).rank}));e.forEach(v.nodes(),function(g){var _=v.node(g);e.has(_,"rank")&&(_.rank-=b)})}function f(v){var b=e.min(e.map(v.nodes(),function(q){return v.node(q).rank})),g=[];e.forEach(v.nodes(),function(q){var x=v.node(q).rank-b;g[x]||(g[x]=[]),g[x].push(q)});var _=0,y=v.graph().nodeRankFactor;e.forEach(g,function(q,x){e.isUndefined(q)&&x%y!==0?--_:_&&e.forEach(q,function(w){v.node(w).rank+=_})})}function d(v,b,g,_){var y={width:0,height:0};return arguments.length>=4&&(y.rank=g,y.order=_),r(v,"border",y,b)}function l(v){return e.max(e.map(v.nodes(),function(b){var g=v.node(b).rank;if(!e.isUndefined(g))return g}))}function h(v,b){var g={lhs:[],rhs:[]};return e.forEach(v,function(_){b(_)?g.lhs.push(_):g.rhs.push(_)}),g}function m(v,b){var g=e.now();try{return b()}finally{console.log(v+" time: "+(e.now()-g)+"ms")}}function p(v,b){return b()}return ts}var as,Xd;function Xg(){if(Xd)return as;Xd=1;var e=X(),a=ne();as={run:r,undo:n};function r(i){i.graph().dummyChains=[],e.forEach(i.edges(),function(u){t(i,u)})}function t(i,u){var s=u.v,o=i.node(s).rank,c=u.w,f=i.node(c).rank,d=u.name,l=i.edge(u),h=l.labelRank;if(f!==o+1){i.removeEdge(u);var m,p,v;for(v=0,++o;o<f;++v,++o)l.points=[],p={width:0,height:0,edgeLabel:l,edgeObj:u,rank:o},m=a.addDummyNode(i,"edge",p,"_d"),o===h&&(p.width=l.width,p.height=l.height,p.dummy="edge-label",p.labelpos=l.labelpos),i.setEdge(s,m,{weight:l.weight},d),v===0&&i.graph().dummyChains.push(m),s=m;i.setEdge(s,c,{weight:l.weight},d)}}function n(i){e.forEach(i.graph().dummyChains,function(u){var s=i.node(u),o=s.edgeLabel,c;for(i.setEdge(s.edgeObj,o);s.dummy;)c=i.successors(u)[0],i.removeNode(u),o.points.push({x:s.x,y:s.y}),s.dummy==="edge-label"&&(o.x=s.x,o.y=s.y,o.width=s.width,o.height=s.height),u=c,s=i.node(u)})}return as}var is,Zd;function Ke(){if(Zd)return is;Zd=1;var e=X();is={longestPath:a,slack:r};function a(t){var n={};function i(u){var s=t.node(u);if(e.has(n,u))return s.rank;n[u]=!0;var o=e.min(e.map(t.outEdges(u),function(c){return i(c.w)-t.edge(c).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),s.rank=o}e.forEach(t.sources(),i)}function r(t,n){return t.node(n.w).rank-t.node(n.v).rank-t.edge(n).minlen}return is}var ss,Jd;function Ch(){if(Jd)return ss;Jd=1;var e=X(),a=oe().Graph,r=Ke().slack;ss=t;function t(s){var o=new a({directed:!1}),c=s.nodes()[0],f=s.nodeCount();o.setNode(c,{});for(var d,l;n(o,s)<f;)d=i(o,s),l=o.hasNode(d.v)?r(s,d):-r(s,d),u(o,s,l);return o}function n(s,o){function c(f){e.forEach(o.nodeEdges(f),function(d){var l=d.v,h=f===l?d.w:l;!s.hasNode(h)&&!r(o,d)&&(s.setNode(h,{}),s.setEdge(f,h,{}),c(h))})}return e.forEach(s.nodes(),c),s.nodeCount()}function i(s,o){return e.minBy(o.edges(),function(c){if(s.hasNode(c.v)!==s.hasNode(c.w))return r(o,c)})}function u(s,o,c){e.forEach(s.nodes(),function(f){o.node(f).rank+=c})}return ss}var us,Qd;function Zg(){if(Qd)return us;Qd=1;var e=X(),a=Ch(),r=Ke().slack,t=Ke().longestPath,n=oe().alg.preorder,i=oe().alg.postorder,u=ne().simplify;us=s,s.initLowLimValues=d,s.initCutValues=o,s.calcCutValue=f,s.leaveEdge=h,s.enterEdge=m,s.exchangeEdges=p;function s(_){_=u(_),t(_);var y=a(_);d(y),o(y,_);for(var q,x;q=h(y);)x=m(y,_,q),p(y,_,q,x)}function o(_,y){var q=i(_,_.nodes());q=q.slice(0,q.length-1),e.forEach(q,function(x){c(_,y,x)})}function c(_,y,q){var x=_.node(q),w=x.parent;_.edge(q,w).cutvalue=f(_,y,q)}function f(_,y,q){var x=_.node(q),w=x.parent,T=!0,I=y.edge(q,w),A=0;return I||(T=!1,I=y.edge(w,q)),A=I.weight,e.forEach(y.nodeEdges(q),function(O){var P=O.v===q,L=P?O.w:O.v;if(L!==w){var M=P===T,U=y.edge(O).weight;if(A+=M?U:-U,b(_,q,L)){var Y=_.edge(q,L).cutvalue;A+=M?-Y:Y}}}),A}function d(_,y){arguments.length<2&&(y=_.nodes()[0]),l(_,{},1,y)}function l(_,y,q,x,w){var T=q,I=_.node(x);return y[x]=!0,e.forEach(_.neighbors(x),function(A){e.has(y,A)||(q=l(_,y,q,A,x))}),I.low=T,I.lim=q++,w?I.parent=w:delete I.parent,q}function h(_){return e.find(_.edges(),function(y){return _.edge(y).cutvalue<0})}function m(_,y,q){var x=q.v,w=q.w;y.hasEdge(x,w)||(x=q.w,w=q.v);var T=_.node(x),I=_.node(w),A=T,O=!1;T.lim>I.lim&&(A=I,O=!0);var P=e.filter(y.edges(),function(L){return O===g(_,_.node(L.v),A)&&O!==g(_,_.node(L.w),A)});return e.minBy(P,function(L){return r(y,L)})}function p(_,y,q,x){var w=q.v,T=q.w;_.removeEdge(w,T),_.setEdge(x.v,x.w,{}),d(_),o(_,y),v(_,y)}function v(_,y){var q=e.find(_.nodes(),function(w){return!y.node(w).parent}),x=n(_,q);x=x.slice(1),e.forEach(x,function(w){var T=_.node(w).parent,I=y.edge(w,T),A=!1;I||(I=y.edge(T,w),A=!0),y.node(w).rank=y.node(T).rank+(A?I.minlen:-I.minlen)})}function b(_,y,q){return _.hasEdge(y,q)}function g(_,y,q){return q.low<=y.lim&&y.lim<=q.lim}return us}var os,el;function Jg(){if(el)return os;el=1;var e=Ke(),a=e.longestPath,r=Ch(),t=Zg();os=n;function n(o){switch(o.graph().ranker){case"network-simplex":s(o);break;case"tight-tree":u(o);break;case"longest-path":i(o);break;default:s(o)}}var i=a;function u(o){a(o),r(o)}function s(o){t(o)}return os}var fs,rl;function Qg(){if(rl)return fs;rl=1;var e=X();fs=a;function a(n){var i=t(n);e.forEach(n.graph().dummyChains,function(u){for(var s=n.node(u),o=s.edgeObj,c=r(n,i,o.v,o.w),f=c.path,d=c.lca,l=0,h=f[l],m=!0;u!==o.w;){if(s=n.node(u),m){for(;(h=f[l])!==d&&n.node(h).maxRank<s.rank;)l++;h===d&&(m=!1)}if(!m){for(;l<f.length-1&&n.node(h=f[l+1]).minRank<=s.rank;)l++;h=f[l]}n.setParent(u,h),u=n.successors(u)[0]}})}function r(n,i,u,s){var o=[],c=[],f=Math.min(i[u].low,i[s].low),d=Math.max(i[u].lim,i[s].lim),l,h;l=u;do l=n.parent(l),o.push(l);while(l&&(i[l].low>f||d>i[l].lim));for(h=l,l=s;(l=n.parent(l))!==h;)c.push(l);return{path:o.concat(c.reverse()),lca:h}}function t(n){var i={},u=0;function s(o){var c=u;e.forEach(n.children(o),s),i[o]={low:c,lim:u++}}return e.forEach(n.children(),s),i}return fs}var cs,nl;function e_(){if(nl)return cs;nl=1;var e=X(),a=ne();cs={run:r,cleanup:u};function r(s){var o=a.addDummyNode(s,"root",{},"_root"),c=n(s),f=e.max(e.values(c))-1,d=2*f+1;s.graph().nestingRoot=o,e.forEach(s.edges(),function(h){s.edge(h).minlen*=d});var l=i(s)+1;e.forEach(s.children(),function(h){t(s,o,d,l,f,c,h)}),s.graph().nodeRankFactor=d}function t(s,o,c,f,d,l,h){var m=s.children(h);if(!m.length){h!==o&&s.setEdge(o,h,{weight:0,minlen:c});return}var p=a.addBorderNode(s,"_bt"),v=a.addBorderNode(s,"_bb"),b=s.node(h);s.setParent(p,h),b.borderTop=p,s.setParent(v,h),b.borderBottom=v,e.forEach(m,function(g){t(s,o,c,f,d,l,g);var _=s.node(g),y=_.borderTop?_.borderTop:g,q=_.borderBottom?_.borderBottom:g,x=_.borderTop?f:2*f,w=y!==q?1:d-l[h]+1;s.setEdge(p,y,{weight:x,minlen:w,nestingEdge:!0}),s.setEdge(q,v,{weight:x,minlen:w,nestingEdge:!0})}),s.parent(h)||s.setEdge(o,p,{weight:0,minlen:d+l[h]})}function n(s){var o={};function c(f,d){var l=s.children(f);l&&l.length&&e.forEach(l,function(h){c(h,d+1)}),o[f]=d}return e.forEach(s.children(),function(f){c(f,1)}),o}function i(s){return e.reduce(s.edges(),function(o,c){return o+s.edge(c).weight},0)}function u(s){var o=s.graph();s.removeNode(o.nestingRoot),delete o.nestingRoot,e.forEach(s.edges(),function(c){var f=s.edge(c);f.nestingEdge&&s.removeEdge(c)})}return cs}var ds,tl;function r_(){if(tl)return ds;tl=1;var e=X(),a=ne();ds=r;function r(n){function i(u){var s=n.children(u),o=n.node(u);if(s.length&&e.forEach(s,i),e.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var c=o.minRank,f=o.maxRank+1;c<f;++c)t(n,"borderLeft","_bl",u,o,c),t(n,"borderRight","_br",u,o,c)}}e.forEach(n.children(),i)}function t(n,i,u,s,o,c){var f={width:0,height:0,rank:c,borderType:i},d=o[i][c-1],l=a.addDummyNode(n,"border",f,u);o[i][c]=l,n.setParent(l,s),d&&n.setEdge(d,l,{weight:1})}return ds}var ls,al;function n_(){if(al)return ls;al=1;var e=X();ls={adjust:a,undo:r};function a(c){var f=c.graph().rankdir.toLowerCase();(f==="lr"||f==="rl")&&t(c)}function r(c){var f=c.graph().rankdir.toLowerCase();(f==="bt"||f==="rl")&&i(c),(f==="lr"||f==="rl")&&(s(c),t(c))}function t(c){e.forEach(c.nodes(),function(f){n(c.node(f))}),e.forEach(c.edges(),function(f){n(c.edge(f))})}function n(c){var f=c.width;c.width=c.height,c.height=f}function i(c){e.forEach(c.nodes(),function(f){u(c.node(f))}),e.forEach(c.edges(),function(f){var d=c.edge(f);e.forEach(d.points,u),e.has(d,"y")&&u(d)})}function u(c){c.y=-c.y}function s(c){e.forEach(c.nodes(),function(f){o(c.node(f))}),e.forEach(c.edges(),function(f){var d=c.edge(f);e.forEach(d.points,o),e.has(d,"x")&&o(d)})}function o(c){var f=c.x;c.x=c.y,c.y=f}return ls}var hs,il;function t_(){if(il)return hs;il=1;var e=X();hs=a;function a(r){var t={},n=e.filter(r.nodes(),function(c){return!r.children(c).length}),i=e.max(e.map(n,function(c){return r.node(c).rank})),u=e.map(e.range(i+1),function(){return[]});function s(c){if(!e.has(t,c)){t[c]=!0;var f=r.node(c);u[f.rank].push(c),e.forEach(r.successors(c),s)}}var o=e.sortBy(n,function(c){return r.node(c).rank});return e.forEach(o,s),u}return hs}var vs,sl;function a_(){if(sl)return vs;sl=1;var e=X();vs=a;function a(t,n){for(var i=0,u=1;u<n.length;++u)i+=r(t,n[u-1],n[u]);return i}function r(t,n,i){for(var u=e.zipObject(i,e.map(i,function(l,h){return h})),s=e.flatten(e.map(n,function(l){return e.sortBy(e.map(t.outEdges(l),function(h){return{pos:u[h.w],weight:t.edge(h).weight}}),"pos")}),!0),o=1;o<i.length;)o<<=1;var c=2*o-1;o-=1;var f=e.map(new Array(c),function(){return 0}),d=0;return e.forEach(s.forEach(function(l){var h=l.pos+o;f[h]+=l.weight;for(var m=0;h>0;)h%2&&(m+=f[h+1]),h=h-1>>1,f[h]+=l.weight;d+=l.weight*m})),d}return vs}var ps,ul;function i_(){if(ul)return ps;ul=1;var e=X();ps=a;function a(r,t){return e.map(t,function(n){var i=r.inEdges(n);if(i.length){var u=e.reduce(i,function(s,o){var c=r.edge(o),f=r.node(o.v);return{sum:s.sum+c.weight*f.order,weight:s.weight+c.weight}},{sum:0,weight:0});return{v:n,barycenter:u.sum/u.weight,weight:u.weight}}else return{v:n}})}return ps}var gs,ol;function s_(){if(ol)return gs;ol=1;var e=X();gs=a;function a(n,i){var u={};e.forEach(n,function(o,c){var f=u[o.v]={indegree:0,in:[],out:[],vs:[o.v],i:c};e.isUndefined(o.barycenter)||(f.barycenter=o.barycenter,f.weight=o.weight)}),e.forEach(i.edges(),function(o){var c=u[o.v],f=u[o.w];!e.isUndefined(c)&&!e.isUndefined(f)&&(f.indegree++,c.out.push(u[o.w]))});var s=e.filter(u,function(o){return!o.indegree});return r(s)}function r(n){var i=[];function u(c){return function(f){f.merged||(e.isUndefined(f.barycenter)||e.isUndefined(c.barycenter)||f.barycenter>=c.barycenter)&&t(c,f)}}function s(c){return function(f){f.in.push(c),--f.indegree===0&&n.push(f)}}for(;n.length;){var o=n.pop();i.push(o),e.forEach(o.in.reverse(),u(o)),e.forEach(o.out,s(o))}return e.map(e.filter(i,function(c){return!c.merged}),function(c){return e.pick(c,["vs","i","barycenter","weight"])})}function t(n,i){var u=0,s=0;n.weight&&(u+=n.barycenter*n.weight,s+=n.weight),i.weight&&(u+=i.barycenter*i.weight,s+=i.weight),n.vs=i.vs.concat(n.vs),n.barycenter=u/s,n.weight=s,n.i=Math.min(i.i,n.i),i.merged=!0}return gs}var _s,fl;function u_(){if(fl)return _s;fl=1;var e=X(),a=ne();_s=r;function r(i,u){var s=a.partition(i,function(p){return e.has(p,"barycenter")}),o=s.lhs,c=e.sortBy(s.rhs,function(p){return-p.i}),f=[],d=0,l=0,h=0;o.sort(n(!!u)),h=t(f,c,h),e.forEach(o,function(p){h+=p.vs.length,f.push(p.vs),d+=p.barycenter*p.weight,l+=p.weight,h=t(f,c,h)});var m={vs:e.flatten(f,!0)};return l&&(m.barycenter=d/l,m.weight=l),m}function t(i,u,s){for(var o;u.length&&(o=e.last(u)).i<=s;)u.pop(),i.push(o.vs),s++;return s}function n(i){return function(u,s){return u.barycenter<s.barycenter?-1:u.barycenter>s.barycenter?1:i?s.i-u.i:u.i-s.i}}return _s}var bs,cl;function o_(){if(cl)return bs;cl=1;var e=X(),a=i_(),r=s_(),t=u_();bs=n;function n(s,o,c,f){var d=s.children(o),l=s.node(o),h=l?l.borderLeft:void 0,m=l?l.borderRight:void 0,p={};h&&(d=e.filter(d,function(q){return q!==h&&q!==m}));var v=a(s,d);e.forEach(v,function(q){if(s.children(q.v).length){var x=n(s,q.v,c,f);p[q.v]=x,e.has(x,"barycenter")&&u(q,x)}});var b=r(v,c);i(b,p);var g=t(b,f);if(h&&(g.vs=e.flatten([h,g.vs,m],!0),s.predecessors(h).length)){var _=s.node(s.predecessors(h)[0]),y=s.node(s.predecessors(m)[0]);e.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+_.order+y.order)/(g.weight+2),g.weight+=2}return g}function i(s,o){e.forEach(s,function(c){c.vs=e.flatten(c.vs.map(function(f){return o[f]?o[f].vs:f}),!0)})}function u(s,o){e.isUndefined(s.barycenter)?(s.barycenter=o.barycenter,s.weight=o.weight):(s.barycenter=(s.barycenter*s.weight+o.barycenter*o.weight)/(s.weight+o.weight),s.weight+=o.weight)}return bs}var ms,dl;function f_(){if(dl)return ms;dl=1;var e=X(),a=oe().Graph;ms=r;function r(n,i,u){var s=t(n),o=new a({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(c){return n.node(c)});return e.forEach(n.nodes(),function(c){var f=n.node(c),d=n.parent(c);(f.rank===i||f.minRank<=i&&i<=f.maxRank)&&(o.setNode(c),o.setParent(c,d||s),e.forEach(n[u](c),function(l){var h=l.v===c?l.w:l.v,m=o.edge(h,c),p=e.isUndefined(m)?0:m.weight;o.setEdge(h,c,{weight:n.edge(l).weight+p})}),e.has(f,"minRank")&&o.setNode(c,{borderLeft:f.borderLeft[i],borderRight:f.borderRight[i]}))}),o}function t(n){for(var i;n.hasNode(i=e.uniqueId("_root")););return i}return ms}var ys,ll;function c_(){if(ll)return ys;ll=1;var e=X();ys=a;function a(r,t,n){var i={},u;e.forEach(n,function(s){for(var o=r.parent(s),c,f;o;){if(c=r.parent(o),c?(f=i[c],i[c]=o):(f=u,u=o),f&&f!==o){t.setEdge(f,o);return}o=c}})}return ys}var qs,hl;function d_(){if(hl)return qs;hl=1;var e=X(),a=t_(),r=a_(),t=o_(),n=f_(),i=c_(),u=oe().Graph,s=ne();qs=o;function o(l){var h=s.maxRank(l),m=c(l,e.range(1,h+1),"inEdges"),p=c(l,e.range(h-1,-1,-1),"outEdges"),v=a(l);d(l,v);for(var b=Number.POSITIVE_INFINITY,g,_=0,y=0;y<4;++_,++y){f(_%2?m:p,_%4>=2),v=s.buildLayerMatrix(l);var q=r(l,v);q<b&&(y=0,g=e.cloneDeep(v),b=q)}d(l,g)}function c(l,h,m){return e.map(h,function(p){return n(l,p,m)})}function f(l,h){var m=new u;e.forEach(l,function(p){var v=p.graph().root,b=t(p,v,m,h);e.forEach(b.vs,function(g,_){p.node(g).order=_}),i(p,m,b.vs)})}function d(l,h){e.forEach(h,function(m){e.forEach(m,function(p,v){l.node(p).order=v})})}return qs}var xs,vl;function l_(){if(vl)return xs;vl=1;var e=X(),a=oe().Graph,r=ne();xs={positionX:m,findType1Conflicts:t,findType2Conflicts:n,addConflict:u,hasConflict:s,verticalAlignment:o,horizontalCompaction:c,alignCoordinates:l,findSmallestWidthAlignment:d,balance:h};function t(b,g){var _={};function y(q,x){var w=0,T=0,I=q.length,A=e.last(x);return e.forEach(x,function(O,P){var L=i(b,O),M=L?b.node(L).order:I;(L||O===A)&&(e.forEach(x.slice(T,P+1),function(U){e.forEach(b.predecessors(U),function(Y){var ee=b.node(Y),se=ee.order;(se<w||M<se)&&!(ee.dummy&&b.node(U).dummy)&&u(_,Y,U)})}),T=P+1,w=M)}),x}return e.reduce(g,y),_}function n(b,g){var _={};function y(x,w,T,I,A){var O;e.forEach(e.range(w,T),function(P){O=x[P],b.node(O).dummy&&e.forEach(b.predecessors(O),function(L){var M=b.node(L);M.dummy&&(M.order<I||M.order>A)&&u(_,L,O)})})}function q(x,w){var T=-1,I,A=0;return e.forEach(w,function(O,P){if(b.node(O).dummy==="border"){var L=b.predecessors(O);L.length&&(I=b.node(L[0]).order,y(w,A,P,T,I),A=P,T=I)}y(w,A,w.length,I,x.length)}),w}return e.reduce(g,q),_}function i(b,g){if(b.node(g).dummy)return e.find(b.predecessors(g),function(_){return b.node(_).dummy})}function u(b,g,_){if(g>_){var y=g;g=_,_=y}var q=b[g];q||(b[g]=q={}),q[_]=!0}function s(b,g,_){if(g>_){var y=g;g=_,_=y}return e.has(b[g],_)}function o(b,g,_,y){var q={},x={},w={};return e.forEach(g,function(T){e.forEach(T,function(I,A){q[I]=I,x[I]=I,w[I]=A})}),e.forEach(g,function(T){var I=-1;e.forEach(T,function(A){var O=y(A);if(O.length){O=e.sortBy(O,function(Y){return w[Y]});for(var P=(O.length-1)/2,L=Math.floor(P),M=Math.ceil(P);L<=M;++L){var U=O[L];x[A]===A&&I<w[U]&&!s(_,A,U)&&(x[U]=A,x[A]=q[A]=q[U],I=w[U])}}})}),{root:q,align:x}}function c(b,g,_,y,q){var x={},w=f(b,g,_,q),T=q?"borderLeft":"borderRight";function I(P,L){for(var M=w.nodes(),U=M.pop(),Y={};U;)Y[U]?P(U):(Y[U]=!0,M.push(U),M=M.concat(L(U))),U=M.pop()}function A(P){x[P]=w.inEdges(P).reduce(function(L,M){return Math.max(L,x[M.v]+w.edge(M))},0)}function O(P){var L=w.outEdges(P).reduce(function(U,Y){return Math.min(U,x[Y.w]-w.edge(Y))},Number.POSITIVE_INFINITY),M=b.node(P);L!==Number.POSITIVE_INFINITY&&M.borderType!==T&&(x[P]=Math.max(x[P],L))}return I(A,w.predecessors.bind(w)),I(O,w.successors.bind(w)),e.forEach(y,function(P){x[P]=x[_[P]]}),x}function f(b,g,_,y){var q=new a,x=b.graph(),w=p(x.nodesep,x.edgesep,y);return e.forEach(g,function(T){var I;e.forEach(T,function(A){var O=_[A];if(q.setNode(O),I){var P=_[I],L=q.edge(P,O);q.setEdge(P,O,Math.max(w(b,A,I),L||0))}I=A})}),q}function d(b,g){return e.minBy(e.values(g),function(_){var y=Number.NEGATIVE_INFINITY,q=Number.POSITIVE_INFINITY;return e.forIn(_,function(x,w){var T=v(b,w)/2;y=Math.max(x+T,y),q=Math.min(x-T,q)}),y-q})}function l(b,g){var _=e.values(g),y=e.min(_),q=e.max(_);e.forEach(["u","d"],function(x){e.forEach(["l","r"],function(w){var T=x+w,I=b[T],A;if(I!==g){var O=e.values(I);A=w==="l"?y-e.min(O):q-e.max(O),A&&(b[T]=e.mapValues(I,function(P){return P+A}))}})})}function h(b,g){return e.mapValues(b.ul,function(_,y){if(g)return b[g.toLowerCase()][y];var q=e.sortBy(e.map(b,y));return(q[1]+q[2])/2})}function m(b){var g=r.buildLayerMatrix(b),_=e.merge(t(b,g),n(b,g)),y={},q;e.forEach(["u","d"],function(w){q=w==="u"?g:e.values(g).reverse(),e.forEach(["l","r"],function(T){T==="r"&&(q=e.map(q,function(P){return e.values(P).reverse()}));var I=(w==="u"?b.predecessors:b.successors).bind(b),A=o(b,q,_,I),O=c(b,q,A.root,A.align,T==="r");T==="r"&&(O=e.mapValues(O,function(P){return-P})),y[w+T]=O})});var x=d(b,y);return l(y,x),h(y,b.graph().align)}function p(b,g,_){return function(y,q,x){var w=y.node(q),T=y.node(x),I=0,A;if(I+=w.width/2,e.has(w,"labelpos"))switch(w.labelpos.toLowerCase()){case"l":A=-w.width/2;break;case"r":A=w.width/2;break}if(A&&(I+=_?A:-A),A=0,I+=(w.dummy?g:b)/2,I+=(T.dummy?g:b)/2,I+=T.width/2,e.has(T,"labelpos"))switch(T.labelpos.toLowerCase()){case"l":A=T.width/2;break;case"r":A=-T.width/2;break}return A&&(I+=_?A:-A),A=0,I}}function v(b,g){return b.node(g).width}return xs}var ws,pl;function h_(){if(pl)return ws;pl=1;var e=X(),a=ne(),r=l_().positionX;ws=t;function t(i){i=a.asNonCompoundGraph(i),n(i),e.forEach(r(i),function(u,s){i.node(s).x=u})}function n(i){var u=a.buildLayerMatrix(i),s=i.graph().ranksep,o=0;e.forEach(u,function(c){var f=e.max(e.map(c,function(d){return i.node(d).height}));e.forEach(c,function(d){i.node(d).y=o+f/2}),o+=f+s})}return ws}var Rs,gl;function v_(){if(gl)return Rs;gl=1;var e=X(),a=Yg(),r=Xg(),t=Jg(),n=ne().normalizeRanks,i=Qg(),u=ne().removeEmptyRanks,s=e_(),o=r_(),c=n_(),f=d_(),d=h_(),l=ne(),h=oe().Graph;Rs=m;function m(R,S){var E=S&&S.debugTiming?l.time:l.notime;E("layout",function(){var j=E(" buildLayoutGraph",function(){return I(R)});E(" runLayout",function(){p(j,E)}),E(" updateInputGraph",function(){v(R,j)})})}function p(R,S){S(" makeSpaceForEdgeLabels",function(){A(R)}),S(" removeSelfEdges",function(){ve(R)}),S(" acyclic",function(){a.run(R)}),S(" nestingGraph.run",function(){s.run(R)}),S(" rank",function(){t(l.asNonCompoundGraph(R))}),S(" injectEdgeLabelProxies",function(){O(R)}),S(" removeEmptyRanks",function(){u(R)}),S(" nestingGraph.cleanup",function(){s.cleanup(R)}),S(" normalizeRanks",function(){n(R)}),S(" assignRankMinMax",function(){P(R)}),S(" removeEdgeLabelProxies",function(){L(R)}),S(" normalize.run",function(){r.run(R)}),S(" parentDummyChains",function(){i(R)}),S(" addBorderSegments",function(){o(R)}),S(" order",function(){f(R)}),S(" insertSelfEdges",function(){ce(R)}),S(" adjustCoordinateSystem",function(){c.adjust(R)}),S(" position",function(){d(R)}),S(" positionSelfEdges",function(){_e(R)}),S(" removeBorderNodes",function(){se(R)}),S(" normalize.undo",function(){r.undo(R)}),S(" fixupEdgeLabelCoords",function(){Y(R)}),S(" undoCoordinateSystem",function(){c.undo(R)}),S(" translateGraph",function(){M(R)}),S(" assignNodeIntersects",function(){U(R)}),S(" reversePoints",function(){ee(R)}),S(" acyclic.undo",function(){a.undo(R)})}function v(R,S){e.forEach(R.nodes(),function(E){var j=R.node(E),G=S.node(E);j&&(j.x=G.x,j.y=G.y,S.children(E).length&&(j.width=G.width,j.height=G.height))}),e.forEach(R.edges(),function(E){var j=R.edge(E),G=S.edge(E);j.points=G.points,e.has(G,"x")&&(j.x=G.x,j.y=G.y)}),R.graph().width=S.graph().width,R.graph().height=S.graph().height}var b=["nodesep","edgesep","ranksep","marginx","marginy"],g={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],y=["width","height"],q={width:0,height:0},x=["minlen","weight","width","height","labeloffset"],w={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},T=["labelpos"];function I(R){var S=new h({multigraph:!0,compound:!0}),E=de(R.graph());return S.setGraph(e.merge({},g,te(E,b),e.pick(E,_))),e.forEach(R.nodes(),function(j){var G=de(R.node(j));S.setNode(j,e.defaults(te(G,y),q)),S.setParent(j,R.parent(j))}),e.forEach(R.edges(),function(j){var G=de(R.edge(j));S.setEdge(j,e.merge({},w,te(G,x),e.pick(G,T)))}),S}function A(R){var S=R.graph();S.ranksep/=2,e.forEach(R.edges(),function(E){var j=R.edge(E);j.minlen*=2,j.labelpos.toLowerCase()!=="c"&&(S.rankdir==="TB"||S.rankdir==="BT"?j.width+=j.labeloffset:j.height+=j.labeloffset)})}function O(R){e.forEach(R.edges(),function(S){var E=R.edge(S);if(E.width&&E.height){var j=R.node(S.v),G=R.node(S.w),K={rank:(G.rank-j.rank)/2+j.rank,e:S};l.addDummyNode(R,"edge-proxy",K,"_ep")}})}function P(R){var S=0;e.forEach(R.nodes(),function(E){var j=R.node(E);j.borderTop&&(j.minRank=R.node(j.borderTop).rank,j.maxRank=R.node(j.borderBottom).rank,S=e.max(S,j.maxRank))}),R.graph().maxRank=S}function L(R){e.forEach(R.nodes(),function(S){var E=R.node(S);E.dummy==="edge-proxy"&&(R.edge(E.e).labelRank=E.rank,R.removeNode(S))})}function M(R){var S=Number.POSITIVE_INFINITY,E=0,j=Number.POSITIVE_INFINITY,G=0,K=R.graph(),W=K.marginx||0,F=K.marginy||0;function B(z){var H=z.x,k=z.y,Z=z.width,D=z.height;S=Math.min(S,H-Z/2),E=Math.max(E,H+Z/2),j=Math.min(j,k-D/2),G=Math.max(G,k+D/2)}e.forEach(R.nodes(),function(z){B(R.node(z))}),e.forEach(R.edges(),function(z){var H=R.edge(z);e.has(H,"x")&&B(H)}),S-=W,j-=F,e.forEach(R.nodes(),function(z){var H=R.node(z);H.x-=S,H.y-=j}),e.forEach(R.edges(),function(z){var H=R.edge(z);e.forEach(H.points,function(k){k.x-=S,k.y-=j}),e.has(H,"x")&&(H.x-=S),e.has(H,"y")&&(H.y-=j)}),K.width=E-S+W,K.height=G-j+F}function U(R){e.forEach(R.edges(),function(S){var E=R.edge(S),j=R.node(S.v),G=R.node(S.w),K,W;E.points?(K=E.points[0],W=E.points[E.points.length-1]):(E.points=[],K=G,W=j),E.points.unshift(l.intersectRect(j,K)),E.points.push(l.intersectRect(G,W))})}function Y(R){e.forEach(R.edges(),function(S){var E=R.edge(S);if(e.has(E,"x"))switch((E.labelpos==="l"||E.labelpos==="r")&&(E.width-=E.labeloffset),E.labelpos){case"l":E.x-=E.width/2+E.labeloffset;break;case"r":E.x+=E.width/2+E.labeloffset;break}})}function ee(R){e.forEach(R.edges(),function(S){var E=R.edge(S);E.reversed&&E.points.reverse()})}function se(R){e.forEach(R.nodes(),function(S){if(R.children(S).length){var E=R.node(S),j=R.node(E.borderTop),G=R.node(E.borderBottom),K=R.node(e.last(E.borderLeft)),W=R.node(e.last(E.borderRight));E.width=Math.abs(W.x-K.x),E.height=Math.abs(G.y-j.y),E.x=K.x+E.width/2,E.y=j.y+E.height/2}}),e.forEach(R.nodes(),function(S){R.node(S).dummy==="border"&&R.removeNode(S)})}function ve(R){e.forEach(R.edges(),function(S){if(S.v===S.w){var E=R.node(S.v);E.selfEdges||(E.selfEdges=[]),E.selfEdges.push({e:S,label:R.edge(S)}),R.removeEdge(S)}})}function ce(R){var S=l.buildLayerMatrix(R);e.forEach(S,function(E){var j=0;e.forEach(E,function(G,K){var W=R.node(G);W.order=K+j,e.forEach(W.selfEdges,function(F){l.addDummyNode(R,"selfedge",{width:F.label.width,height:F.label.height,rank:W.rank,order:K+ ++j,e:F.e,label:F.label},"_se")}),delete W.selfEdges})})}function _e(R){e.forEach(R.nodes(),function(S){var E=R.node(S);if(E.dummy==="selfedge"){var j=R.node(E.e.v),G=j.x+j.width/2,K=j.y,W=E.x-G,F=j.height/2;R.setEdge(E.e,E.label),R.removeNode(S),E.label.points=[{x:G+2*W/3,y:K-F},{x:G+5*W/6,y:K-F},{x:G+W,y:K},{x:G+5*W/6,y:K+F},{x:G+2*W/3,y:K+F}],E.label.x=E.x,E.label.y=E.y}})}function te(R,S){return e.mapValues(e.pick(R,S),Number)}function de(R){var S={};return e.forEach(R,function(E,j){S[j.toLowerCase()]=E}),S}return Rs}var Es,_l;function p_(){if(_l)return Es;_l=1;var e=X(),a=ne(),r=oe().Graph;Es={debugOrdering:t};function t(n){var i=a.buildLayerMatrix(n),u=new r({compound:!0,multigraph:!0}).setGraph({});return e.forEach(n.nodes(),function(s){u.setNode(s,{label:s}),u.setParent(s,"layer"+n.node(s).rank)}),e.forEach(n.edges(),function(s){u.setEdge(s.v,s.w,{},s.name)}),e.forEach(i,function(s,o){var c="layer"+o;u.setNode(c,{rank:"same"}),e.reduce(s,function(f,d){return u.setEdge(f,d,{style:"invis"}),d})}),u}return Es}var Cs,bl;function g_(){return bl||(bl=1,Cs="0.8.5"),Cs}var Ss,ml;function __(){return ml||(ml=1,Ss={graphlib:oe(),layout:v_(),debug:p_(),util:{time:ne().time,notime:ne().notime},version:g_()}),Ss}var b_=__();const yl=Ih(b_),m_={pending:"#D4B896",running:"#2196F3",completed:"#4CAF50",failed:"#E53935",stopped:"#FF9800",merged:"#9C27B0"},y_={pending:"",running:"ring-2 ring-status-running/50 animate-pulse",completed:"",failed:"ring-1 ring-status-error/30",stopped:"",merged:""};function q_({data:e}){const a=e,{todo:r,allTodos:t,selected:n,onStart:i,onStop:u,onDelete:s,onMerge:o,onCleanup:c,onRetry:f,onSelect:d}=a,{t:l}=As(),h=r.status==="pending"||r.status==="failed"||r.status==="stopped",m=r.status==="running",p=r.status==="completed",v=r.status!=="running"&&r.status!=="pending"&&(r.worktree_path||r.branch_name),b=r.status==="completed"||r.status==="failed"||r.status==="stopped",g=r.depends_on?t.find(q=>q.id===r.depends_on):null,_=!!g&&g.status!=="completed",y=m_[r.status];return C.jsxs("div",{className:`bg-theme-card rounded-xl shadow-card min-w-[240px] max-w-[280px] overflow-hidden transition-all duration-300 ${y_[r.status]} ${n?"ring-2 ring-accent shadow-elevated -translate-y-1":"hover:shadow-elevated hover:-translate-y-0.5"}`,style:{borderLeft:`4px solid ${y}`,position:"relative"},children:[C.jsx("div",{className:"absolute top-0 left-0 right-0 h-px bg-white/10 z-10 pointer-events-none"}),C.jsx(Xs,{type:"target",position:Zs.Top,className:"!w-3 !h-3 !bg-cyan-500 !border-2 !border-white !-top-1.5"}),C.jsxs("div",{className:"px-3 py-2.5 cursor-pointer hover:bg-warm-50 transition-colors",onClick:()=>d(r.id),children:[C.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[C.jsxs("span",{className:"text-2xs font-mono text-warm-400",children:["#",r.priority]}),C.jsx("span",{className:"flex-1 text-xs text-warm-800 font-medium truncate",title:r.title,children:r.title}),C.jsx(El,{status:r.status})]}),C.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[r.cli_tool&&C.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-mono font-medium bg-status-merged/10 text-status-merged",children:Cl(r.cli_tool||"claude").label}),g&&C.jsxs("span",{className:"inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[9px] font-mono bg-cyan-500/10 text-cyan-600",children:[C.jsx(Ah,{size:10}),g.title.length>15?g.title.slice(0,15)+"...":g.title]})]})]}),C.jsxs("div",{className:"flex items-center justify-end gap-0 px-2 py-1.5 border-t border-warm-100 bg-warm-50/50",children:[h&&C.jsx("button",{onClick:q=>{q.stopPropagation(),i(r.id,"headless")},className:"p-1 text-status-success/60 hover:text-status-success hover:bg-status-success/10 rounded transition-colors",title:l(_?"todo.startWithDependency":"todo.startHeadless"),children:C.jsx(Th,{size:12})}),m&&C.jsx("button",{onClick:q=>{q.stopPropagation(),u(r.id)},className:"p-1 text-status-error/60 hover:text-status-error hover:bg-status-error/10 rounded transition-colors",title:l("todo.stop"),children:C.jsx(Oh,{size:12})}),p&&C.jsx("button",{onClick:q=>{q.stopPropagation(),o(r.id)},className:"p-1 text-status-merged/60 hover:text-status-merged hover:bg-status-merged/10 rounded transition-colors",title:l("todo.merge"),children:C.jsx(Nh,{size:12})}),v&&C.jsx("button",{onClick:q=>{q.stopPropagation(),c(r.id)},className:"p-1 text-orange-500/60 hover:text-orange-500 hover:bg-orange-500/10 rounded transition-colors",title:l("todo.cleanup"),children:C.jsx(jh,{size:12})}),b&&C.jsx("button",{onClick:q=>{q.stopPropagation(),f(r.id,"headless")},className:"p-1 text-cyan-500/60 hover:text-cyan-500 hover:bg-cyan-500/10 rounded transition-colors",title:l("todo.retry"),children:C.jsx(Ph,{size:12})}),C.jsx("button",{onClick:q=>{q.stopPropagation(),s(r.id)},className:"p-1 text-warm-400 hover:text-status-error hover:bg-status-error/10 rounded transition-colors",title:l("todo.delete"),children:C.jsx(kh,{size:12})})]}),C.jsx(Xs,{type:"source",position:Zs.Bottom,className:"!w-3 !h-3 !bg-accent !border-2 !border-white !-bottom-1.5"})]})}const x_=V.memo(q_);function w_({todo:e,allTodos:a,projectIsGitRepo:r,projectUseWorktree:t,onClose:n,onEdit:i,onStart:u,onStop:s,onMerge:o,onCleanup:c,onRetry:f,onContinue:d,onFix:l,onEvent:h,isInteractive:m,onSendInput:p,debugLogging:v,showTokenUsage:b}){const[g,_]=V.useState([]),[y,q]=V.useState(!1),[x,w]=V.useState(!1),[T,I]=V.useState(!1),[A,O]=V.useState(null),[P,L]=V.useState(!1),[M,U]=V.useState(null),[Y,ee]=V.useState(!1),[se,ve]=V.useState(!1),[ce,_e]=V.useState(""),[te,de]=V.useState(!1),[R,S]=V.useState(null),{t:E}=As(),j=e.status==="pending"||e.status==="failed"||e.status==="stopped",G=e.status==="running",K=e.status==="completed"||e.status==="stopped"||e.status==="merged",W=e.status==="completed",F=e.status==="completed"||e.status==="failed"||e.status==="stopped",B=!!d&&e.status==="completed"&&!!e.worktree_path,z=e.status!=="running"&&e.status!=="pending"&&(e.worktree_path||e.branch_name),H=e.status==="completed"||e.status==="failed"||e.status==="stopped"||e.status==="merged",k=e.images?JSON.parse(e.images):[],Z=e.depends_on?a.find(N=>N.id===e.depends_on):null,D=!!Z&&Z.status!=="completed",re=a.find(N=>N.depends_on===e.id&&N.merged_from_branch);V.useEffect(()=>{_([]),q(!1),U(null),ee(!1),O(null),I(!1),Lh(e.id).then(N=>{_(N),q(!0)}).catch(()=>{q(!0)})},[e.id]),V.useEffect(()=>{H&&!Y&&Mh(e.id).then(N=>{U(N),ee(!0)}).catch(()=>{ee(!0)})},[H,Y,e.id]),V.useEffect(()=>h(N=>{if(N.type==="todo:log"&&N.todoId===e.id&&N.message){const $={id:`ws-${Date.now()}-${Math.random()}`,todo_id:e.id,log_type:N.logType||"output",message:N.message,created_at:new Date().toISOString()};_(Q=>[...Q,$])}if(N.type==="todo:commit"&&N.todoId===e.id&&N.message){const $={id:`ws-commit-${Date.now()}-${Math.random()}`,todo_id:e.id,log_type:"commit",message:`${N.commitHash?`[${N.commitHash}] `:""}${N.message}`,created_at:new Date().toISOString()};_(Q=>[...Q,$])}}),[h,e.id]);const le=async()=>{if(T){I(!1);return}L(!0);try{const N=await Hh(e.id);O(N),I(!0)}catch{}finally{L(!1)}},Pe=async()=>{try{const{files:N}=await zh(e.project_id,e.id);N.length>0&&window.open(`/api/projects/${e.project_id}/debug-logs/${encodeURIComponent(N[0].name)}`,"_blank")}catch{}},Ie=N=>{if(N<60)return`${N}s`;const $=Math.floor(N/60),Q=N%60;if($<60)return Q>0?`${$}m ${Q}s`:`${$}m`;const be=Math.floor($/60),xe=$%60;return xe>0?`${be}h ${xe}m`:`${be}h`},ue=N=>N>=1e6?`${(N/1e6).toFixed(1)}M`:N>=1e3?`${(N/1e3).toFixed(1)}k`:String(N);return x?C.jsx("div",{className:"w-[380px] border-l border-warm-200 bg-theme-card overflow-y-auto p-4",children:C.jsx(Sl,{initialTitle:e.title,initialDescription:e.description??void 0,initialCliTool:e.cli_tool??void 0,initialDependsOn:e.depends_on??void 0,initialMaxTurns:e.max_turns??void 0,initialUseWorktree:e.use_worktree??null,projectIsGitRepo:r,projectUseWorktree:t,existingImages:k,todoId:e.id,availableTodos:a.filter(N=>N.id!==e.id),onDeleteImage:async N=>{await Dh(e.id,N)},onSave:async(N,$,Q,be,xe,me,ze)=>{await i(e.id,N,$,Q,xe,me,ze),be&&be.length>0&&await Fh(e.id,be.map(ke=>({name:ke.name,data:ke.data}))),w(!1)},onCancel:()=>w(!1)})}):C.jsxs("div",{className:"w-[380px] border-l border-warm-200 bg-theme-card overflow-y-auto animate-slide-up",children:[C.jsxs("div",{className:"sticky top-0 bg-theme-card border-b border-warm-200 px-4 py-3 flex items-center gap-2 z-10",children:[C.jsx(El,{status:e.status}),C.jsx("span",{className:"flex-1 text-sm font-medium text-warm-800 truncate",children:e.title}),C.jsx("button",{onClick:()=>w(!0),className:"p-1.5 text-warm-400 hover:text-accent hover:bg-accent/10 rounded-lg transition-colors",title:E("todo.edit"),children:C.jsx(Gh,{size:14})}),C.jsx("button",{onClick:n,className:"p-1.5 text-warm-400 hover:text-warm-600 hover:bg-warm-100 rounded-lg transition-colors",children:C.jsx(Bh,{size:16})})]}),C.jsxs("div",{className:"px-4 py-4 space-y-4",children:[C.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[j&&C.jsx(C.Fragment,{children:C.jsx("button",{onClick:()=>u(e.id,"headless"),className:"btn-ghost text-xs py-1.5 text-status-success",title:E(D?"todo.startWithDependency":"todo.startHeadless"),children:E("todo.startHeadless")})}),G&&C.jsx("button",{onClick:()=>s(e.id),className:"btn-ghost text-xs py-1.5 text-status-error",children:E("todo.stop")}),K&&C.jsx("button",{onClick:le,disabled:P,className:"btn-ghost text-xs py-1.5 text-status-info disabled:opacity-30",children:E("todo.viewDiff")}),v&&H&&C.jsx("button",{onClick:Pe,className:"btn-ghost text-xs py-1.5",children:E("todo.viewDebugLog")}),W&&C.jsx("button",{onClick:()=>o(e.id),className:"btn-ghost text-xs py-1.5 text-status-merged",children:E("todo.merge")}),z&&C.jsx("button",{onClick:()=>c(e.id),className:"btn-ghost text-xs py-1.5 text-orange-500",children:E("todo.cleanup")}),B&&C.jsx("button",{onClick:()=>{ve(N=>!N),S(null)},disabled:te,className:"btn-ghost text-xs py-1.5 text-emerald-500",children:E("todo.continue")}),F&&C.jsx("button",{onClick:()=>f(e.id,"headless"),className:"btn-ghost text-xs py-1.5 text-cyan-500",children:E("todo.retry")})]}),se&&d&&C.jsxs("div",{className:"border border-emerald-200 rounded-lg px-3 py-2 bg-emerald-50/50 space-y-2",children:[C.jsxs("label",{className:"text-xs font-medium text-emerald-600",children:[E("todo.continuePromptLabel"),(e.round_count??1)>1&&C.jsxs("span",{className:"ml-2 text-emerald-500/70",children:["(",E("todo.roundLabel")," ",e.round_count,")"]})]}),C.jsx("textarea",{value:ce,onChange:N=>_e(N.target.value),placeholder:E("todo.continuePromptPlaceholder"),rows:3,disabled:te,className:"w-full bg-theme-card border border-emerald-200 rounded-lg px-2 py-1.5 text-xs text-warm-800 focus:border-emerald-400 focus:outline-none focus:ring-2 focus:ring-emerald-400/20 resize-y"}),R&&C.jsx("p",{className:"text-xs text-status-error",children:R}),C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx("button",{onClick:async()=>{const N=ce.trim();if(!N){S(E("todo.continuePromptRequired"));return}de(!0),S(null);try{await d(e.id,N,"headless"),ve(!1),_e("")}catch($){S($ instanceof Error?$.message:"Continue failed")}finally{de(!1)}},disabled:te||!ce.trim(),className:"btn-primary text-xs py-1.5 !bg-emerald-500 hover:!bg-emerald-600 disabled:opacity-30",children:E(te?"todo.continuing":"todo.confirmContinue")}),C.jsx("button",{onClick:()=>{ve(!1),S(null)},disabled:te,className:"btn-ghost text-xs py-1.5",children:E("scheduleForm.cancel")})]})]}),C.jsxs("div",{children:[C.jsx("h4",{className:"text-xs font-semibold text-warm-500 uppercase tracking-wider mb-1",children:E("todo.description")}),C.jsx("p",{className:"text-xs text-warm-600 whitespace-pre-wrap leading-relaxed",children:e.description||E("todo.noDescription")})]}),k.length>0&&C.jsxs("div",{children:[C.jsxs("h4",{className:"text-xs font-semibold text-warm-500 uppercase tracking-wider mb-1",children:[E("todo.attachedImages")," (",k.length,")"]}),C.jsx("div",{className:"flex flex-wrap gap-2",children:k.map(N=>C.jsx("a",{href:Ys(e.id,N.id),target:"_blank",rel:"noopener noreferrer",children:C.jsx("img",{src:Ys(e.id,N.id),alt:N.originalName,className:"h-16 w-16 object-cover rounded-lg border border-warm-200 hover:border-accent transition-colors"})},N.id))})]}),C.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[C.jsxs("span",{className:"text-2xs font-mono text-warm-400 badge bg-warm-100",children:["#",e.priority]}),e.cli_tool&&C.jsx("span",{className:"badge text-2xs font-mono bg-warm-200/60 text-warm-600",children:Cl(e.cli_tool||"claude").label}),Z&&C.jsxs("span",{className:"badge text-2xs font-mono bg-warm-200/60 text-warm-600",children:[E("todo.dependsOn"),": ",Z.title.length>20?Z.title.slice(0,20)+"...":Z.title]})]}),e.branch_name&&C.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[C.jsxs("span",{className:"badge text-2xs bg-warm-200/60 text-warm-600",children:[E("todo.branch"),": ",e.branch_name]}),e.merged_from_branch&&C.jsxs("span",{className:"badge text-2xs bg-warm-200/60 text-warm-600",children:[E("todo.mergedFrom"),": ",e.merged_from_branch]}),!e.worktree_path&&re&&C.jsxs("span",{className:"badge text-2xs bg-amber-500/10 text-amber-600",children:[E("todo.transferredTo"),": ",re.title.length>20?re.title.slice(0,20)+"...":re.title]})]}),e.status==="failed"&&g.length>0&&(()=>{const N=g.filter($=>$.log_type==="error");return N.length===0?null:C.jsxs("div",{className:"rounded-lg border border-status-error/30 bg-status-error/5 overflow-hidden",children:[C.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-status-error/10 border-b border-status-error/20",children:[C.jsx("h4",{className:"text-2xs font-semibold text-status-error uppercase tracking-wider",children:E("failure.title")}),l&&C.jsx("button",{onClick:()=>l(e,N),className:"text-2xs font-medium text-amber-500 hover:text-amber-600",children:E("failure.fix")})]}),C.jsx("div",{className:"px-3 py-2 space-y-1 max-h-32 overflow-y-auto",children:N.map($=>C.jsx("div",{className:"text-2xs font-mono text-status-error whitespace-pre-wrap break-all",children:$.message},$.id))})]})})(),H&&M&&C.jsxs("div",{className:"space-y-2",children:[C.jsxs("div",{className:"flex flex-wrap gap-2",children:[M.duration_seconds!==null&&C.jsx("span",{className:"text-2xs font-mono badge bg-warm-100 text-warm-600",children:Ie(M.duration_seconds)}),M.commits.length>0&&C.jsxs("span",{className:"text-2xs font-mono badge bg-status-success/10 text-status-success",children:[M.commits.length," commits"]}),M.diff_stats.files_changed>0&&C.jsxs("span",{className:"text-2xs font-mono badge bg-status-info/10 text-status-info",children:[M.diff_stats.files_changed," files",C.jsxs("span",{className:"text-status-success ml-1",children:["+",M.diff_stats.insertions]}),C.jsxs("span",{className:"text-status-error ml-1",children:["-",M.diff_stats.deletions]})]}),b&&M.token_usage&&M.token_usage.input_tokens!==null&&C.jsxs("span",{className:"text-2xs font-mono badge bg-warm-200/60 text-warm-600",children:[ue(M.token_usage.input_tokens)," in / ",ue(M.token_usage.output_tokens??0)," out"]})]}),M.commits.length>0&&C.jsxs("div",{children:[C.jsx("h4",{className:"text-2xs font-semibold text-warm-500 uppercase tracking-wider mb-1",children:E("result.commitHistory")}),C.jsx("div",{className:"space-y-0.5",children:M.commits.map((N,$)=>C.jsxs("div",{className:"flex items-start gap-1.5 text-2xs",children:[C.jsx("span",{className:"font-mono text-status-info flex-shrink-0",children:N.hash.slice(0,7)}),C.jsx("span",{className:"text-warm-700 truncate",children:N.message})]},$))})]})]}),T&&A&&C.jsxs("div",{children:[C.jsxs("div",{className:"flex items-center justify-between mb-1",children:[C.jsx("h4",{className:"text-2xs font-semibold text-warm-500 uppercase tracking-wider",children:E("todo.diffOutput")}),C.jsxs("div",{className:"flex gap-2 text-2xs",children:[C.jsxs("span",{className:"text-status-success",children:["+",A.stats.insertions]}),C.jsxs("span",{className:"text-status-error",children:["-",A.stats.deletions]})]})]}),C.jsx("pre",{className:"h-48 overflow-auto bg-warm-800 rounded-lg p-3 font-mono text-2xs leading-relaxed",children:A.diff?A.diff.split(`
1
+ import{_ as Ve,a as Ih,r as V,u as As,j as C,$ as El,a0 as Cl,a1 as Ah,a2 as Th,a3 as Oh,a4 as Nh,a5 as jh,a6 as Ph,K as kh,a7 as Lh,a8 as Mh,a9 as Sl,aa as Fh,ab as Dh,P as Gh,X as Bh,ac as Ys,ad as Uh,ae as Hh,af as zh,H as Vh,ag as Kh,ah as Wh,ai as $h}from"./index-BP4pA6cj.js";import{H as Xs,P as Zs,M as Yh,u as Xh,a as Zh,i as Jh,B as Qh,b as ev,C as rv,c as nv}from"./style-DqHsVzBF.js";import"./value-BTdN53H7.js";import"./with-selector-WPfa-zKC.js";function Ts(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 cr,Js;function tv(){if(Js)return cr;Js=1;function e(){this.__data__=[],this.size=0}return cr=e,cr}var dr,Qs;function Ae(){if(Qs)return dr;Qs=1;function e(a,r){return a===r||a!==a&&r!==r}return dr=e,dr}var lr,eu;function We(){if(eu)return lr;eu=1;var e=Ae();function a(r,t){for(var n=r.length;n--;)if(e(r[n][0],t))return n;return-1}return lr=a,lr}var hr,ru;function av(){if(ru)return hr;ru=1;var e=We(),a=Array.prototype,r=a.splice;function t(n){var i=this.__data__,u=e(i,n);if(u<0)return!1;var s=i.length-1;return u==s?i.pop():r.call(i,u,1),--this.size,!0}return hr=t,hr}var vr,nu;function iv(){if(nu)return vr;nu=1;var e=We();function a(r){var t=this.__data__,n=e(t,r);return n<0?void 0:t[n][1]}return vr=a,vr}var pr,tu;function sv(){if(tu)return pr;tu=1;var e=We();function a(r){return e(this.__data__,r)>-1}return pr=a,pr}var gr,au;function uv(){if(au)return gr;au=1;var e=We();function a(r,t){var n=this.__data__,i=e(n,r);return i<0?(++this.size,n.push([r,t])):n[i][1]=t,this}return gr=a,gr}var _r,iu;function $e(){if(iu)return _r;iu=1;var e=tv(),a=av(),r=iv(),t=sv(),n=uv();function i(u){var s=-1,o=u==null?0:u.length;for(this.clear();++s<o;){var c=u[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=a,i.prototype.get=r,i.prototype.has=t,i.prototype.set=n,_r=i,_r}var br,su;function ov(){if(su)return br;su=1;var e=$e();function a(){this.__data__=new e,this.size=0}return br=a,br}var mr,uu;function fv(){if(uu)return mr;uu=1;function e(a){var r=this.__data__,t=r.delete(a);return this.size=r.size,t}return mr=e,mr}var yr,ou;function cv(){if(ou)return yr;ou=1;function e(a){return this.__data__.get(a)}return yr=e,yr}var qr,fu;function dv(){if(fu)return qr;fu=1;function e(a){return this.__data__.has(a)}return qr=e,qr}var xr,cu;function Il(){if(cu)return xr;cu=1;var e=typeof Ve=="object"&&Ve&&Ve.Object===Object&&Ve;return xr=e,xr}var wr,du;function fe(){if(du)return wr;du=1;var e=Il(),a=typeof self=="object"&&self&&self.Object===Object&&self,r=e||a||Function("return this")();return wr=r,wr}var Rr,lu;function Te(){if(lu)return Rr;lu=1;var e=fe(),a=e.Symbol;return Rr=a,Rr}var Er,hu;function lv(){if(hu)return Er;hu=1;var e=Te(),a=Object.prototype,r=a.hasOwnProperty,t=a.toString,n=e?e.toStringTag:void 0;function i(u){var s=r.call(u,n),o=u[n];try{u[n]=void 0;var c=!0}catch{}var f=t.call(u);return c&&(s?u[n]=o:delete u[n]),f}return Er=i,Er}var Cr,vu;function hv(){if(vu)return Cr;vu=1;var e=Object.prototype,a=e.toString;function r(t){return a.call(t)}return Cr=r,Cr}var Sr,pu;function Re(){if(pu)return Sr;pu=1;var e=Te(),a=lv(),r=hv(),t="[object Null]",n="[object Undefined]",i=e?e.toStringTag:void 0;function u(s){return s==null?s===void 0?n:t:i&&i in Object(s)?a(s):r(s)}return Sr=u,Sr}var Ir,gu;function ae(){if(gu)return Ir;gu=1;function e(a){var r=typeof a;return a!=null&&(r=="object"||r=="function")}return Ir=e,Ir}var Ar,_u;function De(){if(_u)return Ar;_u=1;var e=Re(),a=ae(),r="[object AsyncFunction]",t="[object Function]",n="[object GeneratorFunction]",i="[object Proxy]";function u(s){if(!a(s))return!1;var o=e(s);return o==t||o==n||o==r||o==i}return Ar=u,Ar}var Tr,bu;function vv(){if(bu)return Tr;bu=1;var e=fe(),a=e["__core-js_shared__"];return Tr=a,Tr}var Or,mu;function pv(){if(mu)return Or;mu=1;var e=vv(),a=(function(){var t=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function r(t){return!!a&&a in t}return Or=r,Or}var Nr,yu;function Al(){if(yu)return Nr;yu=1;var e=Function.prototype,a=e.toString;function r(t){if(t!=null){try{return a.call(t)}catch{}try{return t+""}catch{}}return""}return Nr=r,Nr}var jr,qu;function gv(){if(qu)return jr;qu=1;var e=De(),a=pv(),r=ae(),t=Al(),n=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,o=u.toString,c=s.hasOwnProperty,f=RegExp("^"+o.call(c).replace(n,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(l){if(!r(l)||a(l))return!1;var h=e(l)?f:i;return h.test(t(l))}return jr=d,jr}var Pr,xu;function _v(){if(xu)return Pr;xu=1;function e(a,r){return a==null?void 0:a[r]}return Pr=e,Pr}var kr,wu;function Ee(){if(wu)return kr;wu=1;var e=gv(),a=_v();function r(t,n){var i=a(t,n);return e(i)?i:void 0}return kr=r,kr}var Lr,Ru;function Os(){if(Ru)return Lr;Ru=1;var e=Ee(),a=fe(),r=e(a,"Map");return Lr=r,Lr}var Mr,Eu;function Ye(){if(Eu)return Mr;Eu=1;var e=Ee(),a=e(Object,"create");return Mr=a,Mr}var Fr,Cu;function bv(){if(Cu)return Fr;Cu=1;var e=Ye();function a(){this.__data__=e?e(null):{},this.size=0}return Fr=a,Fr}var Dr,Su;function mv(){if(Su)return Dr;Su=1;function e(a){var r=this.has(a)&&delete this.__data__[a];return this.size-=r?1:0,r}return Dr=e,Dr}var Gr,Iu;function yv(){if(Iu)return Gr;Iu=1;var e=Ye(),a="__lodash_hash_undefined__",r=Object.prototype,t=r.hasOwnProperty;function n(i){var u=this.__data__;if(e){var s=u[i];return s===a?void 0:s}return t.call(u,i)?u[i]:void 0}return Gr=n,Gr}var Br,Au;function qv(){if(Au)return Br;Au=1;var e=Ye(),a=Object.prototype,r=a.hasOwnProperty;function t(n){var i=this.__data__;return e?i[n]!==void 0:r.call(i,n)}return Br=t,Br}var Ur,Tu;function xv(){if(Tu)return Ur;Tu=1;var e=Ye(),a="__lodash_hash_undefined__";function r(t,n){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=e&&n===void 0?a:n,this}return Ur=r,Ur}var Hr,Ou;function wv(){if(Ou)return Hr;Ou=1;var e=bv(),a=mv(),r=yv(),t=qv(),n=xv();function i(u){var s=-1,o=u==null?0:u.length;for(this.clear();++s<o;){var c=u[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=a,i.prototype.get=r,i.prototype.has=t,i.prototype.set=n,Hr=i,Hr}var zr,Nu;function Rv(){if(Nu)return zr;Nu=1;var e=wv(),a=$e(),r=Os();function t(){this.size=0,this.__data__={hash:new e,map:new(r||a),string:new e}}return zr=t,zr}var Vr,ju;function Ev(){if(ju)return Vr;ju=1;function e(a){var r=typeof a;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?a!=="__proto__":a===null}return Vr=e,Vr}var Kr,Pu;function Xe(){if(Pu)return Kr;Pu=1;var e=Ev();function a(r,t){var n=r.__data__;return e(t)?n[typeof t=="string"?"string":"hash"]:n.map}return Kr=a,Kr}var Wr,ku;function Cv(){if(ku)return Wr;ku=1;var e=Xe();function a(r){var t=e(this,r).delete(r);return this.size-=t?1:0,t}return Wr=a,Wr}var $r,Lu;function Sv(){if(Lu)return $r;Lu=1;var e=Xe();function a(r){return e(this,r).get(r)}return $r=a,$r}var Yr,Mu;function Iv(){if(Mu)return Yr;Mu=1;var e=Xe();function a(r){return e(this,r).has(r)}return Yr=a,Yr}var Xr,Fu;function Av(){if(Fu)return Xr;Fu=1;var e=Xe();function a(r,t){var n=e(this,r),i=n.size;return n.set(r,t),this.size+=n.size==i?0:1,this}return Xr=a,Xr}var Zr,Du;function Ns(){if(Du)return Zr;Du=1;var e=Rv(),a=Cv(),r=Sv(),t=Iv(),n=Av();function i(u){var s=-1,o=u==null?0:u.length;for(this.clear();++s<o;){var c=u[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=a,i.prototype.get=r,i.prototype.has=t,i.prototype.set=n,Zr=i,Zr}var Jr,Gu;function Tv(){if(Gu)return Jr;Gu=1;var e=$e(),a=Os(),r=Ns(),t=200;function n(i,u){var s=this.__data__;if(s instanceof e){var o=s.__data__;if(!a||o.length<t-1)return o.push([i,u]),this.size=++s.size,this;s=this.__data__=new r(o)}return s.set(i,u),this.size=s.size,this}return Jr=n,Jr}var Qr,Bu;function Ze(){if(Bu)return Qr;Bu=1;var e=$e(),a=ov(),r=fv(),t=cv(),n=dv(),i=Tv();function u(s){var o=this.__data__=new e(s);this.size=o.size}return u.prototype.clear=a,u.prototype.delete=r,u.prototype.get=t,u.prototype.has=n,u.prototype.set=i,Qr=u,Qr}var en,Uu;function js(){if(Uu)return en;Uu=1;function e(a,r){for(var t=-1,n=a==null?0:a.length;++t<n&&r(a[t],t,a)!==!1;);return a}return en=e,en}var rn,Hu;function Tl(){if(Hu)return rn;Hu=1;var e=Ee(),a=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return rn=a,rn}var nn,zu;function Je(){if(zu)return nn;zu=1;var e=Tl();function a(r,t,n){t=="__proto__"&&e?e(r,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):r[t]=n}return nn=a,nn}var tn,Vu;function Qe(){if(Vu)return tn;Vu=1;var e=Je(),a=Ae(),r=Object.prototype,t=r.hasOwnProperty;function n(i,u,s){var o=i[u];(!(t.call(i,u)&&a(o,s))||s===void 0&&!(u in i))&&e(i,u,s)}return tn=n,tn}var an,Ku;function Ge(){if(Ku)return an;Ku=1;var e=Qe(),a=Je();function r(t,n,i,u){var s=!i;i||(i={});for(var o=-1,c=n.length;++o<c;){var f=n[o],d=u?u(i[f],t[f],f,i,t):void 0;d===void 0&&(d=t[f]),s?a(i,f,d):e(i,f,d)}return i}return an=r,an}var sn,Wu;function Ov(){if(Wu)return sn;Wu=1;function e(a,r){for(var t=-1,n=Array(a);++t<a;)n[t]=r(t);return n}return sn=e,sn}var un,$u;function he(){if($u)return un;$u=1;function e(a){return a!=null&&typeof a=="object"}return un=e,un}var on,Yu;function Nv(){if(Yu)return on;Yu=1;var e=Re(),a=he(),r="[object Arguments]";function t(n){return a(n)&&e(n)==r}return on=t,on}var fn,Xu;function Be(){if(Xu)return fn;Xu=1;var e=Nv(),a=he(),r=Object.prototype,t=r.hasOwnProperty,n=r.propertyIsEnumerable,i=e((function(){return arguments})())?e:function(u){return a(u)&&t.call(u,"callee")&&!n.call(u,"callee")};return fn=i,fn}var cn,Zu;function J(){if(Zu)return cn;Zu=1;var e=Array.isArray;return cn=e,cn}var Le={exports:{}},dn,Ju;function jv(){if(Ju)return dn;Ju=1;function e(){return!1}return dn=e,dn}Le.exports;var Qu;function Oe(){return Qu||(Qu=1,(function(e,a){var r=fe(),t=jv(),n=a&&!a.nodeType&&a,i=n&&!0&&e&&!e.nodeType&&e,u=i&&i.exports===n,s=u?r.Buffer:void 0,o=s?s.isBuffer:void 0,c=o||t;e.exports=c})(Le,Le.exports)),Le.exports}var ln,eo;function er(){if(eo)return ln;eo=1;var e=9007199254740991,a=/^(?:0|[1-9]\d*)$/;function r(t,n){var i=typeof t;return n=n??e,!!n&&(i=="number"||i!="symbol"&&a.test(t))&&t>-1&&t%1==0&&t<n}return ln=r,ln}var hn,ro;function Ps(){if(ro)return hn;ro=1;var e=9007199254740991;function a(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return hn=a,hn}var vn,no;function Pv(){if(no)return vn;no=1;var e=Re(),a=Ps(),r=he(),t="[object Arguments]",n="[object Array]",i="[object Boolean]",u="[object Date]",s="[object Error]",o="[object Function]",c="[object Map]",f="[object Number]",d="[object Object]",l="[object RegExp]",h="[object Set]",m="[object String]",p="[object WeakMap]",v="[object ArrayBuffer]",b="[object DataView]",g="[object Float32Array]",_="[object Float64Array]",y="[object Int8Array]",q="[object Int16Array]",x="[object Int32Array]",w="[object Uint8Array]",T="[object Uint8ClampedArray]",I="[object Uint16Array]",A="[object Uint32Array]",O={};O[g]=O[_]=O[y]=O[q]=O[x]=O[w]=O[T]=O[I]=O[A]=!0,O[t]=O[n]=O[v]=O[i]=O[b]=O[u]=O[s]=O[o]=O[c]=O[f]=O[d]=O[l]=O[h]=O[m]=O[p]=!1;function P(L){return r(L)&&a(L.length)&&!!O[e(L)]}return vn=P,vn}var pn,to;function rr(){if(to)return pn;to=1;function e(a){return function(r){return a(r)}}return pn=e,pn}var Me={exports:{}};Me.exports;var ao;function ks(){return ao||(ao=1,(function(e,a){var r=Il(),t=a&&!a.nodeType&&a,n=t&&!0&&e&&!e.nodeType&&e,i=n&&n.exports===t,u=i&&r.process,s=(function(){try{var o=n&&n.require&&n.require("util").types;return o||u&&u.binding&&u.binding("util")}catch{}})();e.exports=s})(Me,Me.exports)),Me.exports}var gn,io;function Ue(){if(io)return gn;io=1;var e=Pv(),a=rr(),r=ks(),t=r&&r.isTypedArray,n=t?a(t):e;return gn=n,gn}var _n,so;function Ol(){if(so)return _n;so=1;var e=Ov(),a=Be(),r=J(),t=Oe(),n=er(),i=Ue(),u=Object.prototype,s=u.hasOwnProperty;function o(c,f){var d=r(c),l=!d&&a(c),h=!d&&!l&&t(c),m=!d&&!l&&!h&&i(c),p=d||l||h||m,v=p?e(c.length,String):[],b=v.length;for(var g in c)(f||s.call(c,g))&&!(p&&(g=="length"||h&&(g=="offset"||g=="parent")||m&&(g=="buffer"||g=="byteLength"||g=="byteOffset")||n(g,b)))&&v.push(g);return v}return _n=o,_n}var bn,uo;function nr(){if(uo)return bn;uo=1;var e=Object.prototype;function a(r){var t=r&&r.constructor,n=typeof t=="function"&&t.prototype||e;return r===n}return bn=a,bn}var mn,oo;function Nl(){if(oo)return mn;oo=1;function e(a,r){return function(t){return a(r(t))}}return mn=e,mn}var yn,fo;function kv(){if(fo)return yn;fo=1;var e=Nl(),a=e(Object.keys,Object);return yn=a,yn}var qn,co;function Ls(){if(co)return qn;co=1;var e=nr(),a=kv(),r=Object.prototype,t=r.hasOwnProperty;function n(i){if(!e(i))return a(i);var u=[];for(var s in Object(i))t.call(i,s)&&s!="constructor"&&u.push(s);return u}return qn=n,qn}var xn,lo;function pe(){if(lo)return xn;lo=1;var e=De(),a=Ps();function r(t){return t!=null&&a(t.length)&&!e(t)}return xn=r,xn}var wn,ho;function qe(){if(ho)return wn;ho=1;var e=Ol(),a=Ls(),r=pe();function t(n){return r(n)?e(n):a(n)}return wn=t,wn}var Rn,vo;function Lv(){if(vo)return Rn;vo=1;var e=Ge(),a=qe();function r(t,n){return t&&e(n,a(n),t)}return Rn=r,Rn}var En,po;function Mv(){if(po)return En;po=1;function e(a){var r=[];if(a!=null)for(var t in Object(a))r.push(t);return r}return En=e,En}var Cn,go;function Fv(){if(go)return Cn;go=1;var e=ae(),a=nr(),r=Mv(),t=Object.prototype,n=t.hasOwnProperty;function i(u){if(!e(u))return r(u);var s=a(u),o=[];for(var c in u)c=="constructor"&&(s||!n.call(u,c))||o.push(c);return o}return Cn=i,Cn}var Sn,_o;function Ce(){if(_o)return Sn;_o=1;var e=Ol(),a=Fv(),r=pe();function t(n){return r(n)?e(n,!0):a(n)}return Sn=t,Sn}var In,bo;function Dv(){if(bo)return In;bo=1;var e=Ge(),a=Ce();function r(t,n){return t&&e(n,a(n),t)}return In=r,In}var Fe={exports:{}};Fe.exports;var mo;function jl(){return mo||(mo=1,(function(e,a){var r=fe(),t=a&&!a.nodeType&&a,n=t&&!0&&e&&!e.nodeType&&e,i=n&&n.exports===t,u=i?r.Buffer:void 0,s=u?u.allocUnsafe:void 0;function o(c,f){if(f)return c.slice();var d=c.length,l=s?s(d):new c.constructor(d);return c.copy(l),l}e.exports=o})(Fe,Fe.exports)),Fe.exports}var An,yo;function Pl(){if(yo)return An;yo=1;function e(a,r){var t=-1,n=a.length;for(r||(r=Array(n));++t<n;)r[t]=a[t];return r}return An=e,An}var Tn,qo;function kl(){if(qo)return Tn;qo=1;function e(a,r){for(var t=-1,n=a==null?0:a.length,i=0,u=[];++t<n;){var s=a[t];r(s,t,a)&&(u[i++]=s)}return u}return Tn=e,Tn}var On,xo;function Ll(){if(xo)return On;xo=1;function e(){return[]}return On=e,On}var Nn,wo;function Ms(){if(wo)return Nn;wo=1;var e=kl(),a=Ll(),r=Object.prototype,t=r.propertyIsEnumerable,n=Object.getOwnPropertySymbols,i=n?function(u){return u==null?[]:(u=Object(u),e(n(u),function(s){return t.call(u,s)}))}:a;return Nn=i,Nn}var jn,Ro;function Gv(){if(Ro)return jn;Ro=1;var e=Ge(),a=Ms();function r(t,n){return e(t,a(t),n)}return jn=r,jn}var Pn,Eo;function Fs(){if(Eo)return Pn;Eo=1;function e(a,r){for(var t=-1,n=r.length,i=a.length;++t<n;)a[i+t]=r[t];return a}return Pn=e,Pn}var kn,Co;function tr(){if(Co)return kn;Co=1;var e=Nl(),a=e(Object.getPrototypeOf,Object);return kn=a,kn}var Ln,So;function Ml(){if(So)return Ln;So=1;var e=Fs(),a=tr(),r=Ms(),t=Ll(),n=Object.getOwnPropertySymbols,i=n?function(u){for(var s=[];u;)e(s,r(u)),u=a(u);return s}:t;return Ln=i,Ln}var Mn,Io;function Bv(){if(Io)return Mn;Io=1;var e=Ge(),a=Ml();function r(t,n){return e(t,a(t),n)}return Mn=r,Mn}var Fn,Ao;function Fl(){if(Ao)return Fn;Ao=1;var e=Fs(),a=J();function r(t,n,i){var u=n(t);return a(t)?u:e(u,i(t))}return Fn=r,Fn}var Dn,To;function Dl(){if(To)return Dn;To=1;var e=Fl(),a=Ms(),r=qe();function t(n){return e(n,r,a)}return Dn=t,Dn}var Gn,Oo;function Uv(){if(Oo)return Gn;Oo=1;var e=Fl(),a=Ml(),r=Ce();function t(n){return e(n,r,a)}return Gn=t,Gn}var Bn,No;function Hv(){if(No)return Bn;No=1;var e=Ee(),a=fe(),r=e(a,"DataView");return Bn=r,Bn}var Un,jo;function zv(){if(jo)return Un;jo=1;var e=Ee(),a=fe(),r=e(a,"Promise");return Un=r,Un}var Hn,Po;function Gl(){if(Po)return Hn;Po=1;var e=Ee(),a=fe(),r=e(a,"Set");return Hn=r,Hn}var zn,ko;function Vv(){if(ko)return zn;ko=1;var e=Ee(),a=fe(),r=e(a,"WeakMap");return zn=r,zn}var Vn,Lo;function Ne(){if(Lo)return Vn;Lo=1;var e=Hv(),a=Os(),r=zv(),t=Gl(),n=Vv(),i=Re(),u=Al(),s="[object Map]",o="[object Object]",c="[object Promise]",f="[object Set]",d="[object WeakMap]",l="[object DataView]",h=u(e),m=u(a),p=u(r),v=u(t),b=u(n),g=i;return(e&&g(new e(new ArrayBuffer(1)))!=l||a&&g(new a)!=s||r&&g(r.resolve())!=c||t&&g(new t)!=f||n&&g(new n)!=d)&&(g=function(_){var y=i(_),q=y==o?_.constructor:void 0,x=q?u(q):"";if(x)switch(x){case h:return l;case m:return s;case p:return c;case v:return f;case b:return d}return y}),Vn=g,Vn}var Kn,Mo;function Kv(){if(Mo)return Kn;Mo=1;var e=Object.prototype,a=e.hasOwnProperty;function r(t){var n=t.length,i=new t.constructor(n);return n&&typeof t[0]=="string"&&a.call(t,"index")&&(i.index=t.index,i.input=t.input),i}return Kn=r,Kn}var Wn,Fo;function Bl(){if(Fo)return Wn;Fo=1;var e=fe(),a=e.Uint8Array;return Wn=a,Wn}var $n,Do;function Ds(){if(Do)return $n;Do=1;var e=Bl();function a(r){var t=new r.constructor(r.byteLength);return new e(t).set(new e(r)),t}return $n=a,$n}var Yn,Go;function Wv(){if(Go)return Yn;Go=1;var e=Ds();function a(r,t){var n=t?e(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.byteLength)}return Yn=a,Yn}var Xn,Bo;function $v(){if(Bo)return Xn;Bo=1;var e=/\w*$/;function a(r){var t=new r.constructor(r.source,e.exec(r));return t.lastIndex=r.lastIndex,t}return Xn=a,Xn}var Zn,Uo;function Yv(){if(Uo)return Zn;Uo=1;var e=Te(),a=e?e.prototype:void 0,r=a?a.valueOf:void 0;function t(n){return r?Object(r.call(n)):{}}return Zn=t,Zn}var Jn,Ho;function Ul(){if(Ho)return Jn;Ho=1;var e=Ds();function a(r,t){var n=t?e(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.length)}return Jn=a,Jn}var Qn,zo;function Xv(){if(zo)return Qn;zo=1;var e=Ds(),a=Wv(),r=$v(),t=Yv(),n=Ul(),i="[object Boolean]",u="[object Date]",s="[object Map]",o="[object Number]",c="[object RegExp]",f="[object Set]",d="[object String]",l="[object Symbol]",h="[object ArrayBuffer]",m="[object DataView]",p="[object Float32Array]",v="[object Float64Array]",b="[object Int8Array]",g="[object Int16Array]",_="[object Int32Array]",y="[object Uint8Array]",q="[object Uint8ClampedArray]",x="[object Uint16Array]",w="[object Uint32Array]";function T(I,A,O){var P=I.constructor;switch(A){case h:return e(I);case i:case u:return new P(+I);case m:return a(I,O);case p:case v:case b:case g:case _:case y:case q:case x:case w:return n(I,O);case s:return new P;case o:case d:return new P(I);case c:return r(I);case f:return new P;case l:return t(I)}}return Qn=T,Qn}var et,Vo;function Hl(){if(Vo)return et;Vo=1;var e=ae(),a=Object.create,r=(function(){function t(){}return function(n){if(!e(n))return{};if(a)return a(n);t.prototype=n;var i=new t;return t.prototype=void 0,i}})();return et=r,et}var rt,Ko;function zl(){if(Ko)return rt;Ko=1;var e=Hl(),a=tr(),r=nr();function t(n){return typeof n.constructor=="function"&&!r(n)?e(a(n)):{}}return rt=t,rt}var nt,Wo;function Zv(){if(Wo)return nt;Wo=1;var e=Ne(),a=he(),r="[object Map]";function t(n){return a(n)&&e(n)==r}return nt=t,nt}var tt,$o;function Jv(){if($o)return tt;$o=1;var e=Zv(),a=rr(),r=ks(),t=r&&r.isMap,n=t?a(t):e;return tt=n,tt}var at,Yo;function Qv(){if(Yo)return at;Yo=1;var e=Ne(),a=he(),r="[object Set]";function t(n){return a(n)&&e(n)==r}return at=t,at}var it,Xo;function ep(){if(Xo)return it;Xo=1;var e=Qv(),a=rr(),r=ks(),t=r&&r.isSet,n=t?a(t):e;return it=n,it}var st,Zo;function Vl(){if(Zo)return st;Zo=1;var e=Ze(),a=js(),r=Qe(),t=Lv(),n=Dv(),i=jl(),u=Pl(),s=Gv(),o=Bv(),c=Dl(),f=Uv(),d=Ne(),l=Kv(),h=Xv(),m=zl(),p=J(),v=Oe(),b=Jv(),g=ae(),_=ep(),y=qe(),q=Ce(),x=1,w=2,T=4,I="[object Arguments]",A="[object Array]",O="[object Boolean]",P="[object Date]",L="[object Error]",M="[object Function]",U="[object GeneratorFunction]",Y="[object Map]",ee="[object Number]",se="[object Object]",ve="[object RegExp]",ce="[object Set]",_e="[object String]",te="[object Symbol]",de="[object WeakMap]",R="[object ArrayBuffer]",S="[object DataView]",E="[object Float32Array]",j="[object Float64Array]",G="[object Int8Array]",K="[object Int16Array]",W="[object Int32Array]",F="[object Uint8Array]",B="[object Uint8ClampedArray]",z="[object Uint16Array]",H="[object Uint32Array]",k={};k[I]=k[A]=k[R]=k[S]=k[O]=k[P]=k[E]=k[j]=k[G]=k[K]=k[W]=k[Y]=k[ee]=k[se]=k[ve]=k[ce]=k[_e]=k[te]=k[F]=k[B]=k[z]=k[H]=!0,k[L]=k[M]=k[de]=!1;function Z(D,re,le,Pe,Ie,ue){var N,$=re&x,Q=re&w,be=re&T;if(le&&(N=Ie?le(D,Pe,Ie,ue):le(D)),N!==void 0)return N;if(!g(D))return D;var xe=p(D);if(xe){if(N=l(D),!$)return u(D,N)}else{var me=d(D),ze=me==M||me==U;if(v(D))return i(D,$);if(me==se||me==I||ze&&!Ie){if(N=Q||ze?{}:m(D),!$)return Q?o(D,n(N,D)):s(D,t(N,D))}else{if(!k[me])return Ie?D:{};N=h(D,me,$)}}ue||(ue=new e);var ke=ue.get(D);if(ke)return ke;ue.set(D,N),_(D)?D.forEach(function(ye){N.add(Z(ye,re,le,ye,D,ue))}):b(D)&&D.forEach(function(ye,we){N.set(we,Z(ye,re,le,we,D,ue))});var Sh=be?Q?f:c:Q?q:y,$s=xe?void 0:Sh(D);return a($s||D,function(ye,we){$s&&(we=ye,ye=D[we]),r(N,we,Z(ye,re,le,we,D,ue))}),N}return st=Z,st}var ut,Jo;function rp(){if(Jo)return ut;Jo=1;var e=Vl(),a=4;function r(t){return e(t,a)}return ut=r,ut}var ot,Qo;function Gs(){if(Qo)return ot;Qo=1;function e(a){return function(){return a}}return ot=e,ot}var ft,ef;function np(){if(ef)return ft;ef=1;function e(a){return function(r,t,n){for(var i=-1,u=Object(r),s=n(r),o=s.length;o--;){var c=s[a?o:++i];if(t(u[c],c,u)===!1)break}return r}}return ft=e,ft}var ct,rf;function Bs(){if(rf)return ct;rf=1;var e=np(),a=e();return ct=a,ct}var dt,nf;function Us(){if(nf)return dt;nf=1;var e=Bs(),a=qe();function r(t,n){return t&&e(t,n,a)}return dt=r,dt}var lt,tf;function tp(){if(tf)return lt;tf=1;var e=pe();function a(r,t){return function(n,i){if(n==null)return n;if(!e(n))return r(n,i);for(var u=n.length,s=t?u:-1,o=Object(n);(t?s--:++s<u)&&i(o[s],s,o)!==!1;);return n}}return lt=a,lt}var ht,af;function ar(){if(af)return ht;af=1;var e=Us(),a=tp(),r=a(e);return ht=r,ht}var vt,sf;function Se(){if(sf)return vt;sf=1;function e(a){return a}return vt=e,vt}var pt,uf;function Kl(){if(uf)return pt;uf=1;var e=Se();function a(r){return typeof r=="function"?r:e}return pt=a,pt}var gt,of;function Wl(){if(of)return gt;of=1;var e=js(),a=ar(),r=Kl(),t=J();function n(i,u){var s=t(i)?e:a;return s(i,r(u))}return gt=n,gt}var _t,ff;function $l(){return ff||(ff=1,_t=Wl()),_t}var bt,cf;function ap(){if(cf)return bt;cf=1;var e=ar();function a(r,t){var n=[];return e(r,function(i,u,s){t(i,u,s)&&n.push(i)}),n}return bt=a,bt}var mt,df;function ip(){if(df)return mt;df=1;var e="__lodash_hash_undefined__";function a(r){return this.__data__.set(r,e),this}return mt=a,mt}var yt,lf;function sp(){if(lf)return yt;lf=1;function e(a){return this.__data__.has(a)}return yt=e,yt}var qt,hf;function Yl(){if(hf)return qt;hf=1;var e=Ns(),a=ip(),r=sp();function t(n){var i=-1,u=n==null?0:n.length;for(this.__data__=new e;++i<u;)this.add(n[i])}return t.prototype.add=t.prototype.push=a,t.prototype.has=r,qt=t,qt}var xt,vf;function up(){if(vf)return xt;vf=1;function e(a,r){for(var t=-1,n=a==null?0:a.length;++t<n;)if(r(a[t],t,a))return!0;return!1}return xt=e,xt}var wt,pf;function Xl(){if(pf)return wt;pf=1;function e(a,r){return a.has(r)}return wt=e,wt}var Rt,gf;function Zl(){if(gf)return Rt;gf=1;var e=Yl(),a=up(),r=Xl(),t=1,n=2;function i(u,s,o,c,f,d){var l=o&t,h=u.length,m=s.length;if(h!=m&&!(l&&m>h))return!1;var p=d.get(u),v=d.get(s);if(p&&v)return p==s&&v==u;var b=-1,g=!0,_=o&n?new e:void 0;for(d.set(u,s),d.set(s,u);++b<h;){var y=u[b],q=s[b];if(c)var x=l?c(q,y,b,s,u,d):c(y,q,b,u,s,d);if(x!==void 0){if(x)continue;g=!1;break}if(_){if(!a(s,function(w,T){if(!r(_,T)&&(y===w||f(y,w,o,c,d)))return _.push(T)})){g=!1;break}}else if(!(y===q||f(y,q,o,c,d))){g=!1;break}}return d.delete(u),d.delete(s),g}return Rt=i,Rt}var Et,_f;function op(){if(_f)return Et;_f=1;function e(a){var r=-1,t=Array(a.size);return a.forEach(function(n,i){t[++r]=[i,n]}),t}return Et=e,Et}var Ct,bf;function Hs(){if(bf)return Ct;bf=1;function e(a){var r=-1,t=Array(a.size);return a.forEach(function(n){t[++r]=n}),t}return Ct=e,Ct}var St,mf;function fp(){if(mf)return St;mf=1;var e=Te(),a=Bl(),r=Ae(),t=Zl(),n=op(),i=Hs(),u=1,s=2,o="[object Boolean]",c="[object Date]",f="[object Error]",d="[object Map]",l="[object Number]",h="[object RegExp]",m="[object Set]",p="[object String]",v="[object Symbol]",b="[object ArrayBuffer]",g="[object DataView]",_=e?e.prototype:void 0,y=_?_.valueOf:void 0;function q(x,w,T,I,A,O,P){switch(T){case g:if(x.byteLength!=w.byteLength||x.byteOffset!=w.byteOffset)return!1;x=x.buffer,w=w.buffer;case b:return!(x.byteLength!=w.byteLength||!O(new a(x),new a(w)));case o:case c:case l:return r(+x,+w);case f:return x.name==w.name&&x.message==w.message;case h:case p:return x==w+"";case d:var L=n;case m:var M=I&u;if(L||(L=i),x.size!=w.size&&!M)return!1;var U=P.get(x);if(U)return U==w;I|=s,P.set(x,w);var Y=t(L(x),L(w),I,A,O,P);return P.delete(x),Y;case v:if(y)return y.call(x)==y.call(w)}return!1}return St=q,St}var It,yf;function cp(){if(yf)return It;yf=1;var e=Dl(),a=1,r=Object.prototype,t=r.hasOwnProperty;function n(i,u,s,o,c,f){var d=s&a,l=e(i),h=l.length,m=e(u),p=m.length;if(h!=p&&!d)return!1;for(var v=h;v--;){var b=l[v];if(!(d?b in u:t.call(u,b)))return!1}var g=f.get(i),_=f.get(u);if(g&&_)return g==u&&_==i;var y=!0;f.set(i,u),f.set(u,i);for(var q=d;++v<h;){b=l[v];var x=i[b],w=u[b];if(o)var T=d?o(w,x,b,u,i,f):o(x,w,b,i,u,f);if(!(T===void 0?x===w||c(x,w,s,o,f):T)){y=!1;break}q||(q=b=="constructor")}if(y&&!q){var I=i.constructor,A=u.constructor;I!=A&&"constructor"in i&&"constructor"in u&&!(typeof I=="function"&&I instanceof I&&typeof A=="function"&&A instanceof A)&&(y=!1)}return f.delete(i),f.delete(u),y}return It=n,It}var At,qf;function dp(){if(qf)return At;qf=1;var e=Ze(),a=Zl(),r=fp(),t=cp(),n=Ne(),i=J(),u=Oe(),s=Ue(),o=1,c="[object Arguments]",f="[object Array]",d="[object Object]",l=Object.prototype,h=l.hasOwnProperty;function m(p,v,b,g,_,y){var q=i(p),x=i(v),w=q?f:n(p),T=x?f:n(v);w=w==c?d:w,T=T==c?d:T;var I=w==d,A=T==d,O=w==T;if(O&&u(p)){if(!u(v))return!1;q=!0,I=!1}if(O&&!I)return y||(y=new e),q||s(p)?a(p,v,b,g,_,y):r(p,v,w,b,g,_,y);if(!(b&o)){var P=I&&h.call(p,"__wrapped__"),L=A&&h.call(v,"__wrapped__");if(P||L){var M=P?p.value():p,U=L?v.value():v;return y||(y=new e),_(M,U,b,g,y)}}return O?(y||(y=new e),t(p,v,b,g,_,y)):!1}return At=m,At}var Tt,xf;function Jl(){if(xf)return Tt;xf=1;var e=dp(),a=he();function r(t,n,i,u,s){return t===n?!0:t==null||n==null||!a(t)&&!a(n)?t!==t&&n!==n:e(t,n,i,u,r,s)}return Tt=r,Tt}var Ot,wf;function lp(){if(wf)return Ot;wf=1;var e=Ze(),a=Jl(),r=1,t=2;function n(i,u,s,o){var c=s.length,f=c,d=!o;if(i==null)return!f;for(i=Object(i);c--;){var l=s[c];if(d&&l[2]?l[1]!==i[l[0]]:!(l[0]in i))return!1}for(;++c<f;){l=s[c];var h=l[0],m=i[h],p=l[1];if(d&&l[2]){if(m===void 0&&!(h in i))return!1}else{var v=new e;if(o)var b=o(m,p,h,i,u,v);if(!(b===void 0?a(p,m,r|t,o,v):b))return!1}}return!0}return Ot=n,Ot}var Nt,Rf;function Ql(){if(Rf)return Nt;Rf=1;var e=ae();function a(r){return r===r&&!e(r)}return Nt=a,Nt}var jt,Ef;function hp(){if(Ef)return jt;Ef=1;var e=Ql(),a=qe();function r(t){for(var n=a(t),i=n.length;i--;){var u=n[i],s=t[u];n[i]=[u,s,e(s)]}return n}return jt=r,jt}var Pt,Cf;function eh(){if(Cf)return Pt;Cf=1;function e(a,r){return function(t){return t==null?!1:t[a]===r&&(r!==void 0||a in Object(t))}}return Pt=e,Pt}var kt,Sf;function vp(){if(Sf)return kt;Sf=1;var e=lp(),a=hp(),r=eh();function t(n){var i=a(n);return i.length==1&&i[0][2]?r(i[0][0],i[0][1]):function(u){return u===n||e(u,n,i)}}return kt=t,kt}var Lt,If;function je(){if(If)return Lt;If=1;var e=Re(),a=he(),r="[object Symbol]";function t(n){return typeof n=="symbol"||a(n)&&e(n)==r}return Lt=t,Lt}var Mt,Af;function zs(){if(Af)return Mt;Af=1;var e=J(),a=je(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,t=/^\w*$/;function n(i,u){if(e(i))return!1;var s=typeof i;return s=="number"||s=="symbol"||s=="boolean"||i==null||a(i)?!0:t.test(i)||!r.test(i)||u!=null&&i in Object(u)}return Mt=n,Mt}var Ft,Tf;function pp(){if(Tf)return Ft;Tf=1;var e=Ns(),a="Expected a function";function r(t,n){if(typeof t!="function"||n!=null&&typeof n!="function")throw new TypeError(a);var i=function(){var u=arguments,s=n?n.apply(this,u):u[0],o=i.cache;if(o.has(s))return o.get(s);var c=t.apply(this,u);return i.cache=o.set(s,c)||o,c};return i.cache=new(r.Cache||e),i}return r.Cache=e,Ft=r,Ft}var Dt,Of;function gp(){if(Of)return Dt;Of=1;var e=pp(),a=500;function r(t){var n=e(t,function(u){return i.size===a&&i.clear(),u}),i=n.cache;return n}return Dt=r,Dt}var Gt,Nf;function _p(){if(Nf)return Gt;Nf=1;var e=gp(),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,t=e(function(n){var i=[];return n.charCodeAt(0)===46&&i.push(""),n.replace(a,function(u,s,o,c){i.push(o?c.replace(r,"$1"):s||u)}),i});return Gt=t,Gt}var Bt,jf;function ir(){if(jf)return Bt;jf=1;function e(a,r){for(var t=-1,n=a==null?0:a.length,i=Array(n);++t<n;)i[t]=r(a[t],t,a);return i}return Bt=e,Bt}var Ut,Pf;function bp(){if(Pf)return Ut;Pf=1;var e=Te(),a=ir(),r=J(),t=je(),n=e?e.prototype:void 0,i=n?n.toString:void 0;function u(s){if(typeof s=="string")return s;if(r(s))return a(s,u)+"";if(t(s))return i?i.call(s):"";var o=s+"";return o=="0"&&1/s==-1/0?"-0":o}return Ut=u,Ut}var Ht,kf;function rh(){if(kf)return Ht;kf=1;var e=bp();function a(r){return r==null?"":e(r)}return Ht=a,Ht}var zt,Lf;function sr(){if(Lf)return zt;Lf=1;var e=J(),a=zs(),r=_p(),t=rh();function n(i,u){return e(i)?i:a(i,u)?[i]:r(t(i))}return zt=n,zt}var Vt,Mf;function He(){if(Mf)return Vt;Mf=1;var e=je();function a(r){if(typeof r=="string"||e(r))return r;var t=r+"";return t=="0"&&1/r==-1/0?"-0":t}return Vt=a,Vt}var Kt,Ff;function ur(){if(Ff)return Kt;Ff=1;var e=sr(),a=He();function r(t,n){n=e(n,t);for(var i=0,u=n.length;t!=null&&i<u;)t=t[a(n[i++])];return i&&i==u?t:void 0}return Kt=r,Kt}var Wt,Df;function mp(){if(Df)return Wt;Df=1;var e=ur();function a(r,t,n){var i=r==null?void 0:e(r,t);return i===void 0?n:i}return Wt=a,Wt}var $t,Gf;function yp(){if(Gf)return $t;Gf=1;function e(a,r){return a!=null&&r in Object(a)}return $t=e,$t}var Yt,Bf;function nh(){if(Bf)return Yt;Bf=1;var e=sr(),a=Be(),r=J(),t=er(),n=Ps(),i=He();function u(s,o,c){o=e(o,s);for(var f=-1,d=o.length,l=!1;++f<d;){var h=i(o[f]);if(!(l=s!=null&&c(s,h)))break;s=s[h]}return l||++f!=d?l:(d=s==null?0:s.length,!!d&&n(d)&&t(h,d)&&(r(s)||a(s)))}return Yt=u,Yt}var Xt,Uf;function th(){if(Uf)return Xt;Uf=1;var e=yp(),a=nh();function r(t,n){return t!=null&&a(t,n,e)}return Xt=r,Xt}var Zt,Hf;function qp(){if(Hf)return Zt;Hf=1;var e=Jl(),a=mp(),r=th(),t=zs(),n=Ql(),i=eh(),u=He(),s=1,o=2;function c(f,d){return t(f)&&n(d)?i(u(f),d):function(l){var h=a(l,f);return h===void 0&&h===d?r(l,f):e(d,h,s|o)}}return Zt=c,Zt}var Jt,zf;function ah(){if(zf)return Jt;zf=1;function e(a){return function(r){return r==null?void 0:r[a]}}return Jt=e,Jt}var Qt,Vf;function xp(){if(Vf)return Qt;Vf=1;var e=ur();function a(r){return function(t){return e(t,r)}}return Qt=a,Qt}var ea,Kf;function wp(){if(Kf)return ea;Kf=1;var e=ah(),a=xp(),r=zs(),t=He();function n(i){return r(i)?e(t(i)):a(i)}return ea=n,ea}var ra,Wf;function ge(){if(Wf)return ra;Wf=1;var e=vp(),a=qp(),r=Se(),t=J(),n=wp();function i(u){return typeof u=="function"?u:u==null?r:typeof u=="object"?t(u)?a(u[0],u[1]):e(u):n(u)}return ra=i,ra}var na,$f;function ih(){if($f)return na;$f=1;var e=kl(),a=ap(),r=ge(),t=J();function n(i,u){var s=t(i)?e:a;return s(i,r(u,3))}return na=n,na}var ta,Yf;function Rp(){if(Yf)return ta;Yf=1;var e=Object.prototype,a=e.hasOwnProperty;function r(t,n){return t!=null&&a.call(t,n)}return ta=r,ta}var aa,Xf;function sh(){if(Xf)return aa;Xf=1;var e=Rp(),a=nh();function r(t,n){return t!=null&&a(t,n,e)}return aa=r,aa}var ia,Zf;function Ep(){if(Zf)return ia;Zf=1;var e=Ls(),a=Ne(),r=Be(),t=J(),n=pe(),i=Oe(),u=nr(),s=Ue(),o="[object Map]",c="[object Set]",f=Object.prototype,d=f.hasOwnProperty;function l(h){if(h==null)return!0;if(n(h)&&(t(h)||typeof h=="string"||typeof h.splice=="function"||i(h)||s(h)||r(h)))return!h.length;var m=a(h);if(m==o||m==c)return!h.size;if(u(h))return!e(h).length;for(var p in h)if(d.call(h,p))return!1;return!0}return ia=l,ia}var sa,Jf;function uh(){if(Jf)return sa;Jf=1;function e(a){return a===void 0}return sa=e,sa}var ua,Qf;function oh(){if(Qf)return ua;Qf=1;var e=ar(),a=pe();function r(t,n){var i=-1,u=a(t)?Array(t.length):[];return e(t,function(s,o,c){u[++i]=n(s,o,c)}),u}return ua=r,ua}var oa,ec;function fh(){if(ec)return oa;ec=1;var e=ir(),a=ge(),r=oh(),t=J();function n(i,u){var s=t(i)?e:r;return s(i,a(u,3))}return oa=n,oa}var fa,rc;function Cp(){if(rc)return fa;rc=1;function e(a,r,t,n){var i=-1,u=a==null?0:a.length;for(n&&u&&(t=a[++i]);++i<u;)t=r(t,a[i],i,a);return t}return fa=e,fa}var ca,nc;function Sp(){if(nc)return ca;nc=1;function e(a,r,t,n,i){return i(a,function(u,s,o){t=n?(n=!1,u):r(t,u,s,o)}),t}return ca=e,ca}var da,tc;function ch(){if(tc)return da;tc=1;var e=Cp(),a=ar(),r=ge(),t=Sp(),n=J();function i(u,s,o){var c=n(u)?e:t,f=arguments.length<3;return c(u,r(s,4),o,f,a)}return da=i,da}var la,ac;function Ip(){if(ac)return la;ac=1;var e=Re(),a=J(),r=he(),t="[object String]";function n(i){return typeof i=="string"||!a(i)&&r(i)&&e(i)==t}return la=n,la}var ha,ic;function Ap(){if(ic)return ha;ic=1;var e=ah(),a=e("length");return ha=a,ha}var va,sc;function Tp(){if(sc)return va;sc=1;var e="\\ud800-\\udfff",a="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",t="\\u20d0-\\u20ff",n=a+r+t,i="\\ufe0e\\ufe0f",u="\\u200d",s=RegExp("["+u+e+n+i+"]");function o(c){return s.test(c)}return va=o,va}var pa,uc;function Op(){if(uc)return pa;uc=1;var e="\\ud800-\\udfff",a="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",t="\\u20d0-\\u20ff",n=a+r+t,i="\\ufe0e\\ufe0f",u="["+e+"]",s="["+n+"]",o="\\ud83c[\\udffb-\\udfff]",c="(?:"+s+"|"+o+")",f="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",l="[\\ud800-\\udbff][\\udc00-\\udfff]",h="\\u200d",m=c+"?",p="["+i+"]?",v="(?:"+h+"(?:"+[f,d,l].join("|")+")"+p+m+")*",b=p+m+v,g="(?:"+[f+s+"?",s,d,l,u].join("|")+")",_=RegExp(o+"(?="+o+")|"+g+b,"g");function y(q){for(var x=_.lastIndex=0;_.test(q);)++x;return x}return pa=y,pa}var ga,oc;function Np(){if(oc)return ga;oc=1;var e=Ap(),a=Tp(),r=Op();function t(n){return a(n)?r(n):e(n)}return ga=t,ga}var _a,fc;function jp(){if(fc)return _a;fc=1;var e=Ls(),a=Ne(),r=pe(),t=Ip(),n=Np(),i="[object Map]",u="[object Set]";function s(o){if(o==null)return 0;if(r(o))return t(o)?n(o):o.length;var c=a(o);return c==i||c==u?o.size:e(o).length}return _a=s,_a}var ba,cc;function Pp(){if(cc)return ba;cc=1;var e=js(),a=Hl(),r=Us(),t=ge(),n=tr(),i=J(),u=Oe(),s=De(),o=ae(),c=Ue();function f(d,l,h){var m=i(d),p=m||u(d)||c(d);if(l=t(l,4),h==null){var v=d&&d.constructor;p?h=m?new v:[]:o(d)?h=s(v)?a(n(d)):{}:h={}}return(p?e:r)(d,function(b,g,_){return l(h,b,g,_)}),h}return ba=f,ba}var ma,dc;function kp(){if(dc)return ma;dc=1;var e=Te(),a=Be(),r=J(),t=e?e.isConcatSpreadable:void 0;function n(i){return r(i)||a(i)||!!(t&&i&&i[t])}return ma=n,ma}var ya,lc;function Vs(){if(lc)return ya;lc=1;var e=Fs(),a=kp();function r(t,n,i,u,s){var o=-1,c=t.length;for(i||(i=a),s||(s=[]);++o<c;){var f=t[o];n>0&&i(f)?n>1?r(f,n-1,i,u,s):e(s,f):u||(s[s.length]=f)}return s}return ya=r,ya}var qa,hc;function Lp(){if(hc)return qa;hc=1;function e(a,r,t){switch(t.length){case 0:return a.call(r);case 1:return a.call(r,t[0]);case 2:return a.call(r,t[0],t[1]);case 3:return a.call(r,t[0],t[1],t[2])}return a.apply(r,t)}return qa=e,qa}var xa,vc;function dh(){if(vc)return xa;vc=1;var e=Lp(),a=Math.max;function r(t,n,i){return n=a(n===void 0?t.length-1:n,0),function(){for(var u=arguments,s=-1,o=a(u.length-n,0),c=Array(o);++s<o;)c[s]=u[n+s];s=-1;for(var f=Array(n+1);++s<n;)f[s]=u[s];return f[n]=i(c),e(t,this,f)}}return xa=r,xa}var wa,pc;function Mp(){if(pc)return wa;pc=1;var e=Gs(),a=Tl(),r=Se(),t=a?function(n,i){return a(n,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:r;return wa=t,wa}var Ra,gc;function Fp(){if(gc)return Ra;gc=1;var e=800,a=16,r=Date.now;function t(n){var i=0,u=0;return function(){var s=r(),o=a-(s-u);if(u=s,o>0){if(++i>=e)return arguments[0]}else i=0;return n.apply(void 0,arguments)}}return Ra=t,Ra}var Ea,_c;function lh(){if(_c)return Ea;_c=1;var e=Mp(),a=Fp(),r=a(e);return Ea=r,Ea}var Ca,bc;function or(){if(bc)return Ca;bc=1;var e=Se(),a=dh(),r=lh();function t(n,i){return r(a(n,i,e),n+"")}return Ca=t,Ca}var Sa,mc;function hh(){if(mc)return Sa;mc=1;function e(a,r,t,n){for(var i=a.length,u=t+(n?1:-1);n?u--:++u<i;)if(r(a[u],u,a))return u;return-1}return Sa=e,Sa}var Ia,yc;function Dp(){if(yc)return Ia;yc=1;function e(a){return a!==a}return Ia=e,Ia}var Aa,qc;function Gp(){if(qc)return Aa;qc=1;function e(a,r,t){for(var n=t-1,i=a.length;++n<i;)if(a[n]===r)return n;return-1}return Aa=e,Aa}var Ta,xc;function Bp(){if(xc)return Ta;xc=1;var e=hh(),a=Dp(),r=Gp();function t(n,i,u){return i===i?r(n,i,u):e(n,a,u)}return Ta=t,Ta}var Oa,wc;function Up(){if(wc)return Oa;wc=1;var e=Bp();function a(r,t){var n=r==null?0:r.length;return!!n&&e(r,t,0)>-1}return Oa=a,Oa}var Na,Rc;function Hp(){if(Rc)return Na;Rc=1;function e(a,r,t){for(var n=-1,i=a==null?0:a.length;++n<i;)if(t(r,a[n]))return!0;return!1}return Na=e,Na}var ja,Ec;function zp(){if(Ec)return ja;Ec=1;function e(){}return ja=e,ja}var Pa,Cc;function Vp(){if(Cc)return Pa;Cc=1;var e=Gl(),a=zp(),r=Hs(),t=1/0,n=e&&1/r(new e([,-0]))[1]==t?function(i){return new e(i)}:a;return Pa=n,Pa}var ka,Sc;function Kp(){if(Sc)return ka;Sc=1;var e=Yl(),a=Up(),r=Hp(),t=Xl(),n=Vp(),i=Hs(),u=200;function s(o,c,f){var d=-1,l=a,h=o.length,m=!0,p=[],v=p;if(f)m=!1,l=r;else if(h>=u){var b=c?null:n(o);if(b)return i(b);m=!1,l=t,v=new e}else v=c?[]:p;e:for(;++d<h;){var g=o[d],_=c?c(g):g;if(g=f||g!==0?g:0,m&&_===_){for(var y=v.length;y--;)if(v[y]===_)continue e;c&&v.push(_),p.push(g)}else l(v,_,f)||(v!==p&&v.push(_),p.push(g))}return p}return ka=s,ka}var La,Ic;function vh(){if(Ic)return La;Ic=1;var e=pe(),a=he();function r(t){return a(t)&&e(t)}return La=r,La}var Ma,Ac;function Wp(){if(Ac)return Ma;Ac=1;var e=Vs(),a=or(),r=Kp(),t=vh(),n=a(function(i){return r(e(i,1,t,!0))});return Ma=n,Ma}var Fa,Tc;function $p(){if(Tc)return Fa;Tc=1;var e=ir();function a(r,t){return e(t,function(n){return r[n]})}return Fa=a,Fa}var Da,Oc;function ph(){if(Oc)return Da;Oc=1;var e=$p(),a=qe();function r(t){return t==null?[]:e(t,a(t))}return Da=r,Da}var Ga,Nc;function ie(){if(Nc)return Ga;Nc=1;var e;if(typeof Ts=="function")try{e={clone:rp(),constant:Gs(),each:$l(),filter:ih(),has:sh(),isArray:J(),isEmpty:Ep(),isFunction:De(),isUndefined:uh(),keys:qe(),map:fh(),reduce:ch(),size:jp(),transform:Pp(),union:Wp(),values:ph()}}catch{}return e||(e=window._),Ga=e,Ga}var Ba,jc;function Ks(){if(jc)return Ba;jc=1;var e=ie();Ba=n;var a="\0",r="\0",t="";function n(f){this._isDirected=e.has(f,"directed")?f.directed:!0,this._isMultigraph=e.has(f,"multigraph")?f.multigraph:!1,this._isCompound=e.has(f,"compound")?f.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[r]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}n.prototype._nodeCount=0,n.prototype._edgeCount=0,n.prototype.isDirected=function(){return this._isDirected},n.prototype.isMultigraph=function(){return this._isMultigraph},n.prototype.isCompound=function(){return this._isCompound},n.prototype.setGraph=function(f){return this._label=f,this},n.prototype.graph=function(){return this._label},n.prototype.setDefaultNodeLabel=function(f){return e.isFunction(f)||(f=e.constant(f)),this._defaultNodeLabelFn=f,this},n.prototype.nodeCount=function(){return this._nodeCount},n.prototype.nodes=function(){return e.keys(this._nodes)},n.prototype.sources=function(){var f=this;return e.filter(this.nodes(),function(d){return e.isEmpty(f._in[d])})},n.prototype.sinks=function(){var f=this;return e.filter(this.nodes(),function(d){return e.isEmpty(f._out[d])})},n.prototype.setNodes=function(f,d){var l=arguments,h=this;return e.each(f,function(m){l.length>1?h.setNode(m,d):h.setNode(m)}),this},n.prototype.setNode=function(f,d){return e.has(this._nodes,f)?(arguments.length>1&&(this._nodes[f]=d),this):(this._nodes[f]=arguments.length>1?d:this._defaultNodeLabelFn(f),this._isCompound&&(this._parent[f]=r,this._children[f]={},this._children[r][f]=!0),this._in[f]={},this._preds[f]={},this._out[f]={},this._sucs[f]={},++this._nodeCount,this)},n.prototype.node=function(f){return this._nodes[f]},n.prototype.hasNode=function(f){return e.has(this._nodes,f)},n.prototype.removeNode=function(f){var d=this;if(e.has(this._nodes,f)){var l=function(h){d.removeEdge(d._edgeObjs[h])};delete this._nodes[f],this._isCompound&&(this._removeFromParentsChildList(f),delete this._parent[f],e.each(this.children(f),function(h){d.setParent(h)}),delete this._children[f]),e.each(e.keys(this._in[f]),l),delete this._in[f],delete this._preds[f],e.each(e.keys(this._out[f]),l),delete this._out[f],delete this._sucs[f],--this._nodeCount}return this},n.prototype.setParent=function(f,d){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(d))d=r;else{d+="";for(var l=d;!e.isUndefined(l);l=this.parent(l))if(l===f)throw new Error("Setting "+d+" as parent of "+f+" would create a cycle");this.setNode(d)}return this.setNode(f),this._removeFromParentsChildList(f),this._parent[f]=d,this._children[d][f]=!0,this},n.prototype._removeFromParentsChildList=function(f){delete this._children[this._parent[f]][f]},n.prototype.parent=function(f){if(this._isCompound){var d=this._parent[f];if(d!==r)return d}},n.prototype.children=function(f){if(e.isUndefined(f)&&(f=r),this._isCompound){var d=this._children[f];if(d)return e.keys(d)}else{if(f===r)return this.nodes();if(this.hasNode(f))return[]}},n.prototype.predecessors=function(f){var d=this._preds[f];if(d)return e.keys(d)},n.prototype.successors=function(f){var d=this._sucs[f];if(d)return e.keys(d)},n.prototype.neighbors=function(f){var d=this.predecessors(f);if(d)return e.union(d,this.successors(f))},n.prototype.isLeaf=function(f){var d;return this.isDirected()?d=this.successors(f):d=this.neighbors(f),d.length===0},n.prototype.filterNodes=function(f){var d=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});d.setGraph(this.graph());var l=this;e.each(this._nodes,function(p,v){f(v)&&d.setNode(v,p)}),e.each(this._edgeObjs,function(p){d.hasNode(p.v)&&d.hasNode(p.w)&&d.setEdge(p,l.edge(p))});var h={};function m(p){var v=l.parent(p);return v===void 0||d.hasNode(v)?(h[p]=v,v):v in h?h[v]:m(v)}return this._isCompound&&e.each(d.nodes(),function(p){d.setParent(p,m(p))}),d},n.prototype.setDefaultEdgeLabel=function(f){return e.isFunction(f)||(f=e.constant(f)),this._defaultEdgeLabelFn=f,this},n.prototype.edgeCount=function(){return this._edgeCount},n.prototype.edges=function(){return e.values(this._edgeObjs)},n.prototype.setPath=function(f,d){var l=this,h=arguments;return e.reduce(f,function(m,p){return h.length>1?l.setEdge(m,p,d):l.setEdge(m,p),p}),this},n.prototype.setEdge=function(){var f,d,l,h,m=!1,p=arguments[0];typeof p=="object"&&p!==null&&"v"in p?(f=p.v,d=p.w,l=p.name,arguments.length===2&&(h=arguments[1],m=!0)):(f=p,d=arguments[1],l=arguments[3],arguments.length>2&&(h=arguments[2],m=!0)),f=""+f,d=""+d,e.isUndefined(l)||(l=""+l);var v=s(this._isDirected,f,d,l);if(e.has(this._edgeLabels,v))return m&&(this._edgeLabels[v]=h),this;if(!e.isUndefined(l)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(f),this.setNode(d),this._edgeLabels[v]=m?h:this._defaultEdgeLabelFn(f,d,l);var b=o(this._isDirected,f,d,l);return f=b.v,d=b.w,Object.freeze(b),this._edgeObjs[v]=b,i(this._preds[d],f),i(this._sucs[f],d),this._in[d][v]=b,this._out[f][v]=b,this._edgeCount++,this},n.prototype.edge=function(f,d,l){var h=arguments.length===1?c(this._isDirected,arguments[0]):s(this._isDirected,f,d,l);return this._edgeLabels[h]},n.prototype.hasEdge=function(f,d,l){var h=arguments.length===1?c(this._isDirected,arguments[0]):s(this._isDirected,f,d,l);return e.has(this._edgeLabels,h)},n.prototype.removeEdge=function(f,d,l){var h=arguments.length===1?c(this._isDirected,arguments[0]):s(this._isDirected,f,d,l),m=this._edgeObjs[h];return m&&(f=m.v,d=m.w,delete this._edgeLabels[h],delete this._edgeObjs[h],u(this._preds[d],f),u(this._sucs[f],d),delete this._in[d][h],delete this._out[f][h],this._edgeCount--),this},n.prototype.inEdges=function(f,d){var l=this._in[f];if(l){var h=e.values(l);return d?e.filter(h,function(m){return m.v===d}):h}},n.prototype.outEdges=function(f,d){var l=this._out[f];if(l){var h=e.values(l);return d?e.filter(h,function(m){return m.w===d}):h}},n.prototype.nodeEdges=function(f,d){var l=this.inEdges(f,d);if(l)return l.concat(this.outEdges(f,d))};function i(f,d){f[d]?f[d]++:f[d]=1}function u(f,d){--f[d]||delete f[d]}function s(f,d,l,h){var m=""+d,p=""+l;if(!f&&m>p){var v=m;m=p,p=v}return m+t+p+t+(e.isUndefined(h)?a:h)}function o(f,d,l,h){var m=""+d,p=""+l;if(!f&&m>p){var v=m;m=p,p=v}var b={v:m,w:p};return h&&(b.name=h),b}function c(f,d){return s(f,d.v,d.w,d.name)}return Ba}var Ua,Pc;function Yp(){return Pc||(Pc=1,Ua="2.1.8"),Ua}var Ha,kc;function Xp(){return kc||(kc=1,Ha={Graph:Ks(),version:Yp()}),Ha}var za,Lc;function Zp(){if(Lc)return za;Lc=1;var e=ie(),a=Ks();za={write:r,read:i};function r(u){var s={options:{directed:u.isDirected(),multigraph:u.isMultigraph(),compound:u.isCompound()},nodes:t(u),edges:n(u)};return e.isUndefined(u.graph())||(s.value=e.clone(u.graph())),s}function t(u){return e.map(u.nodes(),function(s){var o=u.node(s),c=u.parent(s),f={v:s};return e.isUndefined(o)||(f.value=o),e.isUndefined(c)||(f.parent=c),f})}function n(u){return e.map(u.edges(),function(s){var o=u.edge(s),c={v:s.v,w:s.w};return e.isUndefined(s.name)||(c.name=s.name),e.isUndefined(o)||(c.value=o),c})}function i(u){var s=new a(u.options).setGraph(u.value);return e.each(u.nodes,function(o){s.setNode(o.v,o.value),o.parent&&s.setParent(o.v,o.parent)}),e.each(u.edges,function(o){s.setEdge({v:o.v,w:o.w,name:o.name},o.value)}),s}return za}var Va,Mc;function Jp(){if(Mc)return Va;Mc=1;var e=ie();Va=a;function a(r){var t={},n=[],i;function u(s){e.has(t,s)||(t[s]=!0,i.push(s),e.each(r.successors(s),u),e.each(r.predecessors(s),u))}return e.each(r.nodes(),function(s){i=[],u(s),i.length&&n.push(i)}),n}return Va}var Ka,Fc;function gh(){if(Fc)return Ka;Fc=1;var e=ie();Ka=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(r){return r.key})},a.prototype.has=function(r){return e.has(this._keyIndices,r)},a.prototype.priority=function(r){var t=this._keyIndices[r];if(t!==void 0)return this._arr[t].priority},a.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},a.prototype.add=function(r,t){var n=this._keyIndices;if(r=String(r),!e.has(n,r)){var i=this._arr,u=i.length;return n[r]=u,i.push({key:r,priority:t}),this._decrease(u),!0}return!1},a.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var r=this._arr.pop();return delete this._keyIndices[r.key],this._heapify(0),r.key},a.prototype.decrease=function(r,t){var n=this._keyIndices[r];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+r+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},a.prototype._heapify=function(r){var t=this._arr,n=2*r,i=n+1,u=r;n<t.length&&(u=t[n].priority<t[u].priority?n:u,i<t.length&&(u=t[i].priority<t[u].priority?i:u),u!==r&&(this._swap(r,u),this._heapify(u)))},a.prototype._decrease=function(r){for(var t=this._arr,n=t[r].priority,i;r!==0&&(i=r>>1,!(t[i].priority<n));)this._swap(r,i),r=i},a.prototype._swap=function(r,t){var n=this._arr,i=this._keyIndices,u=n[r],s=n[t];n[r]=s,n[t]=u,i[s.key]=r,i[u.key]=t},Ka}var Wa,Dc;function _h(){if(Dc)return Wa;Dc=1;var e=ie(),a=gh();Wa=t;var r=e.constant(1);function t(i,u,s,o){return n(i,String(u),s||r,o||function(c){return i.outEdges(c)})}function n(i,u,s,o){var c={},f=new a,d,l,h=function(m){var p=m.v!==d?m.v:m.w,v=c[p],b=s(m),g=l.distance+b;if(b<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+m+" Weight: "+b);g<v.distance&&(v.distance=g,v.predecessor=d,f.decrease(p,g))};for(i.nodes().forEach(function(m){var p=m===u?0:Number.POSITIVE_INFINITY;c[m]={distance:p},f.add(m,p)});f.size()>0&&(d=f.removeMin(),l=c[d],l.distance!==Number.POSITIVE_INFINITY);)o(d).forEach(h);return c}return Wa}var $a,Gc;function Qp(){if(Gc)return $a;Gc=1;var e=_h(),a=ie();$a=r;function r(t,n,i){return a.transform(t.nodes(),function(u,s){u[s]=e(t,s,n,i)},{})}return $a}var Ya,Bc;function bh(){if(Bc)return Ya;Bc=1;var e=ie();Ya=a;function a(r){var t=0,n=[],i={},u=[];function s(o){var c=i[o]={onStack:!0,lowlink:t,index:t++};if(n.push(o),r.successors(o).forEach(function(l){e.has(i,l)?i[l].onStack&&(c.lowlink=Math.min(c.lowlink,i[l].index)):(s(l),c.lowlink=Math.min(c.lowlink,i[l].lowlink))}),c.lowlink===c.index){var f=[],d;do d=n.pop(),i[d].onStack=!1,f.push(d);while(o!==d);u.push(f)}}return r.nodes().forEach(function(o){e.has(i,o)||s(o)}),u}return Ya}var Xa,Uc;function eg(){if(Uc)return Xa;Uc=1;var e=ie(),a=bh();Xa=r;function r(t){return e.filter(a(t),function(n){return n.length>1||n.length===1&&t.hasEdge(n[0],n[0])})}return Xa}var Za,Hc;function rg(){if(Hc)return Za;Hc=1;var e=ie();Za=r;var a=e.constant(1);function r(n,i,u){return t(n,i||a,u||function(s){return n.outEdges(s)})}function t(n,i,u){var s={},o=n.nodes();return o.forEach(function(c){s[c]={},s[c][c]={distance:0},o.forEach(function(f){c!==f&&(s[c][f]={distance:Number.POSITIVE_INFINITY})}),u(c).forEach(function(f){var d=f.v===c?f.w:f.v,l=i(f);s[c][d]={distance:l,predecessor:c}})}),o.forEach(function(c){var f=s[c];o.forEach(function(d){var l=s[d];o.forEach(function(h){var m=l[c],p=f[h],v=l[h],b=m.distance+p.distance;b<v.distance&&(v.distance=b,v.predecessor=p.predecessor)})})}),s}return Za}var Ja,zc;function mh(){if(zc)return Ja;zc=1;var e=ie();Ja=a,a.CycleException=r;function a(t){var n={},i={},u=[];function s(o){if(e.has(i,o))throw new r;e.has(n,o)||(i[o]=!0,n[o]=!0,e.each(t.predecessors(o),s),delete i[o],u.push(o))}if(e.each(t.sinks(),s),e.size(n)!==t.nodeCount())throw new r;return u}function r(){}return r.prototype=new Error,Ja}var Qa,Vc;function ng(){if(Vc)return Qa;Vc=1;var e=mh();Qa=a;function a(r){try{e(r)}catch(t){if(t instanceof e.CycleException)return!1;throw t}return!0}return Qa}var ei,Kc;function yh(){if(Kc)return ei;Kc=1;var e=ie();ei=a;function a(t,n,i){e.isArray(n)||(n=[n]);var u=(t.isDirected()?t.successors:t.neighbors).bind(t),s=[],o={};return e.each(n,function(c){if(!t.hasNode(c))throw new Error("Graph does not have node: "+c);r(t,c,i==="post",o,u,s)}),s}function r(t,n,i,u,s,o){e.has(u,n)||(u[n]=!0,i||o.push(n),e.each(s(n),function(c){r(t,c,i,u,s,o)}),i&&o.push(n))}return ei}var ri,Wc;function tg(){if(Wc)return ri;Wc=1;var e=yh();ri=a;function a(r,t){return e(r,t,"post")}return ri}var ni,$c;function ag(){if($c)return ni;$c=1;var e=yh();ni=a;function a(r,t){return e(r,t,"pre")}return ni}var ti,Yc;function ig(){if(Yc)return ti;Yc=1;var e=ie(),a=Ks(),r=gh();ti=t;function t(n,i){var u=new a,s={},o=new r,c;function f(l){var h=l.v===c?l.w:l.v,m=o.priority(h);if(m!==void 0){var p=i(l);p<m&&(s[h]=c,o.decrease(h,p))}}if(n.nodeCount()===0)return u;e.each(n.nodes(),function(l){o.add(l,Number.POSITIVE_INFINITY),u.setNode(l)}),o.decrease(n.nodes()[0],0);for(var d=!1;o.size()>0;){if(c=o.removeMin(),e.has(s,c))u.setEdge(c,s[c]);else{if(d)throw new Error("Input graph is not connected: "+n);d=!0}n.nodeEdges(c).forEach(f)}return u}return ti}var ai,Xc;function sg(){return Xc||(Xc=1,ai={components:Jp(),dijkstra:_h(),dijkstraAll:Qp(),findCycles:eg(),floydWarshall:rg(),isAcyclic:ng(),postorder:tg(),preorder:ag(),prim:ig(),tarjan:bh(),topsort:mh()}),ai}var ii,Zc;function ug(){if(Zc)return ii;Zc=1;var e=Xp();return ii={Graph:e.Graph,json:Zp(),alg:sg(),version:e.version},ii}var si,Jc;function oe(){if(Jc)return si;Jc=1;var e;if(typeof Ts=="function")try{e=ug()}catch{}return e||(e=window.graphlib),si=e,si}var ui,Qc;function og(){if(Qc)return ui;Qc=1;var e=Vl(),a=1,r=4;function t(n){return e(n,a|r)}return ui=t,ui}var oi,ed;function fr(){if(ed)return oi;ed=1;var e=Ae(),a=pe(),r=er(),t=ae();function n(i,u,s){if(!t(s))return!1;var o=typeof u;return(o=="number"?a(s)&&r(u,s.length):o=="string"&&u in s)?e(s[u],i):!1}return oi=n,oi}var fi,rd;function fg(){if(rd)return fi;rd=1;var e=or(),a=Ae(),r=fr(),t=Ce(),n=Object.prototype,i=n.hasOwnProperty,u=e(function(s,o){s=Object(s);var c=-1,f=o.length,d=f>2?o[2]:void 0;for(d&&r(o[0],o[1],d)&&(f=1);++c<f;)for(var l=o[c],h=t(l),m=-1,p=h.length;++m<p;){var v=h[m],b=s[v];(b===void 0||a(b,n[v])&&!i.call(s,v))&&(s[v]=l[v])}return s});return fi=u,fi}var ci,nd;function cg(){if(nd)return ci;nd=1;var e=ge(),a=pe(),r=qe();function t(n){return function(i,u,s){var o=Object(i);if(!a(i)){var c=e(u,3);i=r(i),u=function(d){return c(o[d],d,o)}}var f=n(i,u,s);return f>-1?o[c?i[f]:f]:void 0}}return ci=t,ci}var di,td;function dg(){if(td)return di;td=1;var e=/\s/;function a(r){for(var t=r.length;t--&&e.test(r.charAt(t)););return t}return di=a,di}var li,ad;function lg(){if(ad)return li;ad=1;var e=dg(),a=/^\s+/;function r(t){return t&&t.slice(0,e(t)+1).replace(a,"")}return li=r,li}var hi,id;function hg(){if(id)return hi;id=1;var e=lg(),a=ae(),r=je(),t=NaN,n=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,u=/^0o[0-7]+$/i,s=parseInt;function o(c){if(typeof c=="number")return c;if(r(c))return t;if(a(c)){var f=typeof c.valueOf=="function"?c.valueOf():c;c=a(f)?f+"":f}if(typeof c!="string")return c===0?c:+c;c=e(c);var d=i.test(c);return d||u.test(c)?s(c.slice(2),d?2:8):n.test(c)?t:+c}return hi=o,hi}var vi,sd;function qh(){if(sd)return vi;sd=1;var e=hg(),a=1/0,r=17976931348623157e292;function t(n){if(!n)return n===0?n:0;if(n=e(n),n===a||n===-a){var i=n<0?-1:1;return i*r}return n===n?n:0}return vi=t,vi}var pi,ud;function vg(){if(ud)return pi;ud=1;var e=qh();function a(r){var t=e(r),n=t%1;return t===t?n?t-n:t:0}return pi=a,pi}var gi,od;function pg(){if(od)return gi;od=1;var e=hh(),a=ge(),r=vg(),t=Math.max;function n(i,u,s){var o=i==null?0:i.length;if(!o)return-1;var c=s==null?0:r(s);return c<0&&(c=t(o+c,0)),e(i,a(u,3),c)}return gi=n,gi}var _i,fd;function gg(){if(fd)return _i;fd=1;var e=cg(),a=pg(),r=e(a);return _i=r,_i}var bi,cd;function xh(){if(cd)return bi;cd=1;var e=Vs();function a(r){var t=r==null?0:r.length;return t?e(r,1):[]}return bi=a,bi}var mi,dd;function _g(){if(dd)return mi;dd=1;var e=Bs(),a=Kl(),r=Ce();function t(n,i){return n==null?n:e(n,a(i),r)}return mi=t,mi}var yi,ld;function bg(){if(ld)return yi;ld=1;function e(a){var r=a==null?0:a.length;return r?a[r-1]:void 0}return yi=e,yi}var qi,hd;function mg(){if(hd)return qi;hd=1;var e=Je(),a=Us(),r=ge();function t(n,i){var u={};return i=r(i,3),a(n,function(s,o,c){e(u,o,i(s,o,c))}),u}return qi=t,qi}var xi,vd;function Ws(){if(vd)return xi;vd=1;var e=je();function a(r,t,n){for(var i=-1,u=r.length;++i<u;){var s=r[i],o=t(s);if(o!=null&&(c===void 0?o===o&&!e(o):n(o,c)))var c=o,f=s}return f}return xi=a,xi}var wi,pd;function yg(){if(pd)return wi;pd=1;function e(a,r){return a>r}return wi=e,wi}var Ri,gd;function qg(){if(gd)return Ri;gd=1;var e=Ws(),a=yg(),r=Se();function t(n){return n&&n.length?e(n,r,a):void 0}return Ri=t,Ri}var Ei,_d;function wh(){if(_d)return Ei;_d=1;var e=Je(),a=Ae();function r(t,n,i){(i!==void 0&&!a(t[n],i)||i===void 0&&!(n in t))&&e(t,n,i)}return Ei=r,Ei}var Ci,bd;function xg(){if(bd)return Ci;bd=1;var e=Re(),a=tr(),r=he(),t="[object Object]",n=Function.prototype,i=Object.prototype,u=n.toString,s=i.hasOwnProperty,o=u.call(Object);function c(f){if(!r(f)||e(f)!=t)return!1;var d=a(f);if(d===null)return!0;var l=s.call(d,"constructor")&&d.constructor;return typeof l=="function"&&l instanceof l&&u.call(l)==o}return Ci=c,Ci}var Si,md;function Rh(){if(md)return Si;md=1;function e(a,r){if(!(r==="constructor"&&typeof a[r]=="function")&&r!="__proto__")return a[r]}return Si=e,Si}var Ii,yd;function wg(){if(yd)return Ii;yd=1;var e=Ge(),a=Ce();function r(t){return e(t,a(t))}return Ii=r,Ii}var Ai,qd;function Rg(){if(qd)return Ai;qd=1;var e=wh(),a=jl(),r=Ul(),t=Pl(),n=zl(),i=Be(),u=J(),s=vh(),o=Oe(),c=De(),f=ae(),d=xg(),l=Ue(),h=Rh(),m=wg();function p(v,b,g,_,y,q,x){var w=h(v,g),T=h(b,g),I=x.get(T);if(I){e(v,g,I);return}var A=q?q(w,T,g+"",v,b,x):void 0,O=A===void 0;if(O){var P=u(T),L=!P&&o(T),M=!P&&!L&&l(T);A=T,P||L||M?u(w)?A=w:s(w)?A=t(w):L?(O=!1,A=a(T,!0)):M?(O=!1,A=r(T,!0)):A=[]:d(T)||i(T)?(A=w,i(w)?A=m(w):(!f(w)||c(w))&&(A=n(T))):O=!1}O&&(x.set(T,A),y(A,T,_,q,x),x.delete(T)),e(v,g,A)}return Ai=p,Ai}var Ti,xd;function Eg(){if(xd)return Ti;xd=1;var e=Ze(),a=wh(),r=Bs(),t=Rg(),n=ae(),i=Ce(),u=Rh();function s(o,c,f,d,l){o!==c&&r(c,function(h,m){if(l||(l=new e),n(h))t(o,c,m,f,s,d,l);else{var p=d?d(u(o,m),h,m+"",o,c,l):void 0;p===void 0&&(p=h),a(o,m,p)}},i)}return Ti=s,Ti}var Oi,wd;function Cg(){if(wd)return Oi;wd=1;var e=or(),a=fr();function r(t){return e(function(n,i){var u=-1,s=i.length,o=s>1?i[s-1]:void 0,c=s>2?i[2]:void 0;for(o=t.length>3&&typeof o=="function"?(s--,o):void 0,c&&a(i[0],i[1],c)&&(o=s<3?void 0:o,s=1),n=Object(n);++u<s;){var f=i[u];f&&t(n,f,u,o)}return n})}return Oi=r,Oi}var Ni,Rd;function Sg(){if(Rd)return Ni;Rd=1;var e=Eg(),a=Cg(),r=a(function(t,n,i){e(t,n,i)});return Ni=r,Ni}var ji,Ed;function Eh(){if(Ed)return ji;Ed=1;function e(a,r){return a<r}return ji=e,ji}var Pi,Cd;function Ig(){if(Cd)return Pi;Cd=1;var e=Ws(),a=Eh(),r=Se();function t(n){return n&&n.length?e(n,r,a):void 0}return Pi=t,Pi}var ki,Sd;function Ag(){if(Sd)return ki;Sd=1;var e=Ws(),a=ge(),r=Eh();function t(n,i){return n&&n.length?e(n,a(i,2),r):void 0}return ki=t,ki}var Li,Id;function Tg(){if(Id)return Li;Id=1;var e=fe(),a=function(){return e.Date.now()};return Li=a,Li}var Mi,Ad;function Og(){if(Ad)return Mi;Ad=1;var e=Qe(),a=sr(),r=er(),t=ae(),n=He();function i(u,s,o,c){if(!t(u))return u;s=a(s,u);for(var f=-1,d=s.length,l=d-1,h=u;h!=null&&++f<d;){var m=n(s[f]),p=o;if(m==="__proto__"||m==="constructor"||m==="prototype")return u;if(f!=l){var v=h[m];p=c?c(v,m,h):void 0,p===void 0&&(p=t(v)?v:r(s[f+1])?[]:{})}e(h,m,p),h=h[m]}return u}return Mi=i,Mi}var Fi,Td;function Ng(){if(Td)return Fi;Td=1;var e=ur(),a=Og(),r=sr();function t(n,i,u){for(var s=-1,o=i.length,c={};++s<o;){var f=i[s],d=e(n,f);u(d,f)&&a(c,r(f,n),d)}return c}return Fi=t,Fi}var Di,Od;function jg(){if(Od)return Di;Od=1;var e=Ng(),a=th();function r(t,n){return e(t,n,function(i,u){return a(t,u)})}return Di=r,Di}var Gi,Nd;function Pg(){if(Nd)return Gi;Nd=1;var e=xh(),a=dh(),r=lh();function t(n){return r(a(n,void 0,e),n+"")}return Gi=t,Gi}var Bi,jd;function kg(){if(jd)return Bi;jd=1;var e=jg(),a=Pg(),r=a(function(t,n){return t==null?{}:e(t,n)});return Bi=r,Bi}var Ui,Pd;function Lg(){if(Pd)return Ui;Pd=1;var e=Math.ceil,a=Math.max;function r(t,n,i,u){for(var s=-1,o=a(e((n-t)/(i||1)),0),c=Array(o);o--;)c[u?o:++s]=t,t+=i;return c}return Ui=r,Ui}var Hi,kd;function Mg(){if(kd)return Hi;kd=1;var e=Lg(),a=fr(),r=qh();function t(n){return function(i,u,s){return s&&typeof s!="number"&&a(i,u,s)&&(u=s=void 0),i=r(i),u===void 0?(u=i,i=0):u=r(u),s=s===void 0?i<u?1:-1:r(s),e(i,u,s,n)}}return Hi=t,Hi}var zi,Ld;function Fg(){if(Ld)return zi;Ld=1;var e=Mg(),a=e();return zi=a,zi}var Vi,Md;function Dg(){if(Md)return Vi;Md=1;function e(a,r){var t=a.length;for(a.sort(r);t--;)a[t]=a[t].value;return a}return Vi=e,Vi}var Ki,Fd;function Gg(){if(Fd)return Ki;Fd=1;var e=je();function a(r,t){if(r!==t){var n=r!==void 0,i=r===null,u=r===r,s=e(r),o=t!==void 0,c=t===null,f=t===t,d=e(t);if(!c&&!d&&!s&&r>t||s&&o&&f&&!c&&!d||i&&o&&f||!n&&f||!u)return 1;if(!i&&!s&&!d&&r<t||d&&n&&u&&!i&&!s||c&&n&&u||!o&&u||!f)return-1}return 0}return Ki=a,Ki}var Wi,Dd;function Bg(){if(Dd)return Wi;Dd=1;var e=Gg();function a(r,t,n){for(var i=-1,u=r.criteria,s=t.criteria,o=u.length,c=n.length;++i<o;){var f=e(u[i],s[i]);if(f){if(i>=c)return f;var d=n[i];return f*(d=="desc"?-1:1)}}return r.index-t.index}return Wi=a,Wi}var $i,Gd;function Ug(){if(Gd)return $i;Gd=1;var e=ir(),a=ur(),r=ge(),t=oh(),n=Dg(),i=rr(),u=Bg(),s=Se(),o=J();function c(f,d,l){d.length?d=e(d,function(p){return o(p)?function(v){return a(v,p.length===1?p[0]:p)}:p}):d=[s];var h=-1;d=e(d,i(r));var m=t(f,function(p,v,b){var g=e(d,function(_){return _(p)});return{criteria:g,index:++h,value:p}});return n(m,function(p,v){return u(p,v,l)})}return $i=c,$i}var Yi,Bd;function Hg(){if(Bd)return Yi;Bd=1;var e=Vs(),a=Ug(),r=or(),t=fr(),n=r(function(i,u){if(i==null)return[];var s=u.length;return s>1&&t(i,u[0],u[1])?u=[]:s>2&&t(u[0],u[1],u[2])&&(u=[u[0]]),a(i,e(u,1),[])});return Yi=n,Yi}var Xi,Ud;function zg(){if(Ud)return Xi;Ud=1;var e=rh(),a=0;function r(t){var n=++a;return e(t)+n}return Xi=r,Xi}var Zi,Hd;function Vg(){if(Hd)return Zi;Hd=1;function e(a,r,t){for(var n=-1,i=a.length,u=r.length,s={};++n<i;){var o=n<u?r[n]:void 0;t(s,a[n],o)}return s}return Zi=e,Zi}var Ji,zd;function Kg(){if(zd)return Ji;zd=1;var e=Qe(),a=Vg();function r(t,n){return a(t||[],n||[],e)}return Ji=r,Ji}var Qi,Vd;function X(){if(Vd)return Qi;Vd=1;var e;if(typeof Ts=="function")try{e={cloneDeep:og(),constant:Gs(),defaults:fg(),each:$l(),filter:ih(),find:gg(),flatten:xh(),forEach:Wl(),forIn:_g(),has:sh(),isUndefined:uh(),last:bg(),map:fh(),mapValues:mg(),max:qg(),merge:Sg(),min:Ig(),minBy:Ag(),now:Tg(),pick:kg(),range:Fg(),reduce:ch(),sortBy:Hg(),uniqueId:zg(),values:ph(),zipObject:Kg()}}catch{}return e||(e=window._),Qi=e,Qi}var es,Kd;function Wg(){if(Kd)return es;Kd=1,es=e;function e(){var t={};t._next=t._prev=t,this._sentinel=t}e.prototype.dequeue=function(){var t=this._sentinel,n=t._prev;if(n!==t)return a(n),n},e.prototype.enqueue=function(t){var n=this._sentinel;t._prev&&t._next&&a(t),t._next=n._next,n._next._prev=t,n._next=t,t._prev=n},e.prototype.toString=function(){for(var t=[],n=this._sentinel,i=n._prev;i!==n;)t.push(JSON.stringify(i,r)),i=i._prev;return"["+t.join(", ")+"]"};function a(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function r(t,n){if(t!=="_next"&&t!=="_prev")return n}return es}var rs,Wd;function $g(){if(Wd)return rs;Wd=1;var e=X(),a=oe().Graph,r=Wg();rs=n;var t=e.constant(1);function n(c,f){if(c.nodeCount()<=1)return[];var d=s(c,f||t),l=i(d.graph,d.buckets,d.zeroIdx);return e.flatten(e.map(l,function(h){return c.outEdges(h.v,h.w)}),!0)}function i(c,f,d){for(var l=[],h=f[f.length-1],m=f[0],p;c.nodeCount();){for(;p=m.dequeue();)u(c,f,d,p);for(;p=h.dequeue();)u(c,f,d,p);if(c.nodeCount()){for(var v=f.length-2;v>0;--v)if(p=f[v].dequeue(),p){l=l.concat(u(c,f,d,p,!0));break}}}return l}function u(c,f,d,l,h){var m=h?[]:void 0;return e.forEach(c.inEdges(l.v),function(p){var v=c.edge(p),b=c.node(p.v);h&&m.push({v:p.v,w:p.w}),b.out-=v,o(f,d,b)}),e.forEach(c.outEdges(l.v),function(p){var v=c.edge(p),b=p.w,g=c.node(b);g.in-=v,o(f,d,g)}),c.removeNode(l.v),m}function s(c,f){var d=new a,l=0,h=0;e.forEach(c.nodes(),function(v){d.setNode(v,{v,in:0,out:0})}),e.forEach(c.edges(),function(v){var b=d.edge(v.v,v.w)||0,g=f(v),_=b+g;d.setEdge(v.v,v.w,_),h=Math.max(h,d.node(v.v).out+=g),l=Math.max(l,d.node(v.w).in+=g)});var m=e.range(h+l+3).map(function(){return new r}),p=l+1;return e.forEach(d.nodes(),function(v){o(m,p,d.node(v))}),{graph:d,buckets:m,zeroIdx:p}}function o(c,f,d){d.out?d.in?c[d.out-d.in+f].enqueue(d):c[c.length-1].enqueue(d):c[0].enqueue(d)}return rs}var ns,$d;function Yg(){if($d)return ns;$d=1;var e=X(),a=$g();ns={run:r,undo:n};function r(i){var u=i.graph().acyclicer==="greedy"?a(i,s(i)):t(i);e.forEach(u,function(o){var c=i.edge(o);i.removeEdge(o),c.forwardName=o.name,c.reversed=!0,i.setEdge(o.w,o.v,c,e.uniqueId("rev"))});function s(o){return function(c){return o.edge(c).weight}}}function t(i){var u=[],s={},o={};function c(f){e.has(o,f)||(o[f]=!0,s[f]=!0,e.forEach(i.outEdges(f),function(d){e.has(s,d.w)?u.push(d):c(d.w)}),delete s[f])}return e.forEach(i.nodes(),c),u}function n(i){e.forEach(i.edges(),function(u){var s=i.edge(u);if(s.reversed){i.removeEdge(u);var o=s.forwardName;delete s.reversed,delete s.forwardName,i.setEdge(u.w,u.v,s,o)}})}return ns}var ts,Yd;function ne(){if(Yd)return ts;Yd=1;var e=X(),a=oe().Graph;ts={addDummyNode:r,simplify:t,asNonCompoundGraph:n,successorWeights:i,predecessorWeights:u,intersectRect:s,buildLayerMatrix:o,normalizeRanks:c,removeEmptyRanks:f,addBorderNode:d,maxRank:l,partition:h,time:m,notime:p};function r(v,b,g,_){var y;do y=e.uniqueId(_);while(v.hasNode(y));return g.dummy=b,v.setNode(y,g),y}function t(v){var b=new a().setGraph(v.graph());return e.forEach(v.nodes(),function(g){b.setNode(g,v.node(g))}),e.forEach(v.edges(),function(g){var _=b.edge(g.v,g.w)||{weight:0,minlen:1},y=v.edge(g);b.setEdge(g.v,g.w,{weight:_.weight+y.weight,minlen:Math.max(_.minlen,y.minlen)})}),b}function n(v){var b=new a({multigraph:v.isMultigraph()}).setGraph(v.graph());return e.forEach(v.nodes(),function(g){v.children(g).length||b.setNode(g,v.node(g))}),e.forEach(v.edges(),function(g){b.setEdge(g,v.edge(g))}),b}function i(v){var b=e.map(v.nodes(),function(g){var _={};return e.forEach(v.outEdges(g),function(y){_[y.w]=(_[y.w]||0)+v.edge(y).weight}),_});return e.zipObject(v.nodes(),b)}function u(v){var b=e.map(v.nodes(),function(g){var _={};return e.forEach(v.inEdges(g),function(y){_[y.v]=(_[y.v]||0)+v.edge(y).weight}),_});return e.zipObject(v.nodes(),b)}function s(v,b){var g=v.x,_=v.y,y=b.x-g,q=b.y-_,x=v.width/2,w=v.height/2;if(!y&&!q)throw new Error("Not possible to find intersection inside of the rectangle");var T,I;return Math.abs(q)*x>Math.abs(y)*w?(q<0&&(w=-w),T=w*y/q,I=w):(y<0&&(x=-x),T=x,I=x*q/y),{x:g+T,y:_+I}}function o(v){var b=e.map(e.range(l(v)+1),function(){return[]});return e.forEach(v.nodes(),function(g){var _=v.node(g),y=_.rank;e.isUndefined(y)||(b[y][_.order]=g)}),b}function c(v){var b=e.min(e.map(v.nodes(),function(g){return v.node(g).rank}));e.forEach(v.nodes(),function(g){var _=v.node(g);e.has(_,"rank")&&(_.rank-=b)})}function f(v){var b=e.min(e.map(v.nodes(),function(q){return v.node(q).rank})),g=[];e.forEach(v.nodes(),function(q){var x=v.node(q).rank-b;g[x]||(g[x]=[]),g[x].push(q)});var _=0,y=v.graph().nodeRankFactor;e.forEach(g,function(q,x){e.isUndefined(q)&&x%y!==0?--_:_&&e.forEach(q,function(w){v.node(w).rank+=_})})}function d(v,b,g,_){var y={width:0,height:0};return arguments.length>=4&&(y.rank=g,y.order=_),r(v,"border",y,b)}function l(v){return e.max(e.map(v.nodes(),function(b){var g=v.node(b).rank;if(!e.isUndefined(g))return g}))}function h(v,b){var g={lhs:[],rhs:[]};return e.forEach(v,function(_){b(_)?g.lhs.push(_):g.rhs.push(_)}),g}function m(v,b){var g=e.now();try{return b()}finally{console.log(v+" time: "+(e.now()-g)+"ms")}}function p(v,b){return b()}return ts}var as,Xd;function Xg(){if(Xd)return as;Xd=1;var e=X(),a=ne();as={run:r,undo:n};function r(i){i.graph().dummyChains=[],e.forEach(i.edges(),function(u){t(i,u)})}function t(i,u){var s=u.v,o=i.node(s).rank,c=u.w,f=i.node(c).rank,d=u.name,l=i.edge(u),h=l.labelRank;if(f!==o+1){i.removeEdge(u);var m,p,v;for(v=0,++o;o<f;++v,++o)l.points=[],p={width:0,height:0,edgeLabel:l,edgeObj:u,rank:o},m=a.addDummyNode(i,"edge",p,"_d"),o===h&&(p.width=l.width,p.height=l.height,p.dummy="edge-label",p.labelpos=l.labelpos),i.setEdge(s,m,{weight:l.weight},d),v===0&&i.graph().dummyChains.push(m),s=m;i.setEdge(s,c,{weight:l.weight},d)}}function n(i){e.forEach(i.graph().dummyChains,function(u){var s=i.node(u),o=s.edgeLabel,c;for(i.setEdge(s.edgeObj,o);s.dummy;)c=i.successors(u)[0],i.removeNode(u),o.points.push({x:s.x,y:s.y}),s.dummy==="edge-label"&&(o.x=s.x,o.y=s.y,o.width=s.width,o.height=s.height),u=c,s=i.node(u)})}return as}var is,Zd;function Ke(){if(Zd)return is;Zd=1;var e=X();is={longestPath:a,slack:r};function a(t){var n={};function i(u){var s=t.node(u);if(e.has(n,u))return s.rank;n[u]=!0;var o=e.min(e.map(t.outEdges(u),function(c){return i(c.w)-t.edge(c).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),s.rank=o}e.forEach(t.sources(),i)}function r(t,n){return t.node(n.w).rank-t.node(n.v).rank-t.edge(n).minlen}return is}var ss,Jd;function Ch(){if(Jd)return ss;Jd=1;var e=X(),a=oe().Graph,r=Ke().slack;ss=t;function t(s){var o=new a({directed:!1}),c=s.nodes()[0],f=s.nodeCount();o.setNode(c,{});for(var d,l;n(o,s)<f;)d=i(o,s),l=o.hasNode(d.v)?r(s,d):-r(s,d),u(o,s,l);return o}function n(s,o){function c(f){e.forEach(o.nodeEdges(f),function(d){var l=d.v,h=f===l?d.w:l;!s.hasNode(h)&&!r(o,d)&&(s.setNode(h,{}),s.setEdge(f,h,{}),c(h))})}return e.forEach(s.nodes(),c),s.nodeCount()}function i(s,o){return e.minBy(o.edges(),function(c){if(s.hasNode(c.v)!==s.hasNode(c.w))return r(o,c)})}function u(s,o,c){e.forEach(s.nodes(),function(f){o.node(f).rank+=c})}return ss}var us,Qd;function Zg(){if(Qd)return us;Qd=1;var e=X(),a=Ch(),r=Ke().slack,t=Ke().longestPath,n=oe().alg.preorder,i=oe().alg.postorder,u=ne().simplify;us=s,s.initLowLimValues=d,s.initCutValues=o,s.calcCutValue=f,s.leaveEdge=h,s.enterEdge=m,s.exchangeEdges=p;function s(_){_=u(_),t(_);var y=a(_);d(y),o(y,_);for(var q,x;q=h(y);)x=m(y,_,q),p(y,_,q,x)}function o(_,y){var q=i(_,_.nodes());q=q.slice(0,q.length-1),e.forEach(q,function(x){c(_,y,x)})}function c(_,y,q){var x=_.node(q),w=x.parent;_.edge(q,w).cutvalue=f(_,y,q)}function f(_,y,q){var x=_.node(q),w=x.parent,T=!0,I=y.edge(q,w),A=0;return I||(T=!1,I=y.edge(w,q)),A=I.weight,e.forEach(y.nodeEdges(q),function(O){var P=O.v===q,L=P?O.w:O.v;if(L!==w){var M=P===T,U=y.edge(O).weight;if(A+=M?U:-U,b(_,q,L)){var Y=_.edge(q,L).cutvalue;A+=M?-Y:Y}}}),A}function d(_,y){arguments.length<2&&(y=_.nodes()[0]),l(_,{},1,y)}function l(_,y,q,x,w){var T=q,I=_.node(x);return y[x]=!0,e.forEach(_.neighbors(x),function(A){e.has(y,A)||(q=l(_,y,q,A,x))}),I.low=T,I.lim=q++,w?I.parent=w:delete I.parent,q}function h(_){return e.find(_.edges(),function(y){return _.edge(y).cutvalue<0})}function m(_,y,q){var x=q.v,w=q.w;y.hasEdge(x,w)||(x=q.w,w=q.v);var T=_.node(x),I=_.node(w),A=T,O=!1;T.lim>I.lim&&(A=I,O=!0);var P=e.filter(y.edges(),function(L){return O===g(_,_.node(L.v),A)&&O!==g(_,_.node(L.w),A)});return e.minBy(P,function(L){return r(y,L)})}function p(_,y,q,x){var w=q.v,T=q.w;_.removeEdge(w,T),_.setEdge(x.v,x.w,{}),d(_),o(_,y),v(_,y)}function v(_,y){var q=e.find(_.nodes(),function(w){return!y.node(w).parent}),x=n(_,q);x=x.slice(1),e.forEach(x,function(w){var T=_.node(w).parent,I=y.edge(w,T),A=!1;I||(I=y.edge(T,w),A=!0),y.node(w).rank=y.node(T).rank+(A?I.minlen:-I.minlen)})}function b(_,y,q){return _.hasEdge(y,q)}function g(_,y,q){return q.low<=y.lim&&y.lim<=q.lim}return us}var os,el;function Jg(){if(el)return os;el=1;var e=Ke(),a=e.longestPath,r=Ch(),t=Zg();os=n;function n(o){switch(o.graph().ranker){case"network-simplex":s(o);break;case"tight-tree":u(o);break;case"longest-path":i(o);break;default:s(o)}}var i=a;function u(o){a(o),r(o)}function s(o){t(o)}return os}var fs,rl;function Qg(){if(rl)return fs;rl=1;var e=X();fs=a;function a(n){var i=t(n);e.forEach(n.graph().dummyChains,function(u){for(var s=n.node(u),o=s.edgeObj,c=r(n,i,o.v,o.w),f=c.path,d=c.lca,l=0,h=f[l],m=!0;u!==o.w;){if(s=n.node(u),m){for(;(h=f[l])!==d&&n.node(h).maxRank<s.rank;)l++;h===d&&(m=!1)}if(!m){for(;l<f.length-1&&n.node(h=f[l+1]).minRank<=s.rank;)l++;h=f[l]}n.setParent(u,h),u=n.successors(u)[0]}})}function r(n,i,u,s){var o=[],c=[],f=Math.min(i[u].low,i[s].low),d=Math.max(i[u].lim,i[s].lim),l,h;l=u;do l=n.parent(l),o.push(l);while(l&&(i[l].low>f||d>i[l].lim));for(h=l,l=s;(l=n.parent(l))!==h;)c.push(l);return{path:o.concat(c.reverse()),lca:h}}function t(n){var i={},u=0;function s(o){var c=u;e.forEach(n.children(o),s),i[o]={low:c,lim:u++}}return e.forEach(n.children(),s),i}return fs}var cs,nl;function e_(){if(nl)return cs;nl=1;var e=X(),a=ne();cs={run:r,cleanup:u};function r(s){var o=a.addDummyNode(s,"root",{},"_root"),c=n(s),f=e.max(e.values(c))-1,d=2*f+1;s.graph().nestingRoot=o,e.forEach(s.edges(),function(h){s.edge(h).minlen*=d});var l=i(s)+1;e.forEach(s.children(),function(h){t(s,o,d,l,f,c,h)}),s.graph().nodeRankFactor=d}function t(s,o,c,f,d,l,h){var m=s.children(h);if(!m.length){h!==o&&s.setEdge(o,h,{weight:0,minlen:c});return}var p=a.addBorderNode(s,"_bt"),v=a.addBorderNode(s,"_bb"),b=s.node(h);s.setParent(p,h),b.borderTop=p,s.setParent(v,h),b.borderBottom=v,e.forEach(m,function(g){t(s,o,c,f,d,l,g);var _=s.node(g),y=_.borderTop?_.borderTop:g,q=_.borderBottom?_.borderBottom:g,x=_.borderTop?f:2*f,w=y!==q?1:d-l[h]+1;s.setEdge(p,y,{weight:x,minlen:w,nestingEdge:!0}),s.setEdge(q,v,{weight:x,minlen:w,nestingEdge:!0})}),s.parent(h)||s.setEdge(o,p,{weight:0,minlen:d+l[h]})}function n(s){var o={};function c(f,d){var l=s.children(f);l&&l.length&&e.forEach(l,function(h){c(h,d+1)}),o[f]=d}return e.forEach(s.children(),function(f){c(f,1)}),o}function i(s){return e.reduce(s.edges(),function(o,c){return o+s.edge(c).weight},0)}function u(s){var o=s.graph();s.removeNode(o.nestingRoot),delete o.nestingRoot,e.forEach(s.edges(),function(c){var f=s.edge(c);f.nestingEdge&&s.removeEdge(c)})}return cs}var ds,tl;function r_(){if(tl)return ds;tl=1;var e=X(),a=ne();ds=r;function r(n){function i(u){var s=n.children(u),o=n.node(u);if(s.length&&e.forEach(s,i),e.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var c=o.minRank,f=o.maxRank+1;c<f;++c)t(n,"borderLeft","_bl",u,o,c),t(n,"borderRight","_br",u,o,c)}}e.forEach(n.children(),i)}function t(n,i,u,s,o,c){var f={width:0,height:0,rank:c,borderType:i},d=o[i][c-1],l=a.addDummyNode(n,"border",f,u);o[i][c]=l,n.setParent(l,s),d&&n.setEdge(d,l,{weight:1})}return ds}var ls,al;function n_(){if(al)return ls;al=1;var e=X();ls={adjust:a,undo:r};function a(c){var f=c.graph().rankdir.toLowerCase();(f==="lr"||f==="rl")&&t(c)}function r(c){var f=c.graph().rankdir.toLowerCase();(f==="bt"||f==="rl")&&i(c),(f==="lr"||f==="rl")&&(s(c),t(c))}function t(c){e.forEach(c.nodes(),function(f){n(c.node(f))}),e.forEach(c.edges(),function(f){n(c.edge(f))})}function n(c){var f=c.width;c.width=c.height,c.height=f}function i(c){e.forEach(c.nodes(),function(f){u(c.node(f))}),e.forEach(c.edges(),function(f){var d=c.edge(f);e.forEach(d.points,u),e.has(d,"y")&&u(d)})}function u(c){c.y=-c.y}function s(c){e.forEach(c.nodes(),function(f){o(c.node(f))}),e.forEach(c.edges(),function(f){var d=c.edge(f);e.forEach(d.points,o),e.has(d,"x")&&o(d)})}function o(c){var f=c.x;c.x=c.y,c.y=f}return ls}var hs,il;function t_(){if(il)return hs;il=1;var e=X();hs=a;function a(r){var t={},n=e.filter(r.nodes(),function(c){return!r.children(c).length}),i=e.max(e.map(n,function(c){return r.node(c).rank})),u=e.map(e.range(i+1),function(){return[]});function s(c){if(!e.has(t,c)){t[c]=!0;var f=r.node(c);u[f.rank].push(c),e.forEach(r.successors(c),s)}}var o=e.sortBy(n,function(c){return r.node(c).rank});return e.forEach(o,s),u}return hs}var vs,sl;function a_(){if(sl)return vs;sl=1;var e=X();vs=a;function a(t,n){for(var i=0,u=1;u<n.length;++u)i+=r(t,n[u-1],n[u]);return i}function r(t,n,i){for(var u=e.zipObject(i,e.map(i,function(l,h){return h})),s=e.flatten(e.map(n,function(l){return e.sortBy(e.map(t.outEdges(l),function(h){return{pos:u[h.w],weight:t.edge(h).weight}}),"pos")}),!0),o=1;o<i.length;)o<<=1;var c=2*o-1;o-=1;var f=e.map(new Array(c),function(){return 0}),d=0;return e.forEach(s.forEach(function(l){var h=l.pos+o;f[h]+=l.weight;for(var m=0;h>0;)h%2&&(m+=f[h+1]),h=h-1>>1,f[h]+=l.weight;d+=l.weight*m})),d}return vs}var ps,ul;function i_(){if(ul)return ps;ul=1;var e=X();ps=a;function a(r,t){return e.map(t,function(n){var i=r.inEdges(n);if(i.length){var u=e.reduce(i,function(s,o){var c=r.edge(o),f=r.node(o.v);return{sum:s.sum+c.weight*f.order,weight:s.weight+c.weight}},{sum:0,weight:0});return{v:n,barycenter:u.sum/u.weight,weight:u.weight}}else return{v:n}})}return ps}var gs,ol;function s_(){if(ol)return gs;ol=1;var e=X();gs=a;function a(n,i){var u={};e.forEach(n,function(o,c){var f=u[o.v]={indegree:0,in:[],out:[],vs:[o.v],i:c};e.isUndefined(o.barycenter)||(f.barycenter=o.barycenter,f.weight=o.weight)}),e.forEach(i.edges(),function(o){var c=u[o.v],f=u[o.w];!e.isUndefined(c)&&!e.isUndefined(f)&&(f.indegree++,c.out.push(u[o.w]))});var s=e.filter(u,function(o){return!o.indegree});return r(s)}function r(n){var i=[];function u(c){return function(f){f.merged||(e.isUndefined(f.barycenter)||e.isUndefined(c.barycenter)||f.barycenter>=c.barycenter)&&t(c,f)}}function s(c){return function(f){f.in.push(c),--f.indegree===0&&n.push(f)}}for(;n.length;){var o=n.pop();i.push(o),e.forEach(o.in.reverse(),u(o)),e.forEach(o.out,s(o))}return e.map(e.filter(i,function(c){return!c.merged}),function(c){return e.pick(c,["vs","i","barycenter","weight"])})}function t(n,i){var u=0,s=0;n.weight&&(u+=n.barycenter*n.weight,s+=n.weight),i.weight&&(u+=i.barycenter*i.weight,s+=i.weight),n.vs=i.vs.concat(n.vs),n.barycenter=u/s,n.weight=s,n.i=Math.min(i.i,n.i),i.merged=!0}return gs}var _s,fl;function u_(){if(fl)return _s;fl=1;var e=X(),a=ne();_s=r;function r(i,u){var s=a.partition(i,function(p){return e.has(p,"barycenter")}),o=s.lhs,c=e.sortBy(s.rhs,function(p){return-p.i}),f=[],d=0,l=0,h=0;o.sort(n(!!u)),h=t(f,c,h),e.forEach(o,function(p){h+=p.vs.length,f.push(p.vs),d+=p.barycenter*p.weight,l+=p.weight,h=t(f,c,h)});var m={vs:e.flatten(f,!0)};return l&&(m.barycenter=d/l,m.weight=l),m}function t(i,u,s){for(var o;u.length&&(o=e.last(u)).i<=s;)u.pop(),i.push(o.vs),s++;return s}function n(i){return function(u,s){return u.barycenter<s.barycenter?-1:u.barycenter>s.barycenter?1:i?s.i-u.i:u.i-s.i}}return _s}var bs,cl;function o_(){if(cl)return bs;cl=1;var e=X(),a=i_(),r=s_(),t=u_();bs=n;function n(s,o,c,f){var d=s.children(o),l=s.node(o),h=l?l.borderLeft:void 0,m=l?l.borderRight:void 0,p={};h&&(d=e.filter(d,function(q){return q!==h&&q!==m}));var v=a(s,d);e.forEach(v,function(q){if(s.children(q.v).length){var x=n(s,q.v,c,f);p[q.v]=x,e.has(x,"barycenter")&&u(q,x)}});var b=r(v,c);i(b,p);var g=t(b,f);if(h&&(g.vs=e.flatten([h,g.vs,m],!0),s.predecessors(h).length)){var _=s.node(s.predecessors(h)[0]),y=s.node(s.predecessors(m)[0]);e.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+_.order+y.order)/(g.weight+2),g.weight+=2}return g}function i(s,o){e.forEach(s,function(c){c.vs=e.flatten(c.vs.map(function(f){return o[f]?o[f].vs:f}),!0)})}function u(s,o){e.isUndefined(s.barycenter)?(s.barycenter=o.barycenter,s.weight=o.weight):(s.barycenter=(s.barycenter*s.weight+o.barycenter*o.weight)/(s.weight+o.weight),s.weight+=o.weight)}return bs}var ms,dl;function f_(){if(dl)return ms;dl=1;var e=X(),a=oe().Graph;ms=r;function r(n,i,u){var s=t(n),o=new a({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(c){return n.node(c)});return e.forEach(n.nodes(),function(c){var f=n.node(c),d=n.parent(c);(f.rank===i||f.minRank<=i&&i<=f.maxRank)&&(o.setNode(c),o.setParent(c,d||s),e.forEach(n[u](c),function(l){var h=l.v===c?l.w:l.v,m=o.edge(h,c),p=e.isUndefined(m)?0:m.weight;o.setEdge(h,c,{weight:n.edge(l).weight+p})}),e.has(f,"minRank")&&o.setNode(c,{borderLeft:f.borderLeft[i],borderRight:f.borderRight[i]}))}),o}function t(n){for(var i;n.hasNode(i=e.uniqueId("_root")););return i}return ms}var ys,ll;function c_(){if(ll)return ys;ll=1;var e=X();ys=a;function a(r,t,n){var i={},u;e.forEach(n,function(s){for(var o=r.parent(s),c,f;o;){if(c=r.parent(o),c?(f=i[c],i[c]=o):(f=u,u=o),f&&f!==o){t.setEdge(f,o);return}o=c}})}return ys}var qs,hl;function d_(){if(hl)return qs;hl=1;var e=X(),a=t_(),r=a_(),t=o_(),n=f_(),i=c_(),u=oe().Graph,s=ne();qs=o;function o(l){var h=s.maxRank(l),m=c(l,e.range(1,h+1),"inEdges"),p=c(l,e.range(h-1,-1,-1),"outEdges"),v=a(l);d(l,v);for(var b=Number.POSITIVE_INFINITY,g,_=0,y=0;y<4;++_,++y){f(_%2?m:p,_%4>=2),v=s.buildLayerMatrix(l);var q=r(l,v);q<b&&(y=0,g=e.cloneDeep(v),b=q)}d(l,g)}function c(l,h,m){return e.map(h,function(p){return n(l,p,m)})}function f(l,h){var m=new u;e.forEach(l,function(p){var v=p.graph().root,b=t(p,v,m,h);e.forEach(b.vs,function(g,_){p.node(g).order=_}),i(p,m,b.vs)})}function d(l,h){e.forEach(h,function(m){e.forEach(m,function(p,v){l.node(p).order=v})})}return qs}var xs,vl;function l_(){if(vl)return xs;vl=1;var e=X(),a=oe().Graph,r=ne();xs={positionX:m,findType1Conflicts:t,findType2Conflicts:n,addConflict:u,hasConflict:s,verticalAlignment:o,horizontalCompaction:c,alignCoordinates:l,findSmallestWidthAlignment:d,balance:h};function t(b,g){var _={};function y(q,x){var w=0,T=0,I=q.length,A=e.last(x);return e.forEach(x,function(O,P){var L=i(b,O),M=L?b.node(L).order:I;(L||O===A)&&(e.forEach(x.slice(T,P+1),function(U){e.forEach(b.predecessors(U),function(Y){var ee=b.node(Y),se=ee.order;(se<w||M<se)&&!(ee.dummy&&b.node(U).dummy)&&u(_,Y,U)})}),T=P+1,w=M)}),x}return e.reduce(g,y),_}function n(b,g){var _={};function y(x,w,T,I,A){var O;e.forEach(e.range(w,T),function(P){O=x[P],b.node(O).dummy&&e.forEach(b.predecessors(O),function(L){var M=b.node(L);M.dummy&&(M.order<I||M.order>A)&&u(_,L,O)})})}function q(x,w){var T=-1,I,A=0;return e.forEach(w,function(O,P){if(b.node(O).dummy==="border"){var L=b.predecessors(O);L.length&&(I=b.node(L[0]).order,y(w,A,P,T,I),A=P,T=I)}y(w,A,w.length,I,x.length)}),w}return e.reduce(g,q),_}function i(b,g){if(b.node(g).dummy)return e.find(b.predecessors(g),function(_){return b.node(_).dummy})}function u(b,g,_){if(g>_){var y=g;g=_,_=y}var q=b[g];q||(b[g]=q={}),q[_]=!0}function s(b,g,_){if(g>_){var y=g;g=_,_=y}return e.has(b[g],_)}function o(b,g,_,y){var q={},x={},w={};return e.forEach(g,function(T){e.forEach(T,function(I,A){q[I]=I,x[I]=I,w[I]=A})}),e.forEach(g,function(T){var I=-1;e.forEach(T,function(A){var O=y(A);if(O.length){O=e.sortBy(O,function(Y){return w[Y]});for(var P=(O.length-1)/2,L=Math.floor(P),M=Math.ceil(P);L<=M;++L){var U=O[L];x[A]===A&&I<w[U]&&!s(_,A,U)&&(x[U]=A,x[A]=q[A]=q[U],I=w[U])}}})}),{root:q,align:x}}function c(b,g,_,y,q){var x={},w=f(b,g,_,q),T=q?"borderLeft":"borderRight";function I(P,L){for(var M=w.nodes(),U=M.pop(),Y={};U;)Y[U]?P(U):(Y[U]=!0,M.push(U),M=M.concat(L(U))),U=M.pop()}function A(P){x[P]=w.inEdges(P).reduce(function(L,M){return Math.max(L,x[M.v]+w.edge(M))},0)}function O(P){var L=w.outEdges(P).reduce(function(U,Y){return Math.min(U,x[Y.w]-w.edge(Y))},Number.POSITIVE_INFINITY),M=b.node(P);L!==Number.POSITIVE_INFINITY&&M.borderType!==T&&(x[P]=Math.max(x[P],L))}return I(A,w.predecessors.bind(w)),I(O,w.successors.bind(w)),e.forEach(y,function(P){x[P]=x[_[P]]}),x}function f(b,g,_,y){var q=new a,x=b.graph(),w=p(x.nodesep,x.edgesep,y);return e.forEach(g,function(T){var I;e.forEach(T,function(A){var O=_[A];if(q.setNode(O),I){var P=_[I],L=q.edge(P,O);q.setEdge(P,O,Math.max(w(b,A,I),L||0))}I=A})}),q}function d(b,g){return e.minBy(e.values(g),function(_){var y=Number.NEGATIVE_INFINITY,q=Number.POSITIVE_INFINITY;return e.forIn(_,function(x,w){var T=v(b,w)/2;y=Math.max(x+T,y),q=Math.min(x-T,q)}),y-q})}function l(b,g){var _=e.values(g),y=e.min(_),q=e.max(_);e.forEach(["u","d"],function(x){e.forEach(["l","r"],function(w){var T=x+w,I=b[T],A;if(I!==g){var O=e.values(I);A=w==="l"?y-e.min(O):q-e.max(O),A&&(b[T]=e.mapValues(I,function(P){return P+A}))}})})}function h(b,g){return e.mapValues(b.ul,function(_,y){if(g)return b[g.toLowerCase()][y];var q=e.sortBy(e.map(b,y));return(q[1]+q[2])/2})}function m(b){var g=r.buildLayerMatrix(b),_=e.merge(t(b,g),n(b,g)),y={},q;e.forEach(["u","d"],function(w){q=w==="u"?g:e.values(g).reverse(),e.forEach(["l","r"],function(T){T==="r"&&(q=e.map(q,function(P){return e.values(P).reverse()}));var I=(w==="u"?b.predecessors:b.successors).bind(b),A=o(b,q,_,I),O=c(b,q,A.root,A.align,T==="r");T==="r"&&(O=e.mapValues(O,function(P){return-P})),y[w+T]=O})});var x=d(b,y);return l(y,x),h(y,b.graph().align)}function p(b,g,_){return function(y,q,x){var w=y.node(q),T=y.node(x),I=0,A;if(I+=w.width/2,e.has(w,"labelpos"))switch(w.labelpos.toLowerCase()){case"l":A=-w.width/2;break;case"r":A=w.width/2;break}if(A&&(I+=_?A:-A),A=0,I+=(w.dummy?g:b)/2,I+=(T.dummy?g:b)/2,I+=T.width/2,e.has(T,"labelpos"))switch(T.labelpos.toLowerCase()){case"l":A=T.width/2;break;case"r":A=-T.width/2;break}return A&&(I+=_?A:-A),A=0,I}}function v(b,g){return b.node(g).width}return xs}var ws,pl;function h_(){if(pl)return ws;pl=1;var e=X(),a=ne(),r=l_().positionX;ws=t;function t(i){i=a.asNonCompoundGraph(i),n(i),e.forEach(r(i),function(u,s){i.node(s).x=u})}function n(i){var u=a.buildLayerMatrix(i),s=i.graph().ranksep,o=0;e.forEach(u,function(c){var f=e.max(e.map(c,function(d){return i.node(d).height}));e.forEach(c,function(d){i.node(d).y=o+f/2}),o+=f+s})}return ws}var Rs,gl;function v_(){if(gl)return Rs;gl=1;var e=X(),a=Yg(),r=Xg(),t=Jg(),n=ne().normalizeRanks,i=Qg(),u=ne().removeEmptyRanks,s=e_(),o=r_(),c=n_(),f=d_(),d=h_(),l=ne(),h=oe().Graph;Rs=m;function m(R,S){var E=S&&S.debugTiming?l.time:l.notime;E("layout",function(){var j=E(" buildLayoutGraph",function(){return I(R)});E(" runLayout",function(){p(j,E)}),E(" updateInputGraph",function(){v(R,j)})})}function p(R,S){S(" makeSpaceForEdgeLabels",function(){A(R)}),S(" removeSelfEdges",function(){ve(R)}),S(" acyclic",function(){a.run(R)}),S(" nestingGraph.run",function(){s.run(R)}),S(" rank",function(){t(l.asNonCompoundGraph(R))}),S(" injectEdgeLabelProxies",function(){O(R)}),S(" removeEmptyRanks",function(){u(R)}),S(" nestingGraph.cleanup",function(){s.cleanup(R)}),S(" normalizeRanks",function(){n(R)}),S(" assignRankMinMax",function(){P(R)}),S(" removeEdgeLabelProxies",function(){L(R)}),S(" normalize.run",function(){r.run(R)}),S(" parentDummyChains",function(){i(R)}),S(" addBorderSegments",function(){o(R)}),S(" order",function(){f(R)}),S(" insertSelfEdges",function(){ce(R)}),S(" adjustCoordinateSystem",function(){c.adjust(R)}),S(" position",function(){d(R)}),S(" positionSelfEdges",function(){_e(R)}),S(" removeBorderNodes",function(){se(R)}),S(" normalize.undo",function(){r.undo(R)}),S(" fixupEdgeLabelCoords",function(){Y(R)}),S(" undoCoordinateSystem",function(){c.undo(R)}),S(" translateGraph",function(){M(R)}),S(" assignNodeIntersects",function(){U(R)}),S(" reversePoints",function(){ee(R)}),S(" acyclic.undo",function(){a.undo(R)})}function v(R,S){e.forEach(R.nodes(),function(E){var j=R.node(E),G=S.node(E);j&&(j.x=G.x,j.y=G.y,S.children(E).length&&(j.width=G.width,j.height=G.height))}),e.forEach(R.edges(),function(E){var j=R.edge(E),G=S.edge(E);j.points=G.points,e.has(G,"x")&&(j.x=G.x,j.y=G.y)}),R.graph().width=S.graph().width,R.graph().height=S.graph().height}var b=["nodesep","edgesep","ranksep","marginx","marginy"],g={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],y=["width","height"],q={width:0,height:0},x=["minlen","weight","width","height","labeloffset"],w={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},T=["labelpos"];function I(R){var S=new h({multigraph:!0,compound:!0}),E=de(R.graph());return S.setGraph(e.merge({},g,te(E,b),e.pick(E,_))),e.forEach(R.nodes(),function(j){var G=de(R.node(j));S.setNode(j,e.defaults(te(G,y),q)),S.setParent(j,R.parent(j))}),e.forEach(R.edges(),function(j){var G=de(R.edge(j));S.setEdge(j,e.merge({},w,te(G,x),e.pick(G,T)))}),S}function A(R){var S=R.graph();S.ranksep/=2,e.forEach(R.edges(),function(E){var j=R.edge(E);j.minlen*=2,j.labelpos.toLowerCase()!=="c"&&(S.rankdir==="TB"||S.rankdir==="BT"?j.width+=j.labeloffset:j.height+=j.labeloffset)})}function O(R){e.forEach(R.edges(),function(S){var E=R.edge(S);if(E.width&&E.height){var j=R.node(S.v),G=R.node(S.w),K={rank:(G.rank-j.rank)/2+j.rank,e:S};l.addDummyNode(R,"edge-proxy",K,"_ep")}})}function P(R){var S=0;e.forEach(R.nodes(),function(E){var j=R.node(E);j.borderTop&&(j.minRank=R.node(j.borderTop).rank,j.maxRank=R.node(j.borderBottom).rank,S=e.max(S,j.maxRank))}),R.graph().maxRank=S}function L(R){e.forEach(R.nodes(),function(S){var E=R.node(S);E.dummy==="edge-proxy"&&(R.edge(E.e).labelRank=E.rank,R.removeNode(S))})}function M(R){var S=Number.POSITIVE_INFINITY,E=0,j=Number.POSITIVE_INFINITY,G=0,K=R.graph(),W=K.marginx||0,F=K.marginy||0;function B(z){var H=z.x,k=z.y,Z=z.width,D=z.height;S=Math.min(S,H-Z/2),E=Math.max(E,H+Z/2),j=Math.min(j,k-D/2),G=Math.max(G,k+D/2)}e.forEach(R.nodes(),function(z){B(R.node(z))}),e.forEach(R.edges(),function(z){var H=R.edge(z);e.has(H,"x")&&B(H)}),S-=W,j-=F,e.forEach(R.nodes(),function(z){var H=R.node(z);H.x-=S,H.y-=j}),e.forEach(R.edges(),function(z){var H=R.edge(z);e.forEach(H.points,function(k){k.x-=S,k.y-=j}),e.has(H,"x")&&(H.x-=S),e.has(H,"y")&&(H.y-=j)}),K.width=E-S+W,K.height=G-j+F}function U(R){e.forEach(R.edges(),function(S){var E=R.edge(S),j=R.node(S.v),G=R.node(S.w),K,W;E.points?(K=E.points[0],W=E.points[E.points.length-1]):(E.points=[],K=G,W=j),E.points.unshift(l.intersectRect(j,K)),E.points.push(l.intersectRect(G,W))})}function Y(R){e.forEach(R.edges(),function(S){var E=R.edge(S);if(e.has(E,"x"))switch((E.labelpos==="l"||E.labelpos==="r")&&(E.width-=E.labeloffset),E.labelpos){case"l":E.x-=E.width/2+E.labeloffset;break;case"r":E.x+=E.width/2+E.labeloffset;break}})}function ee(R){e.forEach(R.edges(),function(S){var E=R.edge(S);E.reversed&&E.points.reverse()})}function se(R){e.forEach(R.nodes(),function(S){if(R.children(S).length){var E=R.node(S),j=R.node(E.borderTop),G=R.node(E.borderBottom),K=R.node(e.last(E.borderLeft)),W=R.node(e.last(E.borderRight));E.width=Math.abs(W.x-K.x),E.height=Math.abs(G.y-j.y),E.x=K.x+E.width/2,E.y=j.y+E.height/2}}),e.forEach(R.nodes(),function(S){R.node(S).dummy==="border"&&R.removeNode(S)})}function ve(R){e.forEach(R.edges(),function(S){if(S.v===S.w){var E=R.node(S.v);E.selfEdges||(E.selfEdges=[]),E.selfEdges.push({e:S,label:R.edge(S)}),R.removeEdge(S)}})}function ce(R){var S=l.buildLayerMatrix(R);e.forEach(S,function(E){var j=0;e.forEach(E,function(G,K){var W=R.node(G);W.order=K+j,e.forEach(W.selfEdges,function(F){l.addDummyNode(R,"selfedge",{width:F.label.width,height:F.label.height,rank:W.rank,order:K+ ++j,e:F.e,label:F.label},"_se")}),delete W.selfEdges})})}function _e(R){e.forEach(R.nodes(),function(S){var E=R.node(S);if(E.dummy==="selfedge"){var j=R.node(E.e.v),G=j.x+j.width/2,K=j.y,W=E.x-G,F=j.height/2;R.setEdge(E.e,E.label),R.removeNode(S),E.label.points=[{x:G+2*W/3,y:K-F},{x:G+5*W/6,y:K-F},{x:G+W,y:K},{x:G+5*W/6,y:K+F},{x:G+2*W/3,y:K+F}],E.label.x=E.x,E.label.y=E.y}})}function te(R,S){return e.mapValues(e.pick(R,S),Number)}function de(R){var S={};return e.forEach(R,function(E,j){S[j.toLowerCase()]=E}),S}return Rs}var Es,_l;function p_(){if(_l)return Es;_l=1;var e=X(),a=ne(),r=oe().Graph;Es={debugOrdering:t};function t(n){var i=a.buildLayerMatrix(n),u=new r({compound:!0,multigraph:!0}).setGraph({});return e.forEach(n.nodes(),function(s){u.setNode(s,{label:s}),u.setParent(s,"layer"+n.node(s).rank)}),e.forEach(n.edges(),function(s){u.setEdge(s.v,s.w,{},s.name)}),e.forEach(i,function(s,o){var c="layer"+o;u.setNode(c,{rank:"same"}),e.reduce(s,function(f,d){return u.setEdge(f,d,{style:"invis"}),d})}),u}return Es}var Cs,bl;function g_(){return bl||(bl=1,Cs="0.8.5"),Cs}var Ss,ml;function __(){return ml||(ml=1,Ss={graphlib:oe(),layout:v_(),debug:p_(),util:{time:ne().time,notime:ne().notime},version:g_()}),Ss}var b_=__();const yl=Ih(b_),m_={pending:"#D4B896",running:"#2196F3",completed:"#4CAF50",failed:"#E53935",stopped:"#FF9800",merged:"#9C27B0"},y_={pending:"",running:"ring-2 ring-status-running/50 animate-pulse",completed:"",failed:"ring-1 ring-status-error/30",stopped:"",merged:""};function q_({data:e}){const a=e,{todo:r,allTodos:t,selected:n,onStart:i,onStop:u,onDelete:s,onMerge:o,onCleanup:c,onRetry:f,onSelect:d}=a,{t:l}=As(),h=r.status==="pending"||r.status==="failed"||r.status==="stopped",m=r.status==="running",p=r.status==="completed",v=r.status!=="running"&&r.status!=="pending"&&(r.worktree_path||r.branch_name),b=r.status==="completed"||r.status==="failed"||r.status==="stopped",g=r.depends_on?t.find(q=>q.id===r.depends_on):null,_=!!g&&g.status!=="completed",y=m_[r.status];return C.jsxs("div",{className:`bg-theme-card rounded-xl shadow-card min-w-[240px] max-w-[280px] overflow-hidden transition-all duration-300 ${y_[r.status]} ${n?"ring-2 ring-accent shadow-elevated -translate-y-1":"hover:shadow-elevated hover:-translate-y-0.5"}`,style:{borderLeft:`4px solid ${y}`,position:"relative"},children:[C.jsx("div",{className:"absolute top-0 left-0 right-0 h-px bg-white/10 z-10 pointer-events-none"}),C.jsx(Xs,{type:"target",position:Zs.Top,className:"!w-3 !h-3 !bg-cyan-500 !border-2 !border-white !-top-1.5"}),C.jsxs("div",{className:"px-3 py-2.5 cursor-pointer hover:bg-warm-50 transition-colors",onClick:()=>d(r.id),children:[C.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[C.jsxs("span",{className:"text-2xs font-mono text-warm-400",children:["#",r.priority]}),C.jsx("span",{className:"flex-1 text-xs text-warm-800 font-medium truncate",title:r.title,children:r.title}),C.jsx(El,{status:r.status})]}),C.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[r.cli_tool&&C.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-mono font-medium bg-status-merged/10 text-status-merged",children:Cl(r.cli_tool||"claude").label}),g&&C.jsxs("span",{className:"inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[9px] font-mono bg-cyan-500/10 text-cyan-600",children:[C.jsx(Ah,{size:10}),g.title.length>15?g.title.slice(0,15)+"...":g.title]})]})]}),C.jsxs("div",{className:"flex items-center justify-end gap-0 px-2 py-1.5 border-t border-warm-100 bg-warm-50/50",children:[h&&C.jsx("button",{onClick:q=>{q.stopPropagation(),i(r.id,"headless")},className:"p-1 text-status-success/60 hover:text-status-success hover:bg-status-success/10 rounded transition-colors",title:l(_?"todo.startWithDependency":"todo.startHeadless"),children:C.jsx(Th,{size:12})}),m&&C.jsx("button",{onClick:q=>{q.stopPropagation(),u(r.id)},className:"p-1 text-status-error/60 hover:text-status-error hover:bg-status-error/10 rounded transition-colors",title:l("todo.stop"),children:C.jsx(Oh,{size:12})}),p&&C.jsx("button",{onClick:q=>{q.stopPropagation(),o(r.id)},className:"p-1 text-status-merged/60 hover:text-status-merged hover:bg-status-merged/10 rounded transition-colors",title:l("todo.merge"),children:C.jsx(Nh,{size:12})}),v&&C.jsx("button",{onClick:q=>{q.stopPropagation(),c(r.id)},className:"p-1 text-orange-500/60 hover:text-orange-500 hover:bg-orange-500/10 rounded transition-colors",title:l("todo.cleanup"),children:C.jsx(jh,{size:12})}),b&&C.jsx("button",{onClick:q=>{q.stopPropagation(),f(r.id,"headless")},className:"p-1 text-cyan-500/60 hover:text-cyan-500 hover:bg-cyan-500/10 rounded transition-colors",title:l("todo.retry"),children:C.jsx(Ph,{size:12})}),C.jsx("button",{onClick:q=>{q.stopPropagation(),s(r.id)},className:"p-1 text-warm-400 hover:text-status-error hover:bg-status-error/10 rounded transition-colors",title:l("todo.delete"),children:C.jsx(kh,{size:12})})]}),C.jsx(Xs,{type:"source",position:Zs.Bottom,className:"!w-3 !h-3 !bg-accent !border-2 !border-white !-bottom-1.5"})]})}const x_=V.memo(q_);function w_({todo:e,allTodos:a,projectIsGitRepo:r,projectUseWorktree:t,onClose:n,onEdit:i,onStart:u,onStop:s,onMerge:o,onCleanup:c,onRetry:f,onContinue:d,onFix:l,onEvent:h,isInteractive:m,onSendInput:p,debugLogging:v,showTokenUsage:b}){const[g,_]=V.useState([]),[y,q]=V.useState(!1),[x,w]=V.useState(!1),[T,I]=V.useState(!1),[A,O]=V.useState(null),[P,L]=V.useState(!1),[M,U]=V.useState(null),[Y,ee]=V.useState(!1),[se,ve]=V.useState(!1),[ce,_e]=V.useState(""),[te,de]=V.useState(!1),[R,S]=V.useState(null),{t:E}=As(),j=e.status==="pending"||e.status==="failed"||e.status==="stopped",G=e.status==="running",K=e.status==="completed"||e.status==="stopped"||e.status==="merged",W=e.status==="completed",F=e.status==="completed"||e.status==="failed"||e.status==="stopped",B=!!d&&e.status==="completed"&&!!e.worktree_path,z=e.status!=="running"&&e.status!=="pending"&&(e.worktree_path||e.branch_name),H=e.status==="completed"||e.status==="failed"||e.status==="stopped"||e.status==="merged",k=e.images?JSON.parse(e.images):[],Z=e.depends_on?a.find(N=>N.id===e.depends_on):null,D=!!Z&&Z.status!=="completed",re=a.find(N=>N.depends_on===e.id&&N.merged_from_branch);V.useEffect(()=>{_([]),q(!1),U(null),ee(!1),O(null),I(!1),Lh(e.id).then(N=>{_(N),q(!0)}).catch(()=>{q(!0)})},[e.id]),V.useEffect(()=>{H&&!Y&&Mh(e.id).then(N=>{U(N),ee(!0)}).catch(()=>{ee(!0)})},[H,Y,e.id]),V.useEffect(()=>h(N=>{if(N.type==="todo:log"&&N.todoId===e.id&&N.message){const $={id:`ws-${Date.now()}-${Math.random()}`,todo_id:e.id,log_type:N.logType||"output",message:N.message,created_at:new Date().toISOString()};_(Q=>[...Q,$])}if(N.type==="todo:commit"&&N.todoId===e.id&&N.message){const $={id:`ws-commit-${Date.now()}-${Math.random()}`,todo_id:e.id,log_type:"commit",message:`${N.commitHash?`[${N.commitHash}] `:""}${N.message}`,created_at:new Date().toISOString()};_(Q=>[...Q,$])}}),[h,e.id]);const le=async()=>{if(T){I(!1);return}L(!0);try{const N=await Hh(e.id);O(N),I(!0)}catch{}finally{L(!1)}},Pe=async()=>{try{const{files:N}=await zh(e.project_id,e.id);N.length>0&&window.open(`/api/projects/${e.project_id}/debug-logs/${encodeURIComponent(N[0].name)}`,"_blank")}catch{}},Ie=N=>{if(N<60)return`${N}s`;const $=Math.floor(N/60),Q=N%60;if($<60)return Q>0?`${$}m ${Q}s`:`${$}m`;const be=Math.floor($/60),xe=$%60;return xe>0?`${be}h ${xe}m`:`${be}h`},ue=N=>N>=1e6?`${(N/1e6).toFixed(1)}M`:N>=1e3?`${(N/1e3).toFixed(1)}k`:String(N);return x?C.jsx("div",{className:"w-[380px] border-l border-warm-200 bg-theme-card overflow-y-auto p-4",children:C.jsx(Sl,{initialTitle:e.title,initialDescription:e.description??void 0,initialCliTool:e.cli_tool??void 0,initialDependsOn:e.depends_on??void 0,initialMaxTurns:e.max_turns??void 0,initialUseWorktree:e.use_worktree??null,projectIsGitRepo:r,projectUseWorktree:t,existingImages:k,todoId:e.id,availableTodos:a.filter(N=>N.id!==e.id),onDeleteImage:async N=>{await Dh(e.id,N)},onSave:async(N,$,Q,be,xe,me,ze)=>{await i(e.id,N,$,Q,xe,me,ze),be&&be.length>0&&await Fh(e.id,be.map(ke=>({name:ke.name,data:ke.data}))),w(!1)},onCancel:()=>w(!1)})}):C.jsxs("div",{className:"w-[380px] border-l border-warm-200 bg-theme-card overflow-y-auto animate-slide-up",children:[C.jsxs("div",{className:"sticky top-0 bg-theme-card border-b border-warm-200 px-4 py-3 flex items-center gap-2 z-10",children:[C.jsx(El,{status:e.status}),C.jsx("span",{className:"flex-1 text-sm font-medium text-warm-800 truncate",children:e.title}),C.jsx("button",{onClick:()=>w(!0),className:"p-1.5 text-warm-400 hover:text-accent hover:bg-accent/10 rounded-lg transition-colors",title:E("todo.edit"),children:C.jsx(Gh,{size:14})}),C.jsx("button",{onClick:n,className:"p-1.5 text-warm-400 hover:text-warm-600 hover:bg-warm-100 rounded-lg transition-colors",children:C.jsx(Bh,{size:16})})]}),C.jsxs("div",{className:"px-4 py-4 space-y-4",children:[C.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[j&&C.jsx(C.Fragment,{children:C.jsx("button",{onClick:()=>u(e.id,"headless"),className:"btn-ghost text-xs py-1.5 text-status-success",title:E(D?"todo.startWithDependency":"todo.startHeadless"),children:E("todo.startHeadless")})}),G&&C.jsx("button",{onClick:()=>s(e.id),className:"btn-ghost text-xs py-1.5 text-status-error",children:E("todo.stop")}),K&&C.jsx("button",{onClick:le,disabled:P,className:"btn-ghost text-xs py-1.5 text-status-info disabled:opacity-30",children:E("todo.viewDiff")}),v&&H&&C.jsx("button",{onClick:Pe,className:"btn-ghost text-xs py-1.5",children:E("todo.viewDebugLog")}),W&&C.jsx("button",{onClick:()=>o(e.id),className:"btn-ghost text-xs py-1.5 text-status-merged",children:E("todo.merge")}),z&&C.jsx("button",{onClick:()=>c(e.id),className:"btn-ghost text-xs py-1.5 text-orange-500",children:E("todo.cleanup")}),B&&C.jsx("button",{onClick:()=>{ve(N=>!N),S(null)},disabled:te,className:"btn-ghost text-xs py-1.5 text-emerald-500",children:E("todo.continue")}),F&&C.jsx("button",{onClick:()=>f(e.id,"headless"),className:"btn-ghost text-xs py-1.5 text-cyan-500",children:E("todo.retry")})]}),se&&d&&C.jsxs("div",{className:"border border-emerald-200 rounded-lg px-3 py-2 bg-emerald-50/50 space-y-2",children:[C.jsxs("label",{className:"text-xs font-medium text-emerald-600",children:[E("todo.continuePromptLabel"),(e.round_count??1)>1&&C.jsxs("span",{className:"ml-2 text-emerald-500/70",children:["(",E("todo.roundLabel")," ",e.round_count,")"]})]}),C.jsx("textarea",{value:ce,onChange:N=>_e(N.target.value),placeholder:E("todo.continuePromptPlaceholder"),rows:3,disabled:te,className:"w-full bg-theme-card border border-emerald-200 rounded-lg px-2 py-1.5 text-xs text-warm-800 focus:border-emerald-400 focus:outline-none focus:ring-2 focus:ring-emerald-400/20 resize-y"}),R&&C.jsx("p",{className:"text-xs text-status-error",children:R}),C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx("button",{onClick:async()=>{const N=ce.trim();if(!N){S(E("todo.continuePromptRequired"));return}de(!0),S(null);try{await d(e.id,N,"headless"),ve(!1),_e("")}catch($){S($ instanceof Error?$.message:"Continue failed")}finally{de(!1)}},disabled:te||!ce.trim(),className:"btn-primary text-xs py-1.5 !bg-emerald-500 hover:!bg-emerald-600 disabled:opacity-30",children:E(te?"todo.continuing":"todo.confirmContinue")}),C.jsx("button",{onClick:()=>{ve(!1),S(null)},disabled:te,className:"btn-ghost text-xs py-1.5",children:E("scheduleForm.cancel")})]})]}),C.jsxs("div",{children:[C.jsx("h4",{className:"text-xs font-semibold text-warm-500 uppercase tracking-wider mb-1",children:E("todo.description")}),C.jsx("p",{className:"text-xs text-warm-600 whitespace-pre-wrap leading-relaxed",children:e.description||E("todo.noDescription")})]}),k.length>0&&C.jsxs("div",{children:[C.jsxs("h4",{className:"text-xs font-semibold text-warm-500 uppercase tracking-wider mb-1",children:[E("todo.attachedImages")," (",k.length,")"]}),C.jsx("div",{className:"flex flex-wrap gap-2",children:k.map(N=>C.jsx("a",{href:Ys(e.id,N.id),target:"_blank",rel:"noopener noreferrer",children:C.jsx("img",{src:Ys(e.id,N.id),alt:N.originalName,className:"h-16 w-16 object-cover rounded-lg border border-warm-200 hover:border-accent transition-colors"})},N.id))})]}),C.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[C.jsxs("span",{className:"text-2xs font-mono text-warm-400 badge bg-warm-100",children:["#",e.priority]}),e.cli_tool&&C.jsx("span",{className:"badge text-2xs font-mono bg-warm-200/60 text-warm-600",children:Cl(e.cli_tool||"claude").label}),Z&&C.jsxs("span",{className:"badge text-2xs font-mono bg-warm-200/60 text-warm-600",children:[E("todo.dependsOn"),": ",Z.title.length>20?Z.title.slice(0,20)+"...":Z.title]})]}),e.branch_name&&C.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[C.jsxs("span",{className:"badge text-2xs bg-warm-200/60 text-warm-600",children:[E("todo.branch"),": ",e.branch_name]}),e.merged_from_branch&&C.jsxs("span",{className:"badge text-2xs bg-warm-200/60 text-warm-600",children:[E("todo.mergedFrom"),": ",e.merged_from_branch]}),!e.worktree_path&&re&&C.jsxs("span",{className:"badge text-2xs bg-amber-500/10 text-amber-600",children:[E("todo.transferredTo"),": ",re.title.length>20?re.title.slice(0,20)+"...":re.title]})]}),e.status==="failed"&&g.length>0&&(()=>{const N=g.filter($=>$.log_type==="error");return N.length===0?null:C.jsxs("div",{className:"rounded-lg border border-status-error/30 bg-status-error/5 overflow-hidden",children:[C.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-status-error/10 border-b border-status-error/20",children:[C.jsx("h4",{className:"text-2xs font-semibold text-status-error uppercase tracking-wider",children:E("failure.title")}),l&&C.jsx("button",{onClick:()=>l(e,N),className:"text-2xs font-medium text-amber-500 hover:text-amber-600",children:E("failure.fix")})]}),C.jsx("div",{className:"px-3 py-2 space-y-1 max-h-32 overflow-y-auto",children:N.map($=>C.jsx("div",{className:"text-2xs font-mono text-status-error whitespace-pre-wrap break-all",children:$.message},$.id))})]})})(),H&&M&&C.jsxs("div",{className:"space-y-2",children:[C.jsxs("div",{className:"flex flex-wrap gap-2",children:[M.duration_seconds!==null&&C.jsx("span",{className:"text-2xs font-mono badge bg-warm-100 text-warm-600",children:Ie(M.duration_seconds)}),M.commits.length>0&&C.jsxs("span",{className:"text-2xs font-mono badge bg-status-success/10 text-status-success",children:[M.commits.length," commits"]}),M.diff_stats.files_changed>0&&C.jsxs("span",{className:"text-2xs font-mono badge bg-status-info/10 text-status-info",children:[M.diff_stats.files_changed," files",C.jsxs("span",{className:"text-status-success ml-1",children:["+",M.diff_stats.insertions]}),C.jsxs("span",{className:"text-status-error ml-1",children:["-",M.diff_stats.deletions]})]}),b&&M.token_usage&&M.token_usage.input_tokens!==null&&C.jsxs("span",{className:"text-2xs font-mono badge bg-warm-200/60 text-warm-600",children:[ue(M.token_usage.input_tokens)," in / ",ue(M.token_usage.output_tokens??0)," out"]})]}),M.commits.length>0&&C.jsxs("div",{children:[C.jsx("h4",{className:"text-2xs font-semibold text-warm-500 uppercase tracking-wider mb-1",children:E("result.commitHistory")}),C.jsx("div",{className:"space-y-0.5",children:M.commits.map((N,$)=>C.jsxs("div",{className:"flex items-start gap-1.5 text-2xs",children:[C.jsx("span",{className:"font-mono text-status-info flex-shrink-0",children:N.hash.slice(0,7)}),C.jsx("span",{className:"text-warm-700 truncate",children:N.message})]},$))})]})]}),T&&A&&C.jsxs("div",{children:[C.jsxs("div",{className:"flex items-center justify-between mb-1",children:[C.jsx("h4",{className:"text-2xs font-semibold text-warm-500 uppercase tracking-wider",children:E("todo.diffOutput")}),C.jsxs("div",{className:"flex gap-2 text-2xs",children:[C.jsxs("span",{className:"text-status-success",children:["+",A.stats.insertions]}),C.jsxs("span",{className:"text-status-error",children:["-",A.stats.deletions]})]})]}),C.jsx("pre",{className:"h-48 overflow-auto bg-warm-800 rounded-lg p-3 font-mono text-2xs leading-relaxed",children:A.diff?A.diff.split(`
2
2
  `).map((N,$)=>{let Q="text-warm-100";return N.startsWith("+")&&!N.startsWith("+++")?Q="text-warm-100 bg-green-500/20":N.startsWith("-")&&!N.startsWith("---")?Q="text-warm-100 bg-red-500/20":N.startsWith("@@")?Q="text-blue-400":N.startsWith("diff ")&&(Q="text-amber-300 font-bold"),C.jsx("div",{className:Q,children:N},$)}):C.jsx("span",{className:"text-warm-500 italic",children:E("log.noChanges")})})]}),C.jsxs("div",{children:[C.jsx("h4",{className:"text-2xs font-semibold text-warm-500 uppercase tracking-wider mb-1",children:E("todo.systemLog")}),C.jsx(Uh,{logs:g,interactive:m&&e.status==="running",todoId:e.id,onSendInput:p})]})]})]})}const R_={taskNode:x_},ql=260,xl=100;function wl(e){const a=new yl.graphlib.Graph;a.setDefaultEdgeLabel(()=>({})),a.setGraph({rankdir:"TB",nodesep:60,ranksep:100});for(const t of e)a.setNode(t.id,{width:ql,height:xl});for(const t of e)t.depends_on&&a.setEdge(t.depends_on,t.id);yl.layout(a);const r=new Map;for(const t of e){const n=a.node(t.id);n&&r.set(t.id,{x:n.x-ql/2,y:n.y-xl/2})}return{nodePositions:r}}function Rl(e,a,r){let t=r;const n=new Set;for(;t;){if(t===a)return!0;if(n.has(t))return!1;n.add(t);const i=e.find(u=>u.id===t);t=(i==null?void 0:i.depends_on)??null}return!1}const Is={running:"#2196F3",completed:"#4CAF50",failed:"#E53935",stopped:"#FF9800",merged:"#9C27B0",pending:"#B8A88A"};function A_({todos:e,projectId:a,projectCliTool:r,projectIsGitRepo:t,projectUseWorktree:n,onAddTodo:i,onStartTodo:u,onStopTodo:s,onDeleteTodo:o,onEditTodo:c,onMergeTodo:f,onCleanupTodo:d,onRetryTodo:l,onContinueTodo:h,onFixTodo:m,onUpdateDependency:p,onUpdatePosition:v,onEvent:b,onSendInput:g,interactiveTodos:_,debugLogging:y,showTokenUsage:q}){const[x,w]=V.useState(null),[T,I]=V.useState(!1),{t:A}=As(),{theme:O}=Vh(),P=O==="dark",L=V.useCallback(F=>{w(B=>B===F?null:F)},[]),{initialNodes:M,initialEdges:U}=V.useMemo(()=>{const B=e.some(k=>k.position_x==null||k.position_y==null)?wl(e).nodePositions:null,z=e.map(k=>{var Z,D;return{id:k.id,type:"taskNode",position:{x:k.position_x??((Z=B==null?void 0:B.get(k.id))==null?void 0:Z.x)??0,y:k.position_y??((D=B==null?void 0:B.get(k.id))==null?void 0:D.y)??0},data:{todo:k,allTodos:e,selected:k.id===x,onStart:u,onStop:s,onDelete:o,onMerge:f,onCleanup:d,onRetry:l,onFix:m,onSelect:L}}}),H=e.filter(k=>k.depends_on).map(k=>{var D;const Z=((D=e.find(re=>re.id===k.depends_on))==null?void 0:D.status)??"pending";return{id:`e-${k.depends_on}-${k.id}`,source:k.depends_on,target:k.id,type:"smoothstep",animated:Z==="running",style:{stroke:Is[Z]??"#B8A88A",strokeWidth:2},markerEnd:{type:Yh.ArrowClosed,width:16,height:16,color:Is[Z]??"#B8A88A"}}});return{initialNodes:z,initialEdges:H}},[e,x,u,s,o,f,d,l,m,L]),[Y,ee,se]=Xh(M),[ve,ce,_e]=Zh(U);V.useEffect(()=>{ee(M),ce(U)},[M,U,ee,ce]);const te=V.useCallback(F=>{!F.source||!F.target||!p||Rl(e,F.source,F.target)||p(F.target,F.source)},[e,p]),de=V.useCallback(F=>{if(p)for(const B of F)p(B.target,null)},[p]),R=V.useCallback((F,B)=>{v&&v(B.id,B.position.x,B.position.y)},[v]),S=V.useRef(!0),E=V.useCallback(()=>{S.current=!1},[]),j=V.useCallback((F,B)=>{S.current=!0,!(!p||!B.source||!B.target)&&(p(F.target,null),Rl(e,B.source,B.target)||p(B.target,B.source))},[e,p]),G=V.useCallback((F,B)=>{!S.current&&p&&p(B.target,null),S.current=!0},[p]),K=V.useCallback(()=>{const{nodePositions:F}=wl(e);if(ee(B=>B.map(z=>{const H=F.get(z.id);return H?{...z,position:H}:z})),v)for(const[B,z]of F)v(B,z.x,z.y)},[e,ee,v]),W=x?e.find(F=>F.id===x):null;return C.jsxs("div",{className:"flex gap-0 h-[600px]",children:[C.jsxs("div",{className:"flex-1 rounded-xl border border-warm-200 overflow-hidden bg-warm-50 ",children:[C.jsxs(Jh,{nodes:Y,edges:ve,onNodesChange:se,onEdgesChange:_e,onConnect:te,onEdgesDelete:de,onReconnectStart:E,onReconnect:j,onReconnectEnd:G,onNodeDragStop:R,nodeTypes:R_,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,deleteKeyCode:"Delete",proOptions:{hideAttribution:!0},children:[C.jsx(Qh,{variant:ev.Dots,gap:20,size:1,color:P?"#4A4A60":"#D4B896",style:{opacity:.3}}),C.jsx(rv,{showInteractive:!1,className:"!bg-theme-card !border-warm-200 !shadow-soft !rounded-lg"}),C.jsx(nv,{nodeColor:F=>{var H;const B=F.data,z=((H=B==null?void 0:B.todo)==null?void 0:H.status)??"pending";return Is[z]??"#B8A88A"},maskColor:P?"rgba(23, 23, 31, 0.7)":"rgba(245, 241, 235, 0.7)",className:"!bg-theme-card !border-warm-200 !shadow-soft !rounded-lg"})]}),C.jsxs("div",{className:"absolute top-3 right-3 flex items-center gap-2 z-10",children:[C.jsxs("button",{onClick:K,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-theme-card border border-warm-200 rounded-lg shadow-soft hover:bg-warm-50 text-warm-600 transition-colors",title:A("graph.autoLayout"),children:[C.jsx(Kh,{size:14}),A("graph.autoLayout")]}),C.jsxs("button",{onClick:()=>I(!0),className:"btn-primary text-xs py-1.5",children:[C.jsx(Wh,{size:14}),A("todos.add")]})]})]}),W&&C.jsx(w_,{todo:W,allTodos:e,projectIsGitRepo:t,projectUseWorktree:n,onClose:()=>w(null),onEdit:c,onStart:u,onStop:s,onMerge:f,onCleanup:d,onRetry:l,onContinue:h,onFix:m,onEvent:b,isInteractive:_.has(W.id),onSendInput:g,debugLogging:y,showTokenUsage:q}),T&&C.jsx($h,{open:!0,onClose:()=>I(!1),size:"lg",children:C.jsx(Sl,{projectId:a,projectCliTool:r,projectIsGitRepo:t,projectUseWorktree:n,availableTodos:e,onSave:async(F,B,z,H,k,Z,D,re,le,Pe)=>{await i(F,B,z,H,k,Z,D,re,le,Pe),I(!1)},onCancel:()=>I(!1)})})]})}export{A_ as default};