Simple example of using d3-sankey-diagram.
Last active
August 3, 2022 09:38
-
-
Save ricklupton/6344d23aa6418702f120b34343dce7cb to your computer and use it in GitHub Desktop.
Simple example of d3-sankey-diagram
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("d3-array"),require("d3-collection"),require("d3-interpolate"),require("d3-selection"),require("d3-transition"),require("d3-dispatch"),require("d3-format")):"function"==typeof define&&define.amd?define(["exports","d3-array","d3-collection","d3-interpolate","d3-selection","d3-transition","d3-dispatch","d3-format"],t):t(n.d3=n.d3||{},n.d3,n.d3,n.d3,n.d3,n.d3,n.d3,n.d3)}(this,function(n,t,r,e,i,u,o,a){"use strict";function f(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function c(n){this._isDirected=!lt.has(n,"directed")||n.directed,this._isMultigraph=!!lt.has(n,"multigraph")&&n.multigraph,this._isCompound=!!lt.has(n,"compound")&&n.compound,this._label=void 0,this._defaultNodeLabelFn=lt.constant(void 0),this._defaultEdgeLabelFn=lt.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[pt]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function s(n,t){n[t]?n[t]++:n[t]=1}function l(n,t){--n[t]||delete n[t]}function h(n,t,r,e){var i=""+t,u=""+r;if(!n&&i>u){var o=i;i=u,u=o}return i+vt+u+vt+(lt.isUndefined(e)?dt:e)}function d(n,t,r,e){var i=""+t,u=""+r;if(!n&&i>u){var o=i;i=u,u=o}var a={v:i,w:u};return e&&(a.name=e),a}function p(n,t){return h(n,t.v,t.w,t.name)}function v(n){var t={options:{directed:n.isDirected(),multigraph:n.isMultigraph(),compound:n.isCompound()},nodes:g(n),edges:_(n)};return _t.isUndefined(n.graph())||(t.value=_t.clone(n.graph())),t}function g(n){return _t.map(n.nodes(),function(t){var r=n.node(t),e=n.parent(t),i={v:t};return _t.isUndefined(r)||(i.value=r),_t.isUndefined(e)||(i.parent=e),i})}function _(n){return _t.map(n.edges(),function(t){var r=n.edge(t),e={v:t.v,w:t.w};return _t.isUndefined(t.name)||(e.name=t.name),_t.isUndefined(r)||(e.value=r),e})}function y(n){var t=new yt(n.options).setGraph(n.value);return _t.each(n.nodes,function(n){t.setNode(n.v,n.value),n.parent&&t.setParent(n.v,n.parent)}),_t.each(n.edges,function(n){t.setEdge({v:n.v,w:n.w,name:n.name},n.value)}),t}function m(n){function t(i){bt.has(e,i)||(e[i]=!0,r.push(i),bt.each(n.successors(i),t),bt.each(n.predecessors(i),t))}var r,e={},i=[];return bt.each(n.nodes(),function(n){r=[],t(n),r.length&&i.push(r)}),i}function b(){this._arr=[],this._keyIndices={}}function w(n,t,r,e){return x(n,String(t),r||At,e||function(t){return n.outEdges(t)})}function x(n,t,r,e){var i,u,o={},a=new Mt,f=function(n){var t=n.v!==i?n.v:n.w,e=o[t],f=r(n),c=u.distance+f;if(f<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+n+" Weight: "+f);c<e.distance&&(e.distance=c,e.predecessor=i,a.decrease(t,c))};for(n.nodes().forEach(function(n){var r=n===t?0:Number.POSITIVE_INFINITY;o[n]={distance:r},a.add(n,r)});a.size()>0&&(i=a.removeMin(),u=o[i],u.distance!==Number.POSITIVE_INFINITY);)e(i).forEach(f);return o}function E(n,t,r){return It.transform(n.nodes(),function(e,i){e[i]=Lt(n,i,t,r)},{})}function k(n){function t(o){var a=i[o]={onStack:!0,lowlink:r,index:r++};if(e.push(o),n.successors(o).forEach(function(n){Ct.has(i,n)?i[n].onStack&&(a.lowlink=Math.min(a.lowlink,i[n].index)):(t(n),a.lowlink=Math.min(a.lowlink,i[n].lowlink))}),a.lowlink===a.index){var f,c=[];do{f=e.pop(),i[f].onStack=!1,c.push(f)}while(o!==f);u.push(c)}}var r=0,e=[],i={},u=[];return n.nodes().forEach(function(n){Ct.has(i,n)||t(n)}),u}function M(n){return Pt.filter(zt(n),function(t){return t.length>1||1===t.length&&n.hasEdge(t[0],t[0])})}function j(n,t,r){return A(n,t||Ut,r||function(t){return n.outEdges(t)})}function A(n,t,r){var e={},i=n.nodes();return i.forEach(function(n){e[n]={},e[n][n]={distance:0},i.forEach(function(t){n!==t&&(e[n][t]={distance:Number.POSITIVE_INFINITY})}),r(n).forEach(function(r){var i=r.v===n?r.w:r.v,u=t(r);e[n][i]={distance:u,predecessor:n}})}),i.forEach(function(n){var t=e[n];i.forEach(function(r){var u=e[r];i.forEach(function(r){var e=u[n],i=t[r],o=u[r],a=e.distance+i.distance;a<o.distance&&(o.distance=a,o.predecessor=i.predecessor)})})}),e}function L(n){function t(u){if(Wt.has(e,u))throw new I;Wt.has(r,u)||(e[u]=!0,r[u]=!0,Wt.each(n.predecessors(u),t),delete e[u],i.push(u))}var r={},e={},i=[];if(Wt.each(n.sinks(),t),Wt.size(r)!==n.nodeCount())throw new I;return i}function I(){}function N(n){try{Bt(n)}catch(n){if(n instanceof Bt.CycleException)return!1;throw n}return!0}function C(n,t,r){$t.isArray(t)||(t=[t]);var e=(n.isDirected()?n.successors:n.neighbors).bind(n),i=[],u={};return $t.each(t,function(t){if(!n.hasNode(t))throw new Error("Graph does not have node: "+t);O(n,t,"post"===r,u,e,i)}),i}function O(n,t,r,e,i,u){$t.has(e,t)||(e[t]=!0,r||u.push(t),$t.each(i(t),function(t){O(n,t,r,e,i,u)}),r&&u.push(t))}function P(n,t){return Vt(n,t,"post")}function z(n,t){return Gt(n,t,"pre")}function R(n,t){function r(n){var r=n.v===e?n.w:n.v,i=o.priority(r);if(void 0!==i){var a=t(n);a<i&&(u[r]=e,o.decrease(r,a))}}var e,i=new Jt,u={},o=new Xt;if(0===n.nodeCount())return i;Kt.each(n.nodes(),function(n){o.add(n,Number.POSITIVE_INFINITY),i.setNode(n)}),o.decrease(n.nodes()[0],0);for(var a=!1;o.size()>0;){if(e=o.removeMin(),Kt.has(u,e))i.setEdge(e,u[e]);else{if(a)throw new Error("Input graph is not connected: "+n);a=!0}n.nodeEdges(e).forEach(r)}return i}function S(n,t){void 0===t&&(t=[]);var e=new rr({directed:!0});if(0===n.nodes().length)return e;t=T(n,t);var i,u,o,a,f=r.map();for(o=0;o<t.length;++o)if(i=t[o],i.nodes&&0!==i.nodes.length){for(u=""+o,a=0;a<i.nodes.length;++a)f.set(i.nodes[a],u);e.setNode(u,{type:i.type,nodes:i.nodes})}n.nodes();return n.nodes().forEach(function(t){n.node(t);f.has(t)||(u=""+o++,i={type:"same",nodes:[t]},f.set(t,u),e.setNode(u,i))}),n.edges().forEach(function(t){var r=(n.edge(t),f.get(t.v)),i=f.get(t.w),u=e.edge(r,i)||{delta:0};r===i?(u.delta=0,e.setEdge(r,i,u)):n.node(t.v).backwards?(u.delta=Math.max(u.delta,n.node(t.w).backwards?1:0),e.setEdge(i,r,u)):(u.delta=Math.max(u.delta,n.node(t.w).backwards?0:1),e.setEdge(r,i,u))}),e}function T(n,t){for(var r=0;r<t.length;++r)if("min"===t[r].type)return t;var e=n.sources();return[{type:"min",nodes:[e.length?e[0]:n.nodes()[0]]}].concat(t)}function U(n,t){var r=W(n,t);return n.edges().forEach(function(t){if(D(r,t.v,t.w)<0){var e=n.edge(t)||{};e.reversed=!0,n.removeEdge(t),n.setEdge(t.w,t.v,e)}}),n}function W(n,t){var e=r.set(),i=new rr({directed:!0}),u=[];if(!n.hasNode(t))throw Error("node not in graph");return B(n,t,e,i,u),n.nodes().forEach(function(t){e.has(t)||B(n,t,e,i,u)}),u.forEach(function(n,t){i.node(n).thread=t+1<u.length?u[t+1]:u[0]}),i}function D(n,t,r){var e=n.node(t),i=n.node(r);if(e.depth<i.depth)for(var u=e.thread;n.node(u).depth>e.depth;){if(u===r)return 1;u=n.node(u).thread}else if(i.depth<e.depth)for(var o=i.thread;n.node(o).depth>i.depth;){if(o===t)return-1;o=n.node(o).thread}return 0}function B(n,t,r,e,i,u){if(void 0===u&&(u=0),!r.has(t)){r.add(t),i.push(t),e.setNode(t,{depth:u});n.outEdges(t).map(function(n){return n.w}).forEach(function(o,a){r.has(o)||e.setEdge(t,o,{delta:1}),B(n,o,r,e,i,u+1)})}}function F(n){var t=n.sources(),e=r.set(),i=r.set();n.edges().forEach(function(n){n.v===n.w&&i.add($(n))}),n.nodes().forEach(function(t){n.node(t).rank=0});for(;t.length>0;)!function(){var r=t.shift();e.add(r);var u=n.node(r);u||n.setNode(r,u={}),u.rank=0,n.inEdges(r).forEach(function(t){var r=void 0===n.edge(t).delta?1:n.edge(t).delta;u.rank=Math.max(u.rank,n.node(t.v).rank+r)}),n.outEdges(r).forEach(function(n){i.add($(n))}),n.nodes().forEach(function(r){t.indexOf(r)<0&&!e.has(r)&&!n.inEdges(r).some(function(n){return!i.has($(n))})&&t.push(r)})}()}function $(n){return n.v+""+n.w+""+n.name}function q(n,t){var r=S(n,t);0!==r.nodeCount()&&(V(r),U(r,"0"),F(r),Z(r),r.nodes().forEach(function(t){var e=r.node(t);e.nodes.forEach(function(t){n.node(t).rank=e.rank})}))}function V(n){n.sources().forEach(function(t){"0"!==t&&n.setEdge("0",t,{temp:!0,delta:0})})}function Z(n){function r(r){var e=n.node(r),i=t.min(n.outEdges(r),function(t){return n.node(t.w).rank-n.edge(t).delta});void 0!==i&&(e.rank=i)}n.edges().forEach(function(t){n.edge(t).temp&&r(t.w)})}function G(n,t){var e=[];if(0===t.length)return e;var i=n.sources(),u=r.map();return t.forEach(function(n,t){e.push([]),n.forEach(function(n){0===t&&i.indexOf(n)<0&&i.push(n),u.set(n,t)})}),er.preorder(n,i).forEach(function(n){e[u.get(n)].push(n)}),e}function Y(n,t,r){return K(n,t,r)}function K(n,t,r){var e,i,u;t.length>r.length?(e=t,i=r):(e=r,i=t),u=i.length;var o=[];e.forEach(function(t){i.forEach(function(r,e){(n.hasEdge(t,r)||n.hasEdge(r,t))&&o.push(e)})});for(var a=1;a<u;)a*=2;var f=2*a-1;a-=1;for(var c=new Array(f),s=0;s<f;s++)c[s]=0;var l=0;return o.forEach(function(n){var t=n+a;for(c[t]++;t>0;)t%2&&(l+=c[t+1]),t=Math.floor((t-1)/2),c[t]++}),l}function J(n,t){for(var r=!0;r;){r=!1;for(var e=0;e<t.length;++e)for(var i=0;i<t[e].length-1;++i){var u=X(n,t,e);H(t[e],i,i+1);var o=X(n,t,e);o<u?r=!0:H(t[e],i,i+1)}}}function X(n,t,r){var e=0;return r>0&&(e+=Y(n,t[r-1],t[r])),r+1<t.length&&(e+=Y(n,t[r],t[r+1])),e}function H(n,t,r){var e=n[t];n[t]=n[r],n[r]=e}function Q(n){var t=Math.floor(n.length/2);if(0===n.length)return-1;if(n.length%2==1)return n[t];if(2===n.length)return(n[0]+n[1])/2;var r=n[t-1]-n[0],e=n[n.length-1]-n[t];return(n[t-1]*e+n[t]*r)/(r+e)}function nn(n,t,r,e,i,u){void 0===u&&(u=!1);var o=t[r],a=t[e],f=[];return a.forEach(function(t,r){n.nodeEdges(t,i).length>0&&f.push(r)}),0===f.length&&u&&o.forEach(function(t,r){n.nodeEdges(t,i).length>0&&f.push(r+.5)}),f.sort(function(n,t){return n-t}),f}function tn(n,t){for(var e=r.map(n.map(function(n,t){return[n,t]}),function(n){return n[0]}),i=1;i<n.length;++i)for(var u=i;u>0;--u){for(var o=u-1,a=t.get(n[o]),f=t.get(n[u]);-1===(a=t.get(n[o]))&&o>0;)o--;if(-1===f||-1===a)break;if(a===f&&(a=e.get(n[o]),f=e.get(n[u])),f>=a)break;var c;c=[n[o],n[u]],n[u]=c[0],n[o]=c[1]}}function rn(n,t,e,i){if(void 0===e&&(e=1),void 0===i&&(i=!1),e>0)for(var u=1;u<t.length;++u)!function(e){var u=r.map();t[e].forEach(function(r){var o=Q(nn(n,t,e,e-1,r,i));u.set(r,o)}),tn(t[e],u)}(u);else for(var o=t.length-2;o>=0;--o)!function(e){var u=r.map();t[e].forEach(function(r){var o=Q(nn(n,t,e,e+1,r,i));u.set(r,o)}),tn(t[e],u)}(o)}function en(n,t){void 0===t&&(t=25);for(var r=un(n),e=G(n,r),i=e,u=0;u++<t;)rn(n,e,u%2==0),J(n,e),on(n,e)<on(n,i)&&(i=an(e));i.forEach(function(t){t.forEach(function(t,r){n.node(t).depth=r})})}function un(n){var t=[];return n.nodes().forEach(function(r){for(var e=n.node(r).rank||0;e>=t.length;)t.push([]);t[e].push(r)}),t}function on(n,t){for(var r=0,e=0;e<t.length-1;++e)r+=Y(n,t[e],t[e+1]);return r}function an(n){var t=[];return n.forEach(function(n){t.push(n.map(function(n){return n}))}),t}function fn(n){"object"!=typeof n.graph()&&n.setGraph({}),n.graph().dummyChains=[],n.edges().forEach(function(t){return cn(n,t)})}function cn(n,t){function r(r,i){var u={points:[],value:e.value,origEdge:t,origLabel:e};n.setEdge(r,i,u,t.name)}var e=n.edge(t),i=ln(n.node(t.v),n.node(t.w));if(0!==i.length){n.removeEdge(t);var u=t.v;i.forEach(function(e,i){var o="__"+t.v+"_"+t.w+"_"+i;n.hasNode(o)||(e.dummy="edge",n.setNode(o,e),0===i&&n.graph().dummyChains.push(o)),r(u,u=o)}),r(u,t.w)}}function sn(n){(n.graph().dummyChains||[]).forEach(function(t){var r=n.node(t),e=n.inEdges(t).map(function(t){return n.edge(t)});e.forEach(function(t){t.origLabel.dy=t.dy,t.origLabel.x0=t.x0,t.origLabel.y0=t.y0,t.origLabel.r0=t.r0,t.origLabel.d0=t.d0,n.setEdge(t.origEdge,t.origLabel)});for(var i,u=e.map(function(n){return n.r1});r.dummy;)e=n.outEdges(t).map(function(t){return n.edge(t)}),e.forEach(function(n,t){n.origLabel.points.push({x:(r.x0+r.x1)/2,y:n.y0,d:n.d0,ro:n.r0,ri:u[t]})}),u=e.map(function(n){return n.r1}),i=n.successors(t)[0],n.removeNode(t),r=n.node(t=i);e.forEach(function(n){n.origLabel.x1=n.x1,n.origLabel.y1=n.y1,n.origLabel.r1=n.r1,n.origLabel.d1=n.d1})})}function ln(n,t){var r=[],e=n.rank;if(e+1<=t.rank){for(n.backwards&&r.push({rank:e,backwards:!1});++e<t.rank;)r.push({rank:e,backwards:!1});t.backwards&&r.push({rank:e,backwards:!1})}else if(e>t.rank){for(n.backwards||r.push({rank:e,backwards:!0});e-- >t.rank+1;)r.push({rank:e,backwards:!0});t.backwards||r.push({rank:e,backwards:!0})}return r}function hn(n){for(var e,i=t.max(n,function(n){return n.rank||0})||0,u=t.max(n,function(n){return n.band||0})||0,o=r.nest().key(function(n){return n.rank||0}).key(function(n){return n.band||0}).sortValues(function(n,t){return n.depth-t.depth}).map(n),a=new Array(i+1),f=0;f<=i;++f)if(a[f]=new Array(u+1),e=o.get(f))for(var c=0;c<=u;++c)a[f][c]=e.get(c)||[];else for(var s=0;s<=u;++s)a[f][s]=[];return a.bandValues=dn(a),a}function dn(n){if(0===n.length||0===n[0].length)return[];for(var r=n[0].length,e=new Array(r),i=0;i<r;i++)e[i]=0;return n.forEach(function(n){n.forEach(function(n,r){var i=t.sum(n,function(n){return n.value});e[r]=Math.max(e[r],i)})}),e}function pn(n,r,e){var i=t.max(n.nodes(),function(t){return n.node(t).rank||0})||0,u=(r-e)/i;n.nodes().forEach(function(t){var r=n.node(t);r.x0=u*(r.rank||0),r.x1=r.x0+e})}function vn(n,t){return 1}function gn(){function n(e,i,u){e.forEach(function(o){var a=0;o.forEach(function(o,f){var c=e.bandValues[f]/t.sum(e.bandValues)*i,s=u*c/5,l=c-2*s,h=t.sum(o,function(n){return n.dy}),d=o.map(function(t,e){return t.value&&o[e+1]?r(o[e],o[e+1],n):0}),p=Math.max(0,l-h),v=t.sum(d)?p/t.sum(d):0,g=a+s;1===o.length&&(g+=(l-o[0].dy)/2);var _=Number.MAX_VALUE;o.forEach(function(n,t){n.y=g,n.spaceAbove=_,n.spaceBelow=d[t]*v,g+=n.dy+n.spaceBelow,_=n.spaceBelow,n.data&&void 0!==n.data.forceY&&(n.y=s+n.data.forceY*(l-n.dy))}),o.length>0&&(o[o.length-1].spaceBelow=Number.MAX_VALUE),a+=c})})}var r=vn;return n.separation=function(t){return arguments.length?(r=_n(t),n):r},n}function _n(n){if("function"!=typeof n)throw new Error;return n}function yn(n,e){n.nodes().forEach(function(i){function u(n,t){if(a.has(n))return a.get(n);var r={id:n,node:o.data,side:t,incoming:[],outgoing:[]};return a.set(n,r),r}var o=n.node(i),a=r.map();n.inEdges(i).forEach(function(t){var r=n.edge(t),e=u(r.targetPortId||"in","l"!==o.direction?"west":"east");e.incoming.push(t),r.targetPort=e}),n.outEdges(i).forEach(function(t){var r=n.edge(t),e=u(r.sourcePortId||"out","l"!==o.direction?"east":"west");e.outgoing.push(t),r.sourcePort=e}),o.ports=a.values(),o.ports.sort(e);var f={west:0,east:0},c={west:0,east:0};o.ports.forEach(function(r){r.y=f[r.side],r.index=c[r.side],r.dy=Math.max(t.sum(r.incoming,function(t){return n.edge(t).dy}),t.sum(r.outgoing,function(t){return n.edge(t).dy}));var e="west"===r.side?o.x0:o.x1;r.outgoing.forEach(function(t){var i=n.edge(t);i.x0=e,i.y0=o.y+r.y+i.dy/2}),r.incoming.forEach(function(t){var i=n.edge(t);i.x1=e,i.y1=o.y+r.y+i.dy/2}),f[r.side]+=r.dy,c[r.side]+=1})})}function mn(n,t,r){if(void 0===r&&(r=!0),t.v===t.w)return Math.PI/2*(r?1:-1);var e=n.edge(t);return Math.atan2(e.y1-e.y0,e.x1-e.x0)}function bn(n,t){n.nodes().forEach(function(t){return wn(n,t)})}function wn(n,t){var r=n.node(t);r.ports.forEach(function(t){t.incoming.sort(xn(n,r,!1)),t.outgoing.sort(xn(n,r,!0))})}function xn(n,t,r){return void 0===r&&(r=!0),function(t,e){var i=mn(n,t,r),u=mn(n,e,r),o=r?1:-1;return t.v===e.v&&t.w===e.w&&Math.abs(i-u)<.001?"number"==typeof t.name&&"number"==typeof e.name?t.name-e.name:"string"==typeof t.name&&"string"==typeof e.name?t.name.localeCompare(e.name):0:Math.abs(i-u)<.001?t.w===e.w?n.node(e.v).y-n.node(t.v).y:t.v===e.v?n.node(e.w).y-n.node(t.w).y:0:o*(i-u)}}function En(n,t){for(var r=null,e=0;e<n.length;++e)if(t(n[e])){r=e;break}return r}function kn(n,t){if(0!==n.length){for(var r,e=0,i=n.length-1;i>=0;--i)r=n[i].dy/2,n[i][t]-r<e&&(n[i][t]=Math.min(n[i].Rmax,e+r)),e=n[i][t]+r;for(var u=n[0].Rmax+n[0].dy/2,o=0;o<n.length;++o)r=n[o].dy/2,n[o][t]+r>u&&(n[o][t]=Math.max(r,u-r)),u=n[o][t]-r}}function Mn(n){return jn(n),An(n),n}function jn(n){n.nodes().forEach(function(t){var r=n.node(t);r.ports.forEach(function(t){var e=r.y+t.y,i=r.y+t.y;t.outgoing.forEach(function(t){var i=n.edge(t);i.y0=e+i.dy/2,i.d0=r.backwards?"l":"r",i.dy=i.dy,e+=i.dy}),t.incoming.forEach(function(t){var e=n.edge(t);e.y1=i+e.dy/2,e.d1=r.backwards?"l":"r",e.dy=e.dy,i+=e.dy})})})}function An(n){n.nodes().forEach(function(t){n.node(t).ports.forEach(function(t){In(n,t.outgoing,"r0"),In(n,t.incoming,"r1")})})}function Ln(n){var t=n.x1-n.x0,r=n.y1-n.y0;return n.d0!==n.d1?Math.abs(r)/2.1:0!==r?(t*t+r*r)/Math.abs(4*r):1/0}function In(n,t,r){var e=t.map(function(t){return n.edge(t)});e.forEach(function(n){n.Rmax=Ln(n),n[r]=Math.max(n.dy/2,n.d0===n.d1?.6*n.Rmax:5+n.dy/2)});var i="r0"===r?En(e,function(n){return n.y1>n.y0}):En(e,function(n){return n.y0>n.y1});if(null===i&&(i=e.length),kn(e.slice(i),r),i>0){for(var u=[],o=i-1;o>=0;o--)u.push(e[o]);kn(u,r)}}function Nn(n,t,r,e,i,u,o){var a=new rr({directed:!0,multigraph:!0});return n.nodes.forEach(function(n,e){var i=t(n,e);if(a.hasNode(i))throw new Error("duplicate: "+i);a.setNode(i,{data:n,index:e,backwards:r(n,e),x0:n.x0,x1:n.x1,y:n.y0})}),n.links.forEach(function(n,t){var r=Cn(e(n,t)),f=Cn(i(n,t)),c={data:n,sourcePortId:r.port,targetPortId:f.port,index:t,points:[],value:o(n,t)};if(!a.hasNode(r.id))throw new Error("missing: "+r.id);if(!a.hasNode(f.id))throw new Error("missing: "+f.id);a.setEdge(r.id,f.id,c,u(n,t))}),a.setGraph({}),a}function Cn(n){return"object"==typeof n?n:{id:n,port:void 0}}function On(n){return n.nodes}function Pn(n){return n.links}function zn(n){return n.id}function Rn(n){return n.direction&&"l"===n.direction.toLowerCase()}function Sn(n){return{id:"object"==typeof n.source?n.source.id:n.source,port:"object"==typeof n.sourcePort?n.sourcePort.id:n.sourcePort}}function Tn(n){return{id:"object"==typeof n.target?n.target.id:n.target,port:"object"==typeof n.targetPort?n.targetPort.id:n.targetPort}}function Un(n){return n.type}function Wn(n,t){return n.id.localeCompare(t.id)}function Dn(){function n(){var n={nodes:i.apply(null,arguments),links:u.apply(null,arguments)},t=Nn(n,o,a,f,c,s,x);if(Bn(t,x),p)t.nodes().forEach(function(n){var r=t.node(n),e=p(r.data);r.x0=e[0],r.x1=e[0]+b,r.y=e[1]}),Fn(t,w);else{null!==l?e(t,l):(q(t,h),en(t,d)),fn(t),Bn(t,x),null===l&&en(t,d);var M=hn(t.nodes().map(function(n){return t.node(n)}));r(t,M),Fn(t,w),k(M,m-_,E),pn(t,y-g,b),t.nodes().forEach(function(n){var r=t.node(n);r.x0+=g,r.x1+=g,r.y+=_})}return yn(t,v),bn(t),Mn(t),sn(t),qn(t),Vn(t,n),n}function r(n,r){if(null===w){var e=t.sum(r.bandValues);e<=0?w=1:(w=(m-_)/e,1!==E&&(w*=1-E))}}function e(n,t){t.forEach(function(t,r){t.forEach(function(t,e){if(t.forEach)t.forEach(function(t,i){var u=n.node(t);u&&(u.rank=r,u.band=e,u.depth=i)});else{var i=n.node(t);i&&(i.rank=r,i.depth=e)}})})}var i=On,u=Pn,o=zn,a=Rn,f=Sn,c=Tn,s=Un,l=null,h=[],d=25,p=null,v=Wn,g=0,_=0,y=1,m=1,b=1,w=null,x=function(n){return n.value},E=.5,k=gn();return n.update=function(n,t){var e=Nn(n,o,a,f,c,s,x);Bn(e,x);var i=hn(e.nodes().map(function(n){return e.node(n)}));return r(e,i),Fn(e,w),yn(e,v),bn(e),Mn(e),qn(e),Vn(e,n),n},n.nodes=function(t){return arguments.length?(i=$n(t),n):i},n.links=function(t){return arguments.length?(u=$n(t),n):u},n.nodeId=function(t){return arguments.length?(o=$n(t),n):o},n.nodeBackwards=function(t){return arguments.length?(a=$n(t),n):a},n.sourceId=function(t){return arguments.length?(f=$n(t),n):f},n.targetId=function(t){return arguments.length?(c=$n(t),n):c},n.linkType=function(t){return arguments.length?(s=$n(t),n):s},n.sortPorts=function(t){return arguments.length?(v=$n(t),n):v},n.ordering=function(t){return arguments.length?(l=t,n):l},n.rankSets=function(t){return arguments.length?(h=t,n):h},n.nodeWidth=function(t){return arguments.length?(b=t,n):b},n.nodePosition=function(t){return arguments.length?(p=t,n):p},n.size=function(t){return arguments.length?(g=_=0,y=+t[0],m=+t[1],n):[y-g,m-_]},n.extent=function(t){return arguments.length?(g=+t[0][0],_=+t[0][1],y=+t[1][0],m=+t[1][1],n):[[g,_],[y,m]]},n.whitespace=function(t){return arguments.length?(E=t,n):E},n.scale=function(t){return arguments.length?(w=t,n):w},n.linkValue=function(t){return arguments.length?(x=t,n):x},n.verticalLayout=function(t){return arguments.length?(k=$n(t),n):k},n}function Bn(n,r){n.nodes().forEach(function(r){var e=n.node(r),i=t.sum(n.inEdges(r),function(t){return n.edge(t).value}),u=t.sum(n.outEdges(r),function(t){return n.edge(t).value});e.value=Math.max(i,u)})}function Fn(n,t){n.edges().forEach(function(r){var e=n.edge(r);e.dy=e.value*t}),n.nodes().forEach(function(r){var e=n.node(r);e.dy=e.value*t})}function $n(n){if("function"!=typeof n)throw new Error;return n}function qn(n){n.edges().forEach(function(t){var r=n.edge(t);r.points.unshift({x:r.x0,y:r.y0,ro:r.r0,d:r.d0}),r.points.push({x:r.x1,y:r.y1,ri:r.r1,d:r.d1})})}function Vn(n,t){n.nodes().forEach(function(t){var r=n.node(t);r.data.incoming=[],r.data.outgoing=[],r.data.ports=r.ports,r.data.ports.forEach(function(n){n.incoming=[],n.outgoing=[]}),r.data.dy=r.dy,r.data.x0=r.x0,r.data.x1=r.x1,r.data.y0=r.y,r.data.y1=r.y+r.dy,r.data.rank=r.rank,r.data.band=r.band,r.data.depth=r.depth,r.data.value=r.value,r.data.spaceAbove=r.spaceAbove,r.data.spaceBelow=r.spaceBelow}),n.edges().forEach(function(t){var r=n.edge(t);r.data.source=n.node(t.v).data,r.data.target=n.node(t.w).data,r.data.sourcePort=r.sourcePort,r.data.targetPort=r.targetPort,r.data.source.outgoing.push(r.data),r.data.target.incoming.push(r.data),r.data.sourcePort&&r.data.sourcePort.outgoing.push(r.data),r.data.targetPort&&r.data.targetPort.incoming.push(r.data),r.data.dy=r.dy,r.data.points=r.points||[]})}function Zn(){function n(n,i){function u(){n.forEach(function(n){n.forEach(function(n){var t,r,u,o=0,a=n.length;for(n.sort(Kn),u=0;u<a;++u)t=n[u],r=o-t.y,r>0&&(t.y+=r),o=t.y+t.dy+e;if((r=o-e-i)>0)for(o=t.y-=r,u=a-2;u>=0;--u)t=n[u],r=t.y+t.dy+e-o,r>0&&(t.y-=r),o=t.y})})}!function(){n.forEach(function(n){var t=0;n.forEach(function(n){n.forEach(function(n){n.y=t++})})})}(),u();for(var o=1,a=r;a>0;--a)!function(r){function e(n){return Gn(n.target)*n.value}n.slice().reverse().forEach(function(n){n.forEach(function(n){n.forEach(function(n){var i=n.outgoing||n.edges;if(i.length){var u=t.sum(i,e)/t.sum(i,Yn);n.y+=(u-Gn(n))*r}})})})}(o*=.99),u(),function(r){function e(n){return Gn(n.source)*n.value}n.forEach(function(n){n.forEach(function(n){n.forEach(function(n){var i=n.incoming||n.edges;if(i.length){var u=t.sum(i,e)/t.sum(i,Yn);n.y+=(u-Gn(n))*r}})})})}(o),u()}var r=25,e=8;return n.iterations=function(t){return arguments.length?(r=+t,n):r},n.padding=function(t){return arguments.length?(e=+t,n):e},n}function Gn(n){return n.y+n.dy/2}function Yn(n){return n.value}function Kn(n,t){return n.y-t.y}function Jn(n){return 0===n.dy?0:2}function Xn(){function n(n){var t=n.x1-n.x0,r=n.y1-n.y0;return[n.dy/2,(t*t+r*r)/Math.abs(4*r)]}function t(n){for(var t,e="",i=0;i<n.points.length-1;++i)t={x0:n.points[i].x,y0:n.points[i].y,x1:n.points[i+1].x,y1:n.points[i+1].y,r0:n.points[i].ro,r1:n.points[i+1].ri,d0:n.points[i].d,d1:n.points[i+1].d,dy:n.dy},e+=r(t);return e}function r(t){function r(n,t){var r=n*(p-d)>0?1:0,e=y*n*(p-d)>0?t+s:t-s;return 0===L&&(e=t),"A"+e+" "+e+" "+Math.abs(L)+" 0 "+r+" "}var c=(t.d0||"r")+(t.d1||"r");if(t.source&&t.source===t.target)return e(t);if("rl"===c)return i(t);if("rd"===c)return u(t);if("dr"===c)return o(t);if("lr"===c)return a(t);var s=Math.max(f(t),t.dy)/2,l=t.x0,h=t.x1,d=t.y0,p=t.y1;if(h<l){var v;v=[h,l],l=v[0],h=v[1];var g;g=[p,d],d=g[0],p=g[1]}var _=p>d?1:-1,y=1,m=n(t),b=Math.max(m[0],Math.min(m[1],(h-l)/3)),w=Math.max(m[0],Math.min(m[1],t.r0||b)),x=Math.max(m[0],Math.min(m[1],t.r1||b)),E=h-l,k=p-d-_*(w+x),M=Math.sqrt(E*E+k*k),j=-_*Math.acos(Math.min(1,(w+x)/M)),A=Math.atan2(k,E),L=Math.PI/2+_*(A+j),I=s*_*Math.sin(L),N=s*Math.cos(L),C=l+y*w*Math.sin(Math.abs(L)),O=h-y*x*Math.sin(Math.abs(L)),P=d+w*_*(1-Math.cos(L)),z=p-x*_*(1-Math.cos(L));(isNaN(L)||Math.abs(L)<.001)&&(L=w=x=0,C=l,O=h,P=d,z=p,I=0,N=s);var R;return R="M"+[l,d-s]+" "+r(1,w)+[C+I,P-N]+" L"+[O+I,z-N]+" "+r(-1,x)+[h,p-s]+" L"+[h,p+s]+" "+r(1,x)+[O-I,z+N]+" L"+[C-I,P+N]+" "+r(-1,w)+[l,d+s]+" Z",/NaN/.test(R)&&console.error("path NaN",t,R),R}function e(n){function t(n){var t=n>0?1:0,u=n>0?e+r:e-r;return"A"+u+" "+u+" "+Math.abs(i)+" 1 "+t+" "}var r=Math.max(f(n),n.dy)/2,e=1.5*r,i=2*Math.PI,u=n.x0,o=n.y0;return"M"+[u+.1,o-r]+" "+t(1)+[u-.1,o-r]+" L"+[u-.1,o+r]+" "+t(-1)+[u+.1,o+r]+" Z"}function i(n){function t(n){var t=n*h>0?1:0,e=n*h>0?l+r:l-r;return 0===h&&(e=l),"A"+e+" "+e+" "+Math.abs(h)+" 0 "+t+" "}var r=Math.max(f(n),n.dy)/2,e=n.x0,i=n.x1,u=n.y0,o=n.y1,a=n.x1-n.x0,c=n.y1-n.y0,s=(n.r0+n.r1)/2||5+r,l=Math.min(Math.abs(o-u)/2.1,s),h=Math.atan2(c-2*l,a),d=(Math.sqrt(Math.max(0,a*a+(c-2*l)*(c-2*l))),n.y1>n.y0?1:-1),p=r*Math.sin(h),v=r*Math.cos(h),g=n.x0+l*Math.sin(Math.abs(h)),_=n.x1+l*Math.sin(Math.abs(h)),y=n.y0+l*d*(1-Math.cos(h)),m=n.y1-l*d*(1-Math.cos(h));return"M"+[e,u-r]+" "+t(1)+[g+p,y-v]+" L"+[_+p,m-v]+" "+t(1)+[i,o+r]+" L"+[i,o-r]+" "+t(-1)+[_-p,m+v]+" L"+[g-p,y+v]+" "+t(-1)+[e,u+r]+" Z"}function u(n){function t(n){var t=n*a>0?1:0,e=n*a>0?c+r:c-r;return 0===a&&(e=c),"A"+e+" "+e+" "+Math.abs(a)+" 0 "+t+" "}var r=Math.max(f(n),n.dy)/2,e=n.x0,i=n.x1,u=n.y0,o=n.y1,a=(n.x1,n.x0,n.y1,n.y0,Math.PI/2),c=Math.max(0,i-e),s=(n.y1,n.y0,u+c);return"M"+[e,u-r]+" "+t(1)+[i+r,s]+" L"+[i+r,o]+" "+[i-r,o]+" "+[i-r,s]+" "+t(-1)+[e,u+r]+" Z"}function o(n){function t(n){var t=n*a>0?1:0,e=n*a>0?c+r:c-r;return 0===a&&(e=c),"A"+e+" "+e+" "+Math.abs(a)+" 0 "+t+" "}var r=Math.max(f(n),n.dy)/2,e=n.x0,i=n.x1,u=n.y0,o=n.y1,a=(n.x1,n.x0,n.y1,n.y0,Math.PI/2),c=Math.max(0,i-e),s=(n.y1,n.y0,o-c);return"M"+[e-r,u]+" L"+[e+r,u]+" "+[e+r,s]+" "+t(-1)+[i,o-r]+" L"+[i,o+r]+" "+t(1)+[e-r,s]+" Z"}function a(n){function t(n){var t=n*h>0?1:0,e=-n*h>0?l+r:l-r;return 0===h&&(e=l),"A"+e+" "+e+" "+Math.abs(h)+" 0 "+t+" "}var r=Math.max(f(n),n.dy)/2,e=n.x0,i=n.x1,u=n.y0,o=n.y1,a=n.x1-n.x0,c=n.y1-n.y0,s=(n.r0+n.r1)/2||5+r,l=Math.min(Math.abs(c)/2.1,s),h=Math.atan2(c-2*l,a),d=(Math.sqrt(Math.max(0,a*a+(c-2*l)*(c-2*l))),n.y1>n.y0?1:-1),p=r*Math.sin(h),v=r*Math.cos(h),g=n.x0-l*Math.sin(Math.abs(h)),_=n.x1-l*Math.sin(Math.abs(h)),y=n.y0+l*d*(1-Math.cos(h)),m=n.y1-l*d*(1-Math.cos(h));return"M"+[e,u-r]+" "+t(-1)+[g-p,y-v]+" L"+[_-p,m-v]+" "+t(-1)+[i,o+r]+" L"+[i,o-r]+" "+t(1)+[_+p,m-v]+" L"+[g+p,y-v]+" "+t(1)+[e,u+r]+" Z"}var f=Jn;return t.minWidth=function(n){return arguments.length?(f=Hn(n),t):f},t}function Hn(n){if("function"!=typeof n)throw new Error;return n}function Qn(){function n(n){function e(n){var t=s.get(this),r=t.titleAbove?-10:(n.y1-n.y0)/2;return"translate("+(t.right?1:-1)*(t.titleAbove?4:-4)+","+r+")"}var u=n.selection?n.selection():n;u.select("text").empty()&&(u.append("title"),u.append("text").attr("dy",".35em"),u.append("line").attr("x1",0).attr("x2",0),u.append("rect").attr("x",-5).attr("y",-5).attr("width",10).style("fill","none").style("visibility","hidden").style("pointer-events","all"),u.attr("transform",nt));var o=u.select("title"),a=u.select("text"),f=u.select("line"),c=u.select("rect"),s=i.local();u.each(function(n){var t=tt(n);t.dy=n.y0===n.y1?0:Math.max(1,n.y1-n.y0),s.set(this,t)}),o.text(t),a.attr("text-anchor",function(n){return s.get(this).right?"end":"start"}).text(t).each(rt,100),n!==u&&(a=a.transition(n),f=f.transition(n),c=c.transition(n)),n.attr("transform",nt),f.attr("y1",function(n){return s.get(this).titleAbove?-5:0}).attr("y2",function(n){return s.get(this).dy}).style("display",function(n){return n.y0!==n.y1&&r(n)?"inline":"none"}),c.attr("height",function(n){return s.get(this).dy+5}),a.attr("transform",e).style("display",function(n){return n.y0!==n.y1&&r(n)?"inline":"none"})}var t=function(n){return void 0!==n.title?n.title:n.id},r=function(n){return!!t(n)};return n.nodeVisible=function(t){return arguments.length?(r=et(t),n):r},n.nodeTitle=function(r){return arguments.length?(t=et(r),n):t},n}function nt(n){return"translate("+n.x0+","+n.y0+")"}function tt(n){var t=!1,r=!1;return t=n.spaceAbove>20&&"type"!==n.style,0===n.incoming.length?(r=!0,t=!1):0===n.outgoing.length&&(r=!1,t=!1),{titleAbove:t,right:r}}function rt(n,t){var r=i.select(this),e=r.text().split(/\n/);1!==e.length&&(r.text(null),e.forEach(function(n,t){r.append("tspan").attr("x",0).attr("dy",1.1*(0===t?.7-e.length/2:1)+"em").text(n)}))}function et(n){if("function"!=typeof n)throw new Error;return n}function it(n,t){var r={top:Number.MAX_VALUE,left:Number.MAX_VALUE,bottom:0,right:0};return t.nodes.forEach(function(t){var e=n.get(t);e&&(e.x0<r.left&&(r.left=e.x0),e.x1>r.right&&(r.right=e.x1),e.y0<r.top&&(r.top=e.y0),e.y1>r.bottom&&(r.bottom=e.y1))}),t.rect=r,t}function ut(n,t,r){return function(e){var i=[],u=n(e.source),o=n(e.target),a=t(e);return i.push(u+" → "+o),a&&i.push(a),i.push(r(e.value)),i.join("\n")}}function ot(){function n(n){(n.selection?n.selection():n).each(function(e){var u=i.select(this),o=u.selectAll(".sankey").data([{type:"sankey"}]),a=o.enter().append("g").classed("sankey",!0);a.append("g").classed("groups",!0),a.append("g").classed("links",!0),a.append("g").classed("nodes",!0),a.append("g").classed("slice-titles",!0),o=o.merge(a),o.attr("transform","translate("+v.left+","+v.top+")");var s=r.map(e.nodes,function(n){return n.id}),l=(y||[]).map(function(n){return it(s,n)});t(o,n,e.nodes),f(o,n,e.links),c(u,l),u.on("click",function(){k.call("selectNode",this,null),k.call("selectLink",this,null)})})}function t(n,t,r){var e=n.select(".nodes").selectAll(".node").data(r,function(n){return n.id});e.exit().remove(),e=e.merge(e.enter().append("g").attr("class","node").call(b).on("click",p)),t instanceof u.transition?e.transition(t).call(b):e.call(b)}function f(n,t,r){var e=n.select(".links").selectAll(".link").data(r,function(n){return n.source.id+"-"+n.target.id+"-"+n.type});e.exit().remove();var o=e.enter().append("g").attr("class","link").on("click",d);o.append("path").attr("d",w).style("fill","white").each(function(n){this._current=n}),o.append("title"),e=e.merge(o),t instanceof u.transition?e.transition(t).select("path").style("fill",x).each(function(n){i.select(this).transition(t).attrTween("d",s)}):e.select("path").style("fill",x).attr("d",w),e.select("title").text(E),e.classed("selected",function(n){return n.id===_}),e.sort(h)}function c(n,t){var r=n.select(".groups").selectAll(".group").data(t);r.exit().remove();var e=r.enter().append("g").attr("class","group");e.append("rect"),e.append("text").attr("x",-10).attr("y",-25),r=r.merge(e),r.style("display",function(n){return n.title&&n.nodes.length>1?"inline":"none"}).attr("transform",function(n){return"translate("+n.rect.left+","+n.rect.top+")"}).select("rect").attr("x",-10).attr("y",-20).attr("width",function(n){return n.rect.right-n.rect.left+20}).attr("height",function(n){return n.rect.bottom-n.rect.top+30}),r.select("text").text(function(n){return n.title})}function s(n){n.points.forEach(function(n){n.ri>1e3&&(n.ri=1e3),n.ro>1e3&&(n.ro=1e3)});var t=e.interpolate(l(this._current),n),r=this;return function(n){return r._current=t(n),w(r._current)}}function l(n){return{points:n.points,dy:n.dy}}function h(n,t){return n.id===_?1:t.id===_?-1:!n.source||n.target&&"d"===n.target.direction?-1:!t.source||t.target&&"d"===t.target.direction?1:!n.target||n.source&&"d"===n.source.direction?-1:!t.target||t.source&&"d"===t.source.direction?1:n.dy-t.dy}function d(n){i.event.stopPropagation();var t=i.select(this).node();k.call("selectLink",t,n)}function p(n){i.event.stopPropagation();var t=i.select(this).node();k.call("selectNode",t,n)}var v={top:0,right:0,bottom:0,left:0},g=null,_=null,y=[],m=a.format(".3s"),b=Qn(),w=Xn(),x=function(n){return null},E=ut(b.nodeTitle(),function(n){return n.type},m),k=o.dispatch("selectNode","selectGroup","selectLink");return n.margins=function(n){return arguments.length?(v={top:void 0===n.top?v.top:n.top,left:void 0===n.left?v.left:n.left,bottom:void 0===n.bottom?v.bottom:n.bottom,right:void 0===n.right?v.right:n.right},this):v},n.groups=function(n){return arguments.length?(y=n,this):y},n.nodeTitle=function(n){ | |
return arguments.length?(b.nodeTitle(n),E=ut(n,function(n){return n.type},m),this):b.nodeTitle()},n.linkTitle=function(n){return arguments.length?(E=n,this):E},n.linkColor=function(n){return arguments.length?(x=n,this):x},n.linkMinWidth=function(n){return arguments.length?(w.minWidth(n),this):w.minWidth()},n.selectNode=function(n){return g=n,this},n.selectLink=function(n){return _=n,this},n.on=function(){var t=k.on.apply(k,arguments);return t===k?n:t},n}var at,ft="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ct=function(n,t){return t={exports:{}},n(t,t.exports),t.exports}(function(n,t){(function(){function r(n,t){return n.set(t[0],t[1]),n}function e(n,t){return n.add(t),n}function i(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function u(n,t,r,e){for(var i=-1,u=null==n?0:n.length;++i<u;){var o=n[i];t(e,o,r(o),n)}return e}function o(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&!1!==t(n[r],r,n););return n}function a(n,t){for(var r=null==n?0:n.length;r--&&!1!==t(n[r],r,n););return n}function f(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return!1;return!0}function c(n,t){for(var r=-1,e=null==n?0:n.length,i=0,u=[];++r<e;){var o=n[r];t(o,r,n)&&(u[i++]=o)}return u}function s(n,t){return!!(null==n?0:n.length)&&w(n,t,0)>-1}function l(n,t,r){for(var e=-1,i=null==n?0:n.length;++e<i;)if(r(t,n[e]))return!0;return!1}function h(n,t){for(var r=-1,e=null==n?0:n.length,i=Array(e);++r<e;)i[r]=t(n[r],r,n);return i}function d(n,t){for(var r=-1,e=t.length,i=n.length;++r<e;)n[i+r]=t[r];return n}function p(n,t,r,e){var i=-1,u=null==n?0:n.length;for(e&&u&&(r=n[++i]);++i<u;)r=t(r,n[i],i,n);return r}function v(n,t,r,e){var i=null==n?0:n.length;for(e&&i&&(r=n[--i]);i--;)r=t(r,n[i],i,n);return r}function g(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}function _(n){return n.split("")}function y(n){return n.match(Wt)||[]}function m(n,t,r){var e;return r(n,function(n,r,i){if(t(n,r,i))return e=r,!1}),e}function b(n,t,r,e){for(var i=n.length,u=r+(e?1:-1);e?u--:++u<i;)if(t(n[u],u,n))return u;return-1}function w(n,t,r){return t===t?Y(n,t,r):b(n,E,r)}function x(n,t,r,e){for(var i=r-1,u=n.length;++i<u;)if(e(n[i],t))return i;return-1}function E(n){return n!==n}function k(n,t){var r=null==n?0:n.length;return r?I(n,t)/r:Pn}function M(n){return function(t){return null==t?tn:t[n]}}function j(n){return function(t){return null==n?tn:n[t]}}function A(n,t,r,e,i){return i(n,function(n,i,u){r=e?(e=!1,n):t(r,n,i,u)}),r}function L(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].value;return n}function I(n,t){for(var r,e=-1,i=n.length;++e<i;){var u=t(n[e]);u!==tn&&(r=r===tn?u:r+u)}return r}function N(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function C(n,t){return h(t,function(t){return[t,n[t]]})}function O(n){return function(t){return n(t)}}function P(n,t){return h(t,function(t){return n[t]})}function z(n,t){return n.has(t)}function R(n,t){for(var r=-1,e=n.length;++r<e&&w(t,n[r],0)>-1;);return r}function S(n,t){for(var r=n.length;r--&&w(t,n[r],0)>-1;);return r}function T(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;return e}function U(n){return"\\"+jr[n]}function W(n,t){return null==n?tn:n[t]}function D(n){return _r.test(n)}function B(n){return yr.test(n)}function F(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function $(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function q(n,t){return function(r){return n(t(r))}}function V(n,t){for(var r=-1,e=n.length,i=0,u=[];++r<e;){var o=n[r];o!==t&&o!==fn||(n[r]=fn,u[i++]=r)}return u}function Z(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function G(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function Y(n,t,r){for(var e=r-1,i=n.length;++e<i;)if(n[e]===t)return e;return-1}function K(n,t,r){for(var e=r+1;e--;)if(n[e]===t)return e;return e}function J(n){return D(n)?H(n):$r(n)}function X(n){return D(n)?Q(n):_(n)}function H(n){for(var t=vr.lastIndex=0;vr.test(n);)++t;return t}function Q(n){return n.match(vr)||[]}function nn(n){return n.match(gr)||[]}var tn,rn=200,en="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",un="Expected a function",on="__lodash_hash_undefined__",an=500,fn="__lodash_placeholder__",cn=1,sn=2,ln=4,hn=1,dn=2,pn=1,vn=2,gn=4,_n=8,yn=16,mn=32,bn=64,wn=128,xn=256,En=512,kn=30,Mn="...",jn=800,An=16,Ln=1,In=2,Nn=1/0,Cn=9007199254740991,On=1.7976931348623157e308,Pn=NaN,zn=4294967295,Rn=zn-1,Sn=zn>>>1,Tn=[["ary",wn],["bind",pn],["bindKey",vn],["curry",_n],["curryRight",yn],["flip",En],["partial",mn],["partialRight",bn],["rearg",xn]],Un="[object Arguments]",Wn="[object Array]",Dn="[object AsyncFunction]",Bn="[object Boolean]",Fn="[object Date]",$n="[object DOMException]",qn="[object Error]",Vn="[object Function]",Zn="[object GeneratorFunction]",Gn="[object Map]",Yn="[object Number]",Kn="[object Null]",Jn="[object Object]",Xn="[object Proxy]",Hn="[object RegExp]",Qn="[object Set]",nt="[object String]",tt="[object Symbol]",rt="[object Undefined]",et="[object WeakMap]",it="[object WeakSet]",ut="[object ArrayBuffer]",ot="[object DataView]",at="[object Float32Array]",ct="[object Float64Array]",st="[object Int8Array]",lt="[object Int16Array]",ht="[object Int32Array]",dt="[object Uint8Array]",pt="[object Uint8ClampedArray]",vt="[object Uint16Array]",gt="[object Uint32Array]",_t=/\b__p \+= '';/g,yt=/\b(__p \+=) '' \+/g,mt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,bt=/&(?:amp|lt|gt|quot|#39);/g,wt=/[&<>"']/g,xt=RegExp(bt.source),Et=RegExp(wt.source),kt=/<%-([\s\S]+?)%>/g,Mt=/<%([\s\S]+?)%>/g,jt=/<%=([\s\S]+?)%>/g,At=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Lt=/^\w*$/,It=/^\./,Nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ct=/[\\^$.*+?()[\]{}|]/g,Ot=RegExp(Ct.source),Pt=/^\s+|\s+$/g,zt=/^\s+/,Rt=/\s+$/,St=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Tt=/\{\n\/\* \[wrapped with (.+)\] \*/,Ut=/,? & /,Wt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Dt=/\\(\\)?/g,Bt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ft=/\w*$/,$t=/^[-+]0x[0-9a-f]+$/i,qt=/^0b[01]+$/i,Vt=/^\[object .+?Constructor\]$/,Zt=/^0o[0-7]+$/i,Gt=/^(?:0|[1-9]\d*)$/,Yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Kt=/($^)/,Jt=/['\n\r\u2028\u2029\\]/g,Xt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ht="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Qt="["+Ht+"]",nr="["+Xt+"]",tr="[a-z\\xdf-\\xf6\\xf8-\\xff]",rr="[^\\ud800-\\udfff"+Ht+"\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",er="\\ud83c[\\udffb-\\udfff]",ir="(?:\\ud83c[\\udde6-\\uddff]){2}",ur="[\\ud800-\\udbff][\\udc00-\\udfff]",or="[A-Z\\xc0-\\xd6\\xd8-\\xde]",ar="(?:"+tr+"|"+rr+")",fr="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",cr="(?:\\u200d(?:"+["[^\\ud800-\\udfff]",ir,ur].join("|")+")[\\ufe0e\\ufe0f]?"+fr+")*",sr="[\\ufe0e\\ufe0f]?"+fr+cr,lr="(?:"+["[\\u2700-\\u27bf]",ir,ur].join("|")+")"+sr,hr="(?:"+["[^\\ud800-\\udfff]"+nr+"?",nr,ir,ur,"[\\ud800-\\udfff]"].join("|")+")",dr=RegExp("['’]","g"),pr=RegExp(nr,"g"),vr=RegExp(er+"(?="+er+")|"+hr+sr,"g"),gr=RegExp([or+"?"+tr+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[Qt,or,"$"].join("|")+")","(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[Qt,or+ar,"$"].join("|")+")",or+"?"+ar+"+(?:['’](?:d|ll|m|re|s|t|ve))?",or+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)","\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)","\\d+",lr].join("|"),"g"),_r=RegExp("[\\u200d\\ud800-\\udfff"+Xt+"\\ufe0e\\ufe0f]"),yr=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,mr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],br=-1,wr={};wr[at]=wr[ct]=wr[st]=wr[lt]=wr[ht]=wr[dt]=wr[pt]=wr[vt]=wr[gt]=!0,wr[Un]=wr[Wn]=wr[ut]=wr[Bn]=wr[ot]=wr[Fn]=wr[qn]=wr[Vn]=wr[Gn]=wr[Yn]=wr[Jn]=wr[Hn]=wr[Qn]=wr[nt]=wr[et]=!1;var xr={};xr[Un]=xr[Wn]=xr[ut]=xr[ot]=xr[Bn]=xr[Fn]=xr[at]=xr[ct]=xr[st]=xr[lt]=xr[ht]=xr[Gn]=xr[Yn]=xr[Jn]=xr[Hn]=xr[Qn]=xr[nt]=xr[tt]=xr[dt]=xr[pt]=xr[vt]=xr[gt]=!0,xr[qn]=xr[Vn]=xr[et]=!1;var Er={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},kr={"&":"&","<":"<",">":">",'"':""","'":"'"},Mr={"&":"&","<":"<",">":">",""":'"',"'":"'"},jr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ar=parseFloat,Lr=parseInt,Ir="object"==typeof ft&&ft&&ft.Object===Object&&ft,Nr="object"==typeof self&&self&&self.Object===Object&&self,Cr=Ir||Nr||Function("return this")(),Or=t&&!t.nodeType&&t,Pr=Or&&!0&&n&&!n.nodeType&&n,zr=Pr&&Pr.exports===Or,Rr=zr&&Ir.process,Sr=function(){try{return Rr&&Rr.binding&&Rr.binding("util")}catch(n){}}(),Tr=Sr&&Sr.isArrayBuffer,Ur=Sr&&Sr.isDate,Wr=Sr&&Sr.isMap,Dr=Sr&&Sr.isRegExp,Br=Sr&&Sr.isSet,Fr=Sr&&Sr.isTypedArray,$r=M("length"),qr=j(Er),Vr=j(kr),Zr=j(Mr),Gr=function n(t){function _(n){if(of(n)&&!_h(n)&&!(n instanceof H)){if(n instanceof Y)return n;if(_s.call(n,"__wrapped__"))return to(n)}return new Y(n)}function j(){}function Y(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=tn}function H(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=zn,this.__views__=[]}function Q(){var n=new H(this.__wrapped__);return n.__actions__=Ti(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Ti(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Ti(this.__views__),n}function ft(){if(this.__filtered__){var n=new H(this);n.__dir__=-1,n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function Wt(){var n=this.__wrapped__.value(),t=this.__dir__,r=_h(n),e=t<0,i=r?n.length:0,u=ju(0,i,this.__views__),o=u.start,a=u.end,f=a-o,c=e?a:o-1,s=this.__iteratees__,l=s.length,h=0,d=Gs(f,this.__takeCount__);if(!r||!e&&i==f&&d==f)return yi(n,this.__actions__);var p=[];n:for(;f--&&h<d;){c+=t;for(var v=-1,g=n[c];++v<l;){var _=s[v],y=_.iteratee,m=_.type,b=y(g);if(m==In)g=b;else if(!b){if(m==Ln)continue n;break n}}p[h++]=g}return p}function Xt(n){var t=this,r=-1,e=null==n?0:n.length;for(this.clear();++r<e;){var i=n[r];t.set(i[0],i[1])}}function Ht(){this.__data__=el?el(null):{},this.size=0}function Qt(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}function nr(n){var t=this.__data__;if(el){var r=t[n];return r===on?tn:r}return _s.call(t,n)?t[n]:tn}function tr(n){var t=this.__data__;return el?t[n]!==tn:_s.call(t,n)}function rr(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=el&&t===tn?on:t,this}function er(n){var t=this,r=-1,e=null==n?0:n.length;for(this.clear();++r<e;){var i=n[r];t.set(i[0],i[1])}}function ir(){this.__data__=[],this.size=0}function ur(n){var t=this.__data__,r=Jr(t,n);return!(r<0)&&(r==t.length-1?t.pop():Cs.call(t,r,1),--this.size,!0)}function or(n){var t=this.__data__,r=Jr(t,n);return r<0?tn:t[r][1]}function ar(n){return Jr(this.__data__,n)>-1}function fr(n,t){var r=this.__data__,e=Jr(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this}function cr(n){var t=this,r=-1,e=null==n?0:n.length;for(this.clear();++r<e;){var i=n[r];t.set(i[0],i[1])}}function sr(){this.size=0,this.__data__={hash:new Xt,map:new(Qs||er),string:new Xt}}function lr(n){var t=xu(this,n).delete(n);return this.size-=t?1:0,t}function hr(n){return xu(this,n).get(n)}function vr(n){return xu(this,n).has(n)}function gr(n,t){var r=xu(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this}function _r(n){var t=this,r=-1,e=null==n?0:n.length;for(this.__data__=new cr;++r<e;)t.add(n[r])}function yr(n){return this.__data__.set(n,on),this}function Er(n){return this.__data__.has(n)}function kr(n){var t=this.__data__=new er(n);this.size=t.size}function Mr(){this.__data__=new er,this.size=0}function jr(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r}function Ir(n){return this.__data__.get(n)}function Nr(n){return this.__data__.has(n)}function Or(n,t){var r=this.__data__;if(r instanceof er){var e=r.__data__;if(!Qs||e.length<rn-1)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new cr(e)}return r.set(n,t),this.size=r.size,this}function Pr(n,t){var r=_h(n),e=!r&&gh(n),i=!r&&!e&&mh(n),u=!r&&!e&&!i&&kh(n),o=r||e||i||u,a=o?N(n.length,ss):[],f=a.length;for(var c in n)!t&&!_s.call(n,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||u&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||zu(c,f))||a.push(c);return a}function Rr(n){var t=n.length;return t?n[Qe(0,t-1)]:tn}function Sr(n,t){return Xu(Ti(n),re(t,0,n.length))}function $r(n){return Xu(Ti(n))}function Yr(n,t,r){(r===tn||Va(n[t],r))&&(r!==tn||t in n)||ne(n,t,r)}function Kr(n,t,r){var e=n[t];_s.call(n,t)&&Va(e,r)&&(r!==tn||t in n)||ne(n,t,r)}function Jr(n,t){for(var r=n.length;r--;)if(Va(n[r][0],t))return r;return-1}function Xr(n,t,r,e){return vl(n,function(n,i,u){t(e,n,r(n),u)}),e}function Hr(n,t){return n&&Ui(t,Bf(t),n)}function Qr(n,t){return n&&Ui(t,Ff(t),n)}function ne(n,t,r){"__proto__"==t&&Rs?Rs(n,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[t]=r}function te(n,t){for(var r=-1,e=t.length,i=es(e),u=null==n;++r<e;)i[r]=u?tn:Uf(n,t[r]);return i}function re(n,t,r){return n===n&&(r!==tn&&(n=n<=r?n:r),t!==tn&&(n=n>=t?n:t)),n}function ee(n,t,r,e,i,u){var a,f=t&cn,c=t&sn,s=t&ln;if(r&&(a=i?r(n,e,i,u):r(n)),a!==tn)return a;if(!uf(n))return n;var l=_h(n);if(l){if(a=Iu(n),!f)return Ti(n,a)}else{var h=Al(n),d=h==Vn||h==Zn;if(mh(n))return Mi(n,f);if(h==Jn||h==Un||d&&!i){if(a=c||d?{}:Nu(n),!f)return c?Di(n,Qr(a,n)):Wi(n,Hr(a,n))}else{if(!xr[h])return i?n:{};a=Cu(n,h,ee,f)}}u||(u=new kr);var p=u.get(n);if(p)return p;u.set(n,a);var v=s?c?yu:_u:c?Ff:Bf,g=l?tn:v(n);return o(g||n,function(e,i){g&&(i=e,e=n[i]),Kr(a,i,ee(e,t,r,i,n,u))}),a}function ie(n){var t=Bf(n);return function(r){return ue(r,n,t)}}function ue(n,t,r){var e=r.length;if(null==n)return!e;for(n=fs(n);e--;){var i=r[e],u=t[i],o=n[i];if(o===tn&&!(i in n)||!u(o))return!1}return!0}function oe(n,t,r){if("function"!=typeof n)throw new ls(un);return Nl(function(){n.apply(tn,r)},t)}function ae(n,t,r,e){var i=-1,u=s,o=!0,a=n.length,f=[],c=t.length;if(!a)return f;r&&(t=h(t,O(r))),e?(u=l,o=!1):t.length>=rn&&(u=z,o=!1,t=new _r(t));n:for(;++i<a;){var d=n[i],p=null==r?d:r(d);if(d=e||0!==d?d:0,o&&p===p){for(var v=c;v--;)if(t[v]===p)continue n;f.push(d)}else u(t,p,e)||f.push(d)}return f}function fe(n,t){var r=!0;return vl(n,function(n,e,i){return r=!!t(n,e,i)}),r}function ce(n,t,r){for(var e=-1,i=n.length;++e<i;){var u=n[e],o=t(u);if(null!=o&&(a===tn?o===o&&!_f(o):r(o,a)))var a=o,f=u}return f}function se(n,t,r,e){var i=n.length;for(r=Ef(r),r<0&&(r=-r>i?0:i+r),e=e===tn||e>i?i:Ef(e),e<0&&(e+=i),e=r>e?0:kf(e);r<e;)n[r++]=t;return n}function le(n,t){var r=[];return vl(n,function(n,e,i){t(n,e,i)&&r.push(n)}),r}function he(n,t,r,e,i){var u=-1,o=n.length;for(r||(r=Pu),i||(i=[]);++u<o;){var a=n[u];t>0&&r(a)?t>1?he(a,t-1,r,e,i):d(i,a):e||(i[i.length]=a)}return i}function de(n,t){return n&&_l(n,t,Bf)}function pe(n,t){return n&&yl(n,t,Bf)}function ve(n,t){return c(t,function(t){return tf(n[t])})}function ge(n,t){t=Ei(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[Hu(t[r++])];return r&&r==e?n:tn}function _e(n,t,r){var e=t(n);return _h(n)?e:d(e,r(n))}function ye(n){return null==n?n===tn?rt:Kn:zs&&zs in fs(n)?Mu(n):Vu(n)}function me(n,t){return n>t}function be(n,t){return null!=n&&_s.call(n,t)}function we(n,t){return null!=n&&t in fs(n)}function xe(n,t,r){return n>=Gs(t,r)&&n<Zs(t,r)}function Ee(n,t,r){for(var e=r?l:s,i=n[0].length,u=n.length,o=u,a=es(u),f=1/0,c=[];o--;){var d=n[o];o&&t&&(d=h(d,O(t))),f=Gs(d.length,f),a[o]=!r&&(t||i>=120&&d.length>=120)?new _r(o&&d):tn}d=n[0];var p=-1,v=a[0];n:for(;++p<i&&c.length<f;){var g=d[p],_=t?t(g):g;if(g=r||0!==g?g:0,!(v?z(v,_):e(c,_,r))){for(o=u;--o;){var y=a[o];if(!(y?z(y,_):e(n[o],_,r)))continue n}v&&v.push(_),c.push(g)}}return c}function ke(n,t,r,e){return de(n,function(n,i,u){t(e,r(n),i,u)}),e}function Me(n,t,r){t=Ei(t,n),n=Gu(n,t);var e=null==n?n:n[Hu(wo(t))];return null==e?tn:i(e,n,r)}function je(n){return of(n)&&ye(n)==Un}function Ae(n){return of(n)&&ye(n)==ut}function Le(n){return of(n)&&ye(n)==Fn}function Ie(n,t,r,e,i){return n===t||(null==n||null==t||!of(n)&&!of(t)?n!==n&&t!==t:Ne(n,t,r,e,Ie,i))}function Ne(n,t,r,e,i,u){var o=_h(n),a=_h(t),f=o?Wn:Al(n),c=a?Wn:Al(t);f=f==Un?Jn:f,c=c==Un?Jn:c;var s=f==Jn,l=c==Jn,h=f==c;if(h&&mh(n)){if(!mh(t))return!1;o=!0,s=!1}if(h&&!s)return u||(u=new kr),o||kh(n)?du(n,t,r,e,i,u):pu(n,t,f,r,e,i,u);if(!(r&hn)){var d=s&&_s.call(n,"__wrapped__"),p=l&&_s.call(t,"__wrapped__");if(d||p){var v=d?n.value():n,g=p?t.value():t;return u||(u=new kr),i(v,g,r,e,u)}}return!!h&&(u||(u=new kr),vu(n,t,r,e,i,u))}function Ce(n){return of(n)&&Al(n)==Gn}function Oe(n,t,r,e){var i=r.length,u=i,o=!e;if(null==n)return!u;for(n=fs(n);i--;){var a=r[i];if(o&&a[2]?a[1]!==n[a[0]]:!(a[0]in n))return!1}for(;++i<u;){a=r[i];var f=a[0],c=n[f],s=a[1];if(o&&a[2]){if(c===tn&&!(f in n))return!1}else{var l=new kr;if(e)var h=e(c,s,f,n,t,l);if(!(h===tn?Ie(s,c,hn|dn,e,l):h))return!1}}return!0}function Pe(n){return!(!uf(n)||Wu(n))&&(tf(n)?Es:Vt).test(Qu(n))}function ze(n){return of(n)&&ye(n)==Hn}function Re(n){return of(n)&&Al(n)==Qn}function Se(n){return of(n)&&ef(n.length)&&!!wr[ye(n)]}function Te(n){return"function"==typeof n?n:null==n?Cc:"object"==typeof n?_h(n)?$e(n[0],n[1]):Fe(n):Wc(n)}function Ue(n){if(!Du(n))return Vs(n);var t=[];for(var r in fs(n))_s.call(n,r)&&"constructor"!=r&&t.push(r);return t}function We(n){if(!uf(n))return qu(n);var t=Du(n),r=[];for(var e in n)("constructor"!=e||!t&&_s.call(n,e))&&r.push(e);return r}function De(n,t){return n<t}function Be(n,t){var r=-1,e=Za(n)?es(n.length):[];return vl(n,function(n,i,u){e[++r]=t(n,i,u)}),e}function Fe(n){var t=Eu(n);return 1==t.length&&t[0][2]?Fu(t[0][0],t[0][1]):function(r){return r===n||Oe(r,n,t)}}function $e(n,t){return Su(n)&&Bu(t)?Fu(Hu(n),t):function(r){var e=Uf(r,n);return e===tn&&e===t?Df(r,n):Ie(t,e,hn|dn)}}function qe(n,t,r,e,i){n!==t&&_l(t,function(u,o){if(uf(u))i||(i=new kr),Ve(n,t,o,r,qe,e,i);else{var a=e?e(n[o],u,o+"",n,t,i):tn;a===tn&&(a=u),Yr(n,o,a)}},Ff)}function Ve(n,t,r,e,i,u,o){var a=n[r],f=t[r],c=o.get(f);if(c)return void Yr(n,r,c);var s=u?u(a,f,r+"",n,t,o):tn,l=s===tn;if(l){var h=_h(f),d=!h&&mh(f),p=!h&&!d&&kh(f);s=f,h||d||p?_h(a)?s=a:Ga(a)?s=Ti(a):d?(l=!1,s=Mi(f,!0)):p?(l=!1,s=Oi(f,!0)):s=[]:pf(f)||gh(f)?(s=a,gh(a)?s=jf(a):(!uf(a)||e&&tf(a))&&(s=Nu(f))):l=!1}l&&(o.set(f,s),i(s,f,e,u,o),o.delete(f)),Yr(n,r,s)}function Ze(n,t){var r=n.length;if(r)return t+=t<0?r:0,zu(t,r)?n[t]:tn}function Ge(n,t,r){var e=-1;return t=h(t.length?t:[Cc],O(wu())),L(Be(n,function(n,r,i){return{criteria:h(t,function(t){return t(n)}),index:++e,value:n}}),function(n,t){return zi(n,t,r)})}function Ye(n,t){return Ke(n,t,function(t,r){return Df(n,r)})}function Ke(n,t,r){for(var e=-1,i=t.length,u={};++e<i;){var o=t[e],a=ge(n,o);r(a,o)&&ui(u,Ei(o,n),a)}return u}function Je(n){return function(t){return ge(t,n)}}function Xe(n,t,r,e){var i=e?x:w,u=-1,o=t.length,a=n;for(n===t&&(t=Ti(t)),r&&(a=h(n,O(r)));++u<o;)for(var f=0,c=t[u],s=r?r(c):c;(f=i(a,s,f,e))>-1;)a!==n&&Cs.call(a,f,1),Cs.call(n,f,1);return n}function He(n,t){for(var r=n?t.length:0,e=r-1;r--;){var i=t[r];if(r==e||i!==u){var u=i;zu(i)?Cs.call(n,i,1):vi(n,i)}}return n}function Qe(n,t){return n+Ds(Js()*(t-n+1))}function ni(n,t,r,e){for(var i=-1,u=Zs(Ws((t-n)/(r||1)),0),o=es(u);u--;)o[e?u:++i]=n,n+=r;return o}function ti(n,t){var r="";if(!n||t<1||t>Cn)return r;do{t%2&&(r+=n),(t=Ds(t/2))&&(n+=n)}while(t);return r}function ri(n,t){return Cl(Zu(n,t,Cc),n+"")}function ei(n){return Rr(nc(n))}function ii(n,t){var r=nc(n);return Xu(r,re(t,0,r.length))}function ui(n,t,r,e){if(!uf(n))return n;t=Ei(t,n);for(var i=-1,u=t.length,o=u-1,a=n;null!=a&&++i<u;){var f=Hu(t[i]),c=r;if(i!=o){var s=a[f];c=e?e(s,f,a):tn,c===tn&&(c=uf(s)?s:zu(t[i+1])?[]:{})}Kr(a,f,c),a=a[f]}return n}function oi(n){return Xu(nc(n))}function ai(n,t,r){var e=-1,i=n.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var u=es(i);++e<i;)u[e]=n[e+t];return u}function fi(n,t){var r;return vl(n,function(n,e,i){return!(r=t(n,e,i))}),!!r}function ci(n,t,r){var e=0,i=null==n?e:n.length;if("number"==typeof t&&t===t&&i<=Sn){for(;e<i;){var u=e+i>>>1,o=n[u];null!==o&&!_f(o)&&(r?o<=t:o<t)?e=u+1:i=u}return i}return si(n,t,Cc,r)}function si(n,t,r,e){t=r(t);for(var i=0,u=null==n?0:n.length,o=t!==t,a=null===t,f=_f(t),c=t===tn;i<u;){var s=Ds((i+u)/2),l=r(n[s]),h=l!==tn,d=null===l,p=l===l,v=_f(l);if(o)var g=e||p;else g=c?p&&(e||h):a?p&&h&&(e||!d):f?p&&h&&!d&&(e||!v):!d&&!v&&(e?l<=t:l<t);g?i=s+1:u=s}return Gs(u,Rn)}function li(n,t){for(var r=-1,e=n.length,i=0,u=[];++r<e;){var o=n[r],a=t?t(o):o;if(!r||!Va(a,f)){var f=a;u[i++]=0===o?0:o}}return u}function hi(n){return"number"==typeof n?n:_f(n)?Pn:+n}function di(n){if("string"==typeof n)return n;if(_h(n))return h(n,di)+"";if(_f(n))return dl?dl.call(n):"";var t=n+"";return"0"==t&&1/n==-Nn?"-0":t}function pi(n,t,r){var e=-1,i=s,u=n.length,o=!0,a=[],f=a;if(r)o=!1,i=l;else if(u>=rn){var c=t?null:El(n);if(c)return Z(c);o=!1,i=z,f=new _r}else f=t?[]:a;n:for(;++e<u;){var h=n[e],d=t?t(h):h;if(h=r||0!==h?h:0,o&&d===d){for(var p=f.length;p--;)if(f[p]===d)continue n;t&&f.push(d),a.push(h)}else i(f,d,r)||(f!==a&&f.push(d),a.push(h))}return a}function vi(n,t){return t=Ei(t,n),null==(n=Gu(n,t))||delete n[Hu(wo(t))]}function gi(n,t,r,e){return ui(n,t,r(ge(n,t)),e)}function _i(n,t,r,e){for(var i=n.length,u=e?i:-1;(e?u--:++u<i)&&t(n[u],u,n););return r?ai(n,e?0:u,e?u+1:i):ai(n,e?u+1:0,e?i:u)}function yi(n,t){var r=n;return r instanceof H&&(r=r.value()),p(t,function(n,t){return t.func.apply(t.thisArg,d([n],t.args))},r)}function mi(n,t,r){var e=n.length;if(e<2)return e?pi(n[0]):[];for(var i=-1,u=es(e);++i<e;)for(var o=n[i],a=-1;++a<e;)a!=i&&(u[i]=ae(u[i]||o,n[a],t,r));return pi(he(u,1),t,r)}function bi(n,t,r){for(var e=-1,i=n.length,u=t.length,o={};++e<i;){var a=e<u?t[e]:tn;r(o,n[e],a)}return o}function wi(n){return Ga(n)?n:[]}function xi(n){return"function"==typeof n?n:Cc}function Ei(n,t){return _h(n)?n:Su(n,t)?[n]:Ol(Lf(n))}function ki(n,t,r){var e=n.length;return r=r===tn?e:r,!t&&r>=e?n:ai(n,t,r)}function Mi(n,t){if(t)return n.slice();var r=n.length,e=As?As(r):new n.constructor(r);return n.copy(e),e}function ji(n){var t=new n.constructor(n.byteLength);return new js(t).set(new js(n)),t}function Ai(n,t){var r=t?ji(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}function Li(n,t,e){return p(t?e($(n),cn):$(n),r,new n.constructor)}function Ii(n){var t=new n.constructor(n.source,Ft.exec(n));return t.lastIndex=n.lastIndex,t}function Ni(n,t,r){return p(t?r(Z(n),cn):Z(n),e,new n.constructor)}function Ci(n){return hl?fs(hl.call(n)):{}}function Oi(n,t){var r=t?ji(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}function Pi(n,t){if(n!==t){var r=n!==tn,e=null===n,i=n===n,u=_f(n),o=t!==tn,a=null===t,f=t===t,c=_f(t);if(!a&&!c&&!u&&n>t||u&&o&&f&&!a&&!c||e&&o&&f||!r&&f||!i)return 1;if(!e&&!u&&!c&&n<t||c&&r&&i&&!e&&!u||a&&r&&i||!o&&i||!f)return-1}return 0}function zi(n,t,r){for(var e=-1,i=n.criteria,u=t.criteria,o=i.length,a=r.length;++e<o;){var f=Pi(i[e],u[e]);if(f){if(e>=a)return f;return f*("desc"==r[e]?-1:1)}}return n.index-t.index}function Ri(n,t,r,e){for(var i=-1,u=n.length,o=r.length,a=-1,f=t.length,c=Zs(u-o,0),s=es(f+c),l=!e;++a<f;)s[a]=t[a];for(;++i<o;)(l||i<u)&&(s[r[i]]=n[i]);for(;c--;)s[a++]=n[i++];return s}function Si(n,t,r,e){for(var i=-1,u=n.length,o=-1,a=r.length,f=-1,c=t.length,s=Zs(u-a,0),l=es(s+c),h=!e;++i<s;)l[i]=n[i];for(var d=i;++f<c;)l[d+f]=t[f];for(;++o<a;)(h||i<u)&&(l[d+r[o]]=n[i++]);return l}function Ti(n,t){var r=-1,e=n.length;for(t||(t=es(e));++r<e;)t[r]=n[r];return t}function Ui(n,t,r,e){var i=!r;r||(r={});for(var u=-1,o=t.length;++u<o;){var a=t[u],f=e?e(r[a],n[a],a,r,n):tn;f===tn&&(f=n[a]),i?ne(r,a,f):Kr(r,a,f)}return r}function Wi(n,t){return Ui(n,Ml(n),t)}function Di(n,t){return Ui(n,jl(n),t)}function Bi(n,t){return function(r,e){var i=_h(r)?u:Xr,o=t?t():{};return i(r,n,wu(e,2),o)}}function Fi(n){return ri(function(t,r){var e=-1,i=r.length,u=i>1?r[i-1]:tn,o=i>2?r[2]:tn;for(u=n.length>3&&"function"==typeof u?(i--,u):tn,o&&Ru(r[0],r[1],o)&&(u=i<3?tn:u,i=1),t=fs(t);++e<i;){var a=r[e];a&&n(t,a,e,u)}return t})}function $i(n,t){return function(r,e){if(null==r)return r;if(!Za(r))return n(r,e);for(var i=r.length,u=t?i:-1,o=fs(r);(t?u--:++u<i)&&!1!==e(o[u],u,o););return r}}function qi(n){return function(t,r,e){for(var i=-1,u=fs(t),o=e(t),a=o.length;a--;){var f=o[n?a:++i];if(!1===r(u[f],f,u))break}return t}}function Vi(n,t,r){function e(){return(this&&this!==Cr&&this instanceof e?u:n).apply(i?r:this,arguments)}var i=t&pn,u=Yi(n);return e}function Zi(n){return function(t){t=Lf(t);var r=D(t)?X(t):tn,e=r?r[0]:t.charAt(0),i=r?ki(r,1).join(""):t.slice(1);return e[n]()+i}}function Gi(n){return function(t){return p(jc(oc(t).replace(dr,"")),n,"")}}function Yi(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=pl(n.prototype),e=n.apply(r,t);return uf(e)?e:r}}function Ki(n,t,r){function e(){for(var o=arguments,a=arguments.length,f=es(a),c=a,s=bu(e);c--;)f[c]=o[c];var l=a<3&&f[0]!==s&&f[a-1]!==s?[]:V(f,s);return(a-=l.length)<r?ou(n,t,Hi,e.placeholder,tn,f,l,tn,tn,r-a):i(this&&this!==Cr&&this instanceof e?u:n,this,f)}var u=Yi(n);return e}function Ji(n){return function(t,r,e){var i=fs(t);if(!Za(t)){var u=wu(r,3);t=Bf(t),r=function(n){return u(i[n],n,i)}}var o=n(t,r,e);return o>-1?i[u?t[o]:o]:tn}}function Xi(n){return gu(function(t){var r=t.length,e=r,i=Y.prototype.thru;for(n&&t.reverse();e--;){var u=t[e];if("function"!=typeof u)throw new ls(un);if(i&&!o&&"wrapper"==mu(u))var o=new Y([],!0)}for(e=o?e:r;++e<r;){u=t[e];var a=mu(u),f="wrapper"==a?kl(u):tn;o=f&&Uu(f[0])&&f[1]==(wn|_n|mn|xn)&&!f[4].length&&1==f[9]?o[mu(f[0])].apply(o,f[3]):1==u.length&&Uu(u)?o[a]():o.thru(u)}return function(){var n=this,e=arguments,i=e[0];if(o&&1==e.length&&_h(i))return o.plant(i).value();for(var u=0,a=r?t[u].apply(this,e):i;++u<r;)a=t[u].call(n,a);return a}})}function Hi(n,t,r,e,i,u,o,a,f,c){function s(){for(var _=arguments,y=arguments.length,m=es(y),b=y;b--;)m[b]=_[b];if(p)var w=bu(s),x=T(m,w);if(e&&(m=Ri(m,e,i,p)),u&&(m=Si(m,u,o,p)),y-=x,p&&y<c){var E=V(m,w);return ou(n,t,Hi,s.placeholder,r,m,E,a,f,c-y)}var k=h?r:this,M=d?k[n]:n;return y=m.length,a?m=Yu(m,a):v&&y>1&&m.reverse(),l&&f<y&&(m.length=f),this&&this!==Cr&&this instanceof s&&(M=g||Yi(M)),M.apply(k,m)}var l=t&wn,h=t&pn,d=t&vn,p=t&(_n|yn),v=t&En,g=d?tn:Yi(n);return s}function Qi(n,t){return function(r,e){return ke(r,n,t(e),{})}}function nu(n,t){return function(r,e){var i;if(r===tn&&e===tn)return t;if(r!==tn&&(i=r),e!==tn){if(i===tn)return e;"string"==typeof r||"string"==typeof e?(r=di(r),e=di(e)):(r=hi(r),e=hi(e)),i=n(r,e)}return i}}function tu(n){return gu(function(t){return t=h(t,O(wu())),ri(function(r){var e=this;return n(t,function(n){return i(n,e,r)})})})}function ru(n,t){t=t===tn?" ":di(t);var r=t.length;if(r<2)return r?ti(t,n):t;var e=ti(t,Ws(n/J(t)));return D(t)?ki(X(e),0,n).join(""):e.slice(0,n)}function eu(n,t,r,e){function u(){for(var t=arguments,f=-1,c=arguments.length,s=-1,l=e.length,h=es(l+c),d=this&&this!==Cr&&this instanceof u?a:n;++s<l;)h[s]=e[s];for(;c--;)h[s++]=t[++f];return i(d,o?r:this,h)}var o=t&pn,a=Yi(n);return u}function iu(n){return function(t,r,e){return e&&"number"!=typeof e&&Ru(t,r,e)&&(r=e=tn),t=xf(t),r===tn?(r=t,t=0):r=xf(r),e=e===tn?t<r?1:-1:xf(e),ni(t,r,e,n)}}function uu(n){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=Mf(t),r=Mf(r)),n(t,r)}}function ou(n,t,r,e,i,u,o,a,f,c){var s=t&_n,l=s?o:tn,h=s?tn:o,d=s?u:tn,p=s?tn:u;t|=s?mn:bn,(t&=~(s?bn:mn))&gn||(t&=~(pn|vn));var v=[n,t,i,d,l,p,h,a,f,c],g=r.apply(tn,v);return Uu(n)&&Il(g,v),g.placeholder=e,Ku(g,n,t)}function au(n){var t=as[n];return function(n,r){if(n=Mf(n),r=null==r?0:Gs(Ef(r),292)){var e=(Lf(n)+"e").split("e");return e=(Lf(t(e[0]+"e"+(+e[1]+r)))+"e").split("e"),+(e[0]+"e"+(+e[1]-r))}return t(n)}}function fu(n){return function(t){var r=Al(t);return r==Gn?$(t):r==Qn?G(t):C(t,n(t))}}function cu(n,t,r,e,i,u,o,a){var f=t&vn;if(!f&&"function"!=typeof n)throw new ls(un);var c=e?e.length:0;if(c||(t&=~(mn|bn),e=i=tn),o=o===tn?o:Zs(Ef(o),0),a=a===tn?a:Ef(a),c-=i?i.length:0,t&bn){var s=e,l=i;e=i=tn}var h=f?tn:kl(n),d=[n,t,r,e,i,s,l,u,o,a];if(h&&$u(d,h),n=d[0],t=d[1],r=d[2],e=d[3],i=d[4],a=d[9]=d[9]===tn?f?0:n.length:Zs(d[9]-c,0),!a&&t&(_n|yn)&&(t&=~(_n|yn)),t&&t!=pn)p=t==_n||t==yn?Ki(n,t,a):t!=mn&&t!=(pn|mn)||i.length?Hi.apply(tn,d):eu(n,t,r,e);else var p=Vi(n,t,r);return Ku((h?ml:Il)(p,d),n,t)}function su(n,t,r,e){return n===tn||Va(n,ps[r])&&!_s.call(e,r)?t:n}function lu(n,t,r,e,i,u){return uf(n)&&uf(t)&&(u.set(t,n),qe(n,t,tn,lu,u),u.delete(t)),n}function hu(n){return pf(n)?tn:n}function du(n,t,r,e,i,u){var o=r&hn,a=n.length,f=t.length;if(a!=f&&!(o&&f>a))return!1;var c=u.get(n);if(c&&u.get(t))return c==t;var s=-1,l=!0,h=r&dn?new _r:tn;for(u.set(n,t),u.set(t,n);++s<a;){var d=n[s],p=t[s];if(e)var v=o?e(p,d,s,t,n,u):e(d,p,s,n,t,u);if(v!==tn){if(v)continue;l=!1;break}if(h){if(!g(t,function(n,t){if(!z(h,t)&&(d===n||i(d,n,r,e,u)))return h.push(t)})){l=!1;break}}else if(d!==p&&!i(d,p,r,e,u)){l=!1;break}}return u.delete(n),u.delete(t),l}function pu(n,t,r,e,i,u,o){switch(r){case ot:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1 | |
;n=n.buffer,t=t.buffer;case ut:return!(n.byteLength!=t.byteLength||!u(new js(n),new js(t)));case Bn:case Fn:case Yn:return Va(+n,+t);case qn:return n.name==t.name&&n.message==t.message;case Hn:case nt:return n==t+"";case Gn:var a=$;case Qn:var f=e&hn;if(a||(a=Z),n.size!=t.size&&!f)return!1;var c=o.get(n);if(c)return c==t;e|=dn,o.set(n,t);var s=du(a(n),a(t),e,i,u,o);return o.delete(n),s;case tt:if(hl)return hl.call(n)==hl.call(t)}return!1}function vu(n,t,r,e,i,u){var o=r&hn,a=_u(n),f=a.length;if(f!=_u(t).length&&!o)return!1;for(var c=f;c--;){var s=a[c];if(!(o?s in t:_s.call(t,s)))return!1}var l=u.get(n);if(l&&u.get(t))return l==t;var h=!0;u.set(n,t),u.set(t,n);for(var d=o;++c<f;){s=a[c];var p=n[s],v=t[s];if(e)var g=o?e(v,p,s,t,n,u):e(p,v,s,n,t,u);if(!(g===tn?p===v||i(p,v,r,e,u):g)){h=!1;break}d||(d="constructor"==s)}if(h&&!d){var _=n.constructor,y=t.constructor;_!=y&&"constructor"in n&&"constructor"in t&&!("function"==typeof _&&_ instanceof _&&"function"==typeof y&&y instanceof y)&&(h=!1)}return u.delete(n),u.delete(t),h}function gu(n){return Cl(Zu(n,tn,ho),n+"")}function _u(n){return _e(n,Bf,Ml)}function yu(n){return _e(n,Ff,jl)}function mu(n){for(var t=n.name+"",r=ul[t],e=_s.call(ul,t)?r.length:0;e--;){var i=r[e],u=i.func;if(null==u||u==n)return i.name}return t}function bu(n){return(_s.call(_,"placeholder")?_:n).placeholder}function wu(){var n=_.iteratee||Oc;return n=n===Oc?Te:n,arguments.length?n(arguments[0],arguments[1]):n}function xu(n,t){var r=n.__data__;return Tu(t)?r["string"==typeof t?"string":"hash"]:r.map}function Eu(n){for(var t=Bf(n),r=t.length;r--;){var e=t[r],i=n[e];t[r]=[e,i,Bu(i)]}return t}function ku(n,t){var r=W(n,t);return Pe(r)?r:tn}function Mu(n){var t=_s.call(n,zs),r=n[zs];try{n[zs]=tn;var e=!0}catch(n){}var i=bs.call(n);return e&&(t?n[zs]=r:delete n[zs]),i}function ju(n,t,r){for(var e=-1,i=r.length;++e<i;){var u=r[e],o=u.size;switch(u.type){case"drop":n+=o;break;case"dropRight":t-=o;break;case"take":t=Gs(t,n+o);break;case"takeRight":n=Zs(n,t-o)}}return{start:n,end:t}}function Au(n){var t=n.match(Tt);return t?t[1].split(Ut):[]}function Lu(n,t,r){t=Ei(t,n);for(var e=-1,i=t.length,u=!1;++e<i;){var o=Hu(t[e]);if(!(u=null!=n&&r(n,o)))break;n=n[o]}return u||++e!=i?u:!!(i=null==n?0:n.length)&&ef(i)&&zu(o,i)&&(_h(n)||gh(n))}function Iu(n){var t=n.length,r=n.constructor(t);return t&&"string"==typeof n[0]&&_s.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Nu(n){return"function"!=typeof n.constructor||Du(n)?{}:pl(Ls(n))}function Cu(n,t,r,e){var i=n.constructor;switch(t){case ut:return ji(n);case Bn:case Fn:return new i(+n);case ot:return Ai(n,e);case at:case ct:case st:case lt:case ht:case dt:case pt:case vt:case gt:return Oi(n,e);case Gn:return Li(n,e,r);case Yn:case nt:return new i(n);case Hn:return Ii(n);case Qn:return Ni(n,e,r);case tt:return Ci(n)}}function Ou(n,t){var r=t.length;if(!r)return n;var e=r-1;return t[e]=(r>1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(St,"{\n/* [wrapped with "+t+"] */\n")}function Pu(n){return _h(n)||gh(n)||!!(Os&&n&&n[Os])}function zu(n,t){return!!(t=null==t?Cn:t)&&("number"==typeof n||Gt.test(n))&&n>-1&&n%1==0&&n<t}function Ru(n,t,r){if(!uf(r))return!1;var e=typeof t;return!!("number"==e?Za(r)&&zu(t,r.length):"string"==e&&t in r)&&Va(r[t],n)}function Su(n,t){if(_h(n))return!1;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!_f(n))||(Lt.test(n)||!At.test(n)||null!=t&&n in fs(t))}function Tu(n){var t=typeof n;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==n:null===n}function Uu(n){var t=mu(n),r=_[t];if("function"!=typeof r||!(t in H.prototype))return!1;if(n===r)return!0;var e=kl(r);return!!e&&n===e[0]}function Wu(n){return!!ms&&ms in n}function Du(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||ps)}function Bu(n){return n===n&&!uf(n)}function Fu(n,t){return function(r){return null!=r&&(r[n]===t&&(t!==tn||n in fs(r)))}}function $u(n,t){var r=n[1],e=t[1],i=r|e,u=i<(pn|vn|wn),o=e==wn&&r==_n||e==wn&&r==xn&&n[7].length<=t[8]||e==(wn|xn)&&t[7].length<=t[8]&&r==_n;if(!u&&!o)return n;e&pn&&(n[2]=t[2],i|=r&pn?0:gn);var a=t[3];if(a){var f=n[3];n[3]=f?Ri(f,a,t[4]):a,n[4]=f?V(n[3],fn):t[4]}return a=t[5],a&&(f=n[5],n[5]=f?Si(f,a,t[6]):a,n[6]=f?V(n[5],fn):t[6]),a=t[7],a&&(n[7]=a),e&wn&&(n[8]=null==n[8]?t[8]:Gs(n[8],t[8])),null==n[9]&&(n[9]=t[9]),n[0]=t[0],n[1]=i,n}function qu(n){var t=[];if(null!=n)for(var r in fs(n))t.push(r);return t}function Vu(n){return bs.call(n)}function Zu(n,t,r){return t=Zs(t===tn?n.length-1:t,0),function(){for(var e=arguments,u=-1,o=Zs(e.length-t,0),a=es(o);++u<o;)a[u]=e[t+u];u=-1;for(var f=es(t+1);++u<t;)f[u]=e[u];return f[t]=r(a),i(n,this,f)}}function Gu(n,t){return t.length<2?n:ge(n,ai(t,0,-1))}function Yu(n,t){for(var r=n.length,e=Gs(t.length,r),i=Ti(n);e--;){var u=t[e];n[e]=zu(u,r)?i[u]:tn}return n}function Ku(n,t,r){var e=t+"";return Cl(n,Ou(e,no(Au(e),r)))}function Ju(n){var t=0,r=0;return function(){var e=Ys(),i=An-(e-r);if(r=e,i>0){if(++t>=jn)return arguments[0]}else t=0;return n.apply(tn,arguments)}}function Xu(n,t){var r=-1,e=n.length,i=e-1;for(t=t===tn?e:t;++r<t;){var u=Qe(r,i),o=n[u];n[u]=n[r],n[r]=o}return n.length=t,n}function Hu(n){if("string"==typeof n||_f(n))return n;var t=n+"";return"0"==t&&1/n==-Nn?"-0":t}function Qu(n){if(null!=n){try{return gs.call(n)}catch(n){}try{return n+""}catch(n){}}return""}function no(n,t){return o(Tn,function(r){var e="_."+r[0];t&r[1]&&!s(n,e)&&n.push(e)}),n.sort()}function to(n){if(n instanceof H)return n.clone();var t=new Y(n.__wrapped__,n.__chain__);return t.__actions__=Ti(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function ro(n,t,r){t=(r?Ru(n,t,r):t===tn)?1:Zs(Ef(t),0);var e=null==n?0:n.length;if(!e||t<1)return[];for(var i=0,u=0,o=es(Ws(e/t));i<e;)o[u++]=ai(n,i,i+=t);return o}function eo(n){for(var t=-1,r=null==n?0:n.length,e=0,i=[];++t<r;){var u=n[t];u&&(i[e++]=u)}return i}function io(){var n=arguments,t=arguments.length;if(!t)return[];for(var r=es(t-1),e=arguments[0],i=t;i--;)r[i-1]=n[i];return d(_h(e)?Ti(e):[e],he(r,1))}function uo(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===tn?1:Ef(t),ai(n,t<0?0:t,e)):[]}function oo(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===tn?1:Ef(t),t=e-t,ai(n,0,t<0?0:t)):[]}function ao(n,t){return n&&n.length?_i(n,wu(t,3),!0,!0):[]}function fo(n,t){return n&&n.length?_i(n,wu(t,3),!0):[]}function co(n,t,r,e){var i=null==n?0:n.length;return i?(r&&"number"!=typeof r&&Ru(n,t,r)&&(r=0,e=i),se(n,t,r,e)):[]}function so(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var i=null==r?0:Ef(r);return i<0&&(i=Zs(e+i,0)),b(n,wu(t,3),i)}function lo(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var i=e-1;return r!==tn&&(i=Ef(r),i=r<0?Zs(e+i,0):Gs(i,e-1)),b(n,wu(t,3),i,!0)}function ho(n){return(null==n?0:n.length)?he(n,1):[]}function po(n){return(null==n?0:n.length)?he(n,Nn):[]}function vo(n,t){return(null==n?0:n.length)?(t=t===tn?1:Ef(t),he(n,t)):[]}function go(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){var i=n[t];e[i[0]]=i[1]}return e}function _o(n){return n&&n.length?n[0]:tn}function yo(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var i=null==r?0:Ef(r);return i<0&&(i=Zs(e+i,0)),w(n,t,i)}function mo(n){return(null==n?0:n.length)?ai(n,0,-1):[]}function bo(n,t){return null==n?"":qs.call(n,t)}function wo(n){var t=null==n?0:n.length;return t?n[t-1]:tn}function xo(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var i=e;return r!==tn&&(i=Ef(r),i=i<0?Zs(e+i,0):Gs(i,e-1)),t===t?K(n,t,i):b(n,E,i,!0)}function Eo(n,t){return n&&n.length?Ze(n,Ef(t)):tn}function ko(n,t){return n&&n.length&&t&&t.length?Xe(n,t):n}function Mo(n,t,r){return n&&n.length&&t&&t.length?Xe(n,t,wu(r,2)):n}function jo(n,t,r){return n&&n.length&&t&&t.length?Xe(n,t,tn,r):n}function Ao(n,t){var r=[];if(!n||!n.length)return r;var e=-1,i=[],u=n.length;for(t=wu(t,3);++e<u;){var o=n[e];t(o,e,n)&&(r.push(o),i.push(e))}return He(n,i),r}function Lo(n){return null==n?n:Xs.call(n)}function Io(n,t,r){var e=null==n?0:n.length;return e?(r&&"number"!=typeof r&&Ru(n,t,r)?(t=0,r=e):(t=null==t?0:Ef(t),r=r===tn?e:Ef(r)),ai(n,t,r)):[]}function No(n,t){return ci(n,t)}function Co(n,t,r){return si(n,t,wu(r,2))}function Oo(n,t){var r=null==n?0:n.length;if(r){var e=ci(n,t);if(e<r&&Va(n[e],t))return e}return-1}function Po(n,t){return ci(n,t,!0)}function zo(n,t,r){return si(n,t,wu(r,2),!0)}function Ro(n,t){if(null==n?0:n.length){var r=ci(n,t,!0)-1;if(Va(n[r],t))return r}return-1}function So(n){return n&&n.length?li(n):[]}function To(n,t){return n&&n.length?li(n,wu(t,2)):[]}function Uo(n){var t=null==n?0:n.length;return t?ai(n,1,t):[]}function Wo(n,t,r){return n&&n.length?(t=r||t===tn?1:Ef(t),ai(n,0,t<0?0:t)):[]}function Do(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===tn?1:Ef(t),t=e-t,ai(n,t<0?0:t,e)):[]}function Bo(n,t){return n&&n.length?_i(n,wu(t,3),!1,!0):[]}function Fo(n,t){return n&&n.length?_i(n,wu(t,3)):[]}function $o(n){return n&&n.length?pi(n):[]}function qo(n,t){return n&&n.length?pi(n,wu(t,2)):[]}function Vo(n,t){return t="function"==typeof t?t:tn,n&&n.length?pi(n,tn,t):[]}function Zo(n){if(!n||!n.length)return[];var t=0;return n=c(n,function(n){if(Ga(n))return t=Zs(n.length,t),!0}),N(t,function(t){return h(n,M(t))})}function Go(n,t){if(!n||!n.length)return[];var r=Zo(n);return null==t?r:h(r,function(n){return i(t,tn,n)})}function Yo(n,t){return bi(n||[],t||[],Kr)}function Ko(n,t){return bi(n||[],t||[],ui)}function Jo(n){var t=_(n);return t.__chain__=!0,t}function Xo(n,t){return t(n),n}function Ho(n,t){return t(n)}function Qo(){return Jo(this)}function na(){return new Y(this.value(),this.__chain__)}function ta(){this.__values__===tn&&(this.__values__=wf(this.value()));var n=this.__index__>=this.__values__.length;return{done:n,value:n?tn:this.__values__[this.__index__++]}}function ra(){return this}function ea(n){for(var t,r=this;r instanceof j;){var e=to(r);e.__index__=0,e.__values__=tn,t?i.__wrapped__=e:t=e;var i=e;r=r.__wrapped__}return i.__wrapped__=n,t}function ia(){var n=this.__wrapped__;if(n instanceof H){var t=n;return this.__actions__.length&&(t=new H(this)),t=t.reverse(),t.__actions__.push({func:Ho,args:[Lo],thisArg:tn}),new Y(t,this.__chain__)}return this.thru(Lo)}function ua(){return yi(this.__wrapped__,this.__actions__)}function oa(n,t,r){var e=_h(n)?f:fe;return r&&Ru(n,t,r)&&(t=tn),e(n,wu(t,3))}function aa(n,t){return(_h(n)?c:le)(n,wu(t,3))}function fa(n,t){return he(pa(n,t),1)}function ca(n,t){return he(pa(n,t),Nn)}function sa(n,t,r){return r=r===tn?1:Ef(r),he(pa(n,t),r)}function la(n,t){return(_h(n)?o:vl)(n,wu(t,3))}function ha(n,t){return(_h(n)?a:gl)(n,wu(t,3))}function da(n,t,r,e){n=Za(n)?n:nc(n),r=r&&!e?Ef(r):0;var i=n.length;return r<0&&(r=Zs(i+r,0)),gf(n)?r<=i&&n.indexOf(t,r)>-1:!!i&&w(n,t,r)>-1}function pa(n,t){return(_h(n)?h:Be)(n,wu(t,3))}function va(n,t,r,e){return null==n?[]:(_h(t)||(t=null==t?[]:[t]),r=e?tn:r,_h(r)||(r=null==r?[]:[r]),Ge(n,t,r))}function ga(n,t,r){var e=_h(n)?p:A,i=arguments.length<3;return e(n,wu(t,4),r,i,vl)}function _a(n,t,r){var e=_h(n)?v:A,i=arguments.length<3;return e(n,wu(t,4),r,i,gl)}function ya(n,t){return(_h(n)?c:le)(n,Oa(wu(t,3)))}function ma(n){return(_h(n)?Rr:ei)(n)}function ba(n,t,r){return t=(r?Ru(n,t,r):t===tn)?1:Ef(t),(_h(n)?Sr:ii)(n,t)}function wa(n){return(_h(n)?$r:oi)(n)}function xa(n){if(null==n)return 0;if(Za(n))return gf(n)?J(n):n.length;var t=Al(n);return t==Gn||t==Qn?n.size:Ue(n).length}function Ea(n,t,r){var e=_h(n)?g:fi;return r&&Ru(n,t,r)&&(t=tn),e(n,wu(t,3))}function ka(n,t){if("function"!=typeof t)throw new ls(un);return n=Ef(n),function(){if(--n<1)return t.apply(this,arguments)}}function Ma(n,t,r){return t=r?tn:t,t=n&&null==t?n.length:t,cu(n,wn,tn,tn,tn,tn,t)}function ja(n,t){var r;if("function"!=typeof t)throw new ls(un);return n=Ef(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=tn),r}}function Aa(n,t,r){t=r?tn:t;var e=cu(n,_n,tn,tn,tn,tn,tn,t);return e.placeholder=Aa.placeholder,e}function La(n,t,r){t=r?tn:t;var e=cu(n,yn,tn,tn,tn,tn,tn,t);return e.placeholder=La.placeholder,e}function Ia(n,t,r){function e(t){var r=h,e=d;return h=d=tn,y=t,v=n.apply(e,r)}function i(n){return y=n,g=Nl(a,t),m?e(n):v}function u(n){var r=n-_,e=n-y,i=t-r;return b?Gs(i,p-e):i}function o(n){var r=n-_,e=n-y;return _===tn||r>=t||r<0||b&&e>=p}function a(){var n=uh();if(o(n))return f(n);g=Nl(a,u(n))}function f(n){return g=tn,w&&h?e(n):(h=d=tn,v)}function c(){g!==tn&&xl(g),y=0,h=_=d=g=tn}function s(){return g===tn?v:f(uh())}function l(){var n=uh(),r=o(n);if(h=arguments,d=this,_=n,r){if(g===tn)return i(_);if(b)return g=Nl(a,t),e(_)}return g===tn&&(g=Nl(a,t)),v}var h,d,p,v,g,_,y=0,m=!1,b=!1,w=!0;if("function"!=typeof n)throw new ls(un);return t=Mf(t)||0,uf(r)&&(m=!!r.leading,b="maxWait"in r,p=b?Zs(Mf(r.maxWait)||0,t):p,w="trailing"in r?!!r.trailing:w),l.cancel=c,l.flush=s,l}function Na(n){return cu(n,En)}function Ca(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new ls(un);var r=function(){var e=arguments,i=t?t.apply(this,e):e[0],u=r.cache;if(u.has(i))return u.get(i);var o=n.apply(this,e);return r.cache=u.set(i,o)||u,o};return r.cache=new(Ca.Cache||cr),r}function Oa(n){if("function"!=typeof n)throw new ls(un);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function Pa(n){return ja(2,n)}function za(n,t){if("function"!=typeof n)throw new ls(un);return t=t===tn?t:Ef(t),ri(n,t)}function Ra(n,t){if("function"!=typeof n)throw new ls(un);return t=null==t?0:Zs(Ef(t),0),ri(function(r){var e=r[t],u=ki(r,0,t);return e&&d(u,e),i(n,this,u)})}function Sa(n,t,r){var e=!0,i=!0;if("function"!=typeof n)throw new ls(un);return uf(r)&&(e="leading"in r?!!r.leading:e,i="trailing"in r?!!r.trailing:i),Ia(n,t,{leading:e,maxWait:t,trailing:i})}function Ta(n){return Ma(n,1)}function Ua(n,t){return lh(xi(t),n)}function Wa(){if(!arguments.length)return[];var n=arguments[0];return _h(n)?n:[n]}function Da(n){return ee(n,ln)}function Ba(n,t){return t="function"==typeof t?t:tn,ee(n,ln,t)}function Fa(n){return ee(n,cn|ln)}function $a(n,t){return t="function"==typeof t?t:tn,ee(n,cn|ln,t)}function qa(n,t){return null==t||ue(n,t,Bf(t))}function Va(n,t){return n===t||n!==n&&t!==t}function Za(n){return null!=n&&ef(n.length)&&!tf(n)}function Ga(n){return of(n)&&Za(n)}function Ya(n){return!0===n||!1===n||of(n)&&ye(n)==Bn}function Ka(n){return of(n)&&1===n.nodeType&&!pf(n)}function Ja(n){if(null==n)return!0;if(Za(n)&&(_h(n)||"string"==typeof n||"function"==typeof n.splice||mh(n)||kh(n)||gh(n)))return!n.length;var t=Al(n);if(t==Gn||t==Qn)return!n.size;if(Du(n))return!Ue(n).length;for(var r in n)if(_s.call(n,r))return!1;return!0}function Xa(n,t){return Ie(n,t)}function Ha(n,t,r){r="function"==typeof r?r:tn;var e=r?r(n,t):tn;return e===tn?Ie(n,t,tn,r):!!e}function Qa(n){if(!of(n))return!1;var t=ye(n);return t==qn||t==$n||"string"==typeof n.message&&"string"==typeof n.name&&!pf(n)}function nf(n){return"number"==typeof n&&$s(n)}function tf(n){if(!uf(n))return!1;var t=ye(n);return t==Vn||t==Zn||t==Dn||t==Xn}function rf(n){return"number"==typeof n&&n==Ef(n)}function ef(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=Cn}function uf(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function of(n){return null!=n&&"object"==typeof n}function af(n,t){return n===t||Oe(n,t,Eu(t))}function ff(n,t,r){return r="function"==typeof r?r:tn,Oe(n,t,Eu(t),r)}function cf(n){return df(n)&&n!=+n}function sf(n){if(Ll(n))throw new us(en);return Pe(n)}function lf(n){return null===n}function hf(n){return null==n}function df(n){return"number"==typeof n||of(n)&&ye(n)==Yn}function pf(n){if(!of(n)||ye(n)!=Jn)return!1;var t=Ls(n);if(null===t)return!0;var r=_s.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&gs.call(r)==ws}function vf(n){return rf(n)&&n>=-Cn&&n<=Cn}function gf(n){return"string"==typeof n||!_h(n)&&of(n)&&ye(n)==nt}function _f(n){return"symbol"==typeof n||of(n)&&ye(n)==tt}function yf(n){return n===tn}function mf(n){return of(n)&&Al(n)==et}function bf(n){return of(n)&&ye(n)==it}function wf(n){if(!n)return[];if(Za(n))return gf(n)?X(n):Ti(n);if(Ps&&n[Ps])return F(n[Ps]());var t=Al(n);return(t==Gn?$:t==Qn?Z:nc)(n)}function xf(n){if(!n)return 0===n?n:0;if((n=Mf(n))===Nn||n===-Nn){return(n<0?-1:1)*On}return n===n?n:0}function Ef(n){var t=xf(n),r=t%1;return t===t?r?t-r:t:0}function kf(n){return n?re(Ef(n),0,zn):0}function Mf(n){if("number"==typeof n)return n;if(_f(n))return Pn;if(uf(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=uf(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=n.replace(Pt,"");var r=qt.test(n);return r||Zt.test(n)?Lr(n.slice(2),r?2:8):$t.test(n)?Pn:+n}function jf(n){return Ui(n,Ff(n))}function Af(n){return n?re(Ef(n),-Cn,Cn):0===n?n:0}function Lf(n){return null==n?"":di(n)}function If(n,t){var r=pl(n);return null==t?r:Hr(r,t)}function Nf(n,t){return m(n,wu(t,3),de)}function Cf(n,t){return m(n,wu(t,3),pe)}function Of(n,t){return null==n?n:_l(n,wu(t,3),Ff)}function Pf(n,t){return null==n?n:yl(n,wu(t,3),Ff)}function zf(n,t){return n&&de(n,wu(t,3))}function Rf(n,t){return n&&pe(n,wu(t,3))}function Sf(n){return null==n?[]:ve(n,Bf(n))}function Tf(n){return null==n?[]:ve(n,Ff(n))}function Uf(n,t,r){var e=null==n?tn:ge(n,t);return e===tn?r:e}function Wf(n,t){return null!=n&&Lu(n,t,be)}function Df(n,t){return null!=n&&Lu(n,t,we)}function Bf(n){return Za(n)?Pr(n):Ue(n)}function Ff(n){return Za(n)?Pr(n,!0):We(n)}function $f(n,t){var r={};return t=wu(t,3),de(n,function(n,e,i){ne(r,t(n,e,i),n)}),r}function qf(n,t){var r={};return t=wu(t,3),de(n,function(n,e,i){ne(r,e,t(n,e,i))}),r}function Vf(n,t){return Zf(n,Oa(wu(t)))}function Zf(n,t){if(null==n)return{};var r=h(yu(n),function(n){return[n]});return t=wu(t),Ke(n,r,function(n,r){return t(n,r[0])})}function Gf(n,t,r){t=Ei(t,n);var e=-1,i=t.length;for(i||(i=1,n=tn);++e<i;){var u=null==n?tn:n[Hu(t[e])];u===tn&&(e=i,u=r),n=tf(u)?u.call(n):u}return n}function Yf(n,t,r){return null==n?n:ui(n,t,r)}function Kf(n,t,r,e){return e="function"==typeof e?e:tn,null==n?n:ui(n,t,r,e)}function Jf(n,t,r){var e=_h(n),i=e||mh(n)||kh(n);if(t=wu(t,4),null==r){var u=n&&n.constructor;r=i?e?new u:[]:uf(n)&&tf(u)?pl(Ls(n)):{}}return(i?o:de)(n,function(n,e,i){return t(r,n,e,i)}),r}function Xf(n,t){return null==n||vi(n,t)}function Hf(n,t,r){return null==n?n:gi(n,t,xi(r))}function Qf(n,t,r,e){return e="function"==typeof e?e:tn,null==n?n:gi(n,t,xi(r),e)}function nc(n){return null==n?[]:P(n,Bf(n))}function tc(n){return null==n?[]:P(n,Ff(n))}function rc(n,t,r){return r===tn&&(r=t,t=tn),r!==tn&&(r=Mf(r),r=r===r?r:0),t!==tn&&(t=Mf(t),t=t===t?t:0),re(Mf(n),t,r)}function ec(n,t,r){return t=xf(t),r===tn?(r=t,t=0):r=xf(r),n=Mf(n),xe(n,t,r)}function ic(n,t,r){if(r&&"boolean"!=typeof r&&Ru(n,t,r)&&(t=r=tn),r===tn&&("boolean"==typeof t?(r=t,t=tn):"boolean"==typeof n&&(r=n,n=tn)),n===tn&&t===tn?(n=0,t=1):(n=xf(n),t===tn?(t=n,n=0):t=xf(t)),n>t){var e=n;n=t,t=e}if(r||n%1||t%1){var i=Js();return Gs(n+i*(t-n+Ar("1e-"+((i+"").length-1))),t)}return Qe(n,t)}function uc(n){return Jh(Lf(n).toLowerCase())}function oc(n){return(n=Lf(n))&&n.replace(Yt,qr).replace(pr,"")}function ac(n,t,r){n=Lf(n),t=di(t);var e=n.length;r=r===tn?e:re(Ef(r),0,e);var i=r;return(r-=t.length)>=0&&n.slice(r,i)==t}function fc(n){return n=Lf(n),n&&Et.test(n)?n.replace(wt,Vr):n}function cc(n){return n=Lf(n),n&&Ot.test(n)?n.replace(Ct,"\\$&"):n}function sc(n,t,r){n=Lf(n),t=Ef(t);var e=t?J(n):0;if(!t||e>=t)return n;var i=(t-e)/2;return ru(Ds(i),r)+n+ru(Ws(i),r)}function lc(n,t,r){n=Lf(n),t=Ef(t);var e=t?J(n):0;return t&&e<t?n+ru(t-e,r):n}function hc(n,t,r){n=Lf(n),t=Ef(t);var e=t?J(n):0;return t&&e<t?ru(t-e,r)+n:n}function dc(n,t,r){return r||null==t?t=0:t&&(t=+t),Ks(Lf(n).replace(zt,""),t||0)}function pc(n,t,r){return t=(r?Ru(n,t,r):t===tn)?1:Ef(t),ti(Lf(n),t)}function vc(){var n=arguments,t=Lf(n[0]);return n.length<3?t:t.replace(n[1],n[2])}function gc(n,t,r){return r&&"number"!=typeof r&&Ru(n,t,r)&&(t=r=tn),(r=r===tn?zn:r>>>0)?(n=Lf(n),n&&("string"==typeof t||null!=t&&!xh(t))&&!(t=di(t))&&D(n)?ki(X(n),0,r):n.split(t,r)):[]}function _c(n,t,r){return n=Lf(n),r=null==r?0:re(Ef(r),0,n.length),t=di(t),n.slice(r,r+t.length)==t}function yc(n,t,r){var e=_.templateSettings;r&&Ru(n,t,r)&&(t=tn),n=Lf(n),t=Ih({},t,e,su);var i,u,o=Ih({},t.imports,e.imports,su),a=Bf(o),f=P(o,a),c=0,s=t.interpolate||Kt,l="__p += '",h=cs((t.escape||Kt).source+"|"+s.source+"|"+(s===jt?Bt:Kt).source+"|"+(t.evaluate||Kt).source+"|$","g"),d="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++br+"]")+"\n";n.replace(h,function(t,r,e,o,a,f){return e||(e=o),l+=n.slice(c,f).replace(Jt,U),r&&(i=!0,l+="' +\n__e("+r+") +\n'"),a&&(u=!0,l+="';\n"+a+";\n__p += '"),e&&(l+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),c=f+t.length,t}),l+="';\n";var p=t.variable;p||(l="with (obj) {\n"+l+"\n}\n"),l=(u?l.replace(_t,""):l).replace(yt,"$1").replace(mt,"$1;"),l="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var v=Xh(function(){return os(a,d+"return "+l).apply(tn,f)});if(v.source=l,Qa(v))throw v;return v}function mc(n){return Lf(n).toLowerCase()}function bc(n){return Lf(n).toUpperCase()}function wc(n,t,r){if((n=Lf(n))&&(r||t===tn))return n.replace(Pt,"");if(!n||!(t=di(t)))return n;var e=X(n),i=X(t);return ki(e,R(e,i),S(e,i)+1).join("")}function xc(n,t,r){if((n=Lf(n))&&(r||t===tn))return n.replace(Rt,"");if(!n||!(t=di(t)))return n;var e=X(n);return ki(e,0,S(e,X(t))+1).join("")}function Ec(n,t,r){if((n=Lf(n))&&(r||t===tn))return n.replace(zt,"");if(!n||!(t=di(t)))return n;var e=X(n);return ki(e,R(e,X(t))).join("")}function kc(n,t){var r=kn,e=Mn;if(uf(t)){var i="separator"in t?t.separator:i;r="length"in t?Ef(t.length):r,e="omission"in t?di(t.omission):e}n=Lf(n);var u=n.length;if(D(n)){var o=X(n);u=o.length}if(r>=u)return n;var a=r-J(e);if(a<1)return e;var f=o?ki(o,0,a).join(""):n.slice(0,a);if(i===tn)return f+e;if(o&&(a+=f.length-a),xh(i)){if(n.slice(a).search(i)){var c,s=f;for(i.global||(i=cs(i.source,Lf(Ft.exec(i))+"g")),i.lastIndex=0;c=i.exec(s);)var l=c.index;f=f.slice(0,l===tn?a:l)}}else if(n.indexOf(di(i),a)!=a){var h=f.lastIndexOf(i);h>-1&&(f=f.slice(0,h))}return f+e}function Mc(n){return n=Lf(n),n&&xt.test(n)?n.replace(bt,Zr):n}function jc(n,t,r){return n=Lf(n),t=r?tn:t,t===tn?B(n)?nn(n):y(n):n.match(t)||[]}function Ac(n){var t=null==n?0:n.length,r=wu();return n=t?h(n,function(n){if("function"!=typeof n[1])throw new ls(un);return[r(n[0]),n[1]]}):[],ri(function(r){for(var e=this,u=-1;++u<t;){var o=n[u];if(i(o[0],e,r))return i(o[1],e,r)}})}function Lc(n){return ie(ee(n,cn))}function Ic(n){return function(){return n}}function Nc(n,t){return null==n||n!==n?t:n}function Cc(n){return n}function Oc(n){return Te("function"==typeof n?n:ee(n,cn))}function Pc(n){return Fe(ee(n,cn))}function zc(n,t){return $e(n,ee(t,cn))}function Rc(n,t,r){var e=Bf(t),i=ve(t,e);null!=r||uf(t)&&(i.length||!e.length)||(r=t,t=n,n=this,i=ve(t,Bf(t)));var u=!(uf(r)&&"chain"in r&&!r.chain),a=tf(n);return o(i,function(r){var e=t[r];n[r]=e,a&&(n.prototype[r]=function(){var t=this.__chain__;if(u||t){var r=n(this.__wrapped__);return(r.__actions__=Ti(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,d([this.value()],arguments))})}),n}function Sc(){return Cr._===this&&(Cr._=xs),this}function Tc(){}function Uc(n){return n=Ef(n),ri(function(t){return Ze(t,n)})}function Wc(n){return Su(n)?M(Hu(n)):Je(n)}function Dc(n){return function(t){return null==n?tn:ge(n,t)}}function Bc(){return[]}function Fc(){return!1}function $c(){return{}}function qc(){return""}function Vc(){return!0}function Zc(n,t){if((n=Ef(n))<1||n>Cn)return[];var r=zn,e=Gs(n,zn);t=wu(t),n-=zn;for(var i=N(e,t);++r<n;)t(r);return i}function Gc(n){return _h(n)?h(n,Hu):_f(n)?[n]:Ti(Ol(Lf(n)))}function Yc(n){var t=++ys;return Lf(n)+t}function Kc(n){return n&&n.length?ce(n,Cc,me):tn}function Jc(n,t){return n&&n.length?ce(n,wu(t,2),me):tn}function Xc(n){return k(n,Cc)}function Hc(n,t){return k(n,wu(t,2))}function Qc(n){return n&&n.length?ce(n,Cc,De):tn}function ns(n,t){return n&&n.length?ce(n,wu(t,2),De):tn}function ts(n){return n&&n.length?I(n,Cc):0}function rs(n,t){return n&&n.length?I(n,wu(t,2)):0}t=null==t?Cr:Gr.defaults(Cr.Object(),t,Gr.pick(Cr,mr));var es=t.Array,is=t.Date,us=t.Error,os=t.Function,as=t.Math,fs=t.Object,cs=t.RegExp,ss=t.String,ls=t.TypeError,hs=es.prototype,ds=os.prototype,ps=fs.prototype,vs=t["__core-js_shared__"],gs=ds.toString,_s=ps.hasOwnProperty,ys=0,ms=function(){var n=/[^.]+$/.exec(vs&&vs.keys&&vs.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),bs=ps.toString,ws=gs.call(fs),xs=Cr._,Es=cs("^"+gs.call(_s).replace(Ct,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ks=zr?t.Buffer:tn,Ms=t.Symbol,js=t.Uint8Array,As=ks?ks.allocUnsafe:tn,Ls=q(fs.getPrototypeOf,fs),Is=fs.create,Ns=ps.propertyIsEnumerable,Cs=hs.splice,Os=Ms?Ms.isConcatSpreadable:tn,Ps=Ms?Ms.iterator:tn,zs=Ms?Ms.toStringTag:tn,Rs=function(){try{var n=ku(fs,"defineProperty");return n({},"",{}),n}catch(n){}}(),Ss=t.clearTimeout!==Cr.clearTimeout&&t.clearTimeout,Ts=is&&is.now!==Cr.Date.now&&is.now,Us=t.setTimeout!==Cr.setTimeout&&t.setTimeout,Ws=as.ceil,Ds=as.floor,Bs=fs.getOwnPropertySymbols,Fs=ks?ks.isBuffer:tn,$s=t.isFinite,qs=hs.join,Vs=q(fs.keys,fs),Zs=as.max,Gs=as.min,Ys=is.now,Ks=t.parseInt,Js=as.random,Xs=hs.reverse,Hs=ku(t,"DataView"),Qs=ku(t,"Map"),nl=ku(t,"Promise"),tl=ku(t,"Set"),rl=ku(t,"WeakMap"),el=ku(fs,"create"),il=rl&&new rl,ul={},ol=Qu(Hs),al=Qu(Qs),fl=Qu(nl),cl=Qu(tl),sl=Qu(rl),ll=Ms?Ms.prototype:tn,hl=ll?ll.valueOf:tn,dl=ll?ll.toString:tn,pl=function(){function n(){}return function(t){if(!uf(t))return{};if(Is)return Is(t);n.prototype=t;var r=new n;return n.prototype=tn,r}}();_.templateSettings={escape:kt,evaluate:Mt,interpolate:jt,variable:"",imports:{_:_}},_.prototype=j.prototype,_.prototype.constructor=_,Y.prototype=pl(j.prototype),Y.prototype.constructor=Y,H.prototype=pl(j.prototype),H.prototype.constructor=H,Xt.prototype.clear=Ht,Xt.prototype.delete=Qt,Xt.prototype.get=nr,Xt.prototype.has=tr,Xt.prototype.set=rr,er.prototype.clear=ir,er.prototype.delete=ur,er.prototype.get=or,er.prototype.has=ar,er.prototype.set=fr,cr.prototype.clear=sr,cr.prototype.delete=lr,cr.prototype.get=hr,cr.prototype.has=vr,cr.prototype.set=gr,_r.prototype.add=_r.prototype.push=yr,_r.prototype.has=Er,kr.prototype.clear=Mr,kr.prototype.delete=jr,kr.prototype.get=Ir,kr.prototype.has=Nr,kr.prototype.set=Or;var vl=$i(de),gl=$i(pe,!0),_l=qi(),yl=qi(!0),ml=il?function(n,t){return il.set(n,t),n}:Cc,bl=Rs?function(n,t){return Rs(n,"toString",{configurable:!0,enumerable:!1,value:Ic(t),writable:!0})}:Cc,wl=ri,xl=Ss||function(n){return Cr.clearTimeout(n)},El=tl&&1/Z(new tl([,-0]))[1]==Nn?function(n){return new tl(n)}:Tc,kl=il?function(n){return il.get(n)}:Tc,Ml=Bs?function(n){return null==n?[]:(n=fs(n),c(Bs(n),function(t){return Ns.call(n,t)}))}:Bc,jl=Bs?function(n){for(var t=[];n;)d(t,Ml(n)),n=Ls(n);return t}:Bc,Al=ye;(Hs&&Al(new Hs(new ArrayBuffer(1)))!=ot||Qs&&Al(new Qs)!=Gn||nl&&"[object Promise]"!=Al(nl.resolve())||tl&&Al(new tl)!=Qn||rl&&Al(new rl)!=et)&&(Al=function(n){var t=ye(n),r=t==Jn?n.constructor:tn,e=r?Qu(r):"";if(e)switch(e){case ol:return ot;case al:return Gn;case fl:return"[object Promise]";case cl:return Qn;case sl:return et}return t});var Ll=vs?tf:Fc,Il=Ju(ml),Nl=Us||function(n,t){return Cr.setTimeout(n,t)},Cl=Ju(bl),Ol=function(n){var t=Ca(n,function(n){return r.size===an&&r.clear(),n}),r=t.cache;return t}(function(n){var t=[];return It.test(n)&&t.push(""),n.replace(Nt,function(n,r,e,i){t.push(e?i.replace(Dt,"$1"):r||n)}),t}),Pl=ri(function(n,t){return Ga(n)?ae(n,he(t,1,Ga,!0)):[]}),zl=ri(function(n,t){var r=wo(t);return Ga(r)&&(r=tn),Ga(n)?ae(n,he(t,1,Ga,!0),wu(r,2)):[]}),Rl=ri(function(n,t){var r=wo(t);return Ga(r)&&(r=tn),Ga(n)?ae(n,he(t,1,Ga,!0),tn,r):[]}),Sl=ri(function(n){var t=h(n,wi);return t.length&&t[0]===n[0]?Ee(t):[]}),Tl=ri(function(n){var t=wo(n),r=h(n,wi);return t===wo(r)?t=tn:r.pop(),r.length&&r[0]===n[0]?Ee(r,wu(t,2)):[]}),Ul=ri(function(n){var t=wo(n),r=h(n,wi);return t="function"==typeof t?t:tn,t&&r.pop(),r.length&&r[0]===n[0]?Ee(r,tn,t):[]}),Wl=ri(ko),Dl=gu(function(n,t){var r=null==n?0:n.length,e=te(n,t);return He(n,h(t,function(n){return zu(n,r)?+n:n}).sort(Pi)),e}),Bl=ri(function(n){return pi(he(n,1,Ga,!0))}),Fl=ri(function(n){var t=wo(n);return Ga(t)&&(t=tn),pi(he(n,1,Ga,!0),wu(t,2))}),$l=ri(function(n){var t=wo(n);return t="function"==typeof t?t:tn,pi(he(n,1,Ga,!0),tn,t)}),ql=ri(function(n,t){return Ga(n)?ae(n,t):[]}),Vl=ri(function(n){return mi(c(n,Ga))}),Zl=ri(function(n){var t=wo(n);return Ga(t)&&(t=tn),mi(c(n,Ga),wu(t,2))}),Gl=ri(function(n){var t=wo(n);return t="function"==typeof t?t:tn,mi(c(n,Ga),tn,t)}),Yl=ri(Zo),Kl=ri(function(n){var t=n.length,r=t>1?n[t-1]:tn;return r="function"==typeof r?(n.pop(),r):tn,Go(n,r)}),Jl=gu(function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,i=function(t){return te(t,n)};return!(t>1||this.__actions__.length)&&e instanceof H&&zu(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:Ho,args:[i],thisArg:tn}),new Y(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(tn),n})):this.thru(i)}),Xl=Bi(function(n,t,r){_s.call(n,r)?++n[r]:ne(n,r,1)}),Hl=Ji(so),Ql=Ji(lo),nh=Bi(function(n,t,r){_s.call(n,r)?n[r].push(t):ne(n,r,[t])}),th=ri(function(n,t,r){var e=-1,u="function"==typeof t,o=Za(n)?es(n.length):[];return vl(n,function(n){o[++e]=u?i(t,n,r):Me(n,t,r)}),o}),rh=Bi(function(n,t,r){ne(n,r,t)}),eh=Bi(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),ih=ri(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Ru(n,t[0],t[1])?t=[]:r>2&&Ru(t[0],t[1],t[2])&&(t=[t[0]]),Ge(n,he(t,1),[])}),uh=Ts||function(){return Cr.Date.now()},oh=ri(function(n,t,r){var e=pn;if(r.length){var i=V(r,bu(oh));e|=mn}return cu(n,e,t,r,i)}),ah=ri(function(n,t,r){var e=pn|vn;if(r.length){var i=V(r,bu(ah));e|=mn}return cu(t,e,n,r,i)}),fh=ri(function(n,t){return oe(n,1,t)}),ch=ri(function(n,t,r){return oe(n,Mf(t)||0,r)});Ca.Cache=cr;var sh=wl(function(n,t){t=1==t.length&&_h(t[0])?h(t[0],O(wu())):h(he(t,1),O(wu()));var r=t.length;return ri(function(e){for(var u=this,o=-1,a=Gs(e.length,r);++o<a;)e[o]=t[o].call(u,e[o]);return i(n,this,e)})}),lh=ri(function(n,t){var r=V(t,bu(lh));return cu(n,mn,tn,t,r)}),hh=ri(function(n,t){var r=V(t,bu(hh));return cu(n,bn,tn,t,r)}),dh=gu(function(n,t){return cu(n,xn,tn,tn,tn,t)}),ph=uu(me),vh=uu(function(n,t){return n>=t}),gh=je(function(){return arguments}())?je:function(n){return of(n)&&_s.call(n,"callee")&&!Ns.call(n,"callee")},_h=es.isArray,yh=Tr?O(Tr):Ae,mh=Fs||Fc,bh=Ur?O(Ur):Le,wh=Wr?O(Wr):Ce,xh=Dr?O(Dr):ze,Eh=Br?O(Br):Re,kh=Fr?O(Fr):Se,Mh=uu(De),jh=uu(function(n,t){return n<=t}),Ah=Fi(function(n,t){if(Du(t)||Za(t))return void Ui(t,Bf(t),n);for(var r in t)_s.call(t,r)&&Kr(n,r,t[r])}),Lh=Fi(function(n,t){Ui(t,Ff(t),n)}),Ih=Fi(function(n,t,r,e){Ui(t,Ff(t),n,e)}),Nh=Fi(function(n,t,r,e){Ui(t,Bf(t),n,e)}),Ch=gu(te),Oh=ri(function(n){return n.push(tn,su),i(Ih,tn,n)}),Ph=ri(function(n){return n.push(tn,lu),i(Uh,tn,n)}),zh=Qi(function(n,t,r){n[t]=r},Ic(Cc)),Rh=Qi(function(n,t,r){_s.call(n,t)?n[t].push(r):n[t]=[r]},wu),Sh=ri(Me),Th=Fi(function(n,t,r){qe(n,t,r)}),Uh=Fi(function(n,t,r,e){qe(n,t,r,e)}),Wh=gu(function(n,t){var r={};if(null==n)return r;var e=!1;t=h(t,function(t){return t=Ei(t,n),e||(e=t.length>1),t}),Ui(n,yu(n),r),e&&(r=ee(r,cn|sn|ln,hu));for(var i=t.length;i--;)vi(r,t[i]);return r}),Dh=gu(function(n,t){return null==n?{}:Ye(n,t)}),Bh=fu(Bf),Fh=fu(Ff),$h=Gi(function(n,t,r){return t=t.toLowerCase(),n+(r?uc(t):t)}),qh=Gi(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Vh=Gi(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Zh=Zi("toLowerCase"),Gh=Gi(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}),Yh=Gi(function(n,t,r){ | |
return n+(r?" ":"")+Jh(t)}),Kh=Gi(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Jh=Zi("toUpperCase"),Xh=ri(function(n,t){try{return i(n,tn,t)}catch(n){return Qa(n)?n:new us(n)}}),Hh=gu(function(n,t){return o(t,function(t){t=Hu(t),ne(n,t,oh(n[t],n))}),n}),Qh=Xi(),nd=Xi(!0),td=ri(function(n,t){return function(r){return Me(r,n,t)}}),rd=ri(function(n,t){return function(r){return Me(n,r,t)}}),ed=tu(h),id=tu(f),ud=tu(g),od=iu(),ad=iu(!0),fd=nu(function(n,t){return n+t},0),cd=au("ceil"),sd=nu(function(n,t){return n/t},1),ld=au("floor"),hd=nu(function(n,t){return n*t},1),dd=au("round"),pd=nu(function(n,t){return n-t},0);return _.after=ka,_.ary=Ma,_.assign=Ah,_.assignIn=Lh,_.assignInWith=Ih,_.assignWith=Nh,_.at=Ch,_.before=ja,_.bind=oh,_.bindAll=Hh,_.bindKey=ah,_.castArray=Wa,_.chain=Jo,_.chunk=ro,_.compact=eo,_.concat=io,_.cond=Ac,_.conforms=Lc,_.constant=Ic,_.countBy=Xl,_.create=If,_.curry=Aa,_.curryRight=La,_.debounce=Ia,_.defaults=Oh,_.defaultsDeep=Ph,_.defer=fh,_.delay=ch,_.difference=Pl,_.differenceBy=zl,_.differenceWith=Rl,_.drop=uo,_.dropRight=oo,_.dropRightWhile=ao,_.dropWhile=fo,_.fill=co,_.filter=aa,_.flatMap=fa,_.flatMapDeep=ca,_.flatMapDepth=sa,_.flatten=ho,_.flattenDeep=po,_.flattenDepth=vo,_.flip=Na,_.flow=Qh,_.flowRight=nd,_.fromPairs=go,_.functions=Sf,_.functionsIn=Tf,_.groupBy=nh,_.initial=mo,_.intersection=Sl,_.intersectionBy=Tl,_.intersectionWith=Ul,_.invert=zh,_.invertBy=Rh,_.invokeMap=th,_.iteratee=Oc,_.keyBy=rh,_.keys=Bf,_.keysIn=Ff,_.map=pa,_.mapKeys=$f,_.mapValues=qf,_.matches=Pc,_.matchesProperty=zc,_.memoize=Ca,_.merge=Th,_.mergeWith=Uh,_.method=td,_.methodOf=rd,_.mixin=Rc,_.negate=Oa,_.nthArg=Uc,_.omit=Wh,_.omitBy=Vf,_.once=Pa,_.orderBy=va,_.over=ed,_.overArgs=sh,_.overEvery=id,_.overSome=ud,_.partial=lh,_.partialRight=hh,_.partition=eh,_.pick=Dh,_.pickBy=Zf,_.property=Wc,_.propertyOf=Dc,_.pull=Wl,_.pullAll=ko,_.pullAllBy=Mo,_.pullAllWith=jo,_.pullAt=Dl,_.range=od,_.rangeRight=ad,_.rearg=dh,_.reject=ya,_.remove=Ao,_.rest=za,_.reverse=Lo,_.sampleSize=ba,_.set=Yf,_.setWith=Kf,_.shuffle=wa,_.slice=Io,_.sortBy=ih,_.sortedUniq=So,_.sortedUniqBy=To,_.split=gc,_.spread=Ra,_.tail=Uo,_.take=Wo,_.takeRight=Do,_.takeRightWhile=Bo,_.takeWhile=Fo,_.tap=Xo,_.throttle=Sa,_.thru=Ho,_.toArray=wf,_.toPairs=Bh,_.toPairsIn=Fh,_.toPath=Gc,_.toPlainObject=jf,_.transform=Jf,_.unary=Ta,_.union=Bl,_.unionBy=Fl,_.unionWith=$l,_.uniq=$o,_.uniqBy=qo,_.uniqWith=Vo,_.unset=Xf,_.unzip=Zo,_.unzipWith=Go,_.update=Hf,_.updateWith=Qf,_.values=nc,_.valuesIn=tc,_.without=ql,_.words=jc,_.wrap=Ua,_.xor=Vl,_.xorBy=Zl,_.xorWith=Gl,_.zip=Yl,_.zipObject=Yo,_.zipObjectDeep=Ko,_.zipWith=Kl,_.entries=Bh,_.entriesIn=Fh,_.extend=Lh,_.extendWith=Ih,Rc(_,_),_.add=fd,_.attempt=Xh,_.camelCase=$h,_.capitalize=uc,_.ceil=cd,_.clamp=rc,_.clone=Da,_.cloneDeep=Fa,_.cloneDeepWith=$a,_.cloneWith=Ba,_.conformsTo=qa,_.deburr=oc,_.defaultTo=Nc,_.divide=sd,_.endsWith=ac,_.eq=Va,_.escape=fc,_.escapeRegExp=cc,_.every=oa,_.find=Hl,_.findIndex=so,_.findKey=Nf,_.findLast=Ql,_.findLastIndex=lo,_.findLastKey=Cf,_.floor=ld,_.forEach=la,_.forEachRight=ha,_.forIn=Of,_.forInRight=Pf,_.forOwn=zf,_.forOwnRight=Rf,_.get=Uf,_.gt=ph,_.gte=vh,_.has=Wf,_.hasIn=Df,_.head=_o,_.identity=Cc,_.includes=da,_.indexOf=yo,_.inRange=ec,_.invoke=Sh,_.isArguments=gh,_.isArray=_h,_.isArrayBuffer=yh,_.isArrayLike=Za,_.isArrayLikeObject=Ga,_.isBoolean=Ya,_.isBuffer=mh,_.isDate=bh,_.isElement=Ka,_.isEmpty=Ja,_.isEqual=Xa,_.isEqualWith=Ha,_.isError=Qa,_.isFinite=nf,_.isFunction=tf,_.isInteger=rf,_.isLength=ef,_.isMap=wh,_.isMatch=af,_.isMatchWith=ff,_.isNaN=cf,_.isNative=sf,_.isNil=hf,_.isNull=lf,_.isNumber=df,_.isObject=uf,_.isObjectLike=of,_.isPlainObject=pf,_.isRegExp=xh,_.isSafeInteger=vf,_.isSet=Eh,_.isString=gf,_.isSymbol=_f,_.isTypedArray=kh,_.isUndefined=yf,_.isWeakMap=mf,_.isWeakSet=bf,_.join=bo,_.kebabCase=qh,_.last=wo,_.lastIndexOf=xo,_.lowerCase=Vh,_.lowerFirst=Zh,_.lt=Mh,_.lte=jh,_.max=Kc,_.maxBy=Jc,_.mean=Xc,_.meanBy=Hc,_.min=Qc,_.minBy=ns,_.stubArray=Bc,_.stubFalse=Fc,_.stubObject=$c,_.stubString=qc,_.stubTrue=Vc,_.multiply=hd,_.nth=Eo,_.noConflict=Sc,_.noop=Tc,_.now=uh,_.pad=sc,_.padEnd=lc,_.padStart=hc,_.parseInt=dc,_.random=ic,_.reduce=ga,_.reduceRight=_a,_.repeat=pc,_.replace=vc,_.result=Gf,_.round=dd,_.runInContext=n,_.sample=ma,_.size=xa,_.snakeCase=Gh,_.some=Ea,_.sortedIndex=No,_.sortedIndexBy=Co,_.sortedIndexOf=Oo,_.sortedLastIndex=Po,_.sortedLastIndexBy=zo,_.sortedLastIndexOf=Ro,_.startCase=Yh,_.startsWith=_c,_.subtract=pd,_.sum=ts,_.sumBy=rs,_.template=yc,_.times=Zc,_.toFinite=xf,_.toInteger=Ef,_.toLength=kf,_.toLower=mc,_.toNumber=Mf,_.toSafeInteger=Af,_.toString=Lf,_.toUpper=bc,_.trim=wc,_.trimEnd=xc,_.trimStart=Ec,_.truncate=kc,_.unescape=Mc,_.uniqueId=Yc,_.upperCase=Kh,_.upperFirst=Jh,_.each=la,_.eachRight=ha,_.first=_o,Rc(_,function(){var n={};return de(_,function(t,r){_s.call(_.prototype,r)||(n[r]=t)}),n}(),{chain:!1}),_.VERSION="4.17.4",o(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){_[n].placeholder=_}),o(["drop","take"],function(n,t){H.prototype[n]=function(r){r=r===tn?1:Zs(Ef(r),0);var e=this.__filtered__&&!t?new H(this):this.clone();return e.__filtered__?e.__takeCount__=Gs(r,e.__takeCount__):e.__views__.push({size:Gs(r,zn),type:n+(e.__dir__<0?"Right":"")}),e},H.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),o(["filter","map","takeWhile"],function(n,t){var r=t+1,e=r==Ln||3==r;H.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:wu(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),o(["head","last"],function(n,t){var r="take"+(t?"Right":"");H.prototype[n]=function(){return this[r](1).value()[0]}}),o(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");H.prototype[n]=function(){return this.__filtered__?new H(this):this[r](1)}}),H.prototype.compact=function(){return this.filter(Cc)},H.prototype.find=function(n){return this.filter(n).head()},H.prototype.findLast=function(n){return this.reverse().find(n)},H.prototype.invokeMap=ri(function(n,t){return"function"==typeof n?new H(this):this.map(function(r){return Me(r,n,t)})}),H.prototype.reject=function(n){return this.filter(Oa(wu(n)))},H.prototype.slice=function(n,t){n=Ef(n);var r=this;return r.__filtered__&&(n>0||t<0)?new H(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==tn&&(t=Ef(t),r=t<0?r.dropRight(-t):r.take(t-n)),r)},H.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},H.prototype.toArray=function(){return this.take(zn)},de(H.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),i=_[e?"take"+("last"==t?"Right":""):t],u=e||/^find/.test(t);i&&(_.prototype[t]=function(){var t=this.__wrapped__,o=e?[1]:arguments,a=t instanceof H,f=o[0],c=a||_h(t),s=function(n){var t=i.apply(_,d([n],o));return e&&l?t[0]:t};c&&r&&"function"==typeof f&&1!=f.length&&(a=c=!1);var l=this.__chain__,h=!!this.__actions__.length,p=u&&!l,v=a&&!h;if(!u&&c){t=v?t:new H(this);var g=n.apply(t,o);return g.__actions__.push({func:Ho,args:[s],thisArg:tn}),new Y(g,l)}return p&&v?n.apply(this,o):(g=this.thru(s),p?e?g.value()[0]:g.value():g)})}),o(["pop","push","shift","sort","splice","unshift"],function(n){var t=hs[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);_.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var i=this.value();return t.apply(_h(i)?i:[],n)}return this[r](function(r){return t.apply(_h(r)?r:[],n)})}}),de(H.prototype,function(n,t){var r=_[t];if(r){var e=r.name+"";(ul[e]||(ul[e]=[])).push({name:t,func:r})}}),ul[Hi(tn,vn).name]=[{name:"wrapper",func:tn}],H.prototype.clone=Q,H.prototype.reverse=ft,H.prototype.value=Wt,_.prototype.at=Jl,_.prototype.chain=Qo,_.prototype.commit=na,_.prototype.next=ta,_.prototype.plant=ea,_.prototype.reverse=ia,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=ua,_.prototype.first=_.prototype.head,Ps&&(_.prototype[Ps]=ra),_}();"function"==typeof tn&&"object"==typeof tn.amd&&tn.amd?(Cr._=Gr,tn(function(){return Gr})):Pr?((Pr.exports=Gr)._=Gr,Or._=Gr):Cr._=Gr}).call(ft)});if("function"==typeof f)try{at=ct}catch(n){}at||(at=window._);var st=at,lt=st,ht=c,dt="\0",pt="\0",vt="";c.prototype._nodeCount=0,c.prototype._edgeCount=0,c.prototype.isDirected=function(){return this._isDirected},c.prototype.isMultigraph=function(){return this._isMultigraph},c.prototype.isCompound=function(){return this._isCompound},c.prototype.setGraph=function(n){return this._label=n,this},c.prototype.graph=function(){return this._label},c.prototype.setDefaultNodeLabel=function(n){return lt.isFunction(n)||(n=lt.constant(n)),this._defaultNodeLabelFn=n,this},c.prototype.nodeCount=function(){return this._nodeCount},c.prototype.nodes=function(){return lt.keys(this._nodes)},c.prototype.sources=function(){return lt.filter(this.nodes(),lt.bind(function(n){return lt.isEmpty(this._in[n])},this))},c.prototype.sinks=function(){return lt.filter(this.nodes(),lt.bind(function(n){return lt.isEmpty(this._out[n])},this))},c.prototype.setNodes=function(n,t){var r=arguments;return lt.each(n,lt.bind(function(n){r.length>1?this.setNode(n,t):this.setNode(n)},this)),this},c.prototype.setNode=function(n,t){return lt.has(this._nodes,n)?(arguments.length>1&&(this._nodes[n]=t),this):(this._nodes[n]=arguments.length>1?t:this._defaultNodeLabelFn(n),this._isCompound&&(this._parent[n]=pt,this._children[n]={},this._children[pt][n]=!0),this._in[n]={},this._preds[n]={},this._out[n]={},this._sucs[n]={},++this._nodeCount,this)},c.prototype.node=function(n){return this._nodes[n]},c.prototype.hasNode=function(n){return lt.has(this._nodes,n)},c.prototype.removeNode=function(n){var t=this;if(lt.has(this._nodes,n)){var r=function(n){t.removeEdge(t._edgeObjs[n])};delete this._nodes[n],this._isCompound&&(this._removeFromParentsChildList(n),delete this._parent[n],lt.each(this.children(n),lt.bind(function(n){this.setParent(n)},this)),delete this._children[n]),lt.each(lt.keys(this._in[n]),r),delete this._in[n],delete this._preds[n],lt.each(lt.keys(this._out[n]),r),delete this._out[n],delete this._sucs[n],--this._nodeCount}return this},c.prototype.setParent=function(n,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(lt.isUndefined(t))t=pt;else{t+="";for(var r=t;!lt.isUndefined(r);r=this.parent(r))if(r===n)throw new Error("Setting "+t+" as parent of "+n+" would create create a cycle");this.setNode(t)}return this.setNode(n),this._removeFromParentsChildList(n),this._parent[n]=t,this._children[t][n]=!0,this},c.prototype._removeFromParentsChildList=function(n){delete this._children[this._parent[n]][n]},c.prototype.parent=function(n){if(this._isCompound){var t=this._parent[n];if(t!==pt)return t}},c.prototype.children=function(n){if(lt.isUndefined(n)&&(n=pt),this._isCompound){var t=this._children[n];if(t)return lt.keys(t)}else{if(n===pt)return this.nodes();if(this.hasNode(n))return[]}},c.prototype.predecessors=function(n){var t=this._preds[n];if(t)return lt.keys(t)},c.prototype.successors=function(n){var t=this._sucs[n];if(t)return lt.keys(t)},c.prototype.neighbors=function(n){var t=this.predecessors(n);if(t)return lt.union(t,this.successors(n))},c.prototype.filterNodes=function(n){function t(n){var u=e.parent(n);return void 0===u||r.hasNode(u)?(i[n]=u,u):u in i?i[u]:t(u)}var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph()),lt.each(this._nodes,lt.bind(function(t,e){n(e)&&r.setNode(e,t)},this)),lt.each(this._edgeObjs,lt.bind(function(n){r.hasNode(n.v)&&r.hasNode(n.w)&&r.setEdge(n,this.edge(n))},this));var e=this,i={};return this._isCompound&<.each(r.nodes(),function(n){r.setParent(n,t(n))}),r},c.prototype.setDefaultEdgeLabel=function(n){return lt.isFunction(n)||(n=lt.constant(n)),this._defaultEdgeLabelFn=n,this},c.prototype.edgeCount=function(){return this._edgeCount},c.prototype.edges=function(){return lt.values(this._edgeObjs)},c.prototype.setPath=function(n,t){var r=this,e=arguments;return lt.reduce(n,function(n,i){return e.length>1?r.setEdge(n,i,t):r.setEdge(n,i),i}),this},c.prototype.setEdge=function(){var n,t,r,e,i=!1,u=arguments[0];"object"==typeof u&&null!==u&&"v"in u?(n=u.v,t=u.w,r=u.name,2===arguments.length&&(e=arguments[1],i=!0)):(n=u,t=arguments[1],r=arguments[3],arguments.length>2&&(e=arguments[2],i=!0)),n=""+n,t=""+t,lt.isUndefined(r)||(r=""+r);var o=h(this._isDirected,n,t,r);if(lt.has(this._edgeLabels,o))return i&&(this._edgeLabels[o]=e),this;if(!lt.isUndefined(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(n),this.setNode(t),this._edgeLabels[o]=i?e:this._defaultEdgeLabelFn(n,t,r);var a=d(this._isDirected,n,t,r);return n=a.v,t=a.w,Object.freeze(a),this._edgeObjs[o]=a,s(this._preds[t],n),s(this._sucs[n],t),this._in[t][o]=a,this._out[n][o]=a,this._edgeCount++,this},c.prototype.edge=function(n,t,r){var e=1===arguments.length?p(this._isDirected,arguments[0]):h(this._isDirected,n,t,r);return this._edgeLabels[e]},c.prototype.hasEdge=function(n,t,r){var e=1===arguments.length?p(this._isDirected,arguments[0]):h(this._isDirected,n,t,r);return lt.has(this._edgeLabels,e)},c.prototype.removeEdge=function(n,t,r){var e=1===arguments.length?p(this._isDirected,arguments[0]):h(this._isDirected,n,t,r),i=this._edgeObjs[e];return i&&(n=i.v,t=i.w,delete this._edgeLabels[e],delete this._edgeObjs[e],l(this._preds[t],n),l(this._sucs[n],t),delete this._in[t][e],delete this._out[n][e],this._edgeCount--),this},c.prototype.inEdges=function(n,t){var r=this._in[n];if(r){var e=lt.values(r);return t?lt.filter(e,function(n){return n.v===t}):e}},c.prototype.outEdges=function(n,t){var r=this._out[n];if(r){var e=lt.values(r);return t?lt.filter(e,function(n){return n.w===t}):e}},c.prototype.nodeEdges=function(n,t){var r=this.inEdges(n,t);if(r)return r.concat(this.outEdges(n,t))};var gt={Graph:ht,version:"2.1.1"},_t=st,yt=ht,mt={write:v,read:y},bt=st,wt=m,xt=st,Et=b;b.prototype.size=function(){return this._arr.length},b.prototype.keys=function(){return this._arr.map(function(n){return n.key})},b.prototype.has=function(n){return xt.has(this._keyIndices,n)},b.prototype.priority=function(n){var t=this._keyIndices[n];if(void 0!==t)return this._arr[t].priority},b.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},b.prototype.add=function(n,t){var r=this._keyIndices;if(n=String(n),!xt.has(r,n)){var e=this._arr,i=e.length;return r[n]=i,e.push({key:n,priority:t}),this._decrease(i),!0}return!1},b.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key},b.prototype.decrease=function(n,t){var r=this._keyIndices[n];if(t>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[r].priority+" New: "+t);this._arr[r].priority=t,this._decrease(r)},b.prototype._heapify=function(n){var t=this._arr,r=2*n,e=r+1,i=n;r<t.length&&(i=t[r].priority<t[i].priority?r:i,e<t.length&&(i=t[e].priority<t[i].priority?e:i),i!==n&&(this._swap(n,i),this._heapify(i)))},b.prototype._decrease=function(n){for(var t,r=this,e=this._arr,i=e[n].priority;0!==n&&(t=n>>1,!(e[t].priority<i));)r._swap(n,t),n=t},b.prototype._swap=function(n,t){var r=this._arr,e=this._keyIndices,i=r[n],u=r[t];r[n]=u,r[t]=i,e[u.key]=n,e[i.key]=t};var kt=st,Mt=Et,jt=w,At=kt.constant(1),Lt=jt,It=st,Nt=E,Ct=st,Ot=k,Pt=st,zt=Ot,Rt=M,St=st,Tt=j,Ut=St.constant(1),Wt=st,Dt=L;L.CycleException=I;var Bt=Dt,Ft=N,$t=st,qt=C,Vt=qt,Zt=P,Gt=qt,Yt=z,Kt=st,Jt=ht,Xt=Et,Ht=R,Qt={components:wt,dijkstra:jt,dijkstraAll:Nt,findCycles:Rt,floydWarshall:Tt,isAcyclic:Ft,postorder:Zt,preorder:Yt,prim:Ht,tarjan:Ot,topsort:Dt},nr=gt,tr={Graph:nr.Graph,json:mt,alg:Qt,version:nr.version},rr=tr.Graph,er=tr.alg;n.sankey=Dn,n.sankeyPositionJustified=gn,n.sankeyPositionRelaxation=Zn,n.sankeyLink=Xn,n.sankeyNode=Qn,n.sankeyDiagram=ot,n.sankeyLinkTitle=ut,Object.defineProperty(n,"__esModule",{value:!0})}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.links path { | |
opacity: 0.2; | |
} | |
.nodes text { | |
font-family: sans-serif; | |
font-size: 10pt; | |
} | |
.nodes line { | |
stroke: black; | |
stroke-width: 2px; | |
} | |
svg { | |
position: absolute; | |
} | |
canvas { | |
position: absolute; | |
} | |
</style> | |
<body> | |
<svg width="400" height="200"></svg> | |
<canvas width="400" height="400"></canvas> | |
<script src="https://d3js.org/d3.v4.js"></script> | |
<script src="https://d3js.org/d3-interpolate.v1.min.js"></script> | |
<script src="d3-sankey-diagram.min.js"></script> | |
<script> | |
// Data | |
// Say value measured in t/year, and each dot is 1 kg. | |
// So after running for the equivalent of 1 year, we should have seen `1000 * | |
// value` dots go by. Assuming they are spread evenly, the interval between | |
// adding new dots should be T/(1000*value). | |
var graph = { | |
nodes: [ | |
{"id": "a", "title": "Source"}, | |
{"id": "b", "title": "Stage 1"}, | |
{"id": "c", "title": "Stage 2"}, | |
{"id": "d", "title": "Output\nflow"}, | |
{"id": "e", "title": "Losses"} | |
], | |
links: [ | |
{"source": "a", "target": "b", "type": "x", "value": 2.0}, | |
{"source": "b", "target": "c", "type": "x", "value": 1.5}, | |
{"source": "a", "target": "c", "type": "y", "value": 1}, | |
{"source": "a", "target": "c", "type": "z", "value": 2}, | |
{"source": "c", "target": "d", "type": "0", "value": 3.0}, | |
{"source": "b", "target": "e", "type": "1", "value": 0.5}, | |
{"source": "c", "target": "e", "type": "1", "value": 1.5}, | |
{"source": "a", "target": "e", "type": "1", "value": 0.5} | |
] | |
}; | |
// Set up SVG | |
var svg = d3.select('svg'); | |
var width = +svg.attr('width'); | |
var height = +svg.attr('height'); | |
var margin = { top: 10, left: 50, bottom: 10, right: 50 }; | |
var layout = d3.sankey() | |
.extent([ | |
[margin.left, margin.top], | |
[width - margin.left - margin.right, height - margin.top - margin.bottom]]); | |
// Render | |
var color = d3.scaleOrdinal(d3.schemeCategory10); | |
var diagram = d3.sankeyDiagram() | |
.linkMinWidth(function(d) { return 0.1; }) | |
.linkColor(function(d) { return color(d.type); }); | |
update(); | |
function update() { | |
console.log(layout(graph)); | |
svg | |
.datum(graph) | |
.call(diagram); | |
/* .transition().duration(1000).ease(d3.easeCubic) */ | |
} | |
var T = 300 * 1000; // seconds for a year | |
var freqCounter = 1; | |
var t = d3.timer(tick, 500); | |
var particles = []; | |
function tick(elapsed) { | |
particles = particles.filter(function (d) { | |
return elapsed - d.time < d.duration; | |
}); | |
if (freqCounter > 100) { | |
freqCounter = 1; | |
} | |
graph.links.forEach(d => { | |
d.lastNew = d.lastNew || 0; | |
if ((elapsed - d.lastNew) > (T / d.value / 1000)) { | |
d.lastNew = elapsed; | |
var offset = (Math.random() - .5) * d.dy; | |
particles.push({ | |
link: d, | |
time: elapsed, | |
duration: 1000 * d.points.length, | |
offset: offset, | |
path: this, | |
interp: d3.piecewise(d3.interpolate, d.points), | |
}) | |
} | |
}) | |
/* d3.selectAll(".link").select('path') */ | |
/* .each( */ | |
/* function (d) { */ | |
/* if (40 >= freqCounter) { */ | |
/* var offset = (Math.random() - .5) * d.dy; */ | |
/* particles.push({link: d, time: elapsed, offset: offset, path: this}) */ | |
/* } */ | |
/* }); */ | |
particleEdgeCanvasPath(elapsed); | |
freqCounter++; | |
/* console.log(particles) */ | |
} | |
function particleEdgeCanvasPath(elapsed) { | |
var context = d3.select("canvas").node().getContext("2d") | |
context.clearRect(0,0,1000,1000); | |
context.fillStyle = "gray"; | |
context.lineWidth = "1px"; | |
for (var x in particles) { | |
var currentTime = elapsed - particles[x].time; | |
var currentPercent = currentTime / 1000 / particles[x].link.points.length; //particles[x].duration; | |
/* var currentPos = particles[x].path.getPointAtLength(currentPercent) */ | |
var currentPos = particles[x].interp(currentPercent); | |
context.beginPath(); | |
context.fillStyle = color(particles[x].link.type); //particles[x].link.particleColor(currentTime); | |
context.arc(currentPos.x,currentPos.y + particles[x].offset, | |
5, // particles[x].link.particleSize, | |
0,2*Math.PI); | |
context.fill(); | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment