text: !function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=268)}([function(e,t,n){var r=n(1),i=n(39),o=n(17),a=n(14),s=n(27),u=function(e,t,n){var l,c,f,d,h=e&u.F,p=e&u.G,v=e&u.S,g=e&u.P,y=e&u.B,m=p?r:v?r[t]||(r[t]={}):(r[t]||{}).prototype,b=p?i:i[t]||(i[t]={}),x=b.prototype||(b.prototype={});for(l in p&&(n=t),n)f=((c=!h&&m&&void 0!==m[l])?m:n)[l],d=y&&c?s(f,r):g&&"function"==typeof f?s(Function.call,f):f,m&&a(m,l,f,e&u.U),b[l]!=f&&o(b,l,d),g&&x[l]!=f&&(x[l]=f)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(2);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(83)("wks"),i=n(45),o=n(1).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},function(e,t,n){var r;try{r={cloneDeep:n(236),constant:n(156),defaults:n(557),each:n(244),filter:n(110),find:n(558),flatten:n(162),forEach:n(245),forIn:n(562),has:n(164),isUndefined:n(247),last:n(157),map:n(112),mapValues:n(563),max:n(564),merge:n(566),min:n(571),minBy:n(572),now:n(197),pick:n(573),range:n(578),reduce:n(248),sortBy:n(241),uniqueId:n(581),values:n(249),zipObject:n(582)}}catch(e){}r||(r=window._),e.exports=r},function(e,t,n){e.exports=!n(4)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(3),i=n(168),o=n(26),a=Object.defineProperty;t.f=n(7)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(35),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r=n(34);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r,i,o;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(98),n(64),n(200),n(113),n(25)],void 0===(o="function"==typeof(r=function(e,t,n,r,i,o){"use strict";function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0}),e.rlog=void 0,t=u(t),n=u(n),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(o);var l={log:[],cyto:(0,t.default)(),getGraph:new i.GraphAtStep([]),graph:new r.Graph([]),curTick:1,updateGraph:o,barret:null,displayTimeOnNodes:!0===window.__APP_TIME__||(0,n.default)(window.__APP_TIME__)};e.rlog=l})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){"use strict";var r=n(6),i=n(24).Graph;function o(e,t,n,i){var o;do{o=r.uniqueId(i)}while(e.hasNode(o));return n.dummy=t,e.setNode(o,n),o}function a(e){return r.max(r.map(e.nodes(),(function(t){var n=e.node(t).rank;if(!r.isUndefined(n))return n})))}e.exports={addDummyNode:o,simplify:function(e){var t=(new i).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),t},asNonCompoundGraph:function(e){var t=new i({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){e.children(n).length||t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){t.setEdge(n,e.edge(n))})),t},successorWeights:function(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.outEdges(t),(function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.inEdges(t),(function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)},intersectRect:function(e,t){var n,r,i=e.x,o=e.y,a=t.x-i,s=t.y-o,u=e.width/2,l=e.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*u>Math.abs(a)*l?(s<0&&(l=-l),n=l*a/s,r=l):(a<0&&(u=-u),n=u,r=u*s/a);return{x:i+n,y:o+r}},buildLayerMatrix:function(e){var t=r.map(r.range(a(e)+1),(function(){return[]}));return r.forEach(e.nodes(),(function(n){var i=e.node(n),o=i.rank;r.isUndefined(o)||(t[o][i.order]=n)})),t},normalizeRanks:function(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank})));r.forEach(e.nodes(),(function(n){var i=e.node(n);r.has(i,"rank")&&(i.rank-=t)}))},removeEmptyRanks:function(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank}))),n=[];r.forEach(e.nodes(),(function(r){var i=e.node(r).rank-t;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,o=e.graph().nodeRankFactor;r.forEach(n,(function(t,n){r.isUndefined(t)&&n%o!=0?--i:i&&r.forEach(t,(function(t){e.node(t).rank+=i}))}))},addBorderNode:function(e,t,n,r){var i={width:0,height:0};arguments.length>=4&&(i.rank=n,i.order=r);return o(e,"border",i,t)},maxRank:a,partition:function(e,t){var n={lhs:[],rhs:[]};return r.forEach(e,(function(e){t(e)?n.lhs.push(e):n.rhs.push(e)})),n},time:function(e,t){var n=r.now();try{return t()}finally{console.log(e+" time: "+(r.now()-n)+"ms")}},notime:function(e,t){return t()}}},function(e,t,n){var r=n(1),i=n(17),o=n(18),a=n(45)("src"),s=n(270),u=(""+s).split("toString");n(39).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var l="function"==typeof n;l&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(l&&(o(n,a)||i(n,a,e[t]?""+e[t]:u.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||s.call(this)}))},function(e,t,n){var r=n(0),i=n(4),o=n(34),a=/"/g,s=function(e,t,n,r){var i=String(o(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,"&quot;")+'"'),s+">"+i+"</"+t+">"};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*i((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",n)}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(8),i=n(44);e.exports=n(7)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(70),i=n(44),o=n(22),a=n(26),s=n(18),u=n(168),l=Object.getOwnPropertyDescriptor;t.f=n(7)?l:function(e,t){if(e=o(e),t=a(t,!0),u)try{return l(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t,n){var r;try{r={clone:n(138),constant:n(156),each:n(244),filter:n(110),has:n(164),isArray:n(10),isEmpty:n(534),isFunction:n(72),isUndefined:n(247),keys:n(38),map:n(112),reduce:n(248),size:n(537),transform:n(543),union:n(154),values:n(249)}}catch(e){}r||(r=window._),e.exports=r},function(e,t,n){var r=n(84),i=n(34);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(198),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},function(e,t,n){var r;try{r=n(531)}catch(e){}r||(r=window.graphlib),e.exports=r},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(261),n(167),n(264),n(265),n(608),n(609),n(266),n(267),n(610),n(611)],void 0===(o="function"==typeof(r=function(e,t,n,r,i,o,a,s,u,l,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var f={atTick:!0,updateGraph:!0,nextOutputCalc:!0,prevOutputCalc:!0,firstOutputCalc:!0,lastOutputCalc:!0};Object.defineProperty(e,"atTick",{enumerable:!0,get:function(){return t.atTick}}),Object.defineProperty(e,"updateGraph",{enumerable:!0,get:function(){return t.atTick}}),Object.defineProperty(e,"nextOutputCalc",{enumerable:!0,get:function(){return n.nextOutputCalc}}),Object.defineProperty(e,"prevOutputCalc",{enumerable:!0,get:function(){return n.prevOutputCalc}}),Object.defineProperty(e,"firstOutputCalc",{enumerable:!0,get:function(){return n.firstOutputCalc}}),Object.defineProperty(e,"lastOutputCalc",{enumerable:!0,get:function(){return n.lastOutputCalc}}),Object.keys(r).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(f,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}}))})),Object.keys(i).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(f,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}}))})),Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(f,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))})),Object.keys(a).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(f,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}}))})),Object.keys(s).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(f,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return s[t]}}))})),Object.keys(u).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(f,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return u[t]}}))})),Object.keys(l).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(f,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return l[t]}}))})),Object.keys(c).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(f,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return c[t]}}))}))})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r=n(2);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(19);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(27),i=n(84),o=n(11),a=n(9),s=n(170);e.exports=function(e,t){var n=1==e,u=2==e,l=3==e,c=4==e,f=6==e,d=5==e||f,h=t||s;return function(t,s,p){for(var v,g,y=o(t),m=i(y),b=r(s,p,3),x=a(m.length),w=0,S=n?h(t,x):u?h(t,0):void 0;x>w;w++)if((d||w in m)&&(g=b(v=m[w],w,y),e))if(n)S[w]=g;else if(g)switch(e){case 3:return!0;case 5:return v;case 6:return w;case 2:S.push(v)}else if(c)return!1;return f?-1:l||c?c:S}}},function(e,t,n){"use strict";var r=n(4);e.exports=function(e,t){return!!e&&r((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},function(e,t,n){var r=n(0),i=n(39),o=n(4);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){var r=n(72),i=n(143);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t,n){var r=n(487),i=n(496),o=n(43),a=n(10),s=n(503);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?a(e)?i(e[0],e[1]):r(e):s(e)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on  "+e);return e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(18),i=n(11),o=n(123)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){"use strict";if(n(7)){var r=n(40),i=n(1),o=n(4),a=n(0),s=n(96),u=n(137),l=n(27),c=n(61),f=n(44),d=n(17),h=n(60),p=n(35),v=n(9),g=n(194),y=n(56),m=n(26),b=n(18),x=n(69),w=n(2),S=n(11),E=n(118),k=n(48),_=n(36),T=n(51).f,C=n(120),P=n(45),D=n(5),M=n(28),O=n(87),I=n(71),N=n(121),A=n(57),L=n(86),j=n(59),B=n(117),F=n(169),R=n(8),z=n(20),V=R.f,q=z.f,G=i.RangeError,W=i.TypeError,H=i.Uint8Array,U=Array.prototype,Y=u.ArrayBuffer,X=u.DataView,K=M(0),$=M(2),Z=M(3),Q=M(4),J=M(5),ee=M(6),te=O(!0),ne=O(!1),re=N.values,ie=N.keys,oe=N.entries,ae=U.lastIndexOf,se=U.reduce,ue=U.reduceRight,le=U.join,ce=U.sort,fe=U.slice,de=U.toString,he=U.toLocaleString,pe=D("iterator"),ve=D("toStringTag"),ge=P("typed_constructor"),ye=P("def_constructor"),me=s.CONSTR,be=s.TYPED,xe=s.VIEW,we=M(1,(function(e,t){return Te(I(e,e[ye]),t)})),Se=o((function(){return 1===new H(new Uint16Array([1]).buffer)[0]})),Ee=!!H&&!!H.prototype.set&&o((function(){new H(1).set({})})),ke=function(e,t){var n=p(e);if(n<0||n%t)throw G("Wrong offset!");return n},_e=function(e){if(w(e)&&be in e)return e;throw W(e+" is not a typed array!")},Te=function(e,t){if(!w(e)||!(ge in e))throw W("It is not a typed array constructor!");return new e(t)},Ce=function(e,t){return Pe(I(e,e[ye]),t)},Pe=function(e,t){for(var n=0,r=t.length,i=Te(e,r);r>n;)i[n]=t[n++];return i},De=function(e,t,n){V(e,t,{get:function(){return this._d[n]}})},Me=function(e){var t,n,r,i,o,a,s=S(e),u=arguments.length,c=u>1?arguments[1]:void 0,f=void 0!==c,d=C(s);if(null!=d&&!E(d)){for(a=d.call(s),r=[],t=0;!(o=a.next()).done;t++)r.push(o.value);s=r}for(f&&u>2&&(c=l(c,arguments[2],2)),t=0,n=v(s.length),i=Te(this,n);n>t;t++)i[t]=f?c(s[t],t):s[t];return i},Oe=function(){for(var e=0,t=arguments.length,n=Te(this,t);t>e;)n[e]=arguments[e++];return n},Ie=!!H&&o((function(){he.call(new H(1))})),Ne=function(){return he.apply(Ie?fe.call(_e(this)):_e(this),arguments)},Ae={copyWithin:function(e,t){return F.call(_e(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return Q(_e(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return B.apply(_e(this),arguments)},filter:function(e){return Ce(this,$(_e(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return J(_e(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(_e(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){K(_e(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(_e(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(_e(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return le.apply(_e(this),arguments)},lastIndexOf:function(e){return ae.apply(_e(this),arguments)},map:function(e){return we(_e(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return se.apply(_e(this),arguments)},reduceRight:function(e){return ue.apply(_e(this),arguments)},reverse:function(){for(var e,t=_e(this).length,n=Math.floor(t/2),r=0;r<n;)e=this[r],this[r++]=this[--t],this[t]=e;return this},some:function(e){return Z(_e(this),e,arguments.length>1?arguments[1]:void 0)},sort:function(e){return ce.call(_e(this),e)},subarray:function(e,t){var n=_e(this),r=n.length,i=y(e,r);return new(I(n,n[ye]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,v((void 0===t?r:y(t,r))-i))}},Le=function(e,t){return Ce(this,fe.call(_e(this),e,t))},je=function(e){_e(this);var t=ke(arguments[1],1),n=this.length,r=S(e),i=v(r.length),o=0;if(i+t>n)throw G("Wrong length!");for(;o<i;)this[t+o]=r[o++]},Be={entries:function(){return oe.call(_e(this))},keys:function(){return ie.call(_e(this))},values:function(){return re.call(_e(this))}},Fe=function(e,t){return w(e)&&e[be]&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},Re=function(e,t){return Fe(e,t=m(t,!0))?f(2,e[t]):q(e,t)},ze=function(e,t,n){return!(Fe(e,t=m(t,!0))&&w(n)&&b(n,"value"))||b(n,"get")||b(n,"set")||n.configurable||b(n,"writable")&&!n.writable||b(n,"enumerable")&&!n.enumerable?V(e,t,n):(e[t]=n.value,e)};me||(z.f=Re,R.f=ze),a(a.S+a.F*!me,"Object",{getOwnPropertyDescriptor:Re,defineProperty:ze}),o((function(){de.call({})}))&&(de=he=function(){return le.call(this)});var Ve=h({},Ae);h(Ve,Be),d(Ve,pe,Be.values),h(Ve,{slice:Le,set:je,constructor:function(){},toString:de,toLocaleString:Ne}),De(Ve,"buffer","b"),De(Ve,"byteOffset","o"),De(Ve,"byteLength","l"),De(Ve,"length","e"),V(Ve,ve,{get:function(){return this[be]}}),e.exports=function(e,t,n,u){var l=e+((u=!!u)?"Clamped":"")+"Array",f="get"+e,h="set"+e,p=i[l],y=p||{},m=p&&_(p),b=!p||!s.ABV,S={},E=p&&p.prototype,C=function(e,n){V(e,n,{get:function(){return function(e,n){var r=e._d;return r.v[f](n*t+r.o,Se)}(this,n)},set:function(e){return function(e,n,r){var i=e._d;u&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[h](n*t+i.o,r,Se)}(this,n,e)},enumerable:!0})};b?(p=n((function(e,n,r,i){c(e,p,l,"_d");var o,a,s,u,f=0,h=0;if(w(n)){if(!(n instanceof Y||"ArrayBuffer"==(u=x(n))||"SharedArrayBuffer"==u))return be in n?Pe(p,n):Me.call(p,n);o=n,h=ke(r,t);var y=n.byteLength;if(void 0===i){if(y%t)throw G("Wrong length!");if((a=y-h)<0)throw G("Wrong length!")}else if((a=v(i)*t)+h>y)throw G("Wrong length!");s=a/t}else s=g(n),o=new Y(a=s*t);for(d(e,"_d",{b:o,o:h,l:a,e:s,v:new X(o)});f<s;)C(e,f++)})),E=p.prototype=k(Ve),d(E,"constructor",p)):o((function(){p(1)}))&&o((function(){new p(-1)}))&&L((function(e){new p,new p(null),new p(1.5),new p(e)}),!0)||(p=n((function(e,n,r,i){var o;return c(e,p,l),w(n)?n instanceof Y||"ArrayBuffer"==(o=x(n))||"SharedArrayBuffer"==o?void 0!==i?new y(n,ke(r,t),i):void 0!==r?new y(n,ke(r,t)):new y(n):be in n?Pe(p,n):Me.call(p,n):new y(g(n))})),K(m!==Function.prototype?T(y).concat(T(m)):T(y),(function(e){e in p||d(p,e,y[e])})),p.prototype=E,r||(E.constructor=p));var P=E[pe],D=!!P&&("values"==P.name||null==P.name),M=Be.values;d(p,ge,!0),d(E,be,l),d(E,xe,!0),d(E,ye,p),(u?new p(1)[ve]==l:ve in E)||V(E,ve,{get:function(){return l}}),S[l]=p,a(a.G+a.W+a.F*(p!=y),S),a(a.S,l,{BYTES_PER_ELEMENT:t}),a(a.S+a.F*o((function(){y.of.call(p,1)})),l,{from:Me,of:Oe}),"BYTES_PER_ELEMENT"in E||d(E,"BYTES_PER_ELEMENT",t),a(a.P,l,Ae),j(l),a(a.P+a.F*Ee,l,{set:je}),a(a.P+a.F*!D,l,Be),r||E.toString==de||(E.toString=de),a(a.P+a.F*o((function(){new p(1).slice()})),l,{slice:Le}),a(a.P+a.F*(o((function(){return[1,2].toLocaleString()!=new p([1,2]).toLocaleString()}))||!o((function(){E.toLocaleString.call([1,2])}))),l,{toLocaleString:Ne}),A[l]=D?P:M,r||D||d(E,pe,M)}}else e.exports=function(){}},function(e,t,n){var r=n(204),i=n(145),o=n(32);e.exports=function(e){return o(e)?r(e):i(e)}},function(e,t){var n=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(e,t){e.exports=!1},function(e,t,n){var r=n(45)("meta"),i=n(2),o=n(18),a=n(8).f,s=0,u=Object.isExtensible||function(){return!0},l=!n(4)((function(){return u(Object.preventExtensions({}))})),c=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},f=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!u(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!o(e,r)){if(!u(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return l&&f.NEED&&u(e)&&!o(e,r)&&c(e),e}}},function(e,t,n){var r=n(53),i=n(31);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},function(e,t){e.exports=function(e){return e}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(5)("unscopables"),i=Array.prototype;null==i[r]&&n(17)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(3),i=n(173),o=n(124),a=n(123)("IE_PROTO"),s=function(){},u=function(){var e,t=n(116)("iframe"),r=o.length;for(t.style.display="none",n(175).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u.prototype[o[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[a]=e):n=u(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(174),i=n(124);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(2);e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){var r=n(174),i=n(124).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r;
  /*!
   * jQuery JavaScript Library v3.4.1
   * https://jquery.com/
   *
   * Includes Sizzle.js
   * https://sizzlejs.com/
   *
   * Copyright JS Foundation and other contributors
   * Released under the MIT license
   * https://jquery.org/license
   *
   * Date: 2019-05-01T21:04Z
   */!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(n,i){"use strict";var o=[],a=n.document,s=Object.getPrototypeOf,u=o.slice,l=o.concat,c=o.push,f=o.indexOf,d={},h=d.toString,p=d.hasOwnProperty,v=p.toString,g=v.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},b=function(e){return null!=e&&e===e.window},x={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,n){var r,i,o=(n=n||a).createElement("script");if(o.text=e,t)for(r in x)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function S(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[h.call(e)]||"object":typeof e}var E=function(e,t){return new E.fn.init(e,t)},k=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function _(e){var t=!!e&&"length"in e&&e.length,n=S(e);return!m(e)&&!b(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}E.fn=E.prototype={jquery:"3.4.1",constructor:E,length:0,toArray:function(){return u.call(this)},get:function(e){return null==e?u.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=E.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return E.each(this,e)},map:function(e){return this.pushStack(E.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:c,sort:o.sort,splice:o.splice},E.extend=E.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(E.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||E.isPlainObject(n)?n:{},i=!1,a[t]=E.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},E.extend({expando:"jQuery"+("3.4.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==h.call(e))&&(!(t=s(e))||"function"==typeof(n=p.call(t,"constructor")&&t.constructor)&&v.call(n)===g)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){w(e,{nonce:t&&t.nonce})},each:function(e,t){var n,r=0;if(_(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(k,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(_(Object(e))?E.merge(n,"string"==typeof e?[e]:e):c.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:f.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(_(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return l.apply([],a)},guid:1,support:y}),"function"==typeof Symbol&&(E.fn[Symbol.iterator]=o[Symbol.iterator]),E.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){d["[object "+t+"]"]=t.toLowerCase()}));var T=
  /*!
   * Sizzle CSS Selector Engine v2.3.4
   * https://sizzlejs.com/
   *
   * Copyright JS Foundation and other contributors
   * Released under the MIT license
   * https://js.foundation/
   *
   * Date: 2019-04-08
   */
  function(e){var t,n,r,i,o,a,s,u,l,c,f,d,h,p,v,g,y,m,b,x="sizzle"+1*new Date,w=e.document,S=0,E=0,k=ue(),_=ue(),T=ue(),C=ue(),P=function(e,t){return e===t&&(f=!0),0},D={}.hasOwnProperty,M=[],O=M.pop,I=M.push,N=M.push,A=M.slice,L=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},j="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",B="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",R="\\["+B+"*("+F+")(?:"+B+"*([*^$|!~]?=)"+B+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+F+"))|)"+B+"*\\]",z=":("+F+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+R+")*)|.*)\\)|)",V=new RegExp(B+"+","g"),q=new RegExp("^"+B+"+|((?:^|[^\\\\])(?:\\\\.)*)"+B+"+$","g"),G=new RegExp("^"+B+"*,"+B+"*"),W=new RegExp("^"+B+"*([>+~]|"+B+")"+B+"*"),H=new RegExp(B+"|>"),U=new RegExp(z),Y=new RegExp("^"+F+"$"),X={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+z),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+B+"*(even|odd|(([+-]|)(\\d*)n|)"+B+"*(?:([+-]|)"+B+"*(\\d+)|))"+B+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+B+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+B+"*((?:-\\d)?\\d*)"+B+"*\\)|)(?=[^-]|$)","i")},K=/HTML$/i,$=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+B+"?|("+B+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){d()},ae=xe((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{N.apply(M=A.call(w.childNodes),w.childNodes),M[w.childNodes.length].nodeType}catch(e){N={apply:M.length?function(e,t){I.apply(e,A.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,i){var o,s,l,c,f,p,y,m=t&&t.ownerDocument,S=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==S&&9!==S&&11!==S)return r;if(!i&&((t?t.ownerDocument||t:w)!==h&&d(t),t=t||h,v)){if(11!==S&&(f=J.exec(e)))if(o=f[1]){if(9===S){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&b(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return N.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return N.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!C[e+" "]&&(!g||!g.test(e))&&(1!==S||"object"!==t.nodeName.toLowerCase())){if(y=e,m=t,1===S&&H.test(e)){for((c=t.getAttribute("id"))?c=c.replace(re,ie):t.setAttribute("id",c=x),s=(p=a(e)).length;s--;)p[s]="#"+c+" "+be(p[s]);y=p.join(","),m=ee.test(e)&&ye(t.parentNode)||t}try{return N.apply(r,m.querySelectorAll(y)),r}catch(t){C(e,!0)}finally{c===x&&t.removeAttribute("id")}}}return u(e.replace(q,"$1"),t,r,i)}function ue(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function le(e){return e[x]=!0,e}function ce(e){var t=h.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function de(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function he(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ve(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ge(e){return le((function(t){return t=+t,le((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function ye(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},o=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!K.test(t||n&&n.nodeName||"HTML")},d=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==h&&9===a.nodeType&&a.documentElement?(p=(h=a).documentElement,v=!o(h),w!==h&&(i=h.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ce((function(e){return e.appendChild(h.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=Q.test(h.getElementsByClassName),n.getById=ce((function(e){return p.appendChild(e).id=x,!h.getElementsByName||!h.getElementsByName(x).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&v){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&v){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&v)return t.getElementsByClassName(e)},y=[],g=[],(n.qsa=Q.test(h.querySelectorAll))&&(ce((function(e){p.appendChild(e).innerHTML="<a id='"+x+"'></a><select id='"+x+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+B+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+B+"*(?:value|"+j+")"),e.querySelectorAll("[id~="+x+"-]").length||g.push("~="),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+x+"+*").length||g.push(".#.+[+~]")})),ce((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=h.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+B+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=Q.test(m=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ce((function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),y.push("!=",z)})),g=g.length&&new RegExp(g.join("|")),y=y.length&&new RegExp(y.join("|")),t=Q.test(p.compareDocumentPosition),b=t||Q.test(p.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},P=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===h||e.ownerDocument===w&&b(w,e)?-1:t===h||t.ownerDocument===w&&b(w,t)?1:c?L(c,e)-L(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===h?-1:t===h?1:i?-1:o?1:c?L(c,e)-L(c,t):0;if(i===o)return de(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?de(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},h):h},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==h&&d(e),n.matchesSelector&&v&&!C[t+" "]&&(!y||!y.test(t))&&(!g||!g.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){C(t,!0)}return se(t,h,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!==h&&d(e),b(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!==h&&d(e);var i=r.attrHandle[t.toLowerCase()],o=i&&D.call(r.attrHandle,t.toLowerCase())?i(e,t,!v):void 0;return void 0!==o?o:n.attributes||!v?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(P),f){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return c=null,e},i=se.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=se.selectors={cacheLength:50,createPseudo:le,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return X.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&U.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=k[e+" "];return t||(t=new RegExp("(^|"+B+")"+e+"("+B+"|$)"))&&k(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=se.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(V," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,h,p,v=o!==a?"nextSibling":"previousSibling",g=t.parentNode,y=s&&t.nodeName.toLowerCase(),m=!u&&!s,b=!1;if(g){if(o){for(;v;){for(d=t;d=d[v];)if(s?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;p=v="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&m){for(b=(h=(l=(c=(f=(d=g)[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===S&&l[1])&&l[2],d=h&&g.childNodes[h];d=++h&&d&&d[v]||(b=h=0)||p.pop();)if(1===d.nodeType&&++b&&d===t){c[e]=[S,h,b];break}}else if(m&&(b=h=(l=(c=(f=(d=t)[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===S&&l[1]),!1===b)for(;(d=++h&&d&&d[v]||(b=h=0)||p.pop())&&((s?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++b||(m&&((c=(f=d[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]=[S,b]),d!==t)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[x]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?le((function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=L(e,o[a])]=!(n[r]=o[a])})):function(e){return i(e,0,n)}):i}},pseudos:{not:le((function(e){var t=[],n=[],r=s(e.replace(q,"$1"));return r[x]?le((function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:le((function(e){return function(t){return se(e,t).length>0}})),contains:le((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}})),lang:le((function(e){return Y.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=v?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ve(!1),disabled:ve(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Z.test(e.nodeName)},input:function(e){return $.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ge((function(){return[0]})),last:ge((function(e,t){return[t-1]})),eq:ge((function(e,t,n){return[n<0?n+t:n]})),even:ge((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:ge((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:ge((function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e})),gt:ge((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=he(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pe(t);function me(){}function be(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function xe(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=E++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,d=[S,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(c=(f=t[x]||(t[x]={}))[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===S&&l[1]===s)return d[2]=l[2];if(c[o]=d,d[2]=e(t,n,u))return!0}return!1}}function we(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function Se(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ee(e,t,n,r,i,o){return r&&!r[x]&&(r=Ee(r)),i&&!i[x]&&(i=Ee(i,o)),le((function(o,a,s,u){var l,c,f,d=[],h=[],p=a.length,v=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),g=!e||!o&&t?v:Se(v,d,e,s,u),y=n?i||(o?e:p||r)?[]:a:g;if(n&&n(g,y,s,u),r)for(l=Se(y,h),r(l,[],s,u),c=l.length;c--;)(f=l[c])&&(y[h[c]]=!(g[h[c]]=f));if(o){if(i||e){if(i){for(l=[],c=y.length;c--;)(f=y[c])&&l.push(g[c]=f);i(null,y=[],l,u)}for(c=y.length;c--;)(f=y[c])&&(l=i?L(o,f):d[c])>-1&&(o[l]=!(a[l]=f))}}else y=Se(y===a?y.splice(p,y.length):y),i?i(null,a,y,u):N.apply(a,y)}))}function ke(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=xe((function(e){return e===t}),s,!0),f=xe((function(e){return L(t,e)>-1}),s,!0),d=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u<o;u++)if(n=r.relative[e[u].type])d=[xe(we(d),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[x]){for(i=++u;i<o&&!r.relative[e[i].type];i++);return Ee(u>1&&we(d),u>1&&be(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(q,"$1"),n,u<i&&ke(e.slice(u,i)),i<o&&ke(e=e.slice(i)),i<o&&be(e))}d.push(n)}return we(d)}return me.prototype=r.filters=r.pseudos,r.setFilters=new me,a=se.tokenize=function(e,t){var n,i,o,a,s,u,l,c=_[e+" "];if(c)return t?0:c.slice(0);for(s=e,u=[],l=r.preFilter;s;){for(a in n&&!(i=G.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=W.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(q," ")}),s=s.slice(n.length)),r.filter)!(i=X[a].exec(s))||l[a]&&!(i=l[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?se.error(e):_(e,u).slice(0)},s=se.compile=function(e,t){var n,i=[],o=[],s=T[e+" "];if(!s){for(t||(t=a(e)),n=t.length;n--;)(s=ke(t[n]))[x]?i.push(s):o.push(s);(s=T(e,function(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,s,u,c){var f,p,g,y=0,m="0",b=o&&[],x=[],w=l,E=o||i&&r.find.TAG("*",c),k=S+=null==w?1:Math.random()||.1,_=E.length;for(c&&(l=a===h||a||c);m!==_&&null!=(f=E[m]);m++){if(i&&f){for(p=0,a||f.ownerDocument===h||(d(f),s=!v);g=e[p++];)if(g(f,a||h,s)){u.push(f);break}c&&(S=k)}n&&((f=!g&&f)&&y--,o&&b.push(f))}if(y+=m,n&&m!==y){for(p=0;g=t[p++];)g(b,x,a,s);if(o){if(y>0)for(;m--;)b[m]||x[m]||(x[m]=O.call(u));x=Se(x)}N.apply(u,x),c&&!o&&x.length>0&&y+t.length>1&&se.uniqueSort(u)}return c&&(S=k,l=w),b};return n?le(o):o}(o,i))).selector=e}return s},u=se.select=function(e,t,n,i){var o,u,l,c,f,d="function"==typeof e&&e,h=!i&&a(e=d.selector||e);if(n=n||[],1===h.length){if((u=h[0]=h[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&v&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(te,ne),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(o=X.needsContext.test(e)?0:u.length;o--&&(l=u[o],!r.relative[c=l.type]);)if((f=r.find[c])&&(i=f(l.matches[0].replace(te,ne),ee.test(u[0].type)&&ye(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&be(u)))return N.apply(n,i),n;break}}return(d||s(e,h))(i,t,!v,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},n.sortStable=x.split("").sort(P).join("")===x,n.detectDuplicates=!!f,d(),n.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(h.createElement("fieldset"))})),ce((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||fe("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ce((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||fe("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||fe(j,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(n);E.find=T,E.expr=T.selectors,E.expr[":"]=E.expr.pseudos,E.uniqueSort=E.unique=T.uniqueSort,E.text=T.getText,E.isXMLDoc=T.isXML,E.contains=T.contains,E.escapeSelector=T.escape;var C=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&E(e).is(n))break;r.push(e)}return r},P=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},D=E.expr.match.needsContext;function M(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var O=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function I(e,t,n){return m(t)?E.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?E.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?E.grep(e,(function(e){return f.call(t,e)>-1!==n})):E.filter(t,e,n)}E.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?E.find.matchesSelector(r,e)?[r]:[]:E.find.matches(e,E.grep(t,(function(e){return 1===e.nodeType})))},E.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(E(e).filter((function(){for(t=0;t<r;t++)if(E.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)E.find(e,i[t],n);return r>1?E.uniqueSort(n):n},filter:function(e){return this.pushStack(I(this,e||[],!1))},not:function(e){return this.pushStack(I(this,e||[],!0))},is:function(e){return!!I(this,"string"==typeof e&&D.test(e)?E(e):e||[],!1).length}});var N,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(E.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||N,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:A.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:a,!0)),O.test(r[1])&&E.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=a.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(E):E.makeArray(e,this)}).prototype=E.fn,N=E(a);var L=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function B(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(E.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&E(e);if(!D.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&E.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?E.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?f.call(E(e),this[0]):f.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(E.uniqueSort(E.merge(this.get(),E(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),E.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return C(e,"parentNode")},parentsUntil:function(e,t,n){return C(e,"parentNode",n)},next:function(e){return B(e,"nextSibling")},prev:function(e){return B(e,"previousSibling")},nextAll:function(e){return C(e,"nextSibling")},prevAll:function(e){return C(e,"previousSibling")},nextUntil:function(e,t,n){return C(e,"nextSibling",n)},prevUntil:function(e,t,n){return C(e,"previousSibling",n)},siblings:function(e){return P((e.parentNode||{}).firstChild,e)},children:function(e){return P(e.firstChild)},contents:function(e){return void 0!==e.contentDocument?e.contentDocument:(M(e,"template")&&(e=e.content||e),E.merge([],e.childNodes))}},(function(e,t){E.fn[e]=function(n,r){var i=E.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=E.filter(r,i)),this.length>1&&(j[e]||E.uniqueSort(i),L.test(e)&&i.reverse()),this.pushStack(i)}}));var F=/[^\x20\t\r\n\f]+/g;function R(e){return e}function z(e){throw e}function V(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}E.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return E.each(e.match(F)||[],(function(e,n){t[n]=!0})),t}(e):E.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){E.each(n,(function(n,r){m(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==S(r)&&t(r)}))}(arguments),n&&!t&&u()),this},remove:function(){return E.each(arguments,(function(e,t){for(var n;(n=E.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--})),this},has:function(e){return e?E.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},E.extend({Deferred:function(e){var t=[["notify","progress",E.Callbacks("memory"),E.Callbacks("memory"),2],["resolve","done",E.Callbacks("once memory"),E.Callbacks("once memory"),0,"resolved"],["reject","fail",E.Callbacks("once memory"),E.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return E.Deferred((function(n){E.each(t,(function(t,r){var i=m(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&m(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,r,i){var o=0;function a(e,t,r,i){return function(){var s=this,u=arguments,l=function(){var n,l;if(!(e<o)){if((n=r.apply(s,u))===t.promise())throw new TypeError("Thenable self-resolution");l=n&&("object"==typeof n||"function"==typeof n)&&n.then,m(l)?i?l.call(n,a(o,t,R,i),a(o,t,z,i)):(o++,l.call(n,a(o,t,R,i),a(o,t,z,i),a(o,t,R,t.notifyWith))):(r!==R&&(s=void 0,u=[n]),(i||t.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(n){E.Deferred.exceptionHook&&E.Deferred.exceptionHook(n,c.stackTrace),e+1>=o&&(r!==z&&(s=void 0,u=[n]),t.rejectWith(s,u))}};e?c():(E.Deferred.getStackHook&&(c.stackTrace=E.Deferred.getStackHook()),n.setTimeout(c))}}return E.Deferred((function(n){t[0][3].add(a(0,n,m(i)?i:R,n.notifyWith)),t[1][3].add(a(0,n,m(e)?e:R)),t[2][3].add(a(0,n,m(r)?r:z))})).promise()},promise:function(e){return null!=e?E.extend(e,i):i}},o={};return E.each(t,(function(e,n){var a=n[2],s=n[5];i[n[1]]=a.add,s&&a.add((function(){r=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=a.fireWith})),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=u.call(arguments),o=E.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?u.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(V(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||m(i[n]&&i[n].then)))return o.then();for(;n--;)V(i[n],a(n),o.reject);return o.promise()}});var q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;E.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&q.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},E.readyException=function(e){n.setTimeout((function(){throw e}))};var G=E.Deferred();function W(){a.removeEventListener("DOMContentLoaded",W),n.removeEventListener("load",W),E.ready()}E.fn.ready=function(e){return G.then(e).catch((function(e){E.readyException(e)})),this},E.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--E.readyWait:E.isReady)||(E.isReady=!0,!0!==e&&--E.readyWait>0||G.resolveWith(a,[E]))}}),E.ready.then=G.then,"complete"===a.readyState||"loading"!==a.readyState&&!a.documentElement.doScroll?n.setTimeout(E.ready):(a.addEventListener("DOMContentLoaded",W),n.addEventListener("load",W));var H=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===S(n))for(s in i=!0,n)H(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(E(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},U=/^-ms-/,Y=/-([a-z])/g;function X(e,t){return t.toUpperCase()}function K(e){return e.replace(U,"ms-").replace(Y,X)}var $=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Z(){this.expando=E.expando+Z.uid++}Z.uid=1,Z.prototype={cache:function(e){var t=e[this.expando];return t||(t={},$(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[K(t)]=n;else for(r in t)i[K(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][K(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(K):(t=K(t))in r?[t]:t.match(F)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||E.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!E.isEmptyObject(t)}};var Q=new Z,J=new Z,ee=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,te=/[A-Z]/g;function ne(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(te,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ee.test(e)?JSON.parse(e):e)}(n)}catch(e){}J.set(e,t,n)}else n=void 0;return n}E.extend({hasData:function(e){return J.hasData(e)||Q.hasData(e)},data:function(e,t,n){return J.access(e,t,n)},removeData:function(e,t){J.remove(e,t)},_data:function(e,t,n){return Q.access(e,t,n)},_removeData:function(e,t){Q.remove(e,t)}}),E.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=J.get(o),1===o.nodeType&&!Q.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=K(r.slice(5)),ne(o,r,i[r]));Q.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){J.set(this,e)})):H(this,(function(t){var n;if(o&&void 0===t)return void 0!==(n=J.get(o,e))||void 0!==(n=ne(o,e))?n:void 0;this.each((function(){J.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){J.remove(this,e)}))}}),E.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Q.get(e,t),n&&(!r||Array.isArray(n)?r=Q.access(e,t,E.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=E.queue(e,t),r=n.length,i=n.shift(),o=E._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){E.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:E.Callbacks("once memory").add((function(){Q.remove(e,[t+"queue",n])}))})}}),E.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?E.queue(this[0],e):void 0===t?this:this.each((function(){var n=E.queue(this,e,t);E._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&E.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){E.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=E.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=Q.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],ae=a.documentElement,se=function(e){return E.contains(e.ownerDocument,e)},ue={composed:!0};ae.getRootNode&&(se=function(e){return E.contains(e.ownerDocument,e)||e.getRootNode(ue)===e.ownerDocument});var le=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&se(e)&&"none"===E.css(e,"display")},ce=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=a[o];return i};function fe(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return E.css(e,t,"")},u=s(),l=n&&n[3]||(E.cssNumber[t]?"":"px"),c=e.nodeType&&(E.cssNumber[t]||"px"!==l&&+u)&&ie.exec(E.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;a--;)E.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,E.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var de={};function he(e){var t,n=e.ownerDocument,r=e.nodeName,i=de[r];return i||(t=n.body.appendChild(n.createElement(r)),i=E.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),de[r]=i,i)}function pe(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=Q.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&le(r)&&(i[o]=he(r))):"none"!==n&&(i[o]="none",Q.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}E.fn.extend({show:function(){return pe(this,!0)},hide:function(){return pe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){le(this)?E(this).show():E(this).hide()}))}});var ve=/^(?:checkbox|radio)$/i,ge=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ye=/^$|^module$|\/(?:java|ecma)script/i,me={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function be(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&M(e,t)?E.merge([e],n):n}function xe(e,t){for(var n=0,r=e.length;n<r;n++)Q.set(e[n],"globalEval",!t||Q.get(t[n],"globalEval"))}me.optgroup=me.option,me.tbody=me.tfoot=me.colgroup=me.caption=me.thead,me.th=me.td;var we,Se,Ee=/<|&#?\w+;/;function ke(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),d=[],h=0,p=e.length;h<p;h++)if((o=e[h])||0===o)if("object"===S(o))E.merge(d,o.nodeType?[o]:o);else if(Ee.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(ge.exec(o)||["",""])[1].toLowerCase(),u=me[s]||me._default,a.innerHTML=u[1]+E.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;E.merge(d,a.childNodes),(a=f.firstChild).textContent=""}else d.push(t.createTextNode(o));for(f.textContent="",h=0;o=d[h++];)if(r&&E.inArray(o,r)>-1)i&&i.push(o);else if(l=se(o),a=be(f.appendChild(o),"script"),l&&xe(a),n)for(c=0;o=a[c++];)ye.test(o.type||"")&&n.push(o);return f}we=a.createDocumentFragment().appendChild(a.createElement("div")),(Se=a.createElement("input")).setAttribute("type","radio"),Se.setAttribute("checked","checked"),Se.setAttribute("name","t"),we.appendChild(Se),y.checkClone=we.cloneNode(!0).cloneNode(!0).lastChild.checked,we.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!we.cloneNode(!0).lastChild.defaultValue;var _e=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function Pe(){return!0}function De(){return!1}function Me(e,t){return e===function(){try{return a.activeElement}catch(e){}}()==("focus"===t)}function Oe(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Oe(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=De;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return E().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=E.guid++)),e.each((function(){E.event.add(this,t,i,r,n)}))}function Ie(e,t,n){n?(Q.set(e,t,!1),E.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=Q.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(E.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=u.call(arguments),Q.set(this,t,o),r=n(this,t),this[t](),o!==(i=Q.get(this,t))||r?Q.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i.value}else o.length&&(Q.set(this,t,{value:E.event.trigger(E.extend(o[0],E.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,t)&&E.event.add(e,t,Pe)}E.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,h,p,v,g=Q.get(e);if(g)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&E.find.matchesSelector(ae,i),n.guid||(n.guid=E.guid++),(u=g.events)||(u=g.events={}),(a=g.handle)||(a=g.handle=function(t){return void 0!==E&&E.event.triggered!==t.type?E.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(F)||[""]).length;l--;)h=v=(s=Ce.exec(t[l])||[])[1],p=(s[2]||"").split(".").sort(),h&&(f=E.event.special[h]||{},h=(i?f.delegateType:f.bindType)||h,f=E.event.special[h]||{},c=E.extend({type:h,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&E.expr.match.needsContext.test(i),namespace:p.join(".")},o),(d=u[h])||((d=u[h]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,p,a)||e.addEventListener&&e.addEventListener(h,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),E.event.global[h]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,h,p,v,g=Q.hasData(e)&&Q.get(e);if(g&&(u=g.events)){for(l=(t=(t||"").match(F)||[""]).length;l--;)if(h=v=(s=Ce.exec(t[l])||[])[1],p=(s[2]||"").split(".").sort(),h){for(f=E.event.special[h]||{},d=u[h=(r?f.delegateType:f.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)c=d[o],!i&&v!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,p,g.handle)||E.removeEvent(e,h,g.handle),delete u[h])}else for(h in u)E.event.remove(e,h+t[l],n,r,!0);E.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=E.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=E.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=E.event.handlers.call(this,s,l),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!1!==o.namespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((E.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?E(i,this).index(l)>-1:E.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(E.Event.prototype,e,{enumerable:!0,configurable:!0,get:m(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[E.expando]?e:new E.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return ve.test(t.type)&&t.click&&M(t,"input")&&Ie(t,"click",Pe),!1},trigger:function(e){var t=this||e;return ve.test(t.type)&&t.click&&M(t,"input")&&Ie(t,"click"),!0},_default:function(e){var t=e.target;return ve.test(t.type)&&t.click&&M(t,"input")&&Q.get(t,"click")||M(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},E.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},E.Event=function(e,t){if(!(this instanceof E.Event))return new E.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Pe:De,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&E.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[E.expando]=!0},E.Event.prototype={constructor:E.Event,isDefaultPrevented:De,isPropagationStopped:De,isImmediatePropagationStopped:De,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Pe,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Pe,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Pe,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},E.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&_e.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Te.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},E.event.addProp),E.each({focus:"focusin",blur:"focusout"},(function(e,t){E.event.special[e]={setup:function(){return Ie(this,e,Me),!1},trigger:function(){return Ie(this,e),!0},delegateType:t}})),E.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){E.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||E.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}})),E.fn.extend({on:function(e,t,n,r){return Oe(this,e,t,n,r)},one:function(e,t,n,r){return Oe(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,E(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=De),this.each((function(){E.event.remove(this,e,n,t)}))}});var Ne=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Ae=/<script|<style|<link/i,Le=/checked\s*(?:[^=]|=\s*.checked.)/i,je=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Be(e,t){return M(e,"table")&&M(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function Fe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function ze(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n<r;n++)E.event.add(t,i,l[i][n]);J.hasData(e)&&(s=J.access(e),u=E.extend({},s),J.set(t,u))}}function Ve(e,t){var n=t.nodeName.toLowerCase();"input"===n&&ve.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function qe(e,t,n,r){t=l.apply([],t);var i,o,a,s,u,c,f=0,d=e.length,h=d-1,p=t[0],v=m(p);if(v||d>1&&"string"==typeof p&&!y.checkClone&&Le.test(p))return e.each((function(i){var o=e.eq(i);v&&(t[0]=p.call(this,i,o.html())),qe(o,t,n,r)}));if(d&&(o=(i=ke(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=E.map(be(i,"script"),Fe)).length;f<d;f++)u=i,f!==h&&(u=E.clone(u,!0,!0),s&&E.merge(a,be(u,"script"))),n.call(e[f],u,f);if(s)for(c=a[a.length-1].ownerDocument,E.map(a,Re),f=0;f<s;f++)u=a[f],ye.test(u.type||"")&&!Q.access(u,"globalEval")&&E.contains(c,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?E._evalUrl&&!u.noModule&&E._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")}):w(u.textContent.replace(je,""),u,c))}return e}function Ge(e,t,n){for(var r,i=t?E.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||E.cleanData(be(r)),r.parentNode&&(n&&se(r)&&xe(be(r,"script")),r.parentNode.removeChild(r));return e}E.extend({htmlPrefilter:function(e){return e.replace(Ne,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=se(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||E.isXMLDoc(e)))for(a=be(s),r=0,i=(o=be(e)).length;r<i;r++)Ve(o[r],a[r]);if(t)if(n)for(o=o||be(e),a=a||be(s),r=0,i=o.length;r<i;r++)ze(o[r],a[r]);else ze(e,s);return(a=be(s,"script")).length>0&&xe(a,!u&&be(e,"script")),s},cleanData:function(e){for(var t,n,r,i=E.event.special,o=0;void 0!==(n=e[o]);o++)if($(n)){if(t=n[Q.expando]){if(t.events)for(r in t.events)i[r]?E.event.remove(n,r):E.removeEvent(n,r,t.handle);n[Q.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),E.fn.extend({detach:function(e){return Ge(this,e,!0)},remove:function(e){return Ge(this,e)},text:function(e){return H(this,(function(e){return void 0===e?E.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return qe(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Be(this,e).appendChild(e)}))},prepend:function(){return qe(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Be(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return qe(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return qe(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(E.cleanData(be(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return E.clone(this,e,t)}))},html:function(e){return H(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ae.test(e)&&!me[(ge.exec(e)||["",""])[1].toLowerCase()]){e=E.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(E.cleanData(be(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return qe(this,arguments,(function(t){var n=this.parentNode;E.inArray(this,e)<0&&(E.cleanData(be(this)),n&&n.replaceChild(t,this))}),e)}}),E.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){E.fn[e]=function(e){for(var n,r=[],i=E(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),E(i[a])[t](n),c.apply(r,n.get());return this.pushStack(r)}}));var We=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),He=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)},Ue=new RegExp(oe.join("|"),"i");function Ye(e,t,n){var r,i,o,a,s=e.style;return(n=n||He(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||se(e)||(a=E.style(e,t)),!y.pixelBoxStyles()&&We.test(a)&&Ue.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Xe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ae.appendChild(l).appendChild(c);var e=n.getComputedStyle(c);r="1%"!==e.top,u=12===t(e.marginLeft),c.style.right="60%",s=36===t(e.right),i=36===t(e.width),c.style.position="absolute",o=12===t(c.offsetWidth/3),ae.removeChild(l),c=null}}function t(e){return Math.round(parseFloat(e))}var r,i,o,s,u,l=a.createElement("div"),c=a.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===c.style.backgroundClip,E.extend(y,{boxSizingReliable:function(){return e(),i},pixelBoxStyles:function(){return e(),s},pixelPosition:function(){return e(),r},reliableMarginLeft:function(){return e(),u},scrollboxSize:function(){return e(),o}}))}();var Ke=["Webkit","Moz","ms"],$e=a.createElement("div").style,Ze={};function Qe(e){var t=E.cssProps[e]||Ze[e];return t||(e in $e?e:Ze[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Ke.length;n--;)if((e=Ke[n]+t)in $e)return e}(e)||e)}var Je=/^(none|table(?!-c[ea]).+)/,et=/^--/,tt={position:"absolute",visibility:"hidden",display:"block"},nt={letterSpacing:"0",fontWeight:"400"};function rt(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function it(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=E.css(e,n+oe[a],!0,i)),r?("content"===n&&(u-=E.css(e,"padding"+oe[a],!0,i)),"margin"!==n&&(u-=E.css(e,"border"+oe[a]+"Width",!0,i))):(u+=E.css(e,"padding"+oe[a],!0,i),"padding"!==n?u+=E.css(e,"border"+oe[a]+"Width",!0,i):s+=E.css(e,"border"+oe[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function ot(e,t,n){var r=He(e),i=(!y.boxSizingReliable()||n)&&"border-box"===E.css(e,"boxSizing",!1,r),o=i,a=Ye(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(We.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||"auto"===a||!parseFloat(a)&&"inline"===E.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===E.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+it(e,t,n||(i?"border":"content"),o,r,a)+"px"}function at(e,t,n,r,i){return new at.prototype.init(e,t,n,r,i)}E.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ye(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=K(t),u=et.test(t),l=e.style;if(u||(t=Qe(s)),a=E.cssHooks[t]||E.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=fe(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(E.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=K(t);return et.test(t)||(t=Qe(s)),(a=E.cssHooks[t]||E.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ye(e,t,r)),"normal"===i&&t in nt&&(i=nt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),E.each(["height","width"],(function(e,t){E.cssHooks[t]={get:function(e,n,r){if(n)return!Je.test(E.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ot(e,t,r):ce(e,tt,(function(){return ot(e,t,r)}))},set:function(e,n,r){var i,o=He(e),a=!y.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===E.css(e,"boxSizing",!1,o),u=r?it(e,t,r,s,o):0;return s&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-it(e,t,"border",!1,o)-.5)),u&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=E.css(e,t)),rt(0,n,u)}}})),E.cssHooks.marginLeft=Xe(y.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ye(e,"marginLeft"))||e.getBoundingClientRect().left-ce(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),E.each({margin:"",padding:"",border:"Width"},(function(e,t){E.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(E.cssHooks[e+t].set=rt)})),E.fn.extend({css:function(e,t){return H(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=He(e),i=t.length;a<i;a++)o[t[a]]=E.css(e,t[a],!1,r);return o}return void 0!==n?E.style(e,t,n):E.css(e,t)}),e,t,arguments.length>1)}}),E.Tween=at,at.prototype={constructor:at,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||E.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(E.cssNumber[n]?"":"px")},cur:function(){var e=at.propHooks[this.prop];return e&&e.get?e.get(this):at.propHooks._default.get(this)},run:function(e){var t,n=at.propHooks[this.prop];return this.options.duration?this.pos=t=E.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):at.propHooks._default.set(this),this}},at.prototype.init.prototype=at.prototype,at.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=E.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){E.fx.step[e.prop]?E.fx.step[e.prop](e):1!==e.elem.nodeType||!E.cssHooks[e.prop]&&null==e.elem.style[Qe(e.prop)]?e.elem[e.prop]=e.now:E.style(e.elem,e.prop,e.now+e.unit)}}},at.propHooks.scrollTop=at.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},E.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},E.fx=at.prototype.init,E.fx.step={};var st,ut,lt=/^(?:toggle|show|hide)$/,ct=/queueHooks$/;function ft(){ut&&(!1===a.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(ft):n.setTimeout(ft,E.fx.interval),E.fx.tick())}function dt(){return n.setTimeout((function(){st=void 0})),st=Date.now()}function ht(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function pt(e,t,n){for(var r,i=(vt.tweeners[t]||[]).concat(vt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function vt(e,t,n){var r,i,o=0,a=vt.prefilters.length,s=E.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var t=st||dt(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:E.extend({},t),opts:E.extend(!0,{specialEasing:{},easing:E.easing._default},n),originalProperties:t,originalOptions:n,startTime:st||dt(),duration:n.duration,tweens:[],createTween:function(t,n){var r=E.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=K(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=E.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);o<a;o++)if(r=vt.prefilters[o].call(l,e,c,l.opts))return m(r.stop)&&(E._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return E.map(c,pt,l),m(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),E.fx.timer(E.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}E.Animation=E.extend(vt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return fe(n.elem,e,ie.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(F);for(var n,r=0,i=e.length;r<i;r++)n=e[r],vt.tweeners[n]=vt.tweeners[n]||[],vt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,d=this,h={},p=e.style,v=e.nodeType&&le(e),g=Q.get(e,"fxshow");for(r in n.queue||(null==(a=E._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,d.always((function(){d.always((function(){a.unqueued--,E.queue(e,"fx").length||a.empty.fire()}))}))),t)if(i=t[r],lt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(v?"hide":"show")){if("show"!==i||!g||void 0===g[r])continue;v=!0}h[r]=g&&g[r]||E.style(e,r)}if((u=!E.isEmptyObject(t))||!E.isEmptyObject(h))for(r in f&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(l=g&&g.display)&&(l=Q.get(e,"display")),"none"===(c=E.css(e,"display"))&&(l?c=l:(pe([e],!0),l=e.style.display||l,c=E.css(e,"display"),pe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===E.css(e,"float")&&(u||(d.done((function(){p.display=l})),null==l&&(c=p.display,l="none"===c?"":c)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",d.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),u=!1,h)u||(g?"hidden"in g&&(v=g.hidden):g=Q.access(e,"fxshow",{display:l}),o&&(g.hidden=!v),v&&pe([e],!0),d.done((function(){for(r in v||pe([e]),Q.remove(e,"fxshow"),h)E.style(e,r,h[r])}))),u=pt(v?g[r]:0,r,d),r in g||(g[r]=u.start,v&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?vt.prefilters.unshift(e):vt.prefilters.push(e)}}),E.speed=function(e,t,n){var r=e&&"object"==typeof e?E.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return E.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in E.fx.speeds?r.duration=E.fx.speeds[r.duration]:r.duration=E.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&E.dequeue(this,r.queue)},r},E.fn.extend({fadeTo:function(e,t,n,r){return this.filter(le).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=E.isEmptyObject(e),o=E.speed(t,n,r),a=function(){var t=vt(this,E.extend({},e),o);(i||Q.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=E.timers,a=Q.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&ct.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||E.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=Q.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=E.timers,a=r?r.length:0;for(n.finish=!0,E.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),E.each(["toggle","show","hide"],(function(e,t){var n=E.fn[t];E.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ht(t,!0),e,r,i)}})),E.each({slideDown:ht("show"),slideUp:ht("hide"),slideToggle:ht("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){E.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),E.timers=[],E.fx.tick=function(){var e,t=0,n=E.timers;for(st=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||E.fx.stop(),st=void 0},E.fx.timer=function(e){E.timers.push(e),E.fx.start()},E.fx.interval=13,E.fx.start=function(){ut||(ut=!0,ft())},E.fx.stop=function(){ut=null},E.fx.speeds={slow:600,fast:200,_default:400},E.fn.delay=function(e,t){return e=E.fx&&E.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,r){var i=n.setTimeout(t,e);r.stop=function(){n.clearTimeout(i)}}))},function(){var e=a.createElement("input"),t=a.createElement("select").appendChild(a.createElement("option"));e.type="checkbox",y.checkOn=""!==e.value,y.optSelected=t.selected,(e=a.createElement("input")).value="t",e.type="radio",y.radioValue="t"===e.value}();var gt,yt=E.expr.attrHandle;E.fn.extend({attr:function(e,t){return H(this,E.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){E.removeAttr(this,e)}))}}),E.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?E.prop(e,t,n):(1===o&&E.isXMLDoc(e)||(i=E.attrHooks[t.toLowerCase()]||(E.expr.match.bool.test(t)?gt:void 0)),void 0!==n?null===n?void E.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=E.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&M(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(F);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),gt={set:function(e,t,n){return!1===t?E.removeAttr(e,n):e.setAttribute(n,n),n}},E.each(E.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=yt[t]||E.find.attr;yt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=yt[a],yt[a]=i,i=null!=n(e,t,r)?a:null,yt[a]=o),i}}));var mt=/^(?:input|select|textarea|button)$/i,bt=/^(?:a|area)$/i;function xt(e){return(e.match(F)||[]).join(" ")}function wt(e){return e.getAttribute&&e.getAttribute("class")||""}function St(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(F)||[]}E.fn.extend({prop:function(e,t){return H(this,E.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[E.propFix[e]||e]}))}}),E.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&E.isXMLDoc(e)||(t=E.propFix[t]||t,i=E.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=E.find.attr(e,"tabindex");return t?parseInt(t,10):mt.test(e.nodeName)||bt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),y.optSelected||(E.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){E.propFix[this.toLowerCase()]=this})),E.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(m(e))return this.each((function(t){E(this).addClass(e.call(this,t,wt(this)))}));if((t=St(e)).length)for(;n=this[u++];)if(i=wt(n),r=1===n.nodeType&&" "+xt(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=xt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(m(e))return this.each((function(t){E(this).removeClass(e.call(this,t,wt(this)))}));if(!arguments.length)return this.attr("class","");if((t=St(e)).length)for(;n=this[u++];)if(i=wt(n),r=1===n.nodeType&&" "+xt(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=xt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):m(e)?this.each((function(n){E(this).toggleClass(e.call(this,n,wt(this),t),t)})):this.each((function(){var t,i,o,a;if(r)for(i=0,o=E(this),a=St(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=wt(this))&&Q.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Q.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+xt(wt(n))+" ").indexOf(t)>-1)return!0;return!1}});var Et=/\r/g;E.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=m(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,E(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=E.map(i,(function(e){return null==e?"":e+""}))),(t=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=E.valHooks[i.type]||E.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Et,""):null==n?"":n:void 0}}),E.extend({valHooks:{option:{get:function(e){var t=E.find.attr(e,"value");return null!=t?t:xt(E.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!M(n.parentNode,"optgroup"))){if(t=E(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=E.makeArray(t),a=i.length;a--;)((r=i[a]).selected=E.inArray(E.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),E.each(["radio","checkbox"],(function(){E.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=E.inArray(E(e).val(),t)>-1}},y.checkOn||(E.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),y.focusin="onfocusin"in n;var kt=/^(?:focusinfocus|focusoutblur)$/,_t=function(e){e.stopPropagation()};E.extend(E.event,{trigger:function(e,t,r,i){var o,s,u,l,c,f,d,h,v=[r||a],g=p.call(e,"type")?e.type:e,y=p.call(e,"namespace")?e.namespace.split("."):[];if(s=h=u=r=r||a,3!==r.nodeType&&8!==r.nodeType&&!kt.test(g+E.event.triggered)&&(g.indexOf(".")>-1&&(y=g.split("."),g=y.shift(),y.sort()),c=g.indexOf(":")<0&&"on"+g,(e=e[E.expando]?e:new E.Event(g,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=y.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:E.makeArray(t,[e]),d=E.event.special[g]||{},i||!d.trigger||!1!==d.trigger.apply(r,t))){if(!i&&!d.noBubble&&!b(r)){for(l=d.delegateType||g,kt.test(l+g)||(s=s.parentNode);s;s=s.parentNode)v.push(s),u=s;u===(r.ownerDocument||a)&&v.push(u.defaultView||u.parentWindow||n)}for(o=0;(s=v[o++])&&!e.isPropagationStopped();)h=s,e.type=o>1?l:d.bindType||g,(f=(Q.get(s,"events")||{})[e.type]&&Q.get(s,"handle"))&&f.apply(s,t),(f=c&&s[c])&&f.apply&&$(s)&&(e.result=f.apply(s,t),!1===e.result&&e.preventDefault());return e.type=g,i||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),t)||!$(r)||c&&m(r[g])&&!b(r)&&((u=r[c])&&(r[c]=null),E.event.triggered=g,e.isPropagationStopped()&&h.addEventListener(g,_t),r[g](),e.isPropagationStopped()&&h.removeEventListener(g,_t),E.event.triggered=void 0,u&&(r[c]=u)),e.result}},simulate:function(e,t,n){var r=E.extend(new E.Event,n,{type:e,isSimulated:!0});E.event.trigger(r,null,t)}}),E.fn.extend({trigger:function(e,t){return this.each((function(){E.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return E.event.trigger(e,t,n,!0)}}),y.focusin||E.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){E.event.simulate(t,e.target,E.event.fix(e))};E.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Q.access(r,t);i||r.addEventListener(e,n,!0),Q.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Q.access(r,t)-1;i?Q.access(r,t,i):(r.removeEventListener(e,n,!0),Q.remove(r,t))}}}));var Tt=n.location,Ct=Date.now(),Pt=/\?/;E.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||E.error("Invalid XML: "+e),t};var Dt=/\[\]$/,Mt=/\r?\n/g,Ot=/^(?:submit|button|image|reset|file)$/i,It=/^(?:input|select|textarea|keygen)/i;function Nt(e,t,n,r){var i;if(Array.isArray(t))E.each(t,(function(t,i){n||Dt.test(e)?r(e,i):Nt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==S(t))r(e,t);else for(i in t)Nt(e+"["+i+"]",t[i],n,r)}E.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!E.isPlainObject(e))E.each(e,(function(){i(this.name,this.value)}));else for(n in e)Nt(n,e[n],t,i);return r.join("&")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=E.prop(this,"elements");return e?E.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!E(this).is(":disabled")&&It.test(this.nodeName)&&!Ot.test(e)&&(this.checked||!ve.test(e))})).map((function(e,t){var n=E(this).val();return null==n?null:Array.isArray(n)?E.map(n,(function(e){return{name:t.name,value:e.replace(Mt,"\r\n")}})):{name:t.name,value:n.replace(Mt,"\r\n")}})).get()}});var At=/%20/g,Lt=/#.*$/,jt=/([?&])_=[^&]*/,Bt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ft=/^(?:GET|HEAD)$/,Rt=/^\/\//,zt={},Vt={},qt="*/".concat("*"),Gt=a.createElement("a");function Wt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(F)||[];if(m(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Ht(e,t,n,r){var i={},o=e===Vt;function a(s){var u;return i[s]=!0,E.each(e[s]||[],(function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)})),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Ut(e,t){var n,r,i=E.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&E.extend(!0,e,r),e}Gt.href=Tt.href,E.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":qt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":E.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ut(Ut(e,E.ajaxSettings),t):Ut(E.ajaxSettings,e)},ajaxPrefilter:Wt(zt),ajaxTransport:Wt(Vt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,s,u,l,c,f,d,h,p=E.ajaxSetup({},t),v=p.context||p,g=p.context&&(v.nodeType||v.jquery)?E(v):E.event,y=E.Deferred(),m=E.Callbacks("once memory"),b=p.statusCode||{},x={},w={},S="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=Bt.exec(o);)s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,x[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)k.always(e[k.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||S;return r&&r.abort(t),_(0,t),this}};if(y.promise(k),p.url=((e||p.url||Tt.href)+"").replace(Rt,Tt.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(F)||[""],null==p.crossDomain){l=a.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Gt.protocol+"//"+Gt.host!=l.protocol+"//"+l.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=E.param(p.data,p.traditional)),Ht(zt,p,t,k),c)return k;for(d in(f=E.event&&p.global)&&0==E.active++&&E.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Ft.test(p.type),i=p.url.replace(Lt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(At,"+")):(h=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(Pt.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(jt,"$1"),h=(Pt.test(i)?"&":"?")+"_="+Ct+++h),p.url=i+h),p.ifModified&&(E.lastModified[i]&&k.setRequestHeader("If-Modified-Since",E.lastModified[i]),E.etag[i]&&k.setRequestHeader("If-None-Match",E.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&k.setRequestHeader("Content-Type",p.contentType),k.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+qt+"; q=0.01":""):p.accepts["*"]),p.headers)k.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(!1===p.beforeSend.call(v,k,p)||c))return k.abort();if(S="abort",m.add(p.complete),k.done(p.success),k.fail(p.error),r=Ht(Vt,p,t,k)){if(k.readyState=1,f&&g.trigger("ajaxSend",[k,p]),c)return k;p.async&&p.timeout>0&&(u=n.setTimeout((function(){k.abort("timeout")}),p.timeout));try{c=!1,r.send(x,_)}catch(e){if(c)throw e;_(-1,e)}}else _(-1,"No Transport");function _(e,t,a,s){var l,d,h,x,w,S=t;c||(c=!0,u&&n.clearTimeout(u),r=void 0,o=s||"",k.readyState=e>0?4:0,l=e>=200&&e<300||304===e,a&&(x=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(p,k,a)),x=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(p,x,k,l),l?(p.ifModified&&((w=k.getResponseHeader("Last-Modified"))&&(E.lastModified[i]=w),(w=k.getResponseHeader("etag"))&&(E.etag[i]=w)),204===e||"HEAD"===p.type?S="nocontent":304===e?S="notmodified":(S=x.state,d=x.data,l=!(h=x.error))):(h=S,!e&&S||(S="error",e<0&&(e=0))),k.status=e,k.statusText=(t||S)+"",l?y.resolveWith(v,[d,S,k]):y.rejectWith(v,[k,S,h]),k.statusCode(b),b=void 0,f&&g.trigger(l?"ajaxSuccess":"ajaxError",[k,p,l?d:h]),m.fireWith(v,[k,S]),f&&(g.trigger("ajaxComplete",[k,p]),--E.active||E.event.trigger("ajaxStop")))}return k},getJSON:function(e,t,n){return E.get(e,t,n,"json")},getScript:function(e,t){return E.get(e,void 0,t,"script")}}),E.each(["get","post"],(function(e,t){E[t]=function(e,n,r,i){return m(n)&&(i=i||r,r=n,n=void 0),E.ajax(E.extend({url:e,type:t,dataType:i,data:n,success:r},E.isPlainObject(e)&&e))}})),E._evalUrl=function(e,t){return E.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){E.globalEval(e,t)}})},E.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=E(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return m(e)?this.each((function(t){E(this).wrapInner(e.call(this,t))})):this.each((function(){var t=E(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=m(e);return this.each((function(n){E(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){E(this).replaceWith(this.childNodes)})),this}}),E.expr.pseudos.hidden=function(e){return!E.expr.pseudos.visible(e)},E.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},E.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Xt=E.ajaxSettings.xhr();y.cors=!!Xt&&"withCredentials"in Xt,y.ajax=Xt=!!Xt,E.ajaxTransport((function(e){var t,r;if(y.cors||Xt&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Yt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),r=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout((function(){t&&r()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),E.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),E.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return E.globalEval(e),e}}}),E.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),E.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=E("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),a.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Kt,$t=[],Zt=/(=)\?(?=&|$)|\?\?/;E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=$t.pop()||E.expando+"_"+Ct++;return this[e]=!0,e}}),E.ajaxPrefilter("json jsonp",(function(e,t,r){var i,o,a,s=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Zt,"$1"+i):!1!==e.jsonp&&(e.url+=(Pt.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return a||E.error(i+" was not called"),a[0]},e.dataTypes[0]="json",o=n[i],n[i]=function(){a=arguments},r.always((function(){void 0===o?E(n).removeProp(i):n[i]=o,e[i]&&(e.jsonpCallback=t.jsonpCallback,$t.push(i)),a&&m(o)&&o(a[0]),a=o=void 0})),"script"})),y.createHTMLDocument=((Kt=a.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Kt.childNodes.length),E.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=a.implementation.createHTMLDocument("")).createElement("base")).href=a.location.href,t.head.appendChild(r)):t=a),o=!n&&[],(i=O.exec(e))?[t.createElement(i[1])]:(i=ke([e],t,o),o&&o.length&&E(o).remove(),E.merge([],i.childNodes)));var r,i,o},E.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=xt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&E.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){o=arguments,a.html(r?E("<div>").append(E.parseHTML(e)).find(r):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},E.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){E.fn[t]=function(e){return this.on(t,e)}})),E.expr.pseudos.animated=function(e){return E.grep(E.timers,(function(t){return e===t.elem})).length},E.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=E.css(e,"position"),c=E(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=E.css(e,"top"),u=E.css(e,"left"),("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,E.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},E.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){E.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===E.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===E.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=E(e).offset()).top+=E.css(e,"borderTopWidth",!0),i.left+=E.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-E.css(r,"marginTop",!0),left:t.left-i.left-E.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===E.css(e,"position");)e=e.offsetParent;return e||ae}))}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;E.fn[e]=function(r){return H(this,(function(e,r,i){var o;if(b(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),E.each(["top","left"],(function(e,t){E.cssHooks[t]=Xe(y.pixelPosition,(function(e,n){if(n)return n=Ye(e,t),We.test(n)?E(e).position()[t]+"px":n}))})),E.each({Height:"height",Width:"width"},(function(e,t){E.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){E.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return H(this,(function(t,n,i){var o;return b(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?E.css(t,n,s):E.style(t,n,i,s)}),t,a?i:void 0,a)}}))})),E.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){E.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}})),E.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),E.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),E.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=u.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(u.call(arguments)))}).guid=e.guid=e.guid||E.guid++,i},E.holdReady=function(e){e?E.readyWait++:E.ready(!0)},E.isArray=Array.isArray,E.parseJSON=JSON.parse,E.nodeName=M,E.isFunction=m,E.isWindow=b,E.camelCase=K,E.type=S,E.now=Date.now,E.isNumeric=function(e){var t=E.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},void 0===(r=function(){return E}.apply(t,[]))||(e.exports=r);var Qt=n.jQuery,Jt=n.$;return E.noConflict=function(e){return n.$===E&&(n.$=Jt),e&&n.jQuery===E&&(n.jQuery=Qt),E},i||(n.jQuery=n.$=E),E}))},function(e,t,n){var r=n(63),i=n(429),o=n(430),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(447),i=n(450);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(35),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},function(e,t){e.exports={}},function(e,t,n){var r=n(8).f,i=n(18),o=n(5)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(1),i=n(8),o=n(7),a=n(5)("species");e.exports=function(e){var t=r[e];o&&t&&!t[a]&&i.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(14);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(0),i=n(34),o=n(4),a=n(129),s="["+a+"]",u=RegExp("^"+s+s+"*"),l=RegExp(s+s+"*$"),c=function(e,t,n){var i={},s=o((function(){return!!a[e]()||"​"!="​"[e]()})),u=i[e]=s?t(f):a[e];n&&(i[n]=u),r(r.P+r.F*s,"String",i)},f=c.trim=function(e,t){return e=String(i(e)),1&t&&(e=e.replace(u,"")),2&t&&(e=e.replace(l,"")),e};e.exports=c},function(e,t,n){var r=n(23).Symbol;e.exports=r},function(e,t){e.exports=function(e){return null==e}},function(e,t,n){var r=n(73),i=n(104);e.exports=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var l=t[s],c=o?o(n[l],e[l],l,n,e):void 0;void 0===c&&(c=e[l]),a?i(n,l,c):r(n,l,c)}return n}},function(e,t,n){(function(e){var r=n(23),i=n(466),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;e.exports=u}).call(this,n(142)(e))},function(e,t,n){var r=n(204),i=n(470),o=n(32);e.exports=function(e){return o(e)?r(e,!0):i(e)}},function(e,t,n){var r=n(475),i=n(139),o=n(476),a=n(213),s=n(477),u=n(53),l=n(202),c=l(r),f=l(i),d=l(o),h=l(a),p=l(s),v=u;(r&&"[object DataView]"!=v(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=v(new i)||o&&"[object Promise]"!=v(o.resolve())||a&&"[object Set]"!=v(new a)||s&&"[object WeakMap]"!=v(new s))&&(v=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case c:return"[object DataView]";case f:return"[object Map]";case d:return"[object Promise]";case h:return"[object Set]";case p:return"[object WeakMap]"}return t}),e.exports=v},function(e,t,n){var r=n(47),i=n(5)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(3),i=n(19),o=n(5)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},function(e,t,n){var r=n(53),i=n(16);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){var r=n(104),i=n(54),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&i(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(465),i=n(31),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},function(e,t,n){var r=n(467),i=n(106),o=n(144),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(42);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){var r=n(152),i=n(507)(r);e.exports=i},function(e,t,n){var r=n(54),i=n(32),o=n(105),a=n(16);e.exports=function(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?i(n)&&o(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},function(e,t,n){var r=n(43),i=n(230),o=n(231);e.exports=function(e,t){return o(i(e,t,r),e+"")}},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogStates=void 0,e.LogStates={asyncStart:"asyncStart",asyncStop:"asyncStop",createContext:"createContext",define:"define",dependsOn:"dependsOn",dependsOnRemove:"dependsOnRemove",enter:"enter",exit:"exit",freeze:"freeze",invalidateEnd:"invalidateEnd",invalidateStart:"invalidateStart",invalidateLater:"invalidateLater",isolateEnter:"isolateEnter",isolateExit:"isolateExit",isolateInvalidateEnd:"isolateInvalidateEnd",isolateInvalidateStart:"isolateInvalidateStart",userMark:"userMark",idle:"idle",thaw:"thaw",updateNodeLabel:"updateNodeLabel",valueChange:"valueChange"}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r=n(242),i=n(54);e.exports=function(e,t){var n=null==e?0:e.length;if(n){var o=r(e,t);if(o<n&&i(e[o],t))return o}return-1}},function(e,t,n){var r=n(39),i=n(1),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(40)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(47);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(47);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(5)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},e(o)}catch(e){}return n}},function(e,t,n){var r=n(22),i=n(9),o=n(56);e.exports=function(e){return function(t,n,a){var s,u=r(t),l=i(u.length),c=o(a,l);if(e&&n!=n){for(;l>c;)if((s=u[c++])!=s)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){var r=n(27),i=n(171),o=n(118),a=n(3),s=n(9),u=n(120),l={},c={};(t=e.exports=function(e,t,n,f,d){var h,p,v,g,y=d?function(){return e}:u(e),m=r(n,f,t?2:1),b=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(o(y)){for(h=s(e.length);h>b;b++)if((g=t?m(a(p=e[b])[0],p[1]):m(e[b]))===l||g===c)return g}else for(v=y.call(e);!(p=v.next()).done;)if((g=i(v,m,p.value,t))===l||g===c)return g}).BREAK=l,t.RETURN=c},function(e,t,n){"use strict";var r=n(1),i=n(0),o=n(14),a=n(60),s=n(41),u=n(88),l=n(61),c=n(2),f=n(4),d=n(86),h=n(58),p=n(125);e.exports=function(e,t,n,v,g,y){var m=r[e],b=m,x=g?"set":"add",w=b&&b.prototype,S={},E=function(e){var t=w[e];o(w,e,"delete"==e||"has"==e?function(e){return!(y&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return y&&!c(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof b&&(y||w.forEach&&!f((function(){(new b).entries().next()})))){var k=new b,_=k[x](y?{}:-0,1)!=k,T=f((function(){k.has(1)})),C=d((function(e){new b(e)})),P=!y&&f((function(){for(var e=new b,t=5;t--;)e[x](t,t);return!e.has(-0)}));C||((b=t((function(t,n){l(t,b,e);var r=p(new m,t,b);return null!=n&&u(n,g,r[x],r),r}))).prototype=w,w.constructor=b),(T||P)&&(E("delete"),E("has"),g&&E("get")),(P||_)&&E(x),y&&w.clear&&delete w.clear}else b=v.getConstructor(t,e,g,x),a(b.prototype,n),s.NEED=!0;return h(b,e),S[e]=b,i(i.G+i.W+i.F*(b!=m),S),y||v.setStrong(b,e,g),b}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";e.exports=n(40)||!n(4)((function(){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete n(1)[e]}))},function(e,t,n){var r=n(1).navigator;e.exports=r&&r.userAgent||""},function(e,t,n){"use strict";var r=n(3);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var r=n(69),i=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){"use strict";n(377);var r=n(14),i=n(17),o=n(4),a=n(34),s=n(5),u=n(134),l=s("species"),c=!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),f=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var d=s(e),h=!o((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),p=h?!o((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[l]=function(){return n}),n[d](""),!t})):void 0;if(!h||!p||"replace"===e&&!c||"split"===e&&!f){var v=/./[d],g=n(a,d,""[e],(function(e,t,n,r,i){return t.exec===u?h&&!i?{done:!0,value:v.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),y=g[0],m=g[1];r(String.prototype,e,y),i(RegExp.prototype,d,2==t?function(e,t){return m.call(e,this,t)}:function(e){return m.call(e,this)})}}},function(e,t,n){for(var r,i=n(1),o=n(17),a=n(45),s=a("typed_array"),u=a("view"),l=!(!i.ArrayBuffer||!i.DataView),c=l,f=0,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");f<9;)(r=i[d[f++]])?(o(r.prototype,s,!0),o(r.prototype,u,!0)):c=!1;e.exports={ABV:l,CONSTR:c,TYPED:s,VIEW:u}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";(function(t){function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=r(n(434)),o=r(n(435));function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var d="undefined"==typeof window?null:window,h=d?d.navigator:null,p=(d&&d.document,a("")),v=a({}),g=a((function(){})),y="undefined"==typeof HTMLElement?"undefined":a(HTMLElement),m=function(e){return e&&e.instanceString&&x(e.instanceString)?e.instanceString():null},b=function(e){return null!=e&&a(e)==p},x=function(e){return null!=e&&a(e)===g},w=function(e){return Array.isArray?Array.isArray(e):null!=e&&e instanceof Array},S=function(e){return null!=e&&a(e)===v&&!w(e)&&e.constructor===Object},E=function(e){return null!=e&&a(e)===a(1)&&!isNaN(e)},k=function(e){return"undefined"===y?void 0:null!=e&&e instanceof HTMLElement},_=function(e){return T(e)||C(e)},T=function(e){return"collection"===m(e)&&e._private.single},C=function(e){return"collection"===m(e)&&!e._private.single},P=function(e){return"core"===m(e)},D=function(e){return"stylesheet"===m(e)},M=function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},O=function(e){return function(e){return null!=e&&a(e)===v}(e)&&x(e.then)},I=function(e,t){t||(t=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);return e.join("$")});var n=function n(){var r,i=this,o=arguments,a=t.apply(i,o),s=n.cache;return(r=s[a])||(r=s[a]=e.apply(i,o)),r};return n.cache={},n},N=I((function(e){return e.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))})),A=I((function(e){return e.replace(/(-\w)/g,(function(e){return e[1].toUpperCase()}))})),L=I((function(e,t){return e+t[0].toUpperCase()+t.substring(1)}),(function(e,t){return e+"$"+t})),j=function(e){return M(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},B="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",F=function(e,t){return e<t?-1:e>t?1:0},R=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n<t.length;n++){var r=t[n];if(null!=r)for(var i=Object.keys(r),o=0;o<i.length;o++){var a=i[o];e[a]=r[a]}}return e},z=function(e){return(w(e)?e:null)||function(e){return V[e.toLowerCase()]}(e)||function(e){if((4===e.length||7===e.length)&&"#"===e[0]){var t,n,r;return 4===e.length?(t=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),r=parseInt(e[3]+e[3],16)):(t=parseInt(e[1]+e[2],16),n=parseInt(e[3]+e[4],16),r=parseInt(e[5]+e[6],16)),[t,n,r]}}(e)||function(e){var t,n=new RegExp("^rgb[a]?\\(((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)(?:\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)$").exec(e);if(n){t=[];for(var r=[],i=1;i<=3;i++){var o=n[i];if("%"===o[o.length-1]&&(r[i]=!0),o=parseFloat(o),r[i]&&(o=o/100*255),o<0||o>255)return;t.push(Math.floor(o))}var a=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(a&&!s)return;var u=n[4];if(void 0!==u){if((u=parseFloat(u))<0||u>1)return;t.push(u)}}return t}(e)||function(e){var t,n,r,i,o,a,s,u;function l(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var c=new RegExp("^hsl[a]?\\(((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?)))\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])(?:\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)$").exec(e);if(c){if((n=parseInt(c[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(c[2]))<0||r>100)return;if(r/=100,(i=parseFloat(c[3]))<0||i>100)return;if(i/=100,void 0!==(o=c[4])&&((o=parseFloat(o))<0||o>1))return;if(0===r)a=s=u=Math.round(255*i);else{var f=i<.5?i*(1+r):i+r-i*r,d=2*i-f;a=Math.round(255*l(d,f,n+1/3)),s=Math.round(255*l(d,f,n)),u=Math.round(255*l(d,f,n-1/3))}t=[a,s,u,o]}return t}(e)},V={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},q=function(e){for(var t=e.map,n=e.keys,r=n.length,i=0;i<r;i++){var o=n[i];if(S(o))throw Error("Tried to set map with object key");i<n.length-1?(null==t[o]&&(t[o]={}),t=t[o]):t[o]=e.value}},G=function(e){for(var t=e.map,n=e.keys,r=n.length,i=0;i<r;i++){var o=n[i];if(S(o))throw Error("Tried to get map with object key");if(null==(t=t[o]))return t}return t},W=d?d.performance:null,H=W&&W.now?function(){return W.now()}:function(){return Date.now()},U=function(){if(d){if(d.requestAnimationFrame)return function(e){d.requestAnimationFrame(e)};if(d.mozRequestAnimationFrame)return function(e){d.mozRequestAnimationFrame(e)};if(d.webkitRequestAnimationFrame)return function(e){d.webkitRequestAnimationFrame(e)};if(d.msRequestAnimationFrame)return function(e){d.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout((function(){e(H())}),1e3/60)}}(),Y=function(e){return U(e)},X=H,K=function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5381,r=n;!(t=e.next()).done;)r=(r<<5)+r+t.value|0;return r},$=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5381;return(t<<5)+t+e|0},Z=function(e,t){var n={value:0,done:!1},r=0,i=e.length;return K({next:function(){return r<i?n.value=e[r++]:n.done=!0,n}},t)},Q=function(e,t){var n={value:0,done:!1},r=0,i=e.length;return K({next:function(){return r<i?n.value=e.charCodeAt(r++):n.done=!0,n}},t)},J=function(){return ee(arguments)},ee=function(e){for(var t,n=0;n<e.length;n++){var r=e[n];t=0===n?Q(r):Q(r,t)}return t},te=!0,ne=null!=console.warn,re=null!=console.trace,ie=Number.MAX_SAFE_INTEGER||9007199254740991,oe=function(){return!0},ae=function(){return!1},se=function(){return 0},ue=function(){},le=function(e){throw new Error(e)},ce=function(e){if(void 0===e)return te;te=!!e},fe=function(e){ce()&&(ne?console.warn(e):(console.log(e),re&&console.trace()))},de=function(e){return null==e?e:w(e)?e.slice():S(e)?function(e){return R({},e)}(e):e},he=function(e,t){for(t=e="";e++<36;t+=51*e&52?(15^e?8^Math.random()*(20^e?16:4):4).toString(16):"-");return t},pe={},ve=function(){return pe},ge=function(e){var t=Object.keys(e);return function(n){for(var r={},i=0;i<t.length;i++){var o=t[i],a=null==n?void 0:n[o];r[o]=void 0===a?e[o]:a}return r}},ye=function(e,t,n){for(var r=e.length;r>=0&&(e[r]!==t||(e.splice(r,1),n));r--);},me=function(e){e.splice(0,e.length)},be=function(e,t,n){return n&&(t=L(n,t)),e[t]},xe=function(e,t,n,r){n&&(t=L(n,t)),e[t]=r},we="undefined"!=typeof Map?Map:function(){function e(){s(this,e),this._obj={}}return l(e,[{key:"set",value:function(e,t){return this._obj[e]=t,this}},{key:"delete",value:function(e){return this._obj[e]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(e){return void 0!==this._obj[e]}},{key:"get",value:function(e){return this._obj[e]}}]),e}(),Se=function(){function e(t){if(s(this,e),this._obj=Object.create(null),this.size=0,null!=t){var n;n=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t;for(var r=0;r<n.length;r++)this.add(n[r])}}return l(e,[{key:"instanceString",value:function(){return"set"}},{key:"add",value:function(e){var t=this._obj;1!==t[e]&&(t[e]=1,this.size++)}},{key:"delete",value:function(e){var t=this._obj;1===t[e]&&(t[e]=0,this.size--)}},{key:"clear",value:function(){this._obj=Object.create(null)}},{key:"has",value:function(e){return 1===this._obj[e]}},{key:"toArray",value:function(){var e=this;return Object.keys(this._obj).filter((function(t){return e.has(t)}))}},{key:"forEach",value:function(e,t){return this.toArray().forEach(e,t)}}]),e}(),Ee="undefined"!==("undefined"==typeof Set?"undefined":a(Set))?Set:Se,ke=function(e,t,n){if(n=!(void 0!==n&&!n),void 0!==e&&void 0!==t&&P(e)){var r=t.group;if(null==r&&(r=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===r:!!t.pannable,active:!1,classes:new Ee,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==i.position.x&&(i.position.x=0),null==i.position.y&&(i.position.y=0),t.renderedPosition){var o=t.renderedPosition,a=e.pan(),s=e.zoom();i.position={x:(o.x-a.x)/s,y:(o.y-a.y)/s}}var u=[];w(t.classes)?u=t.classes:b(t.classes)&&(u=t.classes.split(/\s+/));for(var l=0,c=u.length;l<c;l++){var f=u[l];f&&""!==f&&i.classes.add(f)}this.createEmitter();var d=t.style||t.css;d&&(fe("Setting a `style` bypass at element creation is deprecated"),this.style(d)),(void 0===n||n)&&this.restore()}else le("An element must be of type `nodes` or `edges`; you specified `"+r+"`")}else le("An element must have a core reference and parameters set")},_e=function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},function(t,n,r){var i;S(t)&&!_(t)&&(t=(i=t).roots||i.root,n=i.visit,r=i.directed),r=2!==arguments.length||x(n)?r:n,n=x(n)?n:function(){};for(var o,a=this._private.cy,s=t=b(t)?this.filter(t):t,u=[],l=[],c={},f={},d={},h=0,p=this.byGroup(),v=p.nodes,g=p.edges,y=0;y<s.length;y++){var m=s[y],w=m.id();m.isNode()&&(u.unshift(m),e.bfs&&(d[w]=!0,l.push(m)),f[w]=0)}var E=function(){var t=e.bfs?u.shift():u.pop(),i=t.id();if(e.dfs){if(d[i])return"continue";d[i]=!0,l.push(t)}var a,s=f[i],p=c[i],y=null!=p?p.source():null,m=null!=p?p.target():null,b=null==p?void 0:t.same(y)?m[0]:y[0];if(!0===(a=n(t,p,b,h++,s)))return o=t,"break";if(!1===a)return"break";for(var x=t.connectedEdges().filter((function(e){return(!r||e.source().same(t))&&g.has(e)})),w=0;w<x.length;w++){var S=x[w],E=S.connectedNodes().filter((function(e){return!e.same(t)&&v.has(e)})),k=E.id();0===E.length||d[k]||(E=E[0],u.push(E),e.bfs&&(d[k]=!0,l.push(E)),c[k]=S,f[k]=f[i]+1)}};e:for(;0!==u.length;){var k=E();switch(k){case"continue":continue;case"break":break e}}for(var T=a.collection(),C=0;C<l.length;C++){var P=l[C],D=c[P.id()];null!=D&&T.merge(D),T.merge(P)}return{path:a.collection(T),found:a.collection(o)}}},Te={breadthFirstSearch:_e({bfs:!0}),depthFirstSearch:_e({dfs:!0})};Te.bfs=Te.breadthFirstSearch,Te.dfs=Te.depthFirstSearch;var Ce=ge({root:null,weight:function(e){return 1},directed:!1}),Pe={dijkstra:function(e){if(!S(e)){var t=arguments;e={root:t[0],weight:t[1],directed:t[2]}}var n=Ce(e),r=n.root,i=n.weight,a=n.directed,s=this,u=i,l=b(r)?this.filter(r)[0]:r[0],c={},f={},d={},h=this.byGroup(),p=h.nodes,v=h.edges;v.unmergeBy((function(e){return e.isLoop()}));for(var g=function(e){return c[e.id()]},y=function(e,t){c[e.id()]=t,m.updateItem(e)},m=new o((function(e,t){return g(e)-g(t)})),x=0;x<p.length;x++){var w=p[x];c[w.id()]=w.same(l)?0:1/0,m.push(w)}for(var E=function(e,t){for(var n,r=(a?e.edgesTo(t):e.edgesWith(t)).intersect(v),i=1/0,o=0;o<r.length;o++){var s=r[o],l=u(s);(l<i||!n)&&(i=l,n=s)}return{edge:n,dist:i}};m.size()>0;){var k=m.pop(),_=g(k),T=k.id();if(d[T]=_,_!==1/0)for(var C=k.neighborhood().intersect(p),P=0;P<C.length;P++){var D=C[P],M=D.id(),O=E(k,D),I=_+O.dist;I<g(D)&&(y(D,I),f[M]={node:k,edge:O.edge})}}return{distanceTo:function(e){var t=b(e)?p.filter(e)[0]:e[0];return d[t.id()]},pathTo:function(e){var t=b(e)?p.filter(e)[0]:e[0],n=[],r=t,i=r.id();if(t.length>0)for(n.unshift(t);f[i];){var o=f[i];n.unshift(o.edge),n.unshift(o.node),i=(r=o.node).id()}return s.spawn(n)}}}},De={kruskal:function(e){e=e||function(e){return 1};for(var t=this.byGroup(),n=t.nodes,r=t.edges,i=n.length,o=new Array(i),a=n,s=function(e){for(var t=0;t<o.length;t++){if(o[t].has(e))return t}},u=0;u<i;u++)o[u]=this.spawn(n[u]);for(var l=r.sort((function(t,n){return e(t)-e(n)})),c=0;c<l.length;c++){var f=l[c],d=f.source()[0],h=f.target()[0],p=s(d),v=s(h),g=o[p],y=o[v];p!==v&&(a.merge(f),g.merge(y),o.splice(v,1))}return a}},Me=ge({root:null,goal:null,weight:function(e){return 1},heuristic:function(e){return 0},directed:!1}),Oe={aStar:function(e){var t=this.cy(),n=Me(e),r=n.root,i=n.goal,a=n.heuristic,s=n.directed,u=n.weight;r=t.collection(r)[0],i=t.collection(i)[0];var l,c,f=r.id(),d=i.id(),h={},p={},v={},g=new o((function(e,t){return p[e.id()]-p[t.id()]})),y=new Ee,m={},b={},x=function(e,t){g.push(e),y.add(t)};x(r,f),h[f]=0,p[f]=a(r);for(var w,S=0;g.size()>0;){if(l=g.pop(),c=l.id(),y.delete(c),S++,c===d){for(var E=[],k=i,_=d,T=b[_];E.unshift(k),null!=T&&E.unshift(T),null!=(k=m[_]);)T=b[_=k.id()];return{found:!0,distance:h[c],path:this.spawn(E),steps:S}}v[c]=!0;for(var C=l._private.edges,P=0;P<C.length;P++){var D=C[P];if(this.hasElementWithId(D.id())&&(!s||D.data("source")===c)){var M=D.source(),O=D.target(),I=M.id()!==c?M:O,N=I.id();if(this.hasElementWithId(N)&&!v[N]){var A=h[c]+u(D);w=N,y.has(w)?A<h[N]&&(h[N]=A,p[N]=A+a(I),m[N]=l):(h[N]=A,p[N]=A+a(I),x(I,N),m[N]=l,b[N]=D)}}}}return{found:!1,distance:void 0,path:void 0,steps:S}}},Ie=ge({weight:function(e){return 1},directed:!1}),Ne={floydWarshall:function(e){for(var t=this.cy(),n=Ie(e),r=n.weight,i=n.directed,o=r,a=this.byGroup(),s=a.nodes,u=a.edges,l=s.length,c=l*l,f=function(e){return s.indexOf(e)},d=function(e){return s[e]},h=new Array(c),p=0;p<c;p++){var v=p%l,g=(p-v)/l;h[p]=g===v?0:1/0}for(var y=new Array(c),m=new Array(c),x=0;x<u.length;x++){var w=u[x],S=w.source()[0],E=w.target()[0];if(S!==E){var k=f(S),_=f(E),T=k*l+_,C=o(w);if(h[T]>C&&(h[T]=C,y[T]=_,m[T]=w),!i){var P=_*l+k;!i&&h[P]>C&&(h[P]=C,y[P]=k,m[P]=w)}}}for(var D=0;D<l;D++)for(var M=0;M<l;M++)for(var O=M*l+D,I=0;I<l;I++){var N=M*l+I,A=D*l+I;h[O]+h[A]<h[N]&&(h[N]=h[O]+h[A],y[N]=y[O])}var L=function(e){return f(function(e){return(b(e)?t.filter(e):e)[0]}(e))};return{distance:function(e,t){var n=L(e),r=L(t);return h[n*l+r]},path:function(e,n){var r=L(e),i=L(n),o=d(r);if(r===i)return o.collection();if(null==y[r*l+i])return t.collection();var a,s=t.collection(),u=r;for(s.merge(o);r!==i;)u=r,r=y[r*l+i],a=m[u*l+r],s.merge(a),s.merge(d(r));return s}}}},Ae=ge({weight:function(e){return 1},directed:!1,root:null}),Le={bellmanFord:function(e){var t=this,n=Ae(e),r=n.weight,i=n.directed,o=n.root,a=r,s=this,u=this.cy(),l=this.byGroup(),c=l.edges,f=l.nodes,d=f.length,h=new we,p=!1;o=u.collection(o)[0],c.unmergeBy((function(e){return e.isLoop()}));for(var v=c.length,g=function(e){var t=h.get(e.id());return t||(t={},h.set(e.id(),t)),t},y=function(e){return(b(e)?u.$(e):e)[0]},m=0;m<d;m++){var x=f[m],w=g(x);x.same(o)?w.dist=0:w.dist=1/0,w.pred=null,w.edge=null}for(var S=!1,E=function(e,t,n,r,i,o){var a=r.dist+o;a<i.dist&&!n.same(r.edge)&&(i.dist=a,i.pred=e,i.edge=n,S=!0)},k=1;k<d;k++){S=!1;for(var _=0;_<v;_++){var T=c[_],C=T.source(),P=T.target(),D=a(T),M=g(C),O=g(P);E(C,0,T,M,O,D),i||E(P,0,T,O,M,D)}if(!S)break}if(S)for(var I=0;I<v;I++){var N=c[I],A=N.source(),L=N.target(),j=a(N),B=g(A).dist,F=g(L).dist;if(B+j<F||!i&&F+j<B){fe("Graph contains a negative weight cycle for Bellman-Ford"),p=!0;break}}return{distanceTo:function(e){return g(y(e)).dist},pathTo:function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o,r=y(e),i=[],a=r;;){if(null==a)return t.spawn();var u=g(a),l=u.edge,c=u.pred;if(i.unshift(a[0]),a.same(n)&&i.length>0)break;null!=l&&i.unshift(l),a=c}return s.spawn(i)},hasNegativeWeightCycle:p,negativeWeightCycles:[]}}},je=Math.sqrt(2),Be=function(e,t,n){0===n.length&&le("Karger-Stein must be run on a connected (sub)graph");for(var r=n[e],i=r[1],o=r[2],a=t[i],s=t[o],u=n,l=u.length-1;l>=0;l--){var c=u[l],f=c[1],d=c[2];(t[f]===a&&t[d]===s||t[f]===s&&t[d]===a)&&u.splice(l,1)}for(var h=0;h<u.length;h++){var p=u[h];p[1]===s?(u[h]=p.slice(),u[h][1]=a):p[2]===s&&(u[h]=p.slice(),u[h][2]=a)}for(var v=0;v<t.length;v++)t[v]===s&&(t[v]=a);return u},Fe=function(e,t,n,r){for(;n>r;){var i=Math.floor(Math.random()*t.length);t=Be(i,e,t),n--}return t},Re={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,r=t.edges;r.unmergeBy((function(e){return e.isLoop()}));var i=n.length,o=r.length,a=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),s=Math.floor(i/je);if(!(i<2)){for(var u=[],l=0;l<o;l++){var c=r[l];u.push([l,n.indexOf(c.source()),n.indexOf(c.target())])}for(var f=1/0,d=[],h=new Array(i),p=new Array(i),v=new Array(i),g=function(e,t){for(var n=0;n<i;n++)t[n]=e[n]},y=0;y<=a;y++){for(var m=0;m<i;m++)p[m]=m;var b=Fe(p,u.slice(),i,s),x=b.slice();g(p,v);var w=Fe(p,b,s,2),S=Fe(v,x,s,2);w.length<=S.length&&w.length<f?(f=w.length,d=w,g(p,h)):S.length<=w.length&&S.length<f&&(f=S.length,d=S,g(v,h))}for(var E=this.spawn(d.map((function(e){return r[e[0]]}))),k=this.spawn(),_=this.spawn(),T=h[0],C=0;C<h.length;C++){var P=h[C],D=n[C];P===T?k.merge(D):_.merge(D)}var M=function(t){var n=e.spawn();return t.forEach((function(t){n.merge(t),t.connectedEdges().forEach((function(t){e.contains(t)&&!E.contains(t)&&n.merge(t)}))})),n},O=[M(k),M(_)];return{cut:E,components:O,partition1:k,partition2:_}}le("At least 2 nodes are required for Karger-Stein algorithm")}},ze=function(e,t,n){return{x:e.x*t+n.x,y:e.y*t+n.y}},Ve=function(e,t,n){return{x:(e.x-n.x)/t,y:(e.y-n.y)/t}},qe=function(e){return{x:e[0],y:e[1]}},Ge=function(e,t){return Math.atan2(t,e)-Math.PI/2},We=Math.log2||function(e){return Math.log(e)/Math.log(2)},He=function(e){return e>0?1:e<0?-1:0},Ue=function(e,t){return Math.sqrt(Ye(e,t))},Ye=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},Xe=function(e){for(var t=e.length,n=0,r=0;r<t;r++)n+=e[r];for(var i=0;i<t;i++)e[i]=e[i]/n;return e},Ke=function(e,t,n,r){return(1-r)*(1-r)*e+2*(1-r)*r*t+r*r*n},$e=function(e,t,n,r){return{x:Ke(e.x,t.x,n.x,r),y:Ke(e.y,t.y,n.y,r)}},Ze=function(e,t,n){return Math.max(e,Math.min(n,t))},Qe=function(e){if(null==e)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(null!=e.x1&&null!=e.y1){if(null!=e.x2&&null!=e.y2&&e.x2>=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},Je=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},et=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},tt=function(e){var t,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===o.length)t=n=r=i=o[0];else if(2===o.length)t=r=o[0],i=n=o[1];else if(4===o.length){var a=f(o,4);t=a[0],n=a[1],r=a[2],i=a[3]}return e.x1-=i,e.x2+=n,e.y1-=t,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},nt=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},rt=function(e,t){e.x1+=t.x,e.x2+=t.x,e.y1+=t.y,e.y2+=t.y},it=function(e,t){return!(e.x1>t.x2)&&(!(t.x1>e.x2)&&(!(e.x2<t.x1)&&(!(t.x2<e.x1)&&(!(e.y2<t.y1)&&(!(t.y2<e.y1)&&(!(e.y1>t.y2)&&!(t.y1>e.y2)))))))},ot=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},at=function(e,t){return ot(e,t.x1,t.y1)&&ot(e,t.x2,t.y2)},st=function(e,t,n,r,i,o,a){var s,u=_t(i,o),l=i/2,c=o/2,f=r-c-a;if((s=bt(e,t,n,r,n-l+u-a,f,n+l-u+a,f,!1)).length>0)return s;var d=n+l+a;if((s=bt(e,t,n,r,d,r-c+u-a,d,r+c-u+a,!1)).length>0)return s;var h=r+c+a;if((s=bt(e,t,n,r,n-l+u-a,h,n+l-u+a,h,!1)).length>0)return s;var p,v=n-l-a;if((s=bt(e,t,n,r,v,r-c+u-a,v,r+c-u+a,!1)).length>0)return s;var g=n-l+u,y=r-c+u;if((p=yt(e,t,n,r,g,y,u+a)).length>0&&p[0]<=g&&p[1]<=y)return[p[0],p[1]];var m=n+l-u,b=r-c+u;if((p=yt(e,t,n,r,m,b,u+a)).length>0&&p[0]>=m&&p[1]<=b)return[p[0],p[1]];var x=n+l-u,w=r+c-u;if((p=yt(e,t,n,r,x,w,u+a)).length>0&&p[0]>=x&&p[1]>=w)return[p[0],p[1]];var S=n-l+u,E=r+c-u;return(p=yt(e,t,n,r,S,E,u+a)).length>0&&p[0]<=S&&p[1]>=E?[p[0],p[1]]:[]},ut=function(e,t,n,r,i,o,a){var s=a,u=Math.min(n,i),l=Math.max(n,i),c=Math.min(r,o),f=Math.max(r,o);return u-s<=e&&e<=l+s&&c-s<=t&&t<=f+s},lt=function(e,t,n,r,i,o,a,s,u){var l=Math.min(n,a,i)-u,c=Math.max(n,a,i)+u,f=Math.min(r,s,o)-u,d=Math.max(r,s,o)+u;return!(e<l||e>c||t<f||t>d)},ct=function(e,t,n,r,i,o,a,s){var u=[];!function(e,t,n,r,i){var o,a,s,u,l,c,f,d;0===e&&(e=1e-5),s=-27*(r/=e)+(t/=e)*(9*(n/=e)-t*t*2),o=(a=(3*n-t*t)/9)*a*a+(s/=54)*s,i[1]=0,f=t/3,o>0?(l=(l=s+Math.sqrt(o))<0?-Math.pow(-l,1/3):Math.pow(l,1/3),c=(c=s-Math.sqrt(o))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-f+l+c,f+=(l+c)/2,i[4]=i[2]=-f,f=Math.sqrt(3)*(-c+l)/2,i[3]=f,i[5]=-f):(i[5]=i[3]=0,0===o?(d=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),i[0]=2*d-f,i[4]=i[2]=-(d+f)):(u=(a=-a)*a*a,u=Math.acos(s/Math.sqrt(u)),d=2*Math.sqrt(a),i[0]=-f+d*Math.cos(u/3),i[2]=-f+d*Math.cos((u+2*Math.PI)/3),i[4]=-f+d*Math.cos((u+4*Math.PI)/3)))}(1*n*n-4*n*i+2*n*a+4*i*i-4*i*a+a*a+r*r-4*r*o+2*r*s+4*o*o-4*o*s+s*s,9*n*i-3*n*n-3*n*a-6*i*i+3*i*a+9*r*o-3*r*r-3*r*s-6*o*o+3*o*s,3*n*n-6*n*i+n*a-n*e+2*i*i+2*i*e-a*e+3*r*r-6*r*o+r*s-r*t+2*o*o+2*o*t-s*t,1*n*i-n*n+n*e-i*e+r*o-r*r+r*t-o*t,u);for(var l=[],c=0;c<6;c+=2)Math.abs(u[c+1])<1e-7&&u[c]>=0&&u[c]<=1&&l.push(u[c]);l.push(1),l.push(0);for(var f,d,h,p=-1,v=0;v<l.length;v++)f=Math.pow(1-l[v],2)*n+2*(1-l[v])*l[v]*i+l[v]*l[v]*a,d=Math.pow(1-l[v],2)*r+2*(1-l[v])*l[v]*o+l[v]*l[v]*s,h=Math.pow(f-e,2)+Math.pow(d-t,2),p>=0?h<p&&(p=h):p=h;return p},ft=function(e,t,n,r,i,o){var a=[e-n,t-r],s=[i-n,o-r],u=s[0]*s[0]+s[1]*s[1],l=a[0]*a[0]+a[1]*a[1],c=a[0]*s[0]+a[1]*s[1],f=c*c/u;return c<0?l:f>u?(e-i)*(e-i)+(t-o)*(t-o):l-f},dt=function(e,t,n){for(var r,i,o,a,s=0,u=0;u<n.length/2;u++)if(r=n[2*u],i=n[2*u+1],u+1<n.length/2?(o=n[2*(u+1)],a=n[2*(u+1)+1]):(o=n[2*(u+1-n.length/2)],a=n[2*(u+1-n.length/2)+1]),r==e&&o==e);else{if(!(r>=e&&e>=o||r<=e&&e<=o))continue;(e-r)/(o-r)*(a-i)+i>t&&s++}return s%2!=0},ht=function(e,t,n,r,i,o,a,s,u){var l,c=new Array(n.length);null!=s[0]?(l=Math.atan(s[1]/s[0]),s[0]<0?l+=Math.PI/2:l=-l-Math.PI/2):l=s;for(var f,d=Math.cos(-l),h=Math.sin(-l),p=0;p<c.length/2;p++)c[2*p]=o/2*(n[2*p]*d-n[2*p+1]*h),c[2*p+1]=a/2*(n[2*p+1]*d+n[2*p]*h),c[2*p]+=r,c[2*p+1]+=i;if(u>0){var v=vt(c,-u);f=pt(v)}else f=c;return dt(e,t,f)},pt=function(e){for(var t,n,r,i,o,a,s,u,l=new Array(e.length/2),c=0;c<e.length/4;c++){t=e[4*c],n=e[4*c+1],r=e[4*c+2],i=e[4*c+3],c<e.length/4-1?(o=e[4*(c+1)],a=e[4*(c+1)+1],s=e[4*(c+1)+2],u=e[4*(c+1)+3]):(o=e[0],a=e[1],s=e[2],u=e[3]);var f=bt(t,n,r,i,o,a,s,u,!0);l[2*c]=f[0],l[2*c+1]=f[1]}return l},vt=function(e,t){for(var n,r,i,o,a=new Array(2*e.length),s=0;s<e.length/2;s++){n=e[2*s],r=e[2*s+1],s<e.length/2-1?(i=e[2*(s+1)],o=e[2*(s+1)+1]):(i=e[0],o=e[1]);var u=o-r,l=-(i-n),c=Math.sqrt(u*u+l*l),f=u/c,d=l/c;a[4*s]=n+f*t,a[4*s+1]=r+d*t,a[4*s+2]=i+f*t,a[4*s+3]=o+d*t}return a},gt=function(e,t,n,r,i,o,a){return e-=i,t-=o,(e/=n/2+a)*e+(t/=r/2+a)*t<=1},yt=function(e,t,n,r,i,o,a){var s=[n-e,r-t],u=[e-i,t-o],l=s[0]*s[0]+s[1]*s[1],c=2*(u[0]*s[0]+u[1]*s[1]),f=c*c-4*l*(u[0]*u[0]+u[1]*u[1]-a*a);if(f<0)return[];var d=(-c+Math.sqrt(f))/(2*l),h=(-c-Math.sqrt(f))/(2*l),p=Math.min(d,h),v=Math.max(d,h),g=[];if(p>=0&&p<=1&&g.push(p),v>=0&&v<=1&&g.push(v),0===g.length)return[];var y=g[0]*s[0]+e,m=g[0]*s[1]+t;return g.length>1?g[0]==g[1]?[y,m]:[y,m,g[1]*s[0]+e,g[1]*s[1]+t]:[y,m]},mt=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},bt=function(e,t,n,r,i,o,a,s,u){var l=e-i,c=n-e,f=a-i,d=t-o,h=r-t,p=s-o,v=f*d-p*l,g=c*d-h*l,y=p*c-f*h;if(0!==y){var m=v/y,b=g/y;return-.001<=m&&m<=1.001&&-.001<=b&&b<=1.001||u?[e+m*c,t+m*h]:[]}return 0===v||0===g?mt(e,n,a)===a?[a,s]:mt(e,n,i)===i?[i,o]:mt(i,a,n)===n?[n,r]:[]:[]},xt=function(e,t,n,r,i,o,a,s){var u,l,c,f,d,h,p=[],v=new Array(n.length),g=!0;if(null==o&&(g=!1),g){for(var y=0;y<v.length/2;y++)v[2*y]=n[2*y]*o+r,v[2*y+1]=n[2*y+1]*a+i;if(s>0){var m=vt(v,-s);l=pt(m)}else l=v}else l=n;for(var b=0;b<l.length/2;b++)c=l[2*b],f=l[2*b+1],b<l.length/2-1?(d=l[2*(b+1)],h=l[2*(b+1)+1]):(d=l[0],h=l[1]),0!==(u=bt(e,t,r,i,c,f,d,h)).length&&p.push(u[0],u[1]);return p},wt=function(e,t,n){var r=[e[0]-t[0],e[1]-t[1]],i=Math.sqrt(r[0]*r[0]+r[1]*r[1]),o=(i-n)/i;return o<0&&(o=1e-5),[t[0]+o*r[0],t[1]+o*r[1]]},St=function(e,t){var n=kt(e,t);return n=Et(n)},Et=function(e){for(var t,n,r=e.length/2,i=1/0,o=1/0,a=-1/0,s=-1/0,u=0;u<r;u++)t=e[2*u],n=e[2*u+1],i=Math.min(i,t),a=Math.max(a,t),o=Math.min(o,n),s=Math.max(s,n);for(var l=2/(a-i),c=2/(s-o),f=0;f<r;f++)t=e[2*f]=e[2*f]*l,n=e[2*f+1]=e[2*f+1]*c,i=Math.min(i,t),a=Math.max(a,t),o=Math.min(o,n),s=Math.max(s,n);if(o<-1)for(var d=0;d<r;d++)n=e[2*d+1]=e[2*d+1]+(-1-o);return e},kt=function(e,t){var n=1/e*2*Math.PI,r=e%2==0?Math.PI/2+n/2:Math.PI/2;r+=t;for(var i,o=new Array(2*e),a=0;a<e;a++)i=a*n+r,o[2*a]=Math.cos(i),o[2*a+1]=Math.sin(-i);return o},_t=function(e,t){return Math.min(e/4,t/4,8)},Tt=function(e,t){return Math.min(e/10,t/10,8)},Ct=function(e,t){return{heightOffset:Math.min(15,.05*t),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}},Pt=ge({dampingFactor:.8,precision:1e-6,iterations:200,weight:function(e){return 1}}),Dt={pageRank:function(e){for(var t=Pt(e),n=t.dampingFactor,r=t.precision,i=t.iterations,o=t.weight,a=this._private.cy,s=this.byGroup(),u=s.nodes,l=s.edges,c=u.length,f=c*c,d=l.length,h=new Array(f),p=new Array(c),v=(1-n)/c,g=0;g<c;g++){for(var y=0;y<c;y++){h[g*c+y]=0}p[g]=0}for(var m=0;m<d;m++){var b=l[m],x=b.data("source"),w=b.data("target");if(x!==w){var S=u.indexOfId(x),E=u.indexOfId(w),k=o(b);h[E*c+S]+=k,p[S]+=k}}for(var _=1/c+v,T=0;T<c;T++)if(0===p[T])for(var C=0;C<c;C++){h[C*c+T]=_}else for(var P=0;P<c;P++){var D=P*c+T;h[D]=h[D]/p[T]+v}for(var M,O=new Array(c),I=new Array(c),N=0;N<c;N++)O[N]=1;for(var A=0;A<i;A++){for(var L=0;L<c;L++)I[L]=0;for(var j=0;j<c;j++)for(var B=0;B<c;B++){var F=j*c+B;I[j]+=h[F]*O[B]}Xe(I),M=O,O=I,I=M;for(var R=0,z=0;z<c;z++){var V=M[z]-O[z];R+=V*V}if(R<r)break}return{rank:function(e){return e=a.collection(e)[0],O[u.indexOf(e)]}}}},Mt=ge({root:null,weight:function(e){return 1},directed:!1,alpha:0}),Ot={degreeCentralityNormalized:function(e){e=Mt(e);var t=this.cy(),n=this.nodes(),r=n.length;if(e.directed){for(var i={},o={},a=0,s=0,u=0;u<r;u++){var l=n[u],c=l.id();e.root=l;var f=this.degreeCentrality(e);a<f.indegree&&(a=f.indegree),s<f.outdegree&&(s=f.outdegree),i[c]=f.indegree,o[c]=f.outdegree}return{indegree:function(e){return 0==a?0:(b(e)&&(e=t.filter(e)),i[e.id()]/a)},outdegree:function(e){return 0===s?0:(b(e)&&(e=t.filter(e)),o[e.id()]/s)}}}for(var d={},h=0,p=0;p<r;p++){var v=n[p];e.root=v;var g=this.degreeCentrality(e);h<g.degree&&(h=g.degree),d[v.id()]=g.degree}return{degree:function(e){return 0===h?0:(b(e)&&(e=t.filter(e)),d[e.id()]/h)}}},degreeCentrality:function(e){e=Mt(e);var t=this.cy(),n=this,r=e,i=r.root,o=r.weight,a=r.directed,s=r.alpha;if(i=t.collection(i)[0],a){for(var u=i.connectedEdges(),l=u.filter((function(e){return e.target().same(i)&&n.has(e)})),c=u.filter((function(e){return e.source().same(i)&&n.has(e)})),f=l.length,d=c.length,h=0,p=0,v=0;v<l.length;v++)h+=o(l[v]);for(var g=0;g<c.length;g++)p+=o(c[g]);return{indegree:Math.pow(f,1-s)*Math.pow(h,s),outdegree:Math.pow(d,1-s)*Math.pow(p,s)}}for(var y=i.connectedEdges().intersection(n),m=y.length,b=0,x=0;x<y.length;x++)b+=o(y[x]);return{degree:Math.pow(m,1-s)*Math.pow(b,s)}}};Ot.dc=Ot.degreeCentrality,Ot.dcn=Ot.degreeCentralityNormalised=Ot.degreeCentralityNormalized;var It=ge({harmonic:!0,weight:function(){return 1},directed:!1,root:null}),Nt={closenessCentralityNormalized:function(e){for(var t=It(e),n=t.harmonic,r=t.weight,i=t.directed,o=this.cy(),a={},s=0,u=this.nodes(),l=this.floydWarshall({weight:r,directed:i}),c=0;c<u.length;c++){for(var f=0,d=u[c],h=0;h<u.length;h++)if(c!==h){var p=l.distance(d,u[h]);f+=n?1/p:p}n||(f=1/f),s<f&&(s=f),a[d.id()]=f}return{closeness:function(e){return 0==s?0:(e=b(e)?o.filter(e)[0].id():e.id(),a[e]/s)}}},closenessCentrality:function(e){var t=It(e),n=t.root,r=t.weight,i=t.directed,o=t.harmonic;n=this.filter(n)[0];for(var a=this.dijkstra({root:n,weight:r,directed:i}),s=0,u=this.nodes(),l=0;l<u.length;l++){var c=u[l];if(!c.same(n)){var f=a.distanceTo(c);s+=o?1/f:f}}return o?s:1/s}};Nt.cc=Nt.closenessCentrality,Nt.ccn=Nt.closenessCentralityNormalised=Nt.closenessCentralityNormalized;var At=ge({weight:null,directed:!1}),Lt={betweennessCentrality:function(e){for(var t=At(e),n=t.directed,r=t.weight,i=null!=r,a=this.cy(),s=this.nodes(),u={},l={},c=0,f=function(e,t){l[e]=t,t>c&&(c=t)},d=function(e){return l[e]},h=0;h<s.length;h++){var p=s[h],v=p.id();u[v]=n?p.outgoers().nodes():p.openNeighborhood().nodes(),f(v,0)}for(var g=function(e){for(var t=s[e].id(),n=[],l={},c={},h={},p=new o((function(e,t){return h[e]-h[t]})),v=0;v<s.length;v++){var g=s[v].id();l[g]=[],c[g]=0,h[g]=1/0}for(c[t]=1,h[t]=0,p.push(t);!p.empty();){var y=p.pop();if(n.push(y),i)for(var m=0;m<u[y].length;m++){var b=u[y][m],x=a.getElementById(y),w=void 0;w=x.edgesTo(b).length>0?x.edgesTo(b)[0]:b.edgesTo(x)[0];var S=r(w);b=b.id(),h[b]>h[y]+S&&(h[b]=h[y]+S,p.nodes.indexOf(b)<0?p.push(b):p.updateItem(b),c[b]=0,l[b]=[]),h[b]==h[y]+S&&(c[b]=c[b]+c[y],l[b].push(y))}else for(var E=0;E<u[y].length;E++){var k=u[y][E].id();h[k]==1/0&&(p.push(k),h[k]=h[y]+1),h[k]==h[y]+1&&(c[k]=c[k]+c[y],l[k].push(y))}}for(var _={},T=0;T<s.length;T++)_[s[T].id()]=0;for(;n.length>0;)for(var C=n.pop(),P=0;P<l[C].length;P++){var D=l[C][P];_[D]=_[D]+c[D]/c[C]*(1+_[C]),C!=s[e].id()&&f(C,d(C)+_[C])}},y=0;y<s.length;y++)g(y);var m={betweenness:function(e){var t=a.collection(e).id();return d(t)},betweennessNormalized:function(e){if(0==c)return 0;var t=a.collection(e).id();return d(t)/c}};return m.betweennessNormalised=m.betweennessNormalized,m}};Lt.bc=Lt.betweennessCentrality;var jt=ge({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(e){return 1}]}),Bt=function(e,t){for(var n=0,r=0;r<t.length;r++)n+=t[r](e);return n},Ft=function(e,t){for(var n,r=0;r<t;r++){n=0;for(var i=0;i<t;i++)n+=e[i*t+r];for(var o=0;o<t;o++)e[o*t+r]=e[o*t+r]/n}},Rt=function(e,t,n){for(var r=new Array(n*n),i=0;i<n;i++){for(var o=0;o<n;o++)r[i*n+o]=0;for(var a=0;a<n;a++)for(var s=0;s<n;s++)r[i*n+s]+=e[i*n+a]*t[a*n+s]}return r},zt=function(e,t,n){for(var r=e.slice(0),i=1;i<n;i++)e=Rt(e,r,t);return e},Vt=function(e,t,n){for(var r=new Array(t*t),i=0;i<t*t;i++)r[i]=Math.pow(e[i],n);return Ft(r,t),r},qt=function(e,t,n,r){for(var i=0;i<n;i++){if(Math.round(e[i]*Math.pow(10,r))/Math.pow(10,r)!==Math.round(t[i]*Math.pow(10,r))/Math.pow(10,r))return!1}return!0},Gt=function(e,t){for(var n=0;n<e.length;n++)if(!t[n]||e[n].id()!==t[n].id())return!1;return!0},Wt=function(e){for(var t=this.nodes(),n=this.edges(),r=this.cy(),i=function(e){return jt(e)}(e),o={},a=0;a<t.length;a++)o[t[a].id()]=a;for(var s,u=t.length,l=u*u,c=new Array(l),f=0;f<l;f++)c[f]=0;for(var d=0;d<n.length;d++){var h=n[d],p=o[h.source().id()],v=o[h.target().id()],g=Bt(h,i.attributes);c[p*u+v]+=g,c[v*u+p]+=g}!function(e,t,n){for(var r=0;r<t;r++)e[r*t+r]=n}(c,u,i.multFactor),Ft(c,u);for(var y=!0,m=0;y&&m<i.maxIterations;)y=!1,s=zt(c,u,i.expandFactor),c=Vt(s,u,i.inflateFactor),qt(c,s,l,4)||(y=!0),m++;var b=function(e,t,n,r){for(var i=[],o=0;o<t;o++){for(var a=[],s=0;s<t;s++)Math.round(1e3*e[o*t+s])/1e3>0&&a.push(n[s]);0!==a.length&&i.push(r.collection(a))}return i}(c,u,t,r);return b=function(e){for(var t=0;t<e.length;t++)for(var n=0;n<e.length;n++)t!=n&&Gt(e[t],e[n])&&e.splice(n,1);return e}(b)},Ht={markovClustering:Wt,mcl:Wt},Ut=function(e){return e},Yt=function(e,t){return Math.abs(t-e)},Xt=function(e,t,n){return e+Yt(t,n)},Kt=function(e,t,n){return e+Math.pow(n-t,2)},$t=function(e){return Math.sqrt(e)},Zt=function(e,t,n){return Math.max(e,Yt(t,n))},Qt=function(e,t,n,r,i){for(var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Ut,a=r,s=0;s<e;s++)a=i(a,t(s),n(s));return o(a)},Jt={euclidean:function(e,t,n){return e>=2?Qt(e,t,n,0,Kt,$t):Qt(e,t,n,0,Xt)},squaredEuclidean:function(e,t,n){return Qt(e,t,n,0,Kt)},manhattan:function(e,t,n){return Qt(e,t,n,0,Xt)},max:function(e,t,n){return Qt(e,t,n,-1/0,Zt)}};function en(e,t,n,r,i,o){var a;return a=x(e)?e:Jt[e]||Jt.euclidean,0===t&&x(e)?a(i,o):a(t,n,r,i,o)}Jt["squared-euclidean"]=Jt.squaredEuclidean,Jt.squaredeuclidean=Jt.squaredEuclidean;var tn=ge({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),nn=function(e){return tn(e)},rn=function(e,t,n,r,i){var o="kMedoids"!==i?function(e){return n[e]}:function(e){return r[e](n)},a=n,s=t;return en(e,r.length,o,(function(e){return r[e](t)}),a,s)},on=function(e,t,n){for(var r=n.length,i=new Array(r),o=new Array(r),a=new Array(t),s=null,u=0;u<r;u++)i[u]=e.min(n[u]).value,o[u]=e.max(n[u]).value;for(var l=0;l<t;l++){s=[];for(var c=0;c<r;c++)s[c]=Math.random()*(o[c]-i[c])+i[c];a[l]=s}return a},an=function(e,t,n,r,i){for(var o=1/0,a=0,s=0;s<t.length;s++){var u=rn(n,e,t[s],r,i);u<o&&(o=u,a=s)}return a},sn=function(e,t,n){for(var r=[],i=null,o=0;o<t.length;o++)n[(i=t[o]).id()]===e&&r.push(i);return r},un=function(e,t,n){for(var r=0;r<e.length;r++)for(var i=0;i<e[r].length;i++){if(Math.abs(e[r][i]-t[r][i])>n)return!1}return!0},ln=function(e,t,n){for(var r=0;r<n;r++)if(e===t[r])return!0;return!1},cn=function(e,t){var n=new Array(t);if(e.length<50)for(var r=0;r<t;r++){for(var i=e[Math.floor(Math.random()*e.length)];ln(i,n,r);)i=e[Math.floor(Math.random()*e.length)];n[r]=i}else for(var o=0;o<t;o++)n[o]=e[Math.floor(Math.random()*e.length)];return n},fn=function(e,t,n){for(var r=0,i=0;i<t.length;i++)r+=rn("manhattan",t[i],e,n,"kMedoids");return r},dn=function(e,t,n,r,i){for(var o,a,s=0;s<t.length;s++)for(var u=0;u<e.length;u++)r[s][u]=Math.pow(n[s][u],i.m);for(var l=0;l<e.length;l++)for(var c=0;c<i.attributes.length;c++){o=0,a=0;for(var f=0;f<t.length;f++)o+=r[f][l]*i.attributes[c](t[f]),a+=r[f][l];e[l][c]=o/a}},hn=function(e,t,n,r,i){for(var o=0;o<e.length;o++)t[o]=e[o].slice();for(var a,s,u,l=2/(i.m-1),c=0;c<n.length;c++)for(var f=0;f<r.length;f++){a=0;for(var d=0;d<n.length;d++)s=rn(i.distance,r[f],n[c],i.attributes,"cmeans"),u=rn(i.distance,r[f],n[d],i.attributes,"cmeans"),a+=Math.pow(s/u,l);e[f][c]=1/a}},pn=function(e){var t,n,r,i,o=this.cy(),a=this.nodes(),s=nn(e);r=new Array(a.length);for(var u=0;u<a.length;u++)r[u]=new Array(s.k);n=new Array(a.length);for(var l=0;l<a.length;l++)n[l]=new Array(s.k);for(var c=0;c<a.length;c++){for(var f=0,d=0;d<s.k;d++)n[c][d]=Math.random(),f+=n[c][d];for(var h=0;h<s.k;h++)n[c][h]=n[c][h]/f}t=new Array(s.k);for(var p=0;p<s.k;p++)t[p]=new Array(s.attributes.length);i=new Array(a.length);for(var v=0;v<a.length;v++)i[v]=new Array(s.k);for(var g=!0,y=0;g&&y<s.maxIterations;)g=!1,dn(t,a,n,i,s),hn(n,r,t,a,s),un(n,r,s.sensitivityThreshold)||(g=!0),y++;return{clusters:function(e,t,n,r){for(var i,o,a=new Array(n.k),s=0;s<a.length;s++)a[s]=[];for(var u=0;u<t.length;u++){i=-1/0,o=-1;for(var l=0;l<t[0].length;l++)t[u][l]>i&&(i=t[u][l],o=l);a[o].push(e[u])}for(var c=0;c<a.length;c++)a[c]=r.collection(a[c]);return a}(a,n,s,o),degreeOfMembership:n}},vn={kMeans:function(e){var t,n=this.cy(),r=this.nodes(),i=null,o=nn(e),s=new Array(o.k),u={};t=o.testMode?"number"==typeof o.testCentroids?on(r,o.k,o.attributes):"object"===a(o.testCentroids)?o.testCentroids:on(r,o.k,o.attributes):on(r,o.k,o.attributes);for(var l,c,f,d=!0,h=0;d&&h<o.maxIterations;){for(var p=0;p<r.length;p++)u[(i=r[p]).id()]=an(i,t,o.distance,o.attributes,"kMeans");d=!1;for(var v=0;v<o.k;v++){var g=sn(v,r,u);if(0!==g.length){for(var y=o.attributes.length,m=t[v],b=new Array(y),x=new Array(y),w=0;w<y;w++){x[w]=0;for(var S=0;S<g.length;S++)i=g[S],x[w]+=o.attributes[w](i);b[w]=x[w]/g.length,l=b[w],c=m[w],f=o.sensitivityThreshold,Math.abs(c-l)<=f||(d=!0)}t[v]=b,s[v]=n.collection(g)}}h++}return s},kMedoids:function(e){var t,n,r=this.cy(),i=this.nodes(),o=null,s=nn(e),u=new Array(s.k),l={},c=new Array(s.k);s.testMode?"number"==typeof s.testCentroids||(t="object"===a(s.testCentroids)?s.testCentroids:cn(i,s.k)):t=cn(i,s.k);for(var f=!0,d=0;f&&d<s.maxIterations;){for(var h=0;h<i.length;h++)l[(o=i[h]).id()]=an(o,t,s.distance,s.attributes,"kMedoids");f=!1;for(var p=0;p<t.length;p++){var v=sn(p,i,l);if(0!==v.length){c[p]=fn(t[p],v,s.attributes);for(var g=0;g<v.length;g++)(n=fn(v[g],v,s.attributes))<c[p]&&(c[p]=n,t[p]=v[g],f=!0);u[p]=r.collection(v)}}d++}return u},fuzzyCMeans:pn,fcm:pn},gn=ge({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),yn={single:"min",complete:"max"},mn=function(e,t,n,r,i){for(var o,a=0,s=1/0,u=i.attributes,l=function(e,t){return en(i.distance,u.length,(function(t){return u[t](e)}),(function(e){return u[e](t)}),e,t)},c=0;c<e.length;c++){var f=e[c].key,d=n[f][r[f]];d<s&&(a=f,s=d)}if("threshold"===i.mode&&s>=i.threshold||"dendrogram"===i.mode&&1===e.length)return!1;var h,p=t[a],v=t[r[a]];h="dendrogram"===i.mode?{left:p,right:v,key:p.key}:{value:p.value.concat(v.value),key:p.key},e[p.index]=h,e.splice(v.index,1),t[p.key]=h;for(var g=0;g<e.length;g++){var y=e[g];p.key===y.key?o=1/0:"min"===i.linkage?(o=n[p.key][y.key],n[p.key][y.key]>n[v.key][y.key]&&(o=n[v.key][y.key])):"max"===i.linkage?(o=n[p.key][y.key],n[p.key][y.key]<n[v.key][y.key]&&(o=n[v.key][y.key])):o="mean"===i.linkage?(n[p.key][y.key]*p.size+n[v.key][y.key]*v.size)/(p.size+v.size):"dendrogram"===i.mode?l(y.value,p.value):l(y.value[0],p.value[0]),n[p.key][y.key]=n[y.key][p.key]=o}for(var m=0;m<e.length;m++){var b=e[m].key;if(r[b]===p.key||r[b]===v.key){for(var x=b,w=0;w<e.length;w++){var S=e[w].key;n[b][S]<n[b][x]&&(x=S)}r[b]=x}e[m].index=m}return p.key=v.key=p.index=v.index=null,!0},bn=function e(t,n,r){t&&(t.value?n.push(t.value):(t.left&&e(t.left,n),t.right&&e(t.right,n)))},xn=function(e){for(var t=this.cy(),n=this.nodes(),r=function(e){var t=gn(e),n=yn[t.linkage];return null!=n&&(t.linkage=n),t}(e),i=r.attributes,o=function(e,t){return en(r.distance,i.length,(function(t){return i[t](e)}),(function(e){return i[e](t)}),e,t)},a=[],s=[],u=[],l=[],c=0;c<n.length;c++){var f={value:"dendrogram"===r.mode?n[c]:[n[c]],key:c,index:c};a[c]=f,l[c]=f,s[c]=[],u[c]=0}for(var d=0;d<a.length;d++)for(var h=0;h<=d;h++){var p=void 0;p="dendrogram"===r.mode?d===h?1/0:o(a[d].value,a[h].value):d===h?1/0:o(a[d].value[0],a[h].value[0]),s[d][h]=p,s[h][d]=p,p<s[d][u[d]]&&(u[d]=h)}for(var v,g=mn(a,l,s,u,r);g;)g=mn(a,l,s,u,r);return"dendrogram"===r.mode?(v=function e(t,n,r){if(!t)return[];var i=[],o=[],a=[];return 0===n?(t.left&&bn(t.left,i),t.right&&bn(t.right,o),a=i.concat(o),[r.collection(a)]):1===n?t.value?[r.collection(t.value)]:(t.left&&bn(t.left,i),t.right&&bn(t.right,o),[r.collection(i),r.collection(o)]):t.value?[r.collection(t.value)]:(t.left&&(i=e(t.left,n-1,r)),t.right&&(o=e(t.right,n-1,r)),i.concat(o))}(a[0],r.dendrogramDepth,t),r.addDendrogram&&function e(t,n){if(!t)return"";if(t.left&&t.right){var r=e(t.left,n),i=e(t.right,n),o=n.add({group:"nodes",data:{id:r+","+i}});return n.add({group:"edges",data:{source:r,target:o.id()}}),n.add({group:"edges",data:{source:i,target:o.id()}}),o.id()}return t.value?t.value.id():void 0}(a[0],t)):(v=new Array(a.length),a.forEach((function(e,n){e.key=e.index=null,v[n]=t.collection(e.value)}))),v},wn={hierarchicalClustering:xn,hca:xn},Sn=ge({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),En=function(e,t,n,r){var i=function(e,t){return r[t](e)};return-en(e,r.length,(function(e){return i(t,e)}),(function(e){return i(n,e)}),t,n)},kn=function(e,t){return"median"===t?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];r?e=e.slice(t,n):(n<e.length&&e.splice(n,e.length-n),t>0&&e.splice(0,t));for(var a=0,s=e.length-1;s>=0;s--){var u=e[s];o?isFinite(u)||(e[s]=-1/0,a++):e.splice(s,1)}i&&e.sort((function(e,t){return e-t}));var l=e.length,c=Math.floor(l/2);return l%2!=0?e[c+1+a]:(e[c-1+a]+e[c+a])/2}(e):"mean"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,i=0,o=t;o<n;o++){var a=e[o];isFinite(a)&&(r+=a,i++)}return r/i}(e):"min"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=1/0,i=t;i<n;i++){var o=e[i];isFinite(o)&&(r=Math.min(o,r))}return r}(e):"max"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=-1/0,i=t;i<n;i++){var o=e[i];isFinite(o)&&(r=Math.max(o,r))}return r}(e):t},_n=function(e,t,n){for(var r=[],i=0;i<e;i++){for(var o=-1,a=-1/0,s=0;s<n.length;s++){var u=n[s];t[i*e+u]>a&&(o=u,a=t[i*e+u])}o>0&&r.push(o)}for(var l=0;l<n.length;l++)r[n[l]]=n[l];return r},Tn=function(e){for(var t,n,r,i,o,a,s=this.cy(),u=this.nodes(),l=function(e){var t=e.damping,n=e.preference;.5<=t&&t<1||le("Damping must range on [0.5, 1).  Got: ".concat(t));var r=["median","mean","min","max"];return r.some((function(e){return e===n}))||E(n)||le("Preference must be one of [".concat(r.map((function(e){return"'".concat(e,"'")})).join(", "),"] or a number.  Got: ").concat(n)),Sn(e)}(e),c={},f=0;f<u.length;f++)c[u[f].id()]=f;n=(t=u.length)*t,r=new Array(n);for(var d=0;d<n;d++)r[d]=-1/0;for(var h=0;h<t;h++)for(var p=0;p<t;p++)h!==p&&(r[h*t+p]=En(l.distance,u[h],u[p],l.attributes));i=kn(r,l.preference);for(var v=0;v<t;v++)r[v*t+v]=i;o=new Array(n);for(var g=0;g<n;g++)o[g]=0;a=new Array(n);for(var y=0;y<n;y++)a[y]=0;for(var m=new Array(t),b=new Array(t),x=new Array(t),w=0;w<t;w++)m[w]=0,b[w]=0,x[w]=0;for(var S,k=new Array(t*l.minIterations),_=0;_<k.length;_++)k[_]=0;for(S=0;S<l.maxIterations;S++){for(var T=0;T<t;T++){for(var C=-1/0,P=-1/0,D=-1,M=0,O=0;O<t;O++)m[O]=o[T*t+O],(M=a[T*t+O]+r[T*t+O])>=C?(P=C,C=M,D=O):M>P&&(P=M);for(var I=0;I<t;I++)o[T*t+I]=(1-l.damping)*(r[T*t+I]-C)+l.damping*m[I];o[T*t+D]=(1-l.damping)*(r[T*t+D]-P)+l.damping*m[D]}for(var N=0;N<t;N++){for(var A=0,L=0;L<t;L++)m[L]=a[L*t+N],b[L]=Math.max(0,o[L*t+N]),A+=b[L];A-=b[N],b[N]=o[N*t+N],A+=b[N];for(var j=0;j<t;j++)a[j*t+N]=(1-l.damping)*Math.min(0,A-b[j])+l.damping*m[j];a[N*t+N]=(1-l.damping)*(A-b[N])+l.damping*m[N]}for(var B=0,F=0;F<t;F++){var R=a[F*t+F]+o[F*t+F]>0?1:0;k[S%l.minIterations*t+F]=R,B+=R}if(B>0&&(S>=l.minIterations-1||S==l.maxIterations-1)){for(var z=0,V=0;V<t;V++){x[V]=0;for(var q=0;q<l.minIterations;q++)x[V]+=k[q*t+V];0!==x[V]&&x[V]!==l.minIterations||z++}if(z===t)break}}for(var G=function(e,t,n){for(var r=[],i=0;i<e;i++)t[i*e+i]+n[i*e+i]>0&&r.push(i);return r}(t,o,a),W=function(e,t,n){for(var r=_n(e,t,n),i=0;i<n.length;i++){for(var o=[],a=0;a<r.length;a++)r[a]===n[i]&&o.push(a);for(var s=-1,u=-1/0,l=0;l<o.length;l++){for(var c=0,f=0;f<o.length;f++)c+=t[o[f]*e+o[l]];c>u&&(s=l,u=c)}n[i]=o[s]}return r=_n(e,t,n)}(t,r,G),H={},U=0;U<G.length;U++)H[G[U]]=[];for(var Y=0;Y<u.length;Y++){var X=W[c[u[Y].id()]];null!=X&&H[X].push(u[Y])}for(var K=new Array(G.length),$=0;$<G.length;$++)K[$]=s.collection(H[G[$]]);return K},Cn={affinityPropagation:Tn,ap:Tn},Pn=ge({root:void 0,directed:!1}),Dn=function(){var e=this,t={},n=0,r=0,i=[],o=[],a={},s=function s(u,l,c){u===c&&(r+=1),t[l]={id:n,low:n++,cutVertex:!1};var f,d,h,p,v=e.getElementById(l).connectedEdges().intersection(e);0===v.size()?i.push(e.spawn(e.getElementById(l))):v.forEach((function(n){f=n.source().id(),d=n.target().id(),(h=f===l?d:f)!==c&&(p=n.id(),a[p]||(a[p]=!0,o.push({x:l,y:h,edge:n})),h in t?t[l].low=Math.min(t[l].low,t[h].id):(s(u,h,l),t[l].low=Math.min(t[l].low,t[h].low),t[l].id<=t[h].low&&(t[l].cutVertex=!0,function(n,r){for(var a=o.length-1,s=[],u=e.spawn();o[a].x!=n||o[a].y!=r;)s.push(o.pop().edge),a--;s.push(o.pop().edge),s.forEach((function(n){var r=n.connectedNodes().intersection(e);u.merge(n),r.forEach((function(n){var r=n.id(),i=n.connectedEdges().intersection(e);u.merge(n),t[r].cutVertex?u.merge(i.filter((function(e){return e.isLoop()}))):u.merge(i)}))})),i.push(u)}(l,h))))}))};e.forEach((function(e){if(e.isNode()){var n=e.id();n in t||(r=0,s(n,n),t[n].cutVertex=r>1)}}));var u=Object.keys(t).filter((function(e){return t[e].cutVertex})).map((function(t){return e.getElementById(t)}));return{cut:e.spawn(u),components:i}},Mn=function(){var e=this,t={},n=0,r=[],i=[],o=e.spawn(e);return e.forEach((function(a){if(a.isNode()){var s=a.id();s in t||function a(s){if(i.push(s),t[s]={index:n,low:n++,explored:!1},e.getElementById(s).connectedEdges().intersection(e).forEach((function(e){var n=e.target().id();n!==s&&(n in t||a(n),t[n].explored||(t[s].low=Math.min(t[s].low,t[n].low)))})),t[s].index===t[s].low){for(var u=e.spawn();;){var l=i.pop();if(u.merge(e.getElementById(l)),t[l].low=t[s].index,t[l].explored=!0,l===s)break}var c=u.edgesWith(u),f=u.merge(c);r.push(f),o=o.difference(f)}}(s)}})),{cut:o,components:r}},On={};[Te,Pe,De,Oe,Ne,Le,Re,Dt,Ot,Nt,Lt,Ht,vn,wn,Cn,{hierholzer:function(e){if(!S(e)){var t=arguments;e={root:t[0],directed:t[1]}}var n,r,i,o=Pn(e),a=o.root,s=o.directed,u=this,l=!1;a&&(i=b(a)?this.filter(a)[0].id():a[0].id());var c={},f={};s?u.forEach((function(e){var t=e.id();if(e.isNode()){var i=e.indegree(!0),o=e.outdegree(!0),a=i-o,s=o-i;1==a?n?l=!0:n=t:1==s?r?l=!0:r=t:(s>1||a>1)&&(l=!0),c[t]=[],e.outgoers().forEach((function(e){e.isEdge()&&c[t].push(e.id())}))}else f[t]=[void 0,e.target().id()]})):u.forEach((function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(n?r?l=!0:r=t:n=t),c[t]=[],e.connectedEdges().forEach((function(e){return c[t].push(e.id())}))):f[t]=[e.source().id(),e.target().id()]}));var d={found:!1,trail:void 0};if(l)return d;if(r&&n)if(s){if(i&&r!=i)return d;i=r}else{if(i&&r!=i&&n!=i)return d;i||(i=r)}else i||(i=u[0].id());var h=function(e){for(var t,n,r,i=e,o=[e];c[i].length;)t=c[i].shift(),n=f[t][0],i!=(r=f[t][1])?(c[r]=c[r].filter((function(e){return e!=t})),i=r):s||i==n||(c[n]=c[n].filter((function(e){return e!=t})),i=n),o.unshift(t),o.unshift(i);return o},p=[],v=[];for(v=h(i);1!=v.length;)0==c[v[0]].length?(p.unshift(u.getElementById(v.shift())),p.unshift(u.getElementById(v.shift()))):v=h(v.shift()).concat(v);for(var g in p.unshift(u.getElementById(v.shift())),c)if(c[g].length)return d;return d.found=!0,d.trail=this.spawn(p),d}},{hopcroftTarjanBiconnected:Dn,htbc:Dn,htb:Dn,hopcroftTarjanBiconnectedComponents:Dn},{tarjanStronglyConnected:Mn,tsc:Mn,tscc:Mn,tarjanStronglyConnectedComponents:Mn}].forEach((function(e){R(On,e)}));
  /*!
  Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable
  Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com)
  Licensed under The MIT License (http://opensource.org/licenses/MIT)
  */
  var In=function e(t){if(!(this instanceof e))return new e(t);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof t&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};In.prototype={fulfill:function(e){return Nn(this,1,"fulfillValue",e)},reject:function(e){return Nn(this,2,"rejectReason",e)},then:function(e,t){var n=new In;return this.onFulfilled.push(jn(e,n,"fulfill")),this.onRejected.push(jn(t,n,"reject")),An(this),n.proxy}};var Nn=function(e,t,n,r){return 0===e.state&&(e.state=t,e[n]=r,An(e)),e},An=function(e){1===e.state?Ln(e,"onFulfilled",e.fulfillValue):2===e.state&&Ln(e,"onRejected",e.rejectReason)},Ln=function(e,n,r){if(0!==e[n].length){var i=e[n];e[n]=[];var o=function(){for(var e=0;e<i.length;e++)i[e](r)};"function"==typeof t?t(o):setTimeout(o,0)}},jn=function(e,t,n){return function(r){if("function"!=typeof e)t[n].call(t,r);else{var i;try{i=e(r)}catch(e){return void t.reject(e)}Bn(t,i)}}},Bn=function e(t,n){if(t!==n&&t.proxy!==n){var r;if("object"===a(n)&&null!==n||"function"==typeof n)try{r=n.then}catch(e){return void t.reject(e)}if("function"!=typeof r)t.fulfill(n);else{var i=!1;try{r.call(n,(function(r){i||(i=!0,r===n?t.reject(new TypeError("circular thenable chain")):e(t,r))}),(function(e){i||(i=!0,t.reject(e))}))}catch(e){i||t.reject(e)}}}else t.reject(new TypeError("cannot resolve promise with itself"))};In.all=function(e){return new In((function(t,n){for(var r=new Array(e.length),i=0,o=function(n,o){r[n]=o,++i===e.length&&t(r)},a=0;a<e.length;a++)!function(t){var r=e[t];null!=r&&null!=r.then?r.then((function(e){o(t,e)}),(function(e){n(e)})):o(t,r)}(a)}))},In.resolve=function(e){return new In((function(t,n){t(e)}))},In.reject=function(e){return new In((function(t,n){n(e)}))};var Fn="undefined"!=typeof Promise?Promise:In,Rn=function(e,t,n){var r=P(e),i=!r,o=this._private=R({duration:1e3},t,n);if(o.target=e,o.style=o.style||o.css,o.started=!1,o.playing=!1,o.hooked=!1,o.applying=!1,o.progress=0,o.completes=[],o.frames=[],o.complete&&x(o.complete)&&o.completes.push(o.complete),i){var a=e.position();o.startPosition=o.startPosition||{x:a.x,y:a.y},o.startStyle=o.startStyle||e.cy().style().getAnimationStartStyle(e,o.style)}if(r){var s=e.pan();o.startPan={x:s.x,y:s.y},o.startZoom=e.zoom()}this.length=1,this[0]=this},zn=Rn.prototype;R(zn,{instanceString:function(){return"animation"},hook:function(){var e=this._private;if(!e.hooked){var t=e.target._private.animation;(e.queue?t.queue:t.current).push(this),_(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0}return this},play:function(){var e=this._private;return 1===e.progress&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var e=this._private;return e.playing=!1,e.started=!1,this},stop:function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(e){var t=this._private;return void 0===e?t.progress*t.duration:this.progress(e/t.duration)},progress:function(e){var t=this._private,n=t.playing;return void 0===e?t.progress:(n&&this.pause(),t.progress=e,t.started=!1,n&&this.play(),this)},completed:function(){return 1===this._private.progress},reverse:function(){var e=this._private,t=e.playing;t&&this.pause(),e.progress=1-e.progress,e.started=!1;var n=function(t,n){var r=e[t];null!=r&&(e[t]=e[n],e[n]=r)};if(n("zoom","startZoom"),n("pan","startPan"),n("position","startPosition"),e.style)for(var r=0;r<e.style.length;r++){var i=e.style[r],o=i.name,a=e.startStyle[o];e.startStyle[o]=i,e.style[r]=a}return t&&this.play(),this},promise:function(e){var t,n=this._private;switch(e){case"frame":t=n.frames;break;default:case"complete":case"completed":t=n.completes}return new Fn((function(e,n){t.push((function(){e()}))}))}}),zn.complete=zn.completed,zn.run=zn.play,zn.running=zn.playing;var Vn={};[{animated:function(){return function(){var e=void 0!==this.length?this:[this];if(!(this._private.cy||this).styleEnabled())return!1;var t=e[0];return t?t._private.animation.current.length>0:void 0}},clearQueue:function(){return function(){var e=void 0!==this.length?this:[this];if(!(this._private.cy||this).styleEnabled())return this;for(var t=0;t<e.length;t++){e[t]._private.animation.queue=[]}return this}},delay:function(){return function(e,t){return(this._private.cy||this).styleEnabled()?this.animate({delay:e,duration:e,complete:t}):this}},delayAnimation:function(){return function(e,t){return(this._private.cy||this).styleEnabled()?this.animation({delay:e,duration:e,complete:t}):this}},animation:function(){return function(e,t){var n=void 0!==this.length,r=n?this:[this],i=this._private.cy||this,o=!n,a=!o;if(!i.styleEnabled())return this;var s=i.style();if(e=R({},e,t),0===Object.keys(e).length)return new Rn(r[0],e);switch(void 0===e.duration&&(e.duration=400),e.duration){case"slow":e.duration=600;break;case"fast":e.duration=200}if(a&&(e.style=s.getPropsList(e.style||e.css),e.css=void 0),a&&null!=e.renderedPosition){var u=e.renderedPosition,l=i.pan(),c=i.zoom();e.position=Ve(u,c,l)}if(o&&null!=e.panBy){var f=e.panBy,d=i.pan();e.pan={x:d.x+f.x,y:d.y+f.y}}var h=e.center||e.centre;if(o&&null!=h){var p=i.getCenterPan(h.eles,e.zoom);null!=p&&(e.pan=p)}if(o&&null!=e.fit){var v=e.fit,g=i.getFitViewport(v.eles||v.boundingBox,v.padding);null!=g&&(e.pan=g.pan,e.zoom=g.zoom)}if(o&&S(e.zoom)){var y=i.getZoomedViewport(e.zoom);null!=y?(y.zoomed&&(e.zoom=y.zoom),y.panned&&(e.pan=y.pan)):e.zoom=null}return new Rn(r[0],e)}},animate:function(){return function(e,t){var n=void 0!==this.length?this:[this];if(!(this._private.cy||this).styleEnabled())return this;t&&(e=R({},e,t));for(var r=0;r<n.length;r++){var i=n[r],o=i.animated()&&(void 0===e.queue||e.queue);i.animation(e,o?{queue:!0}:void 0).play()}return this}},stop:function(){return function(e,t){var n=void 0!==this.length?this:[this],r=this._private.cy||this;if(!r.styleEnabled())return this;for(var i=0;i<n.length;i++){for(var o=n[i]._private,a=o.animation.current,s=0;s<a.length;s++){var u=a[s]._private;t&&(u.duration=0)}e&&(o.animation.queue=[]),t||(o.animation.current=[])}return r.notify("draw"),this}}},{data:function(e){return e=R({},{field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:function(e){},beforeSet:function(e,t){},onSet:function(e){},canSet:function(e){return!0}},e),function(t,n){var r=e,i=void 0!==this.length,o=i?this:[this],a=i?this[0]:this;if(b(t)){var s;if(r.allowGetting&&void 0===n)return a&&(r.beforeGet(a),s=a._private[r.field][t]),s;if(r.allowSetting&&void 0!==n&&!r.immutableKeys[t]){var u=c({},t,n);r.beforeSet(this,u);for(var l=0,f=o.length;l<f;l++){var d=o[l];r.canSet(d)&&(d._private[r.field][t]=n)}r.updateStyle&&this.updateStyle(),r.onSet(this),r.settingTriggersEvent&&this[r.triggerFnName](r.settingEvent)}}else if(r.allowSetting&&S(t)){var h,p,v=t,g=Object.keys(v);r.beforeSet(this,v);for(var y=0;y<g.length;y++){if(p=v[h=g[y]],!r.immutableKeys[h])for(var m=0;m<o.length;m++){var w=o[m];r.canSet(w)&&(w._private[r.field][h]=p)}}r.updateStyle&&this.updateStyle(),r.onSet(this),r.settingTriggersEvent&&this[r.triggerFnName](r.settingEvent)}else if(r.allowBinding&&x(t)){var E=t;this.on(r.bindingEvent,E)}else if(r.allowGetting&&void 0===t){var k;return a&&(r.beforeGet(a),k=a._private[r.field]),k}return this}},removeData:function(e){return e=R({},{field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}},e),function(t){var n=e,r=void 0!==this.length?this:[this];if(b(t)){for(var i=t.split(/\s+/),o=i.length,a=0;a<o;a++){var s=i[a];if(!M(s))if(!n.immutableKeys[s])for(var u=0,l=r.length;u<l;u++)r[u]._private[n.field][s]=void 0}n.triggerEvent&&this[n.triggerFnName](n.event)}else if(void 0===t){for(var c=0,f=r.length;c<f;c++)for(var d=r[c]._private[n.field],h=Object.keys(d),p=0;p<h.length;p++){var v=h[p];!n.immutableKeys[v]&&(d[v]=void 0)}n.triggerEvent&&this[n.triggerFnName](n.event)}return this}}},{eventAliasesOn:function(e){var t=e;t.addListener=t.listen=t.bind=t.on,t.unlisten=t.unbind=t.off=t.removeListener,t.trigger=t.emit,t.pon=t.promiseOn=function(e,t){var n=this,r=Array.prototype.slice.call(arguments,0);return new Fn((function(e,t){var i=r.concat([function(t){n.off.apply(n,o),e(t)}]),o=i.concat([]);n.on.apply(n,i)}))}}}].forEach((function(e){R(Vn,e)}));var qn={animate:Vn.animate(),animation:Vn.animation(),animated:Vn.animated(),clearQueue:Vn.clearQueue(),delay:Vn.delay(),delayAnimation:Vn.delayAnimation(),stop:Vn.stop()},Gn={classes:function(e){if(void 0===e){var t=[];return this[0]._private.classes.forEach((function(e){return t.push(e)})),t}w(e)||(e=(e||"").match(/\S+/g)||[]);for(var n=[],r=new Ee(e),i=0;i<this.length;i++){for(var o=this[i],a=o._private,s=a.classes,u=!1,l=0;l<e.length;l++){var c=e[l];if(!s.has(c)){u=!0;break}}u||(u=s.size!==e.length),u&&(a.classes=r,n.push(o))}return n.length>0&&this.spawn(n).updateStyle().emit("class"),this},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},toggleClass:function(e,t){w(e)||(e=e.match(/\S+/g)||[]);for(var n=void 0===t,r=[],i=0,o=this.length;i<o;i++)for(var a=this[i],s=a._private.classes,u=!1,l=0;l<e.length;l++){var c=e[l],f=s.has(c),d=!1;t||n&&!f?(s.add(c),d=!0):(!t||n&&f)&&(s.delete(c),d=!0),!u&&d&&(r.push(a),u=!0)}return r.length>0&&this.spawn(r).updateStyle().emit("class"),this},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(null==t)t=250;else if(0===t)return n;return n.addClass(e),setTimeout((function(){n.removeClass(e)}),t),n}};Gn.className=Gn.classNames=Gn.classes;var Wn={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:B,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Wn.variable="(?:[\\w-]|(?:\\\\"+Wn.metaChar+"))+",Wn.value=Wn.string+"|"+Wn.number,Wn.className=Wn.variable,Wn.id=Wn.variable,function(){var e,t,n;for(e=Wn.comparatorOp.split("|"),n=0;n<e.length;n++)t=e[n],Wn.comparatorOp+="|@"+t;for(e=Wn.comparatorOp.split("|"),n=0;n<e.length;n++)(t=e[n]).indexOf("!")>=0||"="!==t&&(Wn.comparatorOp+="|\\!"+t)}();var Hn=0,Un=1,Yn=2,Xn=3,Kn=4,$n=5,Zn=6,Qn=7,Jn=8,er=9,tr=10,nr=11,rr=12,ir=13,or=14,ar=15,sr=16,ur=17,lr=18,cr=19,fr=20,dr=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort((function(e,t){return function(e,t){return-1*F(e,t)}(e.selector,t.selector)})),hr=function(){for(var e,t={},n=0;n<dr.length;n++)t[(e=dr[n]).selector]=e.matches;return t}(),pr="("+dr.map((function(e){return e.selector})).join("|")+")",vr=function(e){return e.replace(new RegExp("\\\\("+Wn.metaChar+")","g"),(function(e,t){return t}))},gr=function(e,t,n){e[e.length-1]=n},yr=[{name:"group",query:!0,regex:"("+Wn.group+")",populate:function(e,t,n){var r=f(n,1)[0];t.checks.push({type:Hn,value:"*"===r?r:r+"s"})}},{name:"state",query:!0,regex:pr,populate:function(e,t,n){var r=f(n,1)[0];t.checks.push({type:Qn,value:r})}},{name:"id",query:!0,regex:"\\#("+Wn.id+")",populate:function(e,t,n){var r=f(n,1)[0];t.checks.push({type:Jn,value:vr(r)})}},{name:"className",query:!0,regex:"\\.("+Wn.className+")",populate:function(e,t,n){var r=f(n,1)[0];t.checks.push({type:er,value:vr(r)})}},{name:"dataExists",query:!0,regex:"\\[\\s*("+Wn.variable+")\\s*\\]",populate:function(e,t,n){var r=f(n,1)[0];t.checks.push({type:Kn,field:vr(r)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+Wn.variable+")\\s*("+Wn.comparatorOp+")\\s*("+Wn.value+")\\s*\\]",populate:function(e,t,n){var r=f(n,3),i=r[0],o=r[1],a=r[2];a=null!=new RegExp("^"+Wn.string+"$").exec(a)?a.substring(1,a.length-1):parseFloat(a),t.checks.push({type:Xn,field:vr(i),operator:o,value:a})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+Wn.boolOp+")\\s*("+Wn.variable+")\\s*\\]",populate:function(e,t,n){var r=f(n,2),i=r[0],o=r[1];t.checks.push({type:$n,field:vr(o),operator:i})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+Wn.meta+")\\s*("+Wn.comparatorOp+")\\s*("+Wn.number+")\\s*\\]\\]",populate:function(e,t,n){var r=f(n,3),i=r[0],o=r[1],a=r[2];t.checks.push({type:Zn,field:vr(i),operator:o,value:parseFloat(a)})}},{name:"nextQuery",separator:!0,regex:Wn.separator,populate:function(e,t){var n=e.currentSubject,r=e.edgeCount,i=e.compoundCount,o=e[e.length-1];return null!=n&&(o.subject=n,e.currentSubject=null),o.edgeCount=r,o.compoundCount=i,e.edgeCount=0,e.compoundCount=0,e[e.length++]={checks:[]}}},{name:"directedEdge",separator:!0,regex:Wn.directedEdge,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r=t,i={checks:[]};return n.checks.push({type:nr,source:r,target:i}),gr(e,0,n),e.edgeCount++,i}var o={checks:[]},a=t,s={checks:[]};return o.checks.push({type:rr,source:a,target:s}),gr(e,0,o),e.edgeCount++,s}},{name:"undirectedEdge",separator:!0,regex:Wn.undirectedEdge,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r=t,i={checks:[]};return n.checks.push({type:tr,nodes:[r,i]}),gr(e,0,n),e.edgeCount++,i}var o={checks:[]},a=t,s={checks:[]};return o.checks.push({type:or,node:a,neighbor:s}),gr(e,0,o),s}},{name:"child",separator:!0,regex:Wn.child,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r={checks:[]},i=e[e.length-1];return n.checks.push({type:ar,parent:i,child:r}),gr(e,0,n),e.compoundCount++,r}if(e.currentSubject===t){var o={checks:[]},a=e[e.length-1],s={checks:[]},u={checks:[]},l={checks:[]},c={checks:[]};return o.checks.push({type:cr,left:a,right:s,subject:u}),u.checks=t.checks,t.checks=[{type:fr}],c.checks.push({type:fr}),s.checks.push({type:ur,parent:c,child:l}),gr(e,0,o),e.currentSubject=u,e.compoundCount++,l}var f={checks:[]},d={checks:[]},h=[{type:ur,parent:f,child:d}];return f.checks=t.checks,t.checks=h,e.compoundCount++,d}},{name:"descendant",separator:!0,regex:Wn.descendant,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r={checks:[]},i=e[e.length-1];return n.checks.push({type:sr,ancestor:i,descendant:r}),gr(e,0,n),e.compoundCount++,r}if(e.currentSubject===t){var o={checks:[]},a=e[e.length-1],s={checks:[]},u={checks:[]},l={checks:[]},c={checks:[]};return o.checks.push({type:cr,left:a,right:s,subject:u}),u.checks=t.checks,t.checks=[{type:fr}],c.checks.push({type:fr}),s.checks.push({type:lr,ancestor:c,descendant:l}),gr(e,0,o),e.currentSubject=u,e.compoundCount++,l}var f={checks:[]},d={checks:[]},h=[{type:lr,ancestor:f,descendant:d}];return f.checks=t.checks,t.checks=h,e.compoundCount++,d}},{name:"subject",modifier:!0,regex:Wn.subject,populate:function(e,t){if(null!=e.currentSubject&&e.currentSubject!==t)return fe("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=t;var n=e[e.length-1].checks[0],r=null==n?null:n.type;r===nr?n.type=ir:r===tr&&(n.type=or,n.node=n.nodes[1],n.neighbor=n.nodes[0],n.nodes=null)}}];yr.forEach((function(e){return e.regexObj=new RegExp("^"+e.regex)}));var mr=function(e){for(var t,n,r,i=0;i<yr.length;i++){var o=yr[i],a=o.name,s=e.match(o.regexObj);if(null!=s){n=s,t=o,r=a;var u=s[0];e=e.substring(u.length);break}}return{expr:t,match:n,name:r,remaining:e}},br={parse:function(e){var t=this.inputText=e,n=this[0]={checks:[]};for(this.length=1,t=function(e){var t=e.match(/^\s+/);if(t){var n=t[0];e=e.substring(n.length)}return e}(t);;){var r=mr(t);if(null==r.expr)return fe("The selector `"+e+"`is invalid"),!1;var i=r.match.slice(1),o=r.expr.populate(this,n,i);if(!1===o)return!1;if(null!=o&&(n=o),(t=r.remaining).match(/^\s*$/))break}var a=this[this.length-1];null!=this.currentSubject&&(a.subject=this.currentSubject),a.edgeCount=this.edgeCount,a.compoundCount=this.compoundCount;for(var s=0;s<this.length;s++){var u=this[s];if(u.compoundCount>0&&u.edgeCount>0)return fe("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return fe("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===u.edgeCount&&fe("The selector `"+e+"` is deprecated.  Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons.  Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var e=function(e){return null==e?"":e},t=function(t){return b(t)?'"'+t+'"':e(t)},n=function(e){return" "+e+" "},r=function(r,o){var a=r.type,s=r.value;switch(a){case Hn:var u=e(s);return u.substring(0,u.length-1);case Xn:var l=r.field,c=r.operator;return"["+l+n(e(c))+t(s)+"]";case $n:var f=r.operator,d=r.field;return"["+e(f)+d+"]";case Kn:return"["+r.field+"]";case Zn:var h=r.operator;return"[["+r.field+n(e(h))+t(s)+"]]";case Qn:return s;case Jn:return"#"+s;case er:return"."+s;case ur:case ar:return i(r.parent,o)+n(">")+i(r.child,o);case lr:case sr:return i(r.ancestor,o)+" "+i(r.descendant,o);case cr:var p=i(r.left,o),v=i(r.subject,o),g=i(r.right,o);return p+(p.length>0?" ":"")+v+g;case fr:return""}},i=function(e,t){return e.checks.reduce((function(n,i,o){return n+(t===e&&0===o?"$":"")+r(i,t)}),"")},o="",a=0;a<this.length;a++){var s=this[a];o+=i(s,s.subject),this.length>1&&a<this.length-1&&(o+=", ")}return this.toStringCache=o,o}},xr=function(e,t,n){var r,i,o,a=b(e),s=E(e),u=b(n),l=!1,c=!1,f=!1;switch(t.indexOf("!")>=0&&(t=t.replace("!",""),c=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),l=!0),(a||u||l)&&(i=a||s?""+e:"",o=""+n),l&&(e=i=i.toLowerCase(),n=o=o.toLowerCase()),t){case"*=":r=i.indexOf(o)>=0;break;case"$=":r=i.indexOf(o,i.length-o.length)>=0;break;case"^=":r=0===i.indexOf(o);break;case"=":r=e===n;break;case">":f=!0,r=e>n;break;case">=":f=!0,r=e>=n;break;case"<":f=!0,r=e<n;break;case"<=":f=!0,r=e<=n;break;default:r=!1}return!c||null==e&&f||(r=!r),r},wr=function(e,t){return e.data(t)},Sr=[],Er=function(e,t){return e.checks.every((function(e){return Sr[e.type](e,t)}))};Sr[Hn]=function(e,t){var n=e.value;return"*"===n||n===t.group()},Sr[Qn]=function(e,t){return function(e,t){return hr[e](t)}(e.value,t)},Sr[Jn]=function(e,t){var n=e.value;return t.id()===n},Sr[er]=function(e,t){var n=e.value;return t.hasClass(n)},Sr[Zn]=function(e,t){var n=e.field,r=e.operator,i=e.value;return xr(function(e,t){return e[t]()}(t,n),r,i)},Sr[Xn]=function(e,t){var n=e.field,r=e.operator,i=e.value;return xr(wr(t,n),r,i)},Sr[$n]=function(e,t){var n=e.field,r=e.operator;return function(e,t){switch(t){case"?":return!!e;case"!":return!e;case"^":return void 0===e}}(wr(t,n),r)},Sr[Kn]=function(e,t){var n=e.field;e.operator;return void 0!==wr(t,n)},Sr[tr]=function(e,t){var n=e.nodes[0],r=e.nodes[1],i=t.source(),o=t.target();return Er(n,i)&&Er(r,o)||Er(r,i)&&Er(n,o)},Sr[or]=function(e,t){return Er(e.node,t)&&t.neighborhood().some((function(t){return t.isNode()&&Er(e.neighbor,t)}))},Sr[nr]=function(e,t){return Er(e.source,t.source())&&Er(e.target,t.target())},Sr[rr]=function(e,t){return Er(e.source,t)&&t.outgoers().some((function(t){return t.isNode()&&Er(e.target,t)}))},Sr[ir]=function(e,t){return Er(e.target,t)&&t.incomers().some((function(t){return t.isNode()&&Er(e.source,t)}))},Sr[ar]=function(e,t){return Er(e.child,t)&&Er(e.parent,t.parent())},Sr[ur]=function(e,t){return Er(e.parent,t)&&t.children().some((function(t){return Er(e.child,t)}))},Sr[sr]=function(e,t){return Er(e.descendant,t)&&t.ancestors().some((function(t){return Er(e.ancestor,t)}))},Sr[lr]=function(e,t){return Er(e.ancestor,t)&&t.descendants().some((function(t){return Er(e.descendant,t)}))},Sr[cr]=function(e,t){return Er(e.subject,t)&&Er(e.left,t)&&Er(e.right,t)},Sr[fr]=function(){return!0},Sr[Un]=function(e,t){return e.value.has(t)},Sr[Yn]=function(e,t){return(0,e.value)(t)};var kr=function(e){this.inputText=e,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,null==e||b(e)&&e.match(/^\s*$/)||(_(e)?this.addQuery({checks:[{type:Un,value:e.collection()}]}):x(e)?this.addQuery({checks:[{type:Yn,value:e}]}):b(e)?this.parse(e)||(this.invalid=!0):le("A selector must be created from a string; found "))},_r=kr.prototype;[br,{matches:function(e){for(var t=0;t<this.length;t++){var n=this[t];if(Er(n,e))return!0}return!1},filter:function(e){var t=this;if(1===t.length&&1===t[0].checks.length&&t[0].checks[0].type===Jn)return e.getElementById(t[0].checks[0].value).collection();var n=function(e){for(var n=0;n<t.length;n++){var r=t[n];if(Er(r,e))return!0}return!1};return null==t.text()&&(n=function(){return!0}),e.filter(n)}}].forEach((function(e){return R(_r,e)})),_r.text=function(){return this.inputText},_r.size=function(){return this.length},_r.eq=function(e){return this[e]},_r.sameText=function(e){return!this.invalid&&!e.invalid&&this.text()===e.text()},_r.addQuery=function(e){this[this.length++]=e},_r.selector=_r.toString;var Tr={allAre:function(e){var t=new kr(e);return this.every((function(e){return t.matches(e)}))},is:function(e){var t=new kr(e);return this.some((function(e){return t.matches(e)}))},some:function(e,t){for(var n=0;n<this.length;n++){if(t?e.apply(t,[this[n],n,this]):e(this[n],n,this))return!0}return!1},every:function(e,t){for(var n=0;n<this.length;n++){if(!(t?e.apply(t,[this[n],n,this]):e(this[n],n,this)))return!1}return!0},same:function(e){if(this===e)return!0;e=this.cy().collection(e);var t=this.length;return t===e.length&&(1===t?this[0]===e[0]:this.every((function(t){return e.hasElementWithId(t.id())})))},anySame:function(e){return e=this.cy().collection(e),this.some((function(t){return e.hasElementWithId(t.id())}))},allAreNeighbors:function(e){e=this.cy().collection(e);var t=this.neighborhood();return e.every((function(e){return t.hasElementWithId(e.id())}))},contains:function(e){e=this.cy().collection(e);var t=this;return e.every((function(e){return t.hasElementWithId(e.id())}))}};Tr.allAreNeighbours=Tr.allAreNeighbors,Tr.has=Tr.contains,Tr.equal=Tr.equals=Tr.same;var Cr,Pr,Dr=function(e,t){return function(n,r,i,o){var a,s=n;if(null==s?a="":_(s)&&1===s.length&&(a=s.id()),1===this.length&&a){var u=this[0]._private,l=u.traversalCache=u.traversalCache||{},c=l[t]=l[t]||[],f=Q(a),d=c[f];return d||(c[f]=e.call(this,n,r,i,o))}return e.call(this,n,r,i,o)}},Mr={parent:function(e){var t=[];if(1===this.length){var n=this[0]._private.parent;if(n)return n}for(var r=0;r<this.length;r++){var i=this[r]._private.parent;i&&t.push(i)}return this.spawn(t,{unique:!0}).filter(e)},parents:function(e){for(var t=[],n=this.parent();n.nonempty();){for(var r=0;r<n.length;r++){var i=n[r];t.push(i)}n=n.parent()}return this.spawn(t,{unique:!0}).filter(e)},commonAncestors:function(e){for(var t,n=0;n<this.length;n++){var r=this[n].parents();t=(t=t||r).intersect(r)}return t.filter(e)},orphans:function(e){return this.stdFilter((function(e){return e.isOrphan()})).filter(e)},nonorphans:function(e){return this.stdFilter((function(e){return e.isChild()})).filter(e)},children:Dr((function(e){for(var t=[],n=0;n<this.length;n++)for(var r=this[n]._private.children,i=0;i<r.length;i++)t.push(r[i]);return this.spawn(t,{unique:!0}).filter(e)}),"children"),siblings:function(e){return this.parent().children().not(this).filter(e)},isParent:function(){var e=this[0];if(e)return e.isNode()&&0!==e._private.children.length},isChildless:function(){var e=this[0];if(e)return e.isNode()&&0===e._private.children.length},isChild:function(){var e=this[0];if(e)return e.isNode()&&null!=e._private.parent},isOrphan:function(){var e=this[0];if(e)return e.isNode()&&null==e._private.parent},descendants:function(e){var t=[];return function e(n){for(var r=0;r<n.length;r++){var i=n[r];t.push(i),i.children().nonempty()&&e(i.children())}}(this.children()),this.spawn(t,{unique:!0}).filter(e)}};function Or(e,t,n,r){for(var i=[],o=new Ee,a=e.cy().hasCompoundNodes(),s=0;s<e.length;s++){var u=e[s];n?i.push(u):a&&r(i,o,u)}for(;i.length>0;){var l=i.shift();t(l),o.add(l.id()),a&&r(i,o,l)}return e}function Ir(e,t,n){if(n.isParent())for(var r=n._private.children,i=0;i<r.length;i++){var o=r[i];t.has(o.id())||e.push(o)}}function Nr(e,t,n){if(n.isChild()){var r=n._private.parent;t.has(r.id())||e.push(r)}}function Ar(e,t,n){Nr(e,t,n),Ir(e,t,n)}Mr.forEachDown=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Or(this,e,t,Ir)},Mr.forEachUp=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Or(this,e,t,Nr)},Mr.forEachUpAndDown=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Or(this,e,t,Ar)},Mr.ancestors=Mr.parents,(Cr=Pr={data:Vn.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Vn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Vn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Vn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Vn.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Vn.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}}).attr=Cr.data,Cr.removeAttr=Cr.removeData;var Lr,jr,Br=Pr,Fr={};function Rr(e){return function(t){if(void 0===t&&(t=!0),0!==this.length&&this.isNode()&&!this.removed()){for(var n=0,r=this[0],i=r._private.edges,o=0;o<i.length;o++){var a=i[o];!t&&a.isLoop()||(n+=e(r,a))}return n}}}function zr(e,t){return function(n){for(var r,i=this.nodes(),o=0;o<i.length;o++){var a=i[o][e](n);void 0===a||void 0!==r&&!t(a,r)||(r=a)}return r}}R(Fr,{degree:Rr((function(e,t){return t.source().same(t.target())?2:1})),indegree:Rr((function(e,t){return t.target().same(e)?1:0})),outdegree:Rr((function(e,t){return t.source().same(e)?1:0}))}),R(Fr,{minDegree:zr("degree",(function(e,t){return e<t})),maxDegree:zr("degree",(function(e,t){return e>t})),minIndegree:zr("indegree",(function(e,t){return e<t})),maxIndegree:zr("indegree",(function(e,t){return e>t})),minOutdegree:zr("outdegree",(function(e,t){return e<t})),maxOutdegree:zr("outdegree",(function(e,t){return e>t}))}),R(Fr,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r<n.length;r++)t+=n[r].degree(e);return t}});var Vr=function(e,t,n){for(var r=0;r<e.length;r++){var i=e[r];if(!i.locked()){var o=i._private.position,a={x:null!=t.x?t.x-o.x:0,y:null!=t.y?t.y-o.y:0};!i.isParent()||0===a.x&&0===a.y||i.children().shift(a,n),i.shiftCachedBoundingBox(a)}}},qr={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:function(e){e.updateCompoundBounds()},beforeSet:function(e,t){Vr(e,t,!1)},onSet:function(e){e.dirtyCompoundBoundsCache()},canSet:function(e){return!e.locked()}};(Lr=jr={position:Vn.data(qr),silentPosition:Vn.data(R({},qr,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:function(e,t){Vr(e,t,!0)}})),positions:function(e,t){if(S(e))t?this.silentPosition(e):this.position(e);else if(x(e)){var n=e,r=this.cy();r.startBatch();for(var i=0;i<this.length;i++){var o,a=this[i];(o=n(a,i))&&(t?a.silentPosition(o):a.position(o))}r.endBatch()}return this},silentPositions:function(e){return this.positions(e,!0)},shift:function(e,t,n){var r;if(S(e)?(r={x:E(e.x)?e.x:0,y:E(e.y)?e.y:0},n=t):b(e)&&E(t)&&((r={x:0,y:0})[e]=t),null!=r){var i=this.cy();i.startBatch();for(var o=0;o<this.length;o++){var a=this[o],s=a.position(),u={x:s.x+r.x,y:s.y+r.y};n?a.silentPosition(u):a.position(u)}i.endBatch()}return this},silentShift:function(e,t){return S(e)?this.shift(e,!0):b(e)&&E(t)&&this.shift(e,t,!0),this},renderedPosition:function(e,t){var n=this[0],r=this.cy(),i=r.zoom(),o=r.pan(),a=S(e)?e:void 0,s=void 0!==a||void 0!==t&&b(e);if(n&&n.isNode()){if(!s){var u=n.position();return a=ze(u,i,o),void 0===e?a:a[e]}for(var l=0;l<this.length;l++){var c=this[l];void 0!==t?c.position(e,(t-o[e])/i):void 0!==a&&c.position(Ve(a,i,o))}}else if(!s)return;return this},relativePosition:function(e,t){var n=this[0],r=this.cy(),i=S(e)?e:void 0,o=void 0!==i||void 0!==t&&b(e),a=r.hasCompoundNodes();if(n&&n.isNode()){if(!o){var s=n.position(),u=a?n.parent():null,l=u&&u.length>0,c=l;l&&(u=u[0]);var f=c?u.position():{x:0,y:0};return i={x:s.x-f.x,y:s.y-f.y},void 0===e?i:i[e]}for(var d=0;d<this.length;d++){var h=this[d],p=a?h.parent():null,v=p&&p.length>0,g=v;v&&(p=p[0]);var y=g?p.position():{x:0,y:0};void 0!==t?h.position(e,t+y[e]):void 0!==i&&h.position({x:i.x+y.x,y:i.y+y.y})}}else if(!o)return;return this}}).modelPosition=Lr.point=Lr.position,Lr.modelPositions=Lr.points=Lr.positions,Lr.renderedPoint=Lr.renderedPosition,Lr.relativePoint=Lr.relativePosition;var Gr,Wr,Hr=jr;Gr=Wr={},Wr.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),i=n.pan(),o=t.x1*r+i.x,a=t.x2*r+i.x,s=t.y1*r+i.y,u=t.y2*r+i.y;return{x1:o,x2:a,y1:s,y2:u,w:a-o,h:u-s}},Wr.dirtyCompoundBoundsCache=function(){var e=this.cy();return e.styleEnabled()&&e.hasCompoundNodes()?(this.forEachUp((function(e){if(e.isParent()){var t=e._private;t.compoundBoundsClean=!1,t.bbCache=null,e.emitAndNotify("bounds")}})),this):this},Wr.updateCompoundBounds=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!e&&t.batching())return this;function n(e){if(e.isParent()){var t=e._private,n=e.children(),r="include"===e.pstyle("compound-sizing-wrt-labels").value,i={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},o=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),a=t.position;0!==o.w&&0!==o.h||((o={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=a.x-o.w/2,o.x2=a.x+o.w/2,o.y1=a.y-o.h/2,o.y2=a.y+o.h/2);var s=i.width.left.value;"px"===i.width.left.units&&i.width.val>0&&(s=100*s/i.width.val);var u=i.width.right.value;"px"===i.width.right.units&&i.width.val>0&&(u=100*u/i.width.val);var l=i.height.top.value;"px"===i.height.top.units&&i.height.val>0&&(l=100*l/i.height.val);var c=i.height.bottom.value;"px"===i.height.bottom.units&&i.height.val>0&&(c=100*c/i.height.val);var f=y(i.width.val-o.w,s,u),d=f.biasDiff,h=f.biasComplementDiff,p=y(i.height.val-o.h,l,c),v=p.biasDiff,g=p.biasComplementDiff;t.autoPadding=function(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}(o.w,o.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(o.w,i.width.val),a.x=(-d+o.x1+o.x2+h)/2,t.autoHeight=Math.max(o.h,i.height.val),a.y=(-v+o.y1+o.y2+g)/2}function y(e,t,n){var r=0,i=0,o=t+n;return e>0&&o>0&&(r=t/o*e,i=n/o*e),{biasDiff:r,biasComplementDiff:i}}}for(var r=0;r<this.length;r++){var i=this[r],o=i._private;o.compoundBoundsClean||(n(i),t.batching()||(o.compoundBoundsClean=!0))}return this};var Ur=function(e){return e===1/0||e===-1/0?0:e},Yr=function(e,t,n,r,i){r-t!=0&&i-n!=0&&null!=t&&null!=n&&null!=r&&null!=i&&(e.x1=t<e.x1?t:e.x1,e.x2=r>e.x2?r:e.x2,e.y1=n<e.y1?n:e.y1,e.y2=i>e.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},Xr=function(e,t){return null==t?e:Yr(e,t.x1,t.y1,t.x2,t.y2)},Kr=function(e,t,n){return be(e,t,n)},$r=function(e,t,n){if(!t.cy().headless()){var r,i,o=t._private,a=o.rstyle,s=a.arrowWidth/2;if("none"!==t.pstyle(n+"-arrow-shape").value){"source"===n?(r=a.srcX,i=a.srcY):"target"===n?(r=a.tgtX,i=a.tgtY):(r=a.midX,i=a.midY);var u=o.arrowBounds=o.arrowBounds||{},l=u[n]=u[n]||{};l.x1=r-s,l.y1=i-s,l.x2=r+s,l.y2=i+s,l.w=l.x2-l.x1,l.h=l.y2-l.y1,et(l,1),Yr(e,l.x1,l.y1,l.x2,l.y2)}}},Zr=function(e,t,n){if(!t.cy().headless()){var r;r=n?n+"-":"";var i=t._private,o=i.rstyle;if(t.pstyle(r+"label").strValue){var a,s,u,l,c=t.pstyle("text-halign"),f=t.pstyle("text-valign"),d=Kr(o,"labelWidth",n),h=Kr(o,"labelHeight",n),p=Kr(o,"labelX",n),v=Kr(o,"labelY",n),g=t.pstyle(r+"text-margin-x").pfValue,y=t.pstyle(r+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle(r+"text-rotation"),x=t.pstyle("text-outline-width").pfValue,w=t.pstyle("text-border-width").pfValue/2,S=t.pstyle("text-background-padding").pfValue,E=h,k=d,_=k/2,T=E/2;if(m)a=p-_,s=p+_,u=v-T,l=v+T;else{switch(c.value){case"left":a=p-k,s=p;break;case"center":a=p-_,s=p+_;break;case"right":a=p,s=p+k}switch(f.value){case"top":u=v-E,l=v;break;case"center":u=v-T,l=v+T;break;case"bottom":u=v,l=v+E}}a+=g-Math.max(x,w)-S,s+=g+Math.max(x,w)+S,u+=y-Math.max(x,w)-S,l+=y+Math.max(x,w)+S;var C=n||"main",P=i.labelBounds,D=P[C]=P[C]||{};D.x1=a,D.y1=u,D.x2=s,D.y2=l,D.w=s-a,D.h=l-u,et(D,1);var M=m&&"autorotate"===b.strValue,O=null!=b.pfValue&&0!==b.pfValue;if(M||O){var I=M?Kr(i.rstyle,"labelAngle",n):b.pfValue,N=Math.cos(I),A=Math.sin(I),L=(a+s)/2,j=(u+l)/2;if(!m){switch(c.value){case"left":L=s;break;case"right":L=a}switch(f.value){case"top":j=l;break;case"bottom":j=u}}var B=function(e,t){return{x:(e-=L)*N-(t-=j)*A+L,y:e*A+t*N+j}},F=B(a,u),R=B(a,l),z=B(s,u),V=B(s,l);a=Math.min(F.x,R.x,z.x,V.x),s=Math.max(F.x,R.x,z.x,V.x),u=Math.min(F.y,R.y,z.y,V.y),l=Math.max(F.y,R.y,z.y,V.y)}var q=C+"Rot",G=P[q]=P[q]||{};G.x1=a,G.y1=u,G.x2=s,G.y2=l,G.w=s-a,G.h=l-u,Yr(e,a,u,s,l),Yr(i.labelBounds.all,a,u,s,l)}return e}},Qr=function(e){var t=0,n=function(e){return(e?1:0)<<t++},r=0;return r+=n(e.incudeNodes),r+=n(e.includeEdges),r+=n(e.includeLabels),r+=n(e.includeMainLabels),r+=n(e.includeSourceLabels),r+=n(e.includeTargetLabels),r+=n(e.includeOverlays)},Jr=function(e){if(e.isEdge()){var t=e.source().position(),n=e.target().position(),r=function(e){return Math.round(e)};return Z([r(t.x),r(t.y),r(n.x),r(n.y)])}return 0},ei=function(e,t){var n,r=e._private,i=e.isEdge(),o=(null==t?ni:Qr(t))===ni,a=Jr(e),s=r.bbCachePosKey===a,u=function(e){return null==e._private.bbCache},l=!(t.useCache&&s)||u(e)||i&&u(e.source())||u(e.target());if(l?(s||e.recalculateRenderedStyle(),n=function(e,t){var n,r,i,o,a,s,u,l=e._private.cy,c=l.styleEnabled(),f=l.headless(),d=Qe(),h=e._private,p=e.isNode(),v=e.isEdge(),g=h.rstyle,y=p&&c?e.pstyle("bounds-expansion").pfValue:[0],m=function(e){return"none"!==e.pstyle("display").value},b=!c||m(e)&&(!v||m(e.source())&&m(e.target()));if(b){var x=0;c&&t.includeOverlays&&0!==e.pstyle("overlay-opacity").value&&(x=e.pstyle("overlay-padding").value);var w=0;if(c&&(w=e.pstyle("width").pfValue/2),p&&t.includeNodes){var S=e.position();a=S.x,s=S.y;var E=e.outerWidth()/2,k=e.outerHeight()/2;Yr(d,n=a-E,i=s-k,r=a+E,o=s+k)}else if(v&&t.includeEdges)if(c&&!f){var _=e.pstyle("curve-style").strValue;if(n=Math.min(g.srcX,g.midX,g.tgtX),r=Math.max(g.srcX,g.midX,g.tgtX),i=Math.min(g.srcY,g.midY,g.tgtY),o=Math.max(g.srcY,g.midY,g.tgtY),Yr(d,n-=w,i-=w,r+=w,o+=w),"haystack"===_){var T=g.haystackPts;if(T&&2===T.length){if(n=T[0].x,i=T[0].y,n>(r=T[1].x)){var C=n;n=r,r=C}if(i>(o=T[1].y)){var P=i;i=o,o=P}Yr(d,n-w,i-w,r+w,o+w)}}else if("bezier"===_||"unbundled-bezier"===_||"segments"===_||"taxi"===_){var D;switch(_){case"bezier":case"unbundled-bezier":D=g.bezierPts;break;case"segments":case"taxi":D=g.linePts}if(null!=D)for(var M=0;M<D.length;M++){var O=D[M];n=O.x-w,r=O.x+w,i=O.y-w,o=O.y+w,Yr(d,n,i,r,o)}}}else{var I=e.source().position(),N=e.target().position();if((n=I.x)>(r=N.x)){var A=n;n=r,r=A}if((i=I.y)>(o=N.y)){var L=i;i=o,o=L}Yr(d,n-=w,i-=w,r+=w,o+=w)}if(c&&t.includeEdges&&v&&($r(d,e,"mid-source"),$r(d,e,"mid-target"),$r(d,e,"source"),$r(d,e,"target")),c)if("yes"===e.pstyle("ghost").value){var j=e.pstyle("ghost-offset-x").pfValue,B=e.pstyle("ghost-offset-y").pfValue;Yr(d,d.x1+j,d.y1+B,d.x2+j,d.y2+B)}var F=h.bodyBounds=h.bodyBounds||{};nt(F,d),tt(F,y),et(F,1),c&&(n=d.x1,r=d.x2,i=d.y1,o=d.y2,Yr(d,n-x,i-x,r+x,o+x));var R=h.overlayBounds=h.overlayBounds||{};nt(R,d),tt(R,y),et(R,1);var z=h.labelBounds=h.labelBounds||{};null!=z.all?((u=z.all).x1=1/0,u.y1=1/0,u.x2=-1/0,u.y2=-1/0,u.w=0,u.h=0):z.all=Qe(),c&&t.includeLabels&&(t.includeMainLabels&&Zr(d,e,null),v&&(t.includeSourceLabels&&Zr(d,e,"source"),t.includeTargetLabels&&Zr(d,e,"target")))}return d.x1=Ur(d.x1),d.y1=Ur(d.y1),d.x2=Ur(d.x2),d.y2=Ur(d.y2),d.w=Ur(d.x2-d.x1),d.h=Ur(d.y2-d.y1),d.w>0&&d.h>0&&b&&(tt(d,y),et(d,1)),d}(e,ti),r.bbCache=n,r.bbCacheShift.x=r.bbCacheShift.y=0,r.bbCachePosKey=a):n=r.bbCache,!l&&(0!==r.bbCacheShift.x||0!==r.bbCacheShift.y)){var c=rt,f=r.bbCacheShift,d=function(e,t){null!=e&&c(e,t)};c(n,f);var h=r.bodyBounds,p=r.overlayBounds,v=r.labelBounds,g=r.arrowBounds;d(h,f),d(p,f),null!=g&&(d(g.source,f),d(g.target,f),d(g["mid-source"],f),d(g["mid-target"],f)),null!=v&&(d(v.main,f),d(v.all,f),d(v.source,f),d(v.target,f))}if(r.bbCacheShift.x=r.bbCacheShift.y=0,!o){var y=e.isNode();n=Qe(),(t.includeNodes&&y||t.includeEdges&&!y)&&(t.includeOverlays?Xr(n,r.overlayBounds):Xr(n,r.bodyBounds)),t.includeLabels&&(t.includeMainLabels&&(!i||t.includeSourceLabels&&t.includeTargetLabels)?Xr(n,r.labelBounds.all):(t.includeMainLabels&&Xr(n,r.labelBounds.mainRot),t.includeSourceLabels&&Xr(n,r.labelBounds.sourceRot),t.includeTargetLabels&&Xr(n,r.labelBounds.targetRot))),n.w=n.x2-n.x1,n.h=n.y2-n.y1}return n},ti={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,useCache:!0},ni=Qr(ti),ri=ge(ti);Wr.boundingBox=function(e){var t;if(1!==this.length||null==this[0]._private.bbCache||void 0!==e&&void 0!==e.useCache&&!0!==e.useCache){t=Qe();var n=ri(e=e||ti);if(this.cy().styleEnabled())for(var r=0;r<this.length;r++){var i=this[r],o=i._private,a=Jr(i),s=o.bbCachePosKey===a,u=n.useCache&&s;i.recalculateRenderedStyle(u)}this.updateCompoundBounds();for(var l=0;l<this.length;l++){var c=this[l];Xr(t,ei(c,n))}}else e=void 0===e?ti:ri(e),t=ei(this[0],e);return t.x1=Ur(t.x1),t.y1=Ur(t.y1),t.x2=Ur(t.x2),t.y2=Ur(t.y2),t.w=Ur(t.x2-t.x1),t.h=Ur(t.y2-t.y1),t},Wr.dirtyBoundingBoxCache=function(){for(var e=0;e<this.length;e++){var t=this[e]._private;t.bbCache=null,t.bbCacheShift.x=t.bbCacheShift.y=0,t.bbCachePosKey=null,t.bodyBounds=null,t.overlayBounds=null,t.labelBounds.all=null,t.labelBounds.source=null,t.labelBounds.target=null,t.labelBounds.main=null,t.labelBounds.sourceRot=null,t.labelBounds.targetRot=null,t.labelBounds.mainRot=null,t.arrowBounds.source=null,t.arrowBounds.target=null,t.arrowBounds["mid-source"]=null,t.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this},Wr.shiftCachedBoundingBox=function(e){for(var t=0;t<this.length;t++){var n=this[t]._private;null!=n.bbCache&&(n.bbCacheShift.x+=e.x,n.bbCacheShift.y+=e.y)}return this.emitAndNotify("bounds"),this},Wr.boundingBoxAt=function(e){var t=this.nodes(),n=this.cy(),r=n.hasCompoundNodes();if(r&&(t=t.filter((function(e){return!e.isParent()}))),S(e)){var i=e;e=function(){return i}}n.startBatch(),t.forEach((function(t,n){return t._private.bbAtOldPos=e(t,n)})).silentPositions(e),r&&this.updateCompoundBounds(!0);var o=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}}(this.boundingBox({useCache:!1}));return t.silentPositions((function(e){return e._private.bbAtOldPos})),n.endBatch(),o},Gr.boundingbox=Gr.bb=Gr.boundingBox,Gr.renderedBoundingbox=Gr.renderedBoundingBox;var ii,oi,ai=Wr;ii=oi={};var si=function(e){e.uppercaseName=j(e.name),e.autoName="auto"+e.uppercaseName,e.labelName="label"+e.uppercaseName,e.outerName="outer"+e.uppercaseName,e.uppercaseOuterName=j(e.outerName),ii[e.name]=function(){var t=this[0],n=t._private,r=n.cy._private.styleEnabled;if(t){if(!r)return 1;if(t.isParent())return t.updateCompoundBounds(),n[e.autoName]||0;var i=t.pstyle(e.name);switch(i.strValue){case"label":return t.recalculateRenderedStyle(),n.rstyle[e.labelName]||0;default:return i.pfValue}}},ii["outer"+e.uppercaseName]=function(){var t=this[0],n=t._private.cy._private.styleEnabled;if(t)return n?t[e.name]()+t.pstyle("border-width").pfValue+2*t.padding():1},ii["rendered"+e.uppercaseName]=function(){var t=this[0];if(t)return t[e.name]()*this.cy().zoom()},ii["rendered"+e.uppercaseOuterName]=function(){var t=this[0];if(t)return t[e.outerName]()*this.cy().zoom()}};si({name:"width"}),si({name:"height"}),oi.padding=function(){var e=this[0],t=e._private;return e.isParent()?(e.updateCompoundBounds(),void 0!==t.autoPadding?t.autoPadding:e.pstyle("padding").pfValue):e.pstyle("padding").pfValue},oi.paddedHeight=function(){var e=this[0];return e.height()+2*e.padding()},oi.paddedWidth=function(){var e=this[0];return e.width()+2*e.padding()};var ui=oi,li={controlPoints:{get:function(e){return e.renderer().getControlPoints(e)},mult:!0},segmentPoints:{get:function(e){return e.renderer().getSegmentPoints(e)},mult:!0},sourceEndpoint:{get:function(e){return e.renderer().getSourceEndpoint(e)}},targetEndpoint:{get:function(e){return e.renderer().getTargetEndpoint(e)}},midpoint:{get:function(e){return e.renderer().getEdgeMidpoint(e)}}},ci=Object.keys(li).reduce((function(e,t){var n=li[t],r=function(e){return"rendered"+e[0].toUpperCase()+e.substr(1)}(t);return e[t]=function(){return function(e,t){if(e.isEdge())return t(e)}(this,n.get)},n.mult?e[r]=function(){return function(e,t){if(e.isEdge()){var n=e.cy(),r=n.pan(),i=n.zoom();return t(e).map((function(e){return ze(e,i,r)}))}}(this,n.get)}:e[r]=function(){return function(e,t){if(e.isEdge()){var n=e.cy();return ze(t(e),n.zoom(),n.pan())}}(this,n.get)},e}),{}),fi=R({},Hr,ai,ui,ci),di=function(e,t){this.recycle(e,t)};function hi(){return!1}function pi(){return!0}di.prototype={instanceString:function(){return"event"},recycle:function(e,t){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=hi,null!=e&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?pi:hi):null!=e&&e.type?t=e:this.type=e,null!=t&&(this.originalEvent=t.originalEvent,this.type=null!=t.type?t.type:this.type,this.cy=t.cy,this.target=t.target,this.position=t.position,this.renderedPosition=t.renderedPosition,this.namespace=t.namespace,this.layout=t.layout),null!=this.cy&&null!=this.position&&null==this.renderedPosition){var n=this.position,r=this.cy.zoom(),i=this.cy.pan();this.renderedPosition={x:n.x*r+i.x,y:n.y*r+i.y}}this.timeStamp=e&&e.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=pi;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=pi;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=pi,this.stopPropagation()},isDefaultPrevented:hi,isPropagationStopped:hi,isImmediatePropagationStopped:hi};var vi=/^([^.]+)(\.(?:[^.]+))?$/,gi={qualifierCompare:function(e,t){return e===t},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(e){return e},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},yi=Object.keys(gi),mi={};function bi(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:mi,t=arguments.length>1?arguments[1]:void 0,n=0;n<yi.length;n++){var r=yi[n];this[r]=e[r]||gi[r]}this.context=t||this.context,this.listeners=[],this.emitting=0}var xi=bi.prototype,wi=function(e,t,n,r,i,o,a){x(r)&&(i=r,r=null),a&&(o=null==o?a:R({},o,a));for(var s=w(n)?n:n.split(/\s+/),u=0;u<s.length;u++){var l=s[u];if(!M(l)){var c=l.match(vi);if(c)if(!1===t(e,l,c[1],c[2]?c[2]:null,r,i,o))break}}},Si=function(e,t){return e.addEventFields(e.context,t),new di(t.type,t)},Ei=function(e,t,n){if("event"!==m(n))if(S(n))t(e,Si(e,n));else for(var r=w(n)?n:n.split(/\s+/),i=0;i<r.length;i++){var o=r[i];if(!M(o)){var a=o.match(vi);if(a){var s=a[1],u=a[2]?a[2]:null;t(e,Si(e,{type:s,namespace:u,target:e.context}))}}}else t(e,n)};xi.on=xi.addListener=function(e,t,n,r,i){return wi(this,(function(e,t,n,r,i,o,a){x(o)&&e.listeners.push({event:t,callback:o,type:n,namespace:r,qualifier:i,conf:a})}),e,t,n,r,i),this},xi.one=function(e,t,n,r){return this.on(e,t,n,r,{one:!0})},xi.removeListener=xi.off=function(e,t,n,r){var i=this;0!==this.emitting&&(this.listeners=this.listeners.slice());for(var o=this.listeners,a=function(a){var s=o[a];wi(i,(function(t,n,r,i,u,l){if((s.type===r||"*"===e)&&(!i&&".*"!==s.namespace||s.namespace===i)&&(!u||t.qualifierCompare(s.qualifier,u))&&(!l||s.callback===l))return o.splice(a,1),!1}),e,t,n,r)},s=o.length-1;s>=0;s--)a(s);return this},xi.removeAllListeners=function(){return this.removeListener("*")},xi.emit=xi.trigger=function(e,t,n){var r=this.listeners,i=r.length;return this.emitting++,w(t)||(t=[t]),Ei(this,(function(e,o){null!=n&&(r=[{event:o.event,type:o.type,namespace:o.namespace,callback:n}],i=r.length);for(var a=function(n){var i=r[n];if(i.type===o.type&&(!i.namespace||i.namespace===o.namespace||".*"===i.namespace)&&e.eventMatches(e.context,i,o)){var a=[o];null!=t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];e.push(r)}}(a,t),e.beforeEmit(e.context,i,o),i.conf&&i.conf.one&&(e.listeners=e.listeners.filter((function(e){return e!==i})));var s=e.callbackContext(e.context,i,o),u=i.callback.apply(s,a);e.afterEmit(e.context,i,o),!1===u&&(o.stopPropagation(),o.preventDefault())}},s=0;s<i;s++)a(s);e.bubble(e.context)&&!o.isPropagationStopped()&&e.parent(e.context).emit(o,t)}),e),this.emitting--,this};var ki={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&T(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e.cy(),t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e},beforeEmit:function(e,t){t.conf&&t.conf.once&&t.conf.onceCollection.removeListener(t.event,t.qualifier,t.callback)},bubble:function(){return!0},parent:function(e){return e.isChild()?e.parent():e.cy()}},_i=function(e){return b(e)?new kr(e):e},Ti={createEmitter:function(){for(var e=0;e<this.length;e++){var t=this[e],n=t._private;n.emitter||(n.emitter=new bi(ki,t))}return this},emitter:function(){return this._private.emitter},on:function(e,t,n){for(var r=_i(t),i=0;i<this.length;i++){this[i].emitter().on(e,r,n)}return this},removeListener:function(e,t,n){for(var r=_i(t),i=0;i<this.length;i++){this[i].emitter().removeListener(e,r,n)}return this},removeAllListeners:function(){for(var e=0;e<this.length;e++){this[e].emitter().removeAllListeners()}return this},one:function(e,t,n){for(var r=_i(t),i=0;i<this.length;i++){this[i].emitter().one(e,r,n)}return this},once:function(e,t,n){for(var r=_i(t),i=0;i<this.length;i++){this[i].emitter().on(e,r,n,{once:!0,onceCollection:this})}},emit:function(e,t){for(var n=0;n<this.length;n++){this[n].emitter().emit(e,t)}return this},emitAndNotify:function(e,t){if(0!==this.length)return this.cy().notify(e,this),this.emit(e,t),this}};Vn.eventAliasesOn(Ti);var Ci={nodes:function(e){return this.filter((function(e){return e.isNode()})).filter(e)},edges:function(e){return this.filter((function(e){return e.isEdge()})).filter(e)},byGroup:function(){for(var e=this.spawn(),t=this.spawn(),n=0;n<this.length;n++){var r=this[n];r.isNode()?e.merge(r):t.merge(r)}return{nodes:e,edges:t}},filter:function(e,t){if(void 0===e)return this;if(b(e)||_(e))return new kr(e).filter(this);if(x(e)){for(var n=this.spawn(),r=0;r<this.length;r++){var i=this[r];(t?e.apply(t,[i,r,this]):e(i,r,this))&&n.merge(i)}return n}return this.spawn()},not:function(e){if(e){b(e)&&(e=this.filter(e));for(var t=[],n=e._private.map,r=0;r<this.length;r++){var i=this[r];n.has(i.id())||t.push(i)}return this.spawn(t)}return this},absoluteComplement:function(){return this.cy().mutableElements().not(this)},intersect:function(e){if(b(e)){var t=e;return this.filter(t)}for(var n=[],r=e,i=this.length<e.length,o=i?r._private.map:this._private.map,a=i?this:r,s=0;s<a.length;s++){var u=a[s]._private.data.id,l=o.get(u);l&&n.push(l.ele)}return this.spawn(n)},xor:function(e){var t=this._private.cy;b(e)&&(e=t.$(e));var n=[],r=e,i=function(e,t){for(var r=0;r<e.length;r++){var i=e[r],o=i._private.data.id;t.hasElementWithId(o)||n.push(i)}};return i(this,r),i(r,this),this.spawn(n)},diff:function(e){var t=this._private.cy;b(e)&&(e=t.$(e));var n=[],r=[],i=[],o=e,a=function(e,t,n){for(var r=0;r<e.length;r++){var o=e[r],a=o._private.data.id;t.hasElementWithId(a)?i.push(o):n.push(o)}};return a(this,o,n),a(o,this,r),{left:this.spawn(n,{unique:!0}),right:this.spawn(r,{unique:!0}),both:this.spawn(i,{unique:!0})}},add:function(e){var t=this._private.cy;if(!e)return this;if(b(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=[],i=0;i<this.length;i++)r.push(this[i]);for(var o=this._private.map,a=0;a<e.length;a++){var s=!o.has(e[a].id());s&&r.push(e[a])}return this.spawn(r)},merge:function(e){var t=this._private,n=t.cy;if(!e)return this;if(e&&b(e)){var r=e;e=n.mutableElements().filter(r)}for(var i=t.map,o=0;o<e.length;o++){var a=e[o],s=a._private.data.id;if(!i.has(s)){var u=this.length++;this[u]=a,i.set(s,{ele:a,index:u})}else{var l=i.get(s).index;this[l]=a,i.set(s,{ele:a,index:l})}}return this},unmergeAt:function(e){var t=this[e].id(),n=this._private.map;this[e]=void 0,n.delete(t);var r=e===this.length-1;if(this.length>1&&!r){var i=this.length-1,o=this[i],a=o._private.data.id;this[i]=void 0,this[e]=o,n.set(a,{ele:o,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var i=r.index;return this.unmergeAt(i),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&b(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r<e.length;r++)this.unmergeOne(e[r]);return this},unmergeBy:function(e){for(var t=this.length-1;t>=0;t--){e(this[t])&&this.unmergeAt(t)}return this},map:function(e,t){for(var n=[],r=0;r<this.length;r++){var i=this[r],o=t?e.apply(t,[i,r,this]):e(i,r,this);n.push(o)}return n},reduce:function(e,t){for(var n=t,r=0;r<this.length;r++)n=e(n,this[r],r,this);return n},max:function(e,t){for(var n,r=-1/0,i=0;i<this.length;i++){var o=this[i],a=t?e.apply(t,[o,i,this]):e(o,i,this);a>r&&(r=a,n=o)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,i=0;i<this.length;i++){var o=this[i],a=t?e.apply(t,[o,i,this]):e(o,i,this);a<r&&(r=a,n=o)}return{value:r,ele:n}}},Pi=Ci;Pi.u=Pi["|"]=Pi["+"]=Pi.union=Pi.or=Pi.add,Pi["\\"]=Pi["!"]=Pi["-"]=Pi.difference=Pi.relativeComplement=Pi.subtract=Pi.not,Pi.n=Pi["&"]=Pi["."]=Pi.and=Pi.intersection=Pi.intersect,Pi["^"]=Pi["(+)"]=Pi["(-)"]=Pi.symmetricDifference=Pi.symdiff=Pi.xor,Pi.fnFilter=Pi.filterFn=Pi.stdFilter=Pi.filter,Pi.complement=Pi.abscomp=Pi.absoluteComplement;var Di=function(e,t){var n=e.cy().hasCompoundNodes();function r(e){var t=e.pstyle("z-compound-depth");return"auto"===t.value?n?e.zDepth():0:"bottom"===t.value?-1:"top"===t.value?ie:0}var i=r(e)-r(t);if(0!==i)return i;function o(e){return"auto"===e.pstyle("z-index-compare").value&&e.isNode()?1:0}var a=o(e)-o(t);if(0!==a)return a;var s=e.pstyle("z-index").value-t.pstyle("z-index").value;return 0!==s?s:e.poolIndex()-t.poolIndex()},Mi={forEach:function(e,t){if(x(e))for(var n=this.length,r=0;r<n;r++){var i=this[r];if(!1===(t?e.apply(t,[i,r,this]):e(i,r,this)))break}return this},toArray:function(){for(var e=[],t=0;t<this.length;t++)e.push(this[t]);return e},slice:function(e,t){var n=[],r=this.length;null==t&&(t=r),null==e&&(e=0),e<0&&(e=r+e),t<0&&(t=r+t);for(var i=e;i>=0&&i<t&&i<r;i++)n.push(this[i]);return this.spawn(n)},size:function(){return this.length},eq:function(e){return this[e]||this.spawn()},first:function(){return this[0]||this.spawn()},last:function(){return this[this.length-1]||this.spawn()},empty:function(){return 0===this.length},nonempty:function(){return!this.empty()},sort:function(e){if(!x(e))return this;var t=this.toArray().sort(e);return this.spawn(t)},sortByZIndex:function(){return this.sort(Di)},zDepth:function(){var e=this[0];if(e){var t=e._private;if("nodes"===t.group){var n=t.data.parent?e.parents().size():0;return e.isParent()?n:ie-1}var r=t.source,i=t.target,o=r.zDepth(),a=i.zDepth();return Math.max(o,a,0)}}};Mi.each=Mi.forEach;"undefined"!=("undefined"==typeof Symbol?"undefined":a(Symbol))&&"undefined"!=a(Symbol.iterator)&&(Mi[Symbol.iterator]=function(){var e=this,t={value:void 0,done:!1},n=0,r=this.length;return c({next:function(){return n<r?t.value=e[n++]:(t.value=void 0,t.done=!0),t}},Symbol.iterator,(function(){return this}))});var Oi=ge({nodeDimensionsIncludeLabels:!1}),Ii={layoutDimensions:function(e){var t;if(e=Oi(e),this.takesUpSpace())if(e.nodeDimensionsIncludeLabels){var n=this.boundingBox();t={w:n.w,h:n.h}}else t={w:this.outerWidth(),h:this.outerHeight()};else t={w:0,h:0};return 0!==t.w&&0!==t.h||(t.w=t.h=1),t},layoutPositions:function(e,t,n){var r=this.nodes(),i=this.cy(),o=t.eles,a=function(e){return e.id()},s=I(n,a);e.emit({type:"layoutstart",layout:e}),e.animations=[];var u=t.spacingFactor&&1!==t.spacingFactor,l=function(){if(!u)return null;for(var e=Qe(),t=0;t<r.length;t++){var n=r[t],i=s(n,t);Je(e,i.x,i.y)}return e}(),c=I((function(e,n){var r=s(e,n);u&&(r=function(e,t,n){var r=t.x1+t.w/2,i=t.y1+t.h/2;return{x:r+(n.x-r)*e,y:i+(n.y-i)*e}}(Math.abs(t.spacingFactor),l,r));return null!=t.transform&&(r=t.transform(e,r)),r}),a);if(t.animate){for(var f=0;f<r.length;f++){var d=r[f],h=c(d,f);if(null==t.animateFilter||t.animateFilter(d,f)){var p=d.animation({position:h,duration:t.animationDuration,easing:t.animationEasing});e.animations.push(p)}else d.position(h)}if(t.fit){var v=i.animation({fit:{boundingBox:o.boundingBoxAt(c),padding:t.padding},duration:t.animationDuration,easing:t.animationEasing});e.animations.push(v)}else if(void 0!==t.zoom&&void 0!==t.pan){var g=i.animation({zoom:t.zoom,pan:t.pan,duration:t.animationDuration,easing:t.animationEasing});e.animations.push(g)}e.animations.forEach((function(e){return e.play()})),e.one("layoutready",t.ready),e.emit({type:"layoutready",layout:e}),Fn.all(e.animations.map((function(e){return e.promise()}))).then((function(){e.one("layoutstop",t.stop),e.emit({type:"layoutstop",layout:e})}))}else r.positions(c),t.fit&&i.fit(t.eles,t.padding),null!=t.zoom&&i.zoom(t.zoom),t.pan&&i.pan(t.pan),e.one("layoutready",t.ready),e.emit({type:"layoutready",layout:e}),e.one("layoutstop",t.stop),e.emit({type:"layoutstop",layout:e});return this},layout:function(e){return this.cy().makeLayout(R({},e,{eles:this}))}};function Ni(e,t,n){var r,i=n._private,o=i.styleCache=i.styleCache||[];return null!=(r=o[e])?r:r=o[e]=t(n)}function Ai(e,t){return e=Q(e),function(n){return Ni(e,t,n)}}function Li(e,t){e=Q(e);var n=function(e){return t.call(e)};return function(){var t=this[0];if(t)return Ni(e,n,t)}}Ii.createLayout=Ii.makeLayout=Ii.layout;var ji={recalculateRenderedStyle:function(e){var t=this.cy(),n=t.renderer(),r=t.styleEnabled();return n&&r&&n.recalculateRenderedStyle(this,e),this},dirtyStyleCache:function(){var e,t=this.cy(),n=function(e){return e._private.styleCache=null};t.hasCompoundNodes()?((e=this.spawnSelf().merge(this.descendants()).merge(this.parents())).merge(e.connectedEdges()),e.forEach(n)):this.forEach((function(e){n(e),e.connectedEdges().forEach(n)}));return this},updateStyle:function(e){var t=this._private.cy;if(!t.styleEnabled())return this;if(t.batching())return t._private.batchStyleEles.merge(this),this;var n=t.hasCompoundNodes(),r=t.style(),i=this;e=!(!e&&void 0!==e),n&&(i=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var o=r.apply(i);return e?o.emitAndNotify("style"):o.emit("style"),this},parsedStyle:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){var i=n._private.style[e];return null!=i?i:t?r.style().getDefaultProperty(e):null}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled())return t?t.pstyle(e).units:void 0},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];return n?t.style().getRenderedStyle(n,e):void 0},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=n.style();if(S(e)){var i=e;r.applyBypass(this,i,!1),this.emitAndNotify("style")}else if(b(e)){if(void 0===t){var o=this[0];return o?r.getStylePropertyValue(o,e):void 0}r.applyBypass(this,e,t,!1),this.emitAndNotify("style")}else if(void 0===e){var a=this[0];return a?r.getRawStyle(a):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=t.style();if(void 0===e)for(var r=0;r<this.length;r++){var i=this[r];n.removeAllBypasses(i,!1)}else{e=e.split(/\s+/);for(var o=0;o<this.length;o++){var a=this[o];n.removeBypasses(a,e,!1)}}return this.emitAndNotify("style"),this},show:function(){return this.css("display","element"),this},hide:function(){return this.css("display","none"),this},effectiveOpacity:function(){var e=this.cy();if(!e.styleEnabled())return 1;var t=e.hasCompoundNodes(),n=this[0];if(n){var r=n._private,i=n.pstyle("opacity").value;if(!t)return i;var o=r.data.parent?n.parents():null;if(o)for(var a=0;a<o.length;a++){i*=o[a].pstyle("opacity").value}return i}},transparent:function(){if(!this.cy().styleEnabled())return!1;var e=this[0],t=e.cy().hasCompoundNodes();return e?t?0===e.effectiveOpacity():0===e.pstyle("opacity").value:void 0},backgrounding:function(){return!!this.cy().styleEnabled()&&!!this[0]._private.backgrounding}};function Bi(e,t){var n=e._private.data.parent?e.parents():null;if(n)for(var r=0;r<n.length;r++){if(!t(n[r]))return!1}return!0}function Fi(e){var t=e.ok,n=e.edgeOkViaNode||e.ok,r=e.parentOk||e.ok;return function(){var e=this.cy();if(!e.styleEnabled())return!0;var i=this[0],o=e.hasCompoundNodes();if(i){var a=i._private;if(!t(i))return!1;if(i.isNode())return!o||Bi(i,r);var s=a.source,u=a.target;return n(s)&&(!o||Bi(s,n))&&(s===u||n(u)&&(!o||Bi(u,n)))}}}var Ri=Ai("eleTakesUpSpace",(function(e){return"element"===e.pstyle("display").value&&0!==e.width()&&(!e.isNode()||0!==e.height())}));ji.takesUpSpace=Li("takesUpSpace",Fi({ok:Ri}));var zi=Ai("eleInteractive",(function(e){return"yes"===e.pstyle("events").value&&"visible"===e.pstyle("visibility").value&&Ri(e)})),Vi=Ai("parentInteractive",(function(e){return"visible"===e.pstyle("visibility").value&&Ri(e)}));ji.interactive=Li("interactive",Fi({ok:zi,parentOk:Vi,edgeOkViaNode:Ri})),ji.noninteractive=function(){var e=this[0];if(e)return!e.interactive()};var qi=Ai("eleVisible",(function(e){return"visible"===e.pstyle("visibility").value&&0!==e.pstyle("opacity").pfValue&&Ri(e)})),Gi=Ri;ji.visible=Li("visible",Fi({ok:qi,edgeOkViaNode:Gi})),ji.hidden=function(){var e=this[0];if(e)return!e.visible()},ji.isBundledBezier=Li("isBundledBezier",(function(){return!!this.cy().styleEnabled()&&(!this.removed()&&"bezier"===this.pstyle("curve-style").value&&this.takesUpSpace())})),ji.bypass=ji.css=ji.style,ji.renderedCss=ji.renderedStyle,ji.removeBypass=ji.removeCss=ji.removeStyle,ji.pstyle=ji.parsedStyle;var Wi={};function Hi(e){return function(){var t=arguments,n=[];if(2===t.length){var r=t[0],i=t[1];this.on(e.event,r,i)}else if(1===t.length&&x(t[0])){var o=t[0];this.on(e.event,o)}else if(0===t.length||1===t.length&&w(t[0])){for(var a=1===t.length?t[0]:null,s=0;s<this.length;s++){var u=this[s],l=!e.ableField||u._private[e.ableField],c=u._private[e.field]!=e.value;if(e.overrideAble){var f=e.overrideAble(u);if(void 0!==f&&(l=f,!f))return this}l&&(u._private[e.field]=e.value,c&&n.push(u))}var d=this.spawn(n);d.updateStyle(),d.emit(e.event),a&&d.emit(a)}return this}}function Ui(e){Wi[e.field]=function(){var t=this[0];if(t){if(e.overrideField){var n=e.overrideField(t);if(void 0!==n)return n}return t._private[e.field]}},Wi[e.on]=Hi({event:e.on,field:e.field,ableField:e.ableField,overrideAble:e.overrideAble,value:!0}),Wi[e.off]=Hi({event:e.off,field:e.field,ableField:e.ableField,overrideAble:e.overrideAble,value:!1})}Ui({field:"locked",overrideField:function(e){return!!e.cy().autolock()||void 0},on:"lock",off:"unlock"}),Ui({field:"grabbable",overrideField:function(e){return!e.cy().autoungrabify()&&!e.pannable()&&void 0},on:"grabify",off:"ungrabify"}),Ui({field:"selected",ableField:"selectable",overrideAble:function(e){return!e.cy().autounselectify()&&void 0},on:"select",off:"unselect"}),Ui({field:"selectable",overrideField:function(e){return!e.cy().autounselectify()&&void 0},on:"selectify",off:"unselectify"}),Wi.deselect=Wi.unselect,Wi.grabbed=function(){var e=this[0];if(e)return e._private.grabbed},Ui({field:"active",on:"activate",off:"unactivate"}),Ui({field:"pannable",on:"panify",off:"unpanify"}),Wi.inactive=function(){var e=this[0];if(e)return!e._private.active};var Yi={},Xi=function(e){return function(t){for(var n=[],r=0;r<this.length;r++){var i=this[r];if(i.isNode()){for(var o=!1,a=i.connectedEdges(),s=0;s<a.length;s++){var u=a[s],l=u.source(),c=u.target();if(e.noIncomingEdges&&c===i&&l!==i||e.noOutgoingEdges&&l===i&&c!==i){o=!0;break}}o||n.push(i)}}return this.spawn(n,{unique:!0}).filter(t)}},Ki=function(e){return function(t){for(var n=[],r=0;r<this.length;r++){var i=this[r];if(i.isNode())for(var o=i.connectedEdges(),a=0;a<o.length;a++){var s=o[a],u=s.source(),l=s.target();e.outgoing&&u===i?(n.push(s),n.push(l)):e.incoming&&l===i&&(n.push(s),n.push(u))}}return this.spawn(n,{unique:!0}).filter(t)}},$i=function(e){return function(t){for(var n=this,r=[],i={};;){var o=e.outgoing?n.outgoers():n.incomers();if(0===o.length)break;for(var a=!1,s=0;s<o.length;s++){var u=o[s],l=u.id();i[l]||(i[l]=!0,r.push(u),a=!0)}if(!a)break;n=o}return this.spawn(r,{unique:!0}).filter(t)}};function Zi(e){return function(t){for(var n=[],r=0;r<this.length;r++){var i=this[r]._private[e.attr];i&&n.push(i)}return this.spawn(n,{unique:!0}).filter(t)}}function Qi(e){return function(t){var n=[],r=this._private.cy,i=e||{};b(t)&&(t=r.$(t));for(var o=0;o<t.length;o++)for(var a=t[o]._private.edges,s=0;s<a.length;s++){var u=a[s],l=u._private.data,c=this.hasElementWithId(l.source)&&t.hasElementWithId(l.target),f=t.hasElementWithId(l.source)&&this.hasElementWithId(l.target);if(c||f){if(i.thisIsSrc||i.thisIsTgt){if(i.thisIsSrc&&!c)continue;if(i.thisIsTgt&&!f)continue}n.push(u)}}return this.spawn(n,{unique:!0})}}function Ji(e){return e=R({},{codirected:!1},e),function(t){for(var n=[],r=this.edges(),i=e,o=0;o<r.length;o++)for(var a=r[o]._private,s=a.source,u=s._private.data.id,l=a.data.target,c=s._private.edges,f=0;f<c.length;f++){var d=c[f],h=d._private.data,p=h.target,v=h.source,g=p===l&&v===u,y=u===p&&l===v;(i.codirected&&g||!i.codirected&&(g||y))&&n.push(d)}return this.spawn(n,{unique:!0}).filter(t)}}Yi.clearTraversalCache=function(){for(var e=0;e<this.length;e++)this[e]._private.traversalCache=null},R(Yi,{roots:Xi({noIncomingEdges:!0}),leaves:Xi({noOutgoingEdges:!0}),outgoers:Dr(Ki({outgoing:!0}),"outgoers"),successors:$i({outgoing:!0}),incomers:Dr(Ki({incoming:!0}),"incomers"),predecessors:$i({incoming:!0})}),R(Yi,{neighborhood:Dr((function(e){for(var t=[],n=this.nodes(),r=0;r<n.length;r++)for(var i=n[r],o=i.connectedEdges(),a=0;a<o.length;a++){var s=o[a],u=s.source(),l=s.target(),c=i===u?l:u;c.length>0&&t.push(c[0]),t.push(s[0])}return this.spawn(t,{unique:!0}).filter(e)}),"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),Yi.neighbourhood=Yi.neighborhood,Yi.closedNeighbourhood=Yi.closedNeighborhood,Yi.openNeighbourhood=Yi.openNeighborhood,R(Yi,{source:Dr((function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t}),"source"),target:Dr((function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t}),"target"),sources:Zi({attr:"source"}),targets:Zi({attr:"target"})}),R(Yi,{edgesWith:Dr(Qi(),"edgesWith"),edgesTo:Dr(Qi({thisIsSrc:!0}),"edgesTo")}),R(Yi,{connectedEdges:Dr((function(e){for(var t=[],n=0;n<this.length;n++){var r=this[n];if(r.isNode())for(var i=r._private.edges,o=0;o<i.length;o++){var a=i[o];t.push(a)}}return this.spawn(t,{unique:!0}).filter(e)}),"connectedEdges"),connectedNodes:Dr((function(e){for(var t=[],n=0;n<this.length;n++){var r=this[n];r.isEdge()&&(t.push(r.source()[0]),t.push(r.target()[0]))}return this.spawn(t,{unique:!0}).filter(e)}),"connectedNodes"),parallelEdges:Dr(Ji(),"parallelEdges"),codirectedEdges:Dr(Ji({codirected:!0}),"codirectedEdges")}),R(Yi,{components:function(e){var t=this,n=t.cy(),r=n.collection(),i=null==e?t.nodes():e.nodes(),o=[];null!=e&&i.empty()&&(i=e.sources());var a=function(e,t){r.merge(e),i.unmerge(e),t.merge(e)};if(i.empty())return t.spawn();var s=function(){var e=n.collection();o.push(e);var r=i[0];a(r,e),t.bfs({directed:!1,roots:r,visit:function(t){return a(t,e)}}),e.forEach((function(n){n.connectedEdges().forEach((function(n){t.has(n)&&e.has(n.source())&&e.has(n.target())&&e.merge(n)}))}))};do{s()}while(i.length>0);return o},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),Yi.componentsOf=Yi.components;var eo=function(e,t,n){for(var r=null!=n?n:he();e.hasElementWithId(r);)r=he();return r},to=function(e,t,n){if(void 0!==e&&P(e)){var r=new we,i=!1;if(t){if(t.length>0&&S(t[0])&&!T(t[0])){i=!0;for(var o=[],a=new Ee,s=0,u=t.length;s<u;s++){var l=t[s];null==l.data&&(l.data={});var c=l.data;if(null==c.id)c.id=eo(e,l);else if(e.hasElementWithId(c.id)||a.has(c.id))continue;var f=new ke(e,l,!1);o.push(f),a.add(c.id)}t=o}}else t=[];this.length=0;for(var d=0,h=t.length;d<h;d++){var p=t[d][0];if(null!=p){var v=p._private.data.id;(null==n||n.unique&&!r.has(v))&&(r.set(v,{index:this.length,ele:p}),this[this.length]=p,this.length++)}}this._private={cy:e,map:r},i&&this.restore()}else le("A collection must have a reference to the core")},no=ke.prototype=to.prototype;no.instanceString=function(){return"collection"},no.spawn=function(e,t,n){return P(e)||(n=t,t=e,e=this.cy()),new to(e,t,n)},no.spawnSelf=function(){return this.spawn(this)},no.cy=function(){return this._private.cy},no.renderer=function(){return this._private.cy.renderer()},no.element=function(){return this[0]},no.collection=function(){return C(this)?this:new to(this._private.cy,[this])},no.unique=function(){return new to(this._private.cy,this,{unique:!0})},no.hasElementWithId=function(e){return e=""+e,this._private.map.has(e)},no.getElementById=function(e){e=""+e;var t=this._private.cy,n=this._private.map.get(e);return n?n.ele:new to(t)},no.$id=no.getElementById,no.poolIndex=function(){var e=this._private.cy._private.elements,t=this[0]._private.data.id;return e._private.map.get(t).index},no.indexOf=function(e){var t=e[0]._private.data.id;return this._private.map.get(t).index},no.indexOfId=function(e){return e=""+e,this._private.map.get(e).index},no.json=function(e){var t=this.element(),n=this.cy();if(null==t&&e)return this;if(null!=t){var r=t._private;if(S(e)){if(n.startBatch(),e.data){t.data(e.data);var i=r.data;if(t.isEdge()){var o=!1,a={},s=e.data.source,u=e.data.target;null!=s&&s!=i.source&&(a.source=""+s,o=!0),null!=u&&u!=i.target&&(a.target=""+u,o=!0),o&&(t=t.move(a))}else{var l=e.data.parent;null==l&&null==i.parent||l==i.parent||(void 0===l&&(l=null),null!=l&&(l=""+l),t=t.move({parent:l}))}}e.position&&t.position(e.position);var c=function(n,i,o){var a=e[n];null!=a&&a!==r[n]&&(a?t[i]():t[o]())};return c("removed","remove","restore"),c("selected","select","unselect"),c("selectable","selectify","unselectify"),c("locked","lock","unlock"),c("grabbable","grabify","ungrabify"),c("pannable","panify","unpanify"),null!=e.classes&&t.classes(e.classes),n.endBatch(),this}if(void 0===e){var f={data:de(r.data),position:de(r.position),group:r.group,removed:r.removed,selected:r.selected,selectable:r.selectable,locked:r.locked,grabbable:r.grabbable,pannable:r.pannable,classes:null};f.classes="";var d=0;return r.classes.forEach((function(e){return f.classes+=0==d++?e:" "+e})),f}}},no.jsons=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t].json();e.push(n)}return e},no.clone=function(){for(var e=this.cy(),t=[],n=0;n<this.length;n++){var r=this[n].json(),i=new ke(e,r,!1);t.push(i)}return new to(e,t)},no.copy=no.clone,no.restore=function(){for(var e,t,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this,o=i.cy(),a=o._private,s=[],u=[],l=0,c=i.length;l<c;l++){var f=i[l];r&&!f.removed()||(f.isNode()?s.push(f):u.push(f))}e=s.concat(u);var d=function(){e.splice(t,1),t--};for(t=0;t<e.length;t++){var h=e[t],p=h._private,v=p.data;if(h.clearTraversalCache(),r||p.removed)if(void 0===v.id)v.id=eo(o,h);else if(E(v.id))v.id=""+v.id;else{if(M(v.id)||!b(v.id)){le("Can not create element with invalid string ID `"+v.id+"`"),d();continue}if(o.hasElementWithId(v.id)){le("Can not create second element with ID `"+v.id+"`"),d();continue}}else;var g=v.id;if(h.isNode()){var y=p.position;null==y.x&&(y.x=0),null==y.y&&(y.y=0)}if(h.isEdge()){for(var m=h,x=["source","target"],w=x.length,S=!1,k=0;k<w;k++){var _=x[k],T=v[_];E(T)&&(T=v[_]=""+v[_]),null==T||""===T?(le("Can not create edge `"+g+"` with unspecified "+_),S=!0):o.hasElementWithId(T)||(le("Can not create edge `"+g+"` with nonexistant "+_+" `"+T+"`"),S=!0)}if(S){d();continue}var C=o.getElementById(v.source),P=o.getElementById(v.target);C.same(P)?C._private.edges.push(m):(C._private.edges.push(m),P._private.edges.push(m)),m._private.source=C,m._private.target=P}p.map=new we,p.map.set(g,{ele:h,index:0}),p.removed=!1,r&&o.addToPool(h)}for(var D=0;D<s.length;D++){var O=s[D],I=O._private.data;E(I.parent)&&(I.parent=""+I.parent);var N=I.parent,A=null!=N;if(A){var L=o.getElementById(N);if(L.empty())I.parent=void 0;else{for(var j=!1,B=L;!B.empty();){if(O.same(B)){j=!0,I.parent=void 0;break}B=B.parent()}j||(L[0]._private.children.push(O),O._private.parent=L[0],a.hasCompoundNodes=!0)}}}if(e.length>0){for(var F=new to(o,e),R=0;R<F.length;R++){var z=F[R];z.isNode()||(z.parallelEdges().clearTraversalCache(),z.source().clearTraversalCache(),z.target().clearTraversalCache())}(a.hasCompoundNodes?o.collection().merge(F).merge(F.connectedNodes()).merge(F.parent()):F).dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(n),n?F.emitAndNotify("add"):r&&F.emit("add")}return i},no.removed=function(){var e=this[0];return e&&e._private.removed},no.inside=function(){var e=this[0];return e&&!e._private.removed},no.remove=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],i={},o=n._private.cy;function a(e){for(var t=e._private.edges,n=0;n<t.length;n++)u(t[n])}function s(e){for(var t=e._private.children,n=0;n<t.length;n++)u(t[n])}function u(e){var n=i[e.id()];t&&e.removed()||n||(i[e.id()]=!0,e.isNode()?(r.push(e),a(e),s(e)):r.unshift(e))}for(var l=0,c=n.length;l<c;l++){var f=n[l];u(f)}function d(e,t){var n=e._private.edges;ye(n,t),e.clearTraversalCache()}function h(e){e.clearTraversalCache()}var p=[];function v(e,t){t=t[0];var n=(e=e[0])._private.children,r=e.id();ye(n,t),t._private.parent=null,p.ids[r]||(p.ids[r]=!0,p.push(e))}p.ids={},n.dirtyCompoundBoundsCache(),t&&o.removeFromPool(r);for(var g=0;g<r.length;g++){var y=r[g];if(y.isEdge()){var m=y.source()[0],b=y.target()[0];d(m,y),d(b,y);for(var x=y.parallelEdges(),w=0;w<x.length;w++){var S=x[w];h(S),S.isBundledBezier()&&S.dirtyBoundingBoxCache()}}else{var E=y.parent();0!==E.length&&v(E,y)}t&&(y._private.removed=!0)}var k=o._private.elements;o._private.hasCompoundNodes=!1;for(var _=0;_<k.length;_++){var T=k[_];if(T.isParent()){o._private.hasCompoundNodes=!0;break}}var C=new to(this.cy(),r);C.size()>0&&(e?C.emitAndNotify("remove"):t&&C.emit("remove"));for(var P=0;P<p.length;P++){var D=p[P];t&&D.removed()||D.updateStyle()}return C},no.move=function(e){var t=this._private.cy,n=this,r=function(e){return null==e?e:""+e};if(void 0!==e.source||void 0!==e.target){var i=r(e.source),o=r(e.target),a=null!=i&&t.hasElementWithId(i),s=null!=o&&t.hasElementWithId(o);(a||s)&&(t.batch((function(){n.remove(!1,!1),n.emitAndNotify("moveout");for(var e=0;e<n.length;e++){var t=n[e],r=t._private.data;t.isEdge()&&(a&&(r.source=i),s&&(r.target=o))}n.restore(!1,!1)})),n.emitAndNotify("move"))}else if(void 0!==e.parent){var u=r(e.parent);if(null===u||t.hasElementWithId(u)){var l=null===u?void 0:u;t.batch((function(){var e=n.remove(!1,!1);e.emitAndNotify("moveout");for(var t=0;t<n.length;t++){var r=n[t],i=r._private.data;r.isNode()&&(i.parent=l)}e.restore(!1,!1)})),n.emitAndNotify("move")}}return this},[On,qn,Gn,Tr,Mr,Br,Fr,fi,Ti,Ci,{isNode:function(){return"nodes"===this.group()},isEdge:function(){return"edges"===this.group()},isLoop:function(){return this.isEdge()&&this.source()[0]===this.target()[0]},isSimple:function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},group:function(){var e=this[0];if(e)return e._private.group}},Mi,Ii,ji,Wi,Yi].forEach((function(e){R(no,e)}));var ro={add:function(e){var t,n=this;if(_(e)){var r=e;if(r._private.cy===n)t=r.restore();else{for(var i=[],o=0;o<r.length;o++){var a=r[o];i.push(a.json())}t=new to(n,i)}}else if(w(e)){t=new to(n,e)}else if(S(e)&&(w(e.nodes)||w(e.edges))){for(var s=e,u=[],l=["nodes","edges"],c=0,f=l.length;c<f;c++){var d=l[c],h=s[d];if(w(h))for(var p=0,v=h.length;p<v;p++){var g=R({group:d},h[p]);u.push(g)}}t=new to(n,u)}else{t=new ke(n,e).collection()}return t},remove:function(e){if(_(e));else if(b(e)){var t=e;e=this.$(t)}return e.remove()}};
  /*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */
  /*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */
  var io=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var i={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:i.v,dv:e(i)}}function n(n,r){var i={dx:n.v,dv:e(n)},o=t(n,.5*r,i),a=t(n,.5*r,o),s=t(n,r,a),u=1/6*(i.dx+2*(o.dx+a.dx)+s.dx),l=1/6*(i.dv+2*(o.dv+a.dv)+s.dv);return n.x=n.x+u*r,n.v=n.v+l*r,n}return function e(t,r,i){var o,a,s,u={x:-1,v:0,tension:null,friction:null},l=[0],c=0;for(t=parseFloat(t)||500,r=parseFloat(r)||20,i=i||null,u.tension=t,u.friction=r,a=(o=null!==i)?(c=e(t,r))/i*.016:.016;s=n(s||u,a),l.push(1+s.x),c+=16,Math.abs(s.x)>1e-4&&Math.abs(s.v)>1e-4;);return o?function(e){return l[e*(l.length-1)|0]}:c}}(),oo=function(e,t,n,r){var i=function(e,t,n,r){var i=4,o=.001,a=1e-7,s=10,u=11,l=1/(u-1),c="undefined"!=typeof Float32Array;if(4!==arguments.length)return!1;for(var f=0;f<4;++f)if("number"!=typeof arguments[f]||isNaN(arguments[f])||!isFinite(arguments[f]))return!1;e=Math.min(e,1),n=Math.min(n,1),e=Math.max(e,0),n=Math.max(n,0);var d=c?new Float32Array(u):new Array(u);function h(e,t){return 1-3*t+3*e}function p(e,t){return 3*t-6*e}function v(e){return 3*e}function g(e,t,n){return((h(t,n)*e+p(t,n))*e+v(t))*e}function y(e,t,n){return 3*h(t,n)*e*e+2*p(t,n)*e+v(t)}function m(t,r){for(var o=0;o<i;++o){var a=y(r,e,n);if(0===a)return r;r-=(g(r,e,n)-t)/a}return r}function b(){for(var t=0;t<u;++t)d[t]=g(t*l,e,n)}function x(t,r,i){var o,u,l=0;do{(o=g(u=r+(i-r)/2,e,n)-t)>0?i=u:r=u}while(Math.abs(o)>a&&++l<s);return u}function w(t){for(var r=0,i=1,a=u-1;i!==a&&d[i]<=t;++i)r+=l;--i;var s=r+(t-d[i])/(d[i+1]-d[i])*l,c=y(s,e,n);return c>=o?m(t,s):0===c?s:x(t,r,r+l)}var S=!1;function E(){S=!0,e===t&&n===r||b()}var k=function(i){return S||E(),e===t&&n===r?i:0===i?0:1===i?1:g(w(i),t,r)};k.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var _="generateBezier("+[e,t,n,r]+")";return k.toString=function(){return _},k}(e,t,n,r);return function(e,t,n){return e+(t-e)*i(n)}},ao={linear:function(e,t,n){return e+(t-e)*n},ease:oo(.25,.1,.25,1),"ease-in":oo(.42,0,1,1),"ease-out":oo(0,0,.58,1),"ease-in-out":oo(.42,0,.58,1),"ease-in-sine":oo(.47,0,.745,.715),"ease-out-sine":oo(.39,.575,.565,1),"ease-in-out-sine":oo(.445,.05,.55,.95),"ease-in-quad":oo(.55,.085,.68,.53),"ease-out-quad":oo(.25,.46,.45,.94),"ease-in-out-quad":oo(.455,.03,.515,.955),"ease-in-cubic":oo(.55,.055,.675,.19),"ease-out-cubic":oo(.215,.61,.355,1),"ease-in-out-cubic":oo(.645,.045,.355,1),"ease-in-quart":oo(.895,.03,.685,.22),"ease-out-quart":oo(.165,.84,.44,1),"ease-in-out-quart":oo(.77,0,.175,1),"ease-in-quint":oo(.755,.05,.855,.06),"ease-out-quint":oo(.23,1,.32,1),"ease-in-out-quint":oo(.86,0,.07,1),"ease-in-expo":oo(.95,.05,.795,.035),"ease-out-expo":oo(.19,1,.22,1),"ease-in-out-expo":oo(1,0,0,1),"ease-in-circ":oo(.6,.04,.98,.335),"ease-out-circ":oo(.075,.82,.165,1),"ease-in-out-circ":oo(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return ao.linear;var r=io(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":oo};function so(e,t,n,r,i){if(1===r)return n;if(t===n)return n;var o=i(t,n,r);return null==e||((e.roundValue||e.color)&&(o=Math.round(o)),void 0!==e.min&&(o=Math.max(o,e.min)),void 0!==e.max&&(o=Math.min(o,e.max))),o}function uo(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function lo(e,t,n,r,i){var o=null!=i?i.type:null;n<0?n=0:n>1&&(n=1);var a=uo(e,i),s=uo(t,i);if(E(a)&&E(s))return so(o,a,s,n,r);if(w(a)&&w(s)){for(var u=[],l=0;l<s.length;l++){var c=a[l],f=s[l];if(null!=c&&null!=f){var d=so(o,c,f,n,r);u.push(d)}else u.push(f)}return u}}function co(e,t,n,r){var i=!r,o=e._private,a=t._private,s=a.easing,u=a.startTime,l=(r?e:e.cy()).style();if(!a.easingImpl)if(null==s)a.easingImpl=ao.linear;else{var c,f,d;if(b(s))c=l.parse("transition-timing-function",s).value;else c=s;b(c)?(f=c,d=[]):(f=c[1],d=c.slice(2).map((function(e){return+e}))),d.length>0?("spring"===f&&d.push(a.duration),a.easingImpl=ao[f].apply(null,d)):a.easingImpl=ao[f]}var h,p=a.easingImpl;if(h=0===a.duration?1:(n-u)/a.duration,a.applying&&(h=a.progress),h<0?h=0:h>1&&(h=1),null==a.delay){var v=a.startPosition,g=a.position;if(g&&i&&!e.locked()){var y={};fo(v.x,g.x)&&(y.x=lo(v.x,g.x,h,p)),fo(v.y,g.y)&&(y.y=lo(v.y,g.y,h,p)),e.position(y)}var m=a.startPan,x=a.pan,w=o.pan,S=null!=x&&r;S&&(fo(m.x,x.x)&&(w.x=lo(m.x,x.x,h,p)),fo(m.y,x.y)&&(w.y=lo(m.y,x.y,h,p)),e.emit("pan"));var E=a.startZoom,k=a.zoom,_=null!=k&&r;_&&(fo(E,k)&&(o.zoom=Ze(o.minZoom,lo(E,k,h,p),o.maxZoom)),e.emit("zoom")),(S||_)&&e.emit("viewport");var T=a.style;if(T&&T.length>0&&i){for(var C=0;C<T.length;C++){var P=T[C],D=P.name,M=P,O=a.startStyle[D],I=lo(O,M,h,p,l.properties[O.name]);l.overrideBypass(e,D,I)}e.emit("style")}}return a.progress=h,h}function fo(e,t){return null!=e&&null!=t&&(!(!E(e)||!E(t))||!(!e||!t))}function ho(e,t,n,r){var i=t._private;i.started=!0,i.startTime=n-i.progress*i.duration}function po(e,t){var n=t._private.aniEles,r=[];function i(t,n){var i=t._private,o=i.animation.current,a=i.animation.queue,s=!1;if(!n&&"none"===t.pstyle("display").value){o=o.splice(0,o.length).concat(a.splice(0,a.length));for(var u=0;u<o.length;u++)o[u].stop()}if(0===o.length){var l=a.shift();l&&o.push(l)}for(var c=function(e){for(var t=e.length-1;t>=0;t--){(0,e[t])()}e.splice(0,e.length)},f=o.length-1;f>=0;f--){var d=o[f],h=d._private;h.stopped?(o.splice(f,1),h.hooked=!1,h.playing=!1,h.started=!1,c(h.frames)):(h.playing||h.applying)&&(h.playing&&h.applying&&(h.applying=!1),h.started||ho(0,d,e),co(t,d,e,n),h.applying&&(h.applying=!1),c(h.frames),null!=h.step&&h.step(e),d.completed()&&(o.splice(f,1),h.hooked=!1,h.playing=!1,h.started=!1,c(h.completes)),s=!0)}return n||0!==o.length||0!==a.length||r.push(t),s}for(var o=!1,a=0;a<n.length;a++){var s=i(n[a]);o=o||s}var u=i(t,!0);(o||u)&&(n.length>0?t.notify("draw",n):t.notify("draw")),n.unmerge(r),t.emit("step")}var vo={animate:Vn.animate(),animation:Vn.animation(),animated:Vn.animated(),clearQueue:Vn.clearQueue(),delay:Vn.delay(),delayAnimation:Vn.delayAnimation(),stop:Vn.stop(),addToAnimationPool:function(e){this.styleEnabled()&&this._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,e.styleEnabled()){var t=e.renderer();t&&t.beforeRender?t.beforeRender((function(t,n){po(n,e)}),t.beforeRenderPriorities.animations):function t(){e._private.animationsRunning&&Y((function(n){po(n,e),t()}))}()}}},go={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&T(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e}},yo=function(e){return b(e)?new kr(e):e},mo={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new bi(go,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,yo(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,yo(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,yo(t),n),this},once:function(e,t,n){return this.emitter().one(e,yo(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};Vn.eventAliasesOn(mo);var bo={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};bo.jpeg=bo.jpg;var xo={layout:function(e){if(null!=e)if(null!=e.name){var t=e.name,n=this.extension("layout",t);if(null!=n){var r;r=b(e.eles)?this.$(e.eles):null!=e.eles?e.eles:this.$();var i=new n(R({},e,{cy:this,eles:r}));return i}le("No such layout `"+t+"` found.  Did you forget to import it and `cytoscape.use()` it?")}else le("A `name` must be specified to make a layout");else le("Layout options must be specified to make a layout")}};xo.createLayout=xo.makeLayout=xo.layout;var wo={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();null!=t&&r.merge(t)}else if(n.notificationsEnabled){var i=this.renderer();!this.destroyed()&&i&&i.notify(e,t)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(0===e.batchCount)return this;if(e.batchCount--,0===e.batchCount){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach((function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)}))}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch((function(){for(var n=Object.keys(e),r=0;r<n.length;r++){var i=n[r],o=e[i];t.getElementById(i).data(o)}}))}},So=ge({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1}),Eo={renderTo:function(e,t,n,r){return this._private.renderer.renderTo(e,t,n,r),this},renderer:function(){return this._private.renderer},forceRender:function(){return this.notify("draw"),this},resize:function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},initRenderer:function(e){var t=this.extension("renderer",e.name);if(null!=t){void 0!==e.wheelSensitivity&&fe("You have set a custom wheel sensitivity.  This will make your app zoom unnaturally when using mainstream mice.  You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.");var n=So(e);n.cy=this,this._private.renderer=new t(n),this.notify("init")}else le("Can not initialise: No such renderer `".concat(e.name,"` found. Did you forget to import it and `cytoscape.use()` it?"))},destroyRenderer:function(){this.notify("destroy");var e=this.container();if(e)for(e._cyreg=null;e.childNodes.length>0;)e.removeChild(e.childNodes[0]);this._private.renderer=null,this.mutableElements().forEach((function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]}))},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};Eo.invalidateDimensions=Eo.resize;var ko={collection:function(e,t){return b(e)?this.$(e):_(e)?e.collection():w(e)?new to(this,e,t):new to(this)},nodes:function(e){var t=this.$((function(e){return e.isNode()}));return e?t.filter(e):t},edges:function(e){var t=this.$((function(e){return e.isEdge()}));return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};ko.elements=ko.filter=ko.$;var _o={};_o.apply=function(e){var t=this._private,n=t.cy.collection();t.newStyle&&(t.contextStyles={},t.propDiffs={},this.cleanElements(e,!0));for(var r=0;r<e.length;r++){var i=e[r],o=this.getContextMeta(i);if(!o.empty){var a=this.getContextStyle(o),s=this.applyContextStyle(o,a,i);t.newStyle||this.updateTransitions(i,s.diffProps),this.updateStyleHints(i)&&n.merge(i)}}return t.newStyle=!1,n},_o.getPropertiesDiff=function(e,t){var n=this._private.propDiffs=this._private.propDiffs||{},r=e+"-"+t,i=n[r];if(i)return i;for(var o=[],a={},s=0;s<this.length;s++){var u=this[s],l="t"===e[s],c="t"===t[s],f=l!==c,d=u.mappedProperties.length>0;if(f||c&&d){var h=void 0;f&&d||f?h=u.properties:d&&(h=u.mappedProperties);for(var p=0;p<h.length;p++){for(var v=h[p],g=v.name,y=!1,m=s+1;m<this.length;m++){var b=this[m];if("t"===t[m]&&(y=null!=b.properties[v.name]))break}a[g]||y||(a[g]=!0,o.push(g))}}}return n[r]=o,o},_o.getContextMeta=function(e){var t,n="",r=e._private.styleCxtKey||"";this._private.newStyle&&(r="");for(var i=0;i<this.length;i++){var o=this[i];n+=o.selector&&o.selector.matches(e)?"t":"f"}return t=this.getPropertiesDiff(r,n),e._private.styleCxtKey=n,{key:n,diffPropNames:t,empty:0===t.length}},_o.getContextStyle=function(e){var t=e.key,n=this._private.contextStyles=this._private.contextStyles||{};if(n[t])return n[t];for(var r={_private:{key:t}},i=0;i<this.length;i++){var o=this[i];if("t"===t[i])for(var a=0;a<o.properties.length;a++){var s=o.properties[a];r[s.name]=s}}return n[t]=r,r},_o.applyContextStyle=function(e,t,n){for(var r=e.diffPropNames,i={},o=this.types,a=0;a<r.length;a++){var s=r[a],u=t[s],l=n.pstyle(s);if(!u){if(!l)continue;u=l.bypass?{name:s,deleteBypassed:!0}:{name:s,delete:!0}}if(l!==u){if(u.mapped===o.fn&&null!=l&&null!=l.mapping&&l.mapping.value===u.value){var c=l.mapping;if((c.fnValue=u.value(n))===c.prevFnValue)continue}var f=i[s]={prev:l};this.applyParsedProperty(n,u),f.next=n.pstyle(s),f.next&&f.next.bypass&&(f.next=f.next.bypassed)}}return{diffProps:i}},_o.updateStyleHints=function(e){var t=e._private,n=this,r=n.propertyGroupNames,i=n.propertyGroupKeys,o=function(e,t,r){return n.getPropertiesHash(e,t,r)},a=t.styleKey;if(e.removed())return!1;var s="nodes"===t.group,u=e._private.style;r=Object.keys(u);for(var l=0;l<i.length;l++){var c=i[l];t.styleKeys[c]=0}for(var f=function(e,n){return t.styleKeys[n]=$(e,t.styleKeys[n])},d=function(e,t){for(var n=0;n<e.length;n++)f(e.charCodeAt(n),t)},h=function(e){return-128<e&&e<128&&Math.floor(e)!==e?2e9-(1024*e|0):e},p=0;p<r.length;p++){var v=r[p],g=u[v];if(null!=g){var y=this.properties[v],m=y.type,b=y.groupKey,x=void 0;null!=y.hashOverride?x=y.hashOverride(e,g):null!=g.pfValue&&(x=g.pfValue);var w=null==y.enums?g.value:null,S=null!=x,E=S||null!=w,k=g.units;if(m.number&&E){var _=S?x:w;if(m.multiple)for(var T=0;T<_.length;T++)f(h(_[T]),b);else f(h(_),b);S||null==k||d(k,b)}else d(g.strValue,b)}}for(var C=0,P=0;P<i.length;P++){var D=i[P],M=t.styleKeys[D];C=$(M,C)}t.styleKey=C;var O=t.labelDimsKey=t.styleKeys.labelDimensions;if(t.labelKey=o(e,["label"],O),t.labelStyleKey=$(t.styleKeys.commonLabel,t.labelKey),s||(t.sourceLabelKey=o(e,["source-label"],O),t.sourceLabelStyleKey=$(t.styleKeys.commonLabel,t.sourceLabelKey),t.targetLabelKey=o(e,["target-label"],O),t.targetLabelStyleKey=$(t.styleKeys.commonLabel,t.targetLabelKey)),s){var I=t.styleKeys,N=I.nodeBody,A=I.nodeBorder,L=I.backgroundImage,j=I.compound,B=I.pie;t.nodeKey=Z([A,L,j,B],N),t.hasPie=0!=B}return a!==t.styleKey},_o.clearStyleHints=function(e){var t=e._private;t.styleKeys={},t.styleKey=null,t.labelKey=null,t.labelStyleKey=null,t.sourceLabelKey=null,t.sourceLabelStyleKey=null,t.targetLabelKey=null,t.targetLabelStyleKey=null,t.nodeKey=null,t.hasPie=null},_o.applyParsedProperty=function(e,t){var n,r=this,i=t,o=e._private.style,a=r.types,s=r.properties[i.name].type,u=i.bypass,l=o[i.name],c=l&&l.bypass,f=e._private,d=function(e){return null==e?null:null!=e.pfValue?e.pfValue:e.value},h=function(){var t=d(l),n=d(i);r.checkTriggers(e,i.name,t,n)};if("curve-style"===t.name&&e.isEdge()&&("bezier"!==t.value&&e.isLoop()||"haystack"===t.value&&(e.source().isParent()||e.target().isParent()))&&(i=t=this.parse(t.name,"bezier",u)),i.delete)return o[i.name]=void 0,h(),!0;if(i.deleteBypassed)return l?!!l.bypass&&(l.bypassed=void 0,h(),!0):(h(),!0);if(i.deleteBypass)return l?!!l.bypass&&(o[i.name]=l.bypassed,h(),!0):(h(),!0);var p=function(){fe("Do not assign mappings to elements without corresponding data (i.e. ele `"+e.id()+"` has no mapping for property `"+i.name+"` with data field `"+i.field+"`); try a `["+i.field+"]` selector to limit scope to elements with `"+i.field+"` defined")};switch(i.mapped){case a.mapData:for(var v,g=i.field.split("."),y=f.data,m=0;m<g.length&&y;m++){y=y[g[m]]}if(null==y)return p(),!1;if(!E(y))return fe("Do not use continuous mappers without specifying numeric data (i.e. `"+i.field+": "+y+"` for `"+e.id()+"` is non-numeric)"),!1;var b=i.fieldMax-i.fieldMin;if((v=0===b?0:(y-i.fieldMin)/b)<0?v=0:v>1&&(v=1),s.color){var x=i.valueMin[0],w=i.valueMax[0],S=i.valueMin[1],k=i.valueMax[1],_=i.valueMin[2],T=i.valueMax[2],C=null==i.valueMin[3]?1:i.valueMin[3],P=null==i.valueMax[3]?1:i.valueMax[3],D=[Math.round(x+(w-x)*v),Math.round(S+(k-S)*v),Math.round(_+(T-_)*v),Math.round(C+(P-C)*v)];n={bypass:i.bypass,name:i.name,value:D,strValue:"rgb("+D[0]+", "+D[1]+", "+D[2]+")"}}else{if(!s.number)return!1;var M=i.valueMin+(i.valueMax-i.valueMin)*v;n=this.parse(i.name,M,i.bypass,"mapping")}if(!n)return p(),!1;n.mapping=i,i=n;break;case a.data:for(var O=i.field.split("."),I=f.data,N=0;N<O.length&&I;N++){I=I[O[N]]}if(null!=I&&(n=this.parse(i.name,I,i.bypass,"mapping")),!n)return p(),!1;n.mapping=i,i=n;break;case a.fn:var A=i.value,L=null!=i.fnValue?i.fnValue:A(e);if(i.prevFnValue=L,null==L)return fe("Custom function mappers may not return null (i.e. `"+i.name+"` for ele `"+e.id()+"` is null)"),!1;if(!(n=this.parse(i.name,L,i.bypass,"mapping")))return fe("Custom function mappers may not return invalid values for the property type (i.e. `"+i.name+"` for ele `"+e.id()+"` is invalid)"),!1;n.mapping=de(i),i=n;break;case void 0:break;default:return!1}return u?(i.bypassed=c?l.bypassed:l,o[i.name]=i):c?l.bypassed=i:o[i.name]=i,h(),!0},_o.cleanElements=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(this.clearStyleHints(r),r.dirtyCompoundBoundsCache(),r.dirtyBoundingBoxCache(),t)for(var i=r._private.style,o=Object.keys(i),a=0;a<o.length;a++){var s=o[a],u=i[s];null!=u&&(u.bypass?u.bypassed=null:i[s]=null)}else r._private.style={}}},_o.update=function(){this._private.cy.mutableElements().updateStyle()},_o.updateTransitions=function(e,t){var n=this,r=e._private,i=e.pstyle("transition-property").value,o=e.pstyle("transition-duration").pfValue,a=e.pstyle("transition-delay").pfValue;if(i.length>0&&o>0){for(var s={},u=!1,l=0;l<i.length;l++){var c=i[l],f=e.pstyle(c),d=t[c];if(d){var h=d.prev,p=null!=d.next?d.next:f,v=!1,g=void 0;h&&(E(h.pfValue)&&E(p.pfValue)?(v=p.pfValue-h.pfValue,g=h.pfValue+1e-6*v):E(h.value)&&E(p.value)?(v=p.value-h.value,g=h.value+1e-6*v):w(h.value)&&w(p.value)&&(v=h.value[0]!==p.value[0]||h.value[1]!==p.value[1]||h.value[2]!==p.value[2],g=h.strValue),v&&(s[c]=p.strValue,this.applyBypass(e,c,g),u=!0))}}if(!u)return;r.transitioning=!0,new Fn((function(t){a>0?e.delayAnimation(a).play().promise().then(t):t()})).then((function(){return e.animation({style:s,duration:o,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()})).then((function(){n.removeBypasses(e,i),e.emitAndNotify("style"),r.transitioning=!1}))}else r.transitioning&&(this.removeBypasses(e,i),e.emitAndNotify("style"),r.transitioning=!1)},_o.checkTrigger=function(e,t,n,r,i,o){var a=this.properties[t],s=i(a);null!=s&&s(n,r)&&o(a)},_o.checkZOrderTrigger=function(e,t,n,r){var i=this;this.checkTrigger(e,t,n,r,(function(e){return e.triggersZOrder}),(function(){i._private.cy.notify("zorder",e)}))},_o.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,(function(e){return e.triggersBounds}),(function(i){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache(),"bezier"!==e.pstyle("curve-style").value&&("curve-style"!==t||"bezier"!==n&&"bezier"!==r)||!i.triggersBoundsOfParallelBeziers||e.parallelEdges().forEach((function(e){e.isBundledBezier()&&e.dirtyBoundingBoxCache()}))}))},_o.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r)};var To={applyBypass:function(e,t,n,r){var i=[];if("*"===t||"**"===t){if(void 0!==n)for(var o=0;o<this.properties.length;o++){var a=this.properties[o].name,s=this.parse(a,n,!0);s&&i.push(s)}}else if(b(t)){var u=this.parse(t,n,!0);u&&i.push(u)}else{if(!S(t))return!1;var l=t;r=n;for(var c=Object.keys(l),f=0;f<c.length;f++){var d=c[f],h=l[d];if(void 0===h&&(h=l[A(d)]),void 0!==h){var p=this.parse(d,h,!0);p&&i.push(p)}}}if(0===i.length)return!1;for(var v=!1,g=0;g<e.length;g++){for(var y=e[g],m={},x=void 0,w=0;w<i.length;w++){var E=i[w];if(r){var k=y.pstyle(E.name);x=m[E.name]={prev:k}}v=this.applyParsedProperty(y,E)||v,r&&(x.next=y.pstyle(E.name))}v&&this.updateStyleHints(y),r&&this.updateTransitions(y,m,!0)}return v},overrideBypass:function(e,t,n){t=N(t);for(var r=0;r<e.length;r++){var i=e[r],o=i._private.style[t],a=this.properties[t].type,s=a.color,u=a.mutiple,l=o?null!=o.pfValue?o.pfValue:o.value:null;o&&o.bypass?(o.value=n,null!=o.pfValue&&(o.pfValue=n),o.strValue=s?"rgb("+n.join(",")+")":u?n.join(" "):""+n,this.updateStyleHints(i)):this.applyBypass(i,t,n),this.checkTriggers(i,t,l,n)}},removeAllBypasses:function(e,t){return this.removeBypasses(e,this.propertyNames,t)},removeBypasses:function(e,t,n){for(var r=0;r<e.length;r++){for(var i=e[r],o={},a=0;a<t.length;a++){var s=t[a],u=this.properties[s],l=i.pstyle(u.name);if(l&&l.bypass){var c=this.parse(s,"",!0),f=o[u.name]={prev:l};this.applyParsedProperty(i,c),f.next=i.pstyle(u.name)}}this.updateStyleHints(i),n&&this.updateTransitions(i,o,!0)}}},Co={getEmSizeInPixels:function(){var e=this.containerCss("font-size");return null!=e?parseFloat(e):1},containerCss:function(e){var t=this._private.cy.container();if(d&&t&&d.getComputedStyle)return d.getComputedStyle(t).getPropertyValue(e)}},Po={getRenderedStyle:function(e,t){return t?this.getStylePropertyValue(e,t,!0):this.getRawStyle(e,!0)},getRawStyle:function(e,t){if(e=e[0]){for(var n={},r=0;r<this.properties.length;r++){var i=this.properties[r],o=this.getStylePropertyValue(e,i.name,t);null!=o&&(n[i.name]=o,n[A(i.name)]=o)}return n}},getIndexedStyle:function(e,t,n,r){var i=e.pstyle(t)[n][r];return null!=i?i:e.cy().style().getDefaultProperty(t)[n][0]},getStylePropertyValue:function(e,t,n){if(e=e[0]){var r=this.properties[t];r.alias&&(r=r.pointsTo);var i=r.type,o=e.pstyle(r.name);if(o){var a=o.value,s=o.units,u=o.strValue;if(n&&i.number&&null!=a&&E(a)){var l=e.cy().zoom(),c=function(e){return e*l},f=function(e,t){return c(e)+t},d=w(a);return(d?s.every((function(e){return null!=e})):null!=s)?d?a.map((function(e,t){return f(e,s[t])})).join(" "):f(a,s):d?a.map((function(e){return b(e)?e:""+c(e)})).join(" "):""+c(a)}if(null!=u)return u}return null}},getAnimationStartStyle:function(e,t){for(var n={},r=0;r<t.length;r++){var i=t[r].name,o=e.pstyle(i);void 0!==o&&(o=S(o)?this.parse(i,o.strValue):this.parse(i,o)),o&&(n[i]=o)}return n},getPropsList:function(e){var t=[],n=e,r=this.properties;if(n)for(var i=Object.keys(n),o=0;o<i.length;o++){var a=i[o],s=n[a],u=r[a]||r[N(a)],l=this.parse(u.name,s);l&&t.push(l)}return t},getNonDefaultPropertiesHash:function(e,t,n){var r,i,o,a,s,u,l=n;for(s=0;s<t.length;s++)if(r=t[s],null!=(i=e.pstyle(r,!1)))if(null!=i.pfValue)l=$(a,l);else for(o=i.strValue,u=0;u<o.length;u++)a=o.charCodeAt(u),l=$(a,l);return l}};Po.getPropertiesHash=Po.getNonDefaultPropertiesHash;var Do={appendFromJson:function(e){for(var t=0;t<e.length;t++){var n=e[t],r=n.selector,i=n.style||n.css,o=Object.keys(i);this.selector(r);for(var a=0;a<o.length;a++){var s=o[a],u=i[s];this.css(s,u)}}return this},fromJson:function(e){return this.resetToDefault(),this.appendFromJson(e),this},json:function(){for(var e=[],t=this.defaultLength;t<this.length;t++){for(var n=this[t],r=n.selector,i=n.properties,o={},a=0;a<i.length;a++){var s=i[a];o[s.name]=s.strValue}e.push({selector:r?r.toString():"core",style:o})}return e}},Mo={appendFromString:function(e){var t,n,r,i=""+e;function o(){i=i.length>t.length?i.substr(t.length):""}function a(){n=n.length>r.length?n.substr(r.length):""}for(i=i.replace(/[/][*](\s|.)+?[*][/]/g,"");;){if(i.match(/^\s*$/))break;var s=i.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!s){fe("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+i);break}t=s[0];var u=s[1];if("core"!==u)if(new kr(u).invalid){fe("Skipping parsing of block: Invalid selector found in string stylesheet: "+u),o();continue}var l=s[2],c=!1;n=l;for(var f=[];;){if(n.match(/^\s*$/))break;var d=n.match(/^\s*(.+?)\s*:\s*(.+?)\s*;/);if(!d){fe("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+l),c=!0;break}r=d[0];var h=d[1],p=d[2];if(this.properties[h])this.parse(h,p)?(f.push({name:h,val:p}),a()):(fe("Skipping property: Invalid property definition in: "+r),a());else fe("Skipping property: Invalid property name in: "+r),a()}if(c){o();break}this.selector(u);for(var v=0;v<f.length;v++){var g=f[v];this.css(g.name,g.val)}o()}return this},fromString:function(e){return this.resetToDefault(),this.appendFromString(e),this}},Oo={};!function(){var e=B,t=function(e){return"^"+e+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},n=function(t){var n=e+"|\\w+|rgb[a]?\\((?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)(?:\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)|hsl[a]?\\((?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?)))\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])(?:\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)|\\#[0-9a-fA-F]{3}|\\#[0-9a-fA-F]{6}";return"^"+t+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+e+")\\s*\\,\\s*("+e+")\\s*,\\s*("+n+")\\s*\\,\\s*("+n+")\\)$"},r=["^url\\s*\\(\\s*['\"]?(.+?)['\"]?\\s*\\)$","^(none)$","^(.+)$"];Oo.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","taxi"]},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","polygon"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","none"]},arrowFill:{enums:["filled","hollow"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","center","bottom"]},halign:{enums:["left","center","right"]},justification:{enums:["left","center","right","auto"]},text:{string:!0},data:{mapping:!0,regex:t("data")},layoutData:{mapping:!0,regex:t("layoutData")},scratch:{mapping:!0,regex:t("scratch")},mapData:{mapping:!0,regex:n("mapData")},mapLayoutData:{mapping:!0,regex:n("mapLayoutData")},mapScratch:{mapping:!0,regex:n("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:r,singleRegexMatchValue:!0},urls:{regexes:r,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-node-or-label","outside-to-line","outside-to-line-or-label"],singleEnum:!0,validate:function(e,t){switch(e.length){case 2:return"deg"!==t[0]&&"rad"!==t[0]&&"deg"!==t[1]&&"rad"!==t[1];case 1:return b(e[0])||"deg"===t[0]||"rad"===t[0];default:return!1}}},easing:{regexes:["^(spring)\\s*\\(\\s*("+e+")\\s*,\\s*("+e+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+e+")\\s*,\\s*("+e+")\\s*,\\s*("+e+")\\s*,\\s*("+e+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:function(e){var t=e.length;return 1===t||2===t||4===t}}};var i={zeroNonZero:function(e,t){return(null==e||null==t)&&e!==t||(0==e&&0!=t||0!=e&&0==t)},any:function(e,t){return e!=t}},o=Oo.types,a=[{name:"label",type:o.text,triggersBounds:i.any},{name:"text-rotation",type:o.textRotation,triggersBounds:i.any},{name:"text-margin-x",type:o.bidirectionalSize,triggersBounds:i.any},{name:"text-margin-y",type:o.bidirectionalSize,triggersBounds:i.any}],s=[{name:"source-label",type:o.text,triggersBounds:i.any},{name:"source-text-rotation",type:o.textRotation,triggersBounds:i.any},{name:"source-text-margin-x",type:o.bidirectionalSize,triggersBounds:i.any},{name:"source-text-margin-y",type:o.bidirectionalSize,triggersBounds:i.any},{name:"source-text-offset",type:o.size,triggersBounds:i.any}],u=[{name:"target-label",type:o.text,triggersBounds:i.any},{name:"target-text-rotation",type:o.textRotation,triggersBounds:i.any},{name:"target-text-margin-x",type:o.bidirectionalSize,triggersBounds:i.any},{name:"target-text-margin-y",type:o.bidirectionalSize,triggersBounds:i.any},{name:"target-text-offset",type:o.size,triggersBounds:i.any}],l=[{name:"font-family",type:o.fontFamily,triggersBounds:i.any},{name:"font-style",type:o.fontStyle,triggersBounds:i.any},{name:"font-weight",type:o.fontWeight,triggersBounds:i.any},{name:"font-size",type:o.size,triggersBounds:i.any},{name:"text-transform",type:o.textTransform,triggersBounds:i.any},{name:"text-wrap",type:o.textWrap,triggersBounds:i.any},{name:"text-overflow-wrap",type:o.textOverflowWrap,triggersBounds:i.any},{name:"text-max-width",type:o.size,triggersBounds:i.any},{name:"text-outline-width",type:o.size,triggersBounds:i.any},{name:"line-height",type:o.positiveNumber,triggersBounds:i.any}],c=[{name:"text-valign",type:o.valign,triggersBounds:i.any},{name:"text-halign",type:o.halign,triggersBounds:i.any},{name:"color",type:o.color},{name:"text-outline-color",type:o.color},{name:"text-outline-opacity",type:o.zeroOneNumber},{name:"text-background-color",type:o.color},{name:"text-background-opacity",type:o.zeroOneNumber},{name:"text-background-padding",type:o.size,triggersBounds:i.any},{name:"text-border-opacity",type:o.zeroOneNumber},{name:"text-border-color",type:o.color},{name:"text-border-width",type:o.size,triggersBounds:i.any},{name:"text-border-style",type:o.borderStyle,triggersBounds:i.any},{name:"text-background-shape",type:o.textBackgroundShape,triggersBounds:i.any},{name:"text-justification",type:o.justification}],f=[{name:"events",type:o.bool},{name:"text-events",type:o.bool}],d=[{name:"display",type:o.display,triggersZOrder:i.any,triggersBounds:i.any,triggersBoundsOfParallelBeziers:!0},{name:"visibility",type:o.visibility,triggersZOrder:i.any},{name:"opacity",type:o.zeroOneNumber,triggersZOrder:i.zeroNonZero},{name:"text-opacity",type:o.zeroOneNumber},{name:"min-zoomed-font-size",type:o.size},{name:"z-compound-depth",type:o.zCompoundDepth,triggersZOrder:i.any},{name:"z-index-compare",type:o.zIndexCompare,triggersZOrder:i.any},{name:"z-index",type:o.nonNegativeInt,triggersZOrder:i.any}],h=[{name:"overlay-padding",type:o.size,triggersBounds:i.any},{name:"overlay-color",type:o.color},{name:"overlay-opacity",type:o.zeroOneNumber,triggersBounds:i.zeroNonZero}],p=[{name:"transition-property",type:o.propList},{name:"transition-duration",type:o.time},{name:"transition-delay",type:o.time},{name:"transition-timing-function",type:o.easing}],v=function(e,t){return"label"===t.value?-e.poolIndex():t.pfValue},g=[{name:"height",type:o.nodeSize,triggersBounds:i.any,hashOverride:v},{name:"width",type:o.nodeSize,triggersBounds:i.any,hashOverride:v},{name:"shape",type:o.nodeShape,triggersBounds:i.any},{name:"shape-polygon-points",type:o.polygonPointList,triggersBounds:i.any},{name:"background-color",type:o.color},{name:"background-fill",type:o.fill},{name:"background-opacity",type:o.zeroOneNumber},{name:"background-blacken",type:o.nOneOneNumber},{name:"background-gradient-stop-colors",type:o.colors},{name:"background-gradient-stop-positions",type:o.percentages},{name:"background-gradient-direction",type:o.gradientDirection},{name:"padding",type:o.sizeMaybePercent,triggersBounds:i.any},{name:"padding-relative-to",type:o.paddingRelativeTo,triggersBounds:i.any},{name:"bounds-expansion",type:o.boundsExpansion,triggersBounds:i.any}],y=[{name:"border-color",type:o.color},{name:"border-opacity",type:o.zeroOneNumber},{name:"border-width",type:o.size,triggersBounds:i.any},{name:"border-style",type:o.borderStyle}],m=[{name:"background-image",type:o.urls},{name:"background-image-crossorigin",type:o.bgCrossOrigin},{name:"background-image-opacity",type:o.zeroOneNumbers},{name:"background-position-x",type:o.bgPos},{name:"background-position-y",type:o.bgPos},{name:"background-width-relative-to",type:o.bgRelativeTo},{name:"background-height-relative-to",type:o.bgRelativeTo},{name:"background-repeat",type:o.bgRepeat},{name:"background-fit",type:o.bgFit},{name:"background-clip",type:o.bgClip},{name:"background-width",type:o.bgWH},{name:"background-height",type:o.bgWH},{name:"background-offset-x",type:o.bgPos},{name:"background-offset-y",type:o.bgPos}],x=[{name:"position",type:o.position,triggersBounds:i.any},{name:"compound-sizing-wrt-labels",type:o.compoundIncludeLabels,triggersBounds:i.any},{name:"min-width",type:o.size,triggersBounds:i.any},{name:"min-width-bias-left",type:o.sizeMaybePercent,triggersBounds:i.any},{name:"min-width-bias-right",type:o.sizeMaybePercent,triggersBounds:i.any},{name:"min-height",type:o.size,triggersBounds:i.any},{name:"min-height-bias-top",type:o.sizeMaybePercent,triggersBounds:i.any},{name:"min-height-bias-bottom",type:o.sizeMaybePercent,triggersBounds:i.any}],w=[{name:"line-style",type:o.lineStyle},{name:"line-color",type:o.color},{name:"line-fill",type:o.fill},{name:"line-cap",type:o.lineCap},{name:"line-dash-pattern",type:o.numbers},{name:"line-dash-offset",type:o.number},{name:"line-gradient-stop-colors",type:o.colors},{name:"line-gradient-stop-positions",type:o.percentages},{name:"curve-style",type:o.curveStyle,triggersBounds:i.any,triggersBoundsOfParallelBeziers:!0},{name:"haystack-radius",type:o.zeroOneNumber,triggersBounds:i.any},{name:"source-endpoint",type:o.edgeEndpoint,triggersBounds:i.any},{name:"target-endpoint",type:o.edgeEndpoint,triggersBounds:i.any},{name:"control-point-step-size",type:o.size,triggersBounds:i.any},{name:"control-point-distances",type:o.bidirectionalSizes,triggersBounds:i.any},{name:"control-point-weights",type:o.numbers,triggersBounds:i.any},{name:"segment-distances",type:o.bidirectionalSizes,triggersBounds:i.any},{name:"segment-weights",type:o.numbers,triggersBounds:i.any},{name:"taxi-turn",type:o.bidirectionalSizeMaybePercent,triggersBounds:i.any},{name:"taxi-turn-min-distance",type:o.size,triggersBounds:i.any},{name:"taxi-direction",type:o.axisDirection,triggersBounds:i.any},{name:"edge-distances",type:o.edgeDistances,triggersBounds:i.any},{name:"arrow-scale",type:o.positiveNumber,triggersBounds:i.any},{name:"loop-direction",type:o.angle,triggersBounds:i.any},{name:"loop-sweep",type:o.angle,triggersBounds:i.any},{name:"source-distance-from-node",type:o.size,triggersBounds:i.any},{name:"target-distance-from-node",type:o.size,triggersBounds:i.any}],S=[{name:"ghost",type:o.bool,triggersBounds:i.any},{name:"ghost-offset-x",type:o.bidirectionalSize,triggersBounds:i.any},{name:"ghost-offset-y",type:o.bidirectionalSize,triggersBounds:i.any},{name:"ghost-opacity",type:o.zeroOneNumber}],E=[{name:"selection-box-color",type:o.color},{name:"selection-box-opacity",type:o.zeroOneNumber},{name:"selection-box-border-color",type:o.color},{name:"selection-box-border-width",type:o.size},{name:"active-bg-color",type:o.color},{name:"active-bg-opacity",type:o.zeroOneNumber},{name:"active-bg-size",type:o.size},{name:"outside-texture-bg-color",type:o.color},{name:"outside-texture-bg-opacity",type:o.zeroOneNumber}],k=[];Oo.pieBackgroundN=16,k.push({name:"pie-size",type:o.sizeMaybePercent});for(var _=1;_<=Oo.pieBackgroundN;_++)k.push({name:"pie-"+_+"-background-color",type:o.color}),k.push({name:"pie-"+_+"-background-size",type:o.percent}),k.push({name:"pie-"+_+"-background-opacity",type:o.zeroOneNumber});var T=[],C=Oo.arrowPrefixes=["source","mid-source","target","mid-target"];[{name:"arrow-shape",type:o.arrowShape,triggersBounds:i.any},{name:"arrow-color",type:o.color},{name:"arrow-fill",type:o.arrowFill}].forEach((function(e){C.forEach((function(t){var n=t+"-"+e.name,r=e.type,i=e.triggersBounds;T.push({name:n,type:r,triggersBounds:i})}))}),{});var P=Oo.properties=[].concat(f,p,d,h,S,c,l,a,s,u,g,y,m,k,x,w,T,E),D=Oo.propertyGroups={behavior:f,transition:p,visibility:d,overlay:h,ghost:S,commonLabel:c,labelDimensions:l,mainLabel:a,sourceLabel:s,targetLabel:u,nodeBody:g,nodeBorder:y,backgroundImage:m,pie:k,compound:x,edgeLine:w,edgeArrow:T,core:E},M=Oo.propertyGroupNames={};(Oo.propertyGroupKeys=Object.keys(D)).forEach((function(e){M[e]=D[e].map((function(e){return e.name})),D[e].forEach((function(t){return t.groupKey=e}))}));var O=Oo.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}];Oo.propertyNames=P.map((function(e){return e.name}));for(var I=0;I<P.length;I++){var N=P[I];P[N.name]=N}for(var A=0;A<O.length;A++){var L=O[A],j=P[L.pointsTo],F={name:L.name,alias:!0,pointsTo:j};P.push(F),P[L.name]=F}}(),Oo.getDefaultProperty=function(e){return this.getDefaultProperties()[e]},Oo.getDefaultProperties=function(){var e=this._private;if(null!=e.defaultProperties)return e.defaultProperties;for(var t=R({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1,   1, -1,   1, 1,   -1, 1","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce((function(e,t){for(var n=1;n<=Oo.pieBackgroundN;n++){var r=t.name.replace("{{i}}",n),i=t.value;e[r]=i}return e}),{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-gradient-stop-colors":"#999","line-gradient-stop-positions":"0%","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"taxi-turn":"50%","taxi-turn-min-distance":10,"taxi-direction":"auto","edge-distances":"intersection","curve-style":"haystack","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node","line-dash-pattern":[6,3],"line-dash-offset":0},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"}].reduce((function(e,t){return Oo.arrowPrefixes.forEach((function(n){var r=n+"-"+t.name,i=t.value;e[r]=i})),e}),{})),n={},r=0;r<this.properties.length;r++){var i=this.properties[r];if(!i.pointsTo){var o=i.name,a=t[o],s=this.parse(o,a);n[o]=s}}return e.defaultProperties=n,e.defaultProperties},Oo.addDefaultStylesheet=function(){this.selector(":parent").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3}).selector(":loop").css({"curve-style":"bezier"}).selector("edge:compound").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector(":parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length};var Io={parse:function(e,t,n,r){if(x(t))return this.parseImplWarn(e,t,n,r);var i,o=J(e,""+t,n?"t":"f","mapping"===r||!0===r||!1===r||null==r?"dontcare":r),a=this.propCache=this.propCache||[];return(i=a[o])||(i=a[o]=this.parseImplWarn(e,t,n,r)),(n||"mapping"===r)&&(i=de(i))&&(i.value=de(i.value)),i},parseImplWarn:function(e,t,n,r){var i=this.parseImpl(e,t,n,r);return i||null==t||fe("The style property `".concat(e,": ").concat(t,"` is invalid")),i}};Io.parseImpl=function(e,t,n,r){e=N(e);var i=this.properties[e],o=t,a=this.types;if(!i)return null;if(void 0===t)return null;i.alias&&(i=i.pointsTo,e=i.name);var s=b(t);s&&(t=t.trim());var u,l,c=i.type;if(!c)return null;if(n&&(""===t||null===t))return{name:e,value:t,bypass:!0,deleteBypass:!0};if(x(t))return{name:e,value:t,strValue:"fn",mapped:a.fn,bypass:n};if(!s||r||t.length<7||"a"!==t[1]);else{if(t.length>=7&&"d"===t[0]&&(u=new RegExp(a.data.regex).exec(t))){if(n)return!1;var f=a.data;return{name:e,value:u,strValue:""+t,mapped:f,field:u[1],bypass:n}}if(t.length>=10&&"m"===t[0]&&(l=new RegExp(a.mapData.regex).exec(t))){if(n)return!1;if(c.multiple)return!1;var d=a.mapData;if(!c.color&&!c.number)return!1;var h=this.parse(e,l[4]);if(!h||h.mapped)return!1;var p=this.parse(e,l[5]);if(!p||p.mapped)return!1;if(h.pfValue===p.pfValue||h.strValue===p.strValue)return fe("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+h.strValue+"`"),this.parse(e,h.strValue);if(c.color){var v=h.value,g=p.value;if(!(v[0]!==g[0]||v[1]!==g[1]||v[2]!==g[2]||v[3]!==g[3]&&(null!=v[3]&&1!==v[3]||null!=g[3]&&1!==g[3])))return!1}return{name:e,value:l,strValue:""+t,mapped:d,field:l[1],fieldMin:parseFloat(l[2]),fieldMax:parseFloat(l[3]),valueMin:h.value,valueMax:p.value,bypass:n}}}if(c.multiple&&"multiple"!==r){var y;if(y=s?t.split(/\s+/):w(t)?t:[t],c.evenMultiple&&y.length%2!=0)return null;for(var m=[],S=[],k=[],_="",T=!1,C=0;C<y.length;C++){var P=this.parse(e,y[C],n,"multiple");T=T||b(P.value),m.push(P.value),k.push(null!=P.pfValue?P.pfValue:P.value),S.push(P.units),_+=(C>0?" ":"")+P.strValue}return c.validate&&!c.validate(m,S)?null:c.singleEnum&&T?1===m.length&&b(m[0])?{name:e,value:m[0],strValue:m[0],bypass:n}:null:{name:e,value:m,pfValue:k,strValue:_,bypass:n,units:S}}var D,M,O=function(){for(var r=0;r<c.enums.length;r++){if(c.enums[r]===t)return{name:e,value:t,strValue:""+t,bypass:n}}return null};if(c.number){var I,A="px";if(c.units&&(I=c.units),c.implicitUnits&&(A=c.implicitUnits),!c.unitless)if(s){var L="px|em"+(c.allowPercent?"|\\%":"");I&&(L=I);var j=t.match("^("+B+")("+L+")?$");j&&(t=j[1],I=j[2]||A)}else I&&!c.implicitUnits||(I=A);if(t=parseFloat(t),isNaN(t)&&void 0===c.enums)return null;if(isNaN(t)&&void 0!==c.enums)return t=o,O();if(c.integer&&(!E(M=t)||Math.floor(M)!==M))return null;if(void 0!==c.min&&(t<c.min||c.strictMin&&t===c.min)||void 0!==c.max&&(t>c.max||c.strictMax&&t===c.max))return null;var F={name:e,value:t,strValue:""+t+(I||""),units:I,bypass:n};return c.unitless||"px"!==I&&"em"!==I?F.pfValue=t:F.pfValue="px"!==I&&I?this.getEmSizeInPixels()*t:t,"ms"!==I&&"s"!==I||(F.pfValue="ms"===I?t:1e3*t),"deg"!==I&&"rad"!==I||(F.pfValue="rad"===I?t:(D=t,Math.PI*D/180)),"%"===I&&(F.pfValue=t/100),F}if(c.propList){var R=[],V=""+t;if("none"===V);else{for(var q=V.split(/\s*,\s*|\s+/),G=0;G<q.length;G++){var W=q[G].trim();this.properties[W]?R.push(W):fe("`"+W+"` is not a valid property name")}if(0===R.length)return null}return{name:e,value:R,strValue:0===R.length?"none":R.join(" "),bypass:n}}if(c.color){var H=z(t);return H?{name:e,value:H,pfValue:H,strValue:"rgb("+H[0]+","+H[1]+","+H[2]+")",bypass:n}:null}if(c.regex||c.regexes){if(c.enums){var U=O();if(U)return U}for(var Y=c.regexes?c.regexes:[c.regex],X=0;X<Y.length;X++){var K=new RegExp(Y[X]).exec(t);if(K)return{name:e,value:c.singleRegexMatchValue?K[1]:K,strValue:""+t,bypass:n}}return null}return c.string?{name:e,value:""+t,strValue:""+t,bypass:n}:c.enums?O():null};var No=function e(t){if(!(this instanceof e))return new e(t);P(t)?(this._private={cy:t,coreStyle:{}},this.length=0,this.resetToDefault()):le("A style must have a core reference")},Ao=No.prototype;Ao.instanceString=function(){return"style"},Ao.clear=function(){for(var e=0;e<this.length;e++)this[e]=void 0;return this.length=0,this._private.newStyle=!0,this},Ao.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},Ao.core=function(e){return this._private.coreStyle[e]||this.getDefaultProperty(e)},Ao.selector=function(e){var t="core"===e?null:new kr(e),n=this.length++;return this[n]={selector:t,properties:[],mappedProperties:[],index:n},this},Ao.css=function(){var e=this,t=arguments;if(1===t.length)for(var n=t[0],r=0;r<e.properties.length;r++){var i=e.properties[r],o=n[i.name];void 0===o&&(o=n[A(i.name)]),void 0!==o&&this.cssRule(i.name,o)}else 2===t.length&&this.cssRule(t[0],t[1]);return this},Ao.style=Ao.css,Ao.cssRule=function(e,t){var n=this.parse(e,t);if(n){var r=this.length-1;this[r].properties.push(n),this[r].properties[n.name]=n,n.name.match(/pie-(\d+)-background-size/)&&n.value&&(this._private.hasPie=!0),n.mapped&&this[r].mappedProperties.push(n),!this[r].selector&&(this._private.coreStyle[n.name]=n)}return this},Ao.append=function(e){return D(e)?e.appendToStyle(this):w(e)?this.appendFromJson(e):b(e)&&this.appendFromString(e),this},No.fromJson=function(e,t){var n=new No(e);return n.fromJson(t),n},No.fromString=function(e,t){return new No(e).fromString(t)},[_o,To,Co,Po,Do,Mo,Oo,Io].forEach((function(e){R(Ao,e)})),No.types=Ao.types,No.properties=Ao.properties,No.propertyGroups=Ao.propertyGroups,No.propertyGroupNames=Ao.propertyGroupNames,No.propertyGroupKeys=Ao.propertyGroupKeys;var Lo={style:function(e){e&&this.setStyle(e).update();return this._private.style},setStyle:function(e){var t=this._private;return D(e)?t.style=e.generateStyle(this):w(e)?t.style=No.fromJson(this,e):b(e)?t.style=No.fromString(this,e):t.style=No(this),t.style}},jo={autolock:function(e){return void 0===e?this._private.autolock:(this._private.autolock=!!e,this)},autoungrabify:function(e){return void 0===e?this._private.autoungrabify:(this._private.autoungrabify=!!e,this)},autounselectify:function(e){return void 0===e?this._private.autounselectify:(this._private.autounselectify=!!e,this)},selectionType:function(e){var t=this._private;return null==t.selectionType&&(t.selectionType="single"),void 0===e?t.selectionType:("additive"!==e&&"single"!==e||(t.selectionType=e),this)},panningEnabled:function(e){return void 0===e?this._private.panningEnabled:(this._private.panningEnabled=!!e,this)},userPanningEnabled:function(e){return void 0===e?this._private.userPanningEnabled:(this._private.userPanningEnabled=!!e,this)},zoomingEnabled:function(e){return void 0===e?this._private.zoomingEnabled:(this._private.zoomingEnabled=!!e,this)},userZoomingEnabled:function(e){return void 0===e?this._private.userZoomingEnabled:(this._private.userZoomingEnabled=!!e,this)},boxSelectionEnabled:function(e){return void 0===e?this._private.boxSelectionEnabled:(this._private.boxSelectionEnabled=!!e,this)},pan:function(){var e,t,n,r,i,o=arguments,a=this._private.pan;switch(o.length){case 0:return a;case 1:if(b(o[0]))return a[e=o[0]];if(S(o[0])){if(!this._private.panningEnabled)return this;r=(n=o[0]).x,i=n.y,E(r)&&(a.x=r),E(i)&&(a.y=i),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;e=o[0],t=o[1],"x"!==e&&"y"!==e||!E(t)||(a[e]=t),this.emit("pan viewport")}return this.notify("viewport"),this},panBy:function(e,t){var n,r,i,o,a,s=arguments,u=this._private.pan;if(!this._private.panningEnabled)return this;switch(s.length){case 1:S(e)&&(o=(i=s[0]).x,a=i.y,E(o)&&(u.x+=o),E(a)&&(u.y+=a),this.emit("pan viewport"));break;case 2:r=t,"x"!==(n=e)&&"y"!==n||!E(r)||(u[n]+=r),this.emit("pan viewport")}return this.notify("viewport"),this},fit:function(e,t){var n=this.getFitViewport(e,t);if(n){var r=this._private;r.zoom=n.zoom,r.pan=n.pan,this.emit("pan zoom viewport"),this.notify("viewport")}return this},getFitViewport:function(e,t){if(E(e)&&void 0===t&&(t=e,e=void 0),this._private.panningEnabled&&this._private.zoomingEnabled){var n,r;if(b(e)){var i=e;e=this.$(i)}else if(S(r=e)&&E(r.x1)&&E(r.x2)&&E(r.y1)&&E(r.y2)){var o=e;(n={x1:o.x1,y1:o.y1,x2:o.x2,y2:o.y2}).w=n.x2-n.x1,n.h=n.y2-n.y1}else _(e)||(e=this.mutableElements());if(!_(e)||!e.empty()){n=n||e.boundingBox();var a,s=this.width(),u=this.height();if(t=E(t)?t:0,!isNaN(s)&&!isNaN(u)&&s>0&&u>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:a=(a=(a=Math.min((s-2*t)/n.w,(u-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:a)<this._private.minZoom?this._private.minZoom:a,pan:{x:(s-a*(n.x1+n.x2))/2,y:(u-a*(n.y1+n.y2))/2}}}}},zoomRange:function(e,t){var n=this._private;if(null==t){var r=e;e=r.min,t=r.max}return E(e)&&E(t)&&e<=t?(n.minZoom=e,n.maxZoom=t):E(e)&&void 0===t&&e<=n.maxZoom?n.minZoom=e:E(t)&&void 0===e&&t>=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t,n,r=this._private,i=r.pan,o=r.zoom,a=!1;if(r.zoomingEnabled||(a=!0),E(e)?n=e:S(e)&&(n=e.level,null!=e.position?t=ze(e.position,o,i):null!=e.renderedPosition&&(t=e.renderedPosition),null==t||r.panningEnabled||(a=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)<r.minZoom?r.minZoom:n,a||!E(n)||n===o||null!=t&&(!E(t.x)||!E(t.y)))return null;if(null!=t){var s=i,u=o,l=n;return{zoomed:!0,panned:!0,zoom:l,pan:{x:-l/u*(t.x-s.x)+t.x,y:-l/u*(t.y-s.y)+t.y}}}return{zoomed:!0,panned:!1,zoom:n,pan:i}},zoom:function(e){if(void 0===e)return this._private.zoom;var t=this.getZoomedViewport(e),n=this._private;return null!=t&&t.zoomed?(n.zoom=t.zoom,t.panned&&(n.pan.x=t.pan.x,n.pan.y=t.pan.y),this.emit("zoom"+(t.panned?" pan":"")+" viewport"),this.notify("viewport"),this):this},viewport:function(e){var t=this._private,n=!0,r=!0,i=[],o=!1,a=!1;if(!e)return this;if(E(e.zoom)||(n=!1),S(e.pan)||(r=!1),!n&&!r)return this;if(n){var s=e.zoom;s<t.minZoom||s>t.maxZoom||!t.zoomingEnabled?o=!0:(t.zoom=s,i.push("zoom"))}if(r&&(!o||!e.cancelOnFailedZoom)&&t.panningEnabled){var u=e.pan;E(u.x)&&(t.pan.x=u.x,a=!1),E(u.y)&&(t.pan.y=u.y,a=!1),a||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(b(e)){var n=e;e=this.mutableElements().filter(n)}else _(e)||(e=this.mutableElements());if(0!==e.length){var r=e.boundingBox(),i=this.width(),o=this.height();return{x:(i-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(o-t*(r.y1+r.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e,t,n=this._private,r=n.container;return n.sizeCache=n.sizeCache||(r?(e=d.getComputedStyle(r),t=function(t){return parseFloat(e.getPropertyValue(t))},{width:r.clientWidth-t("padding-left")-t("padding-right"),height:r.clientHeight-t("padding-top")-t("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}}};jo.centre=jo.center,jo.autolockNodes=jo.autolock,jo.autoungrabifyNodes=jo.autoungrabify;var Bo={data:Vn.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0}),removeData:Vn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0}),scratch:Vn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0}),removeScratch:Vn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0})};Bo.attr=Bo.data,Bo.removeAttr=Bo.removeData;var Fo=function(e){var t=this,n=(e=R({},e)).container;n&&!k(n)&&k(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var i=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=t;var o=void 0!==d&&void 0!==n&&!e.headless,a=e;a.layout=R({name:o?"grid":"null"},a.layout),a.renderer=R({name:o?"canvas":"null"},a.renderer);var s=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},u=this._private={container:n,ready:!1,options:a,elements:new to(this),listeners:[],aniEles:new to(this),data:{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,a.zoomingEnabled),userZoomingEnabled:s(!0,a.userZoomingEnabled),panningEnabled:s(!0,a.panningEnabled),userPanningEnabled:s(!0,a.userPanningEnabled),boxSelectionEnabled:s(!0,a.boxSelectionEnabled),autolock:s(!1,a.autolock,a.autolockNodes),autoungrabify:s(!1,a.autoungrabify,a.autoungrabifyNodes),autounselectify:s(!1,a.autounselectify),styleEnabled:void 0===a.styleEnabled?o:a.styleEnabled,zoom:E(a.zoom)?a.zoom:1,pan:{x:S(a.pan)&&E(a.pan.x)?a.pan.x:0,y:S(a.pan)&&E(a.pan.y)?a.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1};this.createEmitter(),this.selectionType(a.selectionType),this.zoomRange({min:a.minZoom,max:a.maxZoom});u.styleEnabled&&t.setStyle([]);var l=R({},a,a.renderer);t.initRenderer(l);!function(e,t){if(e.some(O))return Fn.all(e).then(t);t(e)}([a.style,a.elements],(function(e){var n=e[0],o=e[1];u.styleEnabled&&t.style().append(n),function(e,n,r){t.notifications(!1);var i=t.mutableElements();i.length>0&&i.remove(),null!=e&&(S(e)||w(e))&&t.add(e),t.one("layoutready",(function(e){t.notifications(!0),t.emit(e),t.one("load",n),t.emitAndNotify("load")})).one("layoutstop",(function(){t.one("done",r),t.emit("done")}));var o=R({},t._private.options.layout);o.eles=t.elements(),t.layout(o).run()}(o,(function(){t.startAnimationLoop(),u.ready=!0,x(a.ready)&&t.on("ready",a.ready);for(var e=0;e<i.length;e++){var n=i[e];t.on("ready",n)}r&&(r.readies=[]),t.emit("ready")}),a.done)}))},Ro=Fo.prototype;R(Ro,{instanceString:function(){return"core"},isReady:function(){return this._private.ready},destroyed:function(){return this._private.destroyed},ready:function(e){return this.isReady()?this.emitter().emit("ready",[],e):this.on("ready",e),this},destroy:function(){var e=this;if(!e.destroyed())return e.stopAnimationLoop(),e.destroyRenderer(),this.emit("destroy"),e._private.destroyed=!0,e},hasElementWithId:function(e){return this._private.elements.hasElementWithId(e)},getElementById:function(e){return this._private.elements.getElementById(e)},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return this._private.renderer.isHeadless()},styleEnabled:function(){return this._private.styleEnabled},addToPool:function(e){return this._private.elements.merge(e),this},removeFromPool:function(e){return this._private.elements.unmerge(e),this},container:function(){return this._private.container||null},mount:function(e){if(null!=e){var t=this,n=t._private,r=n.options;return!k(e)&&k(e[0])&&(e=e[0]),t.stopAnimationLoop(),t.destroyRenderer(),n.container=e,n.styleEnabled=!0,t.invalidateSize(),t.initRenderer(R({},r,r.renderer,{name:"null"===r.renderer.name?"canvas":r.renderer.name})),t.startAnimationLoop(),t.style(r.style),t.emit("mount"),t}},unmount:function(){var e=this;return e.stopAnimationLoop(),e.destroyRenderer(),e.initRenderer({name:"null"}),e.emit("unmount"),e},options:function(){return de(this._private.options)},json:function(e){var t=this,n=t._private,r=t.mutableElements();if(S(e)){if(t.startBatch(),e.elements){var i={},o=function(e,n){for(var r=[],o=[],a=0;a<e.length;a++){var s=e[a],u=""+s.data.id,l=t.getElementById(u);i[u]=!0,0!==l.length?o.push({ele:l,json:s}):n?(s.group=n,r.push(s)):r.push(s)}t.add(r);for(var c=0;c<o.length;c++){var f=o[c],d=f.ele,h=f.json;d.json(h)}};if(w(e.elements))o(e.elements);else for(var a=["nodes","edges"],s=0;s<a.length;s++){var u=a[s],l=e.elements[u];w(l)&&o(l,u)}var c=t.collection();r.filter((function(e){return!i[e.id()]})).forEach((function(e){e.isParent()?c.merge(e):e.remove()})),c.forEach((function(e){return e.children().move({parent:null})})),c.forEach((function(e){return function(e){return t.getElementById(e.id())}(e).remove()}))}e.style&&t.style(e.style),null!=e.zoom&&e.zoom!==n.zoom&&t.zoom(e.zoom),e.pan&&(e.pan.x===n.pan.x&&e.pan.y===n.pan.y||t.pan(e.pan)),e.data&&t.data(e.data);for(var f=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify"],d=0;d<f.length;d++){var h=f[d];null!=e[h]&&t[h](e[h])}return t.endBatch(),this}var p={};!!e?p.elements=this.elements().map((function(e){return e.json()})):(p.elements={},r.forEach((function(e){var t=e.group();p.elements[t]||(p.elements[t]=[]),p.elements[t].push(e.json())}))),this._private.styleEnabled&&(p.style=t.style().json()),p.data=de(t.data());var v=n.options;return p.zoomingEnabled=n.zoomingEnabled,p.userZoomingEnabled=n.userZoomingEnabled,p.zoom=n.zoom,p.minZoom=n.minZoom,p.maxZoom=n.maxZoom,p.panningEnabled=n.panningEnabled,p.userPanningEnabled=n.userPanningEnabled,p.pan=de(n.pan),p.boxSelectionEnabled=n.boxSelectionEnabled,p.renderer=de(v.renderer),p.hideEdgesOnViewport=v.hideEdgesOnViewport,p.textureOnViewport=v.textureOnViewport,p.wheelSensitivity=v.wheelSensitivity,p.motionBlur=v.motionBlur,p}}),Ro.$id=Ro.getElementById,[ro,vo,mo,bo,xo,wo,Eo,ko,Lo,jo,Bo].forEach((function(e){R(Ro,e)}));var zo={fit:!0,directed:!1,padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,maximal:!1,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}},Vo=function(e){return e.scratch("breadthfirst")},qo=function(e,t){return e.scratch("breadthfirst",t)};function Go(e){this.options=R({},zo,e)}Go.prototype.run=function(){var e,t=this.options,n=t,r=t.cy,i=n.eles,o=i.nodes().filter((function(e){return!e.isParent()})),a=i,s=n.directed,u=n.maximal||n.maximalAdjustments>0,l=Qe(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(_(n.roots))e=n.roots;else if(w(n.roots)){for(var c=[],f=0;f<n.roots.length;f++){var d=n.roots[f],h=r.getElementById(d);c.push(h)}e=r.collection(c)}else if(b(n.roots))e=r.$(n.roots);else if(s)e=o.roots();else{var p=i.components();e=r.collection();for(var v=function(t){var n=p[t],r=n.maxDegree(!1),i=n.filter((function(e){return e.degree(!1)===r}));e=e.add(i)},g=0;g<p.length;g++)v(g)}var y=[],m={},x=function(e,t){null==y[t]&&(y[t]=[]);var n=y[t].length;y[t].push(e),qo(e,{index:n,depth:t})};a.bfs({roots:e,directed:n.directed,visit:function(e,t,n,r,i){var o=e[0],a=o.id();x(o,i),m[a]=!0}});for(var S=[],E=0;E<o.length;E++){var k=o[E];m[k.id()]||S.push(k)}var T=function(e){for(var t=y[e],n=0;n<t.length;n++){var r=t[n];null!=r?qo(r,{depth:e,index:n}):(t.splice(n,1),n--)}},C=function(){for(var e=0;e<y.length;e++)T(e)},P=function(e,t){for(var n=Vo(e),r=e.incomers().filter((function(e){return e.isNode()&&i.has(e)})),o=-1,a=e.id(),s=0;s<r.length;s++){var u=r[s],l=Vo(u);o=Math.max(o,l.depth)}return n.depth<=o&&(t[a]?null:(function(e,t){var n=Vo(e),r=n.depth,i=n.index;y[r][i]=null,x(e,t)}(e,o+1),t[a]=!0,!0))};if(s&&u){var D=[],M={},O=function(e){return D.push(e)};for(o.forEach((function(e){return D.push(e)}));D.length>0;){var I=D.shift(),N=P(I,M);if(N)I.outgoers().filter((function(e){return e.isNode()&&i.has(e)})).forEach(O);else if(null===N){fe("Detected double maximal shift for node `"+I.id()+"`.  Bailing maximal adjustment due to cycle.  Use `options.maximal: true` only on DAGs.");break}}}C();var A=0;if(n.avoidOverlap)for(var L=0;L<o.length;L++){var j=o[L].layoutDimensions(n),B=j.w,R=j.h;A=Math.max(A,B,R)}for(var z={},V=function(e){if(z[e.id()])return z[e.id()];for(var t=Vo(e).depth,n=e.neighborhood(),r=0,i=0,a=0;a<n.length;a++){var s=n[a];if(!s.isEdge()&&!s.isParent()&&o.has(s)){var u=Vo(s),l=u.index,c=u.depth;if(null!=l&&null!=c){var f=y[c].length;c<t&&(r+=l/f,i++)}}}return r/=i=Math.max(1,i),0===i&&(r=0),z[e.id()]=r,r},q=function(e,t){var n=V(e)-V(t);return 0===n?F(e.id(),t.id()):n},G=0;G<y.length;G++)y[G].sort(q),T(G);for(var W=[],H=0;H<S.length;H++)W.push(S[H]);y.unshift(W),C();for(var U=0,Y=0;Y<y.length;Y++)U=Math.max(y[Y].length,U);var X=l.x1+l.w/2,K=l.x1+l.h/2,$=y.reduce((function(e,t){return Math.max(e,t.length)}),0);return o.layoutPositions(this,n,(function(e){var t=Vo(e),r=t.depth,i=t.index,o=y[r].length,a=Math.max(l.w/((n.grid?$:o)+1),A),s=Math.max(l.h/(y.length+1),A),u=Math.min(l.w/2/y.length,l.h/2/y.length);if(u=Math.max(u,A),n.circle){var c=u*r+u-(y.length>0&&y[0].length<=3?u/2:0),f=2*Math.PI/y[r].length*i;return 0===r&&1===y[0].length&&(c=1),{x:X+c*Math.cos(f),y:K+c*Math.sin(f)}}return{x:X+(i+1-(o+1)/2)*a,y:(r+1)*s}})),this};var Wo={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Ho(e){this.options=R({},Wo,e)}Ho.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,o=r.nodes().not(":parent");t.sort&&(o=o.sort(t.sort));for(var a,s=Qe(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),u=s.x1+s.w/2,l=s.y1+s.h/2,c=(void 0===t.sweep?2*Math.PI-2*Math.PI/o.length:t.sweep)/Math.max(1,o.length-1),f=0,d=0;d<o.length;d++){var h=o[d].layoutDimensions(t),p=h.w,v=h.h;f=Math.max(f,p,v)}if(a=E(t.radius)?t.radius:o.length<=1?0:Math.min(s.h,s.w)/2-f,o.length>1&&t.avoidOverlap){f*=1.75;var g=Math.cos(c)-Math.cos(0),y=Math.sin(c)-Math.sin(0),m=Math.sqrt(f*f/(g*g+y*y));a=Math.max(m,a)}return o.layoutPositions(this,t,(function(e,n){var r=t.startAngle+n*c*(i?1:-1),o=a*Math.cos(r),s=a*Math.sin(r);return{x:u+o,y:l+s}})),this};var Uo,Yo={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Xo(e){this.options=R({},Yo,e)}Xo.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,i=t.eles.nodes().not(":parent"),o=Qe(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),a=o.x1+o.w/2,s=o.y1+o.h/2,u=[],l=0,c=0;c<i.length;c++){var f,d=i[c];f=t.concentric(d),u.push({value:f,node:d}),d._private.scratch.concentric=f}i.updateStyle();for(var h=0;h<i.length;h++){var p=i[h].layoutDimensions(t);l=Math.max(l,p.w,p.h)}u.sort((function(e,t){return t.value-e.value}));for(var v=t.levelWidth(i),g=[[]],y=g[0],m=0;m<u.length;m++){var b=u[m];if(y.length>0)Math.abs(y[0].value-b.value)>=v&&(y=[],g.push(y));y.push(b)}var x=l+t.minNodeSpacing;if(!t.avoidOverlap){var w=g.length>0&&g[0].length>1,S=(Math.min(o.w,o.h)/2-x)/(g.length+w?1:0);x=Math.min(x,S)}for(var E=0,k=0;k<g.length;k++){var _=g[k],T=void 0===t.sweep?2*Math.PI-2*Math.PI/_.length:t.sweep,C=_.dTheta=T/Math.max(1,_.length-1);if(_.length>1&&t.avoidOverlap){var P=Math.cos(C)-Math.cos(0),D=Math.sin(C)-Math.sin(0),M=Math.sqrt(x*x/(P*P+D*D));E=Math.max(M,E)}_.r=E,E+=x}if(t.equidistant){for(var O=0,I=0,N=0;N<g.length;N++){var A=g[N].r-I;O=Math.max(O,A)}I=0;for(var L=0;L<g.length;L++){var j=g[L];0===L&&(I=j.r),j.r=I,I+=O}}for(var B={},F=0;F<g.length;F++)for(var R=g[F],z=R.dTheta,V=R.r,q=0;q<R.length;q++){var G=R[q],W=t.startAngle+(n?1:-1)*z*q,H={x:a+V*Math.cos(W),y:s+V*Math.sin(W)};B[G.node.id()]=H}return i.layoutPositions(this,t,(function(e){var t=e.id();return B[t]})),this};var Ko={ready:function(){},stop:function(){},animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:function(e,t){return!0},animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:function(e){return 2048},nodeOverlap:4,idealEdgeLength:function(e){return 32},edgeElasticity:function(e){return 32},nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1};function $o(e){this.options=R({},Ko,e),this.options.layout=this}$o.prototype.run=function(){var e=this.options,t=e.cy,n=this;n.stopped=!1,!0!==e.animate&&!1!==e.animate||n.emit({type:"layoutstart",layout:n}),Uo=!0===e.debug;var r=Zo(t,n,e);Uo&&(void 0)(r),e.randomize&&ea(r);var i=X(),o=function(){na(r,t,e),!0===e.fit&&t.fit(e.padding)},a=function(t){return!(n.stopped||t>=e.numIter)&&(ra(r,e),r.temperature=r.temperature*e.coolingFactor,!(r.temperature<e.minTemp))},s=function(){if(!0===e.animate||!1===e.animate)o(),n.one("layoutstop",e.stop),n.emit({type:"layoutstop",layout:n});else{var t=e.eles.nodes(),i=ta(r,e,t);t.layoutPositions(n,e,i)}},u=0,l=!0;if(!0===e.animate){!function t(){for(var n=0;l&&n<e.refresh;)l=a(u),u++,n++;l?(X()-i>=e.animationThreshold&&o(),Y(t)):(va(r,e),s())}()}else{for(;l;)l=a(u),u++;va(r,e),s()}return this},$o.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},$o.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var Zo=function(e,t,n){for(var r=n.eles.edges(),i=n.eles.nodes(),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:e.width(),clientHeight:e.width(),boundingBox:Qe(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()})},a=n.eles.components(),s={},u=0;u<a.length;u++)for(var l=a[u],c=0;c<l.length;c++){s[l[c].id()]=u}for(u=0;u<o.nodeSize;u++){var f=(g=i[u]).layoutDimensions(n);(N={}).isLocked=g.locked(),N.id=g.data("id"),N.parentId=g.data("parent"),N.cmptId=s[g.id()],N.children=[],N.positionX=g.position("x"),N.positionY=g.position("y"),N.offsetX=0,N.offsetY=0,N.height=f.w,N.width=f.h,N.maxX=N.positionX+N.width/2,N.minX=N.positionX-N.width/2,N.maxY=N.positionY+N.height/2,N.minY=N.positionY-N.height/2,N.padLeft=parseFloat(g.style("padding")),N.padRight=parseFloat(g.style("padding")),N.padTop=parseFloat(g.style("padding")),N.padBottom=parseFloat(g.style("padding")),N.nodeRepulsion=x(n.nodeRepulsion)?n.nodeRepulsion(g):n.nodeRepulsion,o.layoutNodes.push(N),o.idToIndex[N.id]=u}var d=[],h=0,p=-1,v=[];for(u=0;u<o.nodeSize;u++){var g,y=(g=o.layoutNodes[u]).parentId;null!=y?o.layoutNodes[o.idToIndex[y]].children.push(g.id):(d[++p]=g.id,v.push(g.id))}for(o.graphSet.push(v);h<=p;){var m=d[h++],b=o.idToIndex[m],w=o.layoutNodes[b].children;if(w.length>0){o.graphSet.push(w);for(u=0;u<w.length;u++)d[++p]=w[u]}}for(u=0;u<o.graphSet.length;u++){var S=o.graphSet[u];for(c=0;c<S.length;c++){var E=o.idToIndex[S[c]];o.indexToGraph[E]=u}}for(u=0;u<o.edgeSize;u++){var k=r[u],_={};_.id=k.data("id"),_.sourceId=k.data("source"),_.targetId=k.data("target");var T=x(n.idealEdgeLength)?n.idealEdgeLength(k):n.idealEdgeLength,C=x(n.edgeElasticity)?n.edgeElasticity(k):n.edgeElasticity,P=o.idToIndex[_.sourceId],D=o.idToIndex[_.targetId];if(o.indexToGraph[P]!=o.indexToGraph[D]){for(var M=Qo(_.sourceId,_.targetId,o),O=o.graphSet[M],I=0,N=o.layoutNodes[P];-1===O.indexOf(N.id);)N=o.layoutNodes[o.idToIndex[N.parentId]],I++;for(N=o.layoutNodes[D];-1===O.indexOf(N.id);)N=o.layoutNodes[o.idToIndex[N.parentId]],I++;T*=I*n.nestingFactor}_.idealLength=T,_.elasticity=C,o.layoutEdges.push(_)}return o},Qo=function(e,t,n){var r=Jo(e,t,0,n);return 2>r.count?0:r.graph},Jo=function e(t,n,r,i){var o=i.graphSet[r];if(-1<o.indexOf(t)&&-1<o.indexOf(n))return{count:2,graph:r};for(var a=0,s=0;s<o.length;s++){var u=o[s],l=i.idToIndex[u],c=i.layoutNodes[l].children;if(0!==c.length){var f=e(t,n,i.indexToGraph[i.idToIndex[c[0]]],i);if(0!==f.count){if(1!==f.count)return f;if(2===++a)break}}}return{count:a,graph:r}},ea=function(e,t){for(var n=e.clientWidth,r=e.clientHeight,i=0;i<e.nodeSize;i++){var o=e.layoutNodes[i];0!==o.children.length||o.isLocked||(o.positionX=Math.random()*n,o.positionY=Math.random()*r)}},ta=function(e,t,n){var r=e.boundingBox,i={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return t.boundingBox&&(n.forEach((function(t){var n=e.layoutNodes[e.idToIndex[t.data("id")]];i.x1=Math.min(i.x1,n.positionX),i.x2=Math.max(i.x2,n.positionX),i.y1=Math.min(i.y1,n.positionY),i.y2=Math.max(i.y2,n.positionY)})),i.w=i.x2-i.x1,i.h=i.y2-i.y1),function(n,o){var a=e.layoutNodes[e.idToIndex[n.data("id")]];if(t.boundingBox){var s=(a.positionX-i.x1)/i.w,u=(a.positionY-i.y1)/i.h;return{x:r.x1+s*r.w,y:r.y1+u*r.h}}return{x:a.positionX,y:a.positionY}}},na=function(e,t,n){var r=n.layout,i=n.eles.nodes(),o=ta(e,n,i);i.positions(o),!0!==e.ready&&(e.ready=!0,r.one("layoutready",n.ready),r.emit({type:"layoutready",layout:this}))},ra=function(e,t,n){ia(e,t),la(e),ca(e,t),fa(e),da(e)},ia=function(e,t){for(var n=0;n<e.graphSet.length;n++)for(var r=e.graphSet[n],i=r.length,o=0;o<i;o++)for(var a=e.layoutNodes[e.idToIndex[r[o]]],s=o+1;s<i;s++){var u=e.layoutNodes[e.idToIndex[r[s]]];aa(a,u,e,t)}},oa=function(e){return-e+2*e*Math.random()},aa=function(e,t,n,r){if(e.cmptId===t.cmptId||n.isCompound){var i=t.positionX-e.positionX,o=t.positionY-e.positionY;0===i&&0===o&&(i=oa(1),o=oa(1));var a=sa(e,t,i,o);if(a>0)var s=(l=r.nodeOverlap*a)*i/(v=Math.sqrt(i*i+o*o)),u=l*o/v;else{var l,c=ua(e,i,o),f=ua(t,-1*i,-1*o),d=f.x-c.x,h=f.y-c.y,p=d*d+h*h,v=Math.sqrt(p);s=(l=(e.nodeRepulsion+t.nodeRepulsion)/p)*d/v,u=l*h/v}e.isLocked||(e.offsetX-=s,e.offsetY-=u),t.isLocked||(t.offsetX+=s,t.offsetY+=u)}},sa=function(e,t,n,r){if(n>0)var i=e.maxX-t.minX;else i=t.maxX-e.minX;if(r>0)var o=e.maxY-t.minY;else o=t.maxY-e.minY;return i>=0&&o>=0?Math.sqrt(i*i+o*o):0},ua=function(e,t,n){var r=e.positionX,i=e.positionY,o=e.height||1,a=e.width||1,s=n/t,u=o/a,l={};return 0===t&&0<n||0===t&&0>n?(l.x=r,l.y=i+o/2,l):0<t&&-1*u<=s&&s<=u?(l.x=r+a/2,l.y=i+a*n/2/t,l):0>t&&-1*u<=s&&s<=u?(l.x=r-a/2,l.y=i-a*n/2/t,l):0<n&&(s<=-1*u||s>=u)?(l.x=r+o*t/2/n,l.y=i+o/2,l):0>n&&(s<=-1*u||s>=u)?(l.x=r-o*t/2/n,l.y=i-o/2,l):l},la=function(e,t){for(var n=0;n<e.edgeSize;n++){var r=e.layoutEdges[n],i=e.idToIndex[r.sourceId],o=e.layoutNodes[i],a=e.idToIndex[r.targetId],s=e.layoutNodes[a],u=s.positionX-o.positionX,l=s.positionY-o.positionY;if(0!==u||0!==l){var c=ua(o,u,l),f=ua(s,-1*u,-1*l),d=f.x-c.x,h=f.y-c.y,p=Math.sqrt(d*d+h*h),v=Math.pow(r.idealLength-p,2)/r.elasticity;if(0!==p)var g=v*d/p,y=v*h/p;else g=0,y=0;o.isLocked||(o.offsetX+=g,o.offsetY+=y),s.isLocked||(s.offsetX-=g,s.offsetY-=y)}}},ca=function(e,t){for(var n=0;n<e.graphSet.length;n++){var r=e.graphSet[n],i=r.length;if(0===n)var o=e.clientHeight/2,a=e.clientWidth/2;else{var s=e.layoutNodes[e.idToIndex[r[0]]],u=e.layoutNodes[e.idToIndex[s.parentId]];o=u.positionX,a=u.positionY}for(var l=0;l<i;l++){var c=e.layoutNodes[e.idToIndex[r[l]]];if(!c.isLocked){var f=o-c.positionX,d=a-c.positionY,h=Math.sqrt(f*f+d*d);if(h>1){var p=t.gravity*f/h,v=t.gravity*d/h;c.offsetX+=p,c.offsetY+=v}}}}},fa=function(e,t){var n=[],r=0,i=-1;for(n.push.apply(n,e.graphSet[0]),i+=e.graphSet[0].length;r<=i;){var o=n[r++],a=e.idToIndex[o],s=e.layoutNodes[a],u=s.children;if(0<u.length&&!s.isLocked){for(var l=s.offsetX,c=s.offsetY,f=0;f<u.length;f++){var d=e.layoutNodes[e.idToIndex[u[f]]];d.offsetX+=l,d.offsetY+=c,n[++i]=u[f]}s.offsetX=0,s.offsetY=0}}},da=function(e,t){for(var n=0;n<e.nodeSize;n++){0<(i=e.layoutNodes[n]).children.length&&(i.maxX=void 0,i.minX=void 0,i.maxY=void 0,i.minY=void 0)}for(n=0;n<e.nodeSize;n++){if(!(0<(i=e.layoutNodes[n]).children.length||i.isLocked)){var r=ha(i.offsetX,i.offsetY,e.temperature);i.positionX+=r.x,i.positionY+=r.y,i.offsetX=0,i.offsetY=0,i.minX=i.positionX-i.width,i.maxX=i.positionX+i.width,i.minY=i.positionY-i.height,i.maxY=i.positionY+i.height,pa(i,e)}}for(n=0;n<e.nodeSize;n++){var i;0<(i=e.layoutNodes[n]).children.length&&!i.isLocked&&(i.positionX=(i.maxX+i.minX)/2,i.positionY=(i.maxY+i.minY)/2,i.width=i.maxX-i.minX,i.height=i.maxY-i.minY)}},ha=function(e,t,n){var r=Math.sqrt(e*e+t*t);if(r>n)var i={x:n*e/r,y:n*t/r};else i={x:e,y:t};return i},pa=function e(t,n){var r=t.parentId;if(null!=r){var i=n.layoutNodes[n.idToIndex[r]],o=!1;return(null==i.maxX||t.maxX+i.padRight>i.maxX)&&(i.maxX=t.maxX+i.padRight,o=!0),(null==i.minX||t.minX-i.padLeft<i.minX)&&(i.minX=t.minX-i.padLeft,o=!0),(null==i.maxY||t.maxY+i.padBottom>i.maxY)&&(i.maxY=t.maxY+i.padBottom,o=!0),(null==i.minY||t.minY-i.padTop<i.minY)&&(i.minY=t.minY-i.padTop,o=!0),o?e(i,n):void 0}},va=function(e,t){for(var n=e.layoutNodes,r=[],i=0;i<n.length;i++){var o=n[i],a=o.cmptId;(r[a]=r[a]||[]).push(o)}var s=0;for(i=0;i<r.length;i++){if(v=r[i]){v.x1=1/0,v.x2=-1/0,v.y1=1/0,v.y2=-1/0;for(var u=0;u<v.length;u++){var l=v[u];v.x1=Math.min(v.x1,l.positionX-l.width/2),v.x2=Math.max(v.x2,l.positionX+l.width/2),v.y1=Math.min(v.y1,l.positionY-l.height/2),v.y2=Math.max(v.y2,l.positionY+l.height/2)}v.w=v.x2-v.x1,v.h=v.y2-v.y1,s+=v.w*v.h}}r.sort((function(e,t){return t.w*t.h-e.w*e.h}));var c=0,f=0,d=0,h=0,p=Math.sqrt(s)*e.clientWidth/e.clientHeight;for(i=0;i<r.length;i++){var v;if(v=r[i]){for(u=0;u<v.length;u++){(l=v[u]).isLocked||(l.positionX+=c-v.x1,l.positionY+=f-v.y1)}c+=v.w+t.componentSpacing,d+=v.w+t.componentSpacing,h=Math.max(h,v.h),d>p&&(f+=h+t.componentSpacing,c=0,d=0,h=0)}}},ga={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function ya(e){this.options=R({},ga,e)}ya.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles.nodes().not(":parent");t.sort&&(r=r.sort(t.sort));var i=Qe(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===i.h||0===i.w)r.layoutPositions(this,t,(function(e){return{x:i.x1,y:i.y1}}));else{var o=r.size(),a=Math.sqrt(o*i.h/i.w),s=Math.round(a),u=Math.round(i.w/i.h*a),l=function(e){if(null==e)return Math.min(s,u);Math.min(s,u)==s?s=e:u=e},c=function(e){if(null==e)return Math.max(s,u);Math.max(s,u)==s?s=e:u=e},f=t.rows,d=null!=t.cols?t.cols:t.columns;if(null!=f&&null!=d)s=f,u=d;else if(null!=f&&null==d)s=f,u=Math.ceil(o/s);else if(null==f&&null!=d)u=d,s=Math.ceil(o/u);else if(u*s>o){var h=l(),p=c();(h-1)*p>=o?l(h-1):(p-1)*h>=o&&c(p-1)}else for(;u*s<o;){var v=l(),g=c();(g+1)*v>=o?c(g+1):l(v+1)}var y=i.w/u,m=i.h/s;if(t.condense&&(y=0,m=0),t.avoidOverlap)for(var b=0;b<r.length;b++){var x=r[b],w=x._private.position;null!=w.x&&null!=w.y||(w.x=0,w.y=0);var S=x.layoutDimensions(t),E=t.avoidOverlapPadding,k=S.w+E,_=S.h+E;y=Math.max(y,k),m=Math.max(m,_)}for(var T={},C=function(e,t){return!!T["c-"+e+"-"+t]},P=function(e,t){T["c-"+e+"-"+t]=!0},D=0,M=0,O=function(){++M>=u&&(M=0,D++)},I={},N=0;N<r.length;N++){var A=r[N],L=t.position(A);if(L&&(void 0!==L.row||void 0!==L.col)){var j={row:L.row,col:L.col};if(void 0===j.col)for(j.col=0;C(j.row,j.col);)j.col++;else if(void 0===j.row)for(j.row=0;C(j.row,j.col);)j.row++;I[A.id()]=j,P(j.row,j.col)}}r.layoutPositions(this,t,(function(e,t){var n,r;if(e.locked()||e.isParent())return!1;var o=I[e.id()];if(o)n=o.col*y+y/2+i.x1,r=o.row*m+m/2+i.y1;else{for(;C(D,M);)O();n=M*y+y/2+i.x1,r=D*m+m/2+i.y1,P(D,M),O()}return{x:n,y:r}}))}return this};var ma={ready:function(){},stop:function(){}};function ba(e){this.options=R({},ma,e)}ba.prototype.run=function(){var e=this.options,t=e.eles;e.cy;return this.emit("layoutstart"),t.nodes().positions((function(){return{x:0,y:0}})),this.one("layoutready",e.ready),this.emit("layoutready"),this.one("layoutstop",e.stop),this.emit("layoutstop"),this},ba.prototype.stop=function(){return this};var xa={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function wa(e){this.options=R({},xa,e)}wa.prototype.run=function(){var e=this.options,t=e.eles.nodes(),n=x(e.positions);return t.layoutPositions(this,e,(function(t,r){var i=function(t){if(null==e.positions)return function(e){return{x:e.x,y:e.y}}(t.position());if(n)return e.positions(t);var r=e.positions[t._private.data.id];return null==r?null:r}(t);return!t.locked()&&null!=i&&i})),this};var Sa={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Ea(e){this.options=R({},Sa,e)}Ea.prototype.run=function(){var e=this.options,t=e.cy,n=e.eles.nodes().not(":parent"),r=Qe(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()});return n.layoutPositions(this,e,(function(e,t){return{x:r.x1+Math.round(Math.random()*r.w),y:r.y1+Math.round(Math.random()*r.h)}})),this};var ka=[{name:"breadthfirst",impl:Go},{name:"circle",impl:Ho},{name:"concentric",impl:Xo},{name:"cose",impl:$o},{name:"grid",impl:ya},{name:"null",impl:ba},{name:"preset",impl:wa},{name:"random",impl:Ea}];function _a(e){this.options=e,this.notifications=0}var Ta=function(){},Ca=function(){throw new Error("A headless instance can not render images")};_a.prototype={recalculateRenderedStyle:Ta,notify:function(){this.notifications++},init:Ta,isHeadless:function(){return!0},png:Ca,jpg:Ca};var Pa={arrowShapeWidth:.3,registerArrowShapes:function(){var e=this.arrowShapes={},t=this,n=function(e,t,n,r,i,o,a){var s=i.x-n/2-a,u=i.x+n/2+a,l=i.y-n/2-a,c=i.y+n/2+a;return s<=e&&e<=u&&l<=t&&t<=c},r=function(e,t,n,r,i){var o=e*Math.cos(r)-t*Math.sin(r),a=(e*Math.sin(r)+t*Math.cos(r))*n;return{x:o*n+i.x,y:a+i.y}},i=function(e,t,n,i){for(var o=[],a=0;a<e.length;a+=2){var s=e[a],u=e[a+1];o.push(r(s,u,t,n,i))}return o},o=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r.x,r.y)}return t},a=function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").pfValue*2},s=function(r,s){b(s)&&(s=e[s]),e[r]=R({name:r,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(e,t,n,r,a,s){var u=o(i(this.points,n+2*s,r,a));return dt(e,t,u)},roughCollide:n,draw:function(e,n,r,o){var a=i(this.points,n,r,o);t.arrowShapeImpl("polygon")(e,a)},spacing:function(e){return 0},gap:a},s)};s("none",{collide:ae,roughCollide:ae,draw:ue,spacing:se,gap:se}),s("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),s("arrow","triangle"),s("triangle-backcurve",{points:e.triangle.points,controlPoint:[0,-.15],roughCollide:n,draw:function(e,n,o,a,s){var u=i(this.points,n,o,a),l=this.controlPoint,c=r(l[0],l[1],n,o,a);t.arrowShapeImpl(this.name)(e,u,c)},gap:function(e){return.8*a(e)}}),s("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(e,t,n,r,a,s,u){var l=o(i(this.points,n+2*u,r,a)),c=o(i(this.pointsTee,n+2*u,r,a));return dt(e,t,l)||dt(e,t,c)},draw:function(e,n,r,o,a){var s=i(this.points,n,r,o),u=i(this.pointsTee,n,r,o);t.arrowShapeImpl(this.name)(e,s,u)}}),s("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:function(e,t){var n=this.baseCrossLinePts.slice(),r=t/e;return n[3]=n[3]-r,n[5]=n[5]-r,n},collide:function(e,t,n,r,a,s,u){var l=o(i(this.points,n+2*u,r,a)),c=o(i(this.crossLinePts(n,s),n+2*u,r,a));return dt(e,t,l)||dt(e,t,c)},draw:function(e,n,r,o,a){var s=i(this.points,n,r,o),u=i(this.crossLinePts(n,a),n,r,o);t.arrowShapeImpl(this.name)(e,s,u)}}),s("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(e){return.525*a(e)}}),s("circle",{radius:.15,collide:function(e,t,n,r,i,o,a){var s=i;return Math.pow(s.x-e,2)+Math.pow(s.y-t,2)<=Math.pow((n+2*a)*this.radius,2)},draw:function(e,n,r,i,o){t.arrowShapeImpl(this.name)(e,i.x,i.y,this.radius*n)},spacing:function(e){return t.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.radius}}),s("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(e){return 1},gap:function(e){return 1}}),s("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),s("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").value}}),s("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:function(e){return.95*e.pstyle("width").pfValue*e.pstyle("arrow-scale").value}})}},Da={projectIntoViewport:function(e,t){var n=this.cy,r=this.findContainerClientCoords(),i=r[0],o=r[1],a=r[4],s=n.pan(),u=n.zoom();return[((e-i)/a-s.x)/u,((t-o)/a-s.y)/u]},findContainerClientCoords:function(){if(this.containerBB)return this.containerBB;var e=this.container,t=e.getBoundingClientRect(),n=d.getComputedStyle(e),r=function(e){return parseFloat(n.getPropertyValue(e))},i=r("padding-left"),o=r("padding-right"),a=r("padding-top"),s=r("padding-bottom"),u=r("border-left-width"),l=r("border-right-width"),c=r("border-top-width"),f=(r("border-bottom-width"),e.clientWidth),h=e.clientHeight,p=i+o,v=a+s,g=u+l,y=t.width/(f+g),m=f-p,b=h-v,x=t.left+i+u,w=t.top+a+c;return this.containerBB=[x,w,m,b,y]},invalidateContainerClientCoordsCache:function(){this.containerBB=null},findNearestElement:function(e,t,n,r){return this.findNearestElements(e,t,n,r)[0]},findNearestElements:function(e,t,n,r){var i,o,a=this,s=this,u=s.getCachedZSortedEles(),l=[],c=s.cy.zoom(),f=s.cy.hasCompoundNodes(),d=(r?24:8)/c,h=(r?8:2)/c,p=(r?8:2)/c,v=1/0;function g(e,t){if(e.isNode()){if(o)return;o=e,l.push(e)}if(e.isEdge()&&(null==t||t<v))if(i){if(i.pstyle("z-compound-depth").value===e.pstyle("z-compound-depth").value&&i.pstyle("z-compound-depth").value===e.pstyle("z-compound-depth").value)for(var n=0;n<l.length;n++)if(l[n].isEdge()){l[n]=e,i=e,v=null!=t?t:v;break}}else l.push(e),i=e,v=null!=t?t:v}function y(n){var r=n.outerWidth()+2*h,i=n.outerHeight()+2*h,o=r/2,u=i/2,l=n.position();if(l.x-o<=e&&e<=l.x+o&&l.y-u<=t&&t<=l.y+u&&s.nodeShapes[a.getNodeShape(n)].checkPoint(e,t,0,r,i,l.x,l.y))return g(n,0),!0}function m(n){var r,i=n._private,o=i.rscratch,u=n.pstyle("width").pfValue,c=n.pstyle("arrow-scale").value,h=u/2+d,p=h*h,v=2*h,m=i.source,b=i.target;if("segments"===o.edgeType||"straight"===o.edgeType||"haystack"===o.edgeType){for(var x=o.allpts,w=0;w+3<x.length;w+=2)if(ut(e,t,x[w],x[w+1],x[w+2],x[w+3],v)&&p>(r=ft(e,t,x[w],x[w+1],x[w+2],x[w+3])))return g(n,r),!0}else if("bezier"===o.edgeType||"multibezier"===o.edgeType||"self"===o.edgeType||"compound"===o.edgeType)for(x=o.allpts,w=0;w+5<o.allpts.length;w+=4)if(lt(e,t,x[w],x[w+1],x[w+2],x[w+3],x[w+4],x[w+5],v)&&p>(r=ct(e,t,x[w],x[w+1],x[w+2],x[w+3],x[w+4],x[w+5])))return g(n,r),!0;m=m||i.source,b=b||i.target;var S=a.getArrowWidth(u,c),E=[{name:"source",x:o.arrowStartX,y:o.arrowStartY,angle:o.srcArrowAngle},{name:"target",x:o.arrowEndX,y:o.arrowEndY,angle:o.tgtArrowAngle},{name:"mid-source",x:o.midX,y:o.midY,angle:o.midsrcArrowAngle},{name:"mid-target",x:o.midX,y:o.midY,angle:o.midtgtArrowAngle}];for(w=0;w<E.length;w++){var k=E[w],_=s.arrowShapes[n.pstyle(k.name+"-arrow-shape").value],T=n.pstyle("width").pfValue;if(_.roughCollide(e,t,S,k.angle,{x:k.x,y:k.y},T,d)&&_.collide(e,t,S,k.angle,{x:k.x,y:k.y},T,d))return g(n),!0}f&&l.length>0&&(y(m),y(b))}function b(e,t,n){return be(e,t,n)}function x(n,r){var i,o=n._private,a=p;i=r?r+"-":"",n.boundingBox();var s=o.labelBounds[r||"main"],u=n.pstyle(i+"label").value;if("yes"===n.pstyle("text-events").strValue&&u){var l=o.rstyle,c=b(l,"labelX",r),f=b(l,"labelY",r),d=b(o.rscratch,"labelAngle",r),h=s.x1-a,v=s.x2+a,y=s.y1-a,m=s.y2+a;if(d){var x=Math.cos(d),w=Math.sin(d),S=function(e,t){return{x:(e-=c)*x-(t-=f)*w+c,y:e*w+t*x+f}},E=S(h,y),k=S(h,m),_=S(v,y),T=S(v,m),C=[E.x,E.y,_.x,_.y,T.x,T.y,k.x,k.y];if(dt(e,t,C))return g(n),!0}else if(ot(s,e,t))return g(n),!0}}n&&(u=u.interactive);for(var w=u.length-1;w>=0;w--){var S=u[w];S.isNode()?y(S)||x(S):m(S)||x(S)||x(S,"source")||x(S,"target")}return l},getAllInBox:function(e,t,n,r){for(var i,o,a=this.getCachedZSortedEles().interactive,s=[],u=Math.min(e,n),l=Math.max(e,n),c=Math.min(t,r),f=Math.max(t,r),d=Qe({x1:e=u,y1:t=c,x2:n=l,y2:r=f}),h=0;h<a.length;h++){var p=a[h];if(p.isNode()){var v=p,g=v.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:!1});it(d,g)&&!at(g,d)&&s.push(v)}else{var y=p,m=y._private,b=m.rscratch;if(null!=b.startX&&null!=b.startY&&!ot(d,b.startX,b.startY))continue;if(null!=b.endX&&null!=b.endY&&!ot(d,b.endX,b.endY))continue;if("bezier"===b.edgeType||"multibezier"===b.edgeType||"self"===b.edgeType||"compound"===b.edgeType||"segments"===b.edgeType||"haystack"===b.edgeType){for(var x=m.rstyle.bezierPts||m.rstyle.linePts||m.rstyle.haystackPts,w=!0,S=0;S<x.length;S++)if(i=d,o=x[S],!ot(i,o.x,o.y)){w=!1;break}w&&s.push(y)}else"haystack"!==b.edgeType&&"straight"!==b.edgeType||s.push(y)}}return s}},Ma={calculateArrowAngles:function(e){var t,n,r,i,o,a,s=e._private.rscratch,u="haystack"===s.edgeType,l="bezier"===s.edgeType,c="multibezier"===s.edgeType,f="segments"===s.edgeType,d="compound"===s.edgeType,h="self"===s.edgeType;if(u?(r=s.haystackPts[0],i=s.haystackPts[1],o=s.haystackPts[2],a=s.haystackPts[3]):(r=s.arrowStartX,i=s.arrowStartY,o=s.arrowEndX,a=s.arrowEndY),v=s.midX,g=s.midY,f)t=r-s.segpts[0],n=i-s.segpts[1];else if(c||d||h||l){var p=s.allpts;t=r-Ke(p[0],p[2],p[4],.1),n=i-Ke(p[1],p[3],p[5],.1)}else t=r-v,n=i-g;s.srcArrowAngle=Ge(t,n);var v=s.midX,g=s.midY;if(u&&(v=(r+o)/2,g=(i+a)/2),t=o-r,n=a-i,f)if((p=s.allpts).length/2%2==0){var y=(m=p.length/2)-2;t=p[m]-p[y],n=p[m+1]-p[y+1]}else{y=(m=p.length/2-1)-2;var m,b=m+2;t=p[m]-p[y],n=p[m+1]-p[y+1]}else if(c||d||h){var x,w,S,E,p=s.allpts;if(s.ctrlpts.length/2%2==0){var k=(_=(T=p.length/2-1)+2)+2;x=Ke(p[T],p[_],p[k],0),w=Ke(p[T+1],p[_+1],p[k+1],0),S=Ke(p[T],p[_],p[k],1e-4),E=Ke(p[T+1],p[_+1],p[k+1],1e-4)}else{var _,T;k=(_=p.length/2-1)+2;x=Ke(p[T=_-2],p[_],p[k],.4999),w=Ke(p[T+1],p[_+1],p[k+1],.4999),S=Ke(p[T],p[_],p[k],.5),E=Ke(p[T+1],p[_+1],p[k+1],.5)}t=S-x,n=E-w}(s.midtgtArrowAngle=Ge(t,n),s.midDispX=t,s.midDispY=n,t*=-1,n*=-1,f)&&((p=s.allpts).length/2%2==0||(t=-(p[b=(m=p.length/2-1)+2]-p[m]),n=-(p[b+1]-p[m+1])));if(s.midsrcArrowAngle=Ge(t,n),f)t=o-s.segpts[s.segpts.length-2],n=a-s.segpts[s.segpts.length-1];else if(c||d||h||l){var C=(p=s.allpts).length;t=o-Ke(p[C-6],p[C-4],p[C-2],.9),n=a-Ke(p[C-5],p[C-3],p[C-1],.9)}else t=o-v,n=a-g;s.tgtArrowAngle=Ge(t,n)}};Ma.getArrowWidth=Ma.getArrowHeight=function(e,t){var n=this.arrowWidthCache=this.arrowWidthCache||{},r=n[e+", "+t];return r||(r=Math.max(Math.pow(13.37*e,.9),29)*t,n[e+", "+t]=r,r)};var Oa={};function Ia(e){var t=[];if(null!=e){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1];t.push({x:r,y:i})}return t}}Oa.findHaystackPoints=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=n._private,i=r.rscratch;if(!i.haystack){var o=2*Math.random()*Math.PI;i.source={x:Math.cos(o),y:Math.sin(o)},o=2*Math.random()*Math.PI,i.target={x:Math.cos(o),y:Math.sin(o)}}var a=r.source,s=r.target,u=a.position(),l=s.position(),c=a.width(),f=s.width(),d=a.height(),h=s.height(),p=n.pstyle("haystack-radius").value/2;i.haystackPts=i.allpts=[i.source.x*c*p+u.x,i.source.y*d*p+u.y,i.target.x*f*p+l.x,i.target.y*h*p+l.y],i.midX=(i.allpts[0]+i.allpts[2])/2,i.midY=(i.allpts[1]+i.allpts[3])/2,i.edgeType="haystack",i.haystack=!0,this.storeEdgeProjections(n),this.calculateArrowAngles(n),this.recalculateEdgeLabelProjections(n),this.calculateLabelAngles(n)}},Oa.findSegmentsPoints=function(e,t){var n=e._private.rscratch,r=t.posPts,i=t.intersectionPts,o=t.vectorNormInverse,a=e.pstyle("edge-distances").value,s=e.pstyle("segment-weights"),u=e.pstyle("segment-distances"),l=Math.min(s.pfValue.length,u.pfValue.length);n.edgeType="segments",n.segpts=[];for(var c=0;c<l;c++){var f=s.pfValue[c],d=u.pfValue[c],h=1-f,p=f,v="node-position"===a?r:i,g={x:v.x1*h+v.x2*p,y:v.y1*h+v.y2*p};n.segpts.push(g.x+o.x*d,g.y+o.y*d)}},Oa.findLoopPoints=function(e,t,n,r){var i=e._private.rscratch,o=t.dirCounts,a=t.srcPos,s=e.pstyle("control-point-distances"),u=s?s.pfValue[0]:void 0,l=e.pstyle("loop-direction").pfValue,c=e.pstyle("loop-sweep").pfValue,f=e.pstyle("control-point-step-size").pfValue;i.edgeType="self";var d=n,h=f;r&&(d=0,h=u);var p=l-Math.PI/2,v=p-c/2,g=p+c/2,y=String(l+"_"+c);d=void 0===o[y]?o[y]=0:++o[y],i.ctrlpts=[a.x+1.4*Math.cos(v)*h*(d/3+1),a.y+1.4*Math.sin(v)*h*(d/3+1),a.x+1.4*Math.cos(g)*h*(d/3+1),a.y+1.4*Math.sin(g)*h*(d/3+1)]},Oa.findCompoundLoopPoints=function(e,t,n,r){var i=e._private.rscratch;i.edgeType="compound";var o=t.srcPos,a=t.tgtPos,s=t.srcW,u=t.srcH,l=t.tgtW,c=t.tgtH,f=e.pstyle("control-point-step-size").pfValue,d=e.pstyle("control-point-distances"),h=d?d.pfValue[0]:void 0,p=n,v=f;r&&(p=0,v=h);var g={x:o.x-s/2,y:o.y-u/2},y={x:a.x-l/2,y:a.y-c/2},m={x:Math.min(g.x,y.x),y:Math.min(g.y,y.y)},b=Math.max(.5,Math.log(.01*s)),x=Math.max(.5,Math.log(.01*l));i.ctrlpts=[m.x,m.y-(1+Math.pow(50,1.12)/100)*v*(p/3+1)*b,m.x-(1+Math.pow(50,1.12)/100)*v*(p/3+1)*x,m.y]},Oa.findStraightEdgePoints=function(e){e._private.rscratch.edgeType="straight"},Oa.findBezierPoints=function(e,t,n,r,i){var o=e._private.rscratch,a=t.vectorNormInverse,s=t.posPts,u=t.intersectionPts,l=e.pstyle("edge-distances").value,c=e.pstyle("control-point-step-size").pfValue,f=e.pstyle("control-point-distances"),d=e.pstyle("control-point-weights"),h=f&&d?Math.min(f.value.length,d.value.length):1,p=f?f.pfValue[0]:void 0,v=d.value[0],g=r;o.edgeType=g?"multibezier":"bezier",o.ctrlpts=[];for(var y=0;y<h;y++){var m=(.5-t.eles.length/2+n)*c*(i?-1:1),b=void 0,x=He(m);g&&(p=f?f.pfValue[y]:c,v=d.value[y]);var w=void 0!==(b=r?p:void 0!==p?x*p:void 0)?b:m,S=1-v,E=v,k="node-position"===l?s:u,_={x:k.x1*S+k.x2*E,y:k.y1*S+k.y2*E};o.ctrlpts.push(_.x+a.x*w,_.y+a.y*w)}},Oa.findTaxiPoints=function(e,t){var n=e._private.rscratch;n.edgeType="segments";var r=t.posPts,i=t.srcW,o=t.srcH,a=t.tgtW,s=t.tgtH,u="node-position"!==e.pstyle("edge-distances").value,l=e.pstyle("taxi-direction").value,c=l,f=e.pstyle("taxi-turn"),d="%"===f.units,h=d&&f.pfValue<0?1+f.pfValue:f.pfValue,p=e.pstyle("taxi-turn-min-distance").pfValue,v=u?(i+a)/2:0,g=u?(o+s)/2:0,y=r.x2-r.x1,m=r.y2-r.y1,b=function(e,t){return e>0?Math.max(e-t,0):Math.min(e+t,0)},x=b(y,v),w=b(m,g),S=!1;"auto"===l?l=Math.abs(x)>Math.abs(w)?"horizontal":"vertical":"upward"===l||"downward"===l?(l="vertical",S=!0):"leftward"!==l&&"rightward"!==l||(l="horizontal",S=!0);var E="vertical"===l,k=E?w:x,_=E?m:y,T=He(_),C=!1;S&&d||!("downward"===c&&_<0||"upward"===c&&_>0||"leftward"===c&&_>0||"rightward"===c&&_<0)||(k=(T*=-1)*Math.abs(k),C=!0);var P=d?h*k:h*T,D=function(e){return Math.abs(e)<p||Math.abs(e)>=Math.abs(k)},M=D(P),O=D(k-Math.abs(P));if((M||O)&&!C)if(E){var I=Math.abs(_)<=o/2,N=Math.abs(y)<=a/2;if(I){var A=(r.x1+r.x2)/2,L=r.y1,j=r.y2;n.segpts=[A,L,A,j]}else if(N){var B=(r.y1+r.y2)/2,F=r.x1,R=r.x2;n.segpts=[F,B,R,B]}else n.segpts=[r.x1,r.y2]}else{var z=Math.abs(_)<=i/2,V=Math.abs(m)<=s/2;if(z){var q=(r.y1+r.y2)/2,G=r.x1,W=r.x2;n.segpts=[G,q,W,q]}else if(V){var H=(r.x1+r.x2)/2,U=r.y1,Y=r.y2;n.segpts=[H,U,H,Y]}else n.segpts=[r.x2,r.y1]}else if(E){var X=(P<0?r.y2:r.y1)+P+(u?o/2*T:0),K=r.x1,$=r.x2;n.segpts=[K,X,$,X]}else{var Z=(P<0?r.x2:r.x1)+P+(u?i/2*T:0),Q=r.y1,J=r.y2;n.segpts=[Z,Q,Z,J]}},Oa.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if("bezier"===n.edgeType){var r=t.srcPos,i=t.tgtPos,o=t.srcW,a=t.srcH,s=t.tgtW,u=t.tgtH,l=t.srcShape,c=t.tgtShape,f=!E(n.startX)||!E(n.startY),d=!E(n.arrowStartX)||!E(n.arrowStartY),h=!E(n.endX)||!E(n.endY),p=!E(n.arrowEndX)||!E(n.arrowEndY),v=3*(this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth),g=Ue({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),y=g<v,m=Ue({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.endX,y:n.endY}),b=m<v,x=!1;if(f||d||y){x=!0;var w={x:n.ctrlpts[0]-r.x,y:n.ctrlpts[1]-r.y},S=Math.sqrt(w.x*w.x+w.y*w.y),k={x:w.x/S,y:w.y/S},_=Math.max(o,a),T={x:n.ctrlpts[0]+2*k.x*_,y:n.ctrlpts[1]+2*k.y*_},C=l.intersectLine(r.x,r.y,o,a,T.x,T.y,0);y?(n.ctrlpts[0]=n.ctrlpts[0]+k.x*(v-g),n.ctrlpts[1]=n.ctrlpts[1]+k.y*(v-g)):(n.ctrlpts[0]=C[0]+k.x*v,n.ctrlpts[1]=C[1]+k.y*v)}if(h||p||b){x=!0;var P={x:n.ctrlpts[0]-i.x,y:n.ctrlpts[1]-i.y},D=Math.sqrt(P.x*P.x+P.y*P.y),M={x:P.x/D,y:P.y/D},O=Math.max(o,a),I={x:n.ctrlpts[0]+2*M.x*O,y:n.ctrlpts[1]+2*M.y*O},N=c.intersectLine(i.x,i.y,s,u,I.x,I.y,0);b?(n.ctrlpts[0]=n.ctrlpts[0]+M.x*(v-m),n.ctrlpts[1]=n.ctrlpts[1]+M.y*(v-m)):(n.ctrlpts[0]=N[0]+M.x*v,n.ctrlpts[1]=N[1]+M.y*v)}x&&this.findEndpoints(e)}},Oa.storeAllpts=function(e){var t=e._private.rscratch;if("multibezier"===t.edgeType||"bezier"===t.edgeType||"self"===t.edgeType||"compound"===t.edgeType){t.allpts=[],t.allpts.push(t.startX,t.startY);for(var n=0;n+1<t.ctrlpts.length;n+=2)t.allpts.push(t.ctrlpts[n],t.ctrlpts[n+1]),n+3<t.ctrlpts.length&&t.allpts.push((t.ctrlpts[n]+t.ctrlpts[n+2])/2,(t.ctrlpts[n+1]+t.ctrlpts[n+3])/2);var r;t.allpts.push(t.endX,t.endY),t.ctrlpts.length/2%2==0?(r=t.allpts.length/2-1,t.midX=t.allpts[r],t.midY=t.allpts[r+1]):(r=t.allpts.length/2-3,.5,t.midX=Ke(t.allpts[r],t.allpts[r+2],t.allpts[r+4],.5),t.midY=Ke(t.allpts[r+1],t.allpts[r+3],t.allpts[r+5],.5))}else if("straight"===t.edgeType)t.allpts=[t.startX,t.startY,t.endX,t.endY],t.midX=(t.startX+t.endX+t.arrowStartX+t.arrowEndX)/4,t.midY=(t.startY+t.endY+t.arrowStartY+t.arrowEndY)/4;else if("segments"===t.edgeType)if(t.allpts=[],t.allpts.push(t.startX,t.startY),t.allpts.push.apply(t.allpts,t.segpts),t.allpts.push(t.endX,t.endY),t.segpts.length%4==0){var i=t.segpts.length/2,o=i-2;t.midX=(t.segpts[o]+t.segpts[i])/2,t.midY=(t.segpts[o+1]+t.segpts[i+1])/2}else{var a=t.segpts.length/2-1;t.midX=t.segpts[a],t.midY=t.segpts[a+1]}},Oa.checkForInvalidEdgeWarning=function(e){var t=e[0]._private.rscratch;t.nodesOverlap||E(t.startX)&&E(t.startY)&&E(t.endX)&&E(t.endY)?t.loggedErr=!1:t.loggedErr||(t.loggedErr=!0,fe("Edge `"+e.id()+"` has invalid endpoints and so it is impossible to draw.  Adjust your edge style (e.g. control points) accordingly or use an alternative edge type.  This is expected behaviour when the source node and the target node overlap."))},Oa.findEdgeControlPoints=function(e){var t=this;if(e&&0!==e.length){for(var n=this,r=n.cy.hasCompoundNodes(),i={map:new we,get:function(e){var t=this.map.get(e[0]);return null!=t?t.get(e[1]):null},set:function(e,t){var n=this.map.get(e[0]);null==n&&(n=new we,this.map.set(e[0],n)),n.set(e[1],t)}},o=[],a=[],s=0;s<e.length;s++){var u=e[s],l=u._private,c=u.pstyle("curve-style").value;if(!u.removed()&&u.takesUpSpace())if("haystack"!==c){var f="unbundled-bezier"===c||"segments"===c||"straight"===c||"taxi"===c,d="unbundled-bezier"===c||"bezier"===c,h=l.source,p=l.target,v=[h.poolIndex(),p.poolIndex()].sort(),g=i.get(v);null==g&&(g={eles:[]},i.set(v,g),o.push(v)),g.eles.push(u),f&&(g.hasUnbundled=!0),d&&(g.hasBezier=!0)}else a.push(u)}for(var y=function(e){var a=o[e],s=i.get(a),u=void 0;if(!s.hasUnbundled){var l=s.eles[0].parallelEdges().filter((function(e){return e.isBundledBezier()}));me(s.eles),l.forEach((function(e){return s.eles.push(e)})),s.eles.sort((function(e,t){return e.poolIndex()-t.poolIndex()}))}var c=s.eles[0],f=c.source(),d=c.target();if(f.poolIndex()>d.poolIndex()){var h=f;f=d,d=h}var p=s.srcPos=f.position(),v=s.tgtPos=d.position(),g=s.srcW=f.outerWidth(),y=s.srcH=f.outerHeight(),m=s.tgtW=d.outerWidth(),b=s.tgtH=d.outerHeight(),x=s.srcShape=n.nodeShapes[t.getNodeShape(f)],w=s.tgtShape=n.nodeShapes[t.getNodeShape(d)];s.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var S=0;S<s.eles.length;S++){var k=s.eles[S],_=k[0]._private.rscratch,T=k.pstyle("curve-style").value,C="unbundled-bezier"===T||"segments"===T||"taxi"===T,P=!f.same(k.source());if(!s.calculatedIntersection&&f!==d&&(s.hasBezier||s.hasUnbundled)){s.calculatedIntersection=!0;var D=x.intersectLine(p.x,p.y,g,y,v.x,v.y,0),M=s.srcIntn=D,O=w.intersectLine(v.x,v.y,m,b,p.x,p.y,0),I=s.tgtIntn=O,N=s.intersectionPts={x1:D[0],x2:O[0],y1:D[1],y2:O[1]},A=s.posPts={x1:p.x,x2:v.x,y1:p.y,y2:v.y},L=O[1]-D[1],j=O[0]-D[0],B=Math.sqrt(j*j+L*L),F=s.vector={x:j,y:L},R=s.vectorNorm={x:F.x/B,y:F.y/B},z={x:-R.y,y:R.x};s.nodesOverlap=!E(B)||w.checkPoint(D[0],D[1],0,m,b,v.x,v.y)||x.checkPoint(O[0],O[1],0,g,y,p.x,p.y),s.vectorNormInverse=z,u={nodesOverlap:s.nodesOverlap,dirCounts:s.dirCounts,calculatedIntersection:!0,hasBezier:s.hasBezier,hasUnbundled:s.hasUnbundled,eles:s.eles,srcPos:v,tgtPos:p,srcW:m,srcH:b,tgtW:g,tgtH:y,srcIntn:I,tgtIntn:M,srcShape:w,tgtShape:x,posPts:{x1:A.x2,y1:A.y2,x2:A.x1,y2:A.y1},intersectionPts:{x1:N.x2,y1:N.y2,x2:N.x1,y2:N.y1},vector:{x:-F.x,y:-F.y},vectorNorm:{x:-R.x,y:-R.y},vectorNormInverse:{x:-z.x,y:-z.y}}}var V=P?u:s;_.nodesOverlap=V.nodesOverlap,_.srcIntn=V.srcIntn,_.tgtIntn=V.tgtIntn,r&&(f.isParent()||f.isChild()||d.isParent()||d.isChild())&&(f.parents().anySame(d)||d.parents().anySame(f)||f.same(d)&&f.isParent())?t.findCompoundLoopPoints(k,V,S,C):f===d?t.findLoopPoints(k,V,S,C):"segments"===T?t.findSegmentsPoints(k,V):"taxi"===T?t.findTaxiPoints(k,V):"straight"===T||!C&&s.eles.length%2==1&&S===Math.floor(s.eles.length/2)?t.findStraightEdgePoints(k):t.findBezierPoints(k,V,S,C,P),t.findEndpoints(k),t.tryToCorrectInvalidPoints(k,V),t.checkForInvalidEdgeWarning(k),t.storeAllpts(k),t.storeEdgeProjections(k),t.calculateArrowAngles(k),t.recalculateEdgeLabelProjections(k),t.calculateLabelAngles(k)}},m=0;m<o.length;m++)y(m);this.findHaystackPoints(a)}},Oa.getSegmentPoints=function(e){var t=e[0]._private.rscratch;if("segments"===t.edgeType)return this.recalculateRenderedStyle(e),Ia(t.segpts)},Oa.getControlPoints=function(e){var t=e[0]._private.rscratch,n=t.edgeType;if("bezier"===n||"multibezier"===n||"self"===n||"compound"===n)return this.recalculateRenderedStyle(e),Ia(t.ctrlpts)},Oa.getEdgeMidpoint=function(e){var t=e[0]._private.rscratch;return this.recalculateRenderedStyle(e),{x:t.midX,y:t.midY}};var Na={manualEndptToPx:function(e,t){var n=e.position(),r=e.outerWidth(),i=e.outerHeight();if(2===t.value.length){var o=[t.pfValue[0],t.pfValue[1]];return"%"===t.units[0]&&(o[0]=o[0]*r),"%"===t.units[1]&&(o[1]=o[1]*i),o[0]+=n.x,o[1]+=n.y,o}var a=t.pfValue[0];a=-Math.PI/2+a;var s=2*Math.max(r,i),u=[n.x+Math.cos(a)*s,n.y+Math.sin(a)*s];return this.nodeShapes[this.getNodeShape(e)].intersectLine(n.x,n.y,r,i,u[0],u[1],0)},findEndpoints:function(e){var t,n,r,i,o,a=this,s=e.source()[0],u=e.target()[0],l=s.position(),c=u.position(),f=e.pstyle("target-arrow-shape").value,d=e.pstyle("source-arrow-shape").value,h=e.pstyle("target-distance-from-node").pfValue,p=e.pstyle("source-distance-from-node").pfValue,v=e.pstyle("curve-style").value,g=e._private.rscratch,y=g.edgeType,m="self"===y||"compound"===y,b="bezier"===y||"multibezier"===y||m,x="bezier"!==y,w="straight"===y||"segments"===y,S="segments"===y,k=b||x||w,_=m||"taxi"===v,T=e.pstyle("source-endpoint"),C=_?"outside-to-node":T.value,P=e.pstyle("target-endpoint"),D=_?"outside-to-node":P.value;if(g.srcManEndpt=T,g.tgtManEndpt=P,b){var M=[g.ctrlpts[0],g.ctrlpts[1]];n=x?[g.ctrlpts[g.ctrlpts.length-2],g.ctrlpts[g.ctrlpts.length-1]]:M,r=M}else if(w){var O=S?g.segpts.slice(0,2):[c.x,c.y];n=S?g.segpts.slice(g.segpts.length-2):[l.x,l.y],r=O}if("inside-to-node"===D)t=[c.x,c.y];else if(P.units)t=this.manualEndptToPx(u,P);else if("outside-to-line"===D)t=g.tgtIntn;else if("outside-to-node"===D||"outside-to-node-or-label"===D?i=n:"outside-to-line"!==D&&"outside-to-line-or-label"!==D||(i=[l.x,l.y]),t=a.nodeShapes[this.getNodeShape(u)].intersectLine(c.x,c.y,u.outerWidth(),u.outerHeight(),i[0],i[1],0),"outside-to-node-or-label"===D||"outside-to-line-or-label"===D){var I=u._private.rscratch,N=I.labelWidth,A=I.labelHeight,L=I.labelX,j=I.labelY,B=N/2,F=A/2,R=u.pstyle("text-valign").value;"top"===R?j-=F:"bottom"===R&&(j+=F);var z=u.pstyle("text-halign").value;"left"===z?L-=B:"right"===z&&(L+=B);var V=xt(i[0],i[1],[L-B,j-F,L+B,j-F,L+B,j+F,L-B,j+F],c.x,c.y);if(V.length>0){var q=l,G=Ye(q,qe(t)),W=Ye(q,qe(V)),H=G;if(W<G&&(t=V,H=W),V.length>2)Ye(q,{x:V[2],y:V[3]})<H&&(t=[V[2],V[3]])}}var U=wt(t,n,a.arrowShapes[f].spacing(e)+h),Y=wt(t,n,a.arrowShapes[f].gap(e)+h);if(g.endX=Y[0],g.endY=Y[1],g.arrowEndX=U[0],g.arrowEndY=U[1],"inside-to-node"===C)t=[l.x,l.y];else if(T.units)t=this.manualEndptToPx(s,T);else if("outside-to-line"===C)t=g.srcIntn;else if("outside-to-node"===C||"outside-to-node-or-label"===C?o=r:"outside-to-line"!==C&&"outside-to-line-or-label"!==C||(o=[c.x,c.y]),t=a.nodeShapes[this.getNodeShape(s)].intersectLine(l.x,l.y,s.outerWidth(),s.outerHeight(),o[0],o[1],0),"outside-to-node-or-label"===C||"outside-to-line-or-label"===C){var X=s._private.rscratch,K=X.labelWidth,$=X.labelHeight,Z=X.labelX,Q=X.labelY,J=K/2,ee=$/2,te=s.pstyle("text-valign").value;"top"===te?Q-=ee:"bottom"===te&&(Q+=ee);var ne=s.pstyle("text-halign").value;"left"===ne?Z-=J:"right"===ne&&(Z+=J);var re=xt(o[0],o[1],[Z-J,Q-ee,Z+J,Q-ee,Z+J,Q+ee,Z-J,Q+ee],l.x,l.y);if(re.length>0){var ie=c,oe=Ye(ie,qe(t)),ae=Ye(ie,qe(re)),se=oe;if(ae<oe&&(t=[re[0],re[1]],se=ae),re.length>2)Ye(ie,{x:re[2],y:re[3]})<se&&(t=[re[2],re[3]])}}var ue=wt(t,r,a.arrowShapes[d].spacing(e)+p),le=wt(t,r,a.arrowShapes[d].gap(e)+p);g.startX=le[0],g.startY=le[1],g.arrowStartX=ue[0],g.arrowStartY=ue[1],k&&(E(g.startX)&&E(g.startY)&&E(g.endX)&&E(g.endY)?g.badLine=!1:g.badLine=!0)},getSourceEndpoint:function(e){var t=e[0]._private.rscratch;switch(this.recalculateRenderedStyle(e),t.edgeType){case"haystack":return{x:t.haystackPts[0],y:t.haystackPts[1]};default:return{x:t.arrowStartX,y:t.arrowStartY}}},getTargetEndpoint:function(e){var t=e[0]._private.rscratch;switch(this.recalculateRenderedStyle(e),t.edgeType){case"haystack":return{x:t.haystackPts[2],y:t.haystackPts[3]};default:return{x:t.arrowEndX,y:t.arrowEndY}}}},Aa={};function La(e,t,n){for(var r=function(e,t,n,r){return Ke(e,t,n,r)},i=t._private.rstyle.bezierPts,o=0;o<e.bezierProjPcts.length;o++){var a=e.bezierProjPcts[o];i.push({x:r(n[0],n[2],n[4],a),y:r(n[1],n[3],n[5],a)})}}Aa.storeEdgeProjections=function(e){var t=e._private,n=t.rscratch,r=n.edgeType;if(t.rstyle.bezierPts=null,t.rstyle.linePts=null,t.rstyle.haystackPts=null,"multibezier"===r||"bezier"===r||"self"===r||"compound"===r){t.rstyle.bezierPts=[];for(var i=0;i+5<n.allpts.length;i+=4)La(this,e,n.allpts.slice(i,i+6))}else if("segments"===r){var o=t.rstyle.linePts=[];for(i=0;i+1<n.allpts.length;i+=2)o.push({x:n.allpts[i],y:n.allpts[i+1]})}else if("haystack"===r){var a=n.haystackPts;t.rstyle.haystackPts=[{x:a[0],y:a[1]},{x:a[2],y:a[3]}]}t.rstyle.arrowWidth=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth},Aa.recalculateEdgeProjections=function(e){this.findEdgeControlPoints(e)};var ja={recalculateNodeLabelProjection:function(e){var t=e.pstyle("label").strValue;if(!M(t)){var n,r,i=e._private,o=e.width(),a=e.height(),s=e.padding(),u=e.position(),l=e.pstyle("text-halign").strValue,c=e.pstyle("text-valign").strValue,f=i.rscratch,d=i.rstyle;switch(l){case"left":n=u.x-o/2-s;break;case"right":n=u.x+o/2+s;break;default:n=u.x}switch(c){case"top":r=u.y-a/2-s;break;case"bottom":r=u.y+a/2+s;break;default:r=u.y}f.labelX=n,f.labelY=r,d.labelX=n,d.labelY=r,this.applyLabelDimensions(e)}}},Ba=function(e,t){var n=Math.atan(t/e);return 0===e&&n<0&&(n*=-1),n},Fa=function(e,t){var n=t.x-e.x,r=t.y-e.y;return Ba(n,r)};ja.recalculateEdgeLabelProjections=function(e){var t,n=e._private,r=n.rscratch,i=this,o={mid:e.pstyle("label").strValue,source:e.pstyle("source-label").strValue,target:e.pstyle("target-label").strValue};if(o.mid||o.source||o.target){t={x:r.midX,y:r.midY};var a=function(e,t,r){xe(n.rscratch,e,t,r),xe(n.rstyle,e,t,r)};a("labelX",null,t.x),a("labelY",null,t.y);var s=Ba(r.midDispX,r.midDispY);a("labelAutoAngle",null,s);var u=function(s){var u,l="source"===s;if(o[s]){var c=e.pstyle(s+"-text-offset").pfValue;switch(r.edgeType){case"self":case"compound":case"bezier":case"multibezier":for(var f,d=function e(){if(e.cache)return e.cache;for(var t=[],o=0;o+5<r.allpts.length;o+=4){var a={x:r.allpts[o],y:r.allpts[o+1]},s={x:r.allpts[o+2],y:r.allpts[o+3]},u={x:r.allpts[o+4],y:r.allpts[o+5]};t.push({p0:a,p1:s,p2:u,startDist:0,length:0,segments:[]})}var l=n.rstyle.bezierPts,c=i.bezierProjPcts.length;function f(e,t,n,r,i){var o=Ue(t,n),a=e.segments[e.segments.length-1],s={p0:t,p1:n,t0:r,t1:i,startDist:a?a.startDist+a.length:0,length:o};e.segments.push(s),e.length+=o}for(var d=0;d<t.length;d++){var h=t[d],p=t[d-1];p&&(h.startDist=p.startDist+p.length),f(h,h.p0,l[d*c],0,i.bezierProjPcts[0]);for(var v=0;v<c-1;v++)f(h,l[d*c+v],l[d*c+v+1],i.bezierProjPcts[v],i.bezierProjPcts[v+1]);f(h,l[d*c+c-1],h.p2,i.bezierProjPcts[c-1],1)}return e.cache=t}(),h=0,p=0,v=0;v<d.length;v++){for(var g=d[l?v:d.length-1-v],y=0;y<g.segments.length;y++){var m=g.segments[l?y:g.segments.length-1-y],b=v===d.length-1&&y===g.segments.length-1;if(h=p,(p+=m.length)>=c||b){f={cp:g,segment:m};break}}if(f)break}var x=f.cp,w=f.segment,S=(c-h)/w.length,E=w.t1-w.t0,k=l?w.t0+E*S:w.t1-E*S;k=Ze(0,k,1),t=$e(x.p0,x.p1,x.p2,k),u=function(e,t,n,r){var i=Ze(0,r-.001,1),o=Ze(0,r+.001,1),a=$e(e,t,n,i),s=$e(e,t,n,o);return Fa(a,s)}(x.p0,x.p1,x.p2,k);break;case"straight":case"segments":case"haystack":for(var _,T,C,P,D=0,M=r.allpts.length,O=0;O+3<M&&(l?(C={x:r.allpts[O],y:r.allpts[O+1]},P={x:r.allpts[O+2],y:r.allpts[O+3]}):(C={x:r.allpts[M-2-O],y:r.allpts[M-1-O]},P={x:r.allpts[M-4-O],y:r.allpts[M-3-O]}),T=D,!((D+=_=Ue(C,P))>=c));O+=2);var I=(c-T)/_;I=Ze(0,I,1),t=function(e,t,n,r){var i=t.x-e.x,o=t.y-e.y,a=Ue(e,t),s=i/a,u=o/a;return n=null==n?0:n,r=null!=r?r:n*a,{x:e.x+s*r,y:e.y+u*r}}(C,P,I),u=Fa(C,P)}a("labelX",s,t.x),a("labelY",s,t.y),a("labelAutoAngle",s,u)}};u("source"),u("target"),this.applyLabelDimensions(e)}},ja.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},ja.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),i=this.calculateLabelDimensions(e,r),o=e.pstyle("line-height").pfValue,a=e.pstyle("text-wrap").strValue,s=be(n.rscratch,"labelWrapCachedLines",t)||[],u="wrap"!==a?1:Math.max(s.length,1),l=i.height/u,c=l*o,f=i.width,d=i.height+(u-1)*(o-1)*l;xe(n.rstyle,"labelWidth",t,f),xe(n.rscratch,"labelWidth",t,f),xe(n.rstyle,"labelHeight",t,d),xe(n.rscratch,"labelHeight",t,d),xe(n.rscratch,"labelLineHeight",t,c)},ja.getLabelText=function(e,t){var n=e._private,r=t?t+"-":"",i=e.pstyle(r+"label").strValue,o=e.pstyle("text-transform").value,a=function(e,r){return r?(xe(n.rscratch,e,t,r),r):be(n.rscratch,e,t)};if(!i)return"";"none"==o||("uppercase"==o?i=i.toUpperCase():"lowercase"==o&&(i=i.toLowerCase()));var s=e.pstyle("text-wrap").value;if("wrap"===s){var u=a("labelKey");if(null!=u&&a("labelWrapKey")===u)return a("labelWrapCachedText");for(var l=i.split("\n"),c=e.pstyle("text-max-width").pfValue,f="anywhere"===e.pstyle("text-overflow-wrap").value,d=[],h=/[\s\u200b]+/,p=f?"":" ",v=0;v<l.length;v++){var g=l[v],y=this.calculateLabelDimensions(e,g).width;if(f){var m=g.split("").join("​");g=m}if(y>c){for(var b=g.split(h),x="",w=0;w<b.length;w++){var S=b[w],E=0===x.length?S:x+p+S;this.calculateLabelDimensions(e,E).width<=c?x+=S+p:(x&&d.push(x),x=S+p)}x.match(/^[\s\u200b]+$/)||d.push(x)}else d.push(g)}a("labelWrapCachedLines",d),i=a("labelWrapCachedText",d.join("\n")),a("labelWrapKey",u)}else if("ellipsis"===s){for(var k=e.pstyle("text-max-width").pfValue,_="",T=!1,C=0;C<i.length;C++){if(this.calculateLabelDimensions(e,_+i[C]+"…").width>k)break;_+=i[C],C===i.length-1&&(T=!0)}return T||(_+="…"),_}return i},ja.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,n=e.pstyle("text-halign").strValue;if("auto"!==t)return t;if(!e.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},ja.calculateLabelDimensions=function(e,t){var n=Q(t,e._private.labelDimsKey),r=this.labelDimCache||(this.labelDimCache=[]),i=r[n];if(null!=i)return i;var o=e.pstyle("font-style").strValue,a=1*e.pstyle("font-size").pfValue+"px",s=e.pstyle("font-family").strValue,u=e.pstyle("font-weight").strValue,l=this.labelCalcDiv;l||(l=this.labelCalcDiv=document.createElement("div"),document.body.appendChild(l));var c=l.style;return c.fontFamily=s,c.fontStyle=o,c.fontSize=a,c.fontWeight=u,c.position="absolute",c.left="-9999px",c.top="-9999px",c.zIndex="-1",c.visibility="hidden",c.pointerEvents="none",c.padding="0",c.lineHeight="1",c.whiteSpace="pre",l.textContent=t,r[n]={width:Math.ceil(l.clientWidth/1),height:Math.ceil(l.clientHeight/1)}},ja.calculateLabelAngle=function(e,t){var n=e._private.rscratch,r=e.isEdge(),i=t?t+"-":"",o=e.pstyle(i+"text-rotation"),a=o.strValue;return"none"===a?0:r&&"autorotate"===a?n.labelAutoAngle:"autorotate"===a?0:o.pfValue},ja.calculateLabelAngles=function(e){var t=this,n=e.isEdge(),r=e._private.rscratch;r.labelAngle=t.calculateLabelAngle(e),n&&(r.sourceLabelAngle=t.calculateLabelAngle(e,"source"),r.targetLabelAngle=t.calculateLabelAngle(e,"target"))};var Ra={},za=!1;Ra.getNodeShape=function(e){var t=e.pstyle("shape").value;if("cutrectangle"===t&&(e.width()<28||e.height()<28))return za||(fe("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),za=!0),"rectangle";if(e.isParent())return"rectangle"===t||"roundrectangle"===t||"cutrectangle"===t||"barrel"===t?t:"rectangle";if("polygon"===t){var n=e.pstyle("shape-polygon-points").value;return this.nodeShapes.makePolygon(n).name}return t};var Va={registerCalculationListeners:function(){var e=this.cy,t=e.collection(),n=this,r=function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(t.merge(e),n)for(var r=0;r<e.length;r++){var i=e[r],o=i._private,a=o.rstyle;a.clean=!1,a.cleanConnected=!1}};n.binder(e).on("bounds.* dirty.*",(function(e){var t=e.target;r(t)})).on("style.* background.*",(function(e){var t=e.target;r(t,!1)}));var i=function(i){if(i){for(var o=n.onUpdateEleCalcsFns,a=0;a<t.length;a++){var s=t[a],u=s._private.rstyle;s.isNode()&&!u.cleanConnected&&(r(s.connectedEdges()),u.cleanConnected=!0)}if(o)for(var l=0;l<o.length;l++){(0,o[l])(i,t)}n.recalculateRenderedStyle(t),t=e.collection()}};n.flushRenderedStyleQueue=function(){i(!0)},n.beforeRender(i,n.beforeRenderPriorities.eleCalcs)},onUpdateEleCalcs:function(e){(this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[]).push(e)},recalculateRenderedStyle:function(e,t){var n=function(e){return e._private.rstyle.cleanConnected},r=[],i=[];if(!this.destroyed){void 0===t&&(t=!0);for(var o=0;o<e.length;o++){var a=e[o],s=a._private,u=s.rstyle;!a.isEdge()||n(a.source())&&n(a.target())||(u.clean=!1),t&&u.clean||a.removed()||"none"!==a.pstyle("display").value&&("nodes"===s.group?i.push(a):r.push(a),u.clean=!0)}for(var l=0;l<i.length;l++){var c=i[l],f=c._private.rstyle,d=c.position();this.recalculateNodeLabelProjection(c),f.nodeX=d.x,f.nodeY=d.y,f.nodeW=c.pstyle("width").pfValue,f.nodeH=c.pstyle("height").pfValue}this.recalculateEdgeProjections(r);for(var h=0;h<r.length;h++){var p=r[h]._private,v=p.rstyle,g=p.rscratch;v.srcX=g.arrowStartX,v.srcY=g.arrowStartY,v.tgtX=g.arrowEndX,v.tgtY=g.arrowEndY,v.midX=g.midX,v.midY=g.midY,v.labelAngle=g.labelAngle,v.sourceLabelAngle=g.sourceLabelAngle,v.targetLabelAngle=g.targetLabelAngle}}}},qa={updateCachedGrabbedEles:function(){var e=this.cachedZSortedEles;if(e){e.drag=[],e.nondrag=[];for(var t=[],n=0;n<e.length;n++){var r=(i=e[n])._private.rscratch;i.grabbed()&&!i.isParent()?t.push(i):r.inDragLayer?e.drag.push(i):e.nondrag.push(i)}for(n=0;n<t.length;n++){var i=t[n];e.drag.push(i)}}},invalidateCachedZSortedEles:function(){this.cachedZSortedEles=null},getCachedZSortedEles:function(e){if(e||!this.cachedZSortedEles){var t=this.cy.mutableElements().toArray();t.sort(Di),t.interactive=t.filter((function(e){return e.interactive()})),this.cachedZSortedEles=t,this.updateCachedGrabbedEles()}else t=this.cachedZSortedEles;return t}},Ga={};[Da,Ma,Oa,Na,Aa,ja,Ra,Va,qa].forEach((function(e){R(Ga,e)}));var Wa={getCachedImage:function(e,t,n){var r=this.imageCache=this.imageCache||{},i=r[e];if(i)return i.image.complete||i.image.addEventListener("load",n),i.image;var o=(i=r[e]=r[e]||{}).image=new Image;o.addEventListener("load",n),o.addEventListener("error",(function(){o.error=!0}));return"data:"===e.substring(0,"data:".length).toLowerCase()||(o.crossOrigin=t),o.src=e,o}},Ha={registerBinding:function(e,t,n,r){var i=Array.prototype.slice.apply(arguments,[1]),o=this.binder(e);return o.on.apply(o,i)}};Ha.binder=function(e){var t,n=this,r=e===window||e===document||e===document.body||(t=e,"undefined"!=typeof HTMLElement&&t instanceof HTMLElement);if(null==n.supportsPassiveEvents){var i=!1;try{var o=Object.defineProperty({},"passive",{get:function(){return i=!0,!0}});window.addEventListener("test",null,o)}catch(e){}n.supportsPassiveEvents=i}var a=function(t,i,o){var a=Array.prototype.slice.call(arguments);return r&&n.supportsPassiveEvents&&(a[2]={capture:null!=o&&o,passive:!1,once:!1}),n.bindings.push({target:e,args:a}),(e.addEventListener||e.on).apply(e,a),this};return{on:a,addEventListener:a,addListener:a,bind:a}},Ha.nodeIsDraggable=function(e){return e&&e.isNode()&&!e.locked()&&e.grabbable()},Ha.nodeIsGrabbable=function(e){return this.nodeIsDraggable(e)&&e.interactive()},Ha.load=function(){var e=this,t=function(e){return e.selected()},n=function(t,n,r,i){null==t&&(t=e.cy);for(var o=0;o<n.length;o++){var a=n[o];t.emit({originalEvent:r,type:a,position:i})}},r=function(e){return e.shiftKey||e.metaKey||e.ctrlKey},o=function(t,n){var r=!0;if(e.cy.hasCompoundNodes()&&t&&t.pannable())for(var i=0;n&&i<n.length;i++){if((t=n[i]).isNode()&&t.isParent()){r=!1;break}}else r=!0;return r},a=function(e){e[0]._private.rscratch.inDragLayer=!0},s=function(e){e[0]._private.rscratch.isGrabTarget=!0},u=function(e,t){var n=t.addToList;n.has(e)||(n.merge(e),function(e){e[0]._private.grabbed=!0}(e))},l=function(t,n){n=n||{};var r=t.cy().hasCompoundNodes();n.inDragLayer&&(t.forEach(a),t.neighborhood().stdFilter((function(e){return!r||e.isEdge()})).forEach(a)),n.addToList&&t.forEach((function(e){u(e,n)})),function(e,t){if(e.cy().hasCompoundNodes()&&(null!=t.inDragLayer||null!=t.addToList)){var n=e.descendants();t.inDragLayer&&(n.forEach(a),n.connectedEdges().forEach(a)),t.addToList&&t.addToList.unmerge(n)}}(t,n),d(t,{inDragLayer:n.inDragLayer}),e.updateCachedGrabbedEles()},c=l,f=function(t){t&&(e.getCachedZSortedEles().forEach((function(e){!function(e){e[0]._private.grabbed=!1}(e),function(e){e[0]._private.rscratch.inDragLayer=!1}(e),function(e){e[0]._private.rscratch.isGrabTarget=!1}(e)})),e.updateCachedGrabbedEles())},d=function(e,t){if((null!=t.inDragLayer||null!=t.addToList)&&e.cy().hasCompoundNodes()){var n=e.ancestors().orphans();if(!n.same(e)){var r=n.descendants().spawnSelf().merge(n).unmerge(e).unmerge(e.descendants()),i=r.connectedEdges();t.inDragLayer&&(i.forEach(a),r.forEach(a)),t.addToList&&r.forEach((function(e){u(e,t)}))}}},h=function(){null!=document.activeElement&&null!=document.activeElement.blur&&document.activeElement.blur()},p="undefined"!=typeof MutationObserver,v="undefined"!=typeof ResizeObserver;p?(e.removeObserver=new MutationObserver((function(t){for(var n=0;n<t.length;n++){var r=t[n].removedNodes;if(r)for(var i=0;i<r.length;i++){if(r[i]===e.container){e.destroy();break}}}})),e.container.parentNode&&e.removeObserver.observe(e.container.parentNode,{childList:!0})):e.registerBinding(e.container,"DOMNodeRemoved",(function(t){e.destroy()}));var g=i((function(){e.cy.resize()}),100);p&&(e.styleObserver=new MutationObserver(g),e.styleObserver.observe(e.container,{attributes:!0})),e.registerBinding(window,"resize",g),v&&(e.resizeObserver=new ResizeObserver(g),e.resizeObserver.observe(e.container));var y=function(){e.invalidateContainerClientCoordsCache()};!function(e,t){for(;null!=e;)t(e),e=e.parentNode}(e.container,(function(t){e.registerBinding(t,"transitionend",y),e.registerBinding(t,"animationend",y),e.registerBinding(t,"scroll",y)})),e.registerBinding(e.container,"contextmenu",(function(e){e.preventDefault()}));var m=function(t){for(var n=e.findContainerClientCoords(),r=n[0],i=n[1],o=n[2],a=n[3],s=t.touches?t.touches:[t],u=!1,l=0;l<s.length;l++){var c=s[l];if(r<=c.clientX&&c.clientX<=r+o&&i<=c.clientY&&c.clientY<=i+a){u=!0;break}}if(!u)return!1;for(var f=e.container,d=t.target.parentNode,h=!1;d;){if(d===f){h=!0;break}d=d.parentNode}return!!h};e.registerBinding(e.container,"mousedown",(function(t){if(m(t)){t.preventDefault(),h(),e.hoverData.capture=!0,e.hoverData.which=t.which;var r=e.cy,i=[t.clientX,t.clientY],o=e.projectIntoViewport(i[0],i[1]),a=e.selection,u=e.findNearestElements(o[0],o[1],!0,!1),f=u[0],d=e.dragData.possibleDragElements;e.hoverData.mdownPos=o,e.hoverData.mdownGPos=i;if(3==t.which){e.hoverData.cxtStarted=!0;var p={originalEvent:t,type:"cxttapstart",position:{x:o[0],y:o[1]}};f?(f.activate(),f.emit(p),e.hoverData.down=f):r.emit(p),e.hoverData.downTime=(new Date).getTime(),e.hoverData.cxtDragged=!1}else if(1==t.which){if(f&&f.activate(),null!=f&&e.nodeIsGrabbable(f)){var v=function(e){return{originalEvent:t,type:e,position:{x:o[0],y:o[1]}}};if(s(f),f.selected()){d=e.dragData.possibleDragElements=r.collection();var g=r.$((function(t){return t.isNode()&&t.selected()&&e.nodeIsGrabbable(t)}));l(g,{addToList:d}),f.emit(v("grabon")),g.forEach((function(e){e.emit(v("grab"))}))}else d=e.dragData.possibleDragElements=r.collection(),c(f,{addToList:d}),f.emit(v("grabon")).emit(v("grab"));e.redrawHint("eles",!0),e.redrawHint("drag",!0)}e.hoverData.down=f,e.hoverData.downs=u,e.hoverData.downTime=(new Date).getTime(),n(f,["mousedown","tapstart","vmousedown"],t,{x:o[0],y:o[1]}),null==f?(a[4]=1,e.data.bgActivePosistion={x:o[0],y:o[1]},e.redrawHint("select",!0),e.redraw()):f.pannable()&&(a[4]=1),e.hoverData.tapholdCancelled=!1,clearTimeout(e.hoverData.tapholdTimeout),e.hoverData.tapholdTimeout=setTimeout((function(){if(!e.hoverData.tapholdCancelled){var n=e.hoverData.down;n?n.emit({originalEvent:t,type:"taphold",position:{x:o[0],y:o[1]}}):r.emit({originalEvent:t,type:"taphold",position:{x:o[0],y:o[1]}})}}),e.tapholdDuration)}a[0]=a[2]=o[0],a[1]=a[3]=o[1]}}),!1),e.registerBinding(window,"mousemove",(function(t){if(e.hoverData.capture||m(t)){var i=!1,a=e.cy,s=a.zoom(),u=[t.clientX,t.clientY],c=e.projectIntoViewport(u[0],u[1]),d=e.hoverData.mdownPos,h=e.hoverData.mdownGPos,p=e.selection,v=null;e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.selecting||(v=e.findNearestElement(c[0],c[1],!0,!1));var g,y=e.hoverData.last,b=e.hoverData.down,x=[c[0]-p[2],c[1]-p[3]],w=e.dragData.possibleDragElements;if(h){var S=u[0]-h[0],k=S*S,_=u[1]-h[1],T=k+_*_;e.hoverData.isOverThresholdDrag=g=T>=e.desktopTapThreshold2}var C=r(t);g&&(e.hoverData.tapholdCancelled=!0);i=!0,n(v,["mousemove","vmousemove","tapdrag"],t,{x:c[0],y:c[1]});var P=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||a.emit({originalEvent:t,type:"boxstart",position:{x:c[0],y:c[1]}}),p[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(g){var D={originalEvent:t,type:"cxtdrag",position:{x:c[0],y:c[1]}};b?b.emit(D):a.emit(D),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&v===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:c[0],y:c[1]}}),e.hoverData.cxtOver=v,v&&v.emit({originalEvent:t,type:"cxtdragover",position:{x:c[0],y:c[1]}}))}}else if(e.hoverData.dragging){if(i=!0,a.panningEnabled()&&a.userPanningEnabled()){var M;if(e.hoverData.justStartedPan){var O=e.hoverData.mdownPos;M={x:(c[0]-O[0])*s,y:(c[1]-O[1])*s},e.hoverData.justStartedPan=!1}else M={x:x[0]*s,y:x[1]*s};a.panBy(M),e.hoverData.dragged=!0}c=e.projectIntoViewport(t.clientX,t.clientY)}else if(1!=p[4]||null!=b&&!b.pannable()){if(b&&b.pannable()&&b.active()&&b.unactivate(),b&&b.grabbed()||v==y||(y&&n(y,["mouseout","tapdragout"],t,{x:c[0],y:c[1]}),v&&n(v,["mouseover","tapdragover"],t,{x:c[0],y:c[1]}),e.hoverData.last=v),b)if(g){if(a.boxSelectionEnabled()&&C)b&&b.grabbed()&&(f(w),b.emit("freeon"),w.emit("free"),e.dragData.didDrag&&(b.emit("dragfreeon"),w.emit("dragfree"))),P();else if(b&&b.grabbed()&&e.nodeIsDraggable(b)){var I=!e.dragData.didDrag;I&&e.redrawHint("eles",!0),e.dragData.didDrag=!0;var N=a.collection();e.hoverData.draggingEles||l(w,{inDragLayer:!0});var A={x:0,y:0};if(E(x[0])&&E(x[1])&&(A.x+=x[0],A.y+=x[1],I)){var L=e.hoverData.dragDelta;L&&E(L[0])&&E(L[1])&&(A.x+=L[0],A.y+=L[1])}for(var j=0;j<w.length;j++){var B=w[j];e.nodeIsDraggable(B)&&B.grabbed()&&N.merge(B)}e.hoverData.draggingEles=!0,N.silentShift(A).emit("position drag"),e.redrawHint("drag",!0),e.redraw()}}else!function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(x[0]),t.push(x[1])):(t[0]+=x[0],t[1]+=x[1])}();i=!0}else if(g){if(e.hoverData.dragging||!a.boxSelectionEnabled()||!C&&a.panningEnabled()&&a.userPanningEnabled()){if(!e.hoverData.selecting&&a.panningEnabled()&&a.userPanningEnabled()){o(b,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,p[4]=0,e.data.bgActivePosistion=qe(d),e.redrawHint("select",!0),e.redraw())}}else P();b&&b.pannable()&&b.active()&&b.unactivate()}return p[2]=c[0],p[3]=c[1],i?(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1):void 0}}),!1),e.registerBinding(window,"mouseup",(function(i){if(e.hoverData.capture){e.hoverData.capture=!1;var o=e.cy,a=e.projectIntoViewport(i.clientX,i.clientY),s=e.selection,u=e.findNearestElement(a[0],a[1],!0,!1),l=e.dragData.possibleDragElements,c=e.hoverData.down,d=r(i);if(e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,c&&c.unactivate(),3===e.hoverData.which){var h={originalEvent:i,type:"cxttapend",position:{x:a[0],y:a[1]}};if(c?c.emit(h):o.emit(h),!e.hoverData.cxtDragged){var p={originalEvent:i,type:"cxttap",position:{x:a[0],y:a[1]}};c?c.emit(p):o.emit(p)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(n(u,["mouseup","tapend","vmouseup"],i,{x:a[0],y:a[1]}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||n(c,["click","tap","vclick"],i,{x:a[0],y:a[1]}),null!=c||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||r(i)||(o.$(t).unselect(["tapunselect"]),l.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=l=o.collection()),u!=c||e.dragData.didDrag||e.hoverData.selecting||null!=u&&u._private.selectable&&(e.hoverData.dragging||("additive"===o.selectionType()||d?u.selected()?u.unselect(["tapunselect"]):u.select(["tapselect"]):d||(o.$(t).unmerge(u).unselect(["tapunselect"]),u.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var v=o.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),v.length>0&&e.redrawHint("eles",!0),o.emit({type:"boxend",originalEvent:i,position:{x:a[0],y:a[1]}});var g=function(e){return e.selectable()&&!e.selected()};"additive"===o.selectionType()||d||o.$(t).unmerge(v).unselect(),v.emit("box").stdFilter(g).select().emit("boxselect"),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var y=c&&c.grabbed();f(l),y&&(c.emit("freeon"),l.emit("free"),e.dragData.didDrag&&(c.emit("dragfreeon"),l.emit("dragfree")))}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null}}),!1);var b,x,w,S,k,_,T,C,P,D,M,O,I;e.registerBinding(e.container,"wheel",(function(t){if(!e.scrollingPage){var n,r=e.cy,i=e.projectIntoViewport(t.clientX,t.clientY),o=[i[0]*r.zoom()+r.pan().x,i[1]*r.zoom()+r.pan().y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||0!==e.selection[4])t.preventDefault();else if(r.panningEnabled()&&r.userPanningEnabled()&&r.zoomingEnabled()&&r.userZoomingEnabled())t.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout((function(){e.data.wheelZooming=!1,e.redrawHint("eles",!0),e.redraw()}),150),n=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,n*=e.wheelSensitivity,1===t.deltaMode&&(n*=33),r.zoom({level:r.zoom()*Math.pow(10,n),renderedPosition:{x:o[0],y:o[1]}})}}),!0),e.registerBinding(window,"scroll",(function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout((function(){e.scrollingPage=!1}),250)}),!0),e.registerBinding(e.container,"mouseout",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseout",position:{x:n[0],y:n[1]}})}),!1),e.registerBinding(e.container,"mouseover",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseover",position:{x:n[0],y:n[1]}})}),!1);var N,A,L,j,B=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},F=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",N=function(t){if(m(t)){h(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var r=e.cy,i=e.touchData.now,o=e.touchData.earlier;if(t.touches[0]){var a=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);i[0]=a[0],i[1]=a[1]}if(t.touches[1]){a=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);i[2]=a[0],i[3]=a[1]}if(t.touches[2]){a=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);i[4]=a[0],i[5]=a[1]}if(t.touches[1]){e.touchData.singleTouchMoved=!0,f(e.dragData.touchDragEles);var u=e.findContainerClientCoords();P=u[0],D=u[1],M=u[2],O=u[3],b=t.touches[0].clientX-P,x=t.touches[0].clientY-D,w=t.touches[1].clientX-P,S=t.touches[1].clientY-D,I=0<=b&&b<=M&&0<=w&&w<=M&&0<=x&&x<=O&&0<=S&&S<=O;var d=r.pan(),p=r.zoom();k=B(b,x,w,S),_=F(b,x,w,S),C=[((T=[(b+w)/2,(x+S)/2])[0]-d.x)/p,(T[1]-d.y)/p];if(_<4e4&&!t.touches[2]){var v=e.findNearestElement(i[0],i[1],!0,!0),g=e.findNearestElement(i[2],i[3],!0,!0);return v&&v.isNode()?(v.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start=v):g&&g.isNode()?(g.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start=g):r.emit({originalEvent:t,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,void e.redraw()}}if(t.touches[2])r.boxSelectionEnabled()&&t.preventDefault();else if(t.touches[1]);else if(t.touches[0]){var y=e.findNearestElements(i[0],i[1],!0,!0),E=y[0];if(null!=E&&(E.activate(),e.touchData.start=E,e.touchData.starts=y,e.nodeIsGrabbable(E))){var N=e.dragData.touchDragEles=r.collection(),A=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),E.selected()?(A=r.$((function(t){return t.selected()&&e.nodeIsGrabbable(t)})),l(A,{addToList:N})):c(E,{addToList:N}),s(E);var L=function(e){return{originalEvent:t,type:e,position:{x:i[0],y:i[1]}}};E.emit(L("grabon")),A?A.forEach((function(e){e.emit(L("grab"))})):E.emit(L("grab"))}n(E,["touchstart","tapstart","vmousedown"],t,{x:i[0],y:i[1]}),null==E&&(e.data.bgActivePosistion={x:a[0],y:a[1]},e.redrawHint("select",!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout((function(){!1!==e.touchData.singleTouchMoved||e.pinching||e.touchData.selecting||n(e.touchData.start,["taphold"],t,{x:i[0],y:i[1]})}),e.tapholdDuration)}if(t.touches.length>=1){for(var j=e.touchData.startPosition=[],R=0;R<i.length;R++)j[R]=o[R]=i[R];var z=t.touches[0];e.touchData.startGPosition=[z.clientX,z.clientY]}}},!1),e.registerBinding(window,"touchmove",A=function(t){var r=e.touchData.capture;if(r||m(t)){var i=e.selection,a=e.cy,s=e.touchData.now,u=e.touchData.earlier,c=a.zoom();if(t.touches[0]){var d=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);s[0]=d[0],s[1]=d[1]}if(t.touches[1]){d=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);s[2]=d[0],s[3]=d[1]}if(t.touches[2]){d=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);s[4]=d[0],s[5]=d[1]}var h,p=e.touchData.startGPosition;if(r&&t.touches[0]&&p){for(var v=[],g=0;g<s.length;g++)v[g]=s[g]-u[g];var y=t.touches[0].clientX-p[0],T=y*y,M=t.touches[0].clientY-p[1];h=T+M*M>=e.touchTapThreshold2}if(r&&e.touchData.cxt){t.preventDefault();var O=t.touches[0].clientX-P,N=t.touches[0].clientY-D,A=t.touches[1].clientX-P,L=t.touches[1].clientY-D,j=F(O,N,A,L);if(j/_>=2.25||j>=22500){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var R={originalEvent:t,type:"cxttapend",position:{x:s[0],y:s[1]}};e.touchData.start?(e.touchData.start.unactivate().emit(R),e.touchData.start=null):a.emit(R)}}if(r&&e.touchData.cxt){R={originalEvent:t,type:"cxtdrag",position:{x:s[0],y:s[1]}};e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(R):a.emit(R),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var z=e.findNearestElement(s[0],s[1],!0,!0);e.touchData.cxtOver&&z===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:s[0],y:s[1]}}),e.touchData.cxtOver=z,z&&z.emit({originalEvent:t,type:"cxtdragover",position:{x:s[0],y:s[1]}}))}else if(r&&t.touches[2]&&a.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||a.emit({originalEvent:t,type:"boxstart",position:{x:s[0],y:s[1]}}),e.touchData.selecting=!0,e.touchData.didSelect=!0,i[4]=1,i&&0!==i.length&&void 0!==i[0]?(i[2]=(s[0]+s[2]+s[4])/3,i[3]=(s[1]+s[3]+s[5])/3):(i[0]=(s[0]+s[2]+s[4])/3,i[1]=(s[1]+s[3]+s[5])/3,i[2]=(s[0]+s[2]+s[4])/3+1,i[3]=(s[1]+s[3]+s[5])/3+1),e.redrawHint("select",!0),e.redraw();else if(r&&t.touches[1]&&!e.touchData.didSelect&&a.zoomingEnabled()&&a.panningEnabled()&&a.userZoomingEnabled()&&a.userPanningEnabled()){if(t.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),ee=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var V=0;V<ee.length;V++){var q=ee[V]._private;q.grabbed=!1,q.rscratch.inDragLayer=!1}}var G=e.touchData.start,W=(O=t.touches[0].clientX-P,N=t.touches[0].clientY-D,A=t.touches[1].clientX-P,L=t.touches[1].clientY-D,B(O,N,A,L)),H=W/k;if(I){var U=(O-b+(A-w))/2,Y=(N-x+(L-S))/2,X=a.zoom(),K=X*H,$=a.pan(),Z=C[0]*X+$.x,Q=C[1]*X+$.y,J={x:-K/X*(Z-$.x-U)+Z,y:-K/X*(Q-$.y-Y)+Q};if(G&&G.active()){var ee=e.dragData.touchDragEles;f(ee),e.redrawHint("drag",!0),e.redrawHint("eles",!0),G.unactivate().emit("freeon"),ee.emit("free"),e.dragData.didDrag&&(G.emit("dragfreeon"),ee.emit("dragfree"))}a.viewport({zoom:K,pan:J,cancelOnFailedZoom:!0}),k=W,b=O,x=N,w=A,S=L,e.pinching=!0}if(t.touches[0]){d=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);s[0]=d[0],s[1]=d[1]}if(t.touches[1]){d=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);s[2]=d[0],s[3]=d[1]}if(t.touches[2]){d=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);s[4]=d[0],s[5]=d[1]}}else if(t.touches[0]&&!e.touchData.didSelect){var te=e.touchData.start,ne=e.touchData.last;if(e.hoverData.draggingEles||e.swipePanning||(z=e.findNearestElement(s[0],s[1],!0,!0)),r&&null!=te&&t.preventDefault(),r&&null!=te&&e.nodeIsDraggable(te))if(h){ee=e.dragData.touchDragEles;var re=!e.dragData.didDrag;re&&l(ee,{inDragLayer:!0}),e.dragData.didDrag=!0;var ie={x:0,y:0};if(E(v[0])&&E(v[1]))if(ie.x+=v[0],ie.y+=v[1],re)e.redrawHint("eles",!0),(oe=e.touchData.dragDelta)&&E(oe[0])&&E(oe[1])&&(ie.x+=oe[0],ie.y+=oe[1]);e.hoverData.draggingEles=!0,ee.silentShift(ie).emit("position drag"),e.redrawHint("drag",!0),e.touchData.startPosition[0]==u[0]&&e.touchData.startPosition[1]==u[1]&&e.redrawHint("eles",!0),e.redraw()}else{var oe;0===(oe=e.touchData.dragDelta=e.touchData.dragDelta||[]).length?(oe.push(v[0]),oe.push(v[1])):(oe[0]+=v[0],oe[1]+=v[1])}if(n(te||z,["touchmove","tapdrag","vmousemove"],t,{x:s[0],y:s[1]}),te&&te.grabbed()||z==ne||(ne&&ne.emit({originalEvent:t,type:"tapdragout",position:{x:s[0],y:s[1]}}),z&&z.emit({originalEvent:t,type:"tapdragover",position:{x:s[0],y:s[1]}})),e.touchData.last=z,r)for(V=0;V<s.length;V++)s[V]&&e.touchData.startPosition[V]&&h&&(e.touchData.singleTouchMoved=!0);if(r&&(null==te||te.pannable())&&a.panningEnabled()&&a.userPanningEnabled()){o(te,e.touchData.starts)&&(t.preventDefault(),e.data.bgActivePosistion||(e.data.bgActivePosistion=qe(e.touchData.startPosition)),e.swipePanning?a.panBy({x:v[0]*c,y:v[1]*c}):h&&(e.swipePanning=!0,a.panBy({x:y*c,y:M*c}),te&&(te.unactivate(),e.redrawHint("select",!0),e.touchData.start=null)));d=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);s[0]=d[0],s[1]=d[1]}}for(g=0;g<s.length;g++)u[g]=s[g];r&&t.touches.length>0&&!e.hoverData.draggingEles&&!e.swipePanning&&null!=e.data.bgActivePosistion&&(e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.redraw())}},!1),e.registerBinding(window,"touchcancel",L=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(window,"touchend",j=function(r){var i=e.touchData.start;if(e.touchData.capture){0===r.touches.length&&(e.touchData.capture=!1),r.preventDefault();var o=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var a,s=e.cy,u=s.zoom(),l=e.touchData.now,c=e.touchData.earlier;if(r.touches[0]){var d=e.projectIntoViewport(r.touches[0].clientX,r.touches[0].clientY);l[0]=d[0],l[1]=d[1]}if(r.touches[1]){d=e.projectIntoViewport(r.touches[1].clientX,r.touches[1].clientY);l[2]=d[0],l[3]=d[1]}if(r.touches[2]){d=e.projectIntoViewport(r.touches[2].clientX,r.touches[2].clientY);l[4]=d[0],l[5]=d[1]}if(i&&i.unactivate(),e.touchData.cxt){if(a={originalEvent:r,type:"cxttapend",position:{x:l[0],y:l[1]}},i?i.emit(a):s.emit(a),!e.touchData.cxtDragged){var h={originalEvent:r,type:"cxttap",position:{x:l[0],y:l[1]}};i?i.emit(h):s.emit(h)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!r.touches[2]&&s.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var p=s.collection(e.getAllInBox(o[0],o[1],o[2],o[3]));o[0]=void 0,o[1]=void 0,o[2]=void 0,o[3]=void 0,o[4]=0,e.redrawHint("select",!0),s.emit({type:"boxend",originalEvent:r,position:{x:l[0],y:l[1]}});p.emit("box").stdFilter((function(e){return e.selectable()&&!e.selected()})).select().emit("boxselect"),p.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=i&&i.unactivate(),r.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(r.touches[1]);else if(r.touches[0]);else if(!r.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var v=e.dragData.touchDragEles;if(null!=i){var g=i._private.grabbed;f(v),e.redrawHint("drag",!0),e.redrawHint("eles",!0),g&&(i.emit("freeon"),v.emit("free"),e.dragData.didDrag&&(i.emit("dragfreeon"),v.emit("dragfree"))),n(i,["touchend","tapend","vmouseup","tapdragout"],r,{x:l[0],y:l[1]}),i.unactivate(),e.touchData.start=null}else{var y=e.findNearestElement(l[0],l[1],!0,!0);n(y,["touchend","tapend","vmouseup","tapdragout"],r,{x:l[0],y:l[1]})}var m=e.touchData.startPosition[0]-l[0],b=m*m,x=e.touchData.startPosition[1]-l[1],w=(b+x*x)*u*u;e.touchData.singleTouchMoved||(i||s.$(":selected").unselect(["tapunselect"]),n(i,["tap","vclick"],r,{x:l[0],y:l[1]})),null!=i&&!e.dragData.didDrag&&i._private.selectable&&w<e.touchTapThreshold2&&!e.pinching&&("single"===s.selectionType()?(s.$(t).unmerge(i).unselect(["tapunselect"]),i.select(["tapselect"])):i.selected()?i.unselect(["tapunselect"]):i.select(["tapselect"]),e.redrawHint("eles",!0)),e.touchData.singleTouchMoved=!0}for(var S=0;S<l.length;S++)c[S]=l[S];e.dragData.didDrag=!1,0===r.touches.length&&(e.touchData.dragDelta=[],e.touchData.startPosition=null,e.touchData.startGPosition=null,e.touchData.didSelect=!1),r.touches.length<2&&(1===r.touches.length&&(e.touchData.startGPosition=[r.touches[0].clientX,r.touches[0].clientY]),e.pinching=!1,e.redrawHint("eles",!0),e.redraw())}},!1),"undefined"==typeof TouchEvent){var R=[],z=function(e){return{clientX:e.clientX,clientY:e.clientY,force:1,identifier:e.pointerId,pageX:e.pageX,pageY:e.pageY,radiusX:e.width/2,radiusY:e.height/2,screenX:e.screenX,screenY:e.screenY,target:e.target}},V=function(e){R.push(function(e){return{event:e,touch:z(e)}}(e))},q=function(e){for(var t=0;t<R.length;t++){if(R[t].event.pointerId===e.pointerId)return void R.splice(t,1)}},G=function(e){e.touches=R.map((function(e){return e.touch}))},W=function(e){return"mouse"===e.pointerType||4===e.pointerType};e.registerBinding(e.container,"pointerdown",(function(e){W(e)||(e.preventDefault(),V(e),G(e),N(e))})),e.registerBinding(e.container,"pointerup",(function(e){W(e)||(q(e),G(e),j(e))})),e.registerBinding(e.container,"pointercancel",(function(e){W(e)||(q(e),G(e),L())})),e.registerBinding(e.container,"pointermove",(function(e){W(e)||(e.preventDefault(),function(e){var t=R.filter((function(t){return t.event.pointerId===e.pointerId}))[0];t.event=e,t.touch=z(e)}(e),G(e),A(e))}))}};var Ua={generatePolygon:function(e,t){return this.nodeShapes[e]={renderer:this,name:e,points:t,draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl("polygon",e,t,n,r,i,this.points)},intersectLine:function(e,t,n,r,i,o,a){return xt(i,o,this.points,e,t,n/2,r/2,a)},checkPoint:function(e,t,n,r,i,o,a){return ht(e,t,this.points,o,a,r,i,[0,-1],n)}}}};Ua.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},intersectLine:function(e,t,n,r,i,o,a){return function(e,t,n,r,i,o){var a=n-e,s=r-t;a/=i,s/=o;var u=Math.sqrt(a*a+s*s),l=u-1;if(l<0)return[];var c=l/u;return[(n-e)*c+e,(r-t)*c+t]}(i,o,e,t,n/2+a,r/2+a)},checkPoint:function(e,t,n,r,i,o,a){return gt(e,t,r,i,o,a,n)}}},Ua.generateRoundPolygon=function(e,t){for(var n=new Array(2*t.length),r=0;r<t.length/2;r++){var i=2*r,o=void 0;o=r<t.length/2-1?2*(r+1):0,n[4*r]=t[i],n[4*r+1]=t[i+1];var a=t[o]-t[i],s=t[o+1]-t[i+1],u=Math.sqrt(a*a+s*s);n[4*r+2]=a/u,n[4*r+3]=s/u}return this.nodeShapes[e]={renderer:this,name:e,points:n,draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl("round-polygon",e,t,n,r,i,this.points)},intersectLine:function(e,t,n,r,i,o,a){return function(e,t,n,r,i,o,a,s){for(var u,l=[],c=new Array(n.length),f=o/2,d=a/2,h=Tt(o,a),p=0;p<n.length/4;p++){var v,g=void 0;g=0===p?n.length-2:4*p-2,v=4*p+2;var y=r+f*n[4*p],m=i+d*n[4*p+1],b=-n[g]*n[v]-n[g+1]*n[v+1],x=h/Math.tan(Math.acos(b)/2),w=y-x*n[g],S=m-x*n[g+1],E=y+x*n[v],k=m+x*n[v+1];0===p?(c[n.length-2]=w,c[n.length-1]=S):(c[4*p-2]=w,c[4*p-1]=S),c[4*p]=E,c[4*p+1]=k;var _=n[g+1],T=-n[g];_*n[v]+T*n[v+1]<0&&(_*=-1,T*=-1),0!==(u=yt(e,t,r,i,w+_*h,S+T*h,h)).length&&l.push(u[0],u[1])}for(var C=0;C<c.length/4;C++)0!==(u=bt(e,t,r,i,c[4*C],c[4*C+1],c[4*C+2],c[4*C+3],!1)).length&&l.push(u[0],u[1]);if(l.length>2){for(var P=[l[0],l[1]],D=Math.pow(P[0]-e,2)+Math.pow(P[1]-t,2),M=1;M<l.length/2;M++){var O=Math.pow(l[2*M]-e,2)+Math.pow(l[2*M+1]-t,2);O<=D&&(P[0]=l[2*M],P[1]=l[2*M+1],D=O)}return P}return l}(i,o,this.points,e,t,n,r)},checkPoint:function(e,t,n,r,i,o,a){return function(e,t,n,r,i,o,a){for(var s=new Array(n.length),u=o/2,l=a/2,c=Tt(o,a),f=c*c,d=0;d<n.length/4;d++){var h,p=void 0;p=0===d?n.length-2:4*d-2,h=4*d+2;var v=r+u*n[4*d],g=i+l*n[4*d+1],y=-n[p]*n[h]-n[p+1]*n[h+1],m=c/Math.tan(Math.acos(y)/2),b=v-m*n[p],x=g-m*n[p+1],w=v+m*n[h],S=g+m*n[h+1];s[4*d]=b,s[4*d+1]=x,s[4*d+2]=w,s[4*d+3]=S;var E=n[p+1],k=-n[p];E*n[h]+k*n[h+1]<0&&(E*=-1,k*=-1);var _=b+E*c,T=x+k*c;if(Math.pow(_-e,2)+Math.pow(T-t,2)<=f)return!0}return dt(e,t,s)}(e,t,this.points,o,a,r,i)}}},Ua.generateRoundRectangle=function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:St(4,0),draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},intersectLine:function(e,t,n,r,i,o,a){return st(i,o,e,t,n,r,a)},checkPoint:function(e,t,n,r,i,o,a){var s=_t(r,i),u=2*s;return!!ht(e,t,this.points,o,a,r,i-u,[0,-1],n)||(!!ht(e,t,this.points,o,a,r-u,i,[0,-1],n)||(!!gt(e,t,u,u,o-r/2+s,a-i/2+s,n)||(!!gt(e,t,u,u,o+r/2-s,a-i/2+s,n)||(!!gt(e,t,u,u,o+r/2-s,a+i/2-s,n)||!!gt(e,t,u,u,o-r/2+s,a+i/2-s,n)))))}}},Ua.generateCutRectangle=function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:8,points:St(4,0),draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},generateCutTrianglePts:function(e,t,n,r){var i=this.cornerLength,o=t/2,a=e/2,s=n-a,u=n+a,l=r-o,c=r+o;return{topLeft:[s,l+i,s+i,l,s+i,l+i],topRight:[u-i,l,u,l+i,u-i,l+i],bottomRight:[u,c-i,u-i,c,u-i,c-i],bottomLeft:[s+i,c,s,c-i,s+i,c-i]}},intersectLine:function(e,t,n,r,i,o,a){var s=this.generateCutTrianglePts(n+2*a,r+2*a,e,t),u=[].concat.apply([],[s.topLeft.splice(0,4),s.topRight.splice(0,4),s.bottomRight.splice(0,4),s.bottomLeft.splice(0,4)]);return xt(i,o,u,e,t)},checkPoint:function(e,t,n,r,i,o,a){if(ht(e,t,this.points,o,a,r,i-2*this.cornerLength,[0,-1],n))return!0;if(ht(e,t,this.points,o,a,r-2*this.cornerLength,i,[0,-1],n))return!0;var s=this.generateCutTrianglePts(r,i,o,a);return dt(e,t,s.topLeft)||dt(e,t,s.topRight)||dt(e,t,s.bottomRight)||dt(e,t,s.bottomLeft)}}},Ua.generateBarrel=function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:St(4,0),draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},intersectLine:function(e,t,n,r,i,o,a){var s=this.generateBarrelBezierPts(n+2*a,r+2*a,e,t),u=function(e){var t=$e({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.15),n=$e({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.5),r=$e({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.85);return[e[0],e[1],t.x,t.y,n.x,n.y,r.x,r.y,e[4],e[5]]},l=[].concat(u(s.topLeft),u(s.topRight),u(s.bottomRight),u(s.bottomLeft));return xt(i,o,l,e,t)},generateBarrelBezierPts:function(e,t,n,r){var i=t/2,o=e/2,a=n-o,s=n+o,u=r-i,l=r+i,c=Ct(e,t),f=c.heightOffset,d=c.widthOffset,h=c.ctrlPtOffsetPct*e,p={topLeft:[a,u+f,a+h,u,a+d,u],topRight:[s-d,u,s-h,u,s,u+f],bottomRight:[s,l-f,s-h,l,s-d,l],bottomLeft:[a+d,l,a+h,l,a,l-f]};return p.topLeft.isTop=!0,p.topRight.isTop=!0,p.bottomLeft.isBottom=!0,p.bottomRight.isBottom=!0,p},checkPoint:function(e,t,n,r,i,o,a){var s=Ct(r,i),u=s.heightOffset,l=s.widthOffset;if(ht(e,t,this.points,o,a,r,i-2*u,[0,-1],n))return!0;if(ht(e,t,this.points,o,a,r-2*l,i,[0,-1],n))return!0;for(var c=this.generateBarrelBezierPts(r,i,o,a),f=function(e,t,n){var r,i,o=n[4],a=n[2],s=n[0],u=n[5],l=n[1],c=Math.min(o,s),f=Math.max(o,s),d=Math.min(u,l),h=Math.max(u,l);if(c<=e&&e<=f&&d<=t&&t<=h){var p=[(r=o)-2*(i=a)+s,2*(i-r),r],v=function(e,t,n,r){var i=t*t-4*e*(n-=r);if(i<0)return[];var o=Math.sqrt(i),a=2*e;return[(-t+o)/a,(-t-o)/a]}(p[0],p[1],p[2],e).filter((function(e){return 0<=e&&e<=1}));if(v.length>0)return v[0]}return null},d=Object.keys(c),h=0;h<d.length;h++){var p=c[d[h]],v=f(e,t,p);if(null!=v){var g=p[5],y=p[3],m=p[1],b=Ke(g,y,m,v);if(p.isTop&&b<=t)return!0;if(p.isBottom&&t<=b)return!0}}return!1}}},Ua.generateBottomRoundrectangle=function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:St(4,0),draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},intersectLine:function(e,t,n,r,i,o,a){var s=t-(r/2+a),u=bt(i,o,e,t,e-(n/2+a),s,e+(n/2+a),s,!1);return u.length>0?u:st(i,o,e,t,n,r,a)},checkPoint:function(e,t,n,r,i,o,a){var s=_t(r,i),u=2*s;if(ht(e,t,this.points,o,a,r,i-u,[0,-1],n))return!0;if(ht(e,t,this.points,o,a,r-u,i,[0,-1],n))return!0;var l=r/2+2*n,c=i/2+2*n;return!!dt(e,t,[o-l,a-c,o-l,a,o+l,a,o+l,a-c])||(!!gt(e,t,u,u,o+r/2-s,a+i/2-s,n)||!!gt(e,t,u,u,o-r/2+s,a+i/2-s,n))}}},Ua.registerNodeShapes=function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",St(3,0)),this.generateRoundPolygon("round-triangle",St(3,0)),this.generatePolygon("rectangle",St(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",St(5,0)),this.generateRoundPolygon("round-pentagon",St(5,0)),this.generatePolygon("hexagon",St(6,0)),this.generateRoundPolygon("round-hexagon",St(6,0)),this.generatePolygon("heptagon",St(7,0)),this.generateRoundPolygon("round-heptagon",St(7,0)),this.generatePolygon("octagon",St(8,0)),this.generateRoundPolygon("round-octagon",St(8,0));var r=new Array(20),i=kt(5,0),o=kt(5,Math.PI/5),a=.5*(3-Math.sqrt(5));a*=1.57;for(var s=0;s<o.length/2;s++)o[2*s]*=a,o[2*s+1]*=a;for(s=0;s<5;s++)r[4*s]=i[2*s],r[4*s+1]=i[2*s+1],r[4*s+2]=o[2*s],r[4*s+3]=o[2*s+1];r=Et(r),this.generatePolygon("star",r),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),this.nodeShapes.concavehexagon=this.generatePolygon("concave-hexagon",[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]);var u=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon("tag",u),this.generateRoundPolygon("round-tag",u),e.makePolygon=function(e){var n,r="polygon-"+e.join("$");return(n=this[r])?n:t.generatePolygon(r,e)}};var Ya={timeToRender:function(){return this.redrawTotalTime/this.redrawCount},redraw:function(e){e=e||ve();var t=this;void 0===t.averageRedrawTime&&(t.averageRedrawTime=0),void 0===t.lastRedrawTime&&(t.lastRedrawTime=0),void 0===t.lastDrawTime&&(t.lastDrawTime=0),t.requestedFrame=!0,t.renderOptions=e},beforeRender:function(e,t){if(!this.destroyed){null==t&&le("Priority is not optional for beforeRender");var n=this.beforeRenderCallbacks;n.push({fn:e,priority:t}),n.sort((function(e,t){return t.priority-e.priority}))}}},Xa=function(e,t,n){for(var r=e.beforeRenderCallbacks,i=0;i<r.length;i++)r[i].fn(t,n)};Ya.startRenderLoop=function(){var e=this,t=e.cy;if(!e.renderLoopStarted){e.renderLoopStarted=!0;Y((function n(r){if(!e.destroyed){if(t.batching());else if(e.requestedFrame&&!e.skipFrame){Xa(e,!0,r);var i=X();e.render(e.renderOptions);var o=e.lastDrawTime=X();void 0===e.averageRedrawTime&&(e.averageRedrawTime=o-i),void 0===e.redrawCount&&(e.redrawCount=0),e.redrawCount++,void 0===e.redrawTotalTime&&(e.redrawTotalTime=0);var a=o-i;e.redrawTotalTime+=a,e.lastRedrawTime=a,e.averageRedrawTime=e.averageRedrawTime/2+a/2,e.requestedFrame=!1}else Xa(e,!1,r);e.skipFrame=!1,Y(n)}}))}};var Ka=function(e){this.init(e)},$a=Ka.prototype;$a.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],$a.init=function(e){var t=this;t.options=e,t.cy=e.cy;var n=t.container=e.cy.container();if(d){var r=d.document,i=r.head,o="__________cytoscape_container",a=null!=r.getElementById("__________cytoscape_stylesheet");if(n.className.indexOf(o)<0&&(n.className=(n.className||"")+" "+o),!a){var s=r.createElement("style");s.id="__________cytoscape_stylesheet",s.innerHTML="."+o+" { position: relative; }",i.insertBefore(s,i.children[0])}"static"===d.getComputedStyle(n).getPropertyValue("position")&&fe("A Cytoscape container has style position:static and so can not use UI extensions properly")}t.selection=[void 0,void 0,void 0,void 0,0],t.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],t.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},t.dragData={possibleDragElements:[]},t.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},t.redraws=0,t.showFps=e.showFps,t.debug=e.debug,t.hideEdgesOnViewport=e.hideEdgesOnViewport,t.textureOnViewport=e.textureOnViewport,t.wheelSensitivity=e.wheelSensitivity,t.motionBlurEnabled=e.motionBlur,t.forcedPixelRatio=E(e.pixelRatio)?e.pixelRatio:null,t.motionBlur=e.motionBlur,t.motionBlurOpacity=e.motionBlurOpacity,t.motionBlurTransparency=1-t.motionBlurOpacity,t.motionBlurPxRatio=1,t.mbPxRBlurry=1,t.minMbLowQualFrames=4,t.fullQualityMb=!1,t.clearedForMotionBlur=[],t.desktopTapThreshold=e.desktopTapThreshold,t.desktopTapThreshold2=e.desktopTapThreshold*e.desktopTapThreshold,t.touchTapThreshold=e.touchTapThreshold,t.touchTapThreshold2=e.touchTapThreshold*e.touchTapThreshold,t.tapholdDuration=500,t.bindings=[],t.beforeRenderCallbacks=[],t.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},t.registerNodeShapes(),t.registerArrowShapes(),t.registerCalculationListeners()},$a.notify=function(e,t){var n=this,r=n.cy;this.destroyed||("init"!==e?"destroy"!==e?(("add"===e||"remove"===e||"move"===e&&r.hasCompoundNodes()||"load"===e||"zorder"===e||"mount"===e)&&n.invalidateCachedZSortedEles(),"viewport"===e&&n.redrawHint("select",!0),"load"!==e&&"resize"!==e&&"mount"!==e||(n.invalidateContainerClientCoordsCache(),n.matchCanvasSize(n.container)),n.redrawHint("eles",!0),n.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()):n.destroy():n.load())},$a.destroy=function(){var e=this;e.destroyed=!0,e.cy.stopAnimationLoop();for(var t=0;t<e.bindings.length;t++){var n=e.bindings[t],r=n.target;(r.off||r.removeEventListener).apply(r,n.args)}if(e.bindings=[],e.beforeRenderCallbacks=[],e.onUpdateEleCalcsFns=[],e.removeObserver&&e.removeObserver.disconnect(),e.styleObserver&&e.styleObserver.disconnect(),e.resizeObserver&&e.resizeObserver.disconnect(),e.labelCalcDiv)try{document.body.removeChild(e.labelCalcDiv)}catch(e){}},$a.isHeadless=function(){return!1},[Pa,Ga,Wa,Ha,Ua,Ya].forEach((function(e){R($a,e)}));var Za=function(e){return function(){var t=this,n=this.renderer;if(!t.dequeueingSetup){t.dequeueingSetup=!0;var r=i((function(){n.redrawHint("eles",!0),n.redrawHint("drag",!0),n.redraw()}),e.deqRedrawThreshold),o=e.priority||ue;n.beforeRender((function(i,o){var a=X(),s=n.averageRedrawTime,u=n.lastRedrawTime,l=[],c=n.cy.extent(),f=n.getPixelRatio();for(i||n.flushRenderedStyleQueue();;){var d=X(),h=d-a,p=d-o;if(u<1e3/60){var v=1e3/60-(i?s:0);if(p>=e.deqFastCost*v)break}else if(i){if(h>=e.deqCost*u||h>=e.deqAvgCost*s)break}else if(p>=e.deqNoDrawCost*(1e3/60))break;var g=e.deq(t,f,c);if(!(g.length>0))break;for(var y=0;y<g.length;y++)l.push(g[y])}l.length>0&&(e.onDeqd(t,l),!i&&e.shouldRedraw(t,l,f,c)&&r())}),o(t))}}},Qa=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ae;s(this,e),this.idsByKey=new we,this.keyForId=new we,this.cachesByLvl=new we,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=n}return l(e,[{key:"getIdsFor",value:function(e){null==e&&le("Can not get id list for null key");var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new Ee,t.set(e,n)),n}},{key:"addIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).add(t)}},{key:"deleteIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).delete(t)}},{key:"getNumberOfIdsForKey",value:function(e){return null==e?0:this.getIdsFor(e).size}},{key:"updateKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)}},{key:"deleteKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)}},{key:"keyHasChangedFor",value:function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)}},{key:"isInvalid",value:function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)}},{key:"getCachesAt",value:function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new we,t.set(e,r),n.push(e)),r}},{key:"getCache",value:function(e,t){return this.getCachesAt(t).get(e)}},{key:"get",value:function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return null!=r&&this.updateKeyMappingFor(e),r}},{key:"getForCachedKey",value:function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)}},{key:"hasCache",value:function(e,t){return this.getCachesAt(t).has(e)}},{key:"has",value:function(e,t){var n=this.getKey(e);return this.hasCache(n,t)}},{key:"setCache",value:function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)}},{key:"set",value:function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)}},{key:"deleteCache",value:function(e,t){this.getCachesAt(t).delete(e)}},{key:"delete",value:function(e,t){var n=this.getKey(e);this.deleteCache(n,t)}},{key:"invalidateKey",value:function(e){var t=this;this.lvls.forEach((function(n){return t.deleteCache(e,n)}))}},{key:"invalidate",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}]),e}(),Ja={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},es=ge({getKey:null,doesEleInvalidateKey:ae,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:oe,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),ts=function(e,t){this.renderer=e,this.onDequeues=[];var n=es(t);R(this,n),this.lookup=new Qa(n.getKey,n.doesEleInvalidateKey),this.setupDequeueing()},ns=ts.prototype;ns.reasons=Ja,ns.getTextureQueue=function(e){return this.eleImgCaches=this.eleImgCaches||{},this.eleImgCaches[e]=this.eleImgCaches[e]||[]},ns.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},ns.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new o((function(e,t){return t.reqs-e.reqs}))},ns.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},ns.getElement=function(e,t,n,r,i){var o=this,a=this.renderer,s=a.cy.zoom(),u=this.lookup;if(0===t.w||0===t.h||isNaN(t.w)||isNaN(t.h)||!e.visible())return null;if(!o.allowEdgeTxrCaching&&e.isEdge()||!o.allowParentTxrCaching&&e.isParent())return null;if(null==r&&(r=Math.ceil(We(s*n))),r<-4)r=-4;else if(s>=7.99||r>3)return null;var l=Math.pow(2,r),c=t.h*l,f=t.w*l,d=a.eleTextBiggerThanMin(e,l);if(!this.isVisible(e,d))return null;var h,p=u.get(e,r);if(p&&p.invalidated&&(p.invalidated=!1,p.texture.invalidatedWidth-=p.width),p)return p;if(h=c<=25?25:c<=50?50:50*Math.ceil(c/50),c>1024||f>1024)return null;var v=o.getTextureQueue(h),g=v[v.length-2],y=function(){return o.recycleTexture(h,f)||o.addTexture(h,f)};g||(g=v[v.length-1]),g||(g=y()),g.width-g.usedWidth<f&&(g=y());for(var m,b=function(e){return e&&e.scaledLabelShown===d},x=i&&i===Ja.dequeue,w=i&&i===Ja.highQuality,S=i&&i===Ja.downscale,E=r+1;E<=3;E++){var k=u.get(e,E);if(k){m=k;break}}var _=m&&m.level===r+1?m:null,T=function(){g.context.drawImage(_.texture.canvas,_.x,0,_.width,_.height,g.usedWidth,0,f,c)};if(g.context.setTransform(1,0,0,1,0,0),g.context.clearRect(g.usedWidth,0,f,h),b(_))T();else if(b(m)){if(!w)return o.queueElement(e,m.level-1),m;for(var C=m.level;C>r;C--)_=o.getElement(e,t,n,C,Ja.downscale);T()}else{var P;if(!x&&!w&&!S)for(var D=r-1;D>=-4;D--){var M=u.get(e,D);if(M){P=M;break}}if(b(P))return o.queueElement(e,r),P;g.context.translate(g.usedWidth,0),g.context.scale(l,l),this.drawElement(g.context,e,t,d,!1),g.context.scale(1/l,1/l),g.context.translate(-g.usedWidth,0)}return p={x:g.usedWidth,texture:g,level:r,scale:l,width:f,height:c,scaledLabelShown:d},g.usedWidth+=Math.ceil(f+8),g.eleCaches.push(p),u.set(e,r,p),o.checkTextureFullness(g),p},ns.invalidateElements=function(e){for(var t=0;t<e.length;t++)this.invalidateElement(e[t])},ns.invalidateElement=function(e){var t=this.lookup,n=[];if(t.isInvalid(e)){for(var r=-4;r<=3;r++){var i=t.getForCachedKey(e,r);i&&n.push(i)}if(t.invalidate(e))for(var o=0;o<n.length;o++){var a=n[o],s=a.texture;s.invalidatedWidth+=a.width,a.invalidated=!0,this.checkTextureUtility(s)}this.removeFromQueue(e)}},ns.checkTextureUtility=function(e){e.invalidatedWidth>=.2*e.width&&this.retireTexture(e)},ns.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>.8&&e.fullnessChecks>=10?ye(t,e):e.fullnessChecks++},ns.retireTexture=function(e){var t=e.height,n=this.getTextureQueue(t),r=this.lookup;ye(n,e),e.retired=!0;for(var i=e.eleCaches,o=0;o<i.length;o++){var a=i[o];r.deleteCache(a.key,a.level)}me(i),this.getRetiredTextureQueue(t).push(e)},ns.addTexture=function(e,t){var n={};return this.getTextureQueue(e).push(n),n.eleCaches=[],n.height=e,n.width=Math.max(1024,t),n.usedWidth=0,n.invalidatedWidth=0,n.fullnessChecks=0,n.canvas=this.renderer.makeOffscreenCanvas(n.width,n.height),n.context=n.canvas.getContext("2d"),n},ns.recycleTexture=function(e,t){for(var n=this.getTextureQueue(e),r=this.getRetiredTextureQueue(e),i=0;i<r.length;i++){var o=r[i];if(o.width>=t)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,me(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),ye(r,o),n.push(o),o}},ns.queueElement=function(e,t){var n=this.getElementQueue(),r=this.getElementKeyToQueue(),i=this.getKey(e),o=r[i];if(o)o.level=Math.max(o.level,t),o.eles.merge(e),o.reqs++,n.updateItem(o);else{var a={eles:e.spawn().merge(e),level:t,reqs:1,key:i};n.push(a),r[i]=a}},ns.dequeue=function(e){for(var t=this.getElementQueue(),n=this.getElementKeyToQueue(),r=[],i=this.lookup,o=0;o<1&&t.size()>0;o++){var a=t.pop(),s=a.key,u=a.eles[0],l=i.hasCache(u,a.level);if(n[s]=null,!l){r.push(a);var c=this.getBoundingBox(u);this.getElement(u,c,e,a.level,Ja.dequeue)}}return r},ns.removeFromQueue=function(e){var t=this.getElementQueue(),n=this.getElementKeyToQueue(),r=this.getKey(e),i=n[r];null!=i&&(1===i.eles.length?(i.reqs=ie,t.updateItem(i),t.pop(),n[r]=null):i.eles.unmerge(e))},ns.onDequeue=function(e){this.onDequeues.push(e)},ns.offDequeue=function(e){ye(this.onDequeues,e)},ns.setupDequeueing=Za({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n<e.onDequeues.length;n++){(0,e.onDequeues[n])(t)}},shouldRedraw:function(e,t,n,r){for(var i=0;i<t.length;i++)for(var o=t[i].eles,a=0;a<o.length;a++){var s=o[a].boundingBox();if(it(s,r))return!0}return!1},priority:function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq}});var rs=function(e){var t=this,n=t.renderer=e,r=n.cy;t.layersByLevel={},t.firstGet=!0,t.lastInvalidationTime=X()-500,t.skipping=!1,t.eleTxrDeqs=r.collection(),t.scheduleElementRefinement=i((function(){t.refineElementTextures(t.eleTxrDeqs),t.eleTxrDeqs.unmerge(t.eleTxrDeqs)}),50),n.beforeRender((function(e,n){n-t.lastInvalidationTime<=250?t.skipping=!0:t.skipping=!1}),n.beforeRenderPriorities.lyrTxrSkip);t.layersQueue=new o((function(e,t){return t.reqs-e.reqs})),t.setupDequeueing()},is=rs.prototype,os=0,as=Math.pow(2,53)-1;is.makeLayer=function(e,t){var n=Math.pow(2,t),r=Math.ceil(e.w*n),i=Math.ceil(e.h*n),o=this.renderer.makeOffscreenCanvas(r,i),a={id:os=++os%as,bb:e,level:t,width:r,height:i,canvas:o,context:o.getContext("2d"),eles:[],elesQueue:[],reqs:0},s=a.context,u=-a.bb.x1,l=-a.bb.y1;return s.scale(n,n),s.translate(u,l),a},is.getLayers=function(e,t,n){var r=this,i=r.renderer.cy.zoom(),o=r.firstGet;if(r.firstGet=!1,null==n)if((n=Math.ceil(We(i*t)))<-4)n=-4;else if(i>=3.99||n>2)return null;r.validateLayersElesOrdering(n,e);var a,s,u=r.layersByLevel,l=Math.pow(2,n),c=u[n]=u[n]||[];if(r.levelIsComplete(n,e))return c;!function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return s=u[t],!0},i=function(e){if(!s)for(var r=n+e;-4<=r&&r<=2&&!t(r);r+=e);};i(1),i(-1);for(var o=c.length-1;o>=0;o--){var a=c[o];a.invalid&&ye(c,a)}}();var f=function(t){var i=(t=t||{}).after;if(function(){if(!a){a=Qe();for(var t=0;t<e.length;t++)n=a,r=e[t].boundingBox(),n.x1=Math.min(n.x1,r.x1),n.x2=Math.max(n.x2,r.x2),n.w=n.x2-n.x1,n.y1=Math.min(n.y1,r.y1),n.y2=Math.max(n.y2,r.y2),n.h=n.y2-n.y1}var n,r}(),a.w*l*(a.h*l)>16e6)return null;var o=r.makeLayer(a,n);if(null!=i){var s=c.indexOf(i)+1;c.splice(s,0,o)}else(void 0===t.insert||t.insert)&&c.unshift(o);return o};if(r.skipping&&!o)return null;for(var d=null,h=e.length/1,p=!o,v=0;v<e.length;v++){var g=e[v],y=g._private.rscratch,m=y.imgLayerCaches=y.imgLayerCaches||{},b=m[n];if(b)d=b;else{if((!d||d.eles.length>=h||!at(d.bb,g.boundingBox()))&&!(d=f({insert:!0,after:d})))return null;s||p?r.queueLayer(d,g):r.drawEleInLayer(d,g,n,t),d.eles.push(g),m[n]=d}}return s||(p?null:c)},is.getEleLevelForLayerLevel=function(e,t){return e},is.drawEleInLayer=function(e,t,n,r){var i=this.renderer,o=e.context,a=t.boundingBox();0!==a.w&&0!==a.h&&t.visible()&&(n=this.getEleLevelForLayerLevel(n,r),i.setImgSmoothing(o,!1),i.drawCachedElement(o,t,null,null,n,!0),i.setImgSmoothing(o,!0))},is.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,i=0;i<n.length;i++){var o=n[i];if(o.reqs>0)return!1;if(o.invalid)return!1;r+=o.eles.length}return r===t.length},is.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r<n.length;r++){for(var i=n[r],o=-1,a=0;a<t.length;a++)if(i.eles[0]===t[a]){o=a;break}if(o<0)this.invalidateLayer(i);else{var s=o;for(a=0;a<i.eles.length;a++)if(i.eles[a]!==t[s+a]){this.invalidateLayer(i);break}}}},is.updateElementsInLayers=function(e,t){for(var n=T(e[0]),r=0;r<e.length;r++)for(var i=n?null:e[r],o=n?e[r]:e[r].ele,a=o._private.rscratch,s=a.imgLayerCaches=a.imgLayerCaches||{},u=-4;u<=2;u++){var l=s[u];l&&(i&&this.getEleLevelForLayerLevel(l.level)!==i.level||t(l,o,i))}},is.haveLayers=function(){for(var e=!1,t=-4;t<=2;t++){var n=this.layersByLevel[t];if(n&&n.length>0){e=!0;break}}return e},is.invalidateElements=function(e){var t=this;0!==e.length&&(t.lastInvalidationTime=X(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,(function(e,n,r){t.invalidateLayer(e)})))},is.invalidateLayer=function(e){if(this.lastInvalidationTime=X(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];ye(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var i=0;i<n.length;i++){var o=n[i]._private.rscratch.imgLayerCaches;o&&(o[t]=null)}}},is.refineElementTextures=function(e){var t=this;t.updateElementsInLayers(e,(function(e,n,r){var i=e.replacement;if(i||((i=e.replacement=t.makeLayer(e.bb,e.level)).replaces=e,i.eles=e.eles),!i.reqs)for(var o=0;o<i.eles.length;o++)t.queueLayer(i,i.eles[o])}))},is.enqueueElementRefinement=function(e){this.eleTxrDeqs.merge(e),this.scheduleElementRefinement()},is.queueLayer=function(e,t){var n=this.layersQueue,r=e.elesQueue,i=r.hasId=r.hasId||{};if(!e.replacement){if(t){if(i[t.id()])return;r.push(t),i[t.id()]=!0}e.reqs?(e.reqs++,n.updateItem(e)):(e.reqs=1,n.push(e))}},is.dequeue=function(e){for(var t=this.layersQueue,n=[],r=0;r<1&&0!==t.size();){var i=t.peek();if(i.replacement)t.pop();else if(i.replaces&&i!==i.replaces.replacement)t.pop();else if(i.invalid)t.pop();else{var o=i.elesQueue.shift();o&&(this.drawEleInLayer(i,o,i.level,e),r++),0===n.length&&n.push(!0),0===i.elesQueue.length&&(t.pop(),i.reqs=0,i.replaces&&this.applyLayerReplacement(i),this.requestRedraw())}}return n},is.applyLayerReplacement=function(e){var t=this.layersByLevel[e.level],n=e.replaces,r=t.indexOf(n);if(!(r<0||n.invalid)){t[r]=e;for(var i=0;i<e.eles.length;i++){var o=e.eles[i]._private,a=o.imgLayerCaches=o.imgLayerCaches||{};a&&(a[e.level]=e)}this.requestRedraw()}},is.requestRedraw=i((function(){var e=this.renderer;e.redrawHint("eles",!0),e.redrawHint("drag",!0),e.redraw()}),100),is.setupDequeueing=Za({deqRedrawThreshold:50,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t){return e.dequeue(t)},onDeqd:ue,shouldRedraw:oe,priority:function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq}});var ss,us={};function ls(e,t){for(var n=0;n<t.length;n++){var r=t[n];e.lineTo(r.x,r.y)}}function cs(e,t,n){for(var r,i=0;i<t.length;i++){var o=t[i];0===i&&(r=o),e.lineTo(o.x,o.y)}e.quadraticCurveTo(n.x,n.y,r.x,r.y)}function fs(e,t,n){e.beginPath&&e.beginPath();for(var r=t,i=0;i<r.length;i++){var o=r[i];e.lineTo(o.x,o.y)}var a=n,s=n[0];e.moveTo(s.x,s.y);for(i=1;i<a.length;i++){o=a[i];e.lineTo(o.x,o.y)}e.closePath&&e.closePath()}function ds(e,t,n,r){e.arc(t,n,r,0,2*Math.PI,!1)}us.arrowShapeImpl=function(e){return(ss||(ss={polygon:ls,"triangle-backcurve":cs,"triangle-tee":fs,"triangle-cross":fs,circle:ds}))[e]};var hs={drawElement:function(e,t,n,r,i,o){t.isNode()?this.drawNode(e,t,n,r,i,o):this.drawEdge(e,t,n,r,i,o)},drawElementOverlay:function(e,t){t.isNode()?this.drawNodeOverlay(e,t):this.drawEdgeOverlay(e,t)},drawCachedElementPortion:function(e,t,n,r,i,o,a,s){var u=this,l=n.getBoundingBox(t);if(0!==l.w&&0!==l.h){var c=n.getElement(t,l,r,i,o);if(null!=c){var f=s(u,t);if(0===f)return;var d,h,p,v,g,y,m=a(u,t),b=l.x1,x=l.y1,w=l.w,S=l.h;if(0!==m){var E=n.getRotationPoint(t);p=E.x,v=E.y,e.translate(p,v),e.rotate(m),(g=u.getImgSmoothing(e))||u.setImgSmoothing(e,!0);var k=n.getRotationOffset(t);d=k.x,h=k.y}else d=b,h=x;1!==f&&(y=e.globalAlpha,e.globalAlpha=y*f),e.drawImage(c.texture.canvas,c.x,0,c.width,c.height,d,h,w,S),1!==f&&(e.globalAlpha=y),0!==m&&(e.rotate(-m),e.translate(-p,-v),g||u.setImgSmoothing(e,!1))}else n.drawElement(e,t)}}},ps=function(){return 0},vs=function(e,t){return e.getTextAngle(t,null)},gs=function(e,t){return e.getTextAngle(t,"source")},ys=function(e,t){return e.getTextAngle(t,"target")},ms=function(e,t){return t.effectiveOpacity()},bs=function(e,t){return t.pstyle("text-opacity").pfValue*t.effectiveOpacity()};hs.drawCachedElement=function(e,t,n,r,i,o){var a=this,s=a.data,u=s.eleTxrCache,l=s.lblTxrCache,c=s.slbTxrCache,f=s.tlbTxrCache,d=t.boundingBox(),h=!0===o?u.reasons.highQuality:null;if(0!==d.w&&0!==d.h&&t.visible()&&(!r||it(d,r))){var p=t.isEdge(),v=t.element()._private.rscratch.badLine;a.drawCachedElementPortion(e,t,u,n,i,h,ps,ms),p&&v||a.drawCachedElementPortion(e,t,l,n,i,h,vs,bs),p&&!v&&(a.drawCachedElementPortion(e,t,c,n,i,h,gs,bs),a.drawCachedElementPortion(e,t,f,n,i,h,ys,bs)),a.drawElementOverlay(e,t)}},hs.drawElements=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];this.drawElement(e,r)}},hs.drawCachedElements=function(e,t,n,r){for(var i=0;i<t.length;i++){var o=t[i];this.drawCachedElement(e,o,n,r)}},hs.drawCachedNodes=function(e,t,n,r){for(var i=0;i<t.length;i++){var o=t[i];o.isNode()&&this.drawCachedElement(e,o,n,r)}},hs.drawLayeredElements=function(e,t,n,r){var i=this.data.lyrTxrCache.getLayers(t,n);if(i)for(var o=0;o<i.length;o++){var a=i[o],s=a.bb;0!==s.w&&0!==s.h&&e.drawImage(a.canvas,s.x1,s.y1,s.w,s.h)}else this.drawCachedElements(e,t,n,r)};var xs={drawEdge:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],a=this,s=t._private.rscratch;if((!o||t.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var u;n&&(u=n,e.translate(-u.x1,-u.y1));var l=o?t.pstyle("opacity").value:1,c=t.pstyle("line-style").value,f=t.pstyle("width").pfValue,d=t.pstyle("line-cap").value,h=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l;e.lineWidth=f,e.lineCap=d,a.eleStrokeStyle(e,t,n),a.drawEdgePath(t,e,s.allpts,c),e.lineCap="butt"},p=function(){i&&a.drawEdgeOverlay(e,t)},v=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l;a.drawArrowheads(e,t,n)},g=function(){a.drawElementText(e,t,null,r)};e.lineJoin="round";var y="yes"===t.pstyle("ghost").value;if(y){var m=t.pstyle("ghost-offset-x").pfValue,b=t.pstyle("ghost-offset-y").pfValue,x=t.pstyle("ghost-opacity").value,w=l*x;e.translate(m,b),h(w),v(w),e.translate(-m,-b)}h(),v(),p(),g(),n&&e.translate(u.x1,u.y1)}},drawEdgeOverlay:function(e,t){if(t.visible()){var n=t.pstyle("overlay-opacity").value;if(0!==n){var r=this,i=r.usePaths(),o=t._private.rscratch,a=2*t.pstyle("overlay-padding").pfValue,s=t.pstyle("overlay-color").value;e.lineWidth=a,"self"!==o.edgeType||i?e.lineCap="round":e.lineCap="butt",r.colorStrokeStyle(e,s[0],s[1],s[2],n),r.drawEdgePath(t,e,o.allpts,"solid")}}},drawEdgePath:function(e,t,n,r){var i,o=e._private.rscratch,a=t,s=!1,u=this.usePaths(),l=e.pstyle("line-dash-pattern").pfValue,c=e.pstyle("line-dash-offset").pfValue;if(u){var f=n.join("$");o.pathCacheKey&&o.pathCacheKey===f?(i=t=o.pathCache,s=!0):(i=t=new Path2D,o.pathCacheKey=f,o.pathCache=i)}if(a.setLineDash)switch(r){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(l),a.lineDashOffset=c;break;case"solid":a.setLineDash([])}if(!s&&!o.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),o.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var d=2;d+3<n.length;d+=4)t.quadraticCurveTo(n[d],n[d+1],n[d+2],n[d+3]);break;case"straight":case"segments":case"haystack":for(var h=2;h+1<n.length;h+=2)t.lineTo(n[h],n[h+1])}t=a,u?t.stroke(i):t.stroke(),t.setLineDash&&t.setLineDash([])},drawArrowheads:function(e,t,n){var r=t._private.rscratch,i="haystack"===r.edgeType;i||this.drawArrowhead(e,t,"source",r.arrowStartX,r.arrowStartY,r.srcArrowAngle,n),this.drawArrowhead(e,t,"mid-target",r.midX,r.midY,r.midtgtArrowAngle,n),this.drawArrowhead(e,t,"mid-source",r.midX,r.midY,r.midsrcArrowAngle,n),i||this.drawArrowhead(e,t,"target",r.arrowEndX,r.arrowEndY,r.tgtArrowAngle,n)},drawArrowhead:function(e,t,n,r,i,o,a){if(!(isNaN(r)||null==r||isNaN(i)||null==i||isNaN(o)||null==o)){var s=t.pstyle(n+"-arrow-shape").value;if("none"!==s){var u="hollow"===t.pstyle(n+"-arrow-fill").value?"both":"filled",l=t.pstyle(n+"-arrow-fill").value,c=t.pstyle("width").pfValue,f=t.pstyle("opacity").value;void 0===a&&(a=f);var d=e.globalCompositeOperation;1===a&&"hollow"!==l||(e.globalCompositeOperation="destination-out",this.colorFillStyle(e,255,255,255,1),this.colorStrokeStyle(e,255,255,255,1),this.drawArrowShape(t,e,u,c,s,r,i,o),e.globalCompositeOperation=d);var h=t.pstyle(n+"-arrow-color").value;this.colorFillStyle(e,h[0],h[1],h[2],a),this.colorStrokeStyle(e,h[0],h[1],h[2],a),this.drawArrowShape(t,e,l,c,s,r,i,o)}}},drawArrowShape:function(e,t,n,r,i,o,a,s){var u,l=this,c=this.usePaths()&&"triangle-cross"!==i,f=!1,d=t,h={x:o,y:a},p=e.pstyle("arrow-scale").value,v=this.getArrowWidth(r,p),g=l.arrowShapes[i];if(c){var y=l.arrowPathCache=l.arrowPathCache||[],m=Q(i),b=y[m];null!=b?(u=t=b,f=!0):(u=t=new Path2D,y[m]=u)}f||(t.beginPath&&t.beginPath(),c?g.draw(t,1,0,{x:0,y:0},1):g.draw(t,v,s,h,r),t.closePath&&t.closePath()),t=d,c&&(t.translate(o,a),t.rotate(s),t.scale(v,v)),"filled"!==n&&"both"!==n||(c?t.fill(u):t.fill()),"hollow"!==n&&"both"!==n||(t.lineWidth=(g.matchEdgeWidth?r:1)/(c?v:1),t.lineJoin="miter",c?t.stroke(u):t.stroke()),c&&(t.scale(1/v,1/v),t.rotate(-s),t.translate(-o,-a))}},ws={safeDrawImage:function(e,t,n,r,i,o,a,s,u,l){i<=0||o<=0||u<=0||l<=0||e.drawImage(t,n,r,i,o,a,s,u,l)},drawInscribedImage:function(e,t,n,r,i){var o=this,a=n.position(),s=a.x,u=a.y,l=n.cy().style(),c=l.getIndexedStyle.bind(l),f=c(n,"background-fit","value",r),d=c(n,"background-repeat","value",r),h=n.width(),p=n.height(),v=2*n.padding(),g=h+("inner"===c(n,"background-width-relative-to","value",r)?0:v),y=p+("inner"===c(n,"background-height-relative-to","value",r)?0:v),m=n._private.rscratch,b="node"===c(n,"background-clip","value",r),x=c(n,"background-image-opacity","value",r)*i,w=t.width||t.cachedW,S=t.height||t.cachedH;null!=w&&null!=S||(document.body.appendChild(t),w=t.cachedW=t.width||t.offsetWidth,S=t.cachedH=t.height||t.offsetHeight,document.body.removeChild(t));var E=w,k=S;if("auto"!==c(n,"background-width","value",r)&&(E="%"===c(n,"background-width","units",r)?c(n,"background-width","pfValue",r)*g:c(n,"background-width","pfValue",r)),"auto"!==c(n,"background-height","value",r)&&(k="%"===c(n,"background-height","units",r)?c(n,"background-height","pfValue",r)*y:c(n,"background-height","pfValue",r)),0!==E&&0!==k){if("contain"===f)E*=_=Math.min(g/E,y/k),k*=_;else if("cover"===f){var _;E*=_=Math.max(g/E,y/k),k*=_}var T=s-g/2,C=c(n,"background-position-x","units",r),P=c(n,"background-position-x","pfValue",r);T+="%"===C?(g-E)*P:P;var D=c(n,"background-offset-x","units",r),M=c(n,"background-offset-x","pfValue",r);T+="%"===D?(g-E)*M:M;var O=u-y/2,I=c(n,"background-position-y","units",r),N=c(n,"background-position-y","pfValue",r);O+="%"===I?(y-k)*N:N;var A=c(n,"background-offset-y","units",r),L=c(n,"background-offset-y","pfValue",r);O+="%"===A?(y-k)*L:L,m.pathCache&&(T-=s,O-=u,s=0,u=0);var j=e.globalAlpha;if(e.globalAlpha=x,"no-repeat"===d)b&&(e.save(),m.pathCache?e.clip(m.pathCache):(o.nodeShapes[o.getNodeShape(n)].draw(e,s,u,g,y),e.clip())),o.safeDrawImage(e,t,0,0,w,S,T,O,E,k),b&&e.restore();else{var B=e.createPattern(t,d);e.fillStyle=B,o.nodeShapes[o.getNodeShape(n)].draw(e,s,u,g,y),e.translate(T,O),e.fill(),e.translate(-T,-O)}e.globalAlpha=j}}},Ss={};function Es(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:5;e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+i-o),e.quadraticCurveTo(t+r,n+i,t+r-o,n+i),e.lineTo(t+o,n+i),e.quadraticCurveTo(t,n+i,t,n+i-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath(),e.fill()}Ss.eleTextBiggerThanMin=function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),i=Math.ceil(We(n*r));t=Math.pow(2,i)}return!(e.pstyle("font-size").pfValue*t<e.pstyle("min-zoomed-font-size").pfValue)},Ss.drawElementText=function(e,t,n,r,i){var o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],a=this;if(null==r){if(o&&!a.eleTextBiggerThanMin(t))return}else if(!1===r)return;if(t.isNode()){var s=t.pstyle("label");if(!s||!s.value)return;var u=a.getLabelJustification(t);e.textAlign=u,e.textBaseline="bottom"}else{var l=t.element()._private.rscratch.badLine,c=t.pstyle("label"),f=t.pstyle("source-label"),d=t.pstyle("target-label");if(l||(!c||!c.value)&&(!f||!f.value)&&(!d||!d.value))return;e.textAlign="center",e.textBaseline="bottom"}var h,p=!n;n&&(h=n,e.translate(-h.x1,-h.y1)),null==i?(a.drawText(e,t,null,p,o),t.isEdge()&&(a.drawText(e,t,"source",p,o),a.drawText(e,t,"target",p,o))):a.drawText(e,t,i,p,o),n&&e.translate(h.x1,h.y1)},Ss.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n<this.fontCaches.length;n++)if((t=this.fontCaches[n]).context===e)return t;return t={context:e},this.fontCaches.push(t),t},Ss.setupTextStyle=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t.pstyle("font-style").strValue,i=t.pstyle("font-size").pfValue+"px",o=t.pstyle("font-family").strValue,a=t.pstyle("font-weight").strValue,s=n?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,u=t.pstyle("text-outline-opacity").value*s,l=t.pstyle("color").value,c=t.pstyle("text-outline-color").value;e.font=r+" "+a+" "+i+" "+o,e.lineJoin="round",this.colorFillStyle(e,l[0],l[1],l[2],s),this.colorStrokeStyle(e,c[0],c[1],c[2],u)},Ss.getTextAngle=function(e,t){var n=e._private.rscratch,r=t?t+"-":"",i=e.pstyle(r+"text-rotation"),o=be(n,"labelAngle",t);return"autorotate"===i.strValue?e.isEdge()?o:0:"none"===i.strValue?0:i.pfValue},Ss.drawText=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=t._private,a=o.rscratch,s=i?t.effectiveOpacity():1;if(!i||0!==s&&0!==t.pstyle("text-opacity").value){"main"===n&&(n=null);var u,l,c=be(a,"labelX",n),f=be(a,"labelY",n),d=this.getLabelText(t,n);if(null!=d&&""!==d&&!isNaN(c)&&!isNaN(f)){this.setupTextStyle(e,t,i);var h,p=n?n+"-":"",v=be(a,"labelWidth",n),g=be(a,"labelHeight",n),y=t.pstyle(p+"text-margin-x").pfValue,m=t.pstyle(p+"text-margin-y").pfValue,b=t.isEdge(),x=t.pstyle("text-halign").value,w=t.pstyle("text-valign").value;switch(b&&(x="center",w="center"),c+=y,f+=m,0!==(h=r?this.getTextAngle(t,n):0)&&(u=c,l=f,e.translate(u,l),e.rotate(h),c=0,f=0),w){case"top":break;case"center":f+=g/2;break;case"bottom":f+=g}var S=t.pstyle("text-background-opacity").value,E=t.pstyle("text-border-opacity").value,k=t.pstyle("text-border-width").pfValue,_=t.pstyle("text-background-padding").pfValue;if(S>0||k>0&&E>0){var T=c-_;switch(x){case"left":T-=v;break;case"center":T-=v/2}var C=f-g-_,P=v+2*_,D=g+2*_;if(S>0){var M=e.fillStyle,O=t.pstyle("text-background-color").value;e.fillStyle="rgba("+O[0]+","+O[1]+","+O[2]+","+S*s+")";var I=t.pstyle("text-background-shape").strValue;0===I.indexOf("round")?Es(e,T,C,P,D,2):e.fillRect(T,C,P,D),e.fillStyle=M}if(k>0&&E>0){var N=e.strokeStyle,A=e.lineWidth,L=t.pstyle("text-border-color").value,j=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+L[0]+","+L[1]+","+L[2]+","+E*s+")",e.lineWidth=k,e.setLineDash)switch(j){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=k/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}if(e.strokeRect(T,C,P,D),"double"===j){var B=k/2;e.strokeRect(T+B,C+B,P-2*B,D-2*B)}e.setLineDash&&e.setLineDash([]),e.lineWidth=A,e.strokeStyle=N}}var F=2*t.pstyle("text-outline-width").pfValue;if(F>0&&(e.lineWidth=F),"wrap"===t.pstyle("text-wrap").value){var R=be(a,"labelWrapCachedLines",n),z=be(a,"labelLineHeight",n),V=v/2,q=this.getLabelJustification(t);switch("auto"===q||("left"===x?"left"===q?c+=-v:"center"===q&&(c+=-V):"center"===x?"left"===q?c+=-V:"right"===q&&(c+=V):"right"===x&&("center"===q?c+=V:"right"===q&&(c+=v))),w){case"top":f-=(R.length-1)*z;break;case"center":case"bottom":f-=(R.length-1)*z}for(var G=0;G<R.length;G++)F>0&&e.strokeText(R[G],c,f),e.fillText(R[G],c,f),f+=z}else F>0&&e.strokeText(d,c,f),e.fillText(d,c,f);0!==h&&(e.rotate(-h),e.translate(-u,-l))}}};var ks={drawNode:function(e,t,n){var r,i,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],u=this,l=t._private,c=l.rscratch,f=t.position();if(E(f.x)&&E(f.y)&&(!s||t.visible())){var d,h,p=s?t.effectiveOpacity():1,v=u.usePaths(),g=!1,y=t.padding();r=t.width()+2*y,i=t.height()+2*y,n&&(h=n,e.translate(-h.x1,-h.y1));for(var m=t.pstyle("background-image"),b=m.value,x=new Array(b.length),w=new Array(b.length),S=0,k=0;k<b.length;k++){var _=b[k],T=x[k]=null!=_&&"none"!==_;if(T){var C=t.cy().style().getIndexedStyle(t,"background-image-crossorigin","value",k);S++,w[k]=u.getCachedImage(_,C,(function(){l.backgroundTimestamp=Date.now(),t.emitAndNotify("background")}))}}var P=t.pstyle("background-blacken").value,D=t.pstyle("border-width").pfValue,M=t.pstyle("background-opacity").value*p,O=t.pstyle("border-color").value,I=t.pstyle("border-style").value,N=t.pstyle("border-opacity").value*p;e.lineJoin="miter";var A=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M;u.eleFillStyle(e,t,n)},L=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:N;u.colorStrokeStyle(e,O[0],O[1],O[2],t)},j=t.pstyle("shape").strValue,B=t.pstyle("shape-polygon-points").pfValue;if(v){e.translate(f.x,f.y);var F=u.nodePathCache=u.nodePathCache||[],R=J("polygon"===j?j+","+B.join(","):j,""+i,""+r),z=F[R];null!=z?(d=z,g=!0,c.pathCache=d):(d=new Path2D,F[R]=c.pathCache=d)}var V=function(){if(!g){var n=f;v&&(n={x:0,y:0}),u.nodeShapes[u.getNodeShape(t)].draw(d||e,n.x,n.y,r,i)}v?e.fill(d):e.fill()},q=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,r=l.backgrounding,i=0,o=0;o<w.length;o++)x[o]&&w[o].complete&&!w[o].error&&(i++,u.drawInscribedImage(e,w[o],t,o,n));l.backgrounding=!(i===S),r!==l.backgrounding&&t.updateStyle(!1)},G=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;u.hasPie(t)&&(u.drawPie(e,t,o),n&&(v||u.nodeShapes[u.getNodeShape(t)].draw(e,f.x,f.y,r,i)))},W=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,n=(P>0?P:-P)*t,r=P>0?0:255;0!==P&&(u.colorFillStyle(e,r,r,r,n),v?e.fill(d):e.fill())},H=function(){if(D>0){if(e.lineWidth=D,e.lineCap="butt",e.setLineDash)switch(I){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}if(v?e.stroke(d):e.stroke(),"double"===I){e.lineWidth=D/3;var t=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",v?e.stroke(d):e.stroke(),e.globalCompositeOperation=t}e.setLineDash&&e.setLineDash([])}},U=function(){a&&u.drawNodeOverlay(e,t,f,r,i)},Y=function(){u.drawElementText(e,t,null,o)},X="yes"===t.pstyle("ghost").value;if(X){var K=t.pstyle("ghost-offset-x").pfValue,$=t.pstyle("ghost-offset-y").pfValue,Z=t.pstyle("ghost-opacity").value,Q=Z*p;e.translate(K,$),A(Z*M),V(),q(Q),G(0!==P||0!==D),W(Q),L(Z*N),H(),e.translate(-K,-$)}A(),V(),q(),G(0!==P||0!==D),W(),L(),H(),v&&e.translate(-f.x,-f.y),Y(),U(),n&&e.translate(h.x1,h.y1)}},drawNodeOverlay:function(e,t,n,r,i){if(t.visible()){var o=t.pstyle("overlay-padding").pfValue,a=t.pstyle("overlay-opacity").value,s=t.pstyle("overlay-color").value;if(a>0){if(n=n||t.position(),null==r||null==i){var u=t.padding();r=t.width()+2*u,i=t.height()+2*u}this.colorFillStyle(e,s[0],s[1],s[2],a),this.nodeShapes.roundrectangle.draw(e,n.x,n.y,r+2*o,i+2*o),e.fill()}}},hasPie:function(e){return(e=e[0])._private.hasPie},drawPie:function(e,t,n,r){t=t[0],r=r||t.position();var i=t.cy().style(),o=t.pstyle("pie-size"),a=r.x,s=r.y,u=t.width(),l=t.height(),c=Math.min(u,l)/2,f=0;this.usePaths()&&(a=0,s=0),"%"===o.units?c*=o.pfValue:void 0!==o.pfValue&&(c=o.pfValue/2);for(var d=1;d<=i.pieBackgroundN;d++){var h=t.pstyle("pie-"+d+"-background-size").value,p=t.pstyle("pie-"+d+"-background-color").value,v=t.pstyle("pie-"+d+"-background-opacity").value*n,g=h/100;g+f>1&&(g=1-f);var y=1.5*Math.PI+2*Math.PI*f,m=y+2*Math.PI*g;0===h||f>=1||f+g>1||(e.beginPath(),e.moveTo(a,s),e.arc(a,s,c,y,m),e.closePath(),this.colorFillStyle(e,p[0],p[1],p[2],v),e.fill(),f+=g)}}},_s={};_s.getPixelRatio=function(){var e=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var t=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/t},_s.paintCache=function(e){for(var t,n=this.paintCaches=this.paintCaches||[],r=!0,i=0;i<n.length;i++)if((t=n[i]).context===e){r=!1;break}return r&&(t={context:e},n.push(t)),t},_s.createGradientStyleFor=function(e,t,n,r,i){var o,a=this.usePaths(),s=n.pstyle(t+"-gradient-stop-colors").value,u=n.pstyle(t+"-gradient-stop-positions").pfValue;if("radial-gradient"===r)if(n.isEdge()){var l=n.sourceEndpoint(),c=n.targetEndpoint(),f=n.midpoint(),d=Ue(l,f),h=Ue(c,f);o=e.createRadialGradient(f.x,f.y,0,f.x,f.y,Math.max(d,h))}else{var p=a?{x:0,y:0}:n.position(),v=n.paddedWidth(),g=n.paddedHeight();o=e.createRadialGradient(p.x,p.y,0,p.x,p.y,Math.max(v,g))}else if(n.isEdge()){var y=n.sourceEndpoint(),m=n.targetEndpoint();o=e.createLinearGradient(y.x,y.y,m.x,m.y)}else{var b=a?{x:0,y:0}:n.position(),x=n.paddedWidth()/2,w=n.paddedHeight()/2;switch(n.pstyle("background-gradient-direction").value){case"to-bottom":o=e.createLinearGradient(b.x,b.y-w,b.x,b.y+w);break;case"to-top":o=e.createLinearGradient(b.x,b.y+w,b.x,b.y-w);break;case"to-left":o=e.createLinearGradient(b.x+x,b.y,b.x-x,b.y);break;case"to-right":o=e.createLinearGradient(b.x-x,b.y,b.x+x,b.y);break;case"to-bottom-right":case"to-right-bottom":o=e.createLinearGradient(b.x-x,b.y-w,b.x+x,b.y+w);break;case"to-top-right":case"to-right-top":o=e.createLinearGradient(b.x-x,b.y+w,b.x+x,b.y-w);break;case"to-bottom-left":case"to-left-bottom":o=e.createLinearGradient(b.x+x,b.y-w,b.x-x,b.y+w);break;case"to-top-left":case"to-left-top":o=e.createLinearGradient(b.x+x,b.y+w,b.x-x,b.y-w)}}if(!o)return null;for(var S=u.length===s.length,E=s.length,k=0;k<E;k++)o.addColorStop(S?u[k]:k/(E-1),"rgba("+s[k][0]+","+s[k][1]+","+s[k][2]+","+i+")");return o},_s.gradientFillStyle=function(e,t,n,r){var i=this.createGradientStyleFor(e,"background",t,n,r);if(!i)return null;e.fillStyle=i},_s.colorFillStyle=function(e,t,n,r,i){e.fillStyle="rgba("+t+","+n+","+r+","+i+")"},_s.eleFillStyle=function(e,t,n){var r=t.pstyle("background-fill").value;if("linear-gradient"===r||"radial-gradient"===r)this.gradientFillStyle(e,t,r,n);else{var i=t.pstyle("background-color").value;this.colorFillStyle(e,i[0],i[1],i[2],n)}},_s.gradientStrokeStyle=function(e,t,n,r){var i=this.createGradientStyleFor(e,"line",t,n,r);if(!i)return null;e.strokeStyle=i},_s.colorStrokeStyle=function(e,t,n,r,i){e.strokeStyle="rgba("+t+","+n+","+r+","+i+")"},_s.eleStrokeStyle=function(e,t,n){var r=t.pstyle("line-fill").value;if("linear-gradient"===r||"radial-gradient"===r)this.gradientStrokeStyle(e,t,r,n);else{var i=t.pstyle("line-color").value;this.colorStrokeStyle(e,i[0],i[1],i[2],n)}},_s.matchCanvasSize=function(e){var t=this,n=t.data,r=t.findContainerClientCoords(),i=r[2],o=r[3],a=t.getPixelRatio(),s=t.motionBlurPxRatio;e!==t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE]&&e!==t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG]||(a=s);var u,l=i*a,c=o*a;if(l!==t.canvasWidth||c!==t.canvasHeight){t.fontCaches=null;var f=n.canvasContainer;f.style.width=i+"px",f.style.height=o+"px";for(var d=0;d<t.CANVAS_LAYERS;d++)(u=n.canvases[d]).width=l,u.height=c,u.style.width=i+"px",u.style.height=o+"px";for(d=0;d<t.BUFFER_COUNT;d++)(u=n.bufferCanvases[d]).width=l,u.height=c,u.style.width=i+"px",u.style.height=o+"px";t.textureMult=1,a<=1&&(u=n.bufferCanvases[t.TEXTURE_BUFFER],t.textureMult=2,u.width=l*t.textureMult,u.height=c*t.textureMult),t.canvasWidth=l,t.canvasHeight=c}},_s.renderTo=function(e,t,n,r){this.render({forcedContext:e,forcedZoom:t,forcedPan:n,drawAllLayers:!0,forcedPxRatio:r})},_s.render=function(e){var t=(e=e||ve()).forcedContext,n=e.drawAllLayers,r=e.drawOnlyNodeLayer,i=e.forcedZoom,o=e.forcedPan,a=this,s=void 0===e.forcedPxRatio?this.getPixelRatio():e.forcedPxRatio,u=a.cy,l=a.data,c=l.canvasNeedsRedraw,f=a.textureOnViewport&&!t&&(a.pinching||a.hoverData.dragging||a.swipePanning||a.data.wheelZooming),d=void 0!==e.motionBlur?e.motionBlur:a.motionBlur,h=a.motionBlurPxRatio,p=u.hasCompoundNodes(),v=a.hoverData.draggingEles,g=!(!a.hoverData.selecting&&!a.touchData.selecting),y=d=d&&!t&&a.motionBlurEnabled&&!g;t||(a.prevPxRatio!==s&&(a.invalidateContainerClientCoordsCache(),a.matchCanvasSize(a.container),a.redrawHint("eles",!0),a.redrawHint("drag",!0)),a.prevPxRatio=s),!t&&a.motionBlurTimeout&&clearTimeout(a.motionBlurTimeout),d&&(null==a.mbFrames&&(a.mbFrames=0),a.mbFrames++,a.mbFrames<3&&(y=!1),a.mbFrames>a.minMbLowQualFrames&&(a.motionBlurPxRatio=a.mbPxRBlurry)),a.clearingMotionBlur&&(a.motionBlurPxRatio=1),a.textureDrawLastFrame&&!f&&(c[a.NODE]=!0,c[a.SELECT_BOX]=!0);var m=u.style(),b=u.zoom(),x=void 0!==i?i:b,w=u.pan(),S={x:w.x,y:w.y},E={zoom:b,pan:{x:w.x,y:w.y}},k=a.prevViewport;void 0===k||E.zoom!==k.zoom||E.pan.x!==k.pan.x||E.pan.y!==k.pan.y||v&&!p||(a.motionBlurPxRatio=1),o&&(S=o),x*=s,S.x*=s,S.y*=s;var _=a.getCachedZSortedEles();function T(e,t,n,r,i){var o=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",a.colorFillStyle(e,255,255,255,a.motionBlurTransparency),e.fillRect(t,n,r,i),e.globalCompositeOperation=o}function C(e,r){var s,u,c,f;a.clearingMotionBlur||e!==l.bufferContexts[a.MOTIONBLUR_BUFFER_NODE]&&e!==l.bufferContexts[a.MOTIONBLUR_BUFFER_DRAG]?(s=S,u=x,c=a.canvasWidth,f=a.canvasHeight):(s={x:w.x*h,y:w.y*h},u=b*h,c=a.canvasWidth*h,f=a.canvasHeight*h),e.setTransform(1,0,0,1,0,0),"motionBlur"===r?T(e,0,0,c,f):t||void 0!==r&&!r||e.clearRect(0,0,c,f),n||(e.translate(s.x,s.y),e.scale(u,u)),o&&e.translate(o.x,o.y),i&&e.scale(i,i)}if(f||(a.textureDrawLastFrame=!1),f){if(a.textureDrawLastFrame=!0,!a.textureCache){a.textureCache={},a.textureCache.bb=u.mutableElements().boundingBox(),a.textureCache.texture=a.data.bufferCanvases[a.TEXTURE_BUFFER];var P=a.data.bufferContexts[a.TEXTURE_BUFFER];P.setTransform(1,0,0,1,0,0),P.clearRect(0,0,a.canvasWidth*a.textureMult,a.canvasHeight*a.textureMult),a.render({forcedContext:P,drawOnlyNodeLayer:!0,forcedPxRatio:s*a.textureMult}),(E=a.textureCache.viewport={zoom:u.zoom(),pan:u.pan(),width:a.canvasWidth,height:a.canvasHeight}).mpan={x:(0-E.pan.x)/E.zoom,y:(0-E.pan.y)/E.zoom}}c[a.DRAG]=!1,c[a.NODE]=!1;var D=l.contexts[a.NODE],M=a.textureCache.texture;E=a.textureCache.viewport;D.setTransform(1,0,0,1,0,0),d?T(D,0,0,E.width,E.height):D.clearRect(0,0,E.width,E.height);var O=m.core("outside-texture-bg-color").value,I=m.core("outside-texture-bg-opacity").value;a.colorFillStyle(D,O[0],O[1],O[2],I),D.fillRect(0,0,E.width,E.height);b=u.zoom();C(D,!1),D.clearRect(E.mpan.x,E.mpan.y,E.width/E.zoom/s,E.height/E.zoom/s),D.drawImage(M,E.mpan.x,E.mpan.y,E.width/E.zoom/s,E.height/E.zoom/s)}else a.textureOnViewport&&!t&&(a.textureCache=null);var N=u.extent(),A=a.pinching||a.hoverData.dragging||a.swipePanning||a.data.wheelZooming||a.hoverData.draggingEles||a.cy.animated(),L=a.hideEdgesOnViewport&&A,j=[];if(j[a.NODE]=!c[a.NODE]&&d&&!a.clearedForMotionBlur[a.NODE]||a.clearingMotionBlur,j[a.NODE]&&(a.clearedForMotionBlur[a.NODE]=!0),j[a.DRAG]=!c[a.DRAG]&&d&&!a.clearedForMotionBlur[a.DRAG]||a.clearingMotionBlur,j[a.DRAG]&&(a.clearedForMotionBlur[a.DRAG]=!0),c[a.NODE]||n||r||j[a.NODE]){var B=d&&!j[a.NODE]&&1!==h;C(D=t||(B?a.data.bufferContexts[a.MOTIONBLUR_BUFFER_NODE]:l.contexts[a.NODE]),d&&!B?"motionBlur":void 0),L?a.drawCachedNodes(D,_.nondrag,s,N):a.drawLayeredElements(D,_.nondrag,s,N),a.debug&&a.drawDebugPoints(D,_.nondrag),n||d||(c[a.NODE]=!1)}if(!r&&(c[a.DRAG]||n||j[a.DRAG])){B=d&&!j[a.DRAG]&&1!==h;C(D=t||(B?a.data.bufferContexts[a.MOTIONBLUR_BUFFER_DRAG]:l.contexts[a.DRAG]),d&&!B?"motionBlur":void 0),L?a.drawCachedNodes(D,_.drag,s,N):a.drawCachedElements(D,_.drag,s,N),a.debug&&a.drawDebugPoints(D,_.drag),n||d||(c[a.DRAG]=!1)}if(a.showFps||!r&&c[a.SELECT_BOX]&&!n){if(C(D=t||l.contexts[a.SELECT_BOX]),1==a.selection[4]&&(a.hoverData.selecting||a.touchData.selecting)){b=a.cy.zoom();var F=m.core("selection-box-border-width").value/b;D.lineWidth=F,D.fillStyle="rgba("+m.core("selection-box-color").value[0]+","+m.core("selection-box-color").value[1]+","+m.core("selection-box-color").value[2]+","+m.core("selection-box-opacity").value+")",D.fillRect(a.selection[0],a.selection[1],a.selection[2]-a.selection[0],a.selection[3]-a.selection[1]),F>0&&(D.strokeStyle="rgba("+m.core("selection-box-border-color").value[0]+","+m.core("selection-box-border-color").value[1]+","+m.core("selection-box-border-color").value[2]+","+m.core("selection-box-opacity").value+")",D.strokeRect(a.selection[0],a.selection[1],a.selection[2]-a.selection[0],a.selection[3]-a.selection[1]))}if(l.bgActivePosistion&&!a.hoverData.selecting){b=a.cy.zoom();var R=l.bgActivePosistion;D.fillStyle="rgba("+m.core("active-bg-color").value[0]+","+m.core("active-bg-color").value[1]+","+m.core("active-bg-color").value[2]+","+m.core("active-bg-opacity").value+")",D.beginPath(),D.arc(R.x,R.y,m.core("active-bg-size").pfValue/b,0,2*Math.PI),D.fill()}var z=a.lastRedrawTime;if(a.showFps&&z){z=Math.round(z);var V=Math.round(1e3/z);D.setTransform(1,0,0,1,0,0),D.fillStyle="rgba(255, 0, 0, 0.75)",D.strokeStyle="rgba(255, 0, 0, 0.75)",D.lineWidth=1,D.fillText("1 frame = "+z+" ms = "+V+" fps",0,20);D.strokeRect(0,30,250,20),D.fillRect(0,30,250*Math.min(V/60,1),20)}n||(c[a.SELECT_BOX]=!1)}if(d&&1!==h){var q=l.contexts[a.NODE],G=a.data.bufferCanvases[a.MOTIONBLUR_BUFFER_NODE],W=l.contexts[a.DRAG],H=a.data.bufferCanvases[a.MOTIONBLUR_BUFFER_DRAG],U=function(e,t,n){e.setTransform(1,0,0,1,0,0),n||!y?e.clearRect(0,0,a.canvasWidth,a.canvasHeight):T(e,0,0,a.canvasWidth,a.canvasHeight);var r=h;e.drawImage(t,0,0,a.canvasWidth*r,a.canvasHeight*r,0,0,a.canvasWidth,a.canvasHeight)};(c[a.NODE]||j[a.NODE])&&(U(q,G,j[a.NODE]),c[a.NODE]=!1),(c[a.DRAG]||j[a.DRAG])&&(U(W,H,j[a.DRAG]),c[a.DRAG]=!1)}a.prevViewport=E,a.clearingMotionBlur&&(a.clearingMotionBlur=!1,a.motionBlurCleared=!0,a.motionBlur=!0),d&&(a.motionBlurTimeout=setTimeout((function(){a.motionBlurTimeout=null,a.clearedForMotionBlur[a.NODE]=!1,a.clearedForMotionBlur[a.DRAG]=!1,a.motionBlur=!1,a.clearingMotionBlur=!f,a.mbFrames=0,c[a.NODE]=!0,c[a.DRAG]=!0,a.redraw()}),100)),t||u.emit("render")};for(var Ts={drawPolygonPath:function(e,t,n,r,i,o){var a=r/2,s=i/2;e.beginPath&&e.beginPath(),e.moveTo(t+a*o[0],n+s*o[1]);for(var u=1;u<o.length/2;u++)e.lineTo(t+a*o[2*u],n+s*o[2*u+1]);e.closePath()},drawRoundPolygonPath:function(e,t,n,r,i,o){var a=r/2,s=i/2,u=Tt(r,i);e.beginPath&&e.beginPath();for(var l=0;l<o.length/4;l++){var c,f=void 0;f=0===l?o.length-2:4*l-2,c=4*l+2;var d=t+a*o[4*l],h=n+s*o[4*l+1],p=-o[f]*o[c]-o[f+1]*o[c+1],v=u/Math.tan(Math.acos(p)/2),g=d-v*o[f],y=h-v*o[f+1],m=d+v*o[c],b=h+v*o[c+1];0===l?e.moveTo(g,y):e.lineTo(g,y),e.arcTo(d,h,m,b,u)}e.closePath()},drawRoundRectanglePath:function(e,t,n,r,i){var o=r/2,a=i/2,s=_t(r,i);e.beginPath&&e.beginPath(),e.moveTo(t,n-a),e.arcTo(t+o,n-a,t+o,n,s),e.arcTo(t+o,n+a,t,n+a,s),e.arcTo(t-o,n+a,t-o,n,s),e.arcTo(t-o,n-a,t,n-a,s),e.lineTo(t,n-a),e.closePath()},drawBottomRoundRectanglePath:function(e,t,n,r,i){var o=r/2,a=i/2,s=_t(r,i);e.beginPath&&e.beginPath(),e.moveTo(t,n-a),e.lineTo(t+o,n-a),e.lineTo(t+o,n),e.arcTo(t+o,n+a,t,n+a,s),e.arcTo(t-o,n+a,t-o,n,s),e.lineTo(t-o,n-a),e.lineTo(t,n-a),e.closePath()},drawCutRectanglePath:function(e,t,n,r,i){var o=r/2,a=i/2;e.beginPath&&e.beginPath(),e.moveTo(t-o+8,n-a),e.lineTo(t+o-8,n-a),e.lineTo(t+o,n-a+8),e.lineTo(t+o,n+a-8),e.lineTo(t+o-8,n+a),e.lineTo(t-o+8,n+a),e.lineTo(t-o,n+a-8),e.lineTo(t-o,n-a+8),e.closePath()},drawBarrelPath:function(e,t,n,r,i){var o=r/2,a=i/2,s=t-o,u=t+o,l=n-a,c=n+a,f=Ct(r,i),d=f.widthOffset,h=f.heightOffset,p=f.ctrlPtOffsetPct*d;e.beginPath&&e.beginPath(),e.moveTo(s,l+h),e.lineTo(s,c-h),e.quadraticCurveTo(s+p,c,s+d,c),e.lineTo(u-d,c),e.quadraticCurveTo(u-p,c,u,c-h),e.lineTo(u,l+h),e.quadraticCurveTo(u-p,l,u-d,l),e.lineTo(s+d,l),e.quadraticCurveTo(s+p,l,s,l+h),e.closePath()}},Cs=Math.sin(0),Ps=Math.cos(0),Ds={},Ms={},Os=Math.PI/40,Is=0*Math.PI;Is<2*Math.PI;Is+=Os)Ds[Is]=Math.sin(Is),Ms[Is]=Math.cos(Is);Ts.drawEllipsePath=function(e,t,n,r,i){if(e.beginPath&&e.beginPath(),e.ellipse)e.ellipse(t,n,r/2,i/2,0,0,2*Math.PI);else for(var o,a,s=r/2,u=i/2,l=0*Math.PI;l<2*Math.PI;l+=Os)o=t-s*Ds[l]*Cs+s*Ms[l]*Ps,a=n+u*Ms[l]*Cs+u*Ds[l]*Ps,0===l?e.moveTo(o,a):e.lineTo(o,a);e.closePath()};var Ns={};function As(e){var t=e.indexOf(",");return e.substr(t+1)}function Ls(e,t,n){var r=function(){return t.toDataURL(n,e.quality)};switch(e.output){case"blob-promise":return new Fn((function(r,i){try{t.toBlob((function(e){null!=e?r(e):i(new Error("`canvas.toBlob()` sent a null value in its callback"))}),n,e.quality)}catch(e){i(e)}}));case"blob":return function(e,t){for(var n=atob(e),r=new ArrayBuffer(n.length),i=new Uint8Array(r),o=0;o<n.length;o++)i[o]=n.charCodeAt(o);return new Blob([r],{type:t})}(As(r()),n);case"base64":return As(r());case"base64uri":default:return r()}}Ns.createBuffer=function(e,t){var n=document.createElement("canvas");return n.width=e,n.height=t,[n,n.getContext("2d")]},Ns.bufferCanvasImage=function(e){var t=this.cy,n=t.mutableElements().boundingBox(),r=this.findContainerClientCoords(),i=e.full?Math.ceil(n.w):r[2],o=e.full?Math.ceil(n.h):r[3],a=E(e.maxWidth)||E(e.maxHeight),s=this.getPixelRatio(),u=1;if(void 0!==e.scale)i*=e.scale,o*=e.scale,u=e.scale;else if(a){var l=1/0,c=1/0;E(e.maxWidth)&&(l=u*e.maxWidth/i),E(e.maxHeight)&&(c=u*e.maxHeight/o),i*=u=Math.min(l,c),o*=u}a||(i*=s,o*=s,u*=s);var f=document.createElement("canvas");f.width=i,f.height=o,f.style.width=i+"px",f.style.height=o+"px";var d=f.getContext("2d");if(i>0&&o>0){d.clearRect(0,0,i,o),d.globalCompositeOperation="source-over";var h=this.getCachedZSortedEles();if(e.full)d.translate(-n.x1*u,-n.y1*u),d.scale(u,u),this.drawElements(d,h),d.scale(1/u,1/u),d.translate(n.x1*u,n.y1*u);else{var p=t.pan(),v={x:p.x*u,y:p.y*u};u*=t.zoom(),d.translate(v.x,v.y),d.scale(u,u),this.drawElements(d,h),d.scale(1/u,1/u),d.translate(-v.x,-v.y)}e.bg&&(d.globalCompositeOperation="destination-over",d.fillStyle=e.bg,d.rect(0,0,i,o),d.fill())}return f},Ns.png=function(e){return Ls(e,this.bufferCanvasImage(e),"image/png")},Ns.jpg=function(e){return Ls(e,this.bufferCanvasImage(e),"image/jpeg")};var js={nodeShapeImpl:function(e,t,n,r,i,o,a){switch(e){case"ellipse":return this.drawEllipsePath(t,n,r,i,o);case"polygon":return this.drawPolygonPath(t,n,r,i,o,a);case"round-polygon":return this.drawRoundPolygonPath(t,n,r,i,o,a);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(t,n,r,i,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(t,n,r,i,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(t,n,r,i,o);case"barrel":return this.drawBarrelPath(t,n,r,i,o)}}},Bs=Rs,Fs=Rs.prototype;function Rs(e){var t=this;t.data={canvases:new Array(Fs.CANVAS_LAYERS),contexts:new Array(Fs.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Fs.CANVAS_LAYERS),bufferCanvases:new Array(Fs.BUFFER_COUNT),bufferContexts:new Array(Fs.CANVAS_LAYERS)};t.data.canvasContainer=document.createElement("div");var n=t.data.canvasContainer.style;t.data.canvasContainer.style["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",n.position="relative",n.zIndex="0",n.overflow="hidden";var r=e.cy.container();r.appendChild(t.data.canvasContainer),r.style["-webkit-tap-highlight-color"]="rgba(0,0,0,0)";var i={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};h&&h.userAgent.match(/msie|trident|edge/i)&&(i["-ms-touch-action"]="none",i["touch-action"]="none");for(var o=0;o<Fs.CANVAS_LAYERS;o++){var a=t.data.canvases[o]=document.createElement("canvas");t.data.contexts[o]=a.getContext("2d"),Object.keys(i).forEach((function(e){a.style[e]=i[e]})),a.style.position="absolute",a.setAttribute("data-id","layer"+o),a.style.zIndex=String(Fs.CANVAS_LAYERS-o),t.data.canvasContainer.appendChild(a),t.data.canvasNeedsRedraw[o]=!1}t.data.topCanvas=t.data.canvases[0],t.data.canvases[Fs.NODE].setAttribute("data-id","layer"+Fs.NODE+"-node"),t.data.canvases[Fs.SELECT_BOX].setAttribute("data-id","layer"+Fs.SELECT_BOX+"-selectbox"),t.data.canvases[Fs.DRAG].setAttribute("data-id","layer"+Fs.DRAG+"-drag");for(o=0;o<Fs.BUFFER_COUNT;o++)t.data.bufferCanvases[o]=document.createElement("canvas"),t.data.bufferContexts[o]=t.data.bufferCanvases[o].getContext("2d"),t.data.bufferCanvases[o].style.position="absolute",t.data.bufferCanvases[o].setAttribute("data-id","buffer"+o),t.data.bufferCanvases[o].style.zIndex=String(-o-1),t.data.bufferCanvases[o].style.visibility="hidden";t.pathsEnabled=!0;var s=Qe(),u=function(e){return{x:-e.w/2,y:-e.h/2}},l=function(e){return e.boundingBox(),e[0]._private.bodyBounds},c=function(e){return e.boundingBox(),e[0]._private.labelBounds.main||s},f=function(e){return e.boundingBox(),e[0]._private.labelBounds.source||s},d=function(e){return e.boundingBox(),e[0]._private.labelBounds.target||s},p=function(e,t){return t},v=function(e,t,n){var r=e?e+"-":"";return{x:t.x+n.pstyle(r+"text-margin-x").pfValue,y:t.y+n.pstyle(r+"text-margin-y").pfValue}},g=function(e,t,n){var r=e[0]._private.rscratch;return{x:r[t],y:r[n]}},y=t.data.eleTxrCache=new ts(t,{getKey:function(e){return e[0]._private.nodeKey},doesEleInvalidateKey:function(e){var t=e[0]._private;return!(t.oldBackgroundTimestamp===t.backgroundTimestamp)},drawElement:function(e,n,r,i,o){return t.drawElement(e,n,r,!1,!1,o)},getBoundingBox:l,getRotationPoint:function(e){return{x:((t=l(e)).x1+t.x2)/2,y:(t.y1+t.y2)/2};var t},getRotationOffset:function(e){return u(l(e))},allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),m=t.data.lblTxrCache=new ts(t,{getKey:function(e){return e[0]._private.labelStyleKey},drawElement:function(e,n,r,i,o){return t.drawElementText(e,n,r,i,"main",o)},getBoundingBox:c,getRotationPoint:function(e){return v("",g(e,"labelX","labelY"),e)},getRotationOffset:function(e){var t=c(e),n=u(c(e));if(e.isNode()){switch(e.pstyle("text-halign").value){case"left":n.x=-t.w;break;case"right":n.x=0}switch(e.pstyle("text-valign").value){case"top":n.y=-t.h;break;case"bottom":n.y=0}}return n},isVisible:p}),b=t.data.slbTxrCache=new ts(t,{getKey:function(e){return e[0]._private.sourceLabelStyleKey},drawElement:function(e,n,r,i,o){return t.drawElementText(e,n,r,i,"source",o)},getBoundingBox:f,getRotationPoint:function(e){return v("source",g(e,"sourceLabelX","sourceLabelY"),e)},getRotationOffset:function(e){return u(f(e))},isVisible:p}),x=t.data.tlbTxrCache=new ts(t,{getKey:function(e){return e[0]._private.targetLabelStyleKey},drawElement:function(e,n,r,i,o){return t.drawElementText(e,n,r,i,"target",o)},getBoundingBox:d,getRotationPoint:function(e){return v("target",g(e,"targetLabelX","targetLabelY"),e)},getRotationOffset:function(e){return u(d(e))},isVisible:p}),w=t.data.lyrTxrCache=new rs(t);t.onUpdateEleCalcs((function(e,t){y.invalidateElements(t),m.invalidateElements(t),b.invalidateElements(t),x.invalidateElements(t),w.invalidateElements(t);for(var n=0;n<t.length;n++){var r=t[n]._private;r.oldBackgroundTimestamp=r.backgroundTimestamp}}));var S=function(e){for(var t=0;t<e.length;t++)w.enqueueElementRefinement(e[t].ele)};y.onDequeue(S),m.onDequeue(S),b.onDequeue(S),x.onDequeue(S)}Fs.CANVAS_LAYERS=3,Fs.SELECT_BOX=0,Fs.DRAG=1,Fs.NODE=2,Fs.BUFFER_COUNT=3,Fs.TEXTURE_BUFFER=0,Fs.MOTIONBLUR_BUFFER_NODE=1,Fs.MOTIONBLUR_BUFFER_DRAG=2,Fs.redrawHint=function(e,t){var n=this;switch(e){case"eles":n.data.canvasNeedsRedraw[Fs.NODE]=t;break;case"drag":n.data.canvasNeedsRedraw[Fs.DRAG]=t;break;case"select":n.data.canvasNeedsRedraw[Fs.SELECT_BOX]=t}};var zs="undefined"!=typeof Path2D;Fs.path2dEnabled=function(e){if(void 0===e)return this.pathsEnabled;this.pathsEnabled=!!e},Fs.usePaths=function(){return zs&&this.pathsEnabled},Fs.setImgSmoothing=function(e,t){null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled=t:(e.webkitImageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t)},Fs.getImgSmoothing=function(e){return null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled:e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled},Fs.makeOffscreenCanvas=function(e,t){var n;return"undefined"!==("undefined"==typeof OffscreenCanvas?"undefined":a(OffscreenCanvas))?n=new OffscreenCanvas(e,t):((n=document.createElement("canvas")).width=e,n.height=t),n},[us,hs,xs,ws,Ss,ks,_s,Ts,Ns,js].forEach((function(e){R(Fs,e)}));var Vs=[{type:"layout",extensions:ka},{type:"renderer",extensions:[{name:"null",impl:_a},{name:"base",impl:Ka},{name:"canvas",impl:Bs}]}],qs={},Gs={};function Ws(e,t,n){var r=n,i=function(n){le("Can not register `"+t+"` for `"+e+"` since `"+n+"` already exists in the prototype and can not be overridden")};if("core"===e){if(Fo.prototype[t])return i(t);Fo.prototype[t]=n}else if("collection"===e){if(to.prototype[t])return i(t);to.prototype[t]=n}else if("layout"===e){for(var o=function(e){this.options=e,n.call(this,e),S(this._private)||(this._private={}),this._private.cy=e.cy,this._private.listeners=[],this.createEmitter()},a=o.prototype=Object.create(n.prototype),s=[],u=0;u<s.length;u++){var l=s[u];a[l]=a[l]||function(){return this}}a.start&&!a.run?a.run=function(){return this.start(),this}:!a.start&&a.run&&(a.start=function(){return this.run(),this});var c=n.prototype.stop;a.stop=function(){var e=this.options;if(e&&e.animate){var t=this.animations;if(t)for(var n=0;n<t.length;n++)t[n].stop()}return c?c.call(this):this.emit("layoutstop"),this},a.destroy||(a.destroy=function(){return this}),a.cy=function(){return this._private.cy};var f=function(e){return e._private.cy},d={addEventFields:function(e,t){t.layout=e,t.cy=f(e),t.target=e},bubble:function(){return!0},parent:function(e){return f(e)}};R(a,{createEmitter:function(){return this._private.emitter=new bi(d,this),this},emitter:function(){return this._private.emitter},on:function(e,t){return this.emitter().on(e,t),this},one:function(e,t){return this.emitter().one(e,t),this},once:function(e,t){return this.emitter().one(e,t),this},removeListener:function(e,t){return this.emitter().removeListener(e,t),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(e,t){return this.emitter().emit(e,t),this}}),Vn.eventAliasesOn(a),r=o}else if("renderer"===e&&"null"!==t&&"base"!==t){var h=Hs("renderer","base"),p=h.prototype,v=n,g=n.prototype,y=function(){h.apply(this,arguments),v.apply(this,arguments)},m=y.prototype;for(var b in p){var x=p[b];if(null!=g[b])return i(b);m[b]=x}for(var w in g)m[w]=g[w];p.clientFunctions.forEach((function(e){m[e]=m[e]||function(){le("Renderer does not implement `renderer."+e+"()` on its prototype")}})),r=y}return q({map:qs,keys:[e,t],value:r})}function Hs(e,t){return G({map:qs,keys:[e,t]})}function Us(e,t,n,r,i){return q({map:Gs,keys:[e,t,n,r],value:i})}function Ys(e,t,n,r){return G({map:Gs,keys:[e,t,n,r]})}var Xs=function(){return 2===arguments.length?Hs.apply(null,arguments):3===arguments.length?Ws.apply(null,arguments):4===arguments.length?Ys.apply(null,arguments):5===arguments.length?Us.apply(null,arguments):void le("Invalid extension access syntax")};Fo.prototype.extension=Xs,Vs.forEach((function(e){e.extensions.forEach((function(t){Ws(e.type,t.name,t.impl)}))}));var Ks=function e(){if(!(this instanceof e))return new e;this.length=0},$s=Ks.prototype;$s.instanceString=function(){return"stylesheet"},$s.selector=function(e){return this[this.length++]={selector:e,properties:[]},this},$s.css=function(e,t){var n=this.length-1;if(b(e))this[n].properties.push({name:e,value:t});else if(S(e))for(var r=e,i=Object.keys(r),o=0;o<i.length;o++){var a=i[o],s=r[a];if(null!=s){var u=No.properties[a]||No.properties[A(a)];if(null!=u){var l=u.name,c=s;this[n].properties.push({name:l,value:c})}}}return this},$s.style=$s.css,$s.generateStyle=function(e){var t=new No(e);return this.appendToStyle(t)},$s.appendToStyle=function(e){for(var t=0;t<this.length;t++){var n=this[t],r=n.selector,i=n.properties;e.selector(r);for(var o=0;o<i.length;o++){var a=i[o];e.css(a.name,a.value)}}return e};var Zs=function(e){return void 0===e&&(e={}),S(e)?new Fo(e):b(e)?Xs.apply(Xs,arguments):void 0};Zs.use=function(e){var t=Array.prototype.slice.call(arguments,1);return t.unshift(Zs),e.apply(null,t),this},Zs.warnings=function(e){return ce(e)},Zs.version="3.14.1",Zs.stylesheet=Zs.Stylesheet=Ks,e.exports=Zs}).call(this,n(431).setImmediate)},function(e,t,n){var r=n(100),i=n(442),o=n(443),a=n(444),s=n(445),u=n(446);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=s,l.prototype.set=u,e.exports=l},function(e,t,n){var r=n(437),i=n(438),o=n(439),a=n(440),s=n(441);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t,n){var r=n(54);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(55)(Object,"create");e.exports=r},function(e,t,n){var r=n(459);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(203);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){var r=n(205)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(10),i=n(151),o=n(498),a=n(226);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(a(e))}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},function(e,t,n){var r=n(208),i=n(508),o=n(33),a=n(10);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(e,"__esModule",{value:!0}),e.HoverStatus=void 0;var i=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t(this,e),r(this,"sticky",void 0),r(this,"state",void 0),r(this,"selected",void 0),r(this,"filtered",void 0),n instanceof e?(this.sticky=n.sticky,this.state=n.state,this.selected=n.selected,this.filtered=n.filtered):(this.sticky=e.valNotSticky,this.state="focused",this.selected=!1,this.filtered=!1)}var i,o,a;return i=e,(o=[{key:"isSticky",value:function(){return this.sticky===e.valSticky}},{key:"toNotSticky",value:function(){this.sticky=e.valNotSticky}},{key:"toSticky",value:function(){this.sticky=e.valSticky}},{key:"isFocused",value:function(){return this.state===e.valFocused}},{key:"toFocused",value:function(){this.state=e.valFocused}},{key:"toNotFocused",value:function(){this.state=e.valNotFocused}},{key:"isSelected",value:function(){return this.selected===e.valSelected}},{key:"toSelected",value:function(){this.selected=e.valSelected}},{key:"toNotSelected",value:function(){this.selected=e.valNotSelected}},{key:"isFiltered",value:function(){return this.filtered===e.valFiltered}},{key:"toFiltered",value:function(){this.filtered=e.valFiltered}},{key:"toNotFiltered",value:function(){this.filtered=e.valNotFiltered}}])&&n(i.prototype,o),a&&n(i,a),e}();e.HoverStatus=i,r(i,"valFocused","focused"),r(i,"valNotFocused","notFocused"),r(i,"valSticky",!0),r(i,"valNotSticky",!1),r(i,"valSelected",!0),r(i,"valNotSelected",!1),r(i,"valFiltered",!0),r(i,"valNotFiltered",!1),r(i,"onFn",(function(e){switch(e){case"state":return function(e){e.hoverStatus.toFocused()};case"sticky":return function(e){e.hoverStatus.toSticky()};case"selected":return function(e){e.hoverStatus.toSelected()};case"filtered":return function(e){e.hoverStatus.toFiltered()};default:throw"hoverKey: ".concat(e," provided is not found")}})),r(i,"offFn",(function(e){switch(e){case"state":return function(e){e.hoverStatus.toNotFocused()};case"sticky":return function(e){e.hoverStatus.toNotSticky()};case"selected":return function(e){e.hoverStatus.toNotSelected()};case"filtered":return function(e){e.hoverStatus.toNotFiltered()};default:throw"hoverKey: ".concat(e," provided is not found")}}))})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r=n(109),i=n(33),o=n(238),a=n(10);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(52),n(239),n(138),n(110),n(218),n(241),n(114),n(82),n(154),n(159),n(234),n(81),n(200),n(243),n(158),n(160),n(161)],void 0===(o="function"==typeof(r=function(e,t,n,r,i,o,a,s,u,l,c,f,d,h,p,v,g,y){"use strict";function m(e){return e&&e.__esModule?e:{default:e}}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(e,"__esModule",{value:!0}),e.hasLength=S,e.GraphAtStep=void 0,t=m(t),n=m(n),r=m(r),i=m(i),o=m(o),a=m(a),s=m(s),u=m(u),l=m(l),c=m(c),p=m(p);var w=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),x(this,"log",void 0),x(this,"originalLog",void 0),x(this,"filterDatas",void 0),x(this,"hoverData",void 0),x(this,"stickyDatas",void 0),x(this,"finalFilteredGraph",void 0),x(this,"finalCompleteGraph",void 0),x(this,"finalCyto",void 0),x(this,"cytoLayout",void 0),x(this,"steps",void 0),x(this,"stepsVisible",void 0),x(this,"filteredStepsVisible",void 0),x(this,"stepsAsyncStart",void 0),x(this,"stepsAsyncStop",void 0),x(this,"stepsIdle",void 0),x(this,"stepsOutputCalc",void 0),x(this,"stepsUserMark",void 0),x(this,"minStep",void 0),x(this,"maxStep",void 0),this.originalLog=t,this.filterDatas=[],this.hoverData=null,this.stickyDatas=[],this.log=t,this.initStepInfo(t),this.finalCompleteGraph=this.rawGraphAtStep(t.length),this.updateFinalFilteredGraphAndStepsVisible()}var v,g,y;return v=e,(g=[{key:"updateFinalFilteredGraphAndStepsVisible",value:function(){this.updateFinalFilteredGraph(),this.updateFilteredStepsVisible()}},{key:"initStepInfo",value:function(e){var t,n;this.steps=[],this.stepsAsyncStart=[],this.stepsAsyncStop=[],this.stepsIdle=[],this.stepsOutputCalc=[],this.stepsUserMark=[],this.minStep=e.length>0?e[0].step:-1,this.maxStep=e.length>0?e[e.length-1].step:-1;for(var r=[],i=0;;)if(e.length>i+2&&e[i].action===d.LogStates.asyncStart&&null===e[i].session&&e[i+1].action===d.LogStates.asyncStop&&null===e[i+1].session&&e[i+2].action===d.LogStates.idle&&null===e[i+2].session)i+=3;else{if(!(e.length>i&&e[i].action===d.LogStates.idle))break;i+=1}for(n=i;n<e.length;n++){switch((t=e[n]).action){case d.LogStates.enter:r.push(n);break;case d.LogStates.exit:r.pop(),0===r.length&&this.stepsOutputCalc.push(t.step);break;case d.LogStates.asyncStart:this.stepsAsyncStart.push(t.step);break;case d.LogStates.asyncStop:this.stepsAsyncStop.push(t.step);break;case d.LogStates.idle:n>0&&e[n-1].action!==d.LogStates.idle&&this.stepsIdle.push(t.step);break;case d.LogStates.userMark:this.stepsUserMark.push(t.step)}switch(t.action){case d.LogStates.invalidateStart:var o=t;if("other"===o.type)break;if(e.length>n+1&&n-1>=0){var s=e[n-1],u=e[n+1];if(u.action===d.LogStates.asyncStart&&e.length>n+2&&(u=e[n+2]),u.action===d.LogStates.invalidateEnd&&s.action===d.LogStates.define&&t.reactId===s.reactId&&t.reactId===u.reactId)break}this.steps.push(o.step);break;case d.LogStates.define:case d.LogStates.invalidateEnd:case d.LogStates.isolateInvalidateStart:case d.LogStates.isolateInvalidateEnd:case d.LogStates.createContext:case d.LogStates.asyncStart:case d.LogStates.asyncStop:case d.LogStates.idle:case d.LogStates.userMark:break;default:this.steps.push(t.step)}}this.stepsVisible=(0,a.default)((0,l.default)(this.steps,this.stepsUserMark,this.stepsIdle))}},{key:"updateFilteredStepsVisible",value:function(){if(S(this.filterDatas)){var e,t,n,i=[],o=this.finalFilteredGraph;for(n=0;n<this.stepsVisible.length;n++)switch(e=this.stepsVisible[n],(t=this.log[e]).action){case d.LogStates.dependsOn:case d.LogStates.dependsOnRemove:if(o.hasNodeReactId(t.reactId)&&o.hasNodeReactId(t.depOnReactId)){i.push(e);break}break;case d.LogStates.define:case d.LogStates.updateNodeLabel:case d.LogStates.freeze:case d.LogStates.thaw:case d.LogStates.valueChange:case d.LogStates.enter:case d.LogStates.exit:case d.LogStates.invalidateLater:case d.LogStates.invalidateStart:case d.LogStates.invalidateEnd:case d.LogStates.isolateEnter:case d.LogStates.isolateExit:case d.LogStates.isolateInvalidateStart:case d.LogStates.isolateInvalidateEnd:if(!o.hasNodeReactId(t.reactId))break;i.push(e);break;case d.LogStates.idle:if(i.length>0){var a=i[i.length-1];this.log[a].action!==d.LogStates.idle&&i.push(e)}break;case d.LogStates.userMark:i.push(e);break;case d.LogStates.createContext:case d.LogStates.asyncStart:case d.LogStates.asyncStop:break;default:throw c.default.error(t),"unknown logEntry action in 'next'"}this.filteredStepsVisible=i}else this.filteredStepsVisible=(0,r.default)(this.stepsVisible)}},{key:"nextStep",value:function(e){var t=(0,u.default)(this.filteredStepsVisible,e);return t>=0?t+=1:t=(0,s.default)(this.filteredStepsVisible,e),t>=this.filteredStepsVisible.length||t<0?-1:this.filteredStepsVisible[t]}},{key:"prevStep",value:function(e){var t=(0,s.default)(this.filteredStepsVisible,e)-1;return t<0||t>=this.filteredStepsVisible.length?-1:this.filteredStepsVisible[t]}},{key:"rawGraphAtStep",value:function(e){var t,n=Math.max(0,Math.min(e,this.log.length)),r=new h.Graph(this.log);for(t=0;t<this.log.length&&this.log[t].step<=n;t++)r.addEntry(this.log[t]);return r}},{key:"updateFinalFilteredGraph",value:function(){var e=new h.Graph(this.finalCompleteGraph);S(this.filterDatas)&&e.filterGraphOnNodeIds(this.finalCompleteGraph.familyTreeNodeIdsForDatas(this.filterDatas)),this.finalFilteredGraph=e}},{key:"filteredGraphAtStep",value:function(e){var t=this.rawGraphAtStep(e);if(this.hoverData&&t.hasSomeData(this.hoverData)&&(t.hoverStatusOnNodeIds(this.finalFilteredGraph.familyTreeNodeIds(this.hoverData),"state"),t.highlightSelected(this.hoverData,"selected")),S(this.stickyDatas)&&(0,o.default)(this.stickyDatas.map((function(e){return t.hasSomeData(e)})))){var n=this.finalFilteredGraph.familyTreeNodeIdsForDatas(this.stickyDatas);t.hoverStatusOnNodeIds(n,"sticky"),this.stickyDatas.map((function(e){t.highlightSelected(e,"selected")})),this.hoverData||t.hoverStatusOnNodeIds(n,"state")}return S(this.filterDatas)&&(t.filterGraphOnNodeIds(this.finalFilteredGraph.familyTreeNodeIdsForDatas(this.filterDatas)),this.filterDatas.map((function(e){t.highlightSelected(e,"filtered")}))),t}},{key:"resetHoverData",value:function(){return this.hoverData=null,!0}},{key:"updateHoverData",value:function(e){this.hoverData=e}},{key:"updateHoverDataReset",value:function(){this.hoverData=null}},{key:"updateStickyDatas",value:function(e){this.stickyDatas=e}},{key:"updateStickyDatasReset",value:function(){this.stickyDatas=[]}},{key:"updateFilterDatas",value:function(e){this.filterDatas=e,this.updateFinalFilteredGraphAndStepsVisible()}},{key:"updateFilterDatasReset",value:function(){this.updateFilterDatas([])}},{key:"updateSearchRegex",value:function(e){var t=(0,i.default)((0,f.mapValues)(this.finalCompleteGraph.nodes),(function(t){return e.test(t.label)||e.test(t.key)}));0===t.length&&(t=(0,i.default)((0,f.mapValues)(this.finalCompleteGraph.edges),(function(t){return e.test(t.ghostKey)}))),0===t.length&&(t=(0,i.default)((0,f.mapValues)(this.finalCompleteGraph.edgesUnique),(function(t){return e.test(t.key)}))),0===t.length?(this.updateStickyDatasReset(),this.updateFilterDatasReset()):(this.updateStickyDatas(t),this.updateFilterDatas(t))}},{key:"updateSearchRegexReset",value:function(){this.resetHoverStickyFilterSearch()}},{key:"resetHoverStickyFilterSearch",value:function(){this.hoverData=null,this.stickyDatas=[],this.filterDatas=[],(0,t.default)("#search").val(""),this.updateFinalFilteredGraphAndStepsVisible()}},{key:"fullFilteredGraphAtStep",value:function(e){var t=this.filteredGraphAtStep(e),n=this.finalFilteredGraph;return(0,f.mapValues)(n.nodes).map((function(e){t.nodes.has(e.key)||(e.isDisplayed=!1,t.nodes.set(e.key,e))})),(0,f.mapValues)(n.edgesUnique).map((function(e){t.edgesUnique.has(e.key)||(e.isDisplayed=!1,t.edgesUnique.set(e.key,e))})),t}},{key:"displayAtStep",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.fullFilteredGraphAtStep(e);t.startBatch();var o=t.nodes(),a=i.cytoGraph,s=a.nodes(),u=o.diff(s),l=[],c=!1;u.right.map((function(e){var n=e.data();t.add(e).data("cytoLabel_",n.cytoLabel).data("cytoLabelShort_",n.cytoLabelShort).classes(n.cytoClasses).style(n.cytoStyle)})),u.both.map((function(n){var r=t.$id(n.id()),i=s.$id(n.id()).data(),o=i.cytoClasses;switch(r.data("type")){case"observer":case"observable":break;default:r.data("value")!==i.value&&(c=!0)}r.data(i).data("value",i.value).data("cytoLabel_",i.cytoLabel).data("cytoLabelShort_",i.cytoLabelShort).classes(o).removeStyle().style(i.cytoStyle),i.valueChangedStatus.isActiveAtStep(e)&&l.push((function(){r.flashClass("nodeStartBig",125)})),(i.invalidateStatus.isActiveAtStep(e)||i.enterStatus.isActiveAtStep(e))&&l.push((function(){switch(i.type){case"observable":r.flashClass("nodeMiddleBig",125);break;case"observer":r.flashClass("nodeEndBig",125)}}))})),u.left.map((function(e){t.remove(e)}));var f=t.edges(),d=a.edges(),h=f.diff(d);h.right.map((function(e){var n=e.data();t.add(e).classes(n.cytoClasses).removeStyle().style(n.cytoStyle)})),h.both.map((function(e){var n=d.$id(e.id()).data();t.$id(e.id()).classes(n.cytoClasses).data(n).removeStyle().style(n.cytoStyle)})),h.left.map((function(e){t.remove(e)})),t.endBatch();var v=t.$().sort((function(e,t){return e.data().key>t.data().key?1:-1}));h.right.length!==h.left.length||0!==u.right.length||0!==u.left.length||c||!0===r.forceRedraw?(this.cytoLayout&&(this.cytoLayout.stop(),this.cytoLayout=null),this.cytoLayout=t.layout((0,n.default)({},p.default,r,{eles:v,ready:function(){l.map((function(e){e()}))}})),this.cytoLayout.one("layoutstop",(function(e){this.cytoLayout&&(this.cytoLayout=null)})),this.cytoLayout.run()):l.map((function(e){e()}))}}])&&b(v.prototype,g),y&&b(v,y),e}();function S(e){return e&&e.length>0}e.GraphAtStep=w})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r=n(242);e.exports=function(e,t){return r(e,t)}},function(e,t,n){"use strict";var r=n(6);e.exports={longestPath:function(e){var t={};r.forEach(e.sources(),(function n(i){var o=e.node(i);if(r.has(t,i))return o.rank;t[i]=!0;var a=r.min(r.map(e.outEdges(i),(function(t){return n(t.w)-e.edge(t).minlen})));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),o.rank=a}))},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}},function(e,t,n){var r=n(2),i=n(1).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,n){"use strict";var r=n(11),i=n(56),o=n(9);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,l=void 0===u?n:i(u,n);l>s;)t[s++]=e;return t}},function(e,t,n){var r=n(57),i=n(5)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},function(e,t,n){"use strict";var r=n(8),i=n(44);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){var r=n(69),i=n(5)("iterator"),o=n(57);e.exports=n(39).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){"use strict";var r=n(46),i=n(172),o=n(57),a=n(22);e.exports=n(122)(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";var r=n(40),i=n(0),o=n(14),a=n(17),s=n(57),u=n(284),l=n(58),c=n(36),f=n(5)("iterator"),d=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,n,p,v,g,y){u(n,t,p);var m,b,x,w=function(e){if(!d&&e in _)return _[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},S=t+" Iterator",E="values"==v,k=!1,_=e.prototype,T=_[f]||_["@@iterator"]||v&&_[v],C=T||w(v),P=v?E?w("entries"):C:void 0,D="Array"==t&&_.entries||T;if(D&&(x=c(D.call(new e)))!==Object.prototype&&x.next&&(l(x,S,!0),r||"function"==typeof x[f]||a(x,f,h)),E&&T&&"values"!==T.name&&(k=!0,C=function(){return T.call(this)}),r&&!y||!d&&!k&&_[f]||a(_,f,C),s[t]=C,s[S]=h,v)if(m={values:E?C:w("values"),keys:g?C:w("keys"),entries:P},y)for(b in m)b in _||o(_,b,m[b]);else i(i.P+i.F*(d||k),t,m);return m}},function(e,t,n){var r=n(83)("keys"),i=n(45);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(2),i=n(126).set;e.exports=function(e,t,n){var o,a=t.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(e,o),e}},function(e,t,n){var r=n(2),i=n(3),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(27)(Function.call,n(20).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t){e.exports="\t\n\v\f\r   ᠎             　\u2028\u2029\ufeff"},function(e,t,n){var r,i,o,a=n(27),s=n(178),u=n(175),l=n(116),c=n(1),f=c.process,d=c.setImmediate,h=c.clearImmediate,p=c.MessageChannel,v=c.Dispatch,g=0,y={},m=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},b=function(e){m.call(e.data)};d&&h||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return y[++g]=function(){s("function"==typeof e?e:Function(e),t)},r(g),g},h=function(e){delete y[e]},"process"==n(47)(f)?r=function(e){f.nextTick(a(m,e,1))}:v&&v.now?r=function(e){v.now(a(m,e,1))}:p?(o=(i=new p).port2,i.port1.onmessage=b,r=a(o.postMessage,o,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",b,!1)):r="onreadystatechange"in l("script")?function(e){u.appendChild(l("script")).onreadystatechange=function(){u.removeChild(this),m.call(e)}}:function(e){setTimeout(a(m,e,1),0)}),e.exports={set:d,clear:h}},function(e,t,n){var r=n(2),i=n(47),o=n(5)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){"use strict";var r=n(133)(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r=n(35),i=n(34);e.exports=function(e){return function(t,n){var o,a,s=String(i(t)),u=r(n),l=s.length;return u<0||u>=l?e?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===l||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}}},function(e,t,n){"use strict";var r,i,o=n(93),a=RegExp.prototype.exec,s=String.prototype.replace,u=a,l=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),c=void 0!==/()??/.exec("")[1];(l||c)&&(u=function(e){var t,n,r,i,u=this;return c&&(n=new RegExp("^"+u.source+"$(?!\\s)",o.call(u))),l&&(t=u.lastIndex),r=a.call(u,e),l&&r&&(u.lastIndex=u.global?r.index+r[0].length:t),c&&r&&r.length>1&&s.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=u},function(e,t,n){var r=n(131),i=n(34);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(e))}},function(e,t,n){var r=n(5)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){"use strict";var r=n(1),i=n(7),o=n(40),a=n(96),s=n(17),u=n(60),l=n(4),c=n(61),f=n(35),d=n(9),h=n(194),p=n(51).f,v=n(8).f,g=n(117),y=n(58),m=r.ArrayBuffer,b=r.DataView,x=r.Math,w=r.RangeError,S=r.Infinity,E=m,k=x.abs,_=x.pow,T=x.floor,C=x.log,P=x.LN2,D=i?"_b":"buffer",M=i?"_l":"byteLength",O=i?"_o":"byteOffset";function I(e,t,n){var r,i,o,a=new Array(n),s=8*n-t-1,u=(1<<s)-1,l=u>>1,c=23===t?_(2,-24)-_(2,-77):0,f=0,d=e<0||0===e&&1/e<0?1:0;for((e=k(e))!=e||e===S?(i=e!=e?1:0,r=u):(r=T(C(e)/P),e*(o=_(2,-r))<1&&(r--,o*=2),(e+=r+l>=1?c/o:c*_(2,1-l))*o>=2&&(r++,o/=2),r+l>=u?(i=0,r=u):r+l>=1?(i=(e*o-1)*_(2,t),r+=l):(i=e*_(2,l-1)*_(2,t),r=0));t>=8;a[f++]=255&i,i/=256,t-=8);for(r=r<<t|i,s+=t;s>0;a[f++]=255&r,r/=256,s-=8);return a[--f]|=128*d,a}function N(e,t,n){var r,i=8*n-t-1,o=(1<<i)-1,a=o>>1,s=i-7,u=n-1,l=e[u--],c=127&l;for(l>>=7;s>0;c=256*c+e[u],u--,s-=8);for(r=c&(1<<-s)-1,c>>=-s,s+=t;s>0;r=256*r+e[u],u--,s-=8);if(0===c)c=1-a;else{if(c===o)return r?NaN:l?-S:S;r+=_(2,t),c-=a}return(l?-1:1)*r*_(2,c-t)}function A(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function L(e){return[255&e]}function j(e){return[255&e,e>>8&255]}function B(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function F(e){return I(e,52,8)}function R(e){return I(e,23,4)}function z(e,t,n){v(e.prototype,t,{get:function(){return this[n]}})}function V(e,t,n,r){var i=h(+n);if(i+t>e[M])throw w("Wrong index!");var o=e[D]._b,a=i+e[O],s=o.slice(a,a+t);return r?s:s.reverse()}function q(e,t,n,r,i,o){var a=h(+n);if(a+t>e[M])throw w("Wrong index!");for(var s=e[D]._b,u=a+e[O],l=r(+i),c=0;c<t;c++)s[u+c]=l[o?c:t-c-1]}if(a.ABV){if(!l((function(){m(1)}))||!l((function(){new m(-1)}))||l((function(){return new m,new m(1.5),new m(NaN),"ArrayBuffer"!=m.name}))){for(var G,W=(m=function(e){return c(this,m),new E(h(e))}).prototype=E.prototype,H=p(E),U=0;H.length>U;)(G=H[U++])in m||s(m,G,E[G]);o||(W.constructor=m)}var Y=new b(new m(2)),X=b.prototype.setInt8;Y.setInt8(0,2147483648),Y.setInt8(1,2147483649),!Y.getInt8(0)&&Y.getInt8(1)||u(b.prototype,{setInt8:function(e,t){X.call(this,e,t<<24>>24)},setUint8:function(e,t){X.call(this,e,t<<24>>24)}},!0)}else m=function(e){c(this,m,"ArrayBuffer");var t=h(e);this._b=g.call(new Array(t),0),this[M]=t},b=function(e,t,n){c(this,b,"DataView"),c(e,m,"DataView");var r=e[M],i=f(t);if(i<0||i>r)throw w("Wrong offset!");if(i+(n=void 0===n?r-i:d(n))>r)throw w("Wrong length!");this[D]=e,this[O]=i,this[M]=n},i&&(z(m,"byteLength","_l"),z(b,"buffer","_b"),z(b,"byteLength","_l"),z(b,"byteOffset","_o")),u(b.prototype,{getInt8:function(e){return V(this,1,e)[0]<<24>>24},getUint8:function(e){return V(this,1,e)[0]},getInt16:function(e){var t=V(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=V(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return A(V(this,4,e,arguments[1]))},getUint32:function(e){return A(V(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return N(V(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return N(V(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){q(this,1,e,L,t)},setUint8:function(e,t){q(this,1,e,L,t)},setInt16:function(e,t){q(this,2,e,j,t,arguments[2])},setUint16:function(e,t){q(this,2,e,j,t,arguments[2])},setInt32:function(e,t){q(this,4,e,B,t,arguments[2])},setUint32:function(e,t){q(this,4,e,B,t,arguments[2])},setFloat32:function(e,t){q(this,4,e,R,t,arguments[2])},setFloat64:function(e,t){q(this,8,e,F,t,arguments[2])}});y(m,"ArrayBuffer"),y(b,"DataView"),s(b.prototype,a.VIEW,!0),t.ArrayBuffer=m,t.DataView=b},function(e,t,n){var r=n(201);e.exports=function(e){return r(e,4)}},function(e,t,n){var r=n(55)(n(23),"Map");e.exports=r},function(e,t,n){var r=n(451),i=n(458),o=n(460),a=n(461),s=n(462);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){(function(e){var r=n(198),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s}).call(this,n(142)(e))},function(e,t,n){var r=n(76),i=n(468),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(208),i=n(209),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return o.call(e,t)})))}:i;e.exports=s},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},function(e,t,n){var r=n(214);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){var r=n(108),i=n(77);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},function(e,t,n){var r=n(10),i=n(42),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(a.test(e)||!o.test(e)||null!=t&&e in Object(t))}},function(e,t,n){var r=n(153),i=n(38);e.exports=function(e,t){return e&&r(e,t,i)}},function(e,t,n){var r=n(506)();e.exports=r},function(e,t,n){var r=n(155),i=n(80),o=n(513),a=n(233),s=i((function(e){return o(r(e,1,a,!0))}));e.exports=s},function(e,t,n){var r=n(147),i=n(509);e.exports=function e(t,n,o,a,s){var u=-1,l=t.length;for(o||(o=i),s||(s=[]);++u<l;){var c=t[u];n>0&&o(c)?n>1?e(c,n-1,o,a,s):r(s,c):a||(s[s.length]=c)}return s}},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(64),n(12),n(81),n(111),n(521),n(235),n(237)],void 0===(o="function"==typeof(r=function(e,t,n,r,i,o,a,s){"use strict";function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c;Object.defineProperty(e,"__esModule",{value:!0}),e.Node=void 0,t=(c=t)&&c.__esModule?c:{default:c};var f=function(){function e(n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"reactId",void 0),l(this,"label",void 0),l(this,"type",void 0),l(this,"session",void 0),l(this,"time",void 0),l(this,"isFrozen",void 0),l(this,"statusArr",void 0),l(this,"value",void 0),l(this,"hoverStatus",void 0),l(this,"valueChangedStatus",void 0),l(this,"enterStatus",void 0),l(this,"invalidateStatus",void 0),l(this,"isDisplayed",void 0),l(this,"calculationTime",void 0),l(this,"calculationStartMap",void 0),void 0===n.reactId)throw"data.reactId not provided in new Node";if(void 0===n.label)throw"data.label not provided in new Node";if(void 0===n.type)throw"data.type not provided in new Node";if(void 0===n.session)throw"data.session not provided in new Node";if(void 0===n.time)throw"data.time not provided in new Node";if(this.reactId=n.reactId,this.label=n.label,this.type=n.type,this.session=(0,t.default)(n.session)?"Global":n.session,this.time=n.time,this.isFrozen=n.isFrozen||!1,this.statusArr=new a.StatusArr(n.statusArr||[]),this.value=(0,t.default)(n.value)?null:n.value,this.hoverStatus=new i.HoverStatus(n.hoverStatus),this.isDisplayed=!!(0,t.default)(n.isDisplayed)||n.isDisplayed,this.calculationTime=(0,t.default)(n.calculationTime)?null:n.calculationTime,this.calculationStartMap=(0,t.default)(n.calculationStartMap)?new Map:new Map(n.calculationStartMap),this.valueChangedStatus=n.valueChangedStatus||new o.ActiveStateStatus,this.enterStatus=n.enterStatus||new o.ActiveStateStatus,n.invalidateStatus)this.invalidateStatus=n.invalidateStatus;else switch(this.invalidateStatus=new o.ActiveStateStatus,this.type){case"observable":case"observer":this.invalidateStatus.toFinished()}}var c,f,d;return c=e,(f=[{key:"statusAdd",value:function(e){switch(e.action===r.LogStates.enter&&this.calculationStartMap.set(e.ctxId,e.time),e.action){case r.LogStates.enter:case r.LogStates.isolateInvalidateStart:case r.LogStates.invalidateStart:this.calculationTime=null}return this.statusArr.add(e),this.statusArr}},{key:"statusRemove",value:function(e){if(e.action===r.LogStates.exit){var n=this.calculationStartMap.get(e.ctxId);(0,t.default)(n)||(this.calculationTime=1e3*(e.time-n)),this.calculationStartMap.delete(e.ctxId)}return this.statusArr.remove()}},{key:"statusLast",value:function(){return this.statusArr.last()}},{key:"calculationTimeStr",get:function(){return(0,t.default)(this.calculationTime)?null:s.inTestMode?"(shinytest)":"".concat(this.calculationTime.toFixed(0),"ms")}},{key:"id",get:function(){return this.reactId.replace(/\$/g,"_")}},{key:"key",get:function(){return this.reactId}},{key:"hoverKey",get:function(){return this.key}},{key:"inEnter",get:function(){return this.statusArr.containsStatus(r.LogStates.enter)}},{key:"inIsolate",get:function(){return this.statusArr.containsStatus(r.LogStates.isolateEnter)}},{key:"inInvalidate",get:function(){return this.statusArr.containsStatus(r.LogStates.invalidateStart)}},{key:"inIsolateInvalidate",get:function(){return this.statusArr.containsStatus(r.LogStates.isolateInvalidateStart)}},{key:"cytoStyle",get:function(){return{}}},{key:"cytoLabel",get:function(){var e="".concat(this.label);if("observer"===this.type||"observable"===this.type){var r=this.calculationTimeStr;return n.rlog.displayTimeOnNodes&&!(0,t.default)(r)?"".concat(e,"\n\nCalculation Time: ").concat(r):e}if(!(0,t.default)(this.value)){var i="".concat(this.value);return i.includes("\\n")||(i=i.replace(/^\s+/,"")),"".concat(e,"\n\nValue:\n").concat(i)}return e}},{key:"cytoLabelShort",get:function(){var e="".concat(this.label).replace(/[\t\n\r ]+/g," ");if("observer"===this.type||"observable"===this.type){if(n.rlog.displayTimeOnNodes){var r=this.calculationTimeStr;if(!(0,t.default)(r))return"".concat(e," (").concat(r,")")}return e}if(!(0,t.default)(this.value)){var i="".concat(this.value);return i.includes("\\n")||(i=i.replace(/^\s+/,"")),"".concat(e," - '").concat(i,"'")}return e}},{key:"cytoClasses",get:function(){var e=[];switch(this.type){case"observer":e.push("nodeEnd");break;case"observable":e.push("nodeMiddle");break;default:e.push("nodeStart")}switch(this.inEnter&&e.push("nodeEnter"),this.enterStatus.isActive&&e.push("nodeEnterActive"),"observer"!==this.type&&"observable"!==this.type||(this.invalidateStatus.isActive?e.push("nodeInvalidateActive"):this.invalidateStatus.isOn?e.push("nodeInvalidate"):this.invalidateStatus.isFinished&&e.push("nodeInvalidateDone")),this.inIsolate&&e.push("nodeIsolate"),this.valueChangedStatus.isOn&&e.push("nodeValueChanged"),this.hoverStatus.state){case i.HoverStatus.valFocused:break;case i.HoverStatus.valNotFocused:this.hoverStatus.isSticky()?e.push("hoverNotFocusedButSticky"):e.push("hoverNotFocused")}if(this.hoverStatus.isSelected())switch(e.push("nodeSelected"),this.type){case"observable":e.push("nodeSelectedMiddle");break;case"observer":e.push("nodeSelectedEnd");break;default:e.push("nodeSelectedStart")}if(this.hoverStatus.isFiltered())switch(e.push("nodeFiltered"),this.type){case"observable":e.push("nodeFilteredMiddle");break;case"observer":e.push("nodeFilteredEnd");break;default:e.push("nodeFilteredStart")}return this.isFrozen&&e.push("nodeFrozen"),this.isDisplayed||e.push("nodeHidden"),e.join(" ")}},{key:"cytoData",get:function(){return{group:"nodes",data:this}}}])&&u(c.prototype,f),d&&u(c,d),e}();e.Node=f})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=window.console||{log:function(){},warn:function(){},error:function(){}};e.default=t})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(64),n(111)],void 0===(o="function"==typeof(r=function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o;Object.defineProperty(e,"__esModule",{value:!0}),e.ghostKey=e.edgeKey=e.Edge=void 0,t=(o=t)&&o.__esModule?o:{default:o};var a=function(e,t){return"".concat(e," depends on ").concat(t)};e.ghostKey=a;var s=function(e,t,n){return"".concat(e," depends on ").concat(t," in ").concat(n)};e.edgeKey=s;var u=function(){function e(r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,"reactId",void 0),i(this,"depOnReactId",void 0),i(this,"ctxId",void 0),i(this,"session",void 0),i(this,"time",void 0),i(this,"status",void 0),i(this,"isGhost",void 0),i(this,"hoverStatus",void 0),i(this,"isDisplayed",void 0),void 0===r.reactId)throw"data.reactId not provided to new Edge()";if(void 0===r.depOnReactId)throw"data.depOnReactId not provided to new Edge()";if(void 0===r.ctxId)throw"data.ctxId not provided to new Edge()";if(void 0===r.time)throw"data.time not provided to new Edge()";this.reactId=r.reactId,this.depOnReactId=r.depOnReactId,this.ctxId=r.ctxId,this.session=(0,t.default)(r.session)?"Global":r.session,this.time=r.time,this.status=(0,t.default)(r.status)?"normal":r.status,this.isGhost=!(0,t.default)(r.isGhost)&&r.isGhost,this.hoverStatus=new n.HoverStatus(r.hoverStatus),this.isDisplayed=!!(0,t.default)(r.isDisplayed)||r.isDisplayed}var o,u,l;return o=e,(u=[{key:"id",get:function(){return"".concat(this.reactId,"_").concat(this.depOnReactId,"_").concat(this.ctxId).replace(/\$/g,"_")}},{key:"source",get:function(){return this.depOnReactId.replace(/\$/g,"_")}},{key:"target",get:function(){return this.reactId.replace(/\$/g,"_")}},{key:"key",get:function(){return s(this.reactId,this.depOnReactId,this.ctxId)}},{key:"ghostKey",get:function(){return a(this.reactId,this.depOnReactId)}},{key:"hoverKey",get:function(){return this.ghostKey}},{key:"inIsolate",get:function(){return"isolate"===this.status}},{key:"cytoStyle",get:function(){return{}}},{key:"cytoClasses",get:function(){var e=[];switch(this.inIsolate&&e.push("edgeIsolate"),this.hoverStatus.state){case n.HoverStatus.valFocused:break;case n.HoverStatus.valNotFocused:this.hoverStatus.sticky?e.push("hoverNotFocusedButSticky"):e.push("hoverNotFocused")}return this.hoverStatus.selected&&e.push("edgeSelected"),this.isDisplayed||e.push("edgeHidden"),e.join(" ")}},{key:"cytoData",get:function(){return{group:"edges",data:this}}}])&&r(o.prototype,u),l&&r(o,l),e}();e.Edge=u})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(64),n(111)],void 0===(o="function"==typeof(r=function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o;Object.defineProperty(e,"__esModule",{value:!0}),e.GhostEdge=void 0,t=(o=t)&&o.__esModule?o:{default:o};var a=function(){function e(r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,"reactId",void 0),i(this,"depOnReactId",void 0),i(this,"time",void 0),i(this,"hoverStatus",void 0),i(this,"isGhost",void 0),i(this,"session",void 0),i(this,"isDisplayed",void 0),void 0===r.reactId)throw"data.reactId not provided to new GhostEdge()";if(void 0===r.depOnReactId)throw"data.depOnReactId not provided to new GhostEdge()";if(void 0===r.time)throw"data.time not provided to new GhostEdge()";this.reactId=r.reactId,this.depOnReactId=r.depOnReactId,this.session=(0,t.default)(r.session)?"Global":r.session,this.time=r.time,this.isGhost=!!(0,t.default)(r.isGhost)||r.isGhost,this.hoverStatus=new n.HoverStatus(r.hoverStatus),this.isDisplayed=!!(0,t.default)(r.isDisplayed)||r.isDisplayed}var o,a,s;return o=e,(a=[{key:"id",get:function(){return"".concat(this.reactId,"_").concat(this.depOnReactId).replace(/\$/g,"_")}},{key:"source",get:function(){return this.depOnReactId.replace(/\$/g,"_")}},{key:"target",get:function(){return this.reactId.replace(/\$/g,"_")}},{key:"key",get:function(){return"".concat(this.reactId," depends on ").concat(this.depOnReactId)}},{key:"hoverKey",get:function(){return this.key}},{key:"cytoStyle",get:function(){return{}}},{key:"cytoClasses",get:function(){var e=["edgeGhost"];switch(this.hoverStatus.state){case n.HoverStatus.valFocused:break;case n.HoverStatus.valNotFocused:this.hoverStatus.sticky?e.push("edgeGhostHoverNotFocusedButSticky"):e.push("edgeGhostHoverNotFocused")}return this.hoverStatus.selected&&e.push("edgeGhostSelected"),this.isDisplayed||e.push("edgeHidden"),e.join(" ")}},{key:"cytoData",get:function(){return{group:"edges",data:this}}}])&&r(o.prototype,a),s&&r(o,s),e}();e.GhostEdge=a})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r=n(155);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},function(e,t,n){"use strict";var r=n(21);e.exports=i;function i(e){this._isDirected=!r.has(e,"directed")||e.directed,this._isMultigraph=!!r.has(e,"multigraph")&&e.multigraph,this._isCompound=!!r.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function o(e,t){e[t]?e[t]++:e[t]=1}function a(e,t){--e[t]||delete e[t]}function s(e,t,n,i){var o=""+t,a=""+n;if(!e&&o>a){var s=o;o=a,a=s}return o+""+a+""+(r.isUndefined(i)?"\0":i)}function u(e,t,n,r){var i=""+t,o=""+n;if(!e&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return r&&(s.name=r),s}function l(e,t){return s(e,t.v,t.w,t.name)}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(e){return this._label=e,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultNodeLabelFn=e,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return r.keys(this._nodes)},i.prototype.sources=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._in[t])}))},i.prototype.sinks=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._out[t])}))},i.prototype.setNodes=function(e,t){var n=arguments,i=this;return r.each(e,(function(e){n.length>1?i.setNode(e,t):i.setNode(e)})),this},i.prototype.setNode=function(e,t){return r.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},i.prototype.node=function(e){return this._nodes[e]},i.prototype.hasNode=function(e){return r.has(this._nodes,e)},i.prototype.removeNode=function(e){var t=this;if(r.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],r.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),r.each(r.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],r.each(r.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},i.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(t))t="\0";else{for(var n=t+="";!r.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},i.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},i.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if("\0"!==t)return t}},i.prototype.children=function(e){if(r.isUndefined(e)&&(e="\0"),this._isCompound){var t=this._children[e];if(t)return r.keys(t)}else{if("\0"===e)return this.nodes();if(this.hasNode(e))return[]}},i.prototype.predecessors=function(e){var t=this._preds[e];if(t)return r.keys(t)},i.prototype.successors=function(e){var t=this._sucs[e];if(t)return r.keys(t)},i.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return r.union(t,this.successors(e))},i.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},i.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){e(r)&&t.setNode(r,n)})),r.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var i={};return this._isCompound&&r.each(t.nodes(),(function(e){t.setParent(e,function e(r){var o=n.parent(r);return void 0===o||t.hasNode(o)?(i[r]=o,o):o in i?i[o]:e(o)}(e))})),t},i.prototype.setDefaultEdgeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultEdgeLabelFn=e,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return r.values(this._edgeObjs)},i.prototype.setPath=function(e,t){var n=this,i=arguments;return r.reduce(e,(function(e,r){return i.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r})),this},i.prototype.setEdge=function(){var e,t,n,i,a=!1,l=arguments[0];"object"==typeof l&&null!==l&&"v"in l?(e=l.v,t=l.w,n=l.name,2===arguments.length&&(i=arguments[1],a=!0)):(e=l,t=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=""+e,t=""+t,r.isUndefined(n)||(n=""+n);var c=s(this._isDirected,e,t,n);if(r.has(this._edgeLabels,c))return a&&(this._edgeLabels[c]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[c]=a?i:this._defaultEdgeLabelFn(e,t,n);var f=u(this._isDirected,e,t,n);return e=f.v,t=f.w,Object.freeze(f),this._edgeObjs[c]=f,o(this._preds[t],e),o(this._sucs[e],t),this._in[t][c]=f,this._out[e][c]=f,this._edgeCount++,this},i.prototype.edge=function(e,t,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):s(this._isDirected,e,t,n);return this._edgeLabels[r]},i.prototype.hasEdge=function(e,t,n){var i=1===arguments.length?l(this._isDirected,arguments[0]):s(this._isDirected,e,t,n);return r.has(this._edgeLabels,i)},i.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):s(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],a(this._preds[t],e),a(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},i.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var i=r.values(n);return t?r.filter(i,(function(e){return e.v===t})):i}},i.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var i=r.values(n);return t?r.filter(i,(function(e){return e.w===t})):i}},i.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},function(e,t,n){var r=n(533),i=n(228);e.exports=function(e,t){return null!=e&&i(e,t,r)}},function(e,t,n){var r=n(42);e.exports=function(e,t,n){for(var i=-1,o=e.length;++i<o;){var a=e[i],s=t(a);if(null!=s&&(void 0===u?s==s&&!r(s):n(s,u)))var u=s,l=a}return l}},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.colors=void 0;var t={progressBar:{background:"#f0f0f0",progress:"#8e8e8e",userMark:"#666666",idle:"#a3c586"},nodes:{label_text_color:"#606060",label_text_opacity:1,label_background_color:"white",label_background_opacity:.8,invalidating:"#969696",invalidated:"#d9d9d9",calculating:"#fcbf49",ready:"#a3c586"},regular:{white:"#ffffff",black:"#000000",green1:"#f7fcb9",green2:"#78c679",green3:"#238443",greenLite:"#b2df8a",red:"#e41a1c",blue:"#377eb8",green:"#4daf4a",purple:"#984ea3",purpleLite:"#f191ff",orange:"#ff7f00",yellow:"#ffff33",brown:"#a65628",pink:"#f781bf",grey:"#999999",grey1:"#d9d9d9",grey2:"#969696",grey3:"#737373"},edges:{running:"#676767",isolate:"#818181",active:"#818181",inactive:"#ececec"},ghostEdges:{default:"#3c3b39"},frozen:{default:"#2171b5"},lite:{white:"#ffffff",black:"#b2b2b2",green1:"#ffffe5",green2:"#f7fcb9",green3:"#d9f0a3",greenLite:"#d6eec0",red:"#fbb4ae",blue:"#b3cde3",green:"#ccebc5",purple:"#decbe4",orange:"#fed9a6",yellow:"#ffffcc",brown:"#e5d8bd",pink:"#fddaec",grey:"#f2f2f2"}};e.colors=t;var n=t;e.default=n})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(82),n(114),n(12),n(25)],void 0===(o="function"==typeof(r=function(e,t,n,r,i){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0}),e.prevStepInArr=e.nextStepInArr=e.lastOutputCalc=e.firstOutputCalc=e.prevOutputCalc=e.nextOutputCalc=void 0,t=o(t),n=o(n);var a=function(e){var o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o=-1!==(0,t.default)(e,r.rlog.curTick)?r.rlog.getGraph.nextStep(r.rlog.curTick):r.rlog.curTick;var s,u,l=(0,n.default)(e,o);for(s=l;s<e.length;s++)if(u=e[s],(0,t.default)(r.rlog.getGraph.filteredStepsVisible,u)>=0)return(0,i.updateGraph)(u,a),!0;return!1};e.nextStepInArr=a;var s=function(e){var o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o=-1!==(0,t.default)(e,r.rlog.curTick)?r.rlog.getGraph.prevStep(r.rlog.curTick):r.rlog.curTick;var s,u,l=(0,n.default)(e,o)-1;if(l<0)return!1;for(s=l;s>=0;s--)if(u=e[s],(0,t.default)(r.rlog.getGraph.filteredStepsVisible,u)>=0)return(0,i.updateGraph)(u,a),!0;return!1};e.prevStepInArr=s,e.nextOutputCalc=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(r.rlog.getGraph.stepsOutputCalc,e)},e.prevOutputCalc=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(r.rlog.getGraph.stepsOutputCalc,e)},e.lastOutputCalc=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r.rlog.getGraph.stepsOutputCalc[r.rlog.getGraph.stepsOutputCalc.length-1]||0;return(0,i.updateGraph)(t,e)},e.firstOutputCalc=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r.rlog.getGraph.stepsOutputCalc[0]||0;return(0,i.updateGraph)(t,e)}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){e.exports=!n(7)&&!n(4)((function(){return 7!=Object.defineProperty(n(116)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){"use strict";var r=n(11),i=n(56),o=n(9);e.exports=[].copyWithin||function(e,t){var n=r(this),a=o(n.length),s=i(e,a),u=i(t,a),l=arguments.length>2?arguments[2]:void 0,c=Math.min((void 0===l?a:i(l,a))-u,a-s),f=1;for(u<s&&s<u+c&&(f=-1,u+=c-1,s+=c-1);c-- >0;)u in n?n[s]=n[u]:delete n[s],s+=f,u+=f;return n}},function(e,t,n){var r=n(272);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(3);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(8),i=n(3),o=n(49);e.exports=n(7)?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),s=a.length,u=0;s>u;)r.f(e,n=a[u++],t[n]);return e}},function(e,t,n){var r=n(18),i=n(22),o=n(87)(!1),a=n(123)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),u=0,l=[];for(n in s)n!=a&&r(s,n)&&l.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(l,n)||l.push(n));return l}},function(e,t,n){var r=n(1).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(19),i=n(11),o=n(84),a=n(9);e.exports=function(e,t,n,s,u){r(t);var l=i(e),c=o(l),f=a(l.length),d=u?f-1:0,h=u?-1:1;if(n<2)for(;;){if(d in c){s=c[d],d+=h;break}if(d+=h,u?d<0:f<=d)throw TypeError("Reduce of empty array with no initial value")}for(;u?d>=0:f>d;d+=h)d in c&&(s=t(s,c[d],d,l));return s}},function(e,t,n){"use strict";var r=n(19),i=n(2),o=n(178),a=[].slice,s={},u=function(e,t,n){if(!(t in s)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";s[t]=Function("F,a","return new F("+r.join(",")+")")}return s[t](e,n)};e.exports=Function.bind||function(e){var t=r(this),n=a.call(arguments,1),s=function(){var r=n.concat(a.call(arguments));return this instanceof s?u(t,r.length,r):o(t,r,e)};return i(t.prototype)&&(s.prototype=t.prototype),s}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){"use strict";var r=n(8).f,i=n(48),o=n(60),a=n(27),s=n(61),u=n(88),l=n(122),c=n(172),f=n(59),d=n(7),h=n(41).fastKey,p=n(50),v=d?"_s":"size",g=function(e,t){var n,r=h(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,l){var c=e((function(e,r){s(e,c,t,"_i"),e._t=t,e._i=i(null),e._f=void 0,e._l=void 0,e[v]=0,null!=r&&u(r,n,e[l],e)}));return o(c.prototype,{clear:function(){for(var e=p(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[v]=0},delete:function(e){var n=p(this,t),r=g(n,e);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[v]--}return!!r},forEach:function(e){p(this,t);for(var n,r=a(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!g(p(this,t),e)}}),d&&r(c.prototype,"size",{get:function(){return p(this,t)[v]}}),c},def:function(e,t,n){var r,i,o=g(e,t);return o?o.v=n:(e._l=o={i:i=h(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o),r&&(r.n=o),e[v]++,"F"!==i&&(e._i[i]=o)),e},getEntry:g,setStrong:function(e,t,n){l(e,t,(function(e,n){this._t=p(e,t),this._k=n,this._l=void 0}),(function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?c(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,c(1))}),n?"entries":"values",!n,!0),f(t)}}},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){var r=n(2),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t,n){"use strict";var r=n(7),i=n(49),o=n(90),a=n(70),s=n(11),u=n(84),l=Object.assign;e.exports=!l||n(4)((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=r}))?function(e,t){for(var n=s(e),l=arguments.length,c=1,f=o.f,d=a.f;l>c;)for(var h,p=u(arguments[c++]),v=f?i(p).concat(f(p)):i(p),g=v.length,y=0;g>y;)h=v[y++],r&&!d.call(p,h)||(n[h]=p[h]);return n}:l},function(e,t,n){var r=n(7),i=n(49),o=n(22),a=n(70).f;e.exports=function(e){return function(t){for(var n,s=o(t),u=i(s),l=u.length,c=0,f=[];l>c;)n=u[c++],r&&!a.call(s,n)||f.push(e?[n,s[n]]:s[n]);return f}}},function(e,t,n){var r=n(51),i=n(90),o=n(3),a=n(1).Reflect;e.exports=a&&a.ownKeys||function(e){var t=r.f(o(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(22),i=n(51).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";var r=n(19);function i(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new i(e)}},function(e,t,n){var r=n(3),i=n(2),o=n(187);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){n(7)&&"g"!=/./g.flags&&n(8).f(RegExp.prototype,"flags",{configurable:!0,get:n(93)})},function(e,t,n){t.f=n(5)},function(e,t,n){var r=n(1),i=n(39),o=n(40),a=n(190),s=n(8).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t,n){var r=n(9),i=n(193),o=n(34);e.exports=function(e,t,n,a){var s=String(o(e)),u=s.length,l=void 0===n?" ":String(n),c=r(t);if(c<=u||""==l)return s;var f=c-u,d=i.call(l,Math.ceil(f/l.length));return d.length>f&&(d=d.slice(0,f)),a?d+s:s+d}},function(e,t,n){"use strict";var r=n(35),i=n(34);e.exports=function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},function(e,t,n){var r=n(35),i=n(9);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw RangeError("Wrong length!");return n}},function(e,t,n){"use strict";var r=n(60),i=n(41).getWeak,o=n(3),a=n(2),s=n(61),u=n(88),l=n(28),c=n(18),f=n(50),d=l(5),h=l(6),p=0,v=function(e){return e._l||(e._l=new g)},g=function(){this.a=[]},y=function(e,t){return d(e.a,(function(e){return e[0]===t}))};g.prototype={get:function(e){var t=y(this,e);if(t)return t[1]},has:function(e){return!!y(this,e)},set:function(e,t){var n=y(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=h(this.a,(function(t){return t[0]===e}));return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,o){var l=e((function(e,r){s(e,l,t,"_i"),e._t=t,e._i=p++,e._l=void 0,null!=r&&u(r,n,e[o],e)}));return r(l.prototype,{delete:function(e){if(!a(e))return!1;var n=i(e);return!0===n?v(f(this,t)).delete(e):n&&c(n,this._i)&&delete n[this._i]},has:function(e){if(!a(e))return!1;var n=i(e);return!0===n?v(f(this,t)).has(e):n&&c(n,this._i)}}),l},def:function(e,t,n){var r=i(o(t),!0);return!0===r?v(e).set(t,n):r[e._i]=n,e},ufstore:v}},function(e,t,n){var r=n(16),i=n(197),o=n(199),a=Math.max,s=Math.min;e.exports=function(e,t,n){var u,l,c,f,d,h,p=0,v=!1,g=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=u,r=l;return u=l=void 0,p=t,f=e.apply(r,n)}function b(e){return p=e,d=setTimeout(w,t),v?m(e):f}function x(e){var n=e-h;return void 0===h||n>=t||n<0||g&&e-p>=c}function w(){var e=i();if(x(e))return S(e);d=setTimeout(w,function(e){var n=t-(e-h);return g?s(n,c-(e-p)):n}(e))}function S(e){return d=void 0,y&&u?m(e):(u=l=void 0,f)}function E(){var e=i(),n=x(e);if(u=arguments,l=this,h=e,n){if(void 0===d)return b(h);if(g)return clearTimeout(d),d=setTimeout(w,t),m(h)}return void 0===d&&(d=setTimeout(w,t)),f}return t=o(t)||0,r(n)&&(v=!!n.leading,c=(g="maxWait"in n)?a(o(n.maxWait)||0,t):c,y="trailing"in n?!!n.trailing:y),E.cancel=function(){void 0!==d&&clearTimeout(d),p=0,u=h=l=d=void 0},E.flush=function(){return void 0===d?f:S(i())},E}},function(e,t,n){var r=n(23);e.exports=function(){return r.Date.now()}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(97))},function(e,t,n){var r=n(16),i=n(42),o=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=s.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):a.test(e)?NaN:+e}},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(138),n(218),n(110),n(64),n(154),n(157),n(98),n(234),n(81),n(158),n(160),n(161),n(111),n(235),n(523),n(159)],void 0===(o="function"==typeof(r=function(e,t,n,r,i,o,a,s,u,l,c,f,d,h,p,v,g){"use strict";function y(e){return e&&e.__esModule?e:{default:e}}function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(e,"__esModule",{value:!0}),e.Graph=void 0,t=y(t),n=y(n),r=y(r),i=y(i),o=y(o),a=y(a),s=y(s),g=y(g);var w=function(){function e(n){var r=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),x(this,"log",void 0),x(this,"nodes",void 0),x(this,"edges",void 0),x(this,"edgesUnique",void 0),x(this,"activeNodeEnter",void 0),x(this,"activeInvalidateEnter",void 0),this.log=n instanceof e?n.log:n,this.nodes=new Map,this.edges=new Map,this.edgesUnique=new Map,this.activeNodeEnter=[],this.activeInvalidateEnter=[],n instanceof e){var i=n;i.nodes.forEach((function(e,t){return r.nodes.set(t,new c.Node(e))})),i.edges.forEach((function(e,t){return r.edges.set(t,new f.Edge(e))})),i.edgesUnique.forEach((function(e,t){return r.edgesUnique.set(t,new d.GhostEdge(e))})),this.activeNodeEnter=(0,t.default)(i.activeNodeEnter),this.activeInvalidateEnter=(0,t.default)(i.activeInvalidateEnter)}}var y,w,E;return y=e,(w=[{key:"hasNodeReactId",value:function(e){return this.nodes.has(e)}},{key:"hasSomeData",value:function(e){if(e instanceof c.Node)return this.nodes.has(e.key);if(S(e)){if(e instanceof f.Edge){if(this.edgesUnique.has(e.ghostKey))return!0}else if(this.edgesUnique.has(e.key))return!0;var t=e.reactId,r=e.depOnReactId,i=function(e){return(0,n.default)(e,(function(e){return e.reactId===t&&e.depOnReactId===r}))};return i((0,u.mapValues)(this.edges))||i((0,u.mapValues)(this.edgesUnique))}throw g.default.error(e),"unsupported data type"}},{key:"highlightSelected",value:function(e,t){if(e){var n=h.HoverStatus.onFn(t);if(e instanceof c.Node){var r=this.nodes.get(e.key);if(void 0!==r)return void n(r)}else if(S(e)){if(e instanceof f.Edge){var i=this.edges.get(e.key);if(void 0!==i)return void n(i)}var o=e.reactId,a=e.depOnReactId,s=function(e){e.reactId===o&&e.depOnReactId===a&&n(e)};return(0,u.mapValues)(this.edgesUnique).map(s),void(0,u.mapValues)(this.edges).map(s)}}}},{key:"reactIdFromData",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(null===e)throw"Graph.prototype.reactIdFromData(data) must submit non null data";if("string"==typeof e)return e;if(e instanceof c.Node)return e.reactId;if(S(e)){var n=t?this.nodes.get(e.depOnReactId):this.nodes.get(e.reactId);return n?n.reactId:null}throw g.default.error(e),"unsupported data type. Can only 'reactId's of 'Node's, 'GhostEdge's, or 'Edge's or from a reactId"}},{key:"parentNodeIds",value:function(e){if(null===e)throw"Graph.prototype.parentNodeIds(data) must submit non null data";return S(e)?[e.reactId]:(t=this.reactIdFromData(e,!0),(0,i.default)(t)?[]:(0,r.default)((0,u.mapValues)(this.edgesUnique),(function(e){return e.reactId===t})).map((function(e){return e.depOnReactId})));var t}},{key:"childrenNodeIds",value:function(e){if(null===e)throw"Graph.prototype.childrenNodeIds(data) must submit non null data";if(S(e))return[e.depOnReactId];var t=this.reactIdFromData(e,!1);return(0,i.default)(t)?[]:(0,r.default)((0,u.mapValues)(this.edgesUnique),(function(e){return e.depOnReactId===t})).map((function(e){return e.reactId}))}},{key:"ancestorNodeIds",value:function(e){var t=this,n=this.reactIdFromData(e,!0);if((0,i.default)(n))return[];var r=function(){for(var e=n,r=new Set,i=[n];i.length>0;)n=i.pop(),r.has(n)||(t.parentNodeIds(n).forEach((function(e){e&&i.push(e)})),r.add(n));return r.delete(e),{v:Array.from(r).sort()}}();return"object"===m(r)?r.v:void 0}},{key:"decendentNodeIds",value:function(e){var t=this.reactIdFromData(e,!1);if((0,i.default)(t))return[];for(var n=t,r=new Set,o=[t];o.length>0;)t=o.pop(),r.has(t)||(o=o.concat(this.childrenNodeIds(t)),r.add(t));return r.delete(n),Array.from(r).sort()}},{key:"familyTreeNodeIds",value:function(e){var t,n=[];return S(e)?(t=this.reactIdFromData(e,!0),(0,i.default)(t)||n.push(t),t=this.reactIdFromData(e,!1),(0,i.default)(t)||n.push(t)):(t=this.reactIdFromData(e),(0,i.default)(t)||n.push(t)),(0,o.default)(n,this.ancestorNodeIds(e),this.decendentNodeIds(e))}},{key:"familyTreeNodeIdsForDatas",value:function(e){var t=this;return(0,o.default)((0,v.flatMap)(e,(function(e){return t.familyTreeNodeIds(e)})))}},{key:"decendentNodeIdsForDatas",value:function(e){var t=this;return(0,o.default)((0,v.flatMap)(e,(function(e){return t.decendentNodeIds(e)})))}},{key:"ancestorNodeIdsForDatas",value:function(e){var t=this;return(0,o.default)((0,v.flatMap)(e,(function(e){return t.ancestorNodeIds(e)})))}},{key:"hoverStatusOnNodeIds",value:function(e,t){var n=new Set(e),r=h.HoverStatus.onFn(t),i=h.HoverStatus.offFn(t);return(0,u.mapValues)(this.nodes).map((function(e){n.has(e.reactId)?r(e):i(e)})),(0,u.mapValues)(this.edges).map((function(e){n.has(e.reactId)&&n.has(e.depOnReactId)?r(e):i(e)})),(0,u.mapValues)(this.edgesUnique).map((function(e){n.has(e.reactId)&&n.has(e.depOnReactId)?r(e):i(e)})),this}},{key:"filterGraphOnNodeIds",value:function(e){var t=this,n=new Set(e);return this.nodes.forEach((function(e,r){n.has(e.reactId)||t.nodes.delete(r)})),this.edges.forEach((function(e,r){n.has(e.reactId)&&n.has(e.depOnReactId)||t.edges.delete(r)})),this.edgesUnique.forEach((function(e,r){n.has(e.reactId)&&n.has(e.depOnReactId)||t.edgesUnique.delete(r)})),this}},{key:"addEntry",value:function(e){var t,n,r;if((0,i.default)(e.reactId)||"rNoCtx"!==e.reactId)switch((e=e).action){case l.LogStates.define:var o=e;this.nodes.set(e.reactId,new c.Node(o));break;case l.LogStates.updateNodeLabel:(t=this.nodes.get(e.reactId))&&(t.label=e.label);break;case l.LogStates.valueChange:(t=this.nodes.get(e.reactId))&&(t.value=e.value,t.valueChangedStatus.setActiveAtStep(e.step));break;case l.LogStates.invalidateStart:var s=e;if(t=this.nodes.get(s.reactId),n=(0,a.default)(this.activeInvalidateEnter)){var u=this.nodes.get(n);u&&u.invalidateStatus.resetActive()}if(this.activeInvalidateEnter.push(s.reactId),t){switch(t.type){case"observable":case"observer":t.invalidateStatus.setActiveAtStep(s.step)}t.statusAdd(s)}break;case l.LogStates.enter:var h=e;if(n=(0,a.default)(this.activeNodeEnter)){var v=this.nodes.get(n);v&&v.enterStatus.resetActive()}if(this.activeNodeEnter.push(h.reactId),t=this.nodes.get(h.reactId)){switch(t.enterStatus.setActiveAtStep(h.step),t.type){case"observer":case"observable":t.invalidateStatus.reset()}t.statusAdd(h)}break;case l.LogStates.isolateInvalidateStart:case l.LogStates.isolateEnter:var y=e;(t=this.nodes.get(y.reactId))&&t.statusAdd(y);break;case l.LogStates.invalidateEnd:case l.LogStates.exit:case l.LogStates.isolateExit:case l.LogStates.isolateInvalidateEnd:switch(t=this.nodes.get(e.reactId),e.action){case l.LogStates.exit:var m=this.nodes.get((0,a.default)(this.activeNodeEnter));if(m&&m.enterStatus.reset(),this.activeNodeEnter.pop(),n=(0,a.default)(this.activeNodeEnter)){var b=this.nodes.get(n);b&&b.enterStatus.setActiveAtStep(e.step)}break;case l.LogStates.invalidateEnd:var x=this.nodes.get((0,a.default)(this.activeInvalidateEnter));if(x&&x.invalidateStatus.resetActive(),this.activeInvalidateEnter.pop(),n=(0,a.default)(this.activeInvalidateEnter)){var w=this.nodes.get(n);w&&w.invalidateStatus.setActiveAtStep(e.step)}t&&(t.invalidateStatus.toFinished(),t.valueChangedStatus.isOn&&t.valueChangedStatus.reset());break;case l.LogStates.isolateInvalidateEnd:t&&t.valueChangedStatus.isOn&&t.valueChangedStatus.reset()}if(t){var S,E=t.statusLast();switch(e.action){case l.LogStates.exit:S=l.LogStates.enter;break;case l.LogStates.isolateExit:S=l.LogStates.isolateEnter;break;case l.LogStates.invalidateEnd:S=l.LogStates.invalidateStart;break;case l.LogStates.isolateInvalidateEnd:S=l.LogStates.isolateInvalidateStart}if(S){var k=e;(0,p.expectPrevStatus)(k,E,S),t.statusRemove(k)}}break;case l.LogStates.dependsOn:var _=e;if(!_.reactId||"rNoCtxReactId"===_.reactId)break;var T=(r=new f.Edge(_)).key;this.edgesUnique.has(r.ghostKey)||this.edgesUnique.set(r.ghostKey,new d.GhostEdge(_)),this.edges.has(T)?r=this.edges.get(T):this.edges.set(T,r),r&&((t=this.nodes.get(r.reactId))&&t.statusLast().action===l.LogStates.isolateEnter?r.status="isolate":r.status="normal");break;case l.LogStates.dependsOnRemove:var C=e;r=new f.Edge(C),this.edges.delete(r.key);break;case l.LogStates.createContext:case l.LogStates.idle:case l.LogStates.asyncStart:case l.LogStates.asyncStop:case l.LogStates.userMark:break;case l.LogStates.freeze:(t=this.nodes.get(e.reactId))&&(t.isFrozen=!0);break;case l.LogStates.thaw:(t=this.nodes.get(e.reactId))&&(t.isFrozen=!1);break;default:g.default.error("unknown data.action: ",e.action,e)}}},{key:"cytoGraph",get:function(){var e=(0,u.mapValues)(this.nodes).map((function(e){return e.cytoData})),t=new Map(this.edgesUnique.entries()),n=(0,u.mapValues)(this.edges).map((function(e){return t.has(e.ghostKey)&&t.delete(e.ghostKey),e.cytoData})),r=(0,u.mapValues)(t).map((function(e){return e.cytoData})),i=(0,s.default)();return i.add(e),i.add(n),i.add(r),i}}])&&b(y.prototype,w),E&&b(y,E),e}();function S(e){return e instanceof f.Edge||e instanceof d.GhostEdge}e.Graph=w})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r=n(99),i=n(141),o=n(73),a=n(463),s=n(469),u=n(206),l=n(207),c=n(472),f=n(473),d=n(211),h=n(474),p=n(68),v=n(478),g=n(479),y=n(216),m=n(10),b=n(66),x=n(483),w=n(16),S=n(485),E=n(38),k={};k["[object Arguments]"]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k["[object Object]"]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k["[object Function]"]=k["[object WeakMap]"]=!1,e.exports=function e(t,n,_,T,C,P){var D,M=1&n,O=2&n,I=4&n;if(_&&(D=C?_(t,T,C,P):_(t)),void 0!==D)return D;if(!w(t))return t;var N=m(t);if(N){if(D=v(t),!M)return l(t,D)}else{var A=p(t),L="[object Function]"==A||"[object GeneratorFunction]"==A;if(b(t))return u(t,M);if("[object Object]"==A||"[object Arguments]"==A||L&&!C){if(D=O||L?{}:y(t),!M)return O?f(t,s(D,t)):c(t,a(D,t))}else{if(!k[A])return C?t:{};D=g(t,A,M)}}P||(P=new r);var j=P.get(t);if(j)return j;P.set(t,D),S(t)?t.forEach((function(r){D.add(e(r,n,_,r,t,P))})):x(t)&&t.forEach((function(r,i){D.set(i,e(r,n,_,i,t,P))}));var B=I?O?h:d:O?keysIn:E,F=N?void 0:B(t);return i(F||t,(function(r,i){F&&(r=t[i=r]),o(D,i,e(r,n,_,i,t,P))})),D}},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(55),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},function(e,t,n){var r=n(464),i=n(74),o=n(10),a=n(66),s=n(105),u=n(75),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),c=!n&&i(e),f=!n&&!c&&a(e),d=!n&&!c&&!f&&u(e),h=n||c||f||d,p=h?r(e.length,String):[],v=p.length;for(var g in e)!t&&!l.call(e,g)||h&&("length"==g||f&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,v))||p.push(g);return p}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){(function(e){var r=n(23),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(142)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(147),i=n(107),o=n(146),a=n(209),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:a;e.exports=s},function(e,t,n){var r=n(212),i=n(146),o=n(38);e.exports=function(e){return r(e,o,i)}},function(e,t,n){var r=n(147),i=n(10);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},function(e,t,n){var r=n(55)(n(23),"Set");e.exports=r},function(e,t,n){var r=n(23).Uint8Array;e.exports=r},function(e,t,n){var r=n(148);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(217),i=n(107),o=n(76);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},function(e,t,n){var r=n(16),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},function(e,t,n){var r=n(219),i=n(33),o=n(505),a=n(10),s=n(79);e.exports=function(e,t,n){var u=a(e)?r:o;return n&&s(e,t,n)&&(t=void 0),u(e,i(t,3))}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t,n){var r=n(489),i=n(31);e.exports=function e(t,n,o,a,s){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,o,a,e,s))}},function(e,t,n){var r=n(222),i=n(219),o=n(223);e.exports=function(e,t,n,a,s,u){var l=1&n,c=e.length,f=t.length;if(c!=f&&!(l&&f>c))return!1;var d=u.get(e);if(d&&u.get(t))return d==t;var h=-1,p=!0,v=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++h<c;){var g=e[h],y=t[h];if(a)var m=l?a(y,g,h,t,e,u):a(g,y,h,e,t,u);if(void 0!==m){if(m)continue;p=!1;break}if(v){if(!i(t,(function(e,t){if(!o(v,t)&&(g===e||s(g,e,n,a,u)))return v.push(t)}))){p=!1;break}}else if(g!==y&&!s(g,y,n,a,u)){p=!1;break}}return u.delete(e),u.delete(t),p}},function(e,t,n){var r=n(140),i=n(490),o=n(491);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(16);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},function(e,t,n){var r=n(501);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(502),i=n(228);e.exports=function(e,t){return null!=e&&i(e,t,r)}},function(e,t,n){var r=n(108),i=n(74),o=n(10),a=n(105),s=n(143),u=n(77);e.exports=function(e,t,n){for(var l=-1,c=(t=r(t,e)).length,f=!1;++l<c;){var d=u(t[l]);if(!(f=null!=e&&n(e,d)))break;e=e[d]}return f||++l!=c?f:!!(c=null==e?0:e.length)&&s(c)&&a(d,c)&&(o(e)||i(e))}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(510),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),u=Array(s);++a<s;)u[a]=o[t+a];a=-1;for(var l=Array(t+1);++a<t;)l[a]=o[a];return l[t]=n(u),r(e,this,l)}}},function(e,t,n){var r=n(511),i=n(512)(r);e.exports=i},function(e,t){e.exports=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},function(e,t,n){var r=n(32),i=n(31);e.exports=function(e){return i(e)&&r(e)}},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mapValues=function(e){return Array.from(e.values())},e.mapKeys=function(e){return Array.from(e.keys())}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(236),n(157),n(159)],void 0===(o="function"==typeof(r=function(e,t,n,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(e,"__esModule",{value:!0}),e.expectPrevStatus=e.StatusArr=void 0,t=i(t),n=i(n),r=i(r);var u=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];o(this,e),s(this,"statusArr",void 0),n instanceof e?this.statusArr=(0,t.default)(n.statusArr):Array.isArray(n)&&(this.statusArr=n)}var r,i,u;return r=e,(i=[{key:"clone",value:function(){return new e(this)}},{key:"add",value:function(e){return this.statusArr.push(e)}},{key:"remove",value:function(){return this.statusArr.pop()}},{key:"last",value:function(){return(0,n.default)(this.statusArr)}},{key:"containsStatus",value:function(e){for(var t=this.statusArr,n=t.length,r=0;r<n;r++)if(t[r].action===e)return!0;return!1}}])&&a(r.prototype,i),u&&a(r,u),e}();e.StatusArr=u,e.expectPrevStatus=function(e,t,n){function i(n){throw r.default.error("curStatus: ",e),r.default.error("prevStatus: ",t),n}t.action!==n&&i('prior node status does not have "'.concat(n,'" status')),t.ctxId!==e.ctxId&&i('prior node "ctxId" status does not have the same "ctxId" status')}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r=n(201);e.exports=function(e){return r(e,5)}},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(522)],void 0===(o="function"==typeof(r=function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shinytest=e.inTestMode=void 0;var n="1"===(0,t.parseQuery)().test;e.inTestMode=n,e.shinytest="(shinytest)"})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r=n(78),i=n(32);e.exports=function(e,t){var n=-1,o=i(e)?Array(e.length):[];return r(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}},function(e,t,n){var r=n(73),i=n(65),o=n(240),a=n(32),s=n(76),u=n(38),l=Object.prototype.hasOwnProperty,c=o((function(e,t){if(s(t)||a(t))i(t,u(t),e);else for(var n in t)l.call(t,n)&&r(e,n,t[n])}));e.exports=c},function(e,t,n){var r=n(80),i=n(79);e.exports=function(e){return r((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var u=n[r];u&&e(t,u,r,a)}return t}))}},function(e,t,n){var r=n(155),i=n(524),o=n(80),a=n(79),s=o((function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])}));e.exports=s},function(e,t,n){var r=n(528),i=n(43),o=n(42);e.exports=function(e,t,n){var a=0,s=null==e?a:e.length;if("number"==typeof t&&t==t&&s<=2147483647){for(;a<s;){var u=a+s>>>1,l=e[u];null!==l&&!o(l)&&(n?l<=t:l<t)?a=u+1:s=u}return s}return r(e,t,i,n)}},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(98),n(529),n(260)],void 0===(o="function"==typeof(r=function(e,t,n,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,t=i(t),n=i(n),t.default.use(n.default);var o={fit:!1,name:"dagre",rankDir:"LR",rankSep:r.labelWidth+50,nodeSep:10,edgeSep:50,ranker:"longest-path",padding:30,spacingFactor:1,nodeDimensionsIncludeLabels:!1,animate:!0,animateFilter:function(e,t){return!0},animationDuration:1e3,animationEasing:"ease-in-out-quad"};e.default=o})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){e.exports=n(245)},function(e,t,n){var r=n(141),i=n(78),o=n(246),a=n(10);e.exports=function(e,t){return(a(e)?r:i)(e,o(t))}},function(e,t,n){var r=n(43);e.exports=function(e){return"function"==typeof e?e:r}},function(e,t){e.exports=function(e){return void 0===e}},function(e,t,n){var r=n(535),i=n(78),o=n(33),a=n(536),s=n(10);e.exports=function(e,t,n){var u=s(e)?r:a,l=arguments.length<3;return u(e,o(t,4),n,l,i)}},function(e,t,n){var r=n(544),i=n(38);e.exports=function(e){return null==e?[]:r(e,i(e))}},function(e,t,n){var r=n(21),i=n(251);e.exports=function(e,t,n,r){return function(e,t,n,r){var o,a,s={},u=new i,l=function(e){var t=e.v!==o?e.v:e.w,r=s[t],i=n(e),l=a.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+i);l<r.distance&&(r.distance=l,r.predecessor=o,u.decrease(t,l))};e.nodes().forEach((function(e){var n=e===t?0:Number.POSITIVE_INFINITY;s[e]={distance:n},u.add(e,n)}));for(;u.size()>0&&(o=u.removeMin(),(a=s[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(l);return s}(e,String(t),n||o,r||function(t){return e.outEdges(t)})};var o=r.constant(1)},function(e,t,n){var r=n(21);function i(){this._arr=[],this._keyIndices={}}e.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},i.prototype.has=function(e){return r.has(this._keyIndices,e)},i.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var i=this._arr,o=i.length;return n[e]=o,i.push({key:e,priority:t}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},i.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},i.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,i=e;n<t.length&&(i=t[n].priority<t[i].priority?n:i,r<t.length&&(i=t[r].priority<t[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))},i.prototype._decrease=function(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t},i.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,i=n[e],o=n[t];n[e]=o,n[t]=i,r[o.key]=e,r[i.key]=t}},function(e,t,n){var r=n(21);e.exports=function(e){var t=0,n=[],i={},o=[];return e.nodes().forEach((function(a){r.has(i,a)||function a(s){var u=i[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach((function(e){r.has(i,e)?i[e].onStack&&(u.lowlink=Math.min(u.lowlink,i[e].index)):(a(e),u.lowlink=Math.min(u.lowlink,i[e].lowlink))})),u.lowlink===u.index){var l,c=[];do{l=n.pop(),i[l].onStack=!1,c.push(l)}while(s!==l);o.push(c)}}(a)})),o}},function(e,t,n){var r=n(21);function i(e){var t={},n={},i=[];if(r.each(e.sinks(),(function a(s){if(r.has(n,s))throw new o;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),a),delete n[s],i.push(s))})),r.size(t)!==e.nodeCount())throw new o;return i}function o(){}e.exports=i,i.CycleException=o,o.prototype=new Error},function(e,t,n){var r=n(21);e.exports=function(e,t,n){r.isArray(t)||(t=[t]);var i=(e.isDirected()?e.successors:e.neighbors).bind(e),o=[],a={};return r.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);!function e(t,n,i,o,a,s){r.has(o,n)||(o[n]=!0,i||s.push(n),r.each(a(n),(function(n){e(t,n,i,o,a,s)})),i&&s.push(n))}(e,t,"post"===n,a,i,o)})),o}},function(e,t,n){var r=n(199);e.exports=function(e){return e?(e=r(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},function(e,t,n){var r=n(104),i=n(54);e.exports=function(e,t,n){(void 0!==n&&!i(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},function(e,t){e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},function(e,t){e.exports=function(e,t){return e<t}},function(e,t,n){"use strict";var r=n(6),i=n(24).Graph,o=n(115).slack;function a(e,t){return r.forEach(e.nodes(),(function n(i){r.forEach(t.nodeEdges(i),(function(r){var a=r.v,s=i===a?r.w:a;e.hasNode(s)||o(t,r)||(e.setNode(s,{}),e.setEdge(i,s,{}),n(s))}))})),e.nodeCount()}function s(e,t){return r.minBy(t.edges(),(function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return o(t,n)}))}function u(e,t,n){r.forEach(e.nodes(),(function(e){t.node(e).rank+=n}))}e.exports=function(e){var t,n,r=new i({directed:!1}),l=e.nodes()[0],c=e.nodeCount();r.setNode(l,{});for(;a(r,e)<c;)t=s(r,e),n=r.hasNode(t.v)?o(e,t):-o(e,t),u(r,e,n);return r}},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(166)],void 0===(o="function"==typeof(r=function(e,t){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.labelWidth=e.style=e.graphStyles=void 0,t=(n=t)&&n.__esModule?n:{default:n},e.style=function(e,t){return{selector:e,style:t}};var r={start:{shape:"-1 1 0.33333333333 1 1 0 0.33333333333 -1 -1 -1",width:37.5,height:30},middle:{shape:"-1 1 0.5 1 1 0 0.5 -1 -1 -1 -0.5 0",width:50,height:30},end:{shape:"-1 1 1 1 1 -1 -1 -1 -0.33333333333 0",width:37.5,height:30}};e.labelWidth=350;var i={node:{default:{"z-index":0,label:"data(cytoLabelShort_)",color:t.default.nodes.label_text_color,"text-opacity":t.default.nodes.label_text_opacity,"text-valign":"bottom","text-halign":"right","border-color":t.default.regular.black,"border-style":"solid","border-width":1,"background-color":t.default.nodes.ready,"text-wrap":"ellipsis","text-max-width":"".concat(350,"px"),"text-background-color":t.default.nodes.label_background_color,"text-background-opacity":t.default.nodes.label_background_opacity,"font-family":'"Fira Mono", monospace'},start:{shape:"polygon","shape-polygon-points":r.start.shape,width:r.start.width,height:r.start.height},startBig:{"border-width":2,width:1.0625*r.start.width,height:1.0625*r.start.height},middle:{shape:"polygon","shape-polygon-points":r.middle.shape,width:r.middle.width,height:r.middle.height},middleBig:{"border-width":2,width:1.0625*r.middle.width,height:1.0625*r.middle.height},end:{shape:"polygon","shape-polygon-points":r.end.shape,width:r.end.width,height:r.end.height,"text-max-width":"".concat(525,"px")},endBig:{"border-width":2,width:1.0625*r.end.width,height:1.0625*r.end.height},enter:{"background-color":t.default.nodes.calculating},enterActive:{"background-color":t.default.nodes.calculating,"border-width":2.5},invalidate:{"background-color":t.default.nodes.invalidating},invalidateActive:{"background-color":t.default.nodes.invalidating,"border-width":2.5},invalidateDone:{"background-color":t.default.nodes.invalidated},isolate:{"border-style":"dashed"},isolateInvalidate:{"border-style":"dashed","border-color":"darkgrey","border-width":3},valueChanged:{"background-color":t.default.nodes.invalidating},frozen:{"background-color":t.default.frozen.default}},edge:{default:{"curve-style":"bezier",width:4,"target-arrow-shape":"triangle","mid-target-arrow-shape":"triangle","line-color":t.default.edges.running,"mid-target-arrow-color":t.default.edges.running,"target-arrow-color":t.default.edges.running},isolate:{width:4,"line-color":t.default.edges.isolate,"mid-target-arrow-color":t.default.edges.isolate,"target-arrow-color":t.default.edges.isolate,"line-style":"dashed"}},ghostEdge:{default:{width:1,"mid-target-arrow-shape":"triangle","mid-target-arrow-color":t.default.ghostEdges.default,"arrow-scale":.25,"curve-style":"haystack","line-color":t.default.ghostEdges.default,"line-style":"dotted"},hoverNotFocusedButSticky:{"line-color":t.default.regular.grey2,"mid-target-arrow-color":t.default.regular.grey2},hoverNotFocused:{"line-color":t.default.regular.grey2,"mid-target-arrow-color":t.default.regular.grey2}},focus:{hoverNotFocused:{"background-blacken":-.75,"border-color":t.default.regular.grey2,"line-color":t.default.regular.grey2,"mid-target-arrow-color":t.default.regular.grey2,"target-arrow-color":t.default.regular.grey2},hoverNotFocusedButSticky:{"background-blacken":-.35,"border-color":t.default.regular.grey2,"line-color":t.default.regular.grey2,"mid-target-arrow-color":t.default.regular.grey2,"target-arrow-color":t.default.regular.grey2},stickyNotFocused:{"background-blacken":-.75,"border-color":t.default.regular.grey2,"line-color":t.default.regular.grey2,"mid-target-arrow-color":t.default.regular.grey2,"target-arrow-color":t.default.regular.grey2}},selected:{node:{"border-width":4,"text-max-width":"800px","text-wrap":"wrap","background-opacity":1,"text-background-opacity":1,"text-border-opacity":1,"text-border-width":1,"text-border-style":"solid","text-border-color":t.default.regular.black,"text-background-padding":16,label:"data(cytoLabel_)","z-index":1e3},edge:{width:8},ghostEdge:{width:8,"arrow-scale":2/3}},filtered:{node:{"border-width":3,"font-size":"30"},start:{width:2*r.start.width,height:2*r.start.height},middle:{width:2*r.middle.width,height:2*r.middle.height},end:{width:2*r.end.width,height:2*r.end.height}},hidden:{node:{"background-color":"white","background-opacity":1,"border-opacity":.5,"text-opacity":.5,label:"data(label)"},edge:{opacity:.5}}};e.graphStyles=i;var o=i;e.default=o})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(12),n(262),n(263)],void 0===(o="function"==typeof(r=function(e,t,n,r){"use strict";function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function o(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var s=r?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}Object.defineProperty(e,"__esModule",{value:!0}),e.atTick=void 0,n=o(n),r=o(r),e.atTick=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.rlog.curTick,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.rlog.curTick=e,t.rlog.getGraph.displayAtStep(e,t.rlog.cyto,i),r.update(),n.update(),!0}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(114),n(82),n(64),n(12),n(607),n(81),n(237)],void 0===(o="function"==typeof(r=function(e,t,n,r,i,o,a,s){"use strict";function u(e){return e&&e.__esModule?e:{default:e}}var l;Object.defineProperty(e,"__esModule",{value:!0}),e.setContainers=e.update=void 0,t=u(t),n=u(n),r=u(r);var c={logLength:0,firstTime:0,lastTimeCharLength:0,maxSessionCharLength:0};e.update=function(){if(0!==c.logLength){var e=i.rlog.log[i.rlog.curTick];if(s.inTestMode)l.time.text(s.shinytest),l.session.text(s.shinytest);else{var a=e.time-c.firstTime;a=(0,o.roundDecimals)(a,4).toFixed(4).padStart(c.lastTimeCharLength," "),l.time.text("".concat(a,"s")),(0,r.default)(e.session)?l.session.text("(Global)".padEnd(c.maxSessionCharLength," ")):l.session.text("".concat(e.session).padEnd(c.maxSessionCharLength," "))}var u,f=function(e){return"".concat(e).padStart("".concat(c.logLength).length," ")},d=(0,t.default)(i.rlog.getGraph.stepsVisible,e.step);if(-1===(0,n.default)(i.rlog.getGraph.stepsVisible,e.step))if(0===d)u="".concat(f(0),"_").concat(e.step);else{var h=d-1,v=i.rlog.getGraph.stepsVisible[h],g=e.step-v;u="".concat(f(h+1),"_").concat(g)}else u=f(d+1);l.step.text("".concat(u)),l.status.html(p(e)),l.container.text(JSON.stringify(i.rlog.log[i.rlog.curTick],null,"  "))}},e.setContainers=function(e,t,n,o,a,s,u){for(var f,d,h=s.length,p=0,v=0;v<h;v++)f=s[v],(0,r.default)(f.session)||(d=f.session.length)>p&&(p=d);c={logLength:u,firstTime:s[i.rlog.getGraph.stepsVisible[0]].time,maxSessionCharLength:p,lastTimeCharLength:(s[h-1].time-s[i.rlog.getGraph.stepsVisible[0]].time).toFixed(4).length},l={time:e,session:t,step:n,status:o,container:a}};var f=function(e){var t=i.rlog.graph.nodes.get(e);return t?t.label:e},d=function(e){return f(e.reactId)},h=function(e){return'<span class="monospaced">'.concat(e,"</span>")},p=function(e){switch(e.action){case a.LogStates.createContext:return"Create Context: ".concat(h(function(e){return e.ctxId}(e)));case a.LogStates.asyncStart:case a.LogStates.asyncStop:return"Start asynchronous calculations";case a.LogStates.define:return"Defined ".concat(h(d(e)));case a.LogStates.dependsOn:var t=e;return"".concat(h(d(t))," depends on ").concat(h(f(t.depOnReactId)));case a.LogStates.dependsOnRemove:var n=e;return"".concat(h(d(n))," removes dependency on ").concat(h(f(n.depOnReactId)));case a.LogStates.enter:return"".concat(h(d(e))," started calculating");case a.LogStates.exit:return"".concat(h(d(e))," stopped calculating");case a.LogStates.freeze:return"".concat(h(d(e))," froze");case a.LogStates.invalidateLater:var r=e;return"".concat(h(d(r))," will invalidate in ").concat(h(r.millis),"ms");case a.LogStates.invalidateEnd:return"".concat(h(d(e))," has invalidated");case a.LogStates.invalidateStart:return"".concat(h(d(e))," is invalidating");case a.LogStates.isolateEnter:return"".concat(h(d(e))," is isolating future dependencies");case a.LogStates.isolateExit:return"".concat(h(d(e))," stopped isolating future dependencies");case a.LogStates.isolateInvalidateEnd:return"".concat(h(d(e))," invalidated during an isolate call");case a.LogStates.isolateInvalidateStart:return"".concat(h(d(e))," is invalidating during an isolate call");case a.LogStates.userMark:return"User marked step";case a.LogStates.idle:return"Shiny App idle";case a.LogStates.thaw:return"".concat(h(d(e))," has thawed");case a.LogStates.updateNodeLabel:return"Set label to ".concat(h(d(e)));case a.LogStates.valueChange:var i=e;return"".concat(h(d(i))," has a new value: ").concat(h(function(e){return e.value}(i)));default:throw"state: ".concat(h(e.action)," not implemented for log status")}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(164),n(52),n(114),n(82),n(12),n(25),n(166)],void 0===(o="function"==typeof(r=function(e,t,n,r,i,o,a,s){"use strict";function u(e){return e&&e.__esModule?e:{default:e}}var l;Object.defineProperty(e,"__esModule",{value:!0}),e.timelinePadding=e.setContainers=e.addTimelineTicks=e.update=void 0,t=u(t),n=u(n),r=u(r),i=u(i),e.update=function(){var e=o.rlog.getGraph.stepsVisible,t=(0,i.default)(e,o.rlog.curTick);-1===t&&(t=(0,r.default)(e,o.rlog.curTick)-1),l.width("".concat(t/(e.length-1)*100,"%"))},e.setContainers=function(e,t){t.css("background-color",s.colors.progressBar.progress),t.css("top","".concat(d,"px")),t.css("bottom","".concat(d,"px")),l=t,e.css("height","".concat(f,"px")),e.css("min-height","".concat(f,"px")),e.css("background-color",s.colors.progressBar.background),e.on("mousedown mousemove",c)};var c=function(e){if(((0,t.default)(e.originalEvent,"buttons")||1===e.originalEvent.buttons)&&1===e.which){var r=(0,n.default)(e.currentTarget)[0],i=e.pageX,s=r.offsetWidth,u=o.rlog.getGraph.stepsVisible,l=u[Math.min(Math.max(Math.round(i/s*u.length),0),u.length-1)];l!==o.rlog.curTick&&(0,a.updateGraph)(l)}};e.addTimelineTicks=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=o.rlog.getGraph.stepsVisible,s=a.length-1,u=0===i?"top: 0; height: ".concat(f,"px;"):"top: ".concat(i,"px; height: ").concat(f-2*i,"px");n.map((function(n){var i=100*(0,r.default)(a,n)/s,o=100/s*.75;e.append('<div class="timeline-tick" style="background-color: '.concat(t,"; left: ").concat(i,"%; width: ").concat(o,"%; margin-left: -").concat(o,"%; ").concat(u,'"></div>'))}))};var f=20,d=3;e.timelinePadding=d})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(12),n(25),n(167)],void 0===(o="function"==typeof(r=function(e,t,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.firstIdle=e.lastIdle=e.prevIdle=e.nextIdle=void 0,e.nextIdle=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.nextStepInArr)(t.rlog.getGraph.stepsIdle,e)},e.prevIdle=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.prevStepInArr)(t.rlog.getGraph.stepsIdle,e)},e.lastIdle=function(){var e=t.rlog.getGraph.stepsIdle.length>0?t.rlog.getGraph.stepsIdle[t.rlog.getGraph.stepsIdle.length-1]:t.rlog.log.length-1;return(0,n.updateGraph)(e)},e.firstIdle=function(){var e=t.rlog.getGraph.stepsIdle.length>0?t.rlog.getGraph.stepsIdle[0]:0;return(0,n.updateGraph)(e)}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(12),n(25)],void 0===(o="function"==typeof(r=function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.lastStep=e.firstStep=e.prevStep=e.nextStep=void 0,e.nextStep=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.rlog.getGraph.nextStep(t.rlog.curTick);return-1!==r&&(0,n.updateGraph)(r,e)},e.prevStep=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.rlog.getGraph.prevStep(t.rlog.curTick);return-1!==r&&(0,n.updateGraph)(r,e)},e.firstStep=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,n.updateGraph)(t.rlog.getGraph.stepsVisible[0],e)},e.lastStep=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,n.updateGraph)(t.rlog.getGraph.stepsVisible[t.rlog.getGraph.stepsVisible.length-1],e)}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(52),n(239),n(12),n(25)],void 0===(o="function"==typeof(r=function(e,t,n,r,i){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0}),e.resetHoverStickyFilterData=e.searchRegexReset=e.searchRegex=e.filterDatasReset=e.filterDatas=e.stickyDatasReset=e.stickyDatas=e.hoverDataReset=e.hoverData=void 0,t=o(t),n=o(n),e.hoverData=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.rlog.getGraph.updateHoverData(e),(0,i.updateGraph)(r.rlog.curTick,t)},e.hoverDataReset=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.rlog.getGraph.updateHoverDataReset(),(0,i.updateGraph)(r.rlog.curTick,e)},e.stickyDatas=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.rlog.getGraph.updateStickyDatas(e),(0,i.updateGraph)(r.rlog.curTick,t)},e.stickyDatasReset=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.rlog.getGraph.updateStickyDatasReset(),(0,i.updateGraph)(r.rlog.curTick,e)},e.filterDatas=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.rlog.getGraph.updateFilterDatas(e),(0,i.updateGraph)(r.rlog.curTick,(0,n.default)({fit:!0},t))},e.filterDatasReset=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.rlog.getGraph.updateFilterDatasReset(),(0,i.updateGraph)(r.rlog.curTick,(0,n.default)({fit:!0},e))},e.searchRegex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.rlog.getGraph.updateSearchRegex(e),(0,i.updateGraph)(r.rlog.curTick,(0,n.default)({fit:!0},t))},e.searchRegexReset=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,t.default)("#search").val(""),r.rlog.getGraph.updateSearchRegexReset(),(0,i.updateGraph)(r.rlog.curTick,(0,n.default)({fit:!0},e))},e.resetHoverStickyFilterData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.rlog.getGraph.resetHoverStickyFilterSearch(),(0,i.updateGraph)(r.rlog.curTick,(0,n.default)({fit:!0},e))}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(82),n(12),n(25),n(113)],void 0===(o="function"==typeof(r=function(e,t,n,r,i){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.lastUserMark=e.firstUserMark=e.prevUserMark=e.nextUserMark=void 0,t=(o=t)&&o.__esModule?o:{default:o},e.nextUserMark=function(){var e,o,a,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(e=-1!==(0,t.default)(n.rlog.getGraph.stepsUserMark,n.rlog.curTick)?(0,i.hasLength)(n.rlog.getGraph.filterDatas)?n.rlog.getGraph.nextStep(n.rlog.getGraph.prevStep(n.rlog.curTick)):n.rlog.curTick:n.rlog.getGraph.nextStep(n.rlog.curTick),a=0;a<n.rlog.getGraph.stepsUserMark.length;a++)if(e<(o=n.rlog.getGraph.stepsUserMark[a]))return(0,r.updateGraph)(o,s),!0;return!1},e.prevUserMark=function(){var e,o,a,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(e=-1!==(0,t.default)(n.rlog.getGraph.stepsUserMark,n.rlog.curTick)?(0,i.hasLength)(n.rlog.getGraph.filterDatas)?n.rlog.getGraph.prevStep(n.rlog.getGraph.nextStep(n.rlog.curTick)):n.rlog.curTick:n.rlog.getGraph.prevStep(n.rlog.curTick),a=n.rlog.getGraph.stepsUserMark.length-1;a>=0;a--)if(e>(o=n.rlog.getGraph.stepsUserMark[a]))return(0,r.updateGraph)(o,s);return!1},e.lastUserMark=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0!==n.rlog.getGraph.stepsUserMark.length&&(0,r.updateGraph)(n.rlog.getGraph.stepsUserMark[n.rlog.getGraph.stepsUserMark.length-1],e)},e.firstUserMark=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0!==n.rlog.getGraph.stepsUserMark.length&&(0,r.updateGraph)(n.rlog.getGraph.stepsUserMark[0],e)}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[n(269),n(271),n(273),n(274),n(275),n(276),n(277),n(279),n(280),n(281),n(282),n(283),n(121),n(285),n(286),n(287),n(288),n(289),n(290),n(291),n(292),n(293),n(294),n(296),n(297),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(332),n(334),n(335),n(336),n(337),n(338),n(339),n(340),n(341),n(342),n(343),n(344),n(345),n(346),n(347),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(358),n(361),n(362),n(363),n(364),n(365),n(366),n(367),n(368),n(369),n(370),n(371),n(372),n(373),n(374),n(375),n(189),n(376),n(378),n(379),n(380),n(381),n(382),n(383),n(385),n(386),n(387),n(388),n(389),n(390),n(391),n(392),n(393),n(394),n(395),n(396),n(397),n(398),n(399),n(400),n(401),n(402),n(403),n(404),n(405),n(406),n(407),n(408),n(409),n(410),n(411),n(412),n(413),n(414),n(415),n(416),n(417),n(418),n(419),n(420),n(421),n(422),n(423),n(424),n(425),n(426),n(427),n(428),n(52),n(196),n(12),n(81),n(113),n(166),n(612),n(615),n(25),n(262),n(263),n(618)],void 0===(o="function"==typeof(r=function(e,t,n,r,i,o,s,u,l,c,f,d,h,p,v,g,y,m,b,x,w,S,E,k,_,T,C,P,D,M,O,I,N,A,L,j,B,F,R,z,V,q,G,W,H,U,Y,X,K,$,Z,Q,J,ee,te,ne,re,ie,oe,ae,se,ue,le,ce,fe,de,he,pe,ve,ge,ye,me,be,xe,we,Se,Ee,ke,_e,Te,Ce,Pe,De,Me,Oe,Ie,Ne,Ae,Le,je,Be,Fe,Re,ze,Ve,qe,Ge,We,He,Ue,Ye,Xe,Ke,$e,Ze,Qe,Je,et,tt,nt,rt,it,ot,at,st,ut,lt,ct,ft,dt,ht,pt,vt,gt,yt,mt,bt,xt,wt,St,Et,kt,_t,Tt,Ct,Pt,Dt,Mt,Ot,It,Nt,At,Lt,jt,Bt,Ft,Rt,zt,Vt,qt,Gt,Wt,Ht,Ut,Yt,Xt,Kt,$t,Zt,Qt,Jt){"use strict";function en(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return en=function(){return e},e}function tn(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=en();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function nn(e){return e&&e.__esModule?e:{default:e}}qt=nn(qt),Gt=nn(Gt),Yt=nn(Yt),Xt=tn(Xt),Kt=tn(Kt),$t=tn($t),Zt=tn(Zt),Qt=tn(Qt),(0,qt.default)((function(){window._reactlog=Wt.rlog,Wt.rlog.log=window.log,Wt.rlog.cyto=Xt.withContainer((0,qt.default)("#cyto")),Wt.rlog.getGraph=new Ut.GraphAtStep(Wt.rlog.log),Wt.rlog.graph=Wt.rlog.getGraph.finalCompleteGraph,(0,qt.default)("#prevUserMarkButton").click($t.buttonPrevMark),(0,qt.default)("#nextUserMarkButton").click($t.buttonNextMark),(0,qt.default)("#prevOutputCalcButton").click($t.buttonPrevOutputCalc),(0,qt.default)("#nextOutputCalcButton").click($t.buttonNextOutputCalc),(0,qt.default)("#prevIdleButton").click($t.buttonPrevIdle),(0,qt.default)("#nextIdleButton").click($t.buttonNextIdle),(0,qt.default)("#prevStepButton").click($t.buttonPrevStep),(0,qt.default)("#nextStepButton").click($t.buttonNextStep),(0,qt.default)("#legendInvalidating").css("background-color",Yt.default.nodes.invalidating),(0,qt.default)("#legendInvalidated").css("background-color",Yt.default.nodes.invalidated),(0,qt.default)("#legendCalculating").css("background-color",Yt.default.nodes.calculating),(0,qt.default)("#legendReady").css("background-color",Yt.default.nodes.ready);for(var e=0;e<Wt.rlog.log.length;e++)if(Wt.rlog.log[e].action===Ht.LogStates.freeze){(0,qt.default)("#legendRowInvalidated").addClass("legendRowTopMiddle"),(0,qt.default)("#legendFrozen").css("background-color",Yt.default.frozen.default),(0,qt.default)("#legendRowFrozen").css("display","");break}Qt.setContainers((0,qt.default)("#timeline"),(0,qt.default)("#timeline-fill"));var t=(0,qt.default)("#timeline-bg");Qt.addTimelineTicks(t,Yt.default.nodes.ready,Wt.rlog.getGraph.stepsOutputCalc,2*Qt.timelinePadding),Qt.addTimelineTicks(t,Yt.default.progressBar.idle,Wt.rlog.getGraph.stepsIdle,0),Wt.rlog.getGraph.stepsUserMark.length>0&&Qt.addTimelineTicks(t,Yt.default.progressBar.userMark,Wt.rlog.getGraph.stepsUserMark,0),Zt.setContainers((0,qt.default)("#eventTimeNum"),(0,qt.default)("#eventSessionNum"),(0,qt.default)("#eventStepNum"),(0,qt.default)("#eventStatus"),(0,qt.default)("#logEntry"),Wt.rlog.log,Wt.rlog.getGraph.stepsVisible.length),window.addEventListener("resize",(0,Gt.default)((function(e){$t.resize()}),250,{maxWait:1e3})),$t.searchStringContainer((0,qt.default)("#search"));var n=document.body;n&&Kt.addKeydown((0,qt.default)(n));var r={fit:!0,stop:function(e){var t=Wt.rlog.cyto.zoom(),n=Math.log2(t);Wt.rlog.cyto.minZoom(Math.pow(2,n-1))}};$t.lastUserMark(r)||$t.nextIdle(r)}))})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r=n(0);r(r.P,"Array",{copyWithin:n(169)}),n(46)("copyWithin")},function(e,t,n){e.exports=n(83)("native-function-to-string",Function.toString)},function(e,t,n){"use strict";var r=n(0),i=n(28)(4);r(r.P+r.F*!n(29)([].every,!0),"Array",{every:function(e){return i(this,e,arguments[1])}})},function(e,t,n){var r=n(2),i=n(85),o=n(5)("species");e.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&null===(t=t[o])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){var r=n(0);r(r.P,"Array",{fill:n(117)}),n(46)("fill")},function(e,t,n){"use strict";var r=n(0),i=n(28)(2);r(r.P+r.F*!n(29)([].filter,!0),"Array",{filter:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),i=n(28)(5),o=!0;"find"in[]&&Array(1).find((function(){o=!1})),r(r.P+r.F*o,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(46)("find")},function(e,t,n){"use strict";var r=n(0),i=n(28)(6),o="findIndex",a=!0;o in[]&&Array(1)[o]((function(){a=!1})),r(r.P+r.F*a,"Array",{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(46)(o)},function(e,t,n){"use strict";var r=n(0),i=n(278),o=n(11),a=n(9),s=n(19),u=n(170);r(r.P,"Array",{flatMap:function(e){var t,n,r=o(this);return s(e),t=a(r.length),n=u(r,0),i(n,r,r,t,0,1,e,arguments[1]),n}}),n(46)("flatMap")},function(e,t,n){"use strict";var r=n(85),i=n(2),o=n(9),a=n(27),s=n(5)("isConcatSpreadable");e.exports=function e(t,n,u,l,c,f,d,h){for(var p,v,g=c,y=0,m=!!d&&a(d,h,3);y<l;){if(y in u){if(p=m?m(u[y],y,n):u[y],v=!1,i(p)&&(v=void 0!==(v=p[s])?!!v:r(p)),v&&f>0)g=e(t,n,p,o(p.length),g,f-1)-1;else{if(g>=9007199254740991)throw TypeError();t[g]=p}g++}y++}return g}},function(e,t,n){"use strict";var r=n(0),i=n(28)(0),o=n(29)([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(27),i=n(0),o=n(11),a=n(171),s=n(118),u=n(9),l=n(119),c=n(120);i(i.S+i.F*!n(86)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,i,f,d=o(e),h="function"==typeof this?this:Array,p=arguments.length,v=p>1?arguments[1]:void 0,g=void 0!==v,y=0,m=c(d);if(g&&(v=r(v,p>2?arguments[2]:void 0,2)),null==m||h==Array&&s(m))for(n=new h(t=u(d.length));t>y;y++)l(n,y,g?v(d[y],y):d[y]);else for(f=m.call(d),n=new h;!(i=f.next()).done;y++)l(n,y,g?a(f,v,[i.value,y],!0):i.value);return n.length=y,n}})},function(e,t,n){"use strict";var r=n(0),i=n(87)(!0);r(r.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(46)("includes")},function(e,t,n){"use strict";var r=n(0),i=n(87)(!1),o=[].indexOf,a=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(29)(o)),"Array",{indexOf:function(e){return a?o.apply(this,arguments)||0:i(this,e,arguments[1])}})},function(e,t,n){var r=n(0);r(r.S,"Array",{isArray:n(85)})},function(e,t,n){"use strict";var r=n(48),i=n(44),o=n(58),a={};n(17)(a,n(5)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){"use strict";var r=n(0),i=n(22),o=n(35),a=n(9),s=[].lastIndexOf,u=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(u||!n(29)(s)),"Array",{lastIndexOf:function(e){if(u)return s.apply(this,arguments)||0;var t=i(this),n=a(t.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){"use strict";var r=n(0),i=n(28)(1);r(r.P+r.F*!n(29)([].map,!0),"Array",{map:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),i=n(119);r(r.S+r.F*n(4)((function(){function e(){}return!(Array.of.call(e)instanceof e)})),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(0),i=n(176);r(r.P+r.F*!n(29)([].reduce,!0),"Array",{reduce:function(e){return i(this,e,arguments.length,arguments[1],!1)}})},function(e,t,n){"use strict";var r=n(0),i=n(176);r(r.P+r.F*!n(29)([].reduceRight,!0),"Array",{reduceRight:function(e){return i(this,e,arguments.length,arguments[1],!0)}})},function(e,t,n){"use strict";var r=n(0),i=n(28)(3);r(r.P+r.F*!n(29)([].some,!0),"Array",{some:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(0),i=n(19),o=n(11),a=n(4),s=[].sort,u=[1,2,3];r(r.P+r.F*(a((function(){u.sort(void 0)}))||!a((function(){u.sort(null)}))||!n(29)(s)),"Array",{sort:function(e){return void 0===e?s.call(o(this)):s.call(o(this),i(e))}})},function(e,t,n){n(59)("Array")},function(e,t,n){var r=n(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){var r=n(0),i=n(295);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(e,t,n){"use strict";var r=n(4),i=Date.prototype.getTime,o=Date.prototype.toISOString,a=function(e){return e>9?e:"0"+e};e.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-50000000000001))}))||!r((function(){o.call(new Date(NaN))}))?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+a(e.getUTCMonth()+1)+"-"+a(e.getUTCDate())+"T"+a(e.getUTCHours())+":"+a(e.getUTCMinutes())+":"+a(e.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:o},function(e,t,n){"use strict";var r=n(0),i=n(11),o=n(26);r(r.P+r.F*n(4)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(e){var t=i(this),n=o(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){var r=n(5)("toPrimitive"),i=Date.prototype;r in i||n(17)(i,r,n(298))},function(e,t,n){"use strict";var r=n(3),i=n(26);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return i(r(this),"number"!=e)}},function(e,t,n){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(14)(r,"toString",(function(){var e=o.call(this);return e==e?i.call(this):"Invalid Date"}))},function(e,t,n){var r=n(0);r(r.P,"Function",{bind:n(177)})},function(e,t,n){"use strict";var r=n(2),i=n(36),o=n(5)("hasInstance"),a=Function.prototype;o in a||n(8).f(a,o,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var r=n(8).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||n(7)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(179),i=n(50);e.exports=n(89)("Map",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(e){var t=r.getEntry(i(this,"Map"),e);return t&&t.v},set:function(e,t){return r.def(i(this,"Map"),0===e?0:e,t)}},r,!0)},function(e,t,n){var r=n(0),i=n(180),o=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+o(e-1)*o(e+1))}})},function(e,t,n){var r=n(0),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}})},function(e,t,n){var r=n(0),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(0),i=n(127);r(r.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var r=n(0);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(0),i=Math.exp;r(r.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},function(e,t,n){var r=n(0),i=n(128);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(e,t,n){var r=n(0);r(r.S,"Math",{fround:n(312)})},function(e,t,n){var r=n(127),i=Math.pow,o=i(2,-52),a=i(2,-23),s=i(2,127)*(2-a),u=i(2,-126);e.exports=Math.fround||function(e){var t,n,i=Math.abs(e),l=r(e);return i<u?l*(i/u/a+1/o-1/o)*u*a:(n=(t=(1+a/o)*i)-(t-i))>s||n!=n?l*(1/0):l*n}},function(e,t,n){var r=n(0),i=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,o=0,a=0,s=arguments.length,u=0;a<s;)u<(n=i(arguments[a++]))?(o=o*(r=u/n)*r+1,u=n):o+=n>0?(r=n/u)*r:n;return u===1/0?1/0:u*Math.sqrt(o)}})},function(e,t,n){var r=n(0),i=Math.imul;r(r.S+r.F*n(4)((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(e,t){var n=+e,r=+t,i=65535&n,o=65535&r;return 0|i*o+((65535&n>>>16)*o+i*(65535&r>>>16)<<16>>>0)}})},function(e,t,n){var r=n(0);r(r.S,"Math",{log1p:n(180)})},function(e,t,n){var r=n(0);r(r.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var r=n(0);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(0);r(r.S,"Math",{sign:n(127)})},function(e,t,n){var r=n(0),i=n(128),o=Math.exp;r(r.S+r.F*n(4)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(i(e)-i(-e))/2:(o(e-1)-o(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(0),i=n(128),o=Math.exp;r(r.S,"Math",{tanh:function(e){var t=i(e=+e),n=i(-e);return t==1/0?1:n==1/0?-1:(t-n)/(o(e)+o(-e))}})},function(e,t,n){var r=n(0);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){"use strict";var r=n(1),i=n(18),o=n(47),a=n(125),s=n(26),u=n(4),l=n(51).f,c=n(20).f,f=n(8).f,d=n(62).trim,h=r.Number,p=h,v=h.prototype,g="Number"==o(n(48)(v)),y="trim"in String.prototype,m=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){var n,r,i,o=(t=y?t.trim():d(t,3)).charCodeAt(0);if(43===o||45===o){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===o){switch(t.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+t}for(var a,u=t.slice(2),l=0,c=u.length;l<c;l++)if((a=u.charCodeAt(l))<48||a>i)return NaN;return parseInt(u,r)}}return+t};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof h&&(g?u((function(){v.valueOf.call(n)})):"Number"!=o(n))?a(new p(m(t)),n,h):m(t)};for(var b,x=n(7)?l(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;x.length>w;w++)i(p,b=x[w])&&!i(h,b)&&f(h,b,c(p,b));h.prototype=v,v.constructor=h,n(14)(r,"Number",h)}},function(e,t,n){var r=n(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(0),i=n(1).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},function(e,t,n){var r=n(0);r(r.S,"Number",{isInteger:n(181)})},function(e,t,n){var r=n(0);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(0),i=n(181),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return i(e)&&o(e)<=9007199254740991}})},function(e,t,n){var r=n(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(0),i=n(331);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(e,t,n){var r=n(1).parseFloat,i=n(62).trim;e.exports=1/r(n(129)+"-0")!=-1/0?function(e){var t=i(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){var r=n(0),i=n(333);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(e,t,n){var r=n(1).parseInt,i=n(62).trim,o=n(129),a=/^[-+]?0[xX]/;e.exports=8!==r(o+"08")||22!==r(o+"0x16")?function(e,t){var n=i(String(e),3);return r(n,t>>>0||(a.test(n)?16:10))}:r},function(e,t,n){var r=n(0);r(r.S+r.F,"Object",{assign:n(182)})},function(e,t,n){var r=n(0);r(r.S,"Object",{create:n(48)})},function(e,t,n){"use strict";var r=n(0),i=n(11),o=n(19),a=n(8);n(7)&&r(r.P+n(91),"Object",{__defineGetter__:function(e,t){a.f(i(this),e,{get:o(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(0),i=n(11),o=n(19),a=n(8);n(7)&&r(r.P+n(91),"Object",{__defineSetter__:function(e,t){a.f(i(this),e,{set:o(t),enumerable:!0,configurable:!0})}})},function(e,t,n){var r=n(0);r(r.S+r.F*!n(7),"Object",{defineProperty:n(8).f})},function(e,t,n){var r=n(0);r(r.S+r.F*!n(7),"Object",{defineProperties:n(173)})},function(e,t,n){var r=n(0),i=n(183)(!0);r(r.S,"Object",{entries:function(e){return i(e)}})},function(e,t,n){var r=n(2),i=n(41).onFreeze;n(30)("freeze",(function(e){return function(t){return e&&r(t)?e(i(t)):t}}))},function(e,t,n){var r=n(22),i=n(20).f;n(30)("getOwnPropertyDescriptor",(function(){return function(e,t){return i(r(e),t)}}))},function(e,t,n){var r=n(0),i=n(184),o=n(22),a=n(20),s=n(119);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,r=o(e),u=a.f,l=i(r),c={},f=0;l.length>f;)void 0!==(n=u(r,t=l[f++]))&&s(c,t,n);return c}})},function(e,t,n){n(30)("getOwnPropertyNames",(function(){return n(185).f}))},function(e,t,n){var r=n(11),i=n(36);n(30)("getPrototypeOf",(function(){return function(e){return i(r(e))}}))},function(e,t,n){"use strict";var r=n(0),i=n(11),o=n(26),a=n(36),s=n(20).f;n(7)&&r(r.P+n(91),"Object",{__lookupGetter__:function(e){var t,n=i(this),r=o(e,!0);do{if(t=s(n,r))return t.get}while(n=a(n))}})},function(e,t,n){"use strict";var r=n(0),i=n(11),o=n(26),a=n(36),s=n(20).f;n(7)&&r(r.P+n(91),"Object",{__lookupSetter__:function(e){var t,n=i(this),r=o(e,!0);do{if(t=s(n,r))return t.set}while(n=a(n))}})},function(e,t,n){var r=n(2),i=n(41).onFreeze;n(30)("preventExtensions",(function(e){return function(t){return e&&r(t)?e(i(t)):t}}))},function(e,t,n){"use strict";var r=n(69),i={};i[n(5)("toStringTag")]="z",i+""!="[object z]"&&n(14)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(e,t,n){var r=n(0);r(r.S,"Object",{is:n(186)})},function(e,t,n){var r=n(2);n(30)("isFrozen",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(2);n(30)("isSealed",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(2);n(30)("isExtensible",(function(e){return function(t){return!!r(t)&&(!e||e(t))}}))},function(e,t,n){var r=n(11),i=n(49);n(30)("keys",(function(){return function(e){return i(r(e))}}))},function(e,t,n){var r=n(2),i=n(41).onFreeze;n(30)("seal",(function(e){return function(t){return e&&r(t)?e(i(t)):t}}))},function(e,t,n){var r=n(0);r(r.S,"Object",{setPrototypeOf:n(126).set})},function(e,t,n){var r=n(0),i=n(183)(!1);r(r.S,"Object",{values:function(e){return i(e)}})},function(e,t,n){"use strict";var r,i,o,a,s=n(40),u=n(1),l=n(27),c=n(69),f=n(0),d=n(2),h=n(19),p=n(61),v=n(88),g=n(71),y=n(130).set,m=n(359)(),b=n(187),x=n(360),w=n(92),S=n(188),E=u.TypeError,k=u.process,_=k&&k.versions,T=_&&_.v8||"",C=u.Promise,P="process"==c(k),D=function(){},M=i=b.f,O=!!function(){try{var e=C.resolve(1),t=(e.constructor={})[n(5)("species")]=function(e){e(D,D)};return(P||"function"==typeof PromiseRejectionEvent)&&e.then(D)instanceof t&&0!==T.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(e){}}(),I=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},N=function(e,t){if(!e._n){e._n=!0;var n=e._c;m((function(){for(var r=e._v,i=1==e._s,o=0,a=function(t){var n,o,a,s=i?t.ok:t.fail,u=t.resolve,l=t.reject,c=t.domain;try{s?(i||(2==e._h&&j(e),e._h=1),!0===s?n=r:(c&&c.enter(),n=s(r),c&&(c.exit(),a=!0)),n===t.promise?l(E("Promise-chain cycle")):(o=I(n))?o.call(n,u,l):u(n)):l(r)}catch(e){c&&!a&&c.exit(),l(e)}};n.length>o;)a(n[o++]);e._c=[],e._n=!1,t&&!e._h&&A(e)}))}},A=function(e){y.call(u,(function(){var t,n,r,i=e._v,o=L(e);if(o&&(t=x((function(){P?k.emit("unhandledRejection",i,e):(n=u.onunhandledrejection)?n({promise:e,reason:i}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",i)})),e._h=P||L(e)?2:1),e._a=void 0,o&&t.e)throw t.v}))},L=function(e){return 1!==e._h&&0===(e._a||e._c).length},j=function(e){y.call(u,(function(){var t;P?k.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})}))},B=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),N(t,!0))},F=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw E("Promise can't be resolved itself");(t=I(e))?m((function(){var r={_w:n,_d:!1};try{t.call(e,l(F,r,1),l(B,r,1))}catch(e){B.call(r,e)}})):(n._v=e,n._s=1,N(n,!1))}catch(e){B.call({_w:n,_d:!1},e)}}};O||(C=function(e){p(this,C,"Promise","_h"),h(e),r.call(this);try{e(l(F,this,1),l(B,this,1))}catch(e){B.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(60)(C.prototype,{then:function(e,t){var n=M(g(this,C));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=P?k.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&N(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r;this.promise=e,this.resolve=l(F,e,1),this.reject=l(B,e,1)},b.f=M=function(e){return e===C||e===a?new o(e):i(e)}),f(f.G+f.W+f.F*!O,{Promise:C}),n(58)(C,"Promise"),n(59)("Promise"),a=n(39).Promise,f(f.S+f.F*!O,"Promise",{reject:function(e){var t=M(this);return(0,t.reject)(e),t.promise}}),f(f.S+f.F*(s||!O),"Promise",{resolve:function(e){return S(s&&this===a?C:this,e)}}),f(f.S+f.F*!(O&&n(86)((function(e){C.all(e).catch(D)}))),"Promise",{all:function(e){var t=this,n=M(t),r=n.resolve,i=n.reject,o=x((function(){var n=[],o=0,a=1;v(e,!1,(function(e){var s=o++,u=!1;n.push(void 0),a++,t.resolve(e).then((function(e){u||(u=!0,n[s]=e,--a||r(n))}),i)})),--a||r(n)}));return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=M(t),r=n.reject,i=x((function(){v(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},function(e,t,n){var r=n(1),i=n(130).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,u="process"==n(47)(a);e.exports=function(){var e,t,n,l=function(){var r,i;for(u&&(r=a.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(l)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var c=s.resolve(void 0);n=function(){c.then(l)}}else n=function(){i.call(r,l)};else{var f=!0,d=document.createTextNode("");new o(l).observe(d,{characterData:!0}),n=function(){d.data=f=!f}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){"use strict";var r=n(0),i=n(39),o=n(1),a=n(71),s=n(188);r(r.P+r.R,"Promise",{finally:function(e){var t=a(this,i.Promise||o.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},function(e,t,n){var r=n(0),i=n(19),o=n(3),a=(n(1).Reflect||{}).apply,s=Function.apply;r(r.S+r.F*!n(4)((function(){a((function(){}))})),"Reflect",{apply:function(e,t,n){var r=i(e),u=o(n);return a?a(r,t,u):s.call(r,t,u)}})},function(e,t,n){var r=n(0),i=n(48),o=n(19),a=n(3),s=n(2),u=n(4),l=n(177),c=(n(1).Reflect||{}).construct,f=u((function(){function e(){}return!(c((function(){}),[],e)instanceof e)})),d=!u((function(){c((function(){}))}));r(r.S+r.F*(f||d),"Reflect",{construct:function(e,t){o(e),a(t);var n=arguments.length<3?e:o(arguments[2]);if(d&&!f)return c(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(l.apply(e,r))}var u=n.prototype,h=i(s(u)?u:Object.prototype),p=Function.apply.call(e,h,t);return s(p)?p:h}})},function(e,t,n){var r=n(8),i=n(0),o=n(3),a=n(26);i(i.S+i.F*n(4)((function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})})),"Reflect",{defineProperty:function(e,t,n){o(e),t=a(t,!0),o(n);try{return r.f(e,t,n),!0}catch(e){return!1}}})},function(e,t,n){var r=n(0),i=n(20).f,o=n(3);r(r.S,"Reflect",{deleteProperty:function(e,t){var n=i(o(e),t);return!(n&&!n.configurable)&&delete e[t]}})},function(e,t,n){var r=n(20),i=n(36),o=n(18),a=n(0),s=n(2),u=n(3);a(a.S,"Reflect",{get:function e(t,n){var a,l,c=arguments.length<3?t:arguments[2];return u(t)===c?t[n]:(a=r.f(t,n))?o(a,"value")?a.value:void 0!==a.get?a.get.call(c):void 0:s(l=i(t))?e(l,n,c):void 0}})},function(e,t,n){var r=n(20),i=n(0),o=n(3);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(o(e),t)}})},function(e,t,n){var r=n(0),i=n(36),o=n(3);r(r.S,"Reflect",{getPrototypeOf:function(e){return i(o(e))}})},function(e,t,n){var r=n(0);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(0),i=n(3),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return i(e),!o||o(e)}})},function(e,t,n){var r=n(0);r(r.S,"Reflect",{ownKeys:n(184)})},function(e,t,n){var r=n(0),i=n(3),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){i(e);try{return o&&o(e),!0}catch(e){return!1}}})},function(e,t,n){var r=n(8),i=n(20),o=n(36),a=n(18),s=n(0),u=n(44),l=n(3),c=n(2);s(s.S,"Reflect",{set:function e(t,n,s){var f,d,h=arguments.length<4?t:arguments[3],p=i.f(l(t),n);if(!p){if(c(d=o(t)))return e(d,n,s,h);p=u(0)}if(a(p,"value")){if(!1===p.writable||!c(h))return!1;if(f=i.f(h,n)){if(f.get||f.set||!1===f.writable)return!1;f.value=s,r.f(h,n,f)}else r.f(h,n,u(0,s));return!0}return void 0!==p.set&&(p.set.call(h,s),!0)}})},function(e,t,n){var r=n(0),i=n(126);i&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){i.check(e,t);try{return i.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){var r=n(1),i=n(125),o=n(8).f,a=n(51).f,s=n(131),u=n(93),l=r.RegExp,c=l,f=l.prototype,d=/a/g,h=/a/g,p=new l(d)!==d;if(n(7)&&(!p||n(4)((function(){return h[n(5)("match")]=!1,l(d)!=d||l(h)==h||"/a/i"!=l(d,"i")})))){l=function(e,t){var n=this instanceof l,r=s(e),o=void 0===t;return!n&&r&&e.constructor===l&&o?e:i(p?new c(r&&!o?e.source:e,t):c((r=e instanceof l)?e.source:e,r&&o?u.call(e):t),n?this:f,l)};for(var v=function(e){e in l||o(l,e,{configurable:!0,get:function(){return c[e]},set:function(t){c[e]=t}})},g=a(c),y=0;g.length>y;)v(g[y++]);f.constructor=l,l.prototype=f,n(14)(r,"RegExp",l)}n(59)("RegExp")},function(e,t,n){"use strict";var r=n(3),i=n(9),o=n(132),a=n(94);n(95)("match",1,(function(e,t,n,s){return[function(n){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=s(n,e,this);if(t.done)return t.value;var u=r(e),l=String(this);if(!u.global)return a(u,l);var c=u.unicode;u.lastIndex=0;for(var f,d=[],h=0;null!==(f=a(u,l));){var p=String(f[0]);d[h]=p,""===p&&(u.lastIndex=o(l,i(u.lastIndex),c)),h++}return 0===h?null:d}]}))},function(e,t,n){"use strict";var r=n(134);n(0)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(e,t,n){"use strict";var r=n(3),i=n(11),o=n(9),a=n(35),s=n(132),u=n(94),l=Math.max,c=Math.min,f=Math.floor,d=/\$([$&`']|\d\d?|<[^>]*>)/g,h=/\$([$&`']|\d\d?)/g;n(95)("replace",2,(function(e,t,n,p){return[function(r,i){var o=e(this),a=null==r?void 0:r[t];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},function(e,t){var i=p(n,e,this,t);if(i.done)return i.value;var f=r(e),d=String(this),h="function"==typeof t;h||(t=String(t));var g=f.global;if(g){var y=f.unicode;f.lastIndex=0}for(var m=[];;){var b=u(f,d);if(null===b)break;if(m.push(b),!g)break;""===String(b[0])&&(f.lastIndex=s(d,o(f.lastIndex),y))}for(var x,w="",S=0,E=0;E<m.length;E++){b=m[E];for(var k=String(b[0]),_=l(c(a(b.index),d.length),0),T=[],C=1;C<b.length;C++)T.push(void 0===(x=b[C])?x:String(x));var P=b.groups;if(h){var D=[k].concat(T,_,d);void 0!==P&&D.push(P);var M=String(t.apply(void 0,D))}else M=v(k,d,_,T,P,t);_>=S&&(w+=d.slice(S,_)+M,S=_+k.length)}return w+d.slice(S)}];function v(e,t,r,o,a,s){var u=r+e.length,l=o.length,c=h;return void 0!==a&&(a=i(a),c=d),n.call(s,c,(function(n,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(u);case"<":s=a[i.slice(1,-1)];break;default:var c=+i;if(0===c)return n;if(c>l){var d=f(c/10);return 0===d?n:d<=l?void 0===o[d-1]?i.charAt(1):o[d-1]+i.charAt(1):n}s=o[c-1]}return void 0===s?"":s}))}}))},function(e,t,n){"use strict";var r=n(131),i=n(3),o=n(71),a=n(132),s=n(9),u=n(94),l=n(134),c=n(4),f=Math.min,d=[].push,h="length",p=!c((function(){RegExp(4294967295,"y")}));n(95)("split",2,(function(e,t,n,c){var v;return v="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[h]||2!="ab".split(/(?:ab)*/)[h]||4!=".".split(/(.?)(.?)/)[h]||".".split(/()()/)[h]>1||"".split(/.?/)[h]?function(e,t){var i=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(i,e,t);for(var o,a,s,u=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),f=0,p=void 0===t?4294967295:t>>>0,v=new RegExp(e.source,c+"g");(o=l.call(v,i))&&!((a=v.lastIndex)>f&&(u.push(i.slice(f,o.index)),o[h]>1&&o.index<i[h]&&d.apply(u,o.slice(1)),s=o[0][h],f=a,u[h]>=p));)v.lastIndex===o.index&&v.lastIndex++;return f===i[h]?!s&&v.test("")||u.push(""):u.push(i.slice(f)),u[h]>p?u.slice(0,p):u}:"0".split(void 0,0)[h]?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var i=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,i,r):v.call(String(i),n,r)},function(e,t){var r=c(v,e,this,t,v!==n);if(r.done)return r.value;var l=i(e),d=String(this),h=o(l,RegExp),g=l.unicode,y=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(p?"y":"g"),m=new h(p?l:"^(?:"+l.source+")",y),b=void 0===t?4294967295:t>>>0;if(0===b)return[];if(0===d.length)return null===u(m,d)?[d]:[];for(var x=0,w=0,S=[];w<d.length;){m.lastIndex=p?w:0;var E,k=u(m,p?d:d.slice(w));if(null===k||(E=f(s(m.lastIndex+(p?0:w)),d.length))===x)w=a(d,w,g);else{if(S.push(d.slice(x,w)),S.length===b)return S;for(var _=1;_<=k.length-1;_++)if(S.push(k[_]),S.length===b)return S;w=x=E}}return S.push(d.slice(x)),S}]}))},function(e,t,n){"use strict";var r=n(3),i=n(186),o=n(94);n(95)("search",1,(function(e,t,n,a){return[function(n){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=a(n,e,this);if(t.done)return t.value;var s=r(e),u=String(this),l=s.lastIndex;i(l,0)||(s.lastIndex=0);var c=o(s,u);return i(s.lastIndex,l)||(s.lastIndex=l),null===c?-1:c.index}]}))},function(e,t,n){"use strict";n(189);var r=n(3),i=n(93),o=n(7),a=/./.toString,s=function(e){n(14)(RegExp.prototype,"toString",e,!0)};n(4)((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?s((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?i.call(e):void 0)})):"toString"!=a.name&&s((function(){return a.call(this)}))},function(e,t,n){"use strict";var r=n(179),i=n(50);e.exports=n(89)("Set",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(i(this,"Set"),e=0===e?0:e,e)}},r)},function(e,t,n){"use strict";var r=n(1),i=n(18),o=n(7),a=n(0),s=n(14),u=n(41).KEY,l=n(4),c=n(83),f=n(58),d=n(45),h=n(5),p=n(190),v=n(191),g=n(384),y=n(85),m=n(3),b=n(2),x=n(11),w=n(22),S=n(26),E=n(44),k=n(48),_=n(185),T=n(20),C=n(90),P=n(8),D=n(49),M=T.f,O=P.f,I=_.f,N=r.Symbol,A=r.JSON,L=A&&A.stringify,j=h("_hidden"),B=h("toPrimitive"),F={}.propertyIsEnumerable,R=c("symbol-registry"),z=c("symbols"),V=c("op-symbols"),q=Object.prototype,G="function"==typeof N&&!!C.f,W=r.QObject,H=!W||!W.prototype||!W.prototype.findChild,U=o&&l((function(){return 7!=k(O({},"a",{get:function(){return O(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=M(q,t);r&&delete q[t],O(e,t,n),r&&e!==q&&O(q,t,r)}:O,Y=function(e){var t=z[e]=k(N.prototype);return t._k=e,t},X=G&&"symbol"==typeof N.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof N},K=function(e,t,n){return e===q&&K(V,t,n),m(e),t=S(t,!0),m(n),i(z,t)?(n.enumerable?(i(e,j)&&e[j][t]&&(e[j][t]=!1),n=k(n,{enumerable:E(0,!1)})):(i(e,j)||O(e,j,E(1,{})),e[j][t]=!0),U(e,t,n)):O(e,t,n)},$=function(e,t){m(e);for(var n,r=g(t=w(t)),i=0,o=r.length;o>i;)K(e,n=r[i++],t[n]);return e},Z=function(e){var t=F.call(this,e=S(e,!0));return!(this===q&&i(z,e)&&!i(V,e))&&(!(t||!i(this,e)||!i(z,e)||i(this,j)&&this[j][e])||t)},Q=function(e,t){if(e=w(e),t=S(t,!0),e!==q||!i(z,t)||i(V,t)){var n=M(e,t);return!n||!i(z,t)||i(e,j)&&e[j][t]||(n.enumerable=!0),n}},J=function(e){for(var t,n=I(w(e)),r=[],o=0;n.length>o;)i(z,t=n[o++])||t==j||t==u||r.push(t);return r},ee=function(e){for(var t,n=e===q,r=I(n?V:w(e)),o=[],a=0;r.length>a;)!i(z,t=r[a++])||n&&!i(q,t)||o.push(z[t]);return o};G||(s((N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function(n){this===q&&t.call(V,n),i(this,j)&&i(this[j],e)&&(this[j][e]=!1),U(this,e,E(1,n))};return o&&H&&U(q,e,{configurable:!0,set:t}),Y(e)}).prototype,"toString",(function(){return this._k})),T.f=Q,P.f=K,n(51).f=_.f=J,n(70).f=Z,C.f=ee,o&&!n(40)&&s(q,"propertyIsEnumerable",Z,!0),p.f=function(e){return Y(h(e))}),a(a.G+a.W+a.F*!G,{Symbol:N});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)h(te[ne++]);for(var re=D(h.store),ie=0;re.length>ie;)v(re[ie++]);a(a.S+a.F*!G,"Symbol",{for:function(e){return i(R,e+="")?R[e]:R[e]=N(e)},keyFor:function(e){if(!X(e))throw TypeError(e+" is not a symbol!");for(var t in R)if(R[t]===e)return t},useSetter:function(){H=!0},useSimple:function(){H=!1}}),a(a.S+a.F*!G,"Object",{create:function(e,t){return void 0===t?k(e):$(k(e),t)},defineProperty:K,defineProperties:$,getOwnPropertyDescriptor:Q,getOwnPropertyNames:J,getOwnPropertySymbols:ee});var oe=l((function(){C.f(1)}));a(a.S+a.F*oe,"Object",{getOwnPropertySymbols:function(e){return C.f(x(e))}}),A&&a(a.S+a.F*(!G||l((function(){var e=N();return"[null]"!=L([e])||"{}"!=L({a:e})||"{}"!=L(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(b(t)||void 0!==e)&&!X(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!X(t))return t}),r[1]=t,L.apply(A,r)}}),N.prototype[B]||n(17)(N.prototype,B,N.prototype.valueOf),f(N,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(e,t,n){var r=n(49),i=n(90),o=n(70);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var a,s=n(e),u=o.f,l=0;s.length>l;)u.call(e,a=s[l++])&&t.push(a);return t}},function(e,t,n){n(191)("asyncIterator")},function(e,t,n){"use strict";n(15)("anchor",(function(e){return function(t){return e(this,"a","name",t)}}))},function(e,t,n){"use strict";n(15)("big",(function(e){return function(){return e(this,"big","","")}}))},function(e,t,n){"use strict";n(15)("blink",(function(e){return function(){return e(this,"blink","","")}}))},function(e,t,n){"use strict";n(15)("bold",(function(e){return function(){return e(this,"b","","")}}))},function(e,t,n){"use strict";var r=n(0),i=n(133)(!1);r(r.P,"String",{codePointAt:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(0),i=n(9),o=n(135),a="".endsWith;r(r.P+r.F*n(136)("endsWith"),"String",{endsWith:function(e){var t=o(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=i(t.length),s=void 0===n?r:Math.min(i(n),r),u=String(e);return a?a.call(t,u,s):t.slice(s-u.length,s)===u}})},function(e,t,n){"use strict";n(15)("fixed",(function(e){return function(){return e(this,"tt","","")}}))},function(e,t,n){"use strict";n(15)("fontcolor",(function(e){return function(t){return e(this,"font","color",t)}}))},function(e,t,n){"use strict";n(15)("fontsize",(function(e){return function(t){return e(this,"font","size",t)}}))},function(e,t,n){var r=n(0),i=n(56),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){"use strict";var r=n(0),i=n(135);r(r.P+r.F*n(136)("includes"),"String",{includes:function(e){return!!~i(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";n(15)("italics",(function(e){return function(){return e(this,"i","","")}}))},function(e,t,n){"use strict";var r=n(133)(!0);n(122)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";n(15)("link",(function(e){return function(t){return e(this,"a","href",t)}}))},function(e,t,n){"use strict";var r=n(0),i=n(192),o=n(92),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*a,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){"use strict";var r=n(0),i=n(192),o=n(92),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*a,"String",{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){var r=n(0),i=n(22),o=n(9);r(r.S,"String",{raw:function(e){for(var t=i(e.raw),n=o(t.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s<r&&a.push(String(arguments[s]));return a.join("")}})},function(e,t,n){var r=n(0);r(r.P,"String",{repeat:n(193)})},function(e,t,n){"use strict";n(15)("small",(function(e){return function(){return e(this,"small","","")}}))},function(e,t,n){"use strict";var r=n(0),i=n(9),o=n(135),a="".startsWith;r(r.P+r.F*n(136)("startsWith"),"String",{startsWith:function(e){var t=o(this,e,"startsWith"),n=i(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return a?a.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(15)("strike",(function(e){return function(){return e(this,"strike","","")}}))},function(e,t,n){"use strict";n(15)("sub",(function(e){return function(){return e(this,"sub","","")}}))},function(e,t,n){"use strict";n(15)("sup",(function(e){return function(){return e(this,"sup","","")}}))},function(e,t,n){"use strict";n(62)("trim",(function(e){return function(){return e(this,3)}}))},function(e,t,n){"use strict";n(62)("trimLeft",(function(e){return function(){return e(this,1)}}),"trimStart")},function(e,t,n){"use strict";n(62)("trimRight",(function(e){return function(){return e(this,2)}}),"trimEnd")},function(e,t,n){"use strict";var r=n(0),i=n(96),o=n(137),a=n(3),s=n(56),u=n(9),l=n(2),c=n(1).ArrayBuffer,f=n(71),d=o.ArrayBuffer,h=o.DataView,p=i.ABV&&c.isView,v=d.prototype.slice,g=i.VIEW;r(r.G+r.W+r.F*(c!==d),{ArrayBuffer:d}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(e){return p&&p(e)||l(e)&&g in e}}),r(r.P+r.U+r.F*n(4)((function(){return!new d(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(e,t){if(void 0!==v&&void 0===t)return v.call(a(this),e);for(var n=a(this).byteLength,r=s(e,n),i=s(void 0===t?n:t,n),o=new(f(this,d))(u(i-r)),l=new h(this),c=new h(o),p=0;r<i;)c.setUint8(p++,l.getUint8(r++));return o}}),n(59)("ArrayBuffer")},function(e,t,n){var r=n(0);r(r.G+r.W+r.F*!n(96).ABV,{DataView:n(137).DataView})},function(e,t,n){n(37)("Int8",1,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(37)("Uint8",1,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(37)("Uint8",1,(function(e){return function(t,n,r){return e(this,t,n,r)}}),!0)},function(e,t,n){n(37)("Int16",2,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(37)("Uint16",2,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(37)("Int32",4,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(37)("Uint32",4,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(37)("Float32",4,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(37)("Float64",8,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";var r,i=n(1),o=n(28)(0),a=n(14),s=n(41),u=n(182),l=n(195),c=n(2),f=n(50),d=n(50),h=!i.ActiveXObject&&"ActiveXObject"in i,p=s.getWeak,v=Object.isExtensible,g=l.ufstore,y=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(e){if(c(e)){var t=p(e);return!0===t?g(f(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return l.def(f(this,"WeakMap"),e,t)}},b=e.exports=n(89)("WeakMap",y,m,l,!0,!0);d&&h&&(u((r=l.getConstructor(y,"WeakMap")).prototype,m),s.NEED=!0,o(["delete","has","get","set"],(function(e){var t=b.prototype,n=t[e];a(t,e,(function(t,i){if(c(t)&&!v(t)){this._f||(this._f=new r);var o=this._f[e](t,i);return"set"==e?this:o}return n.call(this,t,i)}))})))},function(e,t,n){"use strict";var r=n(195),i=n(50);n(89)("WeakSet",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(i(this,"WeakSet"),e,!0)}},r,!1,!0)},function(e,t,n){var r=n(1),i=n(0),o=n(92),a=[].slice,s=/MSIE .\./.test(o),u=function(e){return function(t,n){var r=arguments.length>2,i=!!r&&a.call(arguments,2);return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,i)}:t,n)}};i(i.G+i.B+i.F*s,{setTimeout:u(r.setTimeout),setInterval:u(r.setInterval)})},function(e,t,n){var r=n(0),i=n(130);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){for(var r=n(121),i=n(49),o=n(14),a=n(1),s=n(17),u=n(57),l=n(5),c=l("iterator"),f=l("toStringTag"),d=u.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(h),v=0;v<p.length;v++){var g,y=p[v],m=h[y],b=a[y],x=b&&b.prototype;if(x&&(x[c]||s(x,c,d),x[f]||s(x,f,y),u[y]=d,m))for(g in r)x[g]||o(x,g,r[g],!0)}},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n,r){var i=t&&t.prototype instanceof c?t:c,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=b(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,a),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var l={};function c(){}function f(){}function d(){}var h={};h[i]=function(){return this};var p=Object.getPrototypeOf,v=p&&p(p(E([])));v&&v!==t&&n.call(v,i)&&(h=v);var g=d.prototype=c.prototype=Object.create(h);function y(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function m(e,t){var r;this._invoke=function(i,o){function a(){return new t((function(r,a){!function r(i,o,a,s){var l=u(e[i],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(l.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=g.constructor=d,d.constructor=f,d[a]=f.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,a in e||(e[a]="GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},y(m.prototype),m.prototype[o]=function(){return this},e.AsyncIterator=m,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new m(s(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(g),g[a]="Generator",g[i]=function(){return this},g.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=E,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),w(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){var r=n(63),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(432),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(97))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,o,a,s,u=1,l={},c=!1,f=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){p(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){p(e.data)},r=function(e){o.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(p,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&p(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return l[u]=i,r(u),u++},d.clearImmediate=h}function h(e){delete l[e]}function p(e){if(c)setTimeout(p,0,e);else{var t=l[e];if(t){c=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{h(e),c=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(97),n(433))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,l=[],c=!1,f=-1;function d(){c&&u&&(c=!1,u.length?l=u.concat(l):f=-1,l.length&&h())}function h(){if(!c){var e=s(d);c=!0;for(var t=l.length;t;){for(u=l,l=[];++f<t;)u&&u[f].run();f=-1,t=l.length}u=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function v(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||c||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,l=s||u||Function("return this")(),c=Object.prototype.toString,f=Math.max,d=Math.min,h=function(){return l.Date.now()};function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(e))return NaN;if(p(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=p(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=i.test(e);return s||o.test(e)?a(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,s,u,l=0,c=!1,g=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=r,o=i;return r=i=void 0,l=t,a=e.apply(o,n)}function b(e){return l=e,s=setTimeout(w,t),c?m(e):a}function x(e){var n=e-u;return void 0===u||n>=t||n<0||g&&e-l>=o}function w(){var e=h();if(x(e))return S(e);s=setTimeout(w,function(e){var n=t-(e-u);return g?d(n,o-(e-l)):n}(e))}function S(e){return s=void 0,y&&r?m(e):(r=i=void 0,a)}function E(){var e=h(),n=x(e);if(r=arguments,i=this,u=e,n){if(void 0===s)return b(u);if(g)return s=setTimeout(w,t),m(u)}return void 0===s&&(s=setTimeout(w,t)),a}return t=v(t)||0,p(n)&&(c=!!n.leading,o=(g="maxWait"in n)?f(v(n.maxWait)||0,t):o,y="trailing"in n?!!n.trailing:y),E.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=i=s=void 0},E.flush=function(){return void 0===s?a:S(h())},E}}).call(this,n(97))},function(e,t,n){e.exports=n(436)},function(e,t,n){var r,i,o;(function(){var n,a,s,u,l,c,f,d,h,p,v,g,y,m,b;s=Math.floor,p=Math.min,a=function(e,t){return e<t?-1:e>t?1:0},h=function(e,t,n,r,i){var o;if(null==n&&(n=0),null==i&&(i=a),n<0)throw new Error("lo must be non-negative");for(null==r&&(r=e.length);n<r;)i(t,e[o=s((n+r)/2)])<0?r=o:n=o+1;return[].splice.apply(e,[n,n-n].concat(t)),t},c=function(e,t,n){return null==n&&(n=a),e.push(t),m(e,0,e.length-1,n)},l=function(e,t){var n,r;return null==t&&(t=a),n=e.pop(),e.length?(r=e[0],e[0]=n,b(e,0,t)):r=n,r},d=function(e,t,n){var r;return null==n&&(n=a),r=e[0],e[0]=t,b(e,0,n),r},f=function(e,t,n){var r;return null==n&&(n=a),e.length&&n(e[0],t)<0&&(t=(r=[e[0],t])[0],e[0]=r[1],b(e,0,n)),t},u=function(e,t){var n,r,i,o,u,l;for(null==t&&(t=a),u=[],r=0,i=(o=function(){l=[];for(var t=0,n=s(e.length/2);0<=n?t<n:t>n;0<=n?t++:t--)l.push(t);return l}.apply(this).reverse()).length;r<i;r++)n=o[r],u.push(b(e,n,t));return u},y=function(e,t,n){var r;if(null==n&&(n=a),-1!==(r=e.indexOf(t)))return m(e,0,r,n),b(e,r,n)},v=function(e,t,n){var r,i,o,s,l;if(null==n&&(n=a),!(i=e.slice(0,t)).length)return i;for(u(i,n),o=0,s=(l=e.slice(t)).length;o<s;o++)r=l[o],f(i,r,n);return i.sort(n).reverse()},g=function(e,t,n){var r,i,o,s,c,f,d,v,g;if(null==n&&(n=a),10*t<=e.length){if(!(o=e.slice(0,t).sort(n)).length)return o;for(i=o[o.length-1],s=0,f=(d=e.slice(t)).length;s<f;s++)n(r=d[s],i)<0&&(h(o,r,0,null,n),o.pop(),i=o[o.length-1]);return o}for(u(e,n),g=[],c=0,v=p(t,e.length);0<=v?c<v:c>v;0<=v?++c:--c)g.push(l(e,n));return g},m=function(e,t,n,r){var i,o,s;for(null==r&&(r=a),i=e[n];n>t&&r(i,o=e[s=n-1>>1])<0;)e[n]=o,n=s;return e[n]=i},b=function(e,t,n){var r,i,o,s,u;for(null==n&&(n=a),i=e.length,u=t,o=e[t],r=2*t+1;r<i;)(s=r+1)<i&&!(n(e[r],e[s])<0)&&(r=s),e[t]=e[r],r=2*(t=r)+1;return e[t]=o,m(e,u,t,n)},n=function(){function e(e){this.cmp=null!=e?e:a,this.nodes=[]}return e.push=c,e.pop=l,e.replace=d,e.pushpop=f,e.heapify=u,e.updateItem=y,e.nlargest=v,e.nsmallest=g,e.prototype.push=function(e){return c(this.nodes,e,this.cmp)},e.prototype.pop=function(){return l(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return-1!==this.nodes.indexOf(e)},e.prototype.replace=function(e){return d(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return f(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return u(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return y(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return 0===this.nodes.length},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t;return(t=new e).nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),i=[],void 0===(o="function"==typeof(r=function(){return n})?r.apply(t,i):r)||(e.exports=o)}).call(this)},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(101),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(101);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(101);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(101);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},function(e,t,n){var r=n(100);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(100),i=n(139),o=n(140);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(72),i=n(448),o=n(16),a=n(202),s=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,f=l.hasOwnProperty,d=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?d:s).test(a(e))}},function(e,t,n){var r,i=n(449),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},function(e,t,n){var r=n(23)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(452),i=n(100),o=n(139);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(e,t,n){var r=n(453),i=n(454),o=n(455),a=n(456),s=n(457);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t,n){var r=n(102);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(102),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(102),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},function(e,t,n){var r=n(102);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(103);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(103);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(103);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(103);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},function(e,t,n){var r=n(65),i=n(38);e.exports=function(e,t){return e&&r(t,i(t),e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(53),i=n(31);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(53),i=n(143),o=n(31),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!a[r(e)]}},function(e,t,n){var r=n(205)(Object.keys,Object);e.exports=r},function(e,t,n){var r=n(65),i=n(67);e.exports=function(e,t){return e&&r(t,i(t),e)}},function(e,t,n){var r=n(16),i=n(76),o=n(471),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){var r=n(65),i=n(146);e.exports=function(e,t){return r(e,i(e),t)}},function(e,t,n){var r=n(65),i=n(210);e.exports=function(e,t){return r(e,i(e),t)}},function(e,t,n){var r=n(212),i=n(210),o=n(67);e.exports=function(e){return r(e,o,i)}},function(e,t,n){var r=n(55)(n(23),"DataView");e.exports=r},function(e,t,n){var r=n(55)(n(23),"Promise");e.exports=r},function(e,t,n){var r=n(55)(n(23),"WeakMap");e.exports=r},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},function(e,t,n){var r=n(148),i=n(480),o=n(481),a=n(482),s=n(215);e.exports=function(e,t,n){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return i(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return o(e);case"[object Set]":return new u;case"[object Symbol]":return a(e)}}},function(e,t,n){var r=n(148);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,n){var r=n(63),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},function(e,t,n){var r=n(484),i=n(106),o=n(144),a=o&&o.isMap,s=a?i(a):r;e.exports=s},function(e,t,n){var r=n(68),i=n(31);e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},function(e,t,n){var r=n(486),i=n(106),o=n(144),a=o&&o.isSet,s=a?i(a):r;e.exports=s},function(e,t,n){var r=n(68),i=n(31);e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},function(e,t,n){var r=n(488),i=n(495),o=n(225);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(99),i=n(220);e.exports=function(e,t,n,o){var a=n.length,s=a,u=!o;if(null==e)return!s;for(e=Object(e);a--;){var l=n[a];if(u&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<s;){var c=(l=n[a])[0],f=e[c],d=l[1];if(u&&l[2]){if(void 0===f&&!(c in e))return!1}else{var h=new r;if(o)var p=o(f,d,c,e,t,h);if(!(void 0===p?i(d,f,3,o,h):p))return!1}}return!0}},function(e,t,n){var r=n(99),i=n(221),o=n(492),a=n(494),s=n(68),u=n(10),l=n(66),c=n(75),f="[object Object]",d=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,h,p,v){var g=u(e),y=u(t),m=g?"[object Array]":s(e),b=y?"[object Array]":s(t),x=(m="[object Arguments]"==m?f:m)==f,w=(b="[object Arguments]"==b?f:b)==f,S=m==b;if(S&&l(e)){if(!l(t))return!1;g=!0,x=!1}if(S&&!x)return v||(v=new r),g||c(e)?i(e,t,n,h,p,v):o(e,t,m,n,h,p,v);if(!(1&n)){var E=x&&d.call(e,"__wrapped__"),k=w&&d.call(t,"__wrapped__");if(E||k){var _=E?e.value():e,T=k?t.value():t;return v||(v=new r),p(_,T,n,h,v)}}return!!S&&(v||(v=new r),a(e,t,n,h,p,v))}},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(63),i=n(214),o=n(54),a=n(221),s=n(493),u=n(149),l=r?r.prototype:void 0,c=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,f,d){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=s;case"[object Set]":var p=1&r;if(h||(h=u),e.size!=t.size&&!p)return!1;var v=d.get(e);if(v)return v==t;r|=2,d.set(e,t);var g=a(h(e),h(t),r,l,f,d);return d.delete(e),g;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t,n){var r=n(211),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var u=1&n,l=r(e),c=l.length;if(c!=r(t).length&&!u)return!1;for(var f=c;f--;){var d=l[f];if(!(u?d in t:i.call(t,d)))return!1}var h=s.get(e);if(h&&s.get(t))return h==t;var p=!0;s.set(e,t),s.set(t,e);for(var v=u;++f<c;){var g=e[d=l[f]],y=t[d];if(o)var m=u?o(y,g,d,t,e,s):o(g,y,d,e,t,s);if(!(void 0===m?g===y||a(g,y,n,o,s):m)){p=!1;break}v||(v="constructor"==d)}if(p&&!v){var b=e.constructor,x=t.constructor;b==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x||(p=!1)}return s.delete(e),s.delete(t),p}},function(e,t,n){var r=n(224),i=n(38);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var o=t[n],a=e[o];t[n]=[o,a,r(a)]}return t}},function(e,t,n){var r=n(220),i=n(497),o=n(227),a=n(151),s=n(224),u=n(225),l=n(77);e.exports=function(e,t){return a(e)&&s(t)?u(l(e),t):function(n){var a=i(n,e);return void 0===a&&a===t?o(n,e):r(t,a,3)}}},function(e,t,n){var r=n(150);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},function(e,t,n){var r=n(499),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)})),t}));e.exports=a},function(e,t,n){var r=n(500);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(140);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},function(e,t,n){var r=n(63),i=n(109),o=n(10),a=n(42),s=r?r.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(229),i=n(504),o=n(151),a=n(77);e.exports=function(e){return o(e)?r(a(e)):i(e)}},function(e,t,n){var r=n(150);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(78);e.exports=function(e,t){var n;return r(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}},function(e,t){e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}},function(e,t,n){var r=n(32);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var o=n.length,a=t?o:-1,s=Object(n);(t?a--:++a<o)&&!1!==i(s[a],a,s););return n}}},function(e,t,n){var r=n(78);e.exports=function(e,t){var n=[];return r(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}},function(e,t,n){var r=n(63),i=n(74),o=n(10),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(a&&e&&e[a])}},function(e,t){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},function(e,t,n){var r=n(156),i=n(203),o=n(43),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=a},function(e,t){var n=Date.now;e.exports=function(e){var t=0,r=0;return function(){var i=n(),o=16-(i-r);if(r=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,n){var r=n(222),i=n(514),o=n(518),a=n(223),s=n(519),u=n(149);e.exports=function(e,t,n){var l=-1,c=i,f=e.length,d=!0,h=[],p=h;if(n)d=!1,c=o;else if(f>=200){var v=t?null:s(e);if(v)return u(v);d=!1,c=a,p=new r}else p=t?[]:h;e:for(;++l<f;){var g=e[l],y=t?t(g):g;if(g=n||0!==g?g:0,d&&y==y){for(var m=p.length;m--;)if(p[m]===y)continue e;t&&p.push(y),h.push(g)}else c(p,y,n)||(p!==h&&p.push(y),h.push(g))}return h}},function(e,t,n){var r=n(515);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},function(e,t,n){var r=n(232),i=n(516),o=n(517);e.exports=function(e,t,n){return t==t?o(e,t,n):r(e,i,n)}},function(e,t){e.exports=function(e){return e!=e}},function(e,t){e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}},function(e,t){e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}},function(e,t,n){var r=n(213),i=n(520),o=n(149),a=r&&1/o(new r([,-0]))[1]==1/0?function(e){return new r(e)}:i;e.exports=a},function(e,t){e.exports=function(){}},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(e,"__esModule",{value:!0}),e.ActiveStateStatus=void 0;var i=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t(this,e),r(this,"state",void 0),r(this,"activeStep",void 0),n instanceof e?(this.state=n.state,this.activeStep=n.activeStep):(this.state="off",this.activeStep=-1)}var i,o,a;return i=e,(o=[{key:"setState",value:function(e){this.state=e}},{key:"setActiveAtStep",value:function(e){this.toOn(),this.activeStep=e}},{key:"reset",value:function(){this.toOff(),this.resetActive()}},{key:"resetActive",value:function(){this.activeStep=-1}},{key:"isActiveAtStep",value:function(e){return this.isActive&&this.activeStep===e}},{key:"toOn",value:function(){this.state="on"}},{key:"toFinished",value:function(){this.state="finished"}},{key:"toOff",value:function(){this.state="off"}},{key:"isOn",get:function(){return"on"===this.state}},{key:"isOff",get:function(){return"off"===this.state}},{key:"isFinished",get:function(){return"finished"===this.state}},{key:"isActive",get:function(){return this.isOn&&this.activeStep>0}}])&&n(i.prototype,o),a&&n(i,a),e}();e.ActiveStateStatus=i})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseQuery=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.search,t={},n=("?"===e[0]?e.substr(1):e).split("&"),r=0;r<n.length;r++){var i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1]||"")}return t}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(162),n(112)],void 0===(o="function"==typeof(r=function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0}),e.flatMap=void 0,t=r(t),n=r(n),e.flatMap=function(e,r){return(0,t.default)((0,n.default)(e,r))}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r=n(109),i=n(33),o=n(238),a=n(525),s=n(106),u=n(526),l=n(43);e.exports=function(e,t,n){var c=-1;t=r(t.length?t:[l],s(i));var f=o(e,(function(e,n,i){return{criteria:r(t,(function(t){return t(e)})),index:++c,value:e}}));return a(f,(function(e,t){return u(e,t,n)}))}},function(e,t){e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},function(e,t,n){var r=n(527);e.exports=function(e,t,n){for(var i=-1,o=e.criteria,a=t.criteria,s=o.length,u=n.length;++i<s;){var l=r(o[i],a[i]);if(l)return i>=u?l:l*("desc"==n[i]?-1:1)}return e.index-t.index}},function(e,t,n){var r=n(42);e.exports=function(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e==e,a=r(e),s=void 0!==t,u=null===t,l=t==t,c=r(t);if(!u&&!c&&!a&&e>t||a&&s&&l&&!u&&!c||i&&s&&l||!n&&l||!o)return 1;if(!i&&!a&&!c&&e<t||c&&n&&o&&!i&&!a||u&&n&&o||!s&&o||!l)return-1}return 0}},function(e,t,n){var r=n(42),i=Math.floor,o=Math.min;e.exports=function(e,t,n,a){t=n(t);for(var s=0,u=null==e?0:e.length,l=t!=t,c=null===t,f=r(t),d=void 0===t;s<u;){var h=i((s+u)/2),p=n(e[h]),v=void 0!==p,g=null===p,y=p==p,m=r(p);if(l)var b=a||y;else b=d?y&&(a||v):c?y&&v&&(a||!g):f?y&&v&&!g&&(a||!m):!g&&!m&&(a?p<=t:p<t);b?s=h+1:u=h}return o(u,4294967294)}},function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=n(2),o=n(1),a=n(4);function s(e){this.options=o({},i,e)}s.prototype.run=function(){var e=this.options,t=e.cy,n=e.eles,i=function(e,t){return"function"==typeof t?t.apply(e,[e]):t},o=e.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()};void 0===o.x2&&(o.x2=o.x1+o.w),void 0===o.w&&(o.w=o.x2-o.x1),void 0===o.y2&&(o.y2=o.y1+o.h),void 0===o.h&&(o.h=o.y2-o.y1);var s=new a.graphlib.Graph({multigraph:!0,compound:!0}),u={},l=function(e,t){null!=t&&(u[e]=t)};l("nodesep",e.nodeSep),l("edgesep",e.edgeSep),l("ranksep",e.rankSep),l("rankdir",e.rankDir),l("ranker",e.ranker),s.setGraph(u),s.setDefaultEdgeLabel((function(){return{}})),s.setDefaultNodeLabel((function(){return{}}));for(var c=n.nodes(),f=0;f<c.length;f++){var d=c[f],h=d.layoutDimensions(e);s.setNode(d.id(),{width:h.w,height:h.h,name:d.id()})}for(var p=0;p<c.length;p++){var v=c[p];v.isChild()&&s.setParent(v.id(),v.parent().id())}for(var g=n.edges().stdFilter((function(e){return!e.source().isParent()&&!e.target().isParent()})),y=0;y<g.length;y++){var m=g[y];s.setEdge(m.source().id(),m.target().id(),{minlen:i(m,e.minLen),weight:i(m,e.edgeWeight),name:m.id()},m.id())}a.layout(s);for(var b=s.nodes(),x=0;x<b.length;x++){var w=b[x],S=s.node(w);t.getElementById(w).scratch().dagre=S}var E=void 0;return e.boundingBox?(E={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0},c.forEach((function(e){var t=e.scratch().dagre;E.x1=Math.min(E.x1,t.x),E.x2=Math.max(E.x2,t.x),E.y1=Math.min(E.y1,t.y),E.y2=Math.max(E.y2,t.y)})),E.w=E.x2-E.x1,E.h=E.y2-E.y1):E=o,c.layoutPositions(this,e,(function(t){var n=(t="object"===(void 0===t?"undefined":r(t))?t:this).scratch().dagre;return function(t){if(e.boundingBox){var n=0===E.w?0:(t.x-E.x1)/E.w,r=0===E.h?0:(t.y-E.y1)/E.h;return{x:o.x1+n*o.w,y:o.y1+r*o.h}}return t}({x:n.x,y:n.y})})),this},e.exports=s},function(e,t,n){"use strict";e.exports=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.forEach((function(t){Object.keys(t).forEach((function(n){return e[n]=t[n]}))})),e}},function(e,t,n){"use strict";var r={nodeSep:void 0,edgeSep:void 0,rankSep:void 0,rankDir:void 0,ranker:void 0,minLen:function(e){return 1},edgeWeight:function(e){return 1},fit:!0,padding:30,spacingFactor:void 0,nodeDimensionsIncludeLabels:!1,animate:!1,animateFilter:function(e,t){return!0},animationDuration:500,animationEasing:void 0,boundingBox:void 0,transform:function(e,t){return t},ready:function(){},stop:function(){}};e.exports=r},function(e,t,n){"use strict";var r=n(0),i=function(e){e&&e("layout","dagre",r)};"undefined"!=typeof cytoscape&&i(cytoscape),e.exports=i},function(t,n){t.exports=e}])},e.exports=r(n(530))},function(e,t,n){e.exports={graphlib:n(24),layout:n(556),debug:n(605),util:{time:n(13).time,notime:n(13).notime},version:n(606)}},function(e,t,n){var r=n(532);e.exports={Graph:r.Graph,json:n(546),alg:n(547),version:r.version}},function(e,t,n){e.exports={Graph:n(163),version:n(545)}},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e,t){return null!=e&&n.call(e,t)}},function(e,t,n){var r=n(145),i=n(68),o=n(74),a=n(10),s=n(32),u=n(66),l=n(76),c=n(75),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||c(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(l(e))return!r(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}},function(e,t){e.exports=function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}},function(e,t){e.exports=function(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}},function(e,t,n){var r=n(145),i=n(68),o=n(32),a=n(538),s=n(539);e.exports=function(e){if(null==e)return 0;if(o(e))return a(e)?s(e):e.length;var t=i(e);return"[object Map]"==t||"[object Set]"==t?e.size:r(e).length}},function(e,t,n){var r=n(53),i=n(10),o=n(31);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(540),i=n(541),o=n(542);e.exports=function(e){return i(e)?o(e):r(e)}},function(e,t,n){var r=n(229)("length");e.exports=r},function(e,t){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return n.test(e)}},function(e,t){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+r+"|"+i+")"+"?",l="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[o,a,s].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),c="(?:"+[o+r+"?",r,a,s,n].join("|")+")",f=RegExp(i+"(?="+i+")|"+c+l,"g");e.exports=function(e){for(var t=f.lastIndex=0;f.test(e);)++t;return t}},function(e,t,n){var r=n(141),i=n(217),o=n(152),a=n(33),s=n(107),u=n(10),l=n(66),c=n(72),f=n(16),d=n(75);e.exports=function(e,t,n){var h=u(e),p=h||l(e)||d(e);if(t=a(t,4),null==n){var v=e&&e.constructor;n=p?h?new v:[]:f(e)&&c(v)?i(s(e)):{}}return(p?r:o)(e,(function(e,r,i){return t(n,e,r,i)})),n}},function(e,t,n){var r=n(109);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},function(e,t){e.exports="2.1.8"},function(e,t,n){var r=n(21),i=n(163);function o(e){return r.map(e.nodes(),(function(t){var n=e.node(t),i=e.parent(t),o={v:t};return r.isUndefined(n)||(o.value=n),r.isUndefined(i)||(o.parent=i),o}))}function a(e){return r.map(e.edges(),(function(t){var n=e.edge(t),i={v:t.v,w:t.w};return r.isUndefined(t.name)||(i.name=t.name),r.isUndefined(n)||(i.value=n),i}))}e.exports={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:o(e),edges:a(e)};r.isUndefined(e.graph())||(t.value=r.clone(e.graph()));return t},read:function(e){var t=new i(e.options).setGraph(e.value);return r.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),r.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}}},function(e,t,n){e.exports={components:n(548),dijkstra:n(250),dijkstraAll:n(549),findCycles:n(550),floydWarshall:n(551),isAcyclic:n(552),postorder:n(553),preorder:n(554),prim:n(555),tarjan:n(252),topsort:n(253)}},function(e,t,n){var r=n(21);e.exports=function(e){var t,n={},i=[];function o(i){r.has(n,i)||(n[i]=!0,t.push(i),r.each(e.successors(i),o),r.each(e.predecessors(i),o))}return r.each(e.nodes(),(function(e){t=[],o(e),t.length&&i.push(t)})),i}},function(e,t,n){var r=n(250),i=n(21);e.exports=function(e,t,n){return i.transform(e.nodes(),(function(i,o){i[o]=r(e,o,t,n)}),{})}},function(e,t,n){var r=n(21),i=n(252);e.exports=function(e){return r.filter(i(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))}},function(e,t,n){var r=n(21);e.exports=function(e,t,n){return function(e,t,n){var r={},i=e.nodes();return i.forEach((function(e){r[e]={},r[e][e]={distance:0},i.forEach((function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})})),n(e).forEach((function(n){var i=n.v===e?n.w:n.v,o=t(n);r[e][i]={distance:o,predecessor:e}}))})),i.forEach((function(e){var t=r[e];i.forEach((function(n){var o=r[n];i.forEach((function(n){var r=o[e],i=t[n],a=o[n],s=r.distance+i.distance;s<a.distance&&(a.distance=s,a.predecessor=i.predecessor)}))}))})),r}(e,t||i,n||function(t){return e.outEdges(t)})};var i=r.constant(1)},function(e,t,n){var r=n(253);e.exports=function(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}},function(e,t,n){var r=n(254);e.exports=function(e,t){return r(e,t,"post")}},function(e,t,n){var r=n(254);e.exports=function(e,t){return r(e,t,"pre")}},function(e,t,n){var r=n(21),i=n(163),o=n(251);e.exports=function(e,t){var n,a=new i,s={},u=new o;function l(e){var r=e.v===n?e.w:e.v,i=u.priority(r);if(void 0!==i){var o=t(e);o<i&&(s[r]=n,u.decrease(r,o))}}if(0===e.nodeCount())return a;r.each(e.nodes(),(function(e){u.add(e,Number.POSITIVE_INFINITY),a.setNode(e)})),u.decrease(e.nodes()[0],0);var c=!1;for(;u.size()>0;){if(n=u.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(c)throw new Error("Input graph is not connected: "+e);c=!0}e.nodeEdges(n).forEach(l)}return a}},function(e,t,n){"use strict";var r=n(6),i=n(584),o=n(587),a=n(588),s=n(13).normalizeRanks,u=n(590),l=n(13).removeEmptyRanks,c=n(591),f=n(592),d=n(593),h=n(594),p=n(603),v=n(13),g=n(24).Graph;e.exports=function(e,t){var n=t&&t.debugTiming?v.time:v.notime;n("layout",(function(){var t=n("  buildLayoutGraph",(function(){return function(e){var t=new g({multigraph:!0,compound:!0}),n=T(e.graph());return t.setGraph(r.merge({},m,_(n,y),r.pick(n,b))),r.forEach(e.nodes(),(function(n){var i=T(e.node(n));t.setNode(n,r.defaults(_(i,x),w)),t.setParent(n,e.parent(n))})),r.forEach(e.edges(),(function(n){var i=T(e.edge(n));t.setEdge(n,r.merge({},E,_(i,S),r.pick(i,k)))})),t}(e)}));n("  runLayout",(function(){!function(e,t){t("    makeSpaceForEdgeLabels",(function(){!function(e){var t=e.graph();t.ranksep/=2,r.forEach(e.edges(),(function(n){var r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(e)})),t("    removeSelfEdges",(function(){!function(e){r.forEach(e.edges(),(function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}}))}(e)})),t("    acyclic",(function(){i.run(e)})),t("    nestingGraph.run",(function(){c.run(e)})),t("    rank",(function(){a(v.asNonCompoundGraph(e))})),t("    injectEdgeLabelProxies",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),i={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};v.addDummyNode(e,"edge-proxy",i,"_ep")}}))}(e)})),t("    removeEmptyRanks",(function(){l(e)})),t("    nestingGraph.cleanup",(function(){c.cleanup(e)})),t("    normalizeRanks",(function(){s(e)})),t("    assignRankMinMax",(function(){!function(e){var t=0;r.forEach(e.nodes(),(function(n){var i=e.node(n);i.borderTop&&(i.minRank=e.node(i.borderTop).rank,i.maxRank=e.node(i.borderBottom).rank,t=r.max(t,i.maxRank))})),e.graph().maxRank=t}(e)})),t("    removeEdgeLabelProxies",(function(){!function(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))}))}(e)})),t("    normalize.run",(function(){o.run(e)})),t("    parentDummyChains",(function(){u(e)})),t("    addBorderSegments",(function(){f(e)})),t("    order",(function(){h(e)})),t("    insertSelfEdges",(function(){!function(e){var t=v.buildLayerMatrix(e);r.forEach(t,(function(t){var n=0;r.forEach(t,(function(t,i){var o=e.node(t);o.order=i+n,r.forEach(o.selfEdges,(function(t){v.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:o.rank,order:i+ ++n,e:t.e,label:t.label},"_se")})),delete o.selfEdges}))}))}(e)})),t("    adjustCoordinateSystem",(function(){d.adjust(e)})),t("    position",(function(){p(e)})),t("    positionSelfEdges",(function(){!function(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*a/3,y:o-s},{x:i+5*a/6,y:o-s},{x:i+a,y:o},{x:i+5*a/6,y:o+s},{x:i+2*a/3,y:o+s}],n.label.x=n.x,n.label.y=n.y}}))}(e)})),t("    removeBorderNodes",(function(){!function(e){r.forEach(e.nodes(),(function(t){if(e.children(t).length){var n=e.node(t),i=e.node(n.borderTop),o=e.node(n.borderBottom),a=e.node(r.last(n.borderLeft)),s=e.node(r.last(n.borderRight));n.width=Math.abs(s.x-a.x),n.height=Math.abs(o.y-i.y),n.x=a.x+n.width/2,n.y=i.y+n.height/2}})),r.forEach(e.nodes(),(function(t){"border"===e.node(t).dummy&&e.removeNode(t)}))}(e)})),t("    normalize.undo",(function(){o.undo(e)})),t("    fixupEdgeLabelCoords",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(e)})),t("    undoCoordinateSystem",(function(){d.undo(e)})),t("    translateGraph",(function(){!function(e){var t=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,o=0,a=e.graph(),s=a.marginx||0,u=a.marginy||0;function l(e){var r=e.x,a=e.y,s=e.width,u=e.height;t=Math.min(t,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,a-u/2),o=Math.max(o,a+u/2)}r.forEach(e.nodes(),(function(t){l(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.has(n,"x")&&l(n)})),t-=s,i-=u,r.forEach(e.nodes(),(function(n){var r=e.node(n);r.x-=t,r.y-=i})),r.forEach(e.edges(),(function(n){var o=e.edge(n);r.forEach(o.points,(function(e){e.x-=t,e.y-=i})),r.has(o,"x")&&(o.x-=t),r.has(o,"y")&&(o.y-=i)})),a.width=n-t+s,a.height=o-i+u}(e)})),t("    assignNodeIntersects",(function(){!function(e){r.forEach(e.edges(),(function(t){var n,r,i=e.edge(t),o=e.node(t.v),a=e.node(t.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=a,r=o),i.points.unshift(v.intersectRect(o,n)),i.points.push(v.intersectRect(a,r))}))}(e)})),t("    reversePoints",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);n.reversed&&n.points.reverse()}))}(e)})),t("    acyclic.undo",(function(){i.undo(e)}))}(t,n)})),n("  updateInputGraph",(function(){!function(e,t){r.forEach(e.nodes(),(function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(e.edges(),(function(n){var i=e.edge(n),o=t.edge(n);i.points=o.points,r.has(o,"x")&&(i.x=o.x,i.y=o.y)})),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(e,t)}))}))};var y=["nodesep","edgesep","ranksep","marginx","marginy"],m={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],x=["width","height"],w={width:0,height:0},S=["minlen","weight","width","height","labeloffset"],E={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},k=["labelpos"];function _(e,t){return r.mapValues(r.pick(e,t),Number)}function T(e){var t={};return r.forEach(e,(function(e,n){t[n.toLowerCase()]=e})),t}},function(e,t,n){var r=n(80),i=n(54),o=n(79),a=n(67),s=Object.prototype,u=s.hasOwnProperty,l=r((function(e,t){e=Object(e);var n=-1,r=t.length,l=r>2?t[2]:void 0;for(l&&o(t[0],t[1],l)&&(r=1);++n<r;)for(var c=t[n],f=a(c),d=-1,h=f.length;++d<h;){var p=f[d],v=e[p];(void 0===v||i(v,s[p])&&!u.call(e,p))&&(e[p]=c[p])}return e}));e.exports=l},function(e,t,n){var r=n(559)(n(560));e.exports=r},function(e,t,n){var r=n(33),i=n(32),o=n(38);e.exports=function(e){return function(t,n,a){var s=Object(t);if(!i(t)){var u=r(n,3);t=o(t),n=function(e){return u(s[e],e,s)}}var l=e(t,n,a);return l>-1?s[u?t[l]:l]:void 0}}},function(e,t,n){var r=n(232),i=n(33),o=n(561),a=Math.max;e.exports=function(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var u=null==n?0:o(n);return u<0&&(u=a(s+u,0)),r(e,i(t,3),u)}},function(e,t,n){var r=n(255);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},function(e,t,n){var r=n(153),i=n(246),o=n(67);e.exports=function(e,t){return null==e?e:r(e,i(t),o)}},function(e,t,n){var r=n(104),i=n(152),o=n(33);e.exports=function(e,t){var n={};return t=o(t,3),i(e,(function(e,i,o){r(n,i,t(e,i,o))})),n}},function(e,t,n){var r=n(165),i=n(565),o=n(43);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},function(e,t){e.exports=function(e,t){return e>t}},function(e,t,n){var r=n(567),i=n(240)((function(e,t,n){r(e,t,n)}));e.exports=i},function(e,t,n){var r=n(99),i=n(256),o=n(153),a=n(568),s=n(16),u=n(67),l=n(257);e.exports=function e(t,n,c,f,d){t!==n&&o(n,(function(o,u){if(d||(d=new r),s(o))a(t,n,u,c,e,f,d);else{var h=f?f(l(t,u),o,u+"",t,n,d):void 0;void 0===h&&(h=o),i(t,u,h)}}),u)}},function(e,t,n){var r=n(256),i=n(206),o=n(215),a=n(207),s=n(216),u=n(74),l=n(10),c=n(233),f=n(66),d=n(72),h=n(16),p=n(569),v=n(75),g=n(257),y=n(570);e.exports=function(e,t,n,m,b,x,w){var S=g(e,n),E=g(t,n),k=w.get(E);if(k)r(e,n,k);else{var _=x?x(S,E,n+"",e,t,w):void 0,T=void 0===_;if(T){var C=l(E),P=!C&&f(E),D=!C&&!P&&v(E);_=E,C||P||D?l(S)?_=S:c(S)?_=a(S):P?(T=!1,_=i(E,!0)):D?(T=!1,_=o(E,!0)):_=[]:p(E)||u(E)?(_=S,u(S)?_=y(S):h(S)&&!d(S)||(_=s(E))):T=!1}T&&(w.set(E,_),b(_,E,m,x,w),w.delete(E)),r(e,n,_)}}},function(e,t,n){var r=n(53),i=n(107),o=n(31),a=Function.prototype,s=Object.prototype,u=a.toString,l=s.hasOwnProperty,c=u.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==c}},function(e,t,n){var r=n(65),i=n(67);e.exports=function(e){return r(e,i(e))}},function(e,t,n){var r=n(165),i=n(258),o=n(43);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},function(e,t,n){var r=n(165),i=n(33),o=n(258);e.exports=function(e,t){return e&&e.length?r(e,i(t,2),o):void 0}},function(e,t,n){var r=n(574),i=n(577)((function(e,t){return null==e?{}:r(e,t)}));e.exports=i},function(e,t,n){var r=n(575),i=n(227);e.exports=function(e,t){return r(e,t,(function(t,n){return i(e,n)}))}},function(e,t,n){var r=n(150),i=n(576),o=n(108);e.exports=function(e,t,n){for(var a=-1,s=t.length,u={};++a<s;){var l=t[a],c=r(e,l);n(c,l)&&i(u,o(l,e),c)}return u}},function(e,t,n){var r=n(73),i=n(108),o=n(105),a=n(16),s=n(77);e.exports=function(e,t,n,u){if(!a(e))return e;for(var l=-1,c=(t=i(t,e)).length,f=c-1,d=e;null!=d&&++l<c;){var h=s(t[l]),p=n;if(l!=f){var v=d[h];void 0===(p=u?u(v,h,d):void 0)&&(p=a(v)?v:o(t[l+1])?[]:{})}r(d,h,p),d=d[h]}return e}},function(e,t,n){var r=n(162),i=n(230),o=n(231);e.exports=function(e){return o(i(e,void 0,r),e+"")}},function(e,t,n){var r=n(579)();e.exports=r},function(e,t,n){var r=n(580),i=n(79),o=n(255);e.exports=function(e){return function(t,n,a){return a&&"number"!=typeof a&&i(t,n,a)&&(n=a=void 0),t=o(t),void 0===n?(n=t,t=0):n=o(n),a=void 0===a?t<n?1:-1:o(a),r(t,n,a,e)}}},function(e,t){var n=Math.ceil,r=Math.max;e.exports=function(e,t,i,o){for(var a=-1,s=r(n((t-e)/(i||1)),0),u=Array(s);s--;)u[o?s:++a]=e,e+=i;return u}},function(e,t,n){var r=n(226),i=0;e.exports=function(e){var t=++i;return r(e)+t}},function(e,t,n){var r=n(73),i=n(583);e.exports=function(e,t){return i(e||[],t||[],r)}},function(e,t){e.exports=function(e,t,n){for(var r=-1,i=e.length,o=t.length,a={};++r<i;){var s=r<o?t[r]:void 0;n(a,e[r],s)}return a}},function(e,t,n){"use strict";var r=n(6),i=n(585);e.exports={run:function(e){var t="greedy"===e.graph().acyclicer?i(e,function(e){return function(t){return e.edge(t).weight}}(e)):function(e){var t=[],n={},i={};function o(a){r.has(i,a)||(i[a]=!0,n[a]=!0,r.forEach(e.outEdges(a),(function(e){r.has(n,e.w)?t.push(e):o(e.w)})),delete n[a])}return r.forEach(e.nodes(),o),t}(e);r.forEach(t,(function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r.uniqueId("rev"))}))},undo:function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}}))}}},function(e,t,n){var r=n(6),i=n(24).Graph,o=n(586);e.exports=function(e,t){if(e.nodeCount()<=1)return[];var n=function(e,t){var n=new i,a=0,s=0;r.forEach(e.nodes(),(function(e){n.setNode(e,{v:e,in:0,out:0})})),r.forEach(e.edges(),(function(e){var r=n.edge(e.v,e.w)||0,i=t(e),o=r+i;n.setEdge(e.v,e.w,o),s=Math.max(s,n.node(e.v).out+=i),a=Math.max(a,n.node(e.w).in+=i)}));var l=r.range(s+a+3).map((function(){return new o})),c=a+1;return r.forEach(n.nodes(),(function(e){u(l,c,n.node(e))})),{graph:n,buckets:l,zeroIdx:c}}(e,t||a),l=function(e,t,n){var r,i=[],o=t[t.length-1],a=t[0];for(;e.nodeCount();){for(;r=a.dequeue();)s(e,t,n,r);for(;r=o.dequeue();)s(e,t,n,r);if(e.nodeCount())for(var u=t.length-2;u>0;--u)if(r=t[u].dequeue()){i=i.concat(s(e,t,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(l,(function(t){return e.outEdges(t.v,t.w)})),!0)};var a=r.constant(1);function s(e,t,n,i,o){var a=o?[]:void 0;return r.forEach(e.inEdges(i.v),(function(r){var i=e.edge(r),s=e.node(r.v);o&&a.push({v:r.v,w:r.w}),s.out-=i,u(t,n,s)})),r.forEach(e.outEdges(i.v),(function(r){var i=e.edge(r),o=r.w,a=e.node(o);a.in-=i,u(t,n,a)})),e.removeNode(i.v),a}function u(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},function(e,t){function n(){var e={};e._next=e._prev=e,this._sentinel=e}function r(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function i(e,t){if("_next"!==e&&"_prev"!==e)return t}e.exports=n,n.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return r(t),t},n.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&r(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},n.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,i)),n=n._prev;return"["+e.join(", ")+"]"}},function(e,t,n){"use strict";var r=n(6),i=n(13);e.exports={run:function(e){e.graph().dummyChains=[],r.forEach(e.edges(),(function(t){!function(e,t){var n,r,o,a=t.v,s=e.node(a).rank,u=t.w,l=e.node(u).rank,c=t.name,f=e.edge(t),d=f.labelRank;if(l===s+1)return;for(e.removeEdge(t),o=0,++s;s<l;++o,++s)f.points=[],r={width:0,height:0,edgeLabel:f,edgeObj:t,rank:s},n=i.addDummyNode(e,"edge",r,"_d"),s===d&&(r.width=f.width,r.height=f.height,r.dummy="edge-label",r.labelpos=f.labelpos),e.setEdge(a,n,{weight:f.weight},c),0===o&&e.graph().dummyChains.push(n),a=n;e.setEdge(a,u,{weight:f.weight},c)}(e,t)}))},undo:function(e){r.forEach(e.graph().dummyChains,(function(t){var n,r=e.node(t),i=r.edgeLabel;for(e.setEdge(r.edgeObj,i);r.dummy;)n=e.successors(t)[0],e.removeNode(t),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),t=n,r=e.node(t)}))}}},function(e,t,n){"use strict";var r=n(115).longestPath,i=n(259),o=n(589);e.exports=function(e){switch(e.graph().ranker){case"network-simplex":s(e);break;case"tight-tree":!function(e){r(e),i(e)}(e);break;case"longest-path":a(e);break;default:s(e)}};var a=r;function s(e){o(e)}},function(e,t,n){"use strict";var r=n(6),i=n(259),o=n(115).slack,a=n(115).longestPath,s=n(24).alg.preorder,u=n(24).alg.postorder,l=n(13).simplify;function c(e){e=l(e),a(e);var t,n=i(e);for(h(n),f(n,e);t=v(n);)y(n,e,t,g(n,e,t))}function f(e,t){var n=u(e,e.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=d(e,t,n)}(e,t,n)}))}function d(e,t,n){var i=e.node(n).parent,o=!0,a=t.edge(n,i),s=0;return a||(o=!1,a=t.edge(i,n)),s=a.weight,r.forEach(t.nodeEdges(n),(function(r){var a,u,l=r.v===n,c=l?r.w:r.v;if(c!==i){var f=l===o,d=t.edge(r).weight;if(s+=f?d:-d,a=n,u=c,e.hasEdge(a,u)){var h=e.edge(n,c).cutvalue;s+=f?-h:h}}})),s}function h(e,t){arguments.length<2&&(t=e.nodes()[0]),p(e,{},1,t)}function p(e,t,n,i,o){var a=n,s=e.node(i);return t[i]=!0,r.forEach(e.neighbors(i),(function(o){r.has(t,o)||(n=p(e,t,n,o,i))})),s.low=a,s.lim=n++,o?s.parent=o:delete s.parent,n}function v(e){return r.find(e.edges(),(function(t){return e.edge(t).cutvalue<0}))}function g(e,t,n){var i=n.v,a=n.w;t.hasEdge(i,a)||(i=n.w,a=n.v);var s=e.node(i),u=e.node(a),l=s,c=!1;s.lim>u.lim&&(l=u,c=!0);var f=r.filter(t.edges(),(function(t){return c===m(e,e.node(t.v),l)&&c!==m(e,e.node(t.w),l)}));return r.minBy(f,(function(e){return o(t,e)}))}function y(e,t,n,i){var o=n.v,a=n.w;e.removeEdge(o,a),e.setEdge(i.v,i.w,{}),h(e),f(e,t),function(e,t){var n=r.find(e.nodes(),(function(e){return!t.node(e).parent})),i=s(e,n);i=i.slice(1),r.forEach(i,(function(n){var r=e.node(n).parent,i=t.edge(n,r),o=!1;i||(i=t.edge(r,n),o=!0),t.node(n).rank=t.node(r).rank+(o?i.minlen:-i.minlen)}))}(e,t)}function m(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}e.exports=c,c.initLowLimValues=h,c.initCutValues=f,c.calcCutValue=d,c.leaveEdge=v,c.enterEdge=g,c.exchangeEdges=y},function(e,t,n){var r=n(6);e.exports=function(e){var t=function(e){var t={},n=0;function i(o){var a=n;r.forEach(e.children(o),i),t[o]={low:a,lim:n++}}return r.forEach(e.children(),i),t}(e);r.forEach(e.graph().dummyChains,(function(n){for(var r=e.node(n),i=r.edgeObj,o=function(e,t,n,r){var i,o,a=[],s=[],u=Math.min(t[n].low,t[r].low),l=Math.max(t[n].lim,t[r].lim);i=n;do{i=e.parent(i),a.push(i)}while(i&&(t[i].low>u||l>t[i].lim));o=i,i=r;for(;(i=e.parent(i))!==o;)s.push(i);return{path:a.concat(s.reverse()),lca:o}}(e,t,i.v,i.w),a=o.path,s=o.lca,u=0,l=a[u],c=!0;n!==i.w;){if(r=e.node(n),c){for(;(l=a[u])!==s&&e.node(l).maxRank<r.rank;)u++;l===s&&(c=!1)}if(!c){for(;u<a.length-1&&e.node(l=a[u+1]).minRank<=r.rank;)u++;l=a[u]}e.setParent(n,l),n=e.successors(n)[0]}}))}},function(e,t,n){var r=n(6),i=n(13);e.exports={run:function(e){var t=i.addDummyNode(e,"root",{},"_root"),n=function(e){var t={};return r.forEach(e.children(),(function(n){!function n(i,o){var a=e.children(i);a&&a.length&&r.forEach(a,(function(e){n(e,o+1)}));t[i]=o}(n,1)})),t}(e),o=r.max(r.values(n))-1,a=2*o+1;e.graph().nestingRoot=t,r.forEach(e.edges(),(function(t){e.edge(t).minlen*=a}));var s=function(e){return r.reduce(e.edges(),(function(t,n){return t+e.edge(n).weight}),0)}(e)+1;r.forEach(e.children(),(function(u){!function e(t,n,o,a,s,u,l){var c=t.children(l);if(!c.length)return void(l!==n&&t.setEdge(n,l,{weight:0,minlen:o}));var f=i.addBorderNode(t,"_bt"),d=i.addBorderNode(t,"_bb"),h=t.node(l);t.setParent(f,l),h.borderTop=f,t.setParent(d,l),h.borderBottom=d,r.forEach(c,(function(r){e(t,n,o,a,s,u,r);var i=t.node(r),c=i.borderTop?i.borderTop:r,h=i.borderBottom?i.borderBottom:r,p=i.borderTop?a:2*a,v=c!==h?1:s-u[l]+1;t.setEdge(f,c,{weight:p,minlen:v,nestingEdge:!0}),t.setEdge(h,d,{weight:p,minlen:v,nestingEdge:!0})})),t.parent(l)||t.setEdge(n,f,{weight:0,minlen:s+u[l]})}(e,t,a,s,o,n,u)})),e.graph().nodeRankFactor=a},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,r.forEach(e.edges(),(function(t){e.edge(t).nestingEdge&&e.removeEdge(t)}))}}},function(e,t,n){var r=n(6),i=n(13);function o(e,t,n,r,o,a){var s={width:0,height:0,rank:a,borderType:t},u=o[t][a-1],l=i.addDummyNode(e,"border",s,n);o[t][a]=l,e.setParent(l,r),u&&e.setEdge(u,l,{weight:1})}e.exports=function(e){r.forEach(e.children(),(function t(n){var i=e.children(n),a=e.node(n);if(i.length&&r.forEach(i,t),r.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var s=a.minRank,u=a.maxRank+1;s<u;++s)o(e,"borderLeft","_bl",n,a,s),o(e,"borderRight","_br",n,a,s)}}))}},function(e,t,n){"use strict";var r=n(6);function i(e){r.forEach(e.nodes(),(function(t){o(e.node(t))})),r.forEach(e.edges(),(function(t){o(e.edge(t))}))}function o(e){var t=e.width;e.width=e.height,e.height=t}function a(e){e.y=-e.y}function s(e){var t=e.x;e.x=e.y,e.y=t}e.exports={adjust:function(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||i(e)},undo:function(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||function(e){r.forEach(e.nodes(),(function(t){a(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,a),r.has(n,"y")&&a(n)}))}(e);"lr"!==t&&"rl"!==t||(!function(e){r.forEach(e.nodes(),(function(t){s(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,s),r.has(n,"x")&&s(n)}))}(e),i(e))}}},function(e,t,n){"use strict";var r=n(6),i=n(595),o=n(596),a=n(597),s=n(601),u=n(602),l=n(24).Graph,c=n(13);function f(e,t,n){return r.map(t,(function(t){return s(e,t,n)}))}function d(e,t){var n=new l;r.forEach(e,(function(e){var i=e.graph().root,o=a(e,i,n,t);r.forEach(o.vs,(function(t,n){e.node(t).order=n})),u(e,n,o.vs)}))}function h(e,t){r.forEach(t,(function(t){r.forEach(t,(function(t,n){e.node(t).order=n}))}))}e.exports=function(e){var t=c.maxRank(e),n=f(e,r.range(1,t+1),"inEdges"),a=f(e,r.range(t-1,-1,-1),"outEdges"),s=i(e);h(e,s);for(var u,l=Number.POSITIVE_INFINITY,p=0,v=0;v<4;++p,++v){d(p%2?n:a,p%4>=2),s=c.buildLayerMatrix(e);var g=o(e,s);g<l&&(v=0,u=r.cloneDeep(s),l=g)}h(e,u)}},function(e,t,n){"use strict";var r=n(6);e.exports=function(e){var t={},n=r.filter(e.nodes(),(function(t){return!e.children(t).length})),i=r.max(r.map(n,(function(t){return e.node(t).rank}))),o=r.map(r.range(i+1),(function(){return[]}));var a=r.sortBy(n,(function(t){return e.node(t).rank}));return r.forEach(a,(function n(i){if(r.has(t,i))return;t[i]=!0;var a=e.node(i);o[a.rank].push(i),r.forEach(e.successors(i),n)})),o}},function(e,t,n){"use strict";var r=n(6);function i(e,t,n){for(var i=r.zipObject(n,r.map(n,(function(e,t){return t}))),o=r.flatten(r.map(t,(function(t){return r.sortBy(r.map(e.outEdges(t),(function(t){return{pos:i[t.w],weight:e.edge(t).weight}})),"pos")})),!0),a=1;a<n.length;)a<<=1;var s=2*a-1;a-=1;var u=r.map(new Array(s),(function(){return 0})),l=0;return r.forEach(o.forEach((function(e){var t=e.pos+a;u[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=u[t+1]),u[t=t-1>>1]+=e.weight;l+=e.weight*n}))),l}e.exports=function(e,t){for(var n=0,r=1;r<t.length;++r)n+=i(e,t[r-1],t[r]);return n}},function(e,t,n){var r=n(6),i=n(598),o=n(599),a=n(600);e.exports=function e(t,n,s,u){var l=t.children(n),c=t.node(n),f=c?c.borderLeft:void 0,d=c?c.borderRight:void 0,h={};f&&(l=r.filter(l,(function(e){return e!==f&&e!==d})));var p=i(t,l);r.forEach(p,(function(n){if(t.children(n.v).length){var i=e(t,n.v,s,u);h[n.v]=i,r.has(i,"barycenter")&&(o=n,a=i,r.isUndefined(o.barycenter)?(o.barycenter=a.barycenter,o.weight=a.weight):(o.barycenter=(o.barycenter*o.weight+a.barycenter*a.weight)/(o.weight+a.weight),o.weight+=a.weight))}var o,a}));var v=o(p,s);!function(e,t){r.forEach(e,(function(e){e.vs=r.flatten(e.vs.map((function(e){return t[e]?t[e].vs:e})),!0)}))}(v,h);var g=a(v,u);if(f&&(g.vs=r.flatten([f,g.vs,d],!0),t.predecessors(f).length)){var y=t.node(t.predecessors(f)[0]),m=t.node(t.predecessors(d)[0]);r.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+y.order+m.order)/(g.weight+2),g.weight+=2}return g}},function(e,t,n){var r=n(6);e.exports=function(e,t){return r.map(t,(function(t){var n=e.inEdges(t);if(n.length){var i=r.reduce(n,(function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}}),{sum:0,weight:0});return{v:t,barycenter:i.sum/i.weight,weight:i.weight}}return{v:t}}))}},function(e,t,n){"use strict";var r=n(6);e.exports=function(e,t){var n={};return r.forEach(e,(function(e,t){var i=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};r.isUndefined(e.barycenter)||(i.barycenter=e.barycenter,i.weight=e.weight)})),r.forEach(t.edges(),(function(e){var t=n[e.v],i=n[e.w];r.isUndefined(t)||r.isUndefined(i)||(i.indegree++,t.out.push(n[e.w]))})),function(e){var t=[];function n(e){return function(t){t.merged||(r.isUndefined(t.barycenter)||r.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&function(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}function i(t){return function(n){n.in.push(t),0==--n.indegree&&e.push(n)}}for(;e.length;){var o=e.pop();t.push(o),r.forEach(o.in.reverse(),n(o)),r.forEach(o.out,i(o))}return r.map(r.filter(t,(function(e){return!e.merged})),(function(e){return r.pick(e,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(e){return!e.indegree})))}},function(e,t,n){var r=n(6),i=n(13);function o(e,t,n){for(var i;t.length&&(i=r.last(t)).i<=n;)t.pop(),e.push(i.vs),n++;return n}e.exports=function(e,t){var n=i.partition(e,(function(e){return r.has(e,"barycenter")})),a=n.lhs,s=r.sortBy(n.rhs,(function(e){return-e.i})),u=[],l=0,c=0,f=0;a.sort((d=!!t,function(e,t){return e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:d?t.i-e.i:e.i-t.i})),f=o(u,s,f),r.forEach(a,(function(e){f+=e.vs.length,u.push(e.vs),l+=e.barycenter*e.weight,c+=e.weight,f=o(u,s,f)}));var d;var h={vs:r.flatten(u,!0)};c&&(h.barycenter=l/c,h.weight=c);return h}},function(e,t,n){var r=n(6),i=n(24).Graph;e.exports=function(e,t,n){var o=function(e){var t;for(;e.hasNode(t=r.uniqueId("_root")););return t}(e),a=new i({compound:!0}).setGraph({root:o}).setDefaultNodeLabel((function(t){return e.node(t)}));return r.forEach(e.nodes(),(function(i){var s=e.node(i),u=e.parent(i);(s.rank===t||s.minRank<=t&&t<=s.maxRank)&&(a.setNode(i),a.setParent(i,u||o),r.forEach(e[n](i),(function(t){var n=t.v===i?t.w:t.v,o=a.edge(n,i),s=r.isUndefined(o)?0:o.weight;a.setEdge(n,i,{weight:e.edge(t).weight+s})})),r.has(s,"minRank")&&a.setNode(i,{borderLeft:s.borderLeft[t],borderRight:s.borderRight[t]}))})),a}},function(e,t,n){var r=n(6);e.exports=function(e,t,n){var i,o={};r.forEach(n,(function(n){for(var r,a,s=e.parent(n);s;){if((r=e.parent(s))?(a=o[r],o[r]=s):(a=i,i=s),a&&a!==s)return void t.setEdge(a,s);s=r}}))}},function(e,t,n){"use strict";var r=n(6),i=n(13),o=n(604).positionX;e.exports=function(e){(function(e){var t=i.buildLayerMatrix(e),n=e.graph().ranksep,o=0;r.forEach(t,(function(t){var i=r.max(r.map(t,(function(t){return e.node(t).height})));r.forEach(t,(function(t){e.node(t).y=o+i/2})),o+=i+n}))})(e=i.asNonCompoundGraph(e)),r.forEach(o(e),(function(t,n){e.node(n).x=t}))}},function(e,t,n){"use strict";var r=n(6),i=n(24).Graph,o=n(13);function a(e,t){var n={};return r.reduce(t,(function(t,i){var o=0,a=0,s=t.length,l=r.last(i);return r.forEach(i,(function(t,c){var f=function(e,t){if(e.node(t).dummy)return r.find(e.predecessors(t),(function(t){return e.node(t).dummy}))}(e,t),d=f?e.node(f).order:s;(f||t===l)&&(r.forEach(i.slice(a,c+1),(function(t){r.forEach(e.predecessors(t),(function(r){var i=e.node(r),a=i.order;!(a<o||d<a)||i.dummy&&e.node(t).dummy||u(n,r,t)}))})),a=c+1,o=d)})),i})),n}function s(e,t){var n={};function i(t,i,o,a,s){var l;r.forEach(r.range(i,o),(function(i){l=t[i],e.node(l).dummy&&r.forEach(e.predecessors(l),(function(t){var r=e.node(t);r.dummy&&(r.order<a||r.order>s)&&u(n,t,l)}))}))}return r.reduce(t,(function(t,n){var o,a=-1,s=0;return r.forEach(n,(function(r,u){if("border"===e.node(r).dummy){var l=e.predecessors(r);l.length&&(o=e.node(l[0]).order,i(n,s,u,a,o),s=u,a=o)}i(n,s,n.length,o,t.length)})),n})),n}function u(e,t,n){if(t>n){var r=t;t=n,n=r}var i=e[t];i||(e[t]=i={}),i[n]=!0}function l(e,t,n){if(t>n){var i=t;t=n,n=i}return r.has(e[t],n)}function c(e,t,n,i){var o={},a={},s={};return r.forEach(t,(function(e){r.forEach(e,(function(e,t){o[e]=e,a[e]=e,s[e]=t}))})),r.forEach(t,(function(e){var t=-1;r.forEach(e,(function(e){var u=i(e);if(u.length)for(var c=((u=r.sortBy(u,(function(e){return s[e]}))).length-1)/2,f=Math.floor(c),d=Math.ceil(c);f<=d;++f){var h=u[f];a[e]===e&&t<s[h]&&!l(n,e,h)&&(a[h]=e,a[e]=o[e]=o[h],t=s[h])}}))})),{root:o,align:a}}function f(e,t,n,o,a){var s={},u=function(e,t,n,o){var a=new i,s=e.graph(),u=function(e,t,n){return function(i,o,a){var s,u=i.node(o),l=i.node(a),c=0;if(c+=u.width/2,r.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=-u.width/2;break;case"r":s=u.width/2}if(s&&(c+=n?s:-s),s=0,c+=(u.dummy?t:e)/2,c+=(l.dummy?t:e)/2,c+=l.width/2,r.has(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":s=l.width/2;break;case"r":s=-l.width/2}return s&&(c+=n?s:-s),s=0,c}}(s.nodesep,s.edgesep,o);return r.forEach(t,(function(t){var i;r.forEach(t,(function(t){var r=n[t];if(a.setNode(r),i){var o=n[i],s=a.edge(o,r);a.setEdge(o,r,Math.max(u(e,t,i),s||0))}i=t}))})),a}(e,t,n,a),l=a?"borderLeft":"borderRight";function c(e,t){for(var n=u.nodes(),r=n.pop(),i={};r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}return c((function(e){s[e]=u.inEdges(e).reduce((function(e,t){return Math.max(e,s[t.v]+u.edge(t))}),0)}),u.predecessors.bind(u)),c((function(t){var n=u.outEdges(t).reduce((function(e,t){return Math.min(e,s[t.w]-u.edge(t))}),Number.POSITIVE_INFINITY),r=e.node(t);n!==Number.POSITIVE_INFINITY&&r.borderType!==l&&(s[t]=Math.max(s[t],n))}),u.successors.bind(u)),r.forEach(o,(function(e){s[e]=s[n[e]]})),s}function d(e,t){return r.minBy(r.values(t),(function(t){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return r.forIn(t,(function(t,r){var o=function(e,t){return e.node(t).width}(e,r)/2;n=Math.max(t+o,n),i=Math.min(t-o,i)})),n-i}))}function h(e,t){var n=r.values(t),i=r.min(n),o=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(a){var s,u=n+a,l=e[u];if(l!==t){var c=r.values(l);(s="l"===a?i-r.min(c):o-r.max(c))&&(e[u]=r.mapValues(l,(function(e){return e+s})))}}))}))}function p(e,t){return r.mapValues(e.ul,(function(n,i){if(t)return e[t.toLowerCase()][i];var o=r.sortBy(r.map(e,i));return(o[1]+o[2])/2}))}e.exports={positionX:function(e){var t,n=o.buildLayerMatrix(e),i=r.merge(a(e,n),s(e,n)),u={};r.forEach(["u","d"],(function(o){t="u"===o?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(t=r.map(t,(function(e){return r.values(e).reverse()})));var a=("u"===o?e.predecessors:e.successors).bind(e),s=c(e,t,i,a),l=f(e,t,s.root,s.align,"r"===n);"r"===n&&(l=r.mapValues(l,(function(e){return-e}))),u[o+n]=l}))}));var l=d(e,u);return h(u,l),p(u,e.graph().align)},findType1Conflicts:a,findType2Conflicts:s,addConflict:u,hasConflict:l,verticalAlignment:c,horizontalCompaction:f,alignCoordinates:h,findSmallestWidthAlignment:d,balance:p}},function(e,t,n){var r=n(6),i=n(13),o=n(24).Graph;e.exports={debugOrdering:function(e){var t=i.buildLayerMatrix(e),n=new o({compound:!0,multigraph:!0}).setGraph({});return r.forEach(e.nodes(),(function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)})),r.forEach(e.edges(),(function(e){n.setEdge(e.v,e.w,{},e.name)})),r.forEach(t,(function(e,t){var i="layer"+t;n.setNode(i,{rank:"same"}),r.reduce(e,(function(e,t){return n.setEdge(e,t,{style:"invis"}),t}))})),n}}},function(e,t){e.exports="0.8.5"},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.roundDecimals=void 0,e.roundDecimals=function(e,t){var n=Math.round(Number("".concat(e,"e").concat(t)));return Number("".concat(n,"e-").concat(t))}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(12),n(25)],void 0===(o="function"==typeof(r=function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prevTick=e.nextTick=void 0,e.nextTick=function(){return!(t.rlog.curTick>=t.rlog.log.length)&&(0,n.updateGraph)(t.rlog.curTick+1)},e.prevTick=function(){return!(t.rlog.curTick<=0)&&(0,n.updateGraph)(t.rlog.curTick-1)}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(52),n(266),n(158),n(160),n(161)],void 0===(o="function"==typeof(r=function(e,t,n,r,i,o){"use strict";function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}var u,l;Object.defineProperty(e,"__esModule",{value:!0}),e.searchStringWithData=e.searchStringContainer=e.searchStringClearNoUpdate=e.searchStringClear=e.searchStringSet=e.searchStringWith=void 0,t=(l=t)&&l.__esModule?l:{default:l},n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(n);var c=/^r\d/,f=function(e){if(e.length<3){if(0===e.length)return n.searchRegexReset();if(!c.test(e))return!1}var t=new RegExp(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(e));return n.searchRegex(t)};e.searchStringWith=f;var d=function(e){return u.val(e),f(e)};e.searchStringSet=d,e.searchStringClear=function(){return d("")},e.searchStringClearNoUpdate=function(){u.val("")},e.searchStringWithData=function(e){return e instanceof i.Edge?d(e.ghostKey):d(e.key)},e.searchStringContainer=function(e){(u=e).on("input",(function(e){f((0,t.default)(e.target).val().toString())}))}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(167),n(265),n(267),n(264)],void 0===(o="function"==typeof(r=function(e,t,n,r,i){"use strict";function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function s(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}Object.defineProperty(e,"__esModule",{value:!0}),e.buttonNextStep=e.buttonPrevStep=e.buttonNextOutputCalc=e.buttonPrevOutputCalc=e.buttonNextIdle=e.buttonPrevIdle=e.buttonNextMark=e.buttonPrevMark=void 0,t=s(t),n=s(n),r=s(r),i=s(i),e.buttonPrevMark=function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0],r.prevUserMark()||n.firstStep()},e.buttonNextMark=function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0],r.nextUserMark()||n.lastStep()},e.buttonPrevIdle=function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0],i.prevIdle()||n.firstStep()},e.buttonNextIdle=function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0],i.nextIdle()||n.lastStep()},e.buttonPrevOutputCalc=function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0],t.prevOutputCalc()||n.firstStep()},e.buttonNextOutputCalc=function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0],t.nextOutputCalc()||n.lastStep()},e.buttonPrevStep=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n.prevStep(e)||n.firstStep()},e.buttonNextStep=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n.nextStep(e)||n.lastStep()}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(12),n(261)],void 0===(o="function"==typeof(r=function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resize=void 0,e.resize=function(){t.rlog.cyto.resize(),(0,n.atTick)(t.rlog.curTick,{fit:!0,forceRedraw:!0})}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(98),n(613),n(260),n(243),n(614)],void 0===(o="function"==typeof(r=function(e,t,n,r,i,o){"use strict";function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function l(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.withContainer=void 0,t=l(t),n=u(n),r=u(r),i=l(i),o=l(o);var c=function(e){var a=(0,t.default)({container:e,boxSelectionEnabled:!1,autounselectify:!0,layout:i.default,wheelSensitivity:.04,style:[(0,r.style)(o.default.node,r.default.node.default),(0,r.style)(o.default.edge,r.default.edge.default),(0,r.style)(o.default.edgeGhost,r.default.ghostEdge.default),(0,r.style)(o.default.edgeIsolate,r.default.edge.isolate),(0,r.style)(o.default.nodeStart,r.default.node.start),(0,r.style)(o.default.nodeMiddle,r.default.node.middle),(0,r.style)(o.default.nodeEnd,r.default.node.end),(0,r.style)(o.default.nodeStartBig,r.default.node.startBig),(0,r.style)(o.default.nodeMiddleBig,r.default.node.middleBig),(0,r.style)(o.default.nodeEndBig,r.default.node.endBig),(0,r.style)(o.default.nodeEnter,r.default.node.enter),(0,r.style)(o.default.nodeEnterActive,r.default.node.enterActive),(0,r.style)(o.default.nodeInvalidate,r.default.node.invalidate),(0,r.style)(o.default.nodeInvalidateActive,r.default.node.invalidateActive),(0,r.style)(o.default.nodeInvalidateDone,r.default.node.invalidateDone),(0,r.style)(o.default.nodeIsolate,r.default.node.isolate),(0,r.style)(o.default.nodeIsolateInvalidate,r.default.node.isolateInvalidate),(0,r.style)(o.default.nodeValueChanged,r.default.node.valueChanged),(0,r.style)(o.default.hoverNotFocused,r.default.focus.hoverNotFocused),(0,r.style)(o.default.hoverNotFocusedButSticky,r.default.focus.hoverNotFocusedButSticky),(0,r.style)(o.default.edgeGhostHoverNotFocused,r.default.ghostEdge.hoverNotFocused),(0,r.style)(o.default.edgeGhostHoverNotFocusedButSticky,r.default.ghostEdge.hoverNotFocusedButSticky),(0,r.style)(o.default.stickyNotFocused,r.default.focus.stickyNotFocused),(0,r.style)(o.default.nodeFiltered,r.default.filtered.node),(0,r.style)(o.default.nodeFilteredStart,r.default.filtered.start),(0,r.style)(o.default.nodeFilteredMiddle,r.default.filtered.middle),(0,r.style)(o.default.nodeFilteredEnd,r.default.filtered.end),(0,r.style)(o.default.nodeSelected,r.default.selected.node),(0,r.style)(o.default.edgeSelected,r.default.selected.edge),(0,r.style)(o.default.edgeGhostSelected,r.default.selected.ghostEdge),(0,r.style)(o.default.nodeFrozen,r.default.node.frozen),(0,r.style)(o.default.nodeHidden,r.default.hidden.node),(0,r.style)(o.default.edgeHidden,r.default.hidden.edge)]});return n.addOnMethods(a),a};e.withContainer=c;var f=c;e.default=f})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(52),n(196),n(12),n(25)],void 0===(o="function"==typeof(r=function(e,t,n,r,i){"use strict";function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.addOnMethods=e.onDblClick=e.onClick=e.onMouseOver=void 0,t=s(t),n=s(n),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(i);var u=function(e){return function(t){var r=t.target;if(r!==e){var o=!1,a=(0,n.default)((function(){o=!0,i.hoverData(r.data())}),200);a(),r.once("mouseout",(function(e){a.cancel(),o&&i.hoverDataReset()}))}}};e.onMouseOver=u;var l=function(e){var n,o;return function(e){(0,t.default)("#search").blur();var a=e.target;if(o&&n&&clearTimeout(o),n===a)return a.trigger("dblclick",e),void(n=null);o=setTimeout((function(){n=null}),400),n=a,a!==r.rlog.cyto?i.stickyDatas([a.data()]):i.stickyDatasReset()}};e.onClick=l;var c=function(e){return function(e){var t=e.target;t!==r.rlog.cyto?(i.searchRegexReset(),i.searchStringWithData(t.data())):i.resetHoverStickyFilterData()}};e.onDblClick=c;var f=function(e){e.on("mouseover",u(e)),e.on("tap",l()),e.on("dblclick",c())};e.addOnMethods=f;var d=f;e.default=d})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t={node:"node",edge:"edge",edgeGhost:".edgeGhost",edgeIsolate:".edgeIsolate",nodeStart:".nodeStart",nodeMiddle:".nodeMiddle",nodeEnd:".nodeEnd",nodeStartBig:".nodeStartBig",nodeMiddleBig:".nodeMiddleBig",nodeEndBig:".nodeEndBig",nodeEnter:".nodeEnter",nodeEnterActive:".nodeEnterActive",nodeInvalidate:".nodeInvalidate",nodeInvalidateActive:".nodeInvalidateActive",nodeInvalidateDone:".nodeInvalidateDone",nodeIsolate:".nodeIsolate",nodeIsolateInvalidate:".nodeIsolateInvalidate",nodeFrozen:".nodeFrozen",nodeValueChanged:".nodeValueChanged",hoverNotFocused:".hoverNotFocused",hoverNotFocusedButSticky:".hoverNotFocusedButSticky",edgeGhostHoverNotFocused:".edgeGhostHoverNotFocused",edgeGhostHoverNotFocusedButSticky:".edgeGhostHoverNotFocusedButSticky",stickyNotFocused:".stickyNotFocused",nodeFiltered:".nodeFiltered",nodeFilteredStart:".nodeFilteredStart",nodeFilteredMiddle:".nodeFilteredMiddle",nodeFilteredEnd:".nodeFilteredEnd",nodeSelected:".nodeSelected",edgeSelected:".edgeSelected",edgeGhostSelected:".edgeGhostSelected",nodeHidden:".nodeHidden",edgeHidden:".edgeHidden"};e.default=t})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(52),n(616),n(25),n(113),n(12)],void 0===(o="function"==typeof(r=function(e,t,n,r,i,o){"use strict";function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.addKeydown=void 0,t=u(t),n=u(n),r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(r);var l=function(e){var a=(0,t.default)(e.target).get(0);if(a.id&&"search"===a.id)27===e.which&&a.blur();else{if(39===e.which||32===e.which){if(e.altKey){if(e.shiftKey&&r.buttonNextIdle())return;if(r.buttonNextOutputCalc())return}else if(e.shiftKey)return void r.nextTick();if(o.rlog.curTick<o.rlog.getGraph.maxStep)return void r.buttonNextStep()}if(37===e.which){if(e.altKey){if(e.shiftKey&&r.buttonPrevIdle())return;if(r.buttonPrevOutputCalc())return}else if(e.shiftKey)return void r.prevTick();if(o.rlog.curTick>1)return void r.buttonPrevStep()}if(35!==e.which)if(36!==e.which){if(27===e.which){if((0,i.hasLength)(o.rlog.getGraph.stickyDatas)){var s=o.rlog.getGraph.stickyDatas,u=o.rlog.getGraph.filterDatas;return(0,i.hasLength)(u)?s.length===u.length&&s.map((function(e){return e.reactId})).join(", ")===u.map((function(e){return e.reactId})).join(", ")?(o.rlog.getGraph.resetHoverStickyFilterSearch(),void r.updateGraph(o.rlog.curTick,{fit:!0})):void r.stickyDatas(o.rlog.getGraph.filterDatas):void r.stickyDatasReset()}return(0,i.hasLength)(o.rlog.getGraph.filterDatas)?void r.searchRegexReset():void 0}if(38!==e.which)if(40!==e.which){if(83===e.which)return(0,n.default)((function(){(0,t.default)("#search").focus()})),void e.stopPropagation();76===e.which&&("none"!==(0,t.default)("#logEntry").css("display")?(0,t.default)("#logEntry").css("display","none"):(0,t.default)("#logEntry").css("display","inline")),70===e.which&&r.resize()}else(0,i.hasLength)(o.rlog.getGraph.filterDatas);else(0,i.hasLength)(o.rlog.getGraph.filterDatas)}else r.buttonPrevMark();else r.buttonNextMark()}};e.addKeydown=function(e){e.keydown(l)};var c=l;e.default=c})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r=n(617),i=n(80)((function(e,t){return r(e,1,t)}));e.exports=i},function(e,t){e.exports=function(e,t,n){if("function"!=typeof e)throw new TypeError("Expected a function");return setTimeout((function(){e.apply(void 0,n)}),t)}},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[n(112)],void 0===(o="function"==typeof(r=function(e){"use strict";var t;e=(t=e)&&t.__esModule?t:{default:t},window.__APP_DATA__&&(window.log=window.__APP_DATA__),(0,e.default)(window.log,(function(e,t){e.step=t}))})?r.apply(t,i):r)||(e.exports=o)}]);
  //# sourceMappingURL=reactlog.js.map