-
Notifications
You must be signed in to change notification settings - Fork 85
/
clustergrammer.node.min.js
13 lines (13 loc) · 344 KB
/
clustergrammer.node.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
module.exports=function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t){function e(){d3.select(S.params.viz.viz_svg).style("opacity",.5);var t=500;this.params.viz.run_trans===!0&&(t=2500),setTimeout(n,t,this)}function n(t){s(t)}function b(t){f(this,t)}function z(t,e,r){_(this,t,e,r)}function k(){return y}function A(t,e){"sum"===e&&(e="rank"),"var"===e&&(e="rankvar"),w(this,e,t)}function E(){return x(this.params)}function N(t,e){h(this,t,e)}var M=o(t),S={};if(S.params=a(M),S.config=M,S.params.zoom_behavior=d3.behavior.zoom().scaleExtent([1,S.params.viz.square_zoom*S.params.viz.zoom_ratio.x]).on("zoom",function(){g(S)}),S.params.zoom_behavior.translate([S.params.viz.clust.margin.left,S.params.viz.clust.margin.top]),S.params.use_sidebar){var O=r(271);O(S)}return i(S),S.update_view=h,S.resize_viz=e,S.play_demo=l,S.ini_demo=c,S.filter_viz_using_nodes=u,S.filter_viz_using_names=d,S.update_cats=b,S.reset_cats=p,S.zoom=z,S.save_matrix=v,S.brush_crop_matrix=m,S.d3_tip_custom=k,S.reorder=A,S.export_matrix_string=E,S.update_view=N,S}var o=r(1),a=r(9),i=r(89),s=r(152),l=r(229),c=r(247),u=r(250),d=r(251),f=r(252),p=r(253),_=r(144),h=r(202),v=r(255),m=r(259),g=r(153),y=r(100),w=r(143),x=r(257);d3.slider=r(261);r(263);r(265),r(269),t.exports=n},function(t,e,r){"use strict";var n=r(2),o=r(3),a=r(4),i=r(5),s=r(6),l=r(7),c=r(8);t.exports=function(t){var e=s(),r=n.extend(e,t);r.network_data=t.network_data;var u=": ";_.each(["row","col"],function(t){var e=r.network_data[t+"_nodes"],n=c(e);e.forEach(function(e,o){e[t+"_index"]=o,n&&(r.super_labels=!0,r.super[t]=e.name.split(u)[0],e.name=e.name.split(u)[1]),e.name=String(e.name),e.name=e.name.replace(/_/g," ")})}),r.network_data.row_nodes_names=n.pluck(r.network_data.row_nodes,"name"),r.network_data.col_nodes_names=n.pluck(r.network_data.col_nodes,"name"),r.sim_mat=l(r);var d=a(r.network_data.views),f={};_.each(_.keys(d.possible_filters),function(t){var e=i(d.filter_data,t);f[t]=e}),_.has(r.network_data,"views")&&r.network_data.views.forEach(function(t){_.each(_.keys(d.possible_filters),function(e){_.has(t,e)||(t[e]=f[e])});var e=t.nodes;_.each(["row","col"],function(t){var r=c(e[t+"_nodes"]);e[t+"_nodes"].forEach(function(e,n){e[t+"_index"]=n,r&&(e.name=e.name.split(u)[1]),e.name=String(e.name),e.name=e.name.replace(/_/g," ")})})});var p=r.network_data.col_nodes,h=r.network_data.row_nodes;if(_.has(r.network_data,"mat")){for(var v=[],m=r.network_data.mat,g={},y=0;y<m.length;y++)for(var w=0;w<m[0].length;w++)g={},g.source=y,g.target=w,g.value=m[y][w],v.push(g);r.network_data.links=v}if(r.network_data.links.forEach(function(t){t.name=h[t.source].name+"_"+p[t.target].name,t.row_name=h[t.source].name,t.col_name=p[t.target].name}),r.transpose){r.network_data=o(r.network_data);var x=t.col_label,b=t.row_label;t.row_label=x,t.col_label=b}n.is_undefined(t.row_label)||n.is_undefined(t.col_label)||(r.super_labels=!0,r.super={},r.super.row=t.row_label,r.super.col=t.col_label),r.inst_order={},!n.is_undefined(t.order)&&n.is_supported_order(t.order)?(r.inst_order.row=t.order,r.inst_order.col=t.order):(r.inst_order.row="clust",r.inst_order.col="clust"),!n.is_undefined(t.row_order)&&n.is_supported_order(t.row_order)&&(r.inst_order.col=t.row_order),!n.is_undefined(t.col_order)&&n.is_supported_order(t.col_order)&&(r.inst_order.row=t.col_order);var z=n.has(r.network_data.row_nodes[0],"group"),k=n.has(r.network_data.col_nodes[0],"group");return r.show_dendrogram=z||k,n.has(r.network_data.links[0],"value_orig")?r.keep_orig=!0:r.keep_orig=!1,r}},function(t,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports={normal_name:function(t){var e=t.name.replace(/_/g," ").split("#")[0];return e},is_supported_order:function(t){return"ini"===t||"clust"===t||"rank_var"===t||"rank"===t||"class"===t||"alpha"==t},has:function(t,e){return null!=t&&hasOwnProperty.call(t,e)},property:function(t){return function(e){return null==e?void 0:e[t]}},pluck:function(t,e){var r=this;if(window._){if("function"==typeof _.pluck)return _.pluck(t,e);if("function"==typeof _.map)return _.map(t,r.property(e))}else if(t.map&&"function"==typeof t.map)return t.map(r.property(e))},is_undefined:function(t){return void 0===t},extend:function(t,e){t=t||{};for(var n in e)"object"===r(e[n])?t[n]=this.extend(t[n],e[n]):t[n]=e[n];return t}}},function(t,e,r){"use strict";var n=r(2);t.exports=function(t){var e,r,o={};for(o.row_nodes=t.col_nodes,o.col_nodes=t.row_nodes,o.links=[],r=0;r<t.links.length;r++)e={},e.source=t.links[r].target,e.target=t.links[r].source,e.value=t.links[r].value,n.has(t.links[r],"highlight")&&(e.highlight=t.links[r].highlight),n.has(t.links[r],"value_up")&&(e.value_up=t.links[r].value_up),n.has(t.links[r],"value_dn")&&(e.value_dn=t.links[r].value_dn),n.has(t.links[r],"info")&&(e.info=t.links[r].info),o.links.push(e);return o}},function(t,e){"use strict";t.exports=function(t){var e={},r={};_.each(t,function(t){var e=_.keys(t);_.each(e,function(e){"nodes"!=e&&(_.has(r,e)||(r[e]=[]),r[e].push(t[e]),r[e]=_.uniq(r[e]))})});var n=_.keys(r);_.each(n,function(t){var n=r[t],o=n.length,a="categorical";_.each(n,function(t){"number"==typeof t&&(a="numerical")}),o>1&&(e[t]=a)});var o={};return o.possible_filters=e,o.filter_data=r,o}},function(t,e){"use strict";t.exports=function(t,e){var r=t[e].sort(function(t,e){return e-t})[0];return r=String(r)}},function(t,e){"use strict";t.exports=function(){var t={row_label_scale:1,col_label_scale:1,super_labels:!1,super:{},show_label_tooltips:!0,show_tile_tooltips:!0,transpose:!1,tile_colors:["#FF0000","#1C86EE"],bar_colors:["#FF0000","#1C86EE"],cat_value_colors:["#2F4F4F","#9370DB"],outline_colors:["orange","black"],highlight_color:"#FFFF00",tile_title:!1,input_domain:0,opacity_scale:"linear",do_zoom:!0,is_zoom:0,is_slider_drag:!1,is_cropping:!1,background_color:"#FFFFFF",super_border_color:"#F5F5F5",outer_margins:{top:0,bottom:0,left:0,right:0},ini_expand:!1,grey_border_width:2,tile_click_hlight:!1,super_label_scale:1,make_tile_tooltip:function(t){return t.info},ini_view:null,requested_view:null,use_sidebar:!0,title:null,about:null,sidebar_width:160,sidebar_icons:!0,row_search_placeholder:"Row",buffer_width:10,show_sim_mat:!1,cat_colors:null,resize:!0,clamp_opacity:.85,expand_button:!0,max_allow_fs:20,dendro_filter:{row:!1,col:!1},cat_filter:{row:!1,col:!1},crop_filter_nodes:{row:!1,col:!1},row_tip_callback:null,col_tip_callback:null,tile_tip_callback:null,matrix_update_callback:null,cat_update_callback:null,dendro_callback:null,dendro_click_callback:null,new_row_cats:null,make_modals:!0,show_viz_border:!1};return t}},function(t,e){"use strict";t.exports=function(t){var e=!1,r=t.network_data.row_nodes_names.length,n=t.network_data.col_nodes_names.length;if(r==n){var o=t.network_data.row_nodes_names,a=t.network_data.col_nodes_names;e=!0,_.each(o,function(t){var r=o.indexOf(t);t!==a[r]&&(e=!1)})}return e&&(t.expand_button=!1),e}},function(t,e){"use strict";t.exports=function(t){var e=": ",r=!0;return _.each(t,function(t){var n=String(t.name);n.indexOf(e)<0&&(r=!1)}),r}},function(t,e,r){"use strict";var n=r(10),o=r(64),a=r(65),i=r(4),s=r(66),l=r(88);t.exports=function(t){var e=$.extend(!0,{},t),r=e;if(r.inst_nodes={},r.inst_nodes.row_nodes=r.network_data.row_nodes,r.inst_nodes.col_nodes=r.network_data.col_nodes,null!==r.ini_view){var c=r.ini_view,u=i(r.network_data.views);r.viz={},r.viz.possible_filters=u.possible_filters,r.viz.filter_data=u.filter_data,c=a(r,c),r.network_data=n(e,r,c),r.requested_view=c}return r=s(r),r.use_sidebar&&(r.sidebar=o(r)),r.zoom_info=l(),r}},function(t,e,r){"use strict";var n=r(11),o=r(63);t.exports=function(t,e,r){var a=t.network_data.views,i=!1;_.has(a[0],"enr_score_type")&&(i=!0);var s=o(e,a,r);i&&0==s.length&&(r={N_row_sum:"all",N_col_sum:"10"},s=o(e,a,r));var l,c=s[0];if("undefined"!=typeof c){var u=c.nodes;l=n(t,u)}else l=t.network_data;return l}},function(t,e,r){"use strict";var n=r(2),o=r(12),a=o.create();a.import(r(25)),a.import(r(62)),t.exports=function(t,e){var r=t.network_data.links,o=n.pluck(e.row_nodes,"name"),i=n.pluck(e.col_nodes,"name"),s=a.matrix(a.zeros([e.row_nodes.length,e.col_nodes.length]));s=s.toArray();var l=_.filter(r,function(t){var e=t.name.split("_")[0],r=t.name.split("_")[1],n=_.indexOf(o,e),a=_.indexOf(i,r);if(n>-1&a>-1)return t.source=n,t.target=a,s[n][a]=t.value,t}),c={};return c.row_nodes=e.row_nodes,c.row_nodes_names=o,c.col_nodes=e.col_nodes,c.col_nodes_names=i,c.links=l,c.all_links=r,c.mat=s,c.views=t.network_data.views,_.has(t.network_data,"cat_colors")&&(c.cat_colors=t.network_data.cat_colors),c}},function(t,e,r){"use strict";t.exports=r(13)},function(t,e,r){"use strict";var n=r(14).isFactory,o=r(16),a=r(20),i=r(22),s=r(24);e.create=function(t){function e(t){if(!n(t))throw new Error("Factory object with properties `type`, `name`, and `factory` expected");var o,a=r.indexOf(t);return a===-1?(o=t.math===!0?t.factory(c.type,u,e,c.typed,c):t.factory(c.type,u,e,c.typed),r.push(t),l.push(o)):o=l[a],o}if("function"!=typeof Object.create)throw new Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var r=[],l=[],c=a.mixin({});c.type={},c.expression={transform:{},mathWithTransform:{}},c.typed=o.create(c.type);var u={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};return c.import=e(i),c.config=e(s),c.expression.mathWithTransform.config=c.config,t&&c.config(t),c}},function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=r(15);e.clone=function t(r){var a="undefined"==typeof r?"undefined":n(r);if("number"===a||"string"===a||"boolean"===a||null===r||void 0===r)return r;if("function"==typeof r.clone)return r.clone();if(Array.isArray(r))return r.map(function(e){return t(e)});if(r instanceof Number)return new Number(r.valueOf());if(r instanceof String)return new String(r.valueOf());if(r instanceof Boolean)return new Boolean(r.valueOf());if(r instanceof Date)return new Date(r.valueOf());if(o(r))return r;if(r instanceof RegExp)throw new TypeError("Cannot clone "+r);return e.map(r,t)},e.map=function(t,r){var n={};for(var o in t)e.hasOwnProperty(t,o)&&(n[o]=r(t[o]));return n},e.extend=function(t,r){for(var n in r)e.hasOwnProperty(r,n)&&(t[n]=r[n]);return t},e.deepExtend=function t(r,n){if(Array.isArray(n))throw new TypeError("Arrays are not supported by deepExtend");for(var o in n)if(e.hasOwnProperty(n,o))if(n[o]&&n[o].constructor===Object)void 0===r[o]&&(r[o]={}),r[o].constructor===Object?t(r[o],n[o]):r[o]=n[o];else{if(Array.isArray(n[o]))throw new TypeError("Arrays are not supported by deepExtend");r[o]=n[o]}return r},e.deepEqual=function(t,r){var o,a,i;if(Array.isArray(t)){if(!Array.isArray(r))return!1;if(t.length!=r.length)return!1;for(a=0,i=t.length;a<i;a++)if(!e.deepEqual(t[a],r[a]))return!1;return!0}if(t instanceof Object){if(Array.isArray(r)||!(r instanceof Object))return!1;for(o in t)if(!e.deepEqual(t[o],r[o]))return!1;for(o in r)if(!e.deepEqual(t[o],r[o]))return!1;return!0}return("undefined"==typeof t?"undefined":n(t))===("undefined"==typeof r?"undefined":n(r))&&t==r},e.canDefineProperty=function(){try{if(Object.defineProperty)return Object.defineProperty({},"x",{get:function(){}}),!0}catch(t){}return!1},e.lazy=function(t,r,n){if(e.canDefineProperty()){var o,a=!0;Object.defineProperty(t,r,{get:function(){return a&&(o=n(),a=!1),o},set:function(t){o=t,a=!1},configurable:!0,enumerable:!0})}else t[r]=n()},e.traverse=function(t,e){var r=t;if(e)for(var n=e.split("."),o=0;o<n.length;o++){var a=n[o];a in r||(r[a]={}),r=r[a]}return r},e.hasOwnProperty=function(t,e){return t&&Object.hasOwnProperty.call(t,e)},e.isFactory=function(t){return t&&"function"==typeof t.factory}},function(t,e){"use strict";t.exports=function(t){return t&&t.constructor.prototype.isBigNumber||!1}},function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=r(17),a=r(18).digits,i=r(15),s=r(19),l=function(){return l=o.create,o};e.create=function(t){t.isNumber=function(t){return"number"==typeof t},t.isComplex=function(e){return t.Complex&&e instanceof t.Complex||!1},t.isBigNumber=i,t.isFraction=function(e){return t.Fraction&&e instanceof t.Fraction||!1},t.isUnit=function(t){return t&&t.constructor.prototype.isUnit||!1},t.isString=function(t){return"string"==typeof t},t.isArray=Array.isArray,t.isMatrix=s,t.isDenseMatrix=function(t){return t&&t.isDenseMatrix&&t.constructor.prototype.isMatrix||!1},t.isSparseMatrix=function(t){return t&&t.isSparseMatrix&&t.constructor.prototype.isMatrix||!1},t.isRange=function(t){return t&&t.constructor.prototype.isRange||!1},t.isIndex=function(t){return t&&t.constructor.prototype.isIndex||!1},t.isBoolean=function(t){return"boolean"==typeof t},t.isResultSet=function(t){return t&&t.constructor.prototype.isResultSet||!1},t.isHelp=function(t){return t&&t.constructor.prototype.isHelp||!1},t.isFunction=function(t){return"function"==typeof t},t.isDate=function(t){return t instanceof Date},t.isRegExp=function(t){return t instanceof RegExp},t.isObject=function(t){return"object"===("undefined"==typeof t?"undefined":n(t))},t.isNull=function(t){return null===t},t.isUndefined=function(t){return void 0===t},t.isAccessorNode=function(t){return t&&t.isAccessorNode&&t.constructor.prototype.isNode||!1},t.isArrayNode=function(t){return t&&t.isArrayNode&&t.constructor.prototype.isNode||!1},t.isAssignmentNode=function(t){return t&&t.isAssignmentNode&&t.constructor.prototype.isNode||!1},t.isBlockNode=function(t){return t&&t.isBlockNode&&t.constructor.prototype.isNode||!1},t.isConditionalNode=function(t){return t&&t.isConditionalNode&&t.constructor.prototype.isNode||!1},t.isConstantNode=function(t){return t&&t.isConstantNode&&t.constructor.prototype.isNode||!1},t.isFunctionAssignmentNode=function(t){return t&&t.isFunctionAssignmentNode&&t.constructor.prototype.isNode||!1},t.isFunctionNode=function(t){return t&&t.isFunctionNode&&t.constructor.prototype.isNode||!1},t.isIndexNode=function(t){return t&&t.isIndexNode&&t.constructor.prototype.isNode||!1},t.isNode=function(t){return t&&t.isNode&&t.constructor.prototype.isNode||!1},t.isObjectNode=function(t){return t&&t.isObjectNode&&t.constructor.prototype.isNode||!1},t.isOperatorNode=function(t){return t&&t.isOperatorNode&&t.constructor.prototype.isNode||!1},t.isParenthesisNode=function(t){return t&&t.isParenthesisNode&&t.constructor.prototype.isNode||!1},t.isRangeNode=function(t){return t&&t.isRangeNode&&t.constructor.prototype.isNode||!1},t.isSymbolNode=function(t){return t&&t.isSymbolNode&&t.constructor.prototype.isNode||!1},t.isChain=function(t){return t&&t.constructor.prototype.isChain||!1};var e=l();return e.types=[{name:"number",test:t.isNumber},{name:"Complex",test:t.isComplex},{name:"BigNumber",test:t.isBigNumber},{name:"Fraction",test:t.isFraction},{name:"Unit",test:t.isUnit},{name:"string",test:t.isString},{name:"Array",test:t.isArray},{name:"Matrix",test:t.isMatrix},{name:"DenseMatrix",test:t.isDenseMatrix},{name:"SparseMatrix",test:t.isSparseMatrix},{name:"Range",test:t.isRange},{name:"Index",test:t.isIndex},{name:"boolean",test:t.isBoolean},{name:"ResultSet",test:t.isResultSet},{name:"Help",test:t.isHelp},{name:"function",test:t.isFunction},{name:"Date",test:t.isDate},{name:"RegExp",test:t.isRegExp},{name:"Object",test:t.isObject},{name:"null",test:t.isNull},{name:"undefined",test:t.isUndefined},{name:"OperatorNode",test:t.isOperatorNode},{name:"ConstantNode",test:t.isConstantNode},{name:"SymbolNode",test:t.isSymbolNode},{name:"ParenthesisNode",test:t.isParenthesisNode},{name:"FunctionNode",test:t.isFunctionNode},{name:"FunctionAssignmentNode",test:t.isFunctionAssignmentNode},{name:"ArrayNode",test:t.isArrayNode},{name:"AssignmentNode",test:t.isAssignmentNode},{name:"BlockNode",test:t.isBlockNode},{name:"ConditionalNode",test:t.isConditionalNode},{name:"IndexNode",test:t.isIndexNode},{name:"RangeNode",test:t.isRangeNode},{name:"Node",test:t.isNode}],e.conversions=[{from:"number",to:"BigNumber",convert:function(e){if(a(e)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+e+"). Use function bignumber(x) to convert to BigNumber.");return new t.BigNumber(e)}},{from:"number",to:"Complex",convert:function(e){return new t.Complex(e,0)}},{from:"number",to:"string",convert:function(t){return t+""}},{from:"BigNumber",to:"Complex",convert:function(e){return new t.Complex(e.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(t){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(e){return new t.Complex(e.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(e){var r=new t.Fraction(e);if(r.valueOf()!==e)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+e+"). Use function fraction(x) to convert to Fraction.");return new t.Fraction(e)}},{from:"string",to:"number",convert:function(t){var e=Number(t);if(isNaN(e))throw new Error('Cannot convert "'+t+'" to a number');return e}},{from:"string",to:"BigNumber",convert:function(e){try{return new t.BigNumber(e)}catch(t){throw new Error('Cannot convert "'+e+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(e){try{return new t.Fraction(e)}catch(t){throw new Error('Cannot convert "'+e+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(e){try{return new t.Complex(e)}catch(t){throw new Error('Cannot convert "'+e+'" to Complex')}}},{from:"boolean",to:"number",convert:function(t){return+t}},{from:"boolean",to:"BigNumber",convert:function(e){return new t.BigNumber(+e)}},{from:"boolean",to:"Fraction",convert:function(e){return new t.Fraction(+e)}},{from:"boolean",to:"string",convert:function(t){return+t}},{from:"null",to:"number",convert:function(){return 0}},{from:"null",to:"string",convert:function(){return"null"}},{from:"null",to:"BigNumber",convert:function(){return new t.BigNumber(0)}},{from:"null",to:"Fraction",convert:function(){return new t.Fraction(0)}},{from:"Array",to:"Matrix",convert:function(e){return new t.DenseMatrix(e)}},{from:"Matrix",to:"Array",convert:function(t){return t.valueOf()}}],e}},function(t,e,r){var n,o,a,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(r,i){o=[],n=i,a="function"==typeof n?n.apply(e,o):n,!(void 0!==a&&(t.exports=a))}(void 0,function(){function t(){function e(t){for(var e,r=0;r<A.types.length;r++){var n=A.types[r];if(n.name===t){e=n.test;break}}if(!e){var o;for(r=0;r<A.types.length;r++)if(n=A.types[r],n.name.toLowerCase()==t.toLowerCase()){o=n.name;break}throw new Error('Unknown type "'+t+'"'+(o?'. Did you mean "'+o+'"?':""))}return e}function r(t){for(var e="",r=0;r<t.length;r++){var n=t[r];if(n.signatures&&""!=n.name)if(""==e)e=n.name;else if(e!=n.name){var o=new Error("Function names do not match (expected: "+e+", actual: "+n.name+")");throw o.data={actual:n.name,expected:e},o}}return e}function n(t,e,r,n,o){var a,i=v(n),s=o?o.split(","):null,l=t||"unnamed",c=s&&m(s,"any"),u={fn:t,index:r,actual:n,expected:s};a=s?e>r&&!c?"Unexpected type of argument in function "+l+" (expected: "+s.join(" or ")+", actual: "+i+", index: "+r+")":"Too few arguments in function "+l+" (expected: "+s.join(" or ")+", index: "+r+")":"Too many arguments in function "+l+" (expected: "+r+", actual: "+e+")";var d=new TypeError(a);return d.data=u,d}function o(t){this.name=t||"refs",this.categories={}}function a(t,e){if("string"==typeof t){var r=t.trim(),n="..."===r.substr(0,3);if(n&&(r=r.substr(3)),""===r)this.types=["any"];else{this.types=r.split("|");for(var o=0;o<this.types.length;o++)this.types[o]=this.types[o].trim()}}else{if(!Array.isArray(t)){if(t instanceof a)return t.clone();throw new Error("String or Array expected")}this.types=t}this.conversions=[],this.varArgs=n||e||!1,this.anyType=this.types.indexOf("any")!==-1}function s(t,e){var r;if("string"==typeof t)r=""!==t?t.split(","):[];else{if(!Array.isArray(t))throw new Error("string or Array expected");r=t}this.params=new Array(r.length),this.anyType=!1,this.varArgs=!1;for(var n=0;n<r.length;n++){var o=new a(r[n]);if(this.params[n]=o,o.anyType&&(this.anyType=!0),n===r.length-1)this.varArgs=o.varArgs;else if(o.varArgs)throw new SyntaxError('Unexpected variable arguments operator "..."')}this.fn=e}function l(t,e,r,n){this.path=t||[],this.param=t[t.length-1]||null,this.signature=e||null,this.childs=r||[],this.fallThrough=n||!1}function c(t){var e,r,n={},o=[];for(var a in t)if(t.hasOwnProperty(a)){var i=t[a];if(e=new s(a,i),e.ignore())continue;var l=e.expand();for(r=0;r<l.length;r++){var c=l[r],u=c.toString(),d=n[u];if(d){var f=s.compare(c,d);if(f<0)n[u]=c;else if(0===f)throw new Error('Signature "'+u+'" is defined twice')}else n[u]=c}}for(u in n)n.hasOwnProperty(u)&&o.push(n[u]);for(o.sort(function(t,e){return s.compare(t,e)}),r=0;r<o.length;r++)if(e=o[r],e.varArgs)for(var p=e.params.length-1,_=e.params[p],h=0;h<_.types.length;){if(_.conversions[h])for(var v=_.types[h],g=0;g<o.length;g++){var y=o[g],w=y.params[p];if(y!==e&&w&&m(w.types,v)&&!w.conversions[p]){_.types.splice(h,1),_.conversions.splice(h,1),h--;break}}h++}return o}function u(t){for(var e=[],r=0;r<t.length;r++)t[r].anyType&&e.push(t[r]);return e}function d(t){for(var e={},r=0;r<t.length;r++){var n=t[r];if(n.fn&&!n.hasConversions()){var o=n.params.join(",");e[o]=n.fn}}return e}function f(t,e,r){var n,o,i,s=e.length,c=[];for(n=0;n<t.length;n++)o=t[n],o.params.length!==s||i||(i=o),void 0!=o.params[s]&&c.push(o);c.sort(function(t,e){return a.compare(t.params[s],e.params[s])});var u=[];for(n=0;n<c.length;n++){o=c[n];var d=o.params[s],p=u.filter(function(t){return t.param.overlapping(d)})[0];if(p){if(p.param.varArgs)throw new Error('Conflicting types "'+p.param+'" and "'+d+'"');p.signatures.push(o)}else u.push({param:d,signatures:[o]})}var _=[];for(n=0;n<r.length;n++)r[n].paramsStartWith(e)&&_.push(r[n]);var h=!1;for(n=0;n<_.length;n++)if(!m(t,_[n])){h=!0;break}var v=new Array(u.length);for(n=0;n<u.length;n++){var g=u[n];v[n]=f(g.signatures,e.concat(g.param),_)}return new l(e,i,v,h)}function p(t){for(var e=[],r=0;r<t;r++)e[r]="arg"+r;return e}function _(t,e){var r=new o,a=c(e);if(0==a.length)throw new Error("No signatures provided");var i=u(a),s=f(a,[],i),l=[],_=(t||"").replace(/[^a-zA-Z0-9_$]/g,"_"),v=p(h(a));l.push("function "+_+"("+v.join(", ")+") {"),l.push(' "use strict";'),l.push(" var name = "+JSON.stringify(t||"")+";"),l.push(s.toCode(r," ",!1)),l.push("}");var m=[r.toCode(),"return "+l.join("\n")].join("\n"),g=new Function(r.name,"createError",m),y=g(r,n);return y.signatures=d(a),y}function h(t){for(var e=0,r=0;r<t.length;r++){var n=t[r].params.length;n>e&&(e=n)}return e}function v(t){for(var e,r=0;r<A.types.length;r++){var n=A.types[r];if("Object"===n.name)e=n;else if(n.test(t))return n.name}return e&&e.test(t)?e.name:"unknown"}function m(t,e){return t.indexOf(e)!==-1}function g(t){return t[t.length-1]}function y(t,e){if(!t.signatures)throw new TypeError("Function is no typed-function");var r;if("string"==typeof e){r=e.split(",");for(var n=0;n<r.length;n++)r[n]=r[n].trim()}else{if(!Array.isArray(e))throw new TypeError("String array or a comma separated string expected");r=e}var o=r.join(","),a=t.signatures[o];if(a)return a;throw new TypeError("Signature not found (signature: "+(t.name||"unnamed")+"("+r.join(", ")+"))")}function w(t,e){var r=v(t);if(e===r)return t;for(var n=0;n<A.conversions.length;n++){var o=A.conversions[n];if(o.from===r&&o.to===e)return o.convert(t)}throw new Error("Cannot convert from "+r+" to "+e)}o.prototype.add=function(t,e){var r=e||"fn";this.categories[r]||(this.categories[r]=[]);var n=this.categories[r].indexOf(t);return n==-1&&(n=this.categories[r].length,this.categories[r].push(t)),r+n},o.prototype.toCode=function(){var t=[],e=this.name+".categories",r=this.categories;for(var n in r)if(r.hasOwnProperty(n))for(var o=r[n],a=0;a<o.length;a++)t.push("var "+n+a+" = "+e+"['"+n+"']["+a+"];");return t.join("\n")},a.compare=function(t,e){if(t.anyType)return 1;if(e.anyType)return-1;if(m(t.types,"Object"))return 1;if(m(e.types,"Object"))return-1;if(t.hasConversions()){if(e.hasConversions()){var r,n,o;for(r=0;r<t.conversions.length;r++)if(void 0!==t.conversions[r]){n=t.conversions[r];break}for(r=0;r<e.conversions.length;r++)if(void 0!==e.conversions[r]){o=e.conversions[r];break}return A.conversions.indexOf(n)-A.conversions.indexOf(o)}return 1}if(e.hasConversions())return-1;var a,i;for(r=0;r<A.types.length;r++)if(A.types[r].name===t.types[0]){a=r;break}for(r=0;r<A.types.length;r++)if(A.types[r].name===e.types[0]){i=r;break}return a-i},a.prototype.overlapping=function(t){for(var e=0;e<this.types.length;e++)if(m(t.types,this.types[e]))return!0;return!1},a.prototype.matches=function(t){return this.anyType||t.anyType||this.overlapping(t)},a.prototype.clone=function(){var t=new a(this.types.slice(),this.varArgs);return t.conversions=this.conversions.slice(),t},a.prototype.hasConversions=function(){return this.conversions.length>0},a.prototype.contains=function(t){for(var e=0;e<this.types.length;e++)if(t[this.types[e]])return!0;return!1},a.prototype.toString=function(t){for(var e=[],r={},n=0;n<this.types.length;n++){var o=this.conversions[n],a=t&&o?o.to:this.types[n];a in r||(r[a]=!0,e.push(a))}return(this.varArgs?"...":"")+e.join("|")},s.prototype.clone=function(){return new s(this.params.slice(),this.fn)},s.prototype.expand=function(){function t(r,n){if(n.length<r.params.length){var o,i,l,c=r.params[n.length];if(c.varArgs){for(i=c.clone(),o=0;o<A.conversions.length;o++)if(l=A.conversions[o],!m(c.types,l.from)&&m(c.types,l.to)){var u=i.types.length;i.types[u]=l.from,i.conversions[u]=l}t(r,n.concat(i))}else{for(o=0;o<c.types.length;o++)t(r,n.concat(new a(c.types[o])));for(o=0;o<A.conversions.length;o++)l=A.conversions[o],!m(c.types,l.from)&&m(c.types,l.to)&&(i=new a(l.from),i.conversions[0]=l,t(r,n.concat(i)))}}else e.push(new s(n,r.fn))}var e=[];return t(this,[]),e},s.compare=function(t,e){if(t.params.length>e.params.length)return 1;if(t.params.length<e.params.length)return-1;var r,n=t.params.length,o=0,i=0;for(r=0;r<n;r++)t.params[r].hasConversions()&&o++,e.params[r].hasConversions()&&i++;if(o>i)return 1;if(o<i)return-1;for(r=0;r<t.params.length;r++){var s=a.compare(t.params[r],e.params[r]);if(0!==s)return s}return 0},s.prototype.hasConversions=function(){for(var t=0;t<this.params.length;t++)if(this.params[t].hasConversions())return!0;return!1},s.prototype.ignore=function(){for(var t={},e=0;e<A.ignore.length;e++)t[A.ignore[e]]=!0;for(e=0;e<this.params.length;e++)if(this.params[e].contains(t))return!0;return!1},s.prototype.paramsStartWith=function(t){if(0===t.length)return!0;for(var e=g(this.params),r=g(t),n=0;n<t.length;n++){var o=this.params[n]||(e.varArgs?e:null),a=t[n]||(r.varArgs?r:null);if(!o||!a||!o.matches(a))return!1}return!0},s.prototype.toCode=function(t,e){for(var r=[],n=new Array(this.params.length),o=0;o<this.params.length;o++){var a=this.params[o],i=a.conversions[0];a.varArgs?n[o]="varArgs":i?n[o]=t.add(i.convert,"convert")+"(arg"+o+")":n[o]="arg"+o}var s=this.fn?t.add(this.fn,"signature"):void 0;return s?e+"return "+s+"("+n.join(", ")+"); // signature: "+this.params.join(", "):r.join("\n")},s.prototype.toString=function(){return this.params.join(", ")},l.prototype.toCode=function(t,r){var n=[];if(this.param){var o=this.path.length-1,a=this.param.conversions[0],i="// type: "+(a?a.from+" (convert to "+a.to+")":this.param);if(this.param.varArgs)if(this.param.anyType)n.push(r+"if (arguments.length > "+o+") {"),n.push(r+" var varArgs = [];"),n.push(r+" for (var i = "+o+"; i < arguments.length; i++) {"),n.push(r+" varArgs.push(arguments[i]);"),n.push(r+" }"),n.push(this.signature.toCode(t,r+" ")),n.push(r+"}");else{for(var s=function(r,n){for(var o=[],a=0;a<r.length;a++)o[a]=t.add(e(r[a]),"test")+"("+n+")";return o.join(" || ")}.bind(this),l=this.param.types,c=[],u=0;u<l.length;u++)void 0===this.param.conversions[u]&&c.push(l[u]);n.push(r+"if ("+s(l,"arg"+o)+") { "+i),n.push(r+" var varArgs = [arg"+o+"];"),n.push(r+" for (var i = "+(o+1)+"; i < arguments.length; i++) {"),n.push(r+" if ("+s(c,"arguments[i]")+") {"),n.push(r+" varArgs.push(arguments[i]);");for(var u=0;u<l.length;u++){var d=this.param.conversions[u];if(d){var f=t.add(e(l[u]),"test"),p=t.add(d.convert,"convert");n.push(r+" }"),n.push(r+" else if ("+f+"(arguments[i])) {"),n.push(r+" varArgs.push("+p+"(arguments[i]));")}}n.push(r+" } else {"),n.push(r+" throw createError(name, arguments.length, i, arguments[i], '"+c.join(",")+"');"),n.push(r+" }"),n.push(r+" }"),n.push(this.signature.toCode(t,r+" ")),n.push(r+"}")}else if(this.param.anyType)n.push(r+"// type: any"),n.push(this._innerCode(t,r));else{var _=this.param.types[0],f="any"!==_?t.add(e(_),"test"):null;n.push(r+"if ("+f+"(arg"+o+")) { "+i),n.push(this._innerCode(t,r+" ")),n.push(r+"}")}}else n.push(this._innerCode(t,r));return n.join("\n")},l.prototype._innerCode=function(t,e){var r,n=[];for(this.signature&&(n.push(e+"if (arguments.length === "+this.path.length+") {"),n.push(this.signature.toCode(t,e+" ")),n.push(e+"}")),r=0;r<this.childs.length;r++)n.push(this.childs[r].toCode(t,e));if(!this.fallThrough||this.param&&this.param.anyType){var o=this._exceptions(t,e);o&&n.push(o)}return n.join("\n")},l.prototype._exceptions=function(t,e){var r=this.path.length;if(0===this.childs.length)return[e+"if (arguments.length > "+r+") {",e+" throw createError(name, arguments.length, "+r+", arguments["+r+"]);",e+"}"].join("\n");for(var n={},o=[],a=0;a<this.childs.length;a++){var i=this.childs[a];if(i.param)for(var s=0;s<i.param.types.length;s++){var l=i.param.types[s];l in n||i.param.conversions[s]||(n[l]=!0,o.push(l))}}return e+"throw createError(name, arguments.length, "+r+", arguments["+r+"], '"+o.join(",")+"');"};var x=[{name:"number",test:function(t){return"number"==typeof t}},{name:"string",test:function(t){return"string"==typeof t}},{name:"boolean",test:function(t){return"boolean"==typeof t}},{name:"Function",test:function(t){return"function"==typeof t}},{name:"Array",test:Array.isArray},{name:"Date",test:function(t){return t instanceof Date}},{name:"RegExp",test:function(t){return t instanceof RegExp}},{name:"Object",test:function(t){return"object"===("undefined"==typeof t?"undefined":i(t))}},{name:"null",test:function(t){return null===t}},{name:"undefined",test:function(t){return void 0===t}}],b={},z=[],k=[],A={config:b,types:x,conversions:z,ignore:k};return A=_("typed",{Object:function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(t[n]);var o=r(e);return _(o,t)},"string, Object":_,"...Function":function(t){for(var e,n=r(t),o={},a=0;a<t.length;a++){var s=t[a];if("object"!==i(s.signatures))throw e=new TypeError("Function is no typed-function (index: "+a+")"),e.data={index:a},e;for(var l in s.signatures)if(s.signatures.hasOwnProperty(l))if(o.hasOwnProperty(l)){if(s.signatures[l]!==o[l])throw e=new Error('Signature "'+l+'" is defined twice'),e.data={signature:l},e}else o[l]=s.signatures[l]}return _(n,o)}}),A.config=b,A.types=x,
A.conversions=z,A.ignore=k,A.create=t,A.find=y,A.convert=w,A.addType=function(t){if(!t||"string"!=typeof t.name||"function"!=typeof t.test)throw new TypeError("Object with properties {name: string, test: function} expected");A.types.push(t)},A.addConversion=function(t){if(!t||"string"!=typeof t.from||"string"!=typeof t.to||"function"!=typeof t.convert)throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");A.conversions.push(t)},A}return t()})},function(t,e){"use strict";function r(t){for(var e=[],r=0;r<t;r++)e.push(0);return e}e.isNumber=function(t){return"number"==typeof t},e.isInteger=function(t){return!!isFinite(t)&&t==Math.round(t)},e.sign=Math.sign||function(t){return t>0?1:t<0?-1:0},e.format=function(t,r){if("function"==typeof r)return r(t);if(t===1/0)return"Infinity";if(t===-(1/0))return"-Infinity";if(isNaN(t))return"NaN";var n="auto",o=void 0;switch(r&&(r.notation&&(n=r.notation),e.isNumber(r)?o=r:r.precision&&(o=r.precision)),n){case"fixed":return e.toFixed(t,o);case"exponential":return e.toExponential(t,o);case"engineering":return e.toEngineering(t,o);case"auto":return e.toPrecision(t,o,r&&r.exponential).replace(/((\.\d*?)(0+))($|e)/,function(){var t=arguments[2],e=arguments[4];return"."!==t?t+e:e});default:throw new Error('Unknown notation "'+n+'". Choose "auto", "exponential", or "fixed".')}},e.splitNumber=function(t){var e=String(t).toLowerCase().match(/^0*?(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!e)throw new SyntaxError("Invalid number "+t);var r=e[1],n=e[2],o=parseFloat(e[4]||"0"),a=n.indexOf(".");o+=a!==-1?a-1:n.length-1;var i=n.replace(".","").replace(/^0*/,function(t){return o-=t.length,""}).replace(/0*$/,"").split("").map(function(t){return parseInt(t)});return 0===i.length&&(i.push(0),o++),{sign:r,coefficients:i,exponent:o}},e.toEngineering=function(t,n){if(isNaN(t)||!isFinite(t))return String(t);var o=e.roundDigits(e.splitNumber(t),n),a=o.exponent,i=o.coefficients,s=a%3===0?a:a<0?a-3-a%3:a-a%3,l=a>=0?a:Math.abs(s);i.length-1<l&&(i=i.concat(r(l-(i.length-1))));for(var c=Math.abs(a-s),u=1;--c>=0;)u++;var d=i.slice(u).join(""),f=d.match(/[1-9]/)?"."+d:"",p=i.slice(0,u).join("")+f+"e"+(a>=0?"+":"")+s.toString();return o.sign+p},e.toFixed=function(t,n){if(isNaN(t)||!isFinite(t))return String(t);var o=e.splitNumber(t),a=e.roundDigits(o,o.exponent+1+(n||0)),i=a.coefficients,s=a.exponent+1,l=s+(n||0);return i.length<l&&(i=i.concat(r(l-i.length))),s<0&&(i=r(-s+1).concat(i),s=1),n&&i.splice(s,0,0===s?"0.":"."),a.sign+i.join("")},e.toExponential=function(t,n){if(isNaN(t)||!isFinite(t))return String(t);var o=e.splitNumber(t),a=n?e.roundDigits(o,n):o,i=a.coefficients,s=a.exponent;i.length<n&&(i=i.concat(r(n-i.length)));var l=i.shift();return a.sign+l+(i.length>0?"."+i.join(""):"")+"e"+(s>=0?"+":"")+s},e.toPrecision=function(t,n,o){if(isNaN(t)||!isFinite(t))return String(t);var a=o&&void 0!==o.lower?o.lower:.001,i=o&&void 0!==o.upper?o.upper:1e5,s=e.splitNumber(t),l=Math.abs(Math.pow(10,s.exponent));if(l<a||l>=i)return e.toExponential(t,n);var c=n?e.roundDigits(s,n):s,u=c.coefficients,d=c.exponent;u.length<n&&(u=u.concat(r(n-u.length))),u=u.concat(r(d-u.length+1+(u.length<n?n-u.length:0))),u=r(-d).concat(u);var f=d>0?d:0;return f<u.length-1&&u.splice(f+1,0,"."),c.sign+u.join("")},e.roundDigits=function(t,e){for(var r={sign:t.sign,coefficients:t.coefficients,exponent:t.exponent},n=r.coefficients;e<=0;)n.unshift(0),r.exponent++,e++;if(n.length>e){var o=n.splice(e,n.length-e);if(o[0]>=5){var a=e-1;for(n[a]++;10===n[a];)n.pop(),0===a&&(n.unshift(0),r.exponent++,a++),a--,n[a]++}}return r},e.digits=function(t){return t.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length},e.DBL_EPSILON=Number.EPSILON||2.220446049250313e-16,e.nearlyEqual=function(t,r,n){if(null==n)return t==r;if(t==r)return!0;if(isNaN(t)||isNaN(r))return!1;if(isFinite(t)&&isFinite(r)){var o=Math.abs(t-r);return o<e.DBL_EPSILON||o<=Math.max(Math.abs(t),Math.abs(r))*n}return!1}},function(t,e){"use strict";t.exports=function(t){return t&&t.constructor.prototype.isMatrix||!1}},function(t,e,r){"use strict";var n=r(21);e.mixin=function(t){var e=new n;return t.on=e.on.bind(e),t.off=e.off.bind(e),t.once=e.once.bind(e),t.emit=e.emit.bind(e),t}},function(t,e){"use strict";function r(){}r.prototype={on:function(t,e,r){var n=this.e||(this.e={});return(n[t]||(n[t]=[])).push({fn:e,ctx:r}),this},once:function(t,e,r){function n(){o.off(t,n),e.apply(r,arguments)}var o=this;return n._=e,this.on(t,n,r)},emit:function(t){var e=[].slice.call(arguments,1),r=((this.e||(this.e={}))[t]||[]).slice(),n=0,o=r.length;for(n;n<o;n++)r[n].fn.apply(r[n].ctx,e);return this},off:function(t,e){var r=this.e||(this.e={}),n=r[t],o=[];if(n&&e)for(var a=0,i=n.length;a<i;a++)n[a].fn!==e&&n[a].fn._!==e&&o.push(n[a]);return o.length?r[t]=o:delete r[t],this}},t.exports=r},function(t,e,r){"use strict";function n(t,e,r,n,c){function u(t,e){var r=arguments.length;if(1!==r&&2!==r)throw new l("import",r,1,2);if(e||(e={}),i(t))_(t,e);else if(Array.isArray(t))t.forEach(function(t){u(t,e)});else if("object"===("undefined"==typeof t?"undefined":o(t))){for(var n in t)if(t.hasOwnProperty(n)){var a=t[n];h(a)?d(n,a,e):i(t)?_(t,e):u(a,e)}}else if(!e.silent)throw new TypeError("Factory, Object, or Array expected")}function d(t,e,r){if(r.wrap&&"function"==typeof e&&(e=p(e)),v(c[t])&&v(e))return e=r.override?n(t,e.signatures):n(c[t],e),c[t]=e,f(t,e),void c.emit("import",t,function(){return e});if(void 0===c[t]||r.override)return c[t]=e,f(t,e),void c.emit("import",t,function(){return e});if(!r.silent)throw new Error('Cannot import "'+t+'": already exists')}function f(t,e){e&&"function"==typeof e.transform?(c.expression.transform[t]=e.transform,m(t)&&(c.expression.mathWithTransform[t]=e.transform)):(delete c.expression.transform[t],m(t)&&(c.expression.mathWithTransform[t]=e))}function p(t){var e=function(){for(var e=[],r=0,n=arguments.length;r<n;r++){var o=arguments[r];e[r]=o&&o.valueOf()}return t.apply(c,e)};return t.transform&&(e.transform=t.transform),e}function _(t,e){if("string"==typeof t.name){var o=t.name,i=o in c.expression.transform,l=t.path?s(c,t.path):c,u=l.hasOwnProperty(o)?l[o]:void 0,d=function(){var a=r(t);if(a&&"function"==typeof a.transform)throw new Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(v(u)&&v(a))return e.override||(a=n(u,a)),a;if(void 0===u||e.override)return a;if(!e.silent)throw new Error('Cannot import "'+o+'": already exists')};t.lazy!==!1?(a(l,o,d),i||("expression.transform"===t.path||g(t))&&a(c.expression.mathWithTransform,o,d)):(l[o]=d(),i||("expression.transform"===t.path||g(t))&&(c.expression.mathWithTransform[o]=d())),c.emit("import",o,d,t.path)}else r(t)}function h(e){return"function"==typeof e||"number"==typeof e||"string"==typeof e||"boolean"==typeof e||null===e||e&&t.isUnit(e)||e&&t.isComplex(e)||e&&t.isBigNumber(e)||e&&t.isFraction(e)||e&&t.isMatrix(e)||e&&Array.isArray(e)}function v(t){return"function"==typeof t&&"object"===o(t.signatures)}function m(t){return!y.hasOwnProperty(t)}function g(t){return void 0===t.path&&!y.hasOwnProperty(t.name)}var y={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return u}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a=r(14).lazy,i=r(14).isFactory,s=r(14).traverse,l=r(23);e.math=!0,e.name="import",e.factory=n,e.lazy=!0},function(t,e){"use strict";function r(t,e,n,o){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.fn=t,this.count=e,this.min=n,this.max=o,this.message="Wrong number of arguments in function "+t+" ("+e+" provided, "+n+(void 0!=o?"-"+o:"")+" expected)",this.stack=(new Error).stack}r.prototype=new Error,r.prototype.constructor=Error,r.prototype.name="ArgumentsError",r.prototype.isArgumentsError=!0,t.exports=r},function(t,e,r){"use strict";function n(t,e,r,n,o){function a(t){if(t){var r=s.map(e,s.clone);i(t,"matrix",l),i(t,"number",c),s.deepExtend(e,t);var n=s.map(e,s.clone),a=s.map(t,s.clone);return o.emit("config",n,r,a),n}return s.map(e,s.clone)}var l=["Matrix","Array"],c=["number","BigNumber","Fraction"];return a.MATRIX=l,a.NUMBER=c,a}function o(t,e){return t.indexOf(e)!==-1}function a(t,e){return t.map(function(t){return t.toLowerCase()}).indexOf(e.toLowerCase())}function i(t,e,r){if(void 0!==t[e]&&!o(r,t[e])){var n=a(r,t[e]);n!==-1?(console.warn('Warning: Wrong casing for configuration option "'+e+'", should be "'+r[n]+'" instead of "'+t[e]+'".'),t[e]=r[n]):console.warn('Warning: Unknown value "'+t[e]+'" for configuration option "'+e+'". Available options: '+r.map(JSON.stringify).join(", ")+".")}}var s=r(14);e.name="config",e.math=!0,e.factory=n},function(t,e,r){"use strict";t.exports=[r(26),r(36),r(38),r(41),r(51),r(57),r(58),r(59),r(60),r(43),r(61)]},function(t,e,r){"use strict";function n(t,e,r,n){function o(){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator")}return o.prototype.type="Matrix",o.prototype.isMatrix=!0,o.storage=function(t){if(!i(t))throw new TypeError("format must be a string value");var e=o._storage[t];if(!e)throw new SyntaxError("Unsupported matrix storage format: "+t);return e},o._storage={},o.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},o.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},o.prototype.create=function(t,e){throw new Error("Cannot invoke create on a Matrix interface")},o.prototype.subset=function(t,e,r){throw new Error("Cannot invoke subset on a Matrix interface")},o.prototype.get=function(t){throw new Error("Cannot invoke get on a Matrix interface")},o.prototype.set=function(t,e,r){throw new Error("Cannot invoke set on a Matrix interface")},o.prototype.resize=function(t,e){throw new Error("Cannot invoke resize on a Matrix interface")},o.prototype.reshape=function(t,e){throw new Error("Cannot invoke reshape on a Matrix interface")},o.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},o.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},o.prototype.map=function(t,e){throw new Error("Cannot invoke map on a Matrix interface")},o.prototype.forEach=function(t){throw new Error("Cannot invoke forEach on a Matrix interface")},o.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},o.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},o.prototype.format=function(t){throw new Error("Cannot invoke format on a Matrix interface")},o.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},o}var o=r(27),a=o.string,i=a.isString;e.name="Matrix",e.path="type",e.factory=n},function(t,e,r){"use strict";e.array=r(28),e.boolean=r(34),e.function=r(35),e.number=r(18),e.object=r(14),e.string=r(29),e.types=r(31),e.emitter=r(20)},function(t,e,r){"use strict";function n(t,e,r){var o,a=t.length;if(a!=e[r])throw new u(a,e[r]);if(r<e.length-1){var i=r+1;for(o=0;o<a;o++){var s=t[o];if(!Array.isArray(s))throw new u(e.length-1,e.length,"<");n(t[o],e,i)}}else for(o=0;o<a;o++)if(Array.isArray(t[o]))throw new u(e.length+1,e.length,">")}function o(t,r,n,a){var i,s,l=t.length,c=r[n],u=Math.min(l,c);if(t.length=c,n<r.length-1){var d=n+1;for(i=0;i<u;i++)s=t[i],Array.isArray(s)||(s=[s],t[i]=s),o(s,r,d,a);for(i=u;i<c;i++)s=[],t[i]=s,o(s,r,d,a)}else{for(i=0;i<u;i++)for(;Array.isArray(t[i]);)t[i]=t[i][0];if(a!==e.UNINITIALIZED)for(i=u;i<c;i++)t[i]=a}}function a(t,e){var r,n=[];if(0===e.length){if(0===t.length)throw new u(null,null,"!=");return t.shift()}for(r=0;r<e[0];r+=1)n.push(a(t,e.slice(1)));return n}function i(t,e,r){var n,o;if(r<e){var a=r+1;for(n=0,o=t.length;n<o;n++)t[n]=i(t[n],e,a)}else for(;Array.isArray(t);)t=t[0];return t}function s(t,e,r){var n,o;if(Array.isArray(t)){var a=r+1;for(n=0,o=t.length;n<o;n++)t[n]=s(t[n],e,a)}else for(var i=r;i<e;i++)t=[t];return t}var l=r(18),c=r(29),u=(r(14),r(31),r(32)),d=r(33);e.size=function(t){for(var e=[];Array.isArray(t);)e.push(t.length),t=t[0];return e},e.validate=function(t,e){var r=0==e.length;if(r){if(Array.isArray(t))throw new u(t.length,0)}else n(t,e,0)},e.validateIndex=function(t,e){if(!l.isNumber(t)||!l.isInteger(t))throw new TypeError("Index must be an integer (value: "+t+")");if(t<0||"number"==typeof e&&t>=e)throw new d(t,e)},e.UNINITIALIZED={},e.resize=function(t,e,r){if(!Array.isArray(t)||!Array.isArray(e))throw new TypeError("Array expected");if(0===e.length)throw new Error("Resizing to scalar is not supported");e.forEach(function(t){if(!l.isNumber(t)||!l.isInteger(t)||t<0)throw new TypeError("Invalid size, must contain positive integers (size: "+c.format(e)+")")});var n=void 0!==r?r:0;return o(t,e,0,n),t},e.reshape=function(t,r){var n,o=e.flatten(t),i=function(t){return t.reduce(function(t,e){return t*e})};if(!Array.isArray(t)||!Array.isArray(r))throw new TypeError("Array expected");if(0===r.length)throw new u(0,i(e.size(t)),"!=");try{n=a(o,r)}catch(n){if(n instanceof u)throw new u(i(r),i(e.size(t)),"!=");throw n}if(o.length>0)throw new u(i(r),i(e.size(t)),"!=");return n},e.squeeze=function(t,r){for(var n=r||e.size(t);Array.isArray(t)&&1===t.length;)t=t[0],n.shift();for(var o=n.length;1===n[o-1];)o--;return o<n.length&&(t=i(t,o,0),n.length=o),t},e.unsqueeze=function(t,r,n,o){var a=o||e.size(t);if(n)for(var i=0;i<n;i++)t=[t],a.unshift(1);for(t=s(t,r,0);a.length<r;)a.push(1);return t},e.flatten=function(t){if(!Array.isArray(t))return t;var e=[];return t.forEach(function t(r){Array.isArray(r)?r.forEach(t):e.push(r)}),e},e.map=function(t,e){return Array.prototype.map.call(t,e)},e.forEach=function(t,e){Array.prototype.forEach.call(t,e)},e.filter=function(t,r){if(1!==e.size(t).length)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(t,r)},e.filterRegExp=function(t,r){if(1!==e.size(t).length)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(t,function(t){return r.test(t)})},e.join=function(t,e){return Array.prototype.join.call(t,e)},e.identify=function(t){if(!Array.isArray(t))throw new TypeError("Array input expected");if(0===t.length)return t;var e=[],r=0;e[0]={value:t[0],identifier:0};for(var n=1;n<t.length;n++)t[n]===t[n-1]?r++:r=0,e.push({value:t[n],identifier:r});return e},e.generalize=function(t){if(!Array.isArray(t))throw new TypeError("Array input expected");if(0===t.length)return t;for(var e=[],r=0;r<t.length;r++)e.push(t[r].value);return e},e.isArray=Array.isArray},function(t,e,r){"use strict";function n(t,r){if(Array.isArray(t)){for(var o="[",a=t.length,i=0;i<a;i++)0!=i&&(o+=", "),o+=n(t[i],r);return o+="]"}return e.format(t,r)}function o(t){return t&&"object"===("undefined"==typeof t?"undefined":a(t))&&"number"==typeof t.s&&"number"==typeof t.n&&"number"==typeof t.d||!1}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=r(18).format,s=r(30).format,l=r(15);e.isString=function(t){return"string"==typeof t},e.endsWith=function(t,e){var r=t.length-e.length,n=t.length;return t.substring(r,n)===e},e.format=function(t,r){if("number"==typeof t)return i(t,r);if(l(t))return s(t,r);if(o(t))return r&&"decimal"===r.fraction?t.toString():t.s*t.n+"/"+t.d;if(Array.isArray(t))return n(t,r);if(e.isString(t))return'"'+t+'"';if("function"==typeof t)return t.syntax?String(t.syntax):"function";if(t&&"object"===("undefined"==typeof t?"undefined":a(t))){if("function"==typeof t.format)return t.format(r);if(t&&t.toString()!=={}.toString())return t.toString();var c=[];for(var u in t)t.hasOwnProperty(u)&&c.push('"'+u+'": '+e.format(t[u],r));return"{"+c.join(", ")+"}"}return String(t)},e.stringify=function(t){for(var e=String(t),r="",n=0;n<e.length;){var o=e.charAt(n);"\\"===o?(r+=o,n++,o=e.charAt(n),""!==o&&'"\\/bfnrtu'.indexOf(o)!==-1||(r+="\\"),r+=o):r+='"'===o?'\\"':o,n++}return'"'+r+'"'},e.escape=function(t){var e=String(t);return e=e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}},function(t,e){"use strict";e.format=function(t,r){if("function"==typeof r)return r(t);if(!t.isFinite())return t.isNaN()?"NaN":t.gt(0)?"Infinity":"-Infinity";var n="auto",o=void 0;switch(void 0!==r&&(r.notation&&(n=r.notation),"number"==typeof r?o=r:r.precision&&(o=r.precision)),n){case"fixed":return e.toFixed(t,o);case"exponential":return e.toExponential(t,o);case"auto":var a=.001,i=1e5;r&&r.exponential&&(void 0!==r.exponential.lower&&(a=r.exponential.lower),void 0!==r.exponential.upper&&(i=r.exponential.upper));({toExpNeg:t.constructor.toExpNeg,toExpPos:t.constructor.toExpPos});if(t.constructor.config({toExpNeg:Math.round(Math.log(a)/Math.LN10),toExpPos:Math.round(Math.log(i)/Math.LN10)}),t.isZero())return"0";var s,l=t.abs();return s=l.gte(a)&&l.lt(i)?t.toSignificantDigits(o).toFixed():e.toExponential(t,o),s.replace(/((\.\d*?)(0+))($|e)/,function(){var t=arguments[2],e=arguments[4];return"."!==t?t+e:e});default:throw new Error('Unknown notation "'+n+'". Choose "auto", "exponential", or "fixed".')}},e.toExponential=function(t,e){return void 0!==e?t.toExponential(e-1):t.toExponential()},e.toFixed=function(t,e){return t.toFixed(e||0)}},function(t,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.type=function(t){var e="undefined"==typeof t?"undefined":r(t);return"object"===e?null===t?"null":Array.isArray(t)?"Array":t instanceof Date?"Date":t instanceof RegExp?"RegExp":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":"Object":"function"===e?"Function":e}},function(t,e){"use strict";function r(t,e,n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.actual=t,this.expected=e,this.relation=n,this.message="Dimension mismatch ("+(Array.isArray(t)?"["+t.join(", ")+"]":t)+" "+(this.relation||"!=")+" "+(Array.isArray(e)?"["+e.join(", ")+"]":e)+")",this.stack=(new Error).stack}r.prototype=new RangeError,r.prototype.constructor=RangeError,r.prototype.name="DimensionError",r.prototype.isDimensionError=!0,t.exports=r},function(t,e){"use strict";function r(t,e,n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.index=t,arguments.length<3?(this.min=0,this.max=e):(this.min=e,this.max=n),void 0!==this.min&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":void 0!==this.max&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=(new Error).stack}r.prototype=new RangeError,r.prototype.constructor=RangeError,r.prototype.name="IndexError",r.prototype.isIndexError=!0,t.exports=r},function(t,e){"use strict";e.isBoolean=function(t){return"boolean"==typeof t}},function(t,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.memoize=function(t,e){return function n(){"object"!==r(n.cache)&&(n.cache={});for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var i=e?e(o):JSON.stringify(o);return i in n.cache?n.cache[i]:n.cache[i]=t.apply(t,o)}},e.maxArgumentCount=function(t){return Object.keys(t.signatures||{}).reduce(function(t,e){var r=(e.match(/,/g)||[]).length+1;return Math.max(t,r)},-1)},e.callWithRightArgumentCount=function(t,e,r){return Object.keys(t.signatures||{}).reduce(function(t,e){var r=(e.match(/,/g)||[]).length+1;return Math.max(t,r)},-1)}},function(t,e,r){"use strict";function n(t,e,n,c){function h(e,r){if(!(this instanceof h))throw new SyntaxError("Constructor must be called with the new operator");if(r&&!p(r))throw new Error("Invalid datatype: "+r);if(t.isMatrix(e))"DenseMatrix"===e.type?(this._data=l.clone(e._data),this._size=l.clone(e._size),this._datatype=r||e._datatype):(this._data=e.toArray(),this._size=e.size(),this._datatype=r||e._datatype);else if(e&&u(e.data)&&u(e.size))this._data=e.data,this._size=e.size,this._datatype=r||e.datatype;else if(u(e))this._data=x(e),this._size=s.size(this._data),s.validate(this._data,this._size),this._datatype=r;else{if(e)throw new TypeError("Unsupported type of data ("+o.types.type(e)+")");this._data=[],this._size=[0],this._datatype=r}}function v(e,r){if(!t.isIndex(r))throw new TypeError("Invalid index");var n=r.isScalar();if(n)return e.get(r.min());var o=r.size();if(o.length!=e._size.length)throw new a(o.length,e._size.length);for(var i=r.min(),s=r.max(),l=0,c=e._size.length;l<c;l++)_(i[l],e._size[l]),_(s[l],e._size[l]);return new h(m(e._data,r,o.length,0),e._datatype)}function m(t,e,r,n){var o=n===r-1,a=e.dimension(n);return o?a.map(function(e){return _(e,t.length),t[e]}).valueOf():a.map(function(o){_(o,t.length);var a=t[o];return m(a,e,r,n+1)}).valueOf()}function g(e,r,n,o){if(!r||r.isIndex!==!0)throw new TypeError("Invalid index");var i,c=r.size(),u=r.isScalar();if(t.isMatrix(n)?(i=n.size(),n=n.valueOf()):i=s.size(n),u){if(0!==i.length)throw new TypeError("Scalar expected");e.set(r.min(),n,o)}else{if(c.length<e._size.length)throw new a(c.length,e._size.length,"<");if(i.length<c.length){for(var d=0,f=0;1===c[d]&&1===i[d];)d++;for(;1===c[d];)f++,d++;n=s.unsqueeze(n,c.length,f,i)}if(!l.deepEqual(c,i))throw new a(c,i,">");var p=r.max().map(function(t){return t+1});w(e,p,o);var _=c.length,h=0;y(e._data,r,n,_,h)}return e}function y(t,e,r,n,o){var a=o===n-1,i=e.dimension(o);a?i.forEach(function(e,n){_(e),t[e]=r[n[0]]}):i.forEach(function(a,i){_(a),y(t[a],e,r[i[0]],n,o+1)})}function w(t,e,r){for(var n=t._size.slice(0),o=!1;n.length<e.length;)n.push(0),o=!0;for(var a=0,i=e.length;a<i;a++)e[a]>n[a]&&(n[a]=e[a],o=!0);o&&z(t,n,r)}function x(t){for(var e=0,r=t.length;e<r;e++){var n=t[e];u(n)?t[e]=x(n):n&&n.isMatrix===!0&&(t[e]=x(n.valueOf()))}return t}var b=n(r(26));h.prototype=new b,h.prototype.type="DenseMatrix",h.prototype.isDenseMatrix=!0,h.prototype.storage=function(){return"dense"},h.prototype.datatype=function(){return this._datatype},h.prototype.create=function(t,e){return new h(t,e)},h.prototype.subset=function(t,e,r){switch(arguments.length){case 1:return v(this,t);case 2:case 3:return g(this,t,e,r);default:throw new SyntaxError("Wrong number of arguments")}},h.prototype.get=function(t){if(!u(t))throw new TypeError("Array expected");if(t.length!=this._size.length)throw new a(t.length,this._size.length);for(var e=0;e<t.length;e++)_(t[e],this._size[e]);for(var r=this._data,n=0,o=t.length;n<o;n++){var i=t[n];_(i,r.length),r=r[i]}return r},h.prototype.set=function(t,e,r){if(!u(t))throw new TypeError("Array expected");if(t.length<this._size.length)throw new a(t.length,this._size.length,"<");var n,o,i,s=t.map(function(t){return t+1});w(this,s,r);var l=this._data;for(n=0,o=t.length-1;n<o;n++)i=t[n],_(i,l.length),l=l[i];return i=t[t.length-1],_(i,l.length),l[i]=e,this},h.prototype.resize=function(t,e,r){if(!u(t))throw new TypeError("Array expected");var n=r?this.clone():this;return z(n,t,e)};var z=function(t,e,r){if(0===e.length){for(var n=t._data;u(n);)n=n[0];return n}return t._size=e.slice(0),t._data=s.resize(t._data,t._size,r),t};return h.prototype.reshape=function(t,e){var r=e?this.clone():this;return r._data=s.reshape(r._data,t),r._size=t.slice(0),r},h.prototype.clone=function(){var t=new h({data:l.clone(this._data),size:l.clone(this._size),datatype:this._datatype});return t},h.prototype.size=function(){return this._size.slice(0)},h.prototype.map=function(t){var e=this,r=function r(n,o){return u(n)?n.map(function(t,e){return r(t,o.concat(e))}):t(n,o,e)};return new h({data:r(this._data,[]),size:l.clone(this._size),datatype:this._datatype})},h.prototype.forEach=function(t){var e=this,r=function r(n,o){u(n)?n.forEach(function(t,e){r(t,o.concat(e))}):t(n,o,e)};r(this._data,[])},h.prototype.toArray=function(){return l.clone(this._data)},h.prototype.valueOf=function(){return this._data},h.prototype.format=function(t){return i.format(this._data,t)},h.prototype.toString=function(){return i.format(this._data)},h.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},h.prototype.diagonal=function(e){if(e){if(t.isBigNumber(e)&&(e=e.toNumber()),!d(e)||!f(e))throw new TypeError("The parameter k must be an integer number")}else e=0;for(var r=e>0?e:0,n=e<0?-e:0,o=this._size[0],a=this._size[1],i=Math.min(o-n,a-r),s=[],l=0;l<i;l++)s[l]=this._data[l+n][l+r];return new h({data:s,size:[i],datatype:this._datatype})},h.diagonal=function(e,r,n,o,a){if(!u(e))throw new TypeError("Array expected, size parameter");if(2!==e.length)throw new Error("Only two dimensions matrix are supported");if(e=e.map(function(e){if(t.isBigNumber(e)&&(e=e.toNumber()),!d(e)||!f(e)||e<1)throw new Error("Size values must be positive integers");return e}),n){if(t.isBigNumber(n)&&(n=n.toNumber()),!d(n)||!f(n))throw new TypeError("The parameter k must be an integer number")}else n=0;o&&p(a)&&(o=c.convert(o,a));var i,l=n>0?n:0,_=n<0?-n:0,v=e[0],m=e[1],g=Math.min(v-_,m-l);if(u(r)){if(r.length!==g)throw new Error("Invalid value array length");i=function(t){return r[t]}}else if(t.isMatrix(r)){var y=r.size();if(1!==y.length||y[0]!==g)throw new Error("Invalid matrix length");i=function(t){return r.get([t])}}else i=function(){return r};o||(o=t.isBigNumber(i(0))?new t.BigNumber(0):0);var w=[];if(e.length>0){w=s.resize(w,e,o);for(var x=0;x<g;x++)w[x+_][x+l]=i(x)}return new h({data:w,size:[v,m]})},h.fromJSON=function(t){return new h(t)},h.prototype.swapRows=function(t,e){if(!(d(t)&&f(t)&&d(e)&&f(e)))throw new Error("Row index must be positive integers");if(2!==this._size.length)throw new Error("Only two dimensional matrix is supported");return _(t,this._size[0]),_(e,this._size[0]),h._swapRows(t,e,this._data),this},h._swapRows=function(t,e,r){var n=r[t];r[t]=r[e],r[e]=n},t.Matrix._storage.dense=h,t.Matrix._storage.default=h,h}var o=r(27),a=r(32),i=(r(37).getSafeProperty,r(37).setSafeProperty,o.string),s=o.array,l=o.object,c=o.number,u=Array.isArray,d=c.isNumber,f=c.isInteger,p=i.isString,_=s.validateIndex;e.name="DenseMatrix",e.path="type",e.factory=n,e.lazy=!1},function(t,e,r){"use strict";function n(t,e){if(l(t)&&a(t,e))return t[e];if("function"==typeof t[e]&&s(t,e))throw new Error('Cannot access method "'+e+'" as a property');throw new Error('No access to property "'+e+'"')}function o(t,e,r){if(l(t)&&a(t,e))return t[e]=r;throw new Error('No access to property "'+e+'"')}function a(t,e){return!(!t||"object"!==("undefined"==typeof t?"undefined":c(t)))&&(!!u(d,e)||!(e in Object.prototype)&&!(e in Function.prototype))}function i(t,e){if(!s(t,e))throw new Error('No access to method "'+e+'"')}function s(t,e){return!(!t||"function"!=typeof t[e])&&(!(u(t,e)&&t.__proto__&&e in t.__proto__)&&(!!u(f,e)||!(e in Object.prototype)&&!(e in Function.prototype)))}function l(t){return"object"===("undefined"==typeof t?"undefined":c(t))&&t&&t.constructor===Object}var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u=r(14).hasOwnProperty,d={length:!0,name:!0},f={toString:!0,valueOf:!0,toLocaleString:!0};e.getSafeProperty=n,e.setSafeProperty=o,e.isSafeProperty=a,e.validateSafeMethod=i,e.isSafeMethod=s,e.isPlainObject=l},function(t,e,r){"use strict";function n(t,e,n,h){function v(e,r){if(!(this instanceof v))throw new SyntaxError("Constructor must be called with the new operator");if(r&&!p(r))throw new Error("Invalid datatype: "+r);if(t.isMatrix(e))y(this,e,r);else if(e&&u(e.index)&&u(e.ptr)&&u(e.size))this._values=e.values,this._index=e.index,this._ptr=e.ptr,this._size=e.size,this._datatype=r||e.datatype;else if(u(e))w(this,e,r);else{if(e)throw new TypeError("Unsupported type of data ("+o.types.type(e)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=r}}var m=n(r(26)),g=n(r(39)),y=function(t,e,r){"SparseMatrix"===e.type?(t._values=e._values?s.clone(e._values):void 0,t._index=s.clone(e._index),t._ptr=s.clone(e._ptr),t._size=s.clone(e._size),t._datatype=r||e._datatype):w(t,e.valueOf(),r||e._datatype)},w=function(t,e,r){t._values=[],t._index=[],t._ptr=[],t._datatype=r;var n=e.length,o=0,a=g,i=0;if(p(r)&&(a=h.find(g,[r,r])||g,i=h.convert(0,r)),n>0){var s=0;do{t._ptr.push(t._index.length);for(var l=0;l<n;l++){var c=e[l];if(u(c)){if(0===s&&o<c.length&&(o=c.length),s<c.length){var d=c[s];a(d,i)||(t._values.push(d),t._index.push(l))}}else 0===s&&o<1&&(o=1),a(c,i)||(t._values.push(c),t._index.push(l))}s++}while(s<o)}t._ptr.push(t._index.length),t._size=[n,o]};v.prototype=new m,v.prototype.type="SparseMatrix",v.prototype.isSparseMatrix=!0,v.prototype.storage=function(){return"sparse"},v.prototype.datatype=function(){return this._datatype},v.prototype.create=function(t,e){return new v(t,e)},v.prototype.density=function(){var t=this._size[0],e=this._size[1];return 0!==t&&0!==e?this._index.length/(t*e):0},v.prototype.subset=function(t,e,r){if(!this._values)throw new Error("Cannot invoke subset on a Pattern only matrix");switch(arguments.length){case 1:return x(this,t);case 2:case 3:return b(this,t,e,r);default:throw new SyntaxError("Wrong number of arguments")}};var x=function(e,r){if(!t.isIndex(r))throw new TypeError("Invalid index");var n=r.isScalar();if(n)return e.get(r.min());var o=r.size();if(o.length!=e._size.length)throw new a(o.length,e._size.length);var i,s,l,c,u=r.min(),d=r.max();for(i=0,s=e._size.length;i<s;i++)_(u[i],e._size[i]),_(d[i],e._size[i]);var f=e._values,p=e._index,h=e._ptr,m=r.dimension(0),g=r.dimension(1),y=[],w=[];m.forEach(function(t,e){w[t]=e[0],y[t]=!0});var x=f?[]:void 0,b=[],z=[];return g.forEach(function(t){for(z.push(b.length),l=h[t],c=h[t+1];l<c;l++)i=p[l],y[i]===!0&&(b.push(w[i]),x&&x.push(f[l]))}),z.push(b.length),new v({values:x,index:b,ptr:z,size:o,datatype:e._datatype})},b=function(e,r,n,o){if(!r||r.isIndex!==!0)throw new TypeError("Invalid index");var l,c=r.size(),u=r.isScalar();if(t.isMatrix(n)?(l=n.size(),n=n.toArray()):l=i.size(n),u){if(0!==l.length)throw new TypeError("Scalar expected");e.set(r.min(),n,o)}else{if(1!==c.length&&2!==c.length)throw new a(c.length,e._size.length,"<");if(l.length<c.length){for(var d=0,f=0;1===c[d]&&1===l[d];)d++;for(;1===c[d];)f++,d++;n=i.unsqueeze(n,c.length,f,l)}if(!s.deepEqual(c,l))throw new a(c,l,">");for(var p=r.min()[0],_=r.min()[1],h=l[0],v=l[1],m=0;m<h;m++)for(var g=0;g<v;g++){var y=n[m][g];e.set([m+p,g+_],y,o)}}return e};v.prototype.get=function(t){if(!u(t))throw new TypeError("Array expected");if(t.length!=this._size.length)throw new a(t.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var e=t[0],r=t[1];_(e,this._size[0]),_(r,this._size[1]);var n=z(e,this._ptr[r],this._ptr[r+1],this._index);return n<this._ptr[r+1]&&this._index[n]===e?this._values[n]:0},v.prototype.set=function(t,e,r){if(!u(t))throw new TypeError("Array expected");if(t.length!=this._size.length)throw new a(t.length,this._size.length);if(!this._values)throw new Error("Cannot invoke set on a Pattern only matrix");var n=t[0],o=t[1],i=this._size[0],s=this._size[1],l=g,c=0;p(this._datatype)&&(l=h.find(g,[this._datatype,this._datatype])||g,c=h.convert(0,this._datatype)),(n>i-1||o>s-1)&&(E(this,Math.max(n+1,i),Math.max(o+1,s),r),i=this._size[0],s=this._size[1]),_(n,i),_(o,s);var d=z(n,this._ptr[o],this._ptr[o+1],this._index);
return d<this._ptr[o+1]&&this._index[d]===n?l(e,c)?k(d,o,this._values,this._index,this._ptr):this._values[d]=e:A(d,n,o,e,this._values,this._index,this._ptr),this};var z=function(t,e,r,n){if(r-e===0)return r;for(var o=e;o<r;o++)if(n[o]===t)return o;return e},k=function(t,e,r,n,o){r.splice(t,1),n.splice(t,1);for(var a=e+1;a<o.length;a++)o[a]--},A=function(t,e,r,n,o,a,i){o.splice(t,0,n),a.splice(t,0,e);for(var s=r+1;s<i.length;s++)i[s]++};v.prototype.resize=function(t,e,r){if(!u(t))throw new TypeError("Array expected");if(2!==t.length)throw new Error("Only two dimensions matrix are supported");t.forEach(function(e){if(!c.isNumber(e)||!c.isInteger(e)||e<0)throw new TypeError("Invalid size, must contain positive integers (size: "+l.format(t)+")")});var n=r?this.clone():this;return E(n,t[0],t[1],e)};var E=function(t,e,r,n){var o=n||0,a=g,i=0;p(t._datatype)&&(a=h.find(g,[t._datatype,t._datatype])||g,i=h.convert(0,t._datatype),o=h.convert(o,t._datatype));var s,l,c,u=!a(o,i),d=t._size[0],f=t._size[1];if(r>f){for(l=f;l<r;l++)if(t._ptr[l]=t._values.length,u)for(s=0;s<d;s++)t._values.push(o),t._index.push(s);t._ptr[r]=t._values.length}else r<f&&(t._ptr.splice(r+1,f-r),t._values.splice(t._ptr[r],t._values.length),t._index.splice(t._ptr[r],t._index.length));if(f=r,e>d){if(u){var _=0;for(l=0;l<f;l++){t._ptr[l]=t._ptr[l]+_,c=t._ptr[l+1]+_;var v=0;for(s=d;s<e;s++,v++)t._values.splice(c+v,0,o),t._index.splice(c+v,0,s),_++}t._ptr[f]=t._values.length}}else if(e<d){var m=0;for(l=0;l<f;l++){t._ptr[l]=t._ptr[l]-m;var y=t._ptr[l],w=t._ptr[l+1]-m;for(c=y;c<w;c++)s=t._index[c],s>e-1&&(t._values.splice(c,1),t._index.splice(c,1),m++)}t._ptr[l]=t._values.length}return t._size[0]=e,t._size[1]=r,t};v.prototype.reshape=function(t,e){if(!u(t))throw new TypeError("Array expected");if(2!==t.length)throw new Error("Sparse matrices can only be reshaped in two dimensions");if(t.forEach(function(e){if(!c.isNumber(e)||!c.isInteger(e)||e<0)throw new TypeError("Invalid size, must contain positive integers (size: "+l.format(t)+")")}),this._size[0]*this._size[1]!==t[0]*t[1])throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var r=e?this.clone():this;if(this._size[0]===t[0]&&this._size[1]===t[1])return r;for(var n=[],o=0;o<r._ptr.length;o++)for(var a=0;a<r._ptr[o+1]-r._ptr[o];a++)n.push(o);for(var i=r._values.slice(),s=r._index.slice(),o=0;o<r._index.length;o++){var d=s[o],f=n[o],p=d*r._size[1]+f;n[o]=p%t[1],s[o]=Math.floor(p/t[1])}r._values.length=0,r._index.length=0,r._ptr.length=t[1]+1,r._size=t.slice();for(var o=0;o<r._ptr.length;o++)r._ptr[o]=0;for(var _=0;_<i.length;_++){var o=s[_],a=n[_],h=i[_],v=z(o,r._ptr[a],r._ptr[a+1],r._index);A(v,o,a,h,r._values,r._index,r._ptr)}return r},v.prototype.clone=function(){var t=new v({values:this._values?s.clone(this._values):void 0,index:s.clone(this._index),ptr:s.clone(this._ptr),size:s.clone(this._size),datatype:this._datatype});return t},v.prototype.size=function(){return this._size.slice(0)},v.prototype.map=function(t,e){if(!this._values)throw new Error("Cannot invoke map on a Pattern only matrix");var r=this,n=this._size[0],o=this._size[1],a=function(e,n,o){return t(e,[n,o],r)};return N(this,0,n-1,0,o-1,a,e)};var N=function(t,e,r,n,o,a,i){var s=[],l=[],c=[],u=g,d=0;p(t._datatype)&&(u=h.find(g,[t._datatype,t._datatype])||g,d=h.convert(0,t._datatype));for(var f=function(t,e,r){t=a(t,e,r),u(t,d)||(s.push(t),l.push(e))},_=n;_<=o;_++){c.push(s.length);for(var m=t._ptr[_],y=t._ptr[_+1],w=e,x=m;x<y;x++){var b=t._index[x];if(b>=e&&b<=r){if(!i)for(var z=w;z<b;z++)f(0,z-e,_-n);f(t._values[x],b-e,_-n)}w=b+1}if(!i)for(var k=w;k<=r;k++)f(0,k-e,_-n)}return c.push(s.length),new v({values:s,index:l,ptr:c,size:[r-e+1,o-n+1]})};v.prototype.forEach=function(t,e){if(!this._values)throw new Error("Cannot invoke forEach on a Pattern only matrix");for(var r=this,n=this._size[0],o=this._size[1],a=0;a<o;a++){for(var i=this._ptr[a],s=this._ptr[a+1],l=0,c=i;c<s;c++){var u=this._index[c];if(!e)for(var d=l;d<u;d++)t(0,[d,a],r);t(this._values[c],[u,a],r),l=u+1}if(!e)for(var f=l;f<n;f++)t(0,[f,a],r)}},v.prototype.toArray=function(){return M(this._values,this._index,this._ptr,this._size,!0)},v.prototype.valueOf=function(){return M(this._values,this._index,this._ptr,this._size,!1)};var M=function(t,e,r,n,o){var a,i,l=n[0],c=n[1],u=[];for(a=0;a<l;a++)for(u[a]=[],i=0;i<c;i++)u[a][i]=0;for(i=0;i<c;i++)for(var d=r[i],f=r[i+1],p=d;p<f;p++)a=e[p],u[a][i]=t?o?s.clone(t[p]):t[p]:1;return u};return v.prototype.format=function(t){for(var e=this._size[0],r=this._size[1],n=this.density(),o="Sparse Matrix ["+l.format(e,t)+" x "+l.format(r,t)+"] density: "+l.format(n,t)+"\n",a=0;a<r;a++)for(var i=this._ptr[a],s=this._ptr[a+1],c=i;c<s;c++){var u=this._index[c];o+="\n ("+l.format(u,t)+", "+l.format(a,t)+") ==> "+(this._values?l.format(this._values[c],t):"X")}return o},v.prototype.toString=function(){return l.format(this.toArray())},v.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},v.prototype.diagonal=function(e){if(e){if(t.isBigNumber(e)&&(e=e.toNumber()),!d(e)||!f(e))throw new TypeError("The parameter k must be an integer number")}else e=0;var r=e>0?e:0,n=e<0?-e:0,o=this._size[0],a=this._size[1],i=Math.min(o-n,a-r),s=[],l=[],c=[];c[0]=0;for(var u=r;u<a&&s.length<i;u++)for(var p=this._ptr[u],_=this._ptr[u+1],h=p;h<_;h++){var m=this._index[h];if(m===u-r+n){s.push(this._values[h]),l[s.length-1]=m-n;break}}return c.push(s.length),new v({values:s,index:l,ptr:c,size:[i,1]})},v.fromJSON=function(t){return new v(t)},v.diagonal=function(e,r,n,o,a){if(!u(e))throw new TypeError("Array expected, size parameter");if(2!==e.length)throw new Error("Only two dimensions matrix are supported");if(e=e.map(function(e){if(t.isBigNumber(e)&&(e=e.toNumber()),!d(e)||!f(e)||e<1)throw new Error("Size values must be positive integers");return e}),n){if(t.isBigNumber(n)&&(n=n.toNumber()),!d(n)||!f(n))throw new TypeError("The parameter k must be an integer number")}else n=0;var i=g,s=0;p(a)&&(i=h.find(g,[a,a])||g,s=h.convert(0,a));var l,c=n>0?n:0,_=n<0?-n:0,m=e[0],y=e[1],w=Math.min(m-_,y-c);if(u(r)){if(r.length!==w)throw new Error("Invalid value array length");l=function(t){return r[t]}}else if(t.isMatrix(r)){var x=r.size();if(1!==x.length||x[0]!==w)throw new Error("Invalid matrix length");l=function(t){return r.get([t])}}else l=function(){return r};for(var b=[],z=[],k=[],A=0;A<y;A++){k.push(b.length);var E=A-c;if(E>=0&&E<w){var N=l(E);i(N,s)||(z.push(E+_),b.push(N))}}return k.push(b.length),new v({values:b,index:z,ptr:k,size:[m,y]})},v.prototype.swapRows=function(t,e){if(!(d(t)&&f(t)&&d(e)&&f(e)))throw new Error("Row index must be positive integers");if(2!==this._size.length)throw new Error("Only two dimensional matrix is supported");return _(t,this._size[0]),_(e,this._size[0]),v._swapRows(t,e,this._size[1],this._values,this._index,this._ptr),this},v._forEachRow=function(t,e,r,n,o){for(var a=n[t],i=n[t+1],s=a;s<i;s++)o(r[s],e[s])},v._swapRows=function(t,e,r,n,o,a){for(var i=0;i<r;i++){var s=a[i],l=a[i+1],c=z(t,s,l,o),u=z(e,s,l,o);if(c<l&&u<l&&o[c]===t&&o[u]===e){if(n){var d=n[c];n[c]=n[u],n[u]=d}}else if(c<l&&o[c]===t&&(u>=l||o[u]!==e)){var f=n?n[c]:void 0;o.splice(u,0,e),n&&n.splice(u,0,f),o.splice(u<=c?c+1:c,1),n&&n.splice(u<=c?c+1:c,1)}else if(u<l&&o[u]===e&&(c>=l||o[c]!==t)){var p=n?n[u]:void 0;o.splice(c,0,t),n&&n.splice(c,0,p),o.splice(c<=u?u+1:u,1),n&&n.splice(c<=u?u+1:u,1)}}},t.Matrix._storage.sparse=v,v}var o=r(27),a=r(32),i=o.array,s=o.object,l=o.string,c=o.number,u=Array.isArray,d=c.isNumber,f=c.isInteger,p=l.isString,_=i.validateIndex;e.name="SparseMatrix",e.path="type",e.factory=n,e.lazy=!1},function(t,e,r){"use strict";function n(t,e,r,n){var i=n("equalScalar",{"boolean, boolean":function(t,e){return t===e},"number, number":function(t,r){return t===r||o(t,r,e.epsilon)},"BigNumber, BigNumber":function(t,r){return t.eq(r)||a(t,r,e.epsilon)},"Fraction, Fraction":function(t,e){return t.equals(e)},"Complex, Complex":function(t,e){return t.equals(e)},"Unit, Unit":function(t,e){if(!t.equalBase(e))throw new Error("Cannot compare units with different base");return i(t.value,e.value)},"string, string":function(t,e){return t===e}});return i}var o=r(18).nearlyEqual,a=r(40);e.factory=n},function(t,e){"use strict";t.exports=function(t,e,r){if(null==r)return t.eq(e);if(t.eq(e))return!0;if(t.isNaN()||e.isNaN())return!1;if(t.isFinite()&&e.isFinite()){var n=t.minus(e).abs();if(n.isZero())return!0;var o=t.constructor.max(t.abs(),e.abs());return n.lte(o.times(r))}return!1}},function(t,e,r){"use strict";function n(t,e,n){function o(){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");this._values=[],this._heap=new t.FibonacciHeap}var a=n(r(42)),i=n(r(39));return o.prototype.type="Spa",o.prototype.isSpa=!0,o.prototype.set=function(t,e){if(this._values[t])this._values[t].value=e;else{var r=this._heap.insert(t,e);this._values[t]=r}},o.prototype.get=function(t){var e=this._values[t];return e?e.value:0},o.prototype.accumulate=function(t,e){var r=this._values[t];r?r.value=a(r.value,e):(r=this._heap.insert(t,e),this._values[t]=r)},o.prototype.forEach=function(t,e,r){var n=this._heap,o=this._values,a=[],s=n.extractMinimum();for(s&&a.push(s);s&&s.key<=e;)s.key>=t&&(i(s.value,0)||r(s.key,s.value,this)),s=n.extractMinimum(),s&&a.push(s);for(var l=0;l<a.length;l++){var c=a[l];s=n.insert(c.key,c.value),o[s.key]=s}},o.prototype.swap=function(t,e){var r=this._values[t],n=this._values[e];if(!r&&n)r=this._heap.insert(t,n.value),this._heap.remove(n),this._values[t]=r,this._values[e]=void 0;else if(r&&!n)n=this._heap.insert(e,r.value),this._heap.remove(r),this._values[e]=n,this._values[t]=void 0;else if(r&&n){var o=r.value;r.value=n.value,n.value=o}},o}e.name="Spa",e.path="type",e.factory=n},function(t,e,r){"use strict";function n(t,e,n,a){var i=n(r(43)),s=n(r(44)),l=r(45),c=n(r(46)),u=n(r(47)),d=n(r(48)),f=n(r(49)),p=n(r(50)),_=a("add",o({"Matrix, Matrix":function(t,e){var r;switch(t.storage()){case"sparse":switch(e.storage()){case"sparse":r=u(t,e,s);break;default:r=c(e,t,s,!0)}break;default:switch(e.storage()){case"sparse":r=c(t,e,s,!1);break;default:r=f(t,e,s)}}return r},"Array, Array":function(t,e){return _(i(t),i(e)).valueOf()},"Array, Matrix":function(t,e){return _(i(t),e)},"Matrix, Array":function(t,e){return _(t,i(e))},"Matrix, any":function(t,e){var r;switch(t.storage()){case"sparse":r=d(t,e,s,!1);break;default:r=p(t,e,s,!1)}return r},"any, Matrix":function(t,e){var r;switch(e.storage()){case"sparse":r=d(e,t,s,!0);break;default:r=p(e,t,s,!0)}return r},"Array, any":function(t,e){return p(i(t),e,s,!1).valueOf()},"any, Array":function(t,e){return p(i(e),t,s,!0).valueOf()},"any, any":s,"Array | Matrix | any, Array | Matrix | any, ...any":function(t,e,r){for(var n=_(t,e),o=0;o<r.length;o++)n=_(n,r[o]);return n}},s.signatures));return _.toTex={2:"\\left(${args[0]}"+l.operators.add+"${args[1]}\\right)"},_}var o=r(14).extend;e.name="add",e.factory=n},function(t,e){"use strict";function r(t,e,r,n){function o(e,r,n){var o=t.Matrix.storage(r||"default");return new o(e,n)}var a=n("matrix",{"":function(){return o([])},string:function(t){return o([],t)},"string, string":function(t,e){return o([],t,e)},Array:function(t){return o(t)},Matrix:function(t){return o(t,t.storage())},"Array | Matrix, string":o,"Array | Matrix, string, string":o});return a.toTex={0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},a}e.name="matrix",e.factory=r},function(t,e){"use strict";function r(t,e,r,n){var o=n("add",{"number, number":function(t,e){return t+e},"Complex, Complex":function(t,e){return t.add(e)},"BigNumber, BigNumber":function(t,e){return t.plus(e)},"Fraction, Fraction":function(t,e){return t.add(e)},"Unit, Unit":function(t,e){if(null==t.value)throw new Error("Parameter x contains a unit with undefined value");if(null==e.value)throw new Error("Parameter y contains a unit with undefined value");if(!t.equalBase(e))throw new Error("Units do not match");var r=t.clone();return r.value=o(r.value,e.value),r.fixPrefix=!1,r}});return o}e.factory=r},function(t,e){"use strict";e.symbols={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"},e.operators={transpose:"^\\top",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},e.defaultTemplate="\\mathrm{${name}}\\left(${args}\\right)";var r={deg:"^\\circ"};e.toSymbol=function(t,n){if(n="undefined"!=typeof n&&n)return r.hasOwnProperty(t)?r[t]:"\\mathrm{"+t+"}";if(e.symbols.hasOwnProperty(t))return e.symbols[t];if(t.indexOf("_")!==-1){var o=t.indexOf("_");return e.toSymbol(t.substring(0,o))+"_{"+e.toSymbol(t.substring(o+1))+"}"}return t}},function(t,e,r){"use strict";function n(t,e,r,n){var a=t.DenseMatrix,i=function(t,e,r,i){var s=t._data,l=t._size,c=t._datatype,u=e._values,d=e._index,f=e._ptr,p=e._size,_=e._datatype;if(l.length!==p.length)throw new o(l.length,p.length);if(l[0]!==p[0]||l[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+p+")");if(!u)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var h,v,m=l[0],g=l[1],y="string"==typeof c&&c===_?c:void 0,w=y?n.find(r,[y,y]):r,x=[];for(h=0;h<m;h++)x[h]=[];var b=[],z=[];for(v=0;v<g;v++){for(var k=v+1,A=f[v],E=f[v+1],N=A;N<E;N++)h=d[N],b[h]=i?w(u[N],s[h][v]):w(s[h][v],u[N]),z[h]=k;for(h=0;h<m;h++)z[h]===k?x[h][v]=b[h]:x[h][v]=s[h][v]}return new a({data:x,size:[m,g],datatype:y})};return i}var o=r(32);e.name="algorithm01",e.factory=n},function(t,e,r){"use strict";function n(t,e,n,a){var i=n(r(39)),s=t.SparseMatrix,l=function(t,e,r){var n=t._values,l=t._index,c=t._ptr,u=t._size,d=t._datatype,f=e._values,p=e._index,_=e._ptr,h=e._size,v=e._datatype;if(u.length!==h.length)throw new o(u.length,h.length);if(u[0]!==h[0]||u[1]!==h[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+h+")");var m,g=u[0],y=u[1],w=i,x=0,b=r;"string"==typeof d&&d===v&&(m=d,w=a.find(i,[m,m]),x=a.convert(0,m),b=a.find(r,[m,m]));var z,k,A,E,N,M=n&&f?[]:void 0,S=[],O=[],T=new s({values:M,index:S,ptr:O,size:[g,y],datatype:m}),C=n&&f?[]:void 0,B=n&&f?[]:void 0,F=[],I=[];for(k=0;k<y;k++){O[k]=S.length;var j=k+1;for(E=c[k],N=c[k+1],A=E;A<N;A++)z=l[A],S.push(z),F[z]=j,C&&(C[z]=n[A]);for(E=_[k],N=_[k+1],A=E;A<N;A++)if(z=p[A],F[z]===j){if(C){var R=b(C[z],f[A]);w(R,x)?F[z]=null:C[z]=R}}else S.push(z),I[z]=j,B&&(B[z]=f[A]);if(C&&B)for(A=O[k];A<S.length;)z=S[A],F[z]===j?(M[A]=C[z],A++):I[z]===j?(M[A]=B[z],A++):S.splice(A,1)}return O[y]=S.length,T};return l}var o=r(32);e.name="algorithm04",e.factory=n},function(t,e){"use strict";function r(t,e,r,n){var o=t.DenseMatrix,a=function(t,e,r,a){var i=t._values,s=t._index,l=t._ptr,c=t._size,u=t._datatype;if(!i)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d,f=c[0],p=c[1],_=r;"string"==typeof u&&(d=u,e=n.convert(e,d),_=n.find(r,[d,d]));for(var h=[],v=new o({data:h,size:[f,p],datatype:d}),m=[],g=[],y=0;y<p;y++){for(var w=y+1,x=l[y],b=l[y+1],z=x;z<b;z++){var k=s[z];m[k]=i[z],g[k]=w}for(var A=0;A<f;A++)0===y&&(h[A]=[]),g[A]===w?h[A][y]=a?_(e,m[A]):_(m[A],e):h[A][y]=e}return v};return a}e.name="algorithm10",e.factory=r},function(t,e,r){"use strict";function n(t,e,r,n){var o=t.DenseMatrix,i=function(t,e,r){var i=t._data,l=t._size,c=t._datatype,u=e._data,d=e._size,f=e._datatype,p=[];if(l.length!==d.length)throw new a(l.length,d.length);for(var _=0;_<l.length;_++){if(l[_]!==d[_])throw new RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+d+")");p[_]=l[_]}var h,v=r;"string"==typeof c&&c===f&&(h=c,e=n.convert(e,h),v=n.find(r,[h,h]));var m=p.length>0?s(v,0,p,p[0],i,u):[];return new o({data:m,size:p,datatype:h})},s=function t(e,r,n,o,a,i){var s=[];if(r===n.length-1)for(var l=0;l<o;l++)s[l]=e(a[l],i[l]);else for(var c=0;c<o;c++)s[c]=t(e,r+1,n,n[r+1],a[c],i[c]);return s};return i}var o=r(27),a=r(32),i=o.string;i.isString;e.name="algorithm13",e.factory=n},function(t,e,r){"use strict";function n(t,e,r,n){var a=t.DenseMatrix,i=function(t,e,r,i){var l,c=t._data,u=t._size,d=t._datatype,f=r;"string"==typeof d&&(l=d,e=n.convert(e,l),f=n.find(r,[l,l]));var p=u.length>0?s(f,0,u,u[0],c,e,i):[];return new a({data:p,size:o(u),datatype:l})},s=function t(e,r,n,o,a,i,s){var l=[];if(r===n.length-1)for(var c=0;c<o;c++)l[c]=s?e(i,a[c]):e(a[c],i);else for(var u=0;u<o;u++)l[u]=t(e,r+1,n,n[r+1],a[u],i,s);return l};return i}var o=r(14).clone;e.name="algorithm14",e.factory=n},function(t,e,r){"use strict";function n(t,e,n,o){function a(){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");this._minimum=null,this._size=0}var i=n(r(52)),s=n(r(56)),l=1/Math.log((1+Math.sqrt(5))/2);a.prototype.type="FibonacciHeap",a.prototype.isFibonacciHeap=!0,a.prototype.insert=function(t,e){var r={key:t,value:e,degree:0};if(this._minimum){var n=this._minimum;r.left=n,r.right=n.right,n.right=r,r.right.left=r,i(t,n.key)&&(this._minimum=r)}else r.left=r,r.right=r,this._minimum=r;return this._size++,r},a.prototype.size=function(){return this._size},a.prototype.clear=function(){this._minimum=null,this._size=0},a.prototype.isEmpty=function(){return 0===this._size},a.prototype.extractMinimum=function(){var t=this._minimum;if(null===t)return t;for(var e=this._minimum,r=t.degree,n=t.child;r>0;){var o=n.right;n.left.right=n.right,n.right.left=n.left,n.left=e,n.right=e.right,e.right=n,n.right.left=n,n.parent=null,n=o,r--}return t.left.right=t.right,t.right.left=t.left,t==t.right?e=null:(e=t.right,e=p(e,this._size)),this._size--,this._minimum=e,t},a.prototype.remove=function(t){this._minimum=c(this._minimum,t,-1),this.extractMinimum()};var c=function(t,e,r){e.key=r;var n=e.parent;return n&&i(e.key,n.key)&&(u(t,e,n),d(t,n)),i(e.key,t.key)&&(t=e),t},u=function(t,e,r){e.left.right=e.right,e.right.left=e.left,r.degree--,r.child==e&&(r.child=e.right),0===r.degree&&(r.child=null),e.left=t,e.right=t.right,t.right=e,e.right.left=e,e.parent=null,e.mark=!1},d=function t(e,r){var n=r.parent;n&&(r.mark?(u(e,r,n),t(n)):r.mark=!0)},f=function(t,e){t.left.right=t.right,t.right.left=t.left,t.parent=e,e.child?(t.left=e.child,t.right=e.child.right,e.child.right=t,t.right.left=t):(e.child=t,t.right=t,t.left=t),e.degree++,t.mark=!1},p=function(t,e){var r=Math.floor(Math.log(e)*l)+1,n=new Array(r),o=0,a=t;if(a)for(o++,a=a.right;a!==t;)o++,a=a.right;for(var c;o>0;){for(var u=a.degree,d=a.right;;){if(c=n[u],!c)break;if(s(a.key,c.key)){var p=c;c=a,a=p}f(c,a),n[u]=null,u++}n[u]=a,a=d,o--}t=null;for(var _=0;_<r;_++)c=n[_],c&&(t?(c.left.right=c.right,c.right.left=c.left,c.left=t,c.right=t.right,t.right=c,c.right.left=c,i(c.key,t.key)&&(t=c)):t=c);return t};return a}e.name="FibonacciHeap",e.path="type",e.factory=n},function(t,e,r){"use strict";function n(t,e,n,i){var s=n(r(43)),l=n(r(53)),c=n(r(54)),u=n(r(55)),d=n(r(49)),f=n(r(50)),p=r(45),_=i("smaller",{"boolean, boolean":function(t,e){return t<e},"number, number":function(t,r){return t<r&&!o(t,r,e.epsilon)},"BigNumber, BigNumber":function(t,r){return t.lt(r)&&!a(t,r,e.epsilon)},"Fraction, Fraction":function(t,e){return t.compare(e)===-1},"Complex, Complex":function(t,e){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(t,e){if(!t.equalBase(e))throw new Error("Cannot compare units with different base");return _(t.value,e.value)},"string, string":function(t,e){return t<e},"Matrix, Matrix":function(t,e){var r;switch(t.storage()){case"sparse":switch(e.storage()){case"sparse":r=c(t,e,_);break;default:r=l(e,t,_,!0)}break;default:switch(e.storage()){case"sparse":r=l(t,e,_,!1);break;default:r=d(t,e,_)}}return r},"Array, Array":function(t,e){return _(s(t),s(e)).valueOf()},"Array, Matrix":function(t,e){return _(s(t),e)},"Matrix, Array":function(t,e){return _(t,s(e))},"Matrix, any":function(t,e){var r;switch(t.storage()){case"sparse":r=u(t,e,_,!1);break;default:r=f(t,e,_,!1)}return r},"any, Matrix":function(t,e){var r;switch(e.storage()){case"sparse":r=u(e,t,_,!0);break;default:r=f(e,t,_,!0)}return r},"Array, any":function(t,e){return f(s(t),e,_,!1).valueOf()},"any, Array":function(t,e){return f(s(e),t,_,!0).valueOf()}});return _.toTex={2:"\\left(${args[0]}"+p.operators.smaller+"${args[1]}\\right)"},_}var o=r(18).nearlyEqual,a=r(40);e.name="smaller",e.factory=n},function(t,e,r){"use strict";function n(t,e,r,n){var a=t.DenseMatrix,i=function(t,e,r,i){var s=t._data,l=t._size,c=t._datatype,u=e._values,d=e._index,f=e._ptr,p=e._size,_=e._datatype;if(l.length!==p.length)throw new o(l.length,p.length);if(l[0]!==p[0]||l[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+p+")");if(!u)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var h,v=l[0],m=l[1],g=0,y=r;"string"==typeof c&&c===_&&(h=c,g=n.convert(0,h),y=n.find(r,[h,h]));for(var w=[],x=0;x<v;x++)w[x]=[];for(var b=[],z=[],k=0;k<m;k++){for(var A=k+1,E=f[k],N=f[k+1],M=E;M<N;M++){var S=d[M];b[S]=i?y(u[M],s[S][k]):y(s[S][k],u[M]),z[S]=A}for(var O=0;O<v;O++)z[O]===A?w[O][k]=b[O]:w[O][k]=i?y(g,s[O][k]):y(s[O][k],g)}return new a({data:w,size:[v,m],datatype:h})};return i}var o=r(32);e.name="algorithm03",e.factory=n},function(t,e,r){"use strict";function n(t,e,r,n){var a=t.DenseMatrix,i=function(t,e,r){var i=t._size,l=t._datatype,c=e._size,u=e._datatype;if(i.length!==c.length)throw new o(i.length,c.length);if(i[0]!==c[0]||i[1]!==c[1])throw new RangeError("Dimension mismatch. Matrix A ("+i+") must match Matrix B ("+c+")");var d,f=i[0],p=i[1],_=0,h=r;"string"==typeof l&&l===u&&(d=l,_=n.convert(0,d),h=n.find(r,[d,d]));var v,m,g=[];for(v=0;v<f;v++)g[v]=[];var y=new a({data:g,size:[f,p],datatype:d}),w=[],x=[],b=[],z=[];for(m=0;m<p;m++){var k=m+1;for(s(t,m,b,w,k),s(e,m,z,x,k),v=0;v<f;v++){var A=b[v]===k?w[v]:_,E=z[v]===k?x[v]:_;g[v][m]=h(A,E)}}return y},s=function(t,e,r,n,o){for(var a=t._values,i=t._index,s=t._ptr,l=s[e],c=s[e+1];l<c;l++){var u=i[l];r[u]=o,n[u]=a[l]}};return i}var o=r(32);e.name="algorithm07",e.factory=n},function(t,e){"use strict";function r(t,e,r,n){var o=t.DenseMatrix,a=function(t,e,r,a){var i=t._values,s=t._index,l=t._ptr,c=t._size,u=t._datatype;if(!i)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d,f=c[0],p=c[1],_=r;"string"==typeof u&&(d=u,e=n.convert(e,d),_=n.find(r,[d,d]));for(var h=[],v=new o({data:h,size:[f,p],datatype:d}),m=[],g=[],y=0;y<p;y++){for(var w=y+1,x=l[y],b=l[y+1],z=x;z<b;z++){var k=s[z];m[k]=i[z],g[k]=w}for(var A=0;A<f;A++)0===y&&(h[A]=[]),g[A]===w?h[A][y]=a?_(e,m[A]):_(m[A],e):h[A][y]=a?_(e,0):_(0,e)}return v};return a}e.name="algorithm12",e.factory=r},function(t,e,r){"use strict";function n(t,e,n,i){var s=n(r(43)),l=n(r(53)),c=n(r(54)),u=n(r(55)),d=n(r(49)),f=n(r(50)),p=r(45),_=i("larger",{"boolean, boolean":function(t,e){return t>e},"number, number":function(t,r){return t>r&&!o(t,r,e.epsilon)},"BigNumber, BigNumber":function(t,r){return t.gt(r)&&!a(t,r,e.epsilon)},"Fraction, Fraction":function(t,e){return 1===t.compare(e)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(t,e){if(!t.equalBase(e))throw new Error("Cannot compare units with different base");return _(t.value,e.value)},"string, string":function(t,e){return t>e},"Matrix, Matrix":function(t,e){var r;switch(t.storage()){case"sparse":switch(e.storage()){case"sparse":r=c(t,e,_);break;default:r=l(e,t,_,!0)}break;default:switch(e.storage()){case"sparse":r=l(t,e,_,!1);break;default:r=d(t,e,_)}}return r},"Array, Array":function(t,e){return _(s(t),s(e)).valueOf()},"Array, Matrix":function(t,e){return _(s(t),e)},"Matrix, Array":function(t,e){return _(t,s(e))},"Matrix, any":function(t,e){var r;switch(t.storage()){case"sparse":r=u(t,e,_,!1);break;default:r=f(t,e,_,!1)}return r},"any, Matrix":function(t,e){var r;switch(e.storage()){case"sparse":r=u(e,t,_,!0);break;default:r=f(e,t,_,!0)}return r},"Array, any":function(t,e){return f(s(t),e,_,!1).valueOf()},"any, Array":function(t,e){return f(s(e),t,_,!0).valueOf()}});return _.toTex={2:"\\left(${args[0]}"+p.operators.larger+"${args[1]}\\right)"},_}var o=r(18).nearlyEqual,a=r(40);e.name="larger",e.factory=n},function(t,e,r){"use strict";function n(t,e,n){function a(e,r){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(r&&!l(r))throw new Error("Invalid datatype: "+r);if(t.isMatrix(e)||s(e)){var n=new c(e,r);this._data=n._data,this._size=n._size,this._datatype=n._datatype,this._min=null,this._max=null}else if(e&&s(e.data)&&s(e.size))this._data=e.data,this._size=e.size,this._datatype=e.datatype,this._min="undefined"!=typeof e.min?e.min:null,this._max="undefined"!=typeof e.max?e.max:null;else{if(e)throw new TypeError("Unsupported type of data ("+o.types.type(e)+")");this._data=[],this._size=[0],this._datatype=r,this._min=null,this._max=null}}var c=n(r(36)),u=n(r(52));return a.prototype=new c,a.prototype.type="ImmutableDenseMatrix",a.prototype.isImmutableDenseMatrix=!0,a.prototype.subset=function(e){switch(arguments.length){case 1:var r=c.prototype.subset.call(this,e);return t.isMatrix(r)?new a({data:r._data,size:r._size,datatype:r._datatype}):r;case 2:case 3:throw new Error("Cannot invoke set subset on an Immutable Matrix instance");default:throw new SyntaxError("Wrong number of arguments")}},a.prototype.set=function(){throw new Error("Cannot invoke set on an Immutable Matrix instance")},a.prototype.resize=function(){throw new Error("Cannot invoke resize on an Immutable Matrix instance")},a.prototype.reshape=function(){throw new Error("Cannot invoke reshape on an Immutable Matrix instance")},a.prototype.clone=function(){var t=new a({data:i.clone(this._data),size:i.clone(this._size),datatype:this._datatype});return t},a.prototype.toJSON=function(){return{mathjs:"ImmutableDenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},a.fromJSON=function(t){return new a(t)},a.prototype.swapRows=function(){throw new Error("Cannot invoke swapRows on an Immutable Matrix instance")},a.prototype.min=function(){if(null===this._min){var t=null;this.forEach(function(e){(null===t||u(e,t))&&(t=e)}),this._min=null!==t?t:void 0}return this._min},a.prototype.max=function(){if(null===this._max){var t=null;this.forEach(function(e){(null===t||u(t,e))&&(t=e)}),this._max=null!==t?t:void 0}return this._max},a}var o=r(27),a=o.string,i=o.object,s=Array.isArray,l=a.isString;e.name="ImmutableDenseMatrix",e.path="type",e.factory=n},function(t,e,r){"use strict";function n(t){function e(n){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");this._dimensions=[],this._isScalar=!0;for(var o=0,a=arguments.length;o<a;o++){var i=arguments[o];if(t.isRange(i))this._dimensions.push(i),this._isScalar=!1;else if(Array.isArray(i)||t.isMatrix(i)){var s=r(i.valueOf());this._dimensions.push(s);var l=s.size();1===l.length&&1===l[0]||(this._isScalar=!1)}else if("number"==typeof i)this._dimensions.push(r([i]));else{if("string"!=typeof i)throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");this._dimensions.push(i)}}}function r(e){for(var r=0,n=e.length;r<n;r++)if("number"!=typeof e[r]||!a(e[r]))throw new TypeError("Index parameters must be positive integer numbers");return new t.ImmutableDenseMatrix(e)}return e.prototype.type="Index",e.prototype.isIndex=!0,e.prototype.clone=function(){var t=new e;return t._dimensions=o(this._dimensions),t._isScalar=this._isScalar,t},e.create=function(t){var r=new e;return e.apply(r,t),r},e.prototype.size=function(){for(var t=[],e=0,r=this._dimensions.length;e<r;e++){var n=this._dimensions[e];t[e]="string"==typeof n?1:n.size()[0]}return t},e.prototype.max=function(){for(var t=[],e=0,r=this._dimensions.length;e<r;e++){var n=this._dimensions[e];t[e]="string"==typeof n?n:n.max()}return t},e.prototype.min=function(){for(var t=[],e=0,r=this._dimensions.length;e<r;e++){var n=this._dimensions[e];t[e]="string"==typeof n?n:n.min()}return t},e.prototype.forEach=function(t){for(var e=0,r=this._dimensions.length;e<r;e++)t(this._dimensions[e],e,this)},e.prototype.dimension=function(t){return this._dimensions[t]||null},e.prototype.isObjectProperty=function(){return 1===this._dimensions.length&&"string"==typeof this._dimensions[0]},e.prototype.getObjectProperty=function(){return this.isObjectProperty()?this._dimensions[0]:null},e.prototype.isScalar=function(){return this._isScalar},e.prototype.toArray=function(){for(var t=[],e=0,r=this._dimensions.length;e<r;e++){var n=this._dimensions[e];t.push("string"==typeof n?n:n.toArray())}return t},e.prototype.valueOf=e.prototype.toArray,e.prototype.toString=function(){for(var t=[],e=0,r=this._dimensions.length;e<r;e++){var n=this._dimensions[e];"string"==typeof n?t.push(JSON.stringify(n)):t.push(n.toString())}return"["+t.join(", ")+"]"},e.prototype.toJSON=function(){return{mathjs:"Index",dimensions:this._dimensions}},e.fromJSON=function(t){return e.create(t.dimensions)},e}var o=r(14).clone,a=r(18).isInteger;e.name="Index",e.path="type",e.factory=n},function(t,e,r){"use strict";function n(t,e,r,n){function a(e,r,n){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(null!=e)if(t.isBigNumber(e))e=e.toNumber();else if("number"!=typeof e)throw new TypeError("Parameter start must be a number");if(null!=r)if(t.isBigNumber(r))r=r.toNumber();else if("number"!=typeof r)throw new TypeError("Parameter end must be a number");if(null!=n)if(t.isBigNumber(n))n=n.toNumber();else if("number"!=typeof n)throw new TypeError("Parameter step must be a number");this.start=null!=e?parseFloat(e):0,this.end=null!=r?parseFloat(r):0,this.step=null!=n?parseFloat(n):1}return a.prototype.type="Range",a.prototype.isRange=!0,a.parse=function(t){if("string"!=typeof t)return null;var e=t.split(":"),r=e.map(function(t){return parseFloat(t)}),n=r.some(function(t){return isNaN(t)});if(n)return null;switch(r.length){case 2:return new a(r[0],r[1]);case 3:return new a(r[0],r[2],r[1]);default:return null}},a.prototype.clone=function(){return new a(this.start,this.end,this.step)},a.prototype.size=function(){var t=0,e=this.start,r=this.step,n=this.end,a=n-e;return o.sign(r)==o.sign(a)?t=Math.ceil(a/r):0==a&&(t=0),isNaN(t)&&(t=0),[t]},a.prototype.min=function(){var t=this.size()[0];return t>0?this.step>0?this.start:this.start+(t-1)*this.step:void 0},a.prototype.max=function(){var t=this.size()[0];return t>0?this.step>0?this.start+(t-1)*this.step:this.start:void 0},a.prototype.forEach=function(t){var e=this.start,r=this.step,n=this.end,o=0;if(r>0)for(;e<n;)t(e,[o],this),e+=r,o++;else if(r<0)for(;e>n;)t(e,[o],this),e+=r,o++;
},a.prototype.map=function(t){var e=[];return this.forEach(function(r,n,o){e[n[0]]=t(r,n,o)}),e},a.prototype.toArray=function(){var t=[];return this.forEach(function(e,r){t[r[0]]=e}),t},a.prototype.valueOf=function(){return this.toArray()},a.prototype.format=function(t){var e=o.format(this.start,t);return 1!=this.step&&(e+=":"+o.format(this.step,t)),e+=":"+o.format(this.end,t)},a.prototype.toString=function(){return this.format()},a.prototype.toJSON=function(){return{mathjs:"Range",start:this.start,end:this.end,step:this.step}},a.fromJSON=function(t){return new a(t.start,t.end,t.step)},a}var o=r(18);e.name="Range",e.path="type",e.factory=n},function(t,e){"use strict";function r(t,e,r,n){return n("index",{"...number | string | BigNumber | Range | Array | Matrix":function(e){var r=e.map(function(e){return t.isBigNumber(e)?e.toNumber():Array.isArray(e)||t.isMatrix(e)?e.map(function(e){return t.isBigNumber(e)?e.toNumber():e}):e}),n=new t.Index;return t.Index.apply(n,r),n}})}e.name="index",e.factory=r},function(t,e){"use strict";function r(t,e,r,n){var o=t.SparseMatrix,a=n("sparse",{"":function(){return new o([])},string:function(t){return new o([],t)},"Array | Matrix":function(t){return new o(t)},"Array | Matrix, string":function(t,e){return new o(t,e)}});return a.toTex={0:"\\begin{bsparse}\\end{bsparse}",1:"\\left(${args[0]}\\right)"},a}e.name="sparse",e.factory=r},function(t,e,r){"use strict";function n(t,e,n,i){function s(e,r){var n=l(e),o=n?new t.BigNumber(0):0;if(c(e),r){var i=u(r);return e.length>0?i.resize(e,o):i}var s=[];return e.length>0?a(s,e,o):s}function l(e){var r=!1;return e.forEach(function(e,n,o){t.isBigNumber(e)&&(r=!0,o[n]=e.toNumber())}),r}function c(t){t.forEach(function(t){if("number"!=typeof t||!o(t)||t<0)throw new Error("Parameters in function zeros must be positive integers")})}var u=n(r(43)),d=i("zeros",{"":function(){return"Array"===e.matrix?s([]):s([],"default")},"...number | BigNumber | string":function(t){var r=t[t.length-1];if("string"==typeof r){var n=t.pop();return s(t,n)}return"Array"===e.matrix?s(t):s(t,"default")},Array:s,Matrix:function(t){var e=t.storage();return s(t.valueOf(),e)},"Array | Matrix, string":function(t,e){return s(t.valueOf(),e)}});return d.toTex=void 0,d}var o=r(18).isInteger,a=r(28).resize;e.name="zeros",e.factory=n},function(t,e,r){"use strict";var n=r(2),o=r(5);t.exports=function(t,e,r){var a,i,s=_.keys(r);_.each(s,function(t){a=r[t],/[^a-z_]/i.test(a)&&(a=parseInt(a,10)),i=!1,_.each(e,function(e){n.has(e,t)&&(i=!0)}),i&&(e=_.filter(e,function(e){return e[t]==a}))});var l,c,u=[],d=!1;return _.each(e,function(e){l=!0,_.each(_.keys(t.viz.possible_filters),function(r){c=o(t.viz.filter_data,r),e[r]!=c&&(l=!1)}),l?d===!1&&(d=!0,u.push(e)):u.push(e)}),u}},function(t,e){"use strict";t.exports=function(t){var e={};return e.wrapper={},e.row_search={},e.row_search.box={},e.row_search.box.height=34,e.row_search.box.width=95,e.row_search.placeholder=t.row_search_placeholder,e.row_search.margin_left=7,e.slider={},e.slider.width=t.sidebar_width-30,e.slider.margin_left=15,e.key_cat={},e.key_cat.width=t.sidebar_width-15,e.key_cat.margin_left=5,e.key_cat.max_height=100,e.title=t.title,e.title_margin_left=7,e.about=t.about,e.width=t.sidebar_width,e.buttons={},e.buttons.width=t.sidebar_width-15,e.text={},e.icons=t.sidebar_icons,e.icon_margin_left=-5,e}},function(t,e){"use strict";t.exports=function(t,e){var r=_.keys(e)[0];return _.each(_.keys(t.viz.possible_filters),function(n){if(n!=r&&!d3.select(t.root+" .slider_"+n).empty()){var o=d3.select(t.root+" .slider_"+n).attr("current_state");e[n]=o}}),e}},function(t,e,r){"use strict";var n=r(67),o=r(69),a=r(71),i=r(72),s=r(73),l=r(74),c=r(75),u=r(76),d=r(81),f=r(83),p=r(2),h=r(4),v=r(84);t.exports=function(t){function e(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r={};r.root=t.root,r.root_tips=t.root.replace("#",".")+"_d3-tip",r.viz_wrapper=t.root+" .viz_wrapper",r.do_zoom=t.do_zoom,r.background_color=t.background_color,r.super_border_color=t.super_border_color,r.outer_margins=t.outer_margins,r.is_expand=t.ini_expand,r.grey_border_width=t.grey_border_width,r.show_dendrogram=t.show_dendrogram,r.tile_click_hlight=t.tile_click_hlight,r.inst_order=t.inst_order,r.expand_button=t.expand_button,r.sim_mat=t.sim_mat,r.dendro_filter=t.dendro_filter,r.cat_filter=t.cat_filter,r.cat_value_colors=t.cat_value_colors,r.viz_svg=r.viz_wrapper+" .viz_svg",r.zoom_element=r.viz_wrapper+" .viz_svg",r.uni_duration=1e3,r.bottom_space=10,r.run_trans=!1,r.duration=1e3,r.resize=t.resize,p.has(t,"size")?r.fixed_size=t.size:r.fixed_size=!1,r.border_fraction=65,r.uni_margin=5,r.super_labels={},r.super_labels.margin={},r.super_labels.dim={},r.super_labels.margin.left=r.grey_border_width,r.super_labels.margin.top=r.grey_border_width,r.super_labels.dim.width=0,t.labels.super_labels&&(r.super_labels.dim.width=15*t.labels.super_label_scale),r.triangle_opacity=.6,r.norm_labels={},r.norm_labels.width={},r.dendro_room={},r.show_dendrogram?r.dendro_room.symbol_width=10:r.dendro_room.symbol_width=0,r.cat_colors=t.cat_colors,r=v(t,r,e),0==_.has(t,"group_level")&&(r.show_dendrogram&&(t.group_level={}),0==_.has(t,"group_level")&&(t.group_level={}),t.group_level.row=5,t.group_level.col=5),r.dendro_opacity=.35,r.spillover_col_slant=r.norm_labels.width.col;var n=h(t.network_data.views);return r.possible_filters=n.possible_filters,r.filter_data=n.filter_data,r.viz_nodes={},r.viz_nodes.row=t.network_data.row_nodes_names,r.viz_nodes.col=t.network_data.col_nodes_names,r.viz_nodes.curr_row=t.network_data.row_nodes_names,r.viz_nodes.curr_col=t.network_data.col_nodes_names,r.x_offset=0,r}var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.labels=n(t),t.viz=e(t,r),o(t),t=a(t),t.viz=i(t.viz),t.viz=s(t.viz),t.viz=l(t.viz),t.sim_mat&&(t.viz.clust.dim.width<=t.viz.clust.dim.height?t.viz.clust.dim.height=t.viz.clust.dim.width:t.viz.clust.dim.width=t.viz.clust.dim.height),t=c(t),t=u(t),t=d(t),t=f(t)}},function(t,e,r){"use strict";var n=r(68);t.exports=function(t){var e={};return e.super_label_scale=t.super_label_scale,e.super_labels=t.super_labels,e.super_label_fs=13.8,e.super_labels&&(e.super={},e.super.row=t.super.row,e.super.col=t.super.col),e.show_label_tooltips=t.show_label_tooltips,e.row_max_char=n.max(t.network_data.row_nodes,function(t){return t.name.length}).name.length,e.col_max_char=n.max(t.network_data.col_nodes,function(t){return t.name.length}).name.length,e.max_allow_fs=t.max_allow_fs,e}},function(t,e,r){var n,o,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};(function(){function r(t){function e(e,r,n,o,a,i){for(;a>=0&&a<i;a+=t){var s=o?o[a]:a;n=r(n,e[s],s,e)}return n}return function(r,n,o,a){n=k(n,a,4);var i=!T(r)&&z.keys(r),s=(i||r).length,l=t>0?0:s-1;return arguments.length<3&&(o=r[i?i[l]:l],l+=t),e(r,n,o,i,l,s)}}function i(t){return function(e,r,n){r=A(r,n);for(var o=O(e),a=t>0?0:o-1;a>=0&&a<o;a+=t)if(r(e[a],a,e))return a;return-1}}function s(t,e,r){return function(n,o,a){var i=0,s=O(n);if("number"==typeof a)t>0?i=a>=0?a:Math.max(a+s,i):s=a>=0?Math.min(a+1,s):a+s+1;else if(r&&a&&s)return a=r(n,o),n[a]===o?a:-1;if(o!==o)return a=e(h.call(n,i,s),z.isNaN),a>=0?a+i:-1;for(a=t>0?i:s-1;a>=0&&a<s;a+=t)if(n[a]===o)return a;return-1}}function l(t,e){var r=j.length,n=t.constructor,o=z.isFunction(n)&&n.prototype||f,a="constructor";for(z.has(t,a)&&!z.contains(e,a)&&e.push(a);r--;)a=j[r],a in t&&t[a]!==o[a]&&!z.contains(e,a)&&e.push(a)}var c=this,u=c._,d=Array.prototype,f=Object.prototype,p=Function.prototype,_=d.push,h=d.slice,v=f.toString,m=f.hasOwnProperty,g=Array.isArray,y=Object.keys,w=p.bind,x=Object.create,b=function(){},z=function t(e){return e instanceof t?e:this instanceof t?void(this._wrapped=e):new t(e)};"undefined"!=typeof t&&t.exports&&(e=t.exports=z),e._=z,z.VERSION="1.8.3";var k=function(t,e,r){if(void 0===e)return t;switch(null==r?3:r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)};case 4:return function(r,n,o,a){return t.call(e,r,n,o,a)}}return function(){return t.apply(e,arguments)}},A=function(t,e,r){return null==t?z.identity:z.isFunction(t)?k(t,e,r):z.isObject(t)?z.matcher(t):z.property(t)};z.iteratee=function(t,e){return A(t,e,1/0)};var E=function(t,e){return function(r){var n=arguments.length;if(n<2||null==r)return r;for(var o=1;o<n;o++)for(var a=arguments[o],i=t(a),s=i.length,l=0;l<s;l++){var c=i[l];e&&void 0!==r[c]||(r[c]=a[c])}return r}},N=function(t){if(!z.isObject(t))return{};if(x)return x(t);b.prototype=t;var e=new b;return b.prototype=null,e},M=function(t){return function(e){return null==e?void 0:e[t]}},S=Math.pow(2,53)-1,O=M("length"),T=function(t){var e=O(t);return"number"==typeof e&&e>=0&&e<=S};z.each=z.forEach=function(t,e,r){e=k(e,r);var n,o;if(T(t))for(n=0,o=t.length;n<o;n++)e(t[n],n,t);else{var a=z.keys(t);for(n=0,o=a.length;n<o;n++)e(t[a[n]],a[n],t)}return t},z.map=z.collect=function(t,e,r){e=A(e,r);for(var n=!T(t)&&z.keys(t),o=(n||t).length,a=Array(o),i=0;i<o;i++){var s=n?n[i]:i;a[i]=e(t[s],s,t)}return a},z.reduce=z.foldl=z.inject=r(1),z.reduceRight=z.foldr=r(-1),z.find=z.detect=function(t,e,r){var n;if(n=T(t)?z.findIndex(t,e,r):z.findKey(t,e,r),void 0!==n&&n!==-1)return t[n]},z.filter=z.select=function(t,e,r){var n=[];return e=A(e,r),z.each(t,function(t,r,o){e(t,r,o)&&n.push(t)}),n},z.reject=function(t,e,r){return z.filter(t,z.negate(A(e)),r)},z.every=z.all=function(t,e,r){e=A(e,r);for(var n=!T(t)&&z.keys(t),o=(n||t).length,a=0;a<o;a++){var i=n?n[a]:a;if(!e(t[i],i,t))return!1}return!0},z.some=z.any=function(t,e,r){e=A(e,r);for(var n=!T(t)&&z.keys(t),o=(n||t).length,a=0;a<o;a++){var i=n?n[a]:a;if(e(t[i],i,t))return!0}return!1},z.contains=z.includes=z.include=function(t,e,r,n){return T(t)||(t=z.values(t)),("number"!=typeof r||n)&&(r=0),z.indexOf(t,e,r)>=0},z.invoke=function(t,e){var r=h.call(arguments,2),n=z.isFunction(e);return z.map(t,function(t){var o=n?e:t[e];return null==o?o:o.apply(t,r)})},z.pluck=function(t,e){return z.map(t,z.property(e))},z.where=function(t,e){return z.filter(t,z.matcher(e))},z.findWhere=function(t,e){return z.find(t,z.matcher(e))},z.max=function(t,e,r){var n,o,a=-(1/0),i=-(1/0);if(null==e&&null!=t){t=T(t)?t:z.values(t);for(var s=0,l=t.length;s<l;s++)n=t[s],n>a&&(a=n)}else e=A(e,r),z.each(t,function(t,r,n){o=e(t,r,n),(o>i||o===-(1/0)&&a===-(1/0))&&(a=t,i=o)});return a},z.min=function(t,e,r){var n,o,a=1/0,i=1/0;if(null==e&&null!=t){t=T(t)?t:z.values(t);for(var s=0,l=t.length;s<l;s++)n=t[s],n<a&&(a=n)}else e=A(e,r),z.each(t,function(t,r,n){o=e(t,r,n),(o<i||o===1/0&&a===1/0)&&(a=t,i=o)});return a},z.shuffle=function(t){for(var e,r=T(t)?t:z.values(t),n=r.length,o=Array(n),a=0;a<n;a++)e=z.random(0,a),e!==a&&(o[a]=o[e]),o[e]=r[a];return o},z.sample=function(t,e,r){return null==e||r?(T(t)||(t=z.values(t)),t[z.random(t.length-1)]):z.shuffle(t).slice(0,Math.max(0,e))},z.sortBy=function(t,e,r){return e=A(e,r),z.pluck(z.map(t,function(t,r,n){return{value:t,index:r,criteria:e(t,r,n)}}).sort(function(t,e){var r=t.criteria,n=e.criteria;if(r!==n){if(r>n||void 0===r)return 1;if(r<n||void 0===n)return-1}return t.index-e.index}),"value")};var C=function(t){return function(e,r,n){var o={};return r=A(r,n),z.each(e,function(n,a){var i=r(n,a,e);t(o,n,i)}),o}};z.groupBy=C(function(t,e,r){z.has(t,r)?t[r].push(e):t[r]=[e]}),z.indexBy=C(function(t,e,r){t[r]=e}),z.countBy=C(function(t,e,r){z.has(t,r)?t[r]++:t[r]=1}),z.toArray=function(t){return t?z.isArray(t)?h.call(t):T(t)?z.map(t,z.identity):z.values(t):[]},z.size=function(t){return null==t?0:T(t)?t.length:z.keys(t).length},z.partition=function(t,e,r){e=A(e,r);var n=[],o=[];return z.each(t,function(t,r,a){(e(t,r,a)?n:o).push(t)}),[n,o]},z.first=z.head=z.take=function(t,e,r){if(null!=t)return null==e||r?t[0]:z.initial(t,t.length-e)},z.initial=function(t,e,r){return h.call(t,0,Math.max(0,t.length-(null==e||r?1:e)))},z.last=function(t,e,r){if(null!=t)return null==e||r?t[t.length-1]:z.rest(t,Math.max(0,t.length-e))},z.rest=z.tail=z.drop=function(t,e,r){return h.call(t,null==e||r?1:e)},z.compact=function(t){return z.filter(t,z.identity)};var B=function t(e,r,n,o){for(var a=[],i=0,s=o||0,l=O(e);s<l;s++){var c=e[s];if(T(c)&&(z.isArray(c)||z.isArguments(c))){r||(c=t(c,r,n));var u=0,d=c.length;for(a.length+=d;u<d;)a[i++]=c[u++]}else n||(a[i++]=c)}return a};z.flatten=function(t,e){return B(t,e,!1)},z.without=function(t){return z.difference(t,h.call(arguments,1))},z.uniq=z.unique=function(t,e,r,n){z.isBoolean(e)||(n=r,r=e,e=!1),null!=r&&(r=A(r,n));for(var o=[],a=[],i=0,s=O(t);i<s;i++){var l=t[i],c=r?r(l,i,t):l;e?(i&&a===c||o.push(l),a=c):r?z.contains(a,c)||(a.push(c),o.push(l)):z.contains(o,l)||o.push(l)}return o},z.union=function(){return z.uniq(B(arguments,!0,!0))},z.intersection=function(t){for(var e=[],r=arguments.length,n=0,o=O(t);n<o;n++){var a=t[n];if(!z.contains(e,a)){for(var i=1;i<r&&z.contains(arguments[i],a);i++);i===r&&e.push(a)}}return e},z.difference=function(t){var e=B(arguments,!0,!0,1);return z.filter(t,function(t){return!z.contains(e,t)})},z.zip=function(){return z.unzip(arguments)},z.unzip=function(t){for(var e=t&&z.max(t,O).length||0,r=Array(e),n=0;n<e;n++)r[n]=z.pluck(t,n);return r},z.object=function(t,e){for(var r={},n=0,o=O(t);n<o;n++)e?r[t[n]]=e[n]:r[t[n][0]]=t[n][1];return r},z.findIndex=i(1),z.findLastIndex=i(-1),z.sortedIndex=function(t,e,r,n){r=A(r,n,1);for(var o=r(e),a=0,i=O(t);a<i;){var s=Math.floor((a+i)/2);r(t[s])<o?a=s+1:i=s}return a},z.indexOf=s(1,z.findIndex,z.sortedIndex),z.lastIndexOf=s(-1,z.findLastIndex),z.range=function(t,e,r){null==e&&(e=t||0,t=0),r=r||1;for(var n=Math.max(Math.ceil((e-t)/r),0),o=Array(n),a=0;a<n;a++,t+=r)o[a]=t;return o};var F=function(t,e,r,n,o){if(!(n instanceof e))return t.apply(r,o);var a=N(t.prototype),i=t.apply(a,o);return z.isObject(i)?i:a};z.bind=function(t,e){if(w&&t.bind===w)return w.apply(t,h.call(arguments,1));if(!z.isFunction(t))throw new TypeError("Bind must be called on a function");var r=h.call(arguments,2),n=function n(){return F(t,n,e,this,r.concat(h.call(arguments)))};return n},z.partial=function(t){var e=h.call(arguments,1),r=function r(){for(var n=0,o=e.length,a=Array(o),i=0;i<o;i++)a[i]=e[i]===z?arguments[n++]:e[i];for(;n<arguments.length;)a.push(arguments[n++]);return F(t,r,this,this,a)};return r},z.bindAll=function(t){var e,r,n=arguments.length;if(n<=1)throw new Error("bindAll must be passed function names");for(e=1;e<n;e++)r=arguments[e],t[r]=z.bind(t[r],t);return t},z.memoize=function(t,e){var r=function r(n){var o=r.cache,a=""+(e?e.apply(this,arguments):n);return z.has(o,a)||(o[a]=t.apply(this,arguments)),o[a]};return r.cache={},r},z.delay=function(t,e){var r=h.call(arguments,2);return setTimeout(function(){return t.apply(null,r)},e)},z.defer=z.partial(z.delay,z,1),z.throttle=function(t,e,r){var n,o,a,i=null,s=0;r||(r={});var l=function(){s=r.leading===!1?0:z.now(),i=null,a=t.apply(n,o),i||(n=o=null)};return function(){var c=z.now();s||r.leading!==!1||(s=c);var u=e-(c-s);return n=this,o=arguments,u<=0||u>e?(i&&(clearTimeout(i),i=null),s=c,a=t.apply(n,o),i||(n=o=null)):i||r.trailing===!1||(i=setTimeout(l,u)),a}},z.debounce=function(t,e,r){var n,o,a,i,s,l=function l(){var c=z.now()-i;c<e&&c>=0?n=setTimeout(l,e-c):(n=null,r||(s=t.apply(a,o),n||(a=o=null)))};return function(){a=this,o=arguments,i=z.now();var c=r&&!n;return n||(n=setTimeout(l,e)),c&&(s=t.apply(a,o),a=o=null),s}},z.wrap=function(t,e){return z.partial(e,t)},z.negate=function(t){return function(){return!t.apply(this,arguments)}},z.compose=function(){var t=arguments,e=t.length-1;return function(){for(var r=e,n=t[e].apply(this,arguments);r--;)n=t[r].call(this,n);return n}},z.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},z.before=function(t,e){var r;return function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=null),r}},z.once=z.partial(z.before,2);var I=!{toString:null}.propertyIsEnumerable("toString"),j=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];z.keys=function(t){if(!z.isObject(t))return[];if(y)return y(t);var e=[];for(var r in t)z.has(t,r)&&e.push(r);return I&&l(t,e),e},z.allKeys=function(t){if(!z.isObject(t))return[];var e=[];for(var r in t)e.push(r);return I&&l(t,e),e},z.values=function(t){for(var e=z.keys(t),r=e.length,n=Array(r),o=0;o<r;o++)n[o]=t[e[o]];return n},z.mapObject=function(t,e,r){e=A(e,r);for(var n,o=z.keys(t),a=o.length,i={},s=0;s<a;s++)n=o[s],i[n]=e(t[n],n,t);return i},z.pairs=function(t){for(var e=z.keys(t),r=e.length,n=Array(r),o=0;o<r;o++)n[o]=[e[o],t[e[o]]];return n},z.invert=function(t){for(var e={},r=z.keys(t),n=0,o=r.length;n<o;n++)e[t[r[n]]]=r[n];return e},z.functions=z.methods=function(t){var e=[];for(var r in t)z.isFunction(t[r])&&e.push(r);return e.sort()},z.extend=E(z.allKeys),z.extendOwn=z.assign=E(z.keys),z.findKey=function(t,e,r){e=A(e,r);for(var n,o=z.keys(t),a=0,i=o.length;a<i;a++)if(n=o[a],e(t[n],n,t))return n},z.pick=function(t,e,r){var n,o,a={},i=t;if(null==i)return a;z.isFunction(e)?(o=z.allKeys(i),n=k(e,r)):(o=B(arguments,!1,!1,1),n=function(t,e,r){return e in r},i=Object(i));for(var s=0,l=o.length;s<l;s++){var c=o[s],u=i[c];n(u,c,i)&&(a[c]=u)}return a},z.omit=function(t,e,r){if(z.isFunction(e))e=z.negate(e);else{var n=z.map(B(arguments,!1,!1,1),String);e=function(t,e){return!z.contains(n,e)}}return z.pick(t,e,r)},z.defaults=E(z.allKeys,!0),z.create=function(t,e){var r=N(t);return e&&z.extendOwn(r,e),r},z.clone=function(t){return z.isObject(t)?z.isArray(t)?t.slice():z.extend({},t):t},z.tap=function(t,e){return e(t),t},z.isMatch=function(t,e){var r=z.keys(e),n=r.length;if(null==t)return!n;for(var o=Object(t),a=0;a<n;a++){var i=r[a];if(e[i]!==o[i]||!(i in o))return!1}return!0};var R=function t(e,r,n,o){if(e===r)return 0!==e||1/e===1/r;if(null==e||null==r)return e===r;e instanceof z&&(e=e._wrapped),r instanceof z&&(r=r._wrapped);var i=v.call(e);if(i!==v.call(r))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+r;case"[object Number]":return+e!==+e?+r!==+r:0===+e?1/+e===1/r:+e===+r;case"[object Date]":case"[object Boolean]":return+e===+r}var s="[object Array]"===i;if(!s){if("object"!=("undefined"==typeof e?"undefined":a(e))||"object"!=("undefined"==typeof r?"undefined":a(r)))return!1;var l=e.constructor,c=r.constructor;if(l!==c&&!(z.isFunction(l)&&l instanceof l&&z.isFunction(c)&&c instanceof c)&&"constructor"in e&&"constructor"in r)return!1}n=n||[],o=o||[];for(var u=n.length;u--;)if(n[u]===e)return o[u]===r;if(n.push(e),o.push(r),s){if(u=e.length,u!==r.length)return!1;for(;u--;)if(!t(e[u],r[u],n,o))return!1}else{var d,f=z.keys(e);if(u=f.length,z.keys(r).length!==u)return!1;for(;u--;)if(d=f[u],!z.has(r,d)||!t(e[d],r[d],n,o))return!1}return n.pop(),o.pop(),!0};z.isEqual=function(t,e){return R(t,e)},z.isEmpty=function(t){return null==t||(T(t)&&(z.isArray(t)||z.isString(t)||z.isArguments(t))?0===t.length:0===z.keys(t).length)},z.isElement=function(t){return!(!t||1!==t.nodeType)},z.isArray=g||function(t){return"[object Array]"===v.call(t)},z.isObject=function(t){var e="undefined"==typeof t?"undefined":a(t);return"function"===e||"object"===e&&!!t},z.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){z["is"+t]=function(e){return v.call(e)==="[object "+t+"]"}}),z.isArguments(arguments)||(z.isArguments=function(t){return z.has(t,"callee")}),"function"!=typeof/./&&"object"!=("undefined"==typeof Int8Array?"undefined":a(Int8Array))&&(z.isFunction=function(t){return"function"==typeof t||!1}),z.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},z.isNaN=function(t){return z.isNumber(t)&&t!==+t},z.isBoolean=function(t){return t===!0||t===!1||"[object Boolean]"===v.call(t)},z.isNull=function(t){return null===t},z.isUndefined=function(t){return void 0===t},z.has=function(t,e){return null!=t&&m.call(t,e)},z.noConflict=function(){return c._=u,this},z.identity=function(t){return t},z.constant=function(t){return function(){return t}},z.noop=function(){},z.property=M,z.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},z.matcher=z.matches=function(t){return t=z.extendOwn({},t),function(e){return z.isMatch(e,t)}},z.times=function(t,e,r){var n=Array(Math.max(0,t));e=k(e,r,1);for(var o=0;o<t;o++)n[o]=e(o);return n},z.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},z.now=Date.now||function(){return(new Date).getTime()};var L={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},D=z.invert(L),P=function(t){var e=function(e){return t[e]},r="(?:"+z.keys(t).join("|")+")",n=RegExp(r),o=RegExp(r,"g");return function(t){return t=null==t?"":""+t,n.test(t)?t.replace(o,e):t}};z.escape=P(L),z.unescape=P(D),z.result=function(t,e,r){var n=null==t?void 0:t[e];return void 0===n&&(n=r),z.isFunction(n)?n.call(t):n};var U=0;z.uniqueId=function(t){var e=++U+"";return t?t+e:e},z.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,$={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},H=/\\|'|\r|\n|\u2028|\u2029/g,W=function(t){return"\\"+$[t]};z.template=function(t,e,r){!e&&r&&(e=r),e=z.defaults({},e,z.templateSettings);var n=RegExp([(e.escape||q).source,(e.interpolate||q).source,(e.evaluate||q).source].join("|")+"|$","g"),o=0,a="__p+='";t.replace(n,function(e,r,n,i,s){return a+=t.slice(o,s).replace(H,W),o=s+e.length,r?a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":n?a+="'+\n((__t=("+n+"))==null?'':__t)+\n'":i&&(a+="';\n"+i+"\n__p+='"),e}),a+="';\n",e.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{var i=new Function(e.variable||"obj","_",a)}catch(t){throw t.source=a,t}var s=function(t){return i.call(this,t,z)},l=e.variable||"obj";return s.source="function("+l+"){\n"+a+"}",s},z.chain=function(t){var e=z(t);return e._chain=!0,e};var Z=function(t,e){return t._chain?z(e).chain():e};z.mixin=function(t){z.each(z.functions(t),function(e){var r=z[e]=t[e];z.prototype[e]=function(){var t=[this._wrapped];return _.apply(t,arguments),Z(this,r.apply(z,t))}})},z.mixin(z),z.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=d[t];z.prototype[t]=function(){var r=this._wrapped;return e.apply(r,arguments),"shift"!==t&&"splice"!==t||0!==r.length||delete r[0],Z(this,r)}}),z.each(["concat","join","slice"],function(t){var e=d[t];z.prototype[t]=function(){return Z(this,e.apply(this._wrapped,arguments))}}),z.prototype.value=function(){return this._wrapped},z.prototype.valueOf=z.prototype.toJSON=z.prototype.value,z.prototype.toString=function(){return""+this._wrapped},n=[],o=function(){return z}.apply(e,n),!(void 0!==o&&(t.exports=o))}).call(void 0)},function(t,e,r){"use strict";var n=r(70);t.exports=function(t){d3.select(t.root+" .viz_wrapper").empty()&&(d3.select(t.root).append("div").classed("sidebar_wrapper",!0),d3.select(t.root).append("div").classed("viz_wrapper",!0));var e=n(t);d3.select(t.root+" .sidebar_wrapper").style("float","left").style("width",t.sidebar_width+"px").style("height",e.height+"px").style("overflow","hidden"),d3.select(t.viz.viz_wrapper).style("float","left").style("width",e.width+"px").style("height",e.height+"px")}},function(t,e){"use strict";t.exports=function(t){var e,r={},n=t.buffer_width,o=d3.select(t.root).style("width").replace("px",""),a=d3.select(t.root).style("height").replace("px","");return t.viz.is_expand===!1?(e=t.viz.outer_margins,r.width=o-t.sidebar_width-n):(e=t.viz.outer_margins,r.width=o-n),r.top=e.top,r.left=e.left,t.viz.resize?r.height=a:(t.viz.is_expand?r.width=t.viz.fixed_size.width:r.width=t.viz.fixed_size.width-t.sidebar_width,r.height=t.viz.fixed_size.height),r}},function(t,e){"use strict";t.exports=function(t){return t.viz.svg_dim={},t.viz.svg_dim.width=Number(d3.select(t.viz.viz_wrapper).style("width").replace("px","")),t.viz.svg_dim.height=Number(d3.select(t.viz.viz_wrapper).style("height").replace("px","")),t}},function(t,e){"use strict";t.exports=function(t){return t.norm_labels.margin={},t.norm_labels.margin.left=t.super_labels.margin.left+t.super_labels.dim.width,t.norm_labels.margin.top=t.super_labels.margin.top+t.super_labels.dim.width,t.label_background={},t.label_background.row=t.norm_labels.width.row+t.cat_room.row+t.uni_margin,t.label_background.col=t.norm_labels.width.col+t.cat_room.col+t.uni_margin,t}},function(t,e){"use strict";t.exports=function(t){t.clust={},t.clust.margin={},t.clust.margin.left=t.norm_labels.margin.left+t.norm_labels.width.row+t.cat_room.row+t.uni_margin,t.clust.margin.top=t.norm_labels.margin.top+t.norm_labels.width.col+t.cat_room.col+t.uni_margin;var e=t.svg_dim.width-t.clust.margin.left-t.spillover_col_slant,r=d3.scale.ordinal().rangeBands([0,e]).domain(_.range(t.num_col_nodes)),n=r.rangeBand()/2;if(n>t.norm_labels.width.col){var o=t.norm_labels.width.col/n;e*=o}return t.clust.dim={},t.clust.dim.width=e,t}},function(t,e){"use strict";t.exports=function(t){var e=t.svg_dim.height-t.clust.margin.top-t.dendro_room.col-t.bottom_space;return t.clust.dim.height=e,t}},function(t,e,r){"use strict";var n=r(68);t.exports=function(t){var e=Math.abs(n.max(t.network_data.col_nodes,function(t){return Math.abs(t.value)}).value);return t.labels.bar_scale_col=d3.scale.linear().domain([0,e]).range([0,.75*t.viz.norm_labels.width.col]),e=Math.abs(n.max(t.network_data.row_nodes,function(t){return Math.abs(t.value)}).value),t.labels.bar_scale_row=d3.scale.linear().domain([0,e]).range([0,t.viz.norm_labels.width.row]),t}},function(t,e,r){"use strict";var n=r(77),o=r(79);t.exports=function(t){t.matrix=n(t),t.viz.x_scale=d3.scale.ordinal().rangeBands([0,t.viz.clust.dim.width]),t.viz.y_scale=d3.scale.ordinal().rangeBands([0,t.viz.clust.dim.height]);var e;return _.each(["row","col"],function(r){e=t.viz.inst_order[r],"custom"===e&&(e="clust"),"row"===r?t.viz.x_scale.domain(t.matrix.orders[e+"_"+r]):t.viz.y_scale.domain(t.matrix.orders[e+"_"+r])}),t.viz.border_width={},t.viz.border_width.x=t.viz.x_scale.rangeBand()/t.viz.border_fraction,t.viz.border_width.y=t.viz.y_scale.rangeBand()/t.viz.border_fraction,t.viz.rect_width=t.viz.x_scale.rangeBand()-t.viz.border_width.x,t.viz.rect_height=t.viz.y_scale.rangeBand()-t.viz.border_width.y,o(t),t}},function(t,e,r){"use strict";var n=r(2),o=r(78),a=r(68);t.exports=function(t){var e={},r=t.network_data;e.tile_colors=t.tile_colors,e.bar_colors=t.bar_colors,e.outline_colors=t.outline_colors,e.hlight_color=t.highlight_color,e.tile_title=t.tile_title,e.show_tile_tooltips=t.show_tile_tooltips,e.make_tile_tooltip=t.make_tile_tooltip,e.distance_metric="cosine",e.linkage_type="average",e.click_hlight_x=-666,e.click_hlight_y=-666,e.click_hlight_row=-666,e.click_hlight_col=-666,e.def_large_matrix=1e4,e.opacity_function=t.opacity_scale,e.orders={},_.each(["row","col"],function(o){var a;a="row"===o?"col":"row";var i=r[a+"_nodes"],s=i.length,l=n.pluck(i,"name"),c=l.sort(),u=_.map(c,function(t){return r[a+"_nodes_names"].indexOf(t)});e.orders["alpha_"+o]=u;var d=["clust","rank"];_.has(i[0],"rankvar")&&d.push("rankvar"),t.viz.all_cats[a].length>0&&_.each(t.viz.all_cats[a],function(t){t=t.replace("-","_"),d.push(t+"_index")}),_.each(d,function(t){var r=d3.range(s).sort(function(e,r){return i[r][t]-i[e][t]});e.orders[t+"_"+o]=r})}),n.has(r,"all_links")?e.max_link=a.max(r.all_links,function(t){return Math.abs(t.value)}).value:e.max_link=a.max(r.links,function(t){return Math.abs(t.value)}).value,e.abs_max_val=Math.abs(e.max_link)*t.clamp_opacity,0===t.input_domain?"linear"===e.opacity_function?e.opacity_scale=d3.scale.linear().domain([0,e.abs_max_val]).clamp(!0).range([0,1]):"log"===e.opacity_function&&(e.opacity_scale=d3.scale.log().domain([.001,e.abs_max_val]).clamp(!0).range([0,1])):"linear"===e.opacity_function?e.opacity_scale=d3.scale.linear().domain([0,t.input_domain]).clamp(!0).range([0,1]):"log"===e.opacity_function&&(e.opacity_scale=d3.scale.log().domain([.001,t.input_domain]).clamp(!0).range([0,1]));var i=n.has(r.links[0],"value_up"),s=n.has(r.links[0],"value_dn");return i||s?e.tile_type="updn":e.tile_type="simple",n.has(r.links[0],"highlight")?e.highlight=1:e.highlight=0,e.matrix=o(r),e.wait_tooltip=0,e}},function(t,e,r){"use strict";var n=r(2);t.exports=function(t){var e,r,o=[];return r=!!n.has(t.links[0],"value_orig"),t.row_nodes.forEach(function(a,i){o[i]={},o[i].name=t.row_nodes[i].name,o[i].row_index=i,o[i].row_data=d3.range(t.col_nodes.length).map(function(o){return e=n.has(t.links[0],"value_up")||n.has(t.links[0],"value_dn")?{pos_x:o,pos_y:i,value:0,value_up:0,value_dn:0,highlight:0}:{pos_x:o,pos_y:i,value:0,highlight:0},r&&(e.value_orig=0),e})}),t.links.forEach(function(t){o[t.source].row_data[t.target].value=t.value,o[t.source].row_data[t.target].row_name=t.row_name,o[t.source].row_data[t.target].col_name=t.col_name,(n.has(t,"value_up")||n.has(t,"value_dn"))&&(o[t.source].row_data[t.target].value_up=t.value_up,o[t.source].row_data[t.target].value_dn=t.value_dn),r&&(o[t.source].row_data[t.target].value_orig=t.value_orig),t.highlight&&(o[t.source].row_data[t.target].highlight=t.highlight),t.info&&(o[t.source].row_data[t.target].info=t.info)}),o}},function(t,e,r){"use strict";var n=r(80);t.exports=function(t){var e=3,r=2,o=e/t.viz.rect_height,a=2;t.viz.ds_zt=a;var i=Math.floor(Math.log(o)/Math.log(a));if(t.viz.rect_height<r&&i>0){var s=2;t.viz.ds_opacity_scale=d3.scale.linear().domain([1,100]).range([1,s]).clamp(!0);var l;t.viz.ds_num_levels=i,t.viz.ds=[],t.matrix.ds_matrix=[];for(var c=t.viz.inst_order.row,u=$.extend(!0,{},t.matrix.matrix),d=0;d<i;d++){t.viz.ds_level=0,l={},l.height=e,l.num_levels=i;var f=Math.pow(a,d);l.zt=f,l.num_rows=Math.round(t.viz.clust.dim.height/(l.height/f)),l.x_scale=d3.scale.ordinal().rangeBands([0,t.viz.clust.dim.width]),l.x_scale.domain(t.matrix.orders[c+"_row"]),l.y_scale=d3.scale.ordinal().rangeBands([0,t.viz.clust.dim.height]),l.y_scale.domain(d3.range(l.num_rows+1)),l.rect_height=l.y_scale.rangeBand()-t.viz.border_width.y,t.viz.ds.push(l);var p=n(t,u,d);t.matrix.ds_matrix.push(p)}t.viz.viz_nodes.row=d3.range(t.matrix.ds_matrix[0].length).map(String)}else t.viz.ds=null,t.viz.ds_level=-1,t.viz.ds_num_levels=0}},function(t,e){"use strict";t.exports=function(t,e,r){var n,o,a,i=t.viz.ds[r].num_rows,s=t.network_data.row_nodes.length/i,l=t.viz.ds_opacity_scale(s),c=t.viz.clust.dim.height/i,u=[],d=i+1;for(o=0;o<d;o++)n={},n.row_index=o,n.name=String(o),n.all_names=[],u.push(n);_.each(e,function(e){var r=t.viz.y_scale(e.row_index),n=Math.round(r/c),o=e.row_data;if(u[n].all_names.push(e.name),_.has(u[n],"row_data"))for(a=0;a<o.length;a++)u[n].row_data[a].value=u[n].row_data[a].value+o[a].value;else{var i=[];for(a=0;a<o.length;a++)i[a]=o[a];u[n].row_data=i}}),_.each(u,function(t){var e=t.row_data,r=t.all_names.length;_.each(e,function(t){t.value=t.value/r*l})});var f=[];return _.each(u,function(t){f=f.concat(t.all_names)}),u}},function(t,e,r){"use strict";var n=r(82);t.exports=function(t){t.viz.zoom_scale_font={},t.viz.zoom_scale_font.row=1,t.viz.zoom_scale_font.col=1;var e=.75,r=t.viz.x_scale.rangeBand()/2;return t.viz.square_zoom=t.viz.norm_labels.width.col/r*e,t.viz=n(t.viz),t}},function(t,e){"use strict";t.exports=function(t){var e=t.clust.dim.width/t.num_col_nodes,r=t.clust.dim.height/t.num_row_nodes;return t.zoom_ratio={},t.zoom_ratio.x=e/r,t.zoom_ratio.y=1,t.zoom_ratio.x<1&&(t.zoom_ratio.y=1/t.zoom_ratio.x,t.zoom_ratio.x=1),t}},function(t,e){"use strict";t.exports=function(t){return t.labels.default_fs_row=1.01*t.viz.y_scale.rangeBand(),t.labels.default_fs_col=.87*t.viz.x_scale.rangeBand(),t.labels.default_fs_row>t.labels.max_allow_fs&&(t.labels.default_fs_row=t.labels.max_allow_fs),t.labels.default_fs_col>t.labels.max_allow_fs&&(t.labels.default_fs_col=t.labels.max_allow_fs),
t}},function(t,e,r){"use strict";var n=r(85),o=r(2),a=r(86),i=r(87);t.exports=function(t,e){var r,s,l,c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],u=": ";e.show_categories={},e.all_cats={},e.cat_names={},e.cat_info={};var d={};d.row=null,d.col=null,e.cat_colors={},e.cat_colors.value_opacity=d;var f=0;return _.each(["row","col"],function(n){e.show_categories[n]=!1,e.all_cats[n]=[];var d=_.keys(t.network_data[n+"_nodes"][0]);d=d.sort(),_.each(d,function(t){t.indexOf("cat-")>=0&&(e.show_categories[n]=!0,e.all_cats[n].push(t))}),e.cat_info[n]=null,e.show_categories[n]&&(e.cat_colors[n]={},e.cat_info[n]={},e.cat_names[n]={},_.each(e.all_cats[n],function(c){var d=t.network_data[n+"_nodes"][0];"string"==typeof d[c]&&d[c].indexOf(u)>0?(r=d[c].split(u)[0],e.cat_names[n][c]=r):e.cat_names[n][c]=c;var p=o.pluck(t.network_data[n+"_nodes"],c),h=[];_.each(p,function(t){var e;e=t.indexOf(": ")>0?t.split(": ")[1]:t,h.push(e)});var v=_.uniq(p).sort();if(s=i(v),"cat_strings"===s.type){var m=_.countBy(h);s.cat_hist=m}else s.cat_hist=null;e.cat_info[n][c]=s,e.cat_colors[n][c]={},_.each(v,function(t,r){l=a.get_random_color(r+f),e.cat_colors[n][c][t]=l,"string"==typeof t&&(t.indexOf("Not ")>=0||t.indexOf(": false")>0)&&(e.cat_colors[n][c][t]="#eee"),f+=1})})),_.has(t.network_data,"cat_colors")&&c===!0&&(e.cat_colors[n]=t.network_data.cat_colors[n]),t.sim_mat&&(e.cat_colors.col=e.cat_colors.row)}),e.cat_colors=e.cat_colors,e.cat_colors.opacity=.6,e.cat_colors.active_opacity=.9,e=n(t,e)}},function(t,e){"use strict";t.exports=function(t,e){var r,n=d3.scale.linear().domain([5,15]).range([85,120]).clamp("true");return e.cat_room={},e.cat_room.symbol_width=12,e.cat_room.separation=3,_.each(["row","col"],function(o){e.norm_labels.width[o]=n(t.labels[o+"_max_char"])*t[o+"_label_scale"],e["num_"+o+"_nodes"]=t.network_data[o+"_nodes"].length,"row"===o?e.dendro_room[o]=e.dendro_room.symbol_width:e.dendro_room[o]=e.dendro_room.symbol_width+3*e.uni_margin;var a=e.all_cats[o].length;if(e.show_categories[o]){r=(a-1)*e.cat_room.separation;var i;i="row"===o?a+1:a,e.cat_room[o]=i*e.cat_room.symbol_width+r}else"row"==o?e.cat_room[o]=e.cat_room.symbol_width:e.cat_room[o]=0}),e}},function(t,e){"use strict";function r(){return"#EEE"}function n(t){return a[t%o()]}function o(){return a.length}var a;a=["#393b79","#aec7e8","#ff7f0e","#ffbb78","#98df8a","#bcbd22","#404040","#ff9896","#c5b0d5","#8c564b","#1f77b4","#5254a3","#FFDB58","#c49c94","#e377c2","#7f7f7f","#2ca02c","#9467bd","#dbdb8d","#17becf","#637939","#6b6ecf","#9c9ede","#d62728","#8ca252","#8c6d31","#bd9e39","#e7cb94","#843c39","#ad494a","#d6616b","#7b4173","#a55194","#ce6dbd","#de9ed6"],t.exports={get_default_color:r,get_random_color:n,get_num_colors:o}},function(t,e,r){"use strict";var n=r(68);t.exports=function(t){var e=t[0],r=!1,o=!1,a="cat_strings",i=NaN,s=[],l=null,c=": ";if("string"==typeof e&&e.indexOf(c)>-1&&(r=!0,e=e.split(c)[1]),0==isNaN(e)&&(o=!0),o&&(a="cat_values",_.each(t,function(t){r&&(t=t.split(c)[1]),isNaN(t)===!0?a="cat_strings":(t=parseFloat(t),s.push(t))})),"cat_values"===a){var u=n.max(s,function(t){return Math.abs(t)});i=Math.abs(u),l=d3.scale.linear().domain([0,i]).range([0,1])}var d={};return d.type=a,d.max_abs_val=i,d.cat_scale=l,d}},function(t,e){"use strict";t.exports=function(){var t={};return t.zoom_x=1,t.zoom_y=1,t.trans_x=0,t.trans_y=0,t}},function(t,e,r){"use strict";var n=r(90),o=r(101),a=r(131),i=r(139),s=r(140),l=r(151),c=r(161),u=r(180),d=r(185),f=r(146),p=r(186),h=r(187),v=r(188),m=r(228);t.exports=function(t){function e(){var t=r.viz.super_border_color;return(r.viz.is_expand||0==r.show_viz_border)&&(t="white"),t}var r=t.params;d3.select(r.viz.viz_wrapper+" svg").remove();var g=d3.select(r.viz.viz_wrapper).append("svg").attr("class","viz_svg").attr("id","svg_"+r.root.replace("#","")).attr("width",r.viz.svg_dim.width).attr("height",r.viz.svg_dim.height).attr("is_zoom",0).attr("stopped_zoom",1);g.append("rect").attr("class","super_background").style("width",r.viz.svg_dim.width).style("height",r.viz.svg_dim.height).style("fill","white"),n(r,g),o(t),r.viz.show_dendrogram&&(p(t),h(t),m(t)),a(t),r.viz.ds_level===-1&&_.each(["row","col"],function(t){var e=Number(d3.select("."+t+"_label_group").select("text").style("font-size").replace("px","")),n=8;e>n&&d3.selectAll(r.root+" ."+t+"_label_group").each(function(){f(r,this,t)})}),d(t),r.viz.show_categories.col&&u(t),s(t),r.labels.super_labels&&i(r),r.viz.show_dendrogram&&v(t),d3.select(r.viz.viz_svg).append("rect").classed("left_border",!0).classed("borders",!0).attr("fill",e).attr("width",r.viz.grey_border_width).attr("height",r.viz.svg_dim.height).attr("transform","translate(0,0)"),d3.select(r.viz.viz_svg).append("rect").classed("right_border",!0).classed("borders",!0).attr("fill",e).attr("width",r.viz.grey_border_width).attr("height",r.viz.svg_dim.height).attr("transform",function(){var t=r.viz.svg_dim.width-r.viz.grey_border_width;return"translate("+t+",0)"}),d3.select(r.viz.viz_svg).append("rect").classed("top_border",!0).classed("borders",!0).attr("fill",e).attr("width",r.viz.svg_dim.width).attr("height",r.viz.grey_border_width).attr("transform",function(){var t=0;return"translate("+t+",0)"}),d3.select(r.viz.viz_svg).append("rect").classed("bottom_border",!0).classed("borders",!0).attr("fill",e).attr("width",r.viz.svg_dim.width).attr("height",r.viz.grey_border_width).attr("transform",function(){var t=r.viz.svg_dim.height-r.viz.grey_border_width;return"translate(0,"+t+")"}),l(t),c(t),r.viz.do_zoom&&d3.select(r.viz.zoom_element).call(r.zoom_behavior),d3.select(r.viz.zoom_element).on("dblclick.zoom",null)}},function(t,e,r){"use strict";var n=r(2),o=r(91),a=r(92),i=r(93);t.exports=function(t,e){var r,s=t.network_data,l=[];r=e.append("g").attr("class","clust_container").attr("transform","translate("+t.viz.clust.margin.left+","+t.viz.clust.margin.top+")").append("g").attr("class","clust_group").classed("clust_group",!0),r.append("rect").classed("background",!0).classed("grey_background",!0).style("fill","#eee").style("opacity",.25).attr("width",t.viz.clust.dim.width).attr("height",t.viz.clust.dim.height),null===t.viz.ds?i(t,t.matrix.matrix,"all",t.viz.ds_level):i(t,t.matrix.ds_matrix[0],"all",t.viz.ds_level),"function"==typeof t.click_tile?d3.selectAll(t.root+" .tile").on("click",function(e){var r={};r.row=t.network_data.row_nodes[e.pos_y].name,r.col=t.network_data.col_nodes[e.pos_x].name,r.value=e.value,n.has(e,"value_up")&&(r.value_up=e.value_up),n.has(e,"value_dn")&&(r.value_dn=e.value_dn),n.has(e,"info")&&(r.info=e.info),t.click_tile(r),a(t,this)}):t.tile_click_hlight&&d3.selectAll(t.root+" .tile").on("click",function(){a(t,this)});var c={},u=0;return c.enter=0,o(t,c,u),{get_clust_group:function(){return r},get_matrix:function(){return l},get_nodes:function(t){return"row"===t?s.row_nodes:s.col_nodes}}}},function(t,e){"use strict";t.exports=function(t,e,r){}},function(t,e){"use strict";t.exports=function(t,e){d3.select(e).each(function(r){var n=r.pos_x,o=r.pos_y;if(d3.selectAll(t.root+" .click_hlight").remove(),n!=t.matrix.click_hlight_x||o!=t.matrix.click_hlight_y){t.matrix.click_hlight_x=n,t.matrix.click_hlight_y=o;var a=6,i=.85,s=a*t.viz.border_width.x,l=a*t.viz.border_width.y;d3.select(e.parentNode).append("rect").classed("click_hlight",!0).classed("top_hlight",!0).attr("width",t.viz.x_scale.rangeBand()).attr("height",l).attr("fill",t.matrix.hlight_color).attr("transform",function(){return"translate("+t.viz.x_scale(n)+",0)"}).attr("opacity",i),d3.select(e.parentNode).append("rect").classed("click_hlight",!0).classed("left_hlight",!0).attr("width",s).attr("height",t.viz.y_scale.rangeBand()-.99*l).attr("fill",t.matrix.hlight_color).attr("transform",function(){return"translate("+t.viz.x_scale(n)+","+.99*l+")"}).attr("opacity",i),d3.select(e.parentNode).append("rect").classed("click_hlight",!0).classed("right_hlight",!0).attr("width",s).attr("height",t.viz.y_scale.rangeBand()-.99*l).attr("fill",t.matrix.hlight_color).attr("transform",function(){var e=t.viz.x_scale(n)+t.viz.x_scale.rangeBand()-s;return"translate("+e+","+.99*l+")"}).attr("opacity",i),d3.select(e.parentNode).append("rect").classed("click_hlight",!0).classed("bottom_hlight",!0).attr("width",function(){return t.viz.x_scale.rangeBand()-1.98*s}).attr("height",l).attr("fill",t.matrix.hlight_color).attr("transform",function(){var e=t.viz.x_scale(n)+.99*s,r=t.viz.y_scale.rangeBand()-l;return"translate("+e+","+r+")"}).attr("opacity",i)}else t.matrix.click_hlight_x=-666,t.matrix.click_hlight_y=-666})}},function(t,e,r){"use strict";var n=r(94),o=r(100),a=r(68);t.exports=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,s=t.viz.y_scale,l=!0,c="row";if(i>=0&&(s=t.viz.ds[i].y_scale,l=!1,c="ds"+String(i)+"_row"),l)var u=o().attr("class",function(){var e=t.viz.root_tips.replace(".",""),r=e+" d3-tip "+e+"_tile_tip";return r}).style("display","none").direction("nw").offset([0,0]).html(function(e){var r,n=String(e.value.toFixed(3));if(t.keep_orig){var o=String(e.value_orig.toFixed(3));r="<p>"+e.row_name+" and "+e.col_name+"</p><p> normalized value: "+n+"</p><div> original value: "+o+"</div>"}else r="<p>"+e.row_name+" and "+e.col_name+"</p><div> value: "+n+"</div>";return r});else u=null;var d=[];"all"===r?d=e:_.each(e,function(t){a.contains(r,t.name)&&d.push(t)}),d3.select(t.root+" .clust_group").selectAll(".row").data(d,function(t){return t.name}).enter().append("g").classed(c,!0).attr("transform",function(t){return"translate(0,"+s(t.row_index)+")"}).each(function(e){n(t,e,u,this,i)}),t.viz.ds_level===-1&&null!=u&&d3.selectAll(t.root+" .row").call(u)}},function(t,e,r){"use strict";var n=r(95),o=r(96),a=r(97),i=r(98),s=r(99);t.exports=function(t,e,r,l){var c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,u=e.row_data,d=!0,f=t.viz.rect_height;c>=0&&(f=t.viz.ds[c].rect_height);var p;p=!!_.has(t.network_data.links[0],"value_orig");var h;h=p===!1?_.filter(u,function(t){return 0!==t.value}):u;var v=d3.select(l).selectAll("rect").data(h,function(t){return t.col_name}).enter().append("rect").attr("class","tile row_tile").attr("width",t.viz.rect_width).attr("height",f).style("fill",function(e){var r;return r="NaN"===e.value_orig?"#000000":e.value>0?t.matrix.tile_colors[0]:t.matrix.tile_colors[1]}).style("fill-opacity",function(e){var r;return r="NaN"===e.value_orig?.175:t.matrix.opacity_scale(Math.abs(e.value))}).attr("transform",function(e){return s(t,e)});if(d&&v.on("mouseover",function(){for(var e=arguments.length,n=Array(e),o=0;o<e;o++)n[o]=arguments[o];a(t,this,r,n)}).on("mouseout",function(){i(t,this,r)}),"updn"==t.matrix.tile_type){var m=_.filter(u,function(t){return 0!=t.value_up||0!=t.value_dn});d3.select(l).selectAll(".tile_up").data(m,function(t){return t.col_name}).enter().append("path").attr("class","tile_up").attr("d",function(){return n(t)}).attr("transform",function(e){s(t,e)}).style("fill",function(){return t.matrix.tile_colors[0]}).style("fill-opacity",function(e){var r=0;return Math.abs(e.value_dn)>0&&(r=t.matrix.opacity_scale(Math.abs(e.value_up))),r}).on("mouseover",function(){for(var e=arguments.length,n=Array(e),o=0;o<e;o++)n[o]=arguments[o];a(t,this,r,n)}).on("mouseout",function(){i(t,this,r)}),d3.select(l).selectAll(".tile_dn").data(m,function(t){return t.col_name}).enter().append("path").attr("class","tile_dn").attr("d",function(){return o(t)}).attr("transform",function(e){s(t,e)}).style("fill",function(){return t.matrix.tile_colors[1]}).style("fill-opacity",function(e){var r=0;return Math.abs(e.value_up)>0&&(r=t.matrix.opacity_scale(Math.abs(e.value_dn))),r}).on("mouseover",function(){for(var e=arguments.length,n=Array(e),o=0;o<e;o++)n[o]=arguments[o];a(t,this,r,n)}).on("mouseout",function(){i(t,this,r)}),v.each(function(t){Math.abs(t.value_up)>0&&Math.abs(t.value_dn)>0&&d3.select(this).remove()})}t.matrix.tile_title&&v.append("title").text(function(t){var e="value: "+t.value;return e})}},function(t,e){"use strict";t.exports=function(t){var e=0,r=t.viz.x_scale.rangeBand()-t.viz.border_width.x,n=0,o=t.viz.y_scale.rangeBand()-t.viz.border_width.y,a="M"+e+","+n+", L"+e+", "+o+", L"+r+",0 Z";return a}},function(t,e){"use strict";t.exports=function(t){var e=0,r=t.viz.x_scale.rangeBand()-t.viz.border_width.x,n=t.viz.y_scale.rangeBand()-t.viz.border_width.y,o=t.viz.y_scale.rangeBand()-t.viz.border_width.y,a="M"+e+", "+n+" , L"+r+", "+o+", L"+r+",0 Z";return a}},function(t,e){"use strict";t.exports=function(t,e,r,n){function o(){if(d3.select(e).classed("hovering")){var n=Number(d3.select(t.root+" .viz_svg").attr("is_zoom"));if(0===n&&t.matrix.show_tile_tooltips&&null!==r&&(d3.selectAll(t.viz.root_tips+"_tile_tip").style("display","block"),r.show.apply(e,s),null!=t.tile_tip_callback)){var o=s[0];t.tile_tip_callback(o)}}}var a,i=n[0],s=[].slice.call(n),l=1e3;d3.select(e).classed("hovering",!0),_.each(["row","col"],function(e){d3.selectAll(t.root+" ."+e+"_label_group text").style("font-weight",function(t){var r,n=i[e+"_name"].replace(/_/g," ")===t.name;return r=n?"bold":"normal"})}),s.push(e),clearTimeout(a),a=setTimeout(o,l,e)}},function(t,e){"use strict";t.exports=function(t,e,r){d3.select(e).classed("hovering",!1),d3.selectAll(t.viz.root_tips+"_tile_tip").style("display","none"),_.each(["row","col"],function(e){d3.selectAll(t.root+" ."+e+"_label_group text").style("font-weight","normal")}),null!=r&&r.hide()}},function(t,e){"use strict";t.exports=function(t,e){var r;r=e.pos_x in t.viz.x_scale.domain()?t.viz.x_scale(e.pos_x):0;var n=r+.5*t.viz.border_width.x,o=.5*t.viz.border_width.y;return"translate("+n+","+o+")"}},function(t,e){"use strict";t.exports=function(){function t(t){b=_(t),z=b.createSVGPoint(),document.body.appendChild(x)}function e(){return"n"}function r(){return[0,0]}function n(){return" "}function o(){var t=h();return{top:t.s.y,left:t.s.x}}function a(){var t=h();return{top:t.n.y-x.offsetHeight,left:t.n.x-x.offsetWidth/2}}function i(){var t=h();return{top:t.s.y,left:t.s.x-x.offsetWidth/2}}function s(){var t=h();return{top:t.e.y-x.offsetHeight/2,left:t.e.x}}function l(){var t=h();return{top:t.w.y-x.offsetHeight/2,left:t.w.x-x.offsetWidth}}function c(){var t=h();return{top:t.nw.y-x.offsetHeight,left:t.nw.x-x.offsetWidth}}function u(){var t=h();return{top:t.ne.y-x.offsetHeight,left:t.ne.x}}function d(){var t=h();return{top:t.sw.y,left:t.sw.x-x.offsetWidth}}function f(){var t=h();return{top:t.se.y,left:t.e.x}}function p(){var t=d3.select(document.createElement("div"));return t.style({position:"absolute",opacity:0,pointerEvents:"none",boxSizing:"border-box"}),t.node()}function _(t){return t=t.node(),"svg"==t.tagName.toLowerCase()?t:t.ownerSVGElement}function h(){var t=k||d3.event.target,e={},r=t.getScreenCTM(),n=t.getBBox(),o=n.width,a=n.height,i=n.x,s=n.y,l=document.documentElement.scrollTop||document.body.scrollTop,c=document.documentElement.scrollLeft||document.body.scrollLeft;return r.a=1,r.d=1,r.e=r.e+c,r.f=r.f+l,z.x=i,z.y=s,e.nw=z.matrixTransform(r),z.x=z.x+o,e.ne=z.matrixTransform(r),z.y=z.y+a,e.se=z.matrixTransform(r),z.x=z.x-o,e.sw=z.matrixTransform(r),z.y=z.y-a/2,e.w=z.matrixTransform(r),z.x=z.x+o,e.e=z.matrixTransform(r),z.x=z.x-o/2,z.y=z.y-a/2,e.n=z.matrixTransform(r),z.y=z.y+a,e.s=z.matrixTransform(r),e}function v(t){var e=d3.select(t).classed("hovering");e&&d3.selectAll(".d3-tip").transition().duration(250).style("opacity",0).style("display","none")}function m(t){var e={};return t&&"[object Function]"===e.toString.call(t)}var g=e,y=r,w=n,x=p(),b=null,z=null,k=null;t.show=function(){var e=Array.prototype.slice.call(arguments);e[e.length-1]instanceof SVGElement&&(k=e.pop());var r,n=w.apply(this,e),o=y.apply(this,e),a=g.apply(this,e),i=d3.select(x),s=0;for(i.html(n).style({opacity:1,"pointer-events":"all"}).style("z-index",99);s--;)i.classed(E[s],!1);if(r=A.get(a).apply(this),i.classed(a,!0).style({top:r.top+o[0]+"px",left:r.left+o[1]+"px"}),m(this)===!1){var l=d3.select(this).attr("class");l.indexOf("tile")>=0&&setTimeout(v,5e3,this)}return t},t.hide=function(){var e=d3.select(x);return e.style({opacity:0,"pointer-events":"none"}),t},t.attr=function(e){if(arguments.length<2&&"string"==typeof e)return d3.select(x).attr(e);var r=Array.prototype.slice.call(arguments);return d3.selection.prototype.attr.apply(d3.select(x),r),t},t.style=function(e){if(arguments.length<2&&"string"==typeof e)return d3.select(x).style(e);var r=Array.prototype.slice.call(arguments);return d3.selection.prototype.style.apply(d3.select(x),r),t},t.direction=function(e){return arguments.length?(g=null==e?e:d3.functor(e),t):g},t.offset=function(e){return arguments.length?(y=null==e?e:d3.functor(e),t):y},t.html=function(e){return arguments.length?(w=null==e?e:d3.functor(e),t):w};var A=d3.map({n:a,s:i,e:s,w:l,nw:c,ne:u,sw:d,se:f,south_custom:o}),E=A.keys();return t}},function(t,e,r){"use strict";var n=r(102);t.exports=function(t,e){var r,o=t.params;r=d3.select(o.viz.viz_svg+" .row_container").empty()?d3.select(o.viz.viz_svg).append("g").classed("row_container",!0).attr("transform","translate("+o.viz.norm_labels.margin.left+","+o.viz.clust.margin.top+")"):d3.select(o.viz.viz_svg).select(".row_container").attr("transform","translate("+o.viz.norm_labels.margin.left+","+o.viz.clust.margin.top+")"),d3.select(o.root+" .row_white_background").empty()&&r.append("rect").classed("row_white_background",!0).classed("white_bars",!0).attr("fill",o.viz.background_color).attr("width",o.viz.label_background.row).attr("height",30*o.viz.clust.dim.height+"px"),d3.select(o.root+" .row_label_container").empty()?r.append("g").classed("row_label_container",!0).attr("transform","translate("+o.viz.norm_labels.width.row+",0)").append("g").classed("row_label_zoom_container",!0):r.select(o.root+" .row_label_container").attr("transform","translate("+o.viz.norm_labels.width.row+",0)"),o.viz.ds_level===-1&&n(t,"all",e)}},function(t,e,r){"use strict";var n=r(2),o=r(103),a=r(104),i=r(130),s=r(68);t.exports=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,l=t.params,c=[];"all"===e?c=l.network_data.row_nodes:_.each(l.network_data.row_nodes,function(t){s.contains(e,t.name)&&c.push(t)});var u=d3.select(l.root+" .row_label_zoom_container").selectAll("g").data(c,function(t){return t.name}).enter().append("g").classed("row_label_group",!0),d=l.network_data.row_nodes_names;u.attr("transform",function(t){var e=_.indexOf(d,t.name);return"translate(0,"+l.viz.y_scale(e)+")"}),u.on("dblclick",function(e){var r="__data__",n=this[r].name;a(t,this,n),l.tile_click_hlight&&o(this,e.ini)}),i(l),u.insert("rect").style("opacity",0),u.append("text").attr("y",.5*l.viz.rect_height+.35*l.labels.default_fs_row).attr("text-anchor","end").style("font-size",l.labels.default_fs_row+"px").text(function(t){return n.normal_name(t)}).attr("pointer-events","none").style("opacity",0).style("cursor","default").transition().delay(r).duration(r).style("opacity",1),u.each(function(){var t=d3.select(this).select("text")[0][0].getBBox();d3.select(this).select("rect").attr("x",t.x).attr("y",0).attr("width",t.width).attr("height",l.viz.y_scale.rangeBand()).style("fill",function(){var t="yellow";return t}).style("opacity",function(t){var e=0;return 1===t.target&&(e=1),e})}),n.has(l.network_data.row_nodes[0],"value")&&u.append("rect").classed("row_bars",!0).attr("width",function(t){var e=0;return e=l.labels.bar_scale_row(Math.abs(t.value))}).attr("x",function(t){var e=0;return e=-l.labels.bar_scale_row(Math.abs(t.value))}).attr("height",l.viz.y_scale.rangeBand()).attr("fill",function(t){return t.value>0?l.matrix.bar_colors[0]:l.matrix.bar_colors[1]}).attr("opacity",.4)}},function(t,e){"use strict";t.exports=function(t,e,r){if(r!=t.click_hlight_row){var n=6,o=.85,a=n*t.viz.border_width.x;d3.selectAll(t.root+" .click_hlight").remove(),d3.select(e).append("rect").classed("click_hlight",!0).classed("row_top_hlight",!0).attr("width",t.viz.svg_dim.width).attr("height",a).attr("fill",t.matrix.hlight_color).attr("opacity",o),d3.select(e).append("rect").classed("click_hlight",!0).classed("row_bottom_hlight",!0).attr("width",t.viz.svg_dim.width).attr("height",a).attr("fill",t.matrix.hlight_color).attr("opacity",o).attr("transform",function(){var e=t.viz.y_scale.rangeBand()-a;return"translate(0,"+e+")"})}else d3.selectAll(t.root+" .click_hlight").remove(),t.click_hlight_row=-666}},function(t,e,r){"use strict";var n=r(105),o=r(106),a=r(88),i=r(129),s=r(79);t.exports=function(t,e,r){var l=t.params,c=i(l);if(1===c.zoom_y&&1===c.zoom_x){l.viz.inst_order.row="custom",o(t,"col"),d3.selectAll(l.root+" .toggle_col_order .btn").classed("active",!1),l.viz.run_trans=!0;var u=$.extend(!0,{},l.matrix.matrix),d=l.network_data.row_nodes,f=l.network_data.col_nodes,p=[];d.forEach(function(t){p.push(t.name)}),r=_.indexOf(p,r),p=[],f.forEach(function(t,e){p.push(u[r].row_data[e].value)});var h=d3.range(p.length).sort(function(t,e){return p[e]-p[t]});l.viz.x_scale.domain(h),l.matrix.orders.custom_row=h;var v;v=l.network_data.links.length>l.matrix.def_large_matrix?d3.select(l.root+" .viz_svg"):d3.select(l.root+" .viz_svg").transition().duration(2500);var m=l.network_data.col_nodes_names;v.select(".col_zoom_container").selectAll(".col_label_text").attr("transform",function(t){var e=_.indexOf(m,t.name);return"translate("+l.viz.x_scale(e)+")rotate(-90)"}),v.selectAll(".col_cat_group").attr("transform",function(t){var e=_.indexOf(m,t.name);return"translate("+l.viz.x_scale(e)+",0)"}),l.viz.ds_level===-1&&(v.selectAll(".tile").attr("transform",function(t){return"translate("+l.viz.x_scale(t.pos_x)+",0)"}),v.selectAll(".tile_up").attr("transform",function(t){return"translate("+l.viz.x_scale(t.pos_x)+",0)"}),v.selectAll(".tile_dn").attr("transform",function(t){return"translate("+l.viz.x_scale(t.pos_x)+",0)"})),d3.selectAll(l.root+" .row_label_group").select("rect").style("opacity",0),d3.select(e).select("rect").style("opacity",1),n(l),l.network_data.links.forEach(function(t){t.x=l.viz.x_scale(t.target),t.y=l.viz.y_scale(t.source)}),l.zoom_info=a(),setTimeout(function(){l.viz.run_trans=!1},2500),l.viz.ds_num_levels>0&&l.viz.ds_level>=0&&s(l)}}},function(t,e){"use strict";t.exports=function(t){var e=6,r=e*t.viz.border_width.x,n=e*t.viz.border_width.y;d3.select(t.root+" .top_hlight").attr("width",t.viz.x_scale.rangeBand()).attr("height",n).transition().duration(2500).attr("transform",function(){return"translate("+t.viz.x_scale(t.matrix.click_hlight_x)+",0)"}),d3.select(t.root+" .left_hlight").attr("width",r).attr("height",t.viz.y_scale.rangeBand()-.99*n).transition().duration(2500).attr("transform",function(){return"translate("+t.viz.x_scale(t.matrix.click_hlight_x)+","+.99*n+")"}),d3.select(t.root+" .right_hlight").attr("width",r).attr("height",t.viz.y_scale.rangeBand()-.99*n).transition().duration(2500).attr("transform",function(){var e=t.viz.x_scale(t.matrix.click_hlight_x)+t.viz.x_scale.rangeBand()-r;return"translate("+e+","+.99*n+")"}),d3.select(t.root+" .bottom_hlight").attr("width",function(){return t.viz.x_scale.rangeBand()-1.98*r}).attr("height",n).transition().duration(2500).attr("transform",function(){var e=t.viz.x_scale(t.matrix.click_hlight_x)+.99*r,o=t.viz.y_scale.rangeBand()-n;return"translate("+e+","+o+")"})}},function(t,e,r){"use strict";var n=r(107);t.exports=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1500,o=t.params;"row"===e&&"clust"===o.viz.inst_order.col&&setTimeout(n,r,t,"row",!0),"col"===e&&"clust"===o.viz.inst_order.row&&setTimeout(n,r,t,"col",!0),"clust"!=o.viz.inst_order.row&&o.viz.dendro_filter.col===!1&&(d3.selectAll(o.root+" .col_dendro_group").style("opacity",0).on("mouseover",null).on("mouseout",null),d3.select(o.root+" .col_slider_group").style("opacity",0),d3.selectAll(o.root+" .col_dendro_crop_buttons").style("opacity",0).on("mouseover",null).on("mouseout",null)),"clust"!=o.viz.inst_order.col&&o.viz.dendro_filter.row===!1&&(d3.selectAll(o.root+" .row_dendro_group").style("opacity",0).on("mouseover",null).on("mouseout",null).on("click",null),d3.select(o.root+" .row_slider_group").style("opacity",0),d3.selectAll(o.root+" .row_dendro_crop_buttons").style("opacity",0).on("mouseover",null).on("mouseout",null))}},function(t,e,r){"use strict";var n=r(108),o=r(109),a=r(110),i=r(100),s=r(112),l=r(115);t.exports=function(t,e){function r(t,r,n){if(d3.select(t).classed("hovering")){var o=u.viz.root_tips+"_"+e+"_dendro_tip";d3.select(o+" .cat_graph").empty()&&null!==u.viz.cat_info[e]&&l(u,e,r,f[n],o,!0),d3.selectAll(u.viz.root_tips+"_"+e+"_dendro_tip").style("opacity",1)}}var c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],u=t.params;"both"===e&&(e="row");var d;d="row"===e?"col":"row","clust"===u.viz.inst_order[d]&&d3.select(u.root+" ."+e+"_slider_group").style("opacity",1);var f;u.viz.show_dendrogram&&(f="row"===e?n(u):o(u),d3.select(t.params.root+" ."+e+"_dendro_crop_buttons").empty()===!1&&s(t,e));var p=u.viz.dendro_opacity,_=500;d3.selectAll(t.params.viz.root_tips+"_"+e+"_dendro_tip").remove();var h;d3.selectAll(u.root+" ."+e+"_dendro_group").empty()?h=!1:(h=!0,d3.selectAll(u.root+" ."+e+"_dendro_group").remove());var v=0,m=-5,g=i().attr("class",function(){var t=u.viz.root_tips.replace(".",""),r=t+" d3-tip "+t+"_"+e+"_dendro_tip";return r}).direction("nw").offset([v,m]).style("display","none").style("opacity",0);g.html(function(){var t='<div class="cluster_info_container"></div>Click for cluster information <br>and additional options.';return t}),c&&(h=!1);var y,w,x,b,z,k,A=d3.select(u.root+" ."+e+"_dendro_container").selectAll("path").data(f,function(t){return t.name}).enter().append("path").style("opacity",0).attr("class",e+"_dendro_group").style("fill","black");A.attr("d",function(t){"row"===e?(y=0,w=t.pos_top,x=30,b=t.pos_mid,z=0,k=t.pos_bot):(y=t.pos_top,w=0,x=t.pos_mid,b=30,z=t.pos_bot,k=0);var r="M"+y+","+w+", L"+x+", "+b+", L"+z+","+k+" Z";return r}),A.on("mouseover",function(n,o){d3.select(this).classed("hovering",!0),null!=t.params.dendro_callback&&t.params.dendro_callback(this),d3.select(u.viz.root_tips+"_"+e+"_dendro_tip").style("display","block"),a(u,this,n,e),g.show(n),d3.select(u.viz.root_tips+"_"+e+"_dendro_tip").style("opacity",0),setTimeout(r,_,this,n,o)}).on("mouseout",function(){"clust"===u.viz.inst_order[d]&&d3.select(this).style("opacity",p),d3.selectAll(u.root+" .dendro_shadow").remove(),d3.select(this).classed("hovering",!1),g.hide(this)}).on("click",function(r,n){$(u.root+" .dendro_info").modal("toggle");var o=r.all_names.join(", ");d3.select(u.root+" .dendro_info input").attr("value",o);var a=u.root+" .dendro_info";d3.selectAll(".dendro_info .cluster_info_container .cat_graph").remove(),null!==u.viz.cat_info[e]&&l(u,e,r,f[n],a),null!=t.params.dendro_click_callback&&t.params.dendro_click_callback(this)}).call(g);var E;E="clust"===u.viz.inst_order[d]?p:0,h?d3.select(u.root+" ."+e+"_dendro_container").selectAll("path").transition().delay(1e3).duration(1e3).style("opacity",E):d3.select(u.root+" ."+e+"_dendro_container").selectAll("path").style("opacity",E)}},function(t,e){"use strict";t.exports=function(t){var e={},r=t.group_level.row,n=t.network_data.row_nodes,o=t.network_data.row_nodes_names;_.each(n,function(n){var a=n.group[r],i=_.indexOf(o,n.name),s=t.viz.y_scale(i),l=s+t.viz.y_scale.rangeBand();_.has(e,a)===!1&&(e[a]={},e[a].name_top=n.name,e[a].name_bot=n.name,e[a].pos_top=s,e[a].pos_bot=l,e[a].pos_mid=(s+l)/2,e[a].name=a,e[a].all_names=[],e[a].inst_rc="row"),e[a].all_names.push(n.name),s<e[a].pos_top&&(e[a].name_top=n.name,e[a].pos_top=s,e[a].pos_mid=(s+e[a].pos_bot)/2),l>e[a].pos_bot&&(e[a].name_bot=n.name,e[a].pos_bot=l,e[a].pos_mid=(e[a].pos_top+l)/2)});var a=[];return _.each(e,function(t){a.push(t)}),a}},function(t,e){"use strict";t.exports=function(t){var e={},r=t.group_level.col,n=t.network_data.col_nodes,o=t.network_data.col_nodes_names;_.each(n,function(n){var a=n.group[r],i=_.indexOf(o,n.name),s=t.viz.x_scale(i),l=s+t.viz.x_scale.rangeBand();_.has(e,a)===!1&&(e[a]={},e[a].name_top=n.name,e[a].name_bot=n.name,e[a].pos_top=s,e[a].pos_bot=l,e[a].pos_mid=(s+l)/2,e[a].name=a,e[a].all_names=[],e[a].inst_rc="col"),e[a].all_names.push(n.name),s<e[a].pos_top&&(e[a].name_top=n.name,e[a].pos_top=s,e[a].pos_mid=(s+e[a].pos_bot)/2),l>e[a].pos_bot&&(e[a].name_bot=n.name,e[a].pos_bot=l,e[a].pos_mid=(e[a].pos_top+l)/2)});var a=[];return _.each(e,function(t){a.push(t)}),a}},function(t,e,r){"use strict";var n=r(111);t.exports=function(t,e,r,o){function a(){d3.select(e).classed("hovering")&&t.is_slider_drag===!1&&(d3.select(e).style("opacity",.7),d3.select(t.viz.viz_svg).classed("running_update")===!1&&i())}function i(){"row"===o?"clust"===t.viz.inst_order.col&&n(t,e,o,r):"col"===o?"clust"===t.viz.inst_order.row&&n(t,e,o,r):"both"===o&&("clust"===t.viz.inst_order.col&&n(t,e,"row",r),"clust"===t.viz.inst_order.row&&n(t,e,"col",r))}d3.selectAll(t.root+" ."+o+"_dendro_crop_buttons")[0].length>1?setTimeout(a,500):d3.selectAll(t.root+" .dendro_shadow").remove()}},function(t,e){"use strict";t.exports=function(t,e,r,n){var o,a=.2;d3.selectAll(t.root+" .dendro_shadow").remove(),"row"==r?(d3.select(t.root+" .clust_group").append("rect").attr("width",t.viz.clust.dim.width+"px").attr("height",n.pos_top+"px").attr("fill","black").classed("dendro_shadow",!0).attr("opacity",a),o=t.viz.clust.dim.height-n.pos_bot,d3.select(t.root+" .clust_group").append("rect").attr("width",t.viz.clust.dim.width+"px").attr("height",o+"px").attr("transform","translate(0,"+n.pos_bot+")").attr("fill","black").classed("dendro_shadow",!0).attr("opacity",a)):"col"===r&&(d3.select(t.root+" .clust_group").append("rect").attr("width",n.pos_top+"px").attr("height",t.viz.clust.dim.height+"px").attr("fill","black").classed("dendro_shadow",!0).attr("opacity",a),o=t.viz.clust.dim.width-n.pos_bot,d3.select(t.root+" .clust_group").append("rect").attr("width",o+"px").attr("height",t.viz.clust.dim.height+"px").attr("transform","translate("+n.pos_bot+",0)").attr("fill","black").classed("dendro_shadow",!0).attr("opacity",a))}},function(t,e,r){"use strict";var n=r(108),o=r(109),a=r(100),i=r(110),s=r(113),l=r(114);t.exports=function(t,e){function r(t){d3.select(t).classed("hovering")&&d3.selectAll(d.viz.root_tips+"_"+e+"_dendro_crop_tip").style("opacity",1).style("display","block")}var c,u,d=t.params,f=.6*d.viz.dendro_opacity;"row"===e?(c=n(d),u="col"):(c=o(d),u="row");var p=5,_=-5,h=a().attr("class",function(){var t=d.viz.root_tips.replace(".",""),r=t+" d3-tip "+t+"_"+e+"_dendro_crop_tip";return r}).direction("nw").style("display","none").offset([p,_]),v=500;d3.selectAll(d.viz.root_tips+"_"+e+"_dendro_crop_tip").remove(),d3.selectAll(d.root+" ."+e+"_dendro_crop_buttons").remove();var m,g,y,w,x,b,z,k,A,E,N=45,M=.25,S=e+"_dendro_crop_buttons";d3.select(t.params.root+" ."+e+"_dendro_icons_group").classed("ran_filter")===!1?(m=d3.select(d.root+" ."+e+"_dendro_icons_group").selectAll("path").data(c,function(t){return t.name}).enter().append("path").classed(S,!0).attr("d",function(t){k=10,A=10;var r=t.pos_bot-t.pos_top;"row"===e?(r<N&&(k=r*M),g=A,y=-k,w=0,x=0,b=A,z=k,E=k):(r<N&&(A=r*M),g=-A,y=k,w=0,x=0,b=A,z=k,E=A);var n="__data__";d3.select(this)[0][0][n].tri_dim=E;var o="M"+g+","+y+", L"+w+", "+x+", L"+b+","+z+" Z";return o}),h.html(function(){var t="Click to crop cluster";return t})):(m=d3.select(d.root+" ."+e+"_dendro_icons_group").selectAll("path").data(c,function(t){return t.name}).enter().append("path").classed(S,!0).attr("d",function(t){k=10,A=12;var r=t.pos_bot-t.pos_top;"row"===e?(r<N&&(k=r*M),g=0,y=-k,w=A,x=0,b=0,z=k):(r<N&&(A=r*M),g=-A,y=0,w=0,x=k,b=A,z=0);var n="__data__";d3.select(this)[0][0][n].tri_dim=10;var o="M"+g+","+y+", L"+w+", "+x+", L"+b+","+z+" Z";return o}),h.html(function(){var t="Click to undo crop";return t})),m.style("cursor","pointer").style("opacity",function(){var t;return t=f}).attr("transform",function(t){var r,n,o;return"row"===e?(n=d.viz.uni_margin,o=t.pos_mid):(n=t.pos_mid,o=d.viz.uni_margin),r="translate("+n+","+o+")";
}).on("mouseover",function(t){d3.select(this).classed("hovering",!0),h.show(t),i(d,this,t,e),d3.selectAll(d.viz.root_tips+"_"+e+"_dendro_crop_tip").style("opacity",0).style("display","block"),setTimeout(r,v,this)}).on("mouseout",function(){d3.select(this).classed("hovering",!1),d3.selectAll(d.root+" .dendro_shadow").remove(),d3.select(this).style("opacity",f),h.hide(this)}).on("click",function(r){d3.select(this).style("opacity",.9).transition().duration(1e3).style("opacity",0),d3.selectAll(d.root+" .dendro_shadow").remove(),t.params.dendro_filter.row===!1&&t.params.dendro_filter.col===!1&&t.params.cat_filter.row===!1&&t.params.cat_filter.col===!1?(d3.select(t.params.root+" ."+e+"_dendro_icons_group").attr("transform","translate(0,0), scale(1,1)").classed("ran_filter",!0),d3.select(t.params.root+" ."+u+"_dendro_icons_group").attr("transform","translate(0,0), scale(1,1)"),d3.select(t.params.root+" ."+e+"_slider_group").style("display","none"),d3.select(t.params.root+" ."+u+"_dendro_icons_container").style("display","none"),d3.select(t.params.root+" .crop_button").style("opacity",.2)):(d3.select(t.params.root+" ."+e+"_dendro_icons_group").attr("transform","translate(0,0), scale(1,1)").classed("ran_filter",!1),d3.select(t.params.root+" ."+u+"_dendro_icons_group").attr("transform","translate(0,0), scale(1,1)"),"clust"===d.viz.inst_order[u]&&d3.select(t.params.root+" ."+e+"_slider_group").style("display","block"),d3.select(t.params.root+" ."+u+"_dendro_icons_container").style("display","block"),d3.select(t.params.root+" .crop_button").style("opacity",1)),s(t,r,e)}).call(h),"clust"!=d.viz.inst_order[u]&&d3.select(d.root+" ."+e+"_dendro_icons_group").selectAll("path").style("display","none"),l(d,d.zoom_info,e)}},function(t,e){"use strict";t.exports=function(t,e,r){var n={};if(t.params.dendro_filter.row===!1&&t.params.dendro_filter.col===!1&&t.params.cat_filter.row===!1&&t.params.cat_filter.col===!1){d3.select(t.params.root+" ."+r+"_slider_group").style("opacity",.35).style("pointer-events","none"),n[r]=e.all_names;var o=t.params.network_data[r+"_nodes_names"],a=t.params.network_data.row_nodes,i=t.params.network_data.col_nodes;t.filter_viz_using_names(n),t.params.inst_nodes.row_nodes=a,t.params.inst_nodes.col_nodes=i,d3.selectAll(t.params.root+" .dendro_shadow").transition().duration(1e3).style("opacity",0).remove(),t.params.dendro_filter[r]=o}else n[r]=t.params.dendro_filter[r],t.filter_viz_using_names(n),t.params.dendro_filter[r]=!1}},function(t,e){"use strict";t.exports=function(t,e,r){function n(t,e){var r,n=10;if(e*t<n)r=1;else{var o=n/e;r=t/o}return r}"row"===r?d3.select(t.root+" .row_dendro_icons_group").selectAll("path").attr("transform",function(r){var o=t.viz.uni_margin,a=r.pos_mid,i=e.zoom_y,s=d3.select(this).data()[0].tri_dim,l=n(i,s);return"translate("+o+","+a+") scale(1, "+1/l+")"}):d3.select(t.root+" .col_dendro_icons_group").selectAll("path").attr("transform",function(r){var o=r.pos_mid,a=t.viz.uni_margin,i=e.zoom_x,s=d3.select(this).data()[0].tri_dim,l=n(i,s);return"translate("+o+","+a+") scale("+1/l+", 1)"})}},function(t,e,r){"use strict";var n=r(116);t.exports=function(t,e,r,o,a){var i=arguments.length>5&&void 0!==arguments[5]&&arguments[5];"both"===e&&(e="row");var s=n(t,r,e);if(s.length>0){var l=d3.select(a+" .cluster_info_container"),c=": ",u="<p>",d=370,f=23,p=20,h=25,v=180,m=27,g=177,y=4,w=5,x=150,b=6,z=!1;null!=s[0].bar_data[0][w]&&(d+=100,g=g+x-47,z=!0);var k=o.all_names.length,A=y;if(z){A=w;var E=s[0].bar_data;k=0,_.each(E,function(t){k+=t[w]})}var N=3,M=25,S=20;_.each(s.slice(0,N),function(t){var e=t.bar_data.length;e>M&&(e=M),S+=m*(e+1)}),i&&l.append("text").text("Cluster Information");var O=l.append("div").style("margin-top","5px").classed("cat_graph",!0).append("svg").style("height",S+"px").style("width",d+"px");O.append("rect").classed("cat_background",!0).attr("height",S+"px").attr("width",d+"px").attr("fill","white").attr("opacity",1);var T=m;if(s=s.slice(0,N),_.each(s,function(e){var r=e.bar_data[0][A],n=d3.scale.linear().domain([0,1e5]).range([20,30]);e.bar_data=e.bar_data.slice(0,M),l.style("margin-bottom","5px");var o=O.append("g").classed("cat_graph_group",!0).attr("transform","translate(10, "+T+")");T+=m*(e.bar_data.length+1);var a=e.type_name;a.length>=h&&(a=a.slice(0,h)+".."),o.append("text").classed("cat_graph_title",!0).text(a).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",800);var i=n(r);o.append("text").text("Count").attr("transform",function(){var t=v+i,e="translate("+t+", 0)";return e}),o.append("text").text("Pct").attr("transform",function(){var t=v+i+60,e="translate("+t+", 0)";return e}),o.append("text").text("P-val").attr("transform",function(){var t=v+i+115,e="translate("+t+", 0)";return e}),z&&o.append("text").text("Clusters").attr("transform",function(){var t=v+x,e="translate("+t+", 0)";return e});var s=4;o.append("line").attr("x1",0).attr("x2",v).attr("y1",s).attr("y2",s).attr("stroke","blue").attr("stroke-width",1).attr("opacity",1);var d=o.append("g").classed("cat_bar_container",!0).attr("transform","translate(0, 10)"),_=d.selectAll("g").data(e.bar_data).enter().append("g").attr("transform",function(t,e){var r=e*f;return"translate(0,"+r+")"}),g=d3.scale.linear().domain([0,r]).range([0,v]);_.append("rect").attr("height",p+"px").attr("width",function(t){var e=g(t[A]);return e+"px"}).attr("fill",function(t){return t[3]}).attr("opacity",t.viz.cat_colors.opacity).attr("stroke","grey").attr("stroke-width","0.5px"),_.append("text").classed("bar_labels",!0).text(function(t){var e=t[1];return e.indexOf(c)>0&&(e=e.split(c)[1]),e.indexOf(u)>0&&(e=e.split(u)[0]),e.length>=h&&(e=e.slice(0,h)+".."),e}).attr("transform",function(){return"translate(5, "+.75*p+")"}).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-weight",400).attr("text-anchor","right");var w=35;_.append("text").classed("count_labels",!0).text(function(t){var e=t[A];return e=e.toLocaleString(),String(e)}).attr("transform",function(){var t=v+i+w,e=.75*p;return"translate("+t+", "+e+")"}).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-weight",400).attr("text-anchor","end"),_.append("text").classed("count_labels",!0).text(function(t){var e=t[A]/k*100;return e=Math.round(10*e)/10,e=e.toLocaleString(),String(e)}).attr("transform",function(){var t=v+i+w+47,e=.75*p;return"translate("+t+", "+e+")"}).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-weight",400).attr("text-anchor","end"),_.append("text").classed("count_labels",!0).text(function(t){var e=t[b];return e<.001?(e=parseFloat(e.toPrecision(3)),e=e.toExponential()):e=parseFloat(e.toPrecision(2)),e}).attr("transform",function(){var t=v+i+w+112,e=.75*p;return"translate("+t+", "+e+")"}).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-weight",400).attr("text-anchor","end"),z&&_.append("text").classed("count_labels",!0).text(function(t){return String(t[y].toLocaleString())}).attr("transform",function(){var t=v+w+x+20,e=.75*p;return"translate("+t+", "+e+")"}).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-weight",400).attr("text-anchor","end")}),i){var C=d3.select(a),B=C.style("top").split(".px")[0],F=C.style("left").split(".px")[0],I=0,j=0;"row"===e?(I=0,j=g):(I=S+32,j=30),C.style("top",function(){var t=String(parseInt(B,10)-I)+"px";return t}).style("left",function(){var t=String(parseInt(F,10)-j)+"px";return t})}}}},function(t,e,r){"use strict";var n=r(117);t.exports=function(t,e,r){"both"===r&&(r="row");var o,a=e.all_names,i=[],s=t.network_data[r+"_nodes"],l=null,c=!1;_.each(s,function(t){o=t.name,a.indexOf(o)>=0&&i.push(t)});var u=[];if(null!==t.viz.cat_info[r]){for(var d,f,p,h=t.viz.cat_info[r],v=_.keys(h),m=[],g=[],y=0;y<v.length;y++)p="cat-"+String(y),"cat_strings"===t.viz.cat_info[r][p].type?(d=t.viz.cat_names[r][p],g.push(d),m.push(p)):"number in clust"===t.viz.cat_names[r][p]&&(l=p,c=!0);var w,x={},b={},z=10,k=4;c&&(k=5);var A;if(A=d===p,g.length>0){var E,N=a.length;_.each(m,function(e){if(f=e.split("-")[1],d=g[f],A)if(e.indexOf("-")>=0){var o=parseInt(e.split("-")[1],z)+1;d="Category "+String(o)}else d="Category";x[d]={},_.each(i,function(t){E=t[e],E.indexOf(": ")>=0&&(E=E.split(": ")[1]),E in x[d]?(x[d][E].num_nodes=x[d][E].num_nodes+1,null!=l&&(x[d][E].num_nodes_ds=x[d][E].num_nodes_ds+parseInt(t[l].split(": ")[1],z))):(x[d][E]={},x[d][E].num_nodes=1,null!=l&&(x[d][E].num_nodes_ds=parseInt(t[l].split(": ")[1],z)))}),b={},b.type_name=d,b.num_in_clust=N,w=[];var a,s,c=x[d];for(var p in c){var h=t.viz.cat_info[r][e].cat_hist[p],v=t.network_data[r+"_nodes"].length,m=h/v;s=A?p:d+": "+p;var y=c[p].num_nodes,M=y,S=n(M,N,m);if(_.has(c[p],"num_nodes_ds"))var O=c[p].num_nodes_ds;else O=null;a=t.viz.cat_colors[r][e][s],w.push([e,s,c[p],a,y,O,S])}w.sort(function(t,e){return e[k]-t[k]}),b.bar_data=w,u.push(b)})}}return u}},function(t,e,r){"use strict";var n=r(118),o=r(12),a=o.create();a.import(r(119)),t.exports=function(t,e,r){function o(t,e,r){var n=c(e)/(c(t)*c(e-t));return r=n*(Math.pow(r,t)*Math.pow(1-r,e-t))}function i(t,e,r){for(var n,a,i=0,s=t;s<e+1;s++)n=s,a=o(n,e,r),i+=a;return i}function s(t,e,r){for(var o=e*r,a=Math.sqrt(e*r*(1-r)),i=(t-o)/a,s=n.z,c=n.p,u=-1,d=!1,f=0;f<s.length;f++){var p=s[f];i<p&&d===!1&&(u=f,d=!0)}return u===-1&&(u=s.length-1),l=c[u]}var l,c=a.factorial;return l=i(t,e,r),isNaN(l)&&(l=s(t,e,r)),l}},function(t,e){"use strict";t.exports={p:[.5,.4800611941616275,.460172162722971,.4403823076297575,.42074029056089696,.4012936743170763,.3820885778110473,.3631693488243809,.3445782583896758,.32635522028791997,.3085375387259869,.29115968678834636,.27425311775007355,.2578461108058647,.24196365222307303,.2266273523768682,.2118553985833967,.19766254312269238,.18406012534675947,.17105612630848183,.15865525393145707,.1468590563758959,.13566606094638267,.12507193563715024,.11506967022170828,.10564977366685535,.09680048458561036,.08850799143740196,.08075665923377107,.0735292596096483,.06680720126885807,.06057075800205901,.054799291699557974,.049471468033648075,.044565462758543006,.040059156863817086,.03593031911292579,.03215677479561371,.028716559816001783,.02558805952163861,.022750131948179195,.020182215405704383,.017864420562816542,.0157776073910905,.013903447513498595,.012224472655044696,.010724110021675795,.009386705534838566,.008197535924596114,.007142810735271415,.006209665325776132,.005386145954066684,.004661188023718747,.004024588542758303,.0034669738030406647,.002979763235054555,.002555130330427929,.0021859614549132405,.0018658133003840339,.0015888696473648667,.0013498980316300933,.0011442068310226977,.0009676032132183563,.0008163523128285604,.0006871379379158471,.0005770250423907659,.00048342414238377663,.0004040578018640207,.0003369292656768799,.00028029327681617744,.00023262907903552502,.00019261557563563279,.00015910859015753364,.00013112015442048433,.00010779973347738823,8841728520080377e-20,7234804392511979e-20,59058912418922374e-21,48096344017602614e-21,39075596597787456e-21,3167124183311986e-20,2560881647404149e-20,20657506912546683e-21,16623763729652213e-21,1334574901590631e-20,10688525774934402e-21,8539905470991794e-21,6806876599334031e-21,5412543907703841e-21,4293514469971858e-21,33976731247300535e-22,26822957796388472e-22,2112454702502842e-21,16596751443714555e-22,13008074539172771e-22,10170832425687032e-22,7.933281519755892e-7,6.173073720091925e-7,4.791832765903185e-7,3.710674079633327e-7,2.8665157187919333e-7,2.2090503226954194e-7,1.6982674071475937e-7,1.3024322953320117e-7,9.96442631693347e-8,7.6049605164887e-8,5.790134039964557e-8,4.397711594005869e-8,3.332044848542845e-8,2.518491005446105e-8,1.898956246588768e-8,1.4283479893922661e-8,1.0717590258310852e-8,8.022391850663474e-9,5.99037140106353e-9,4.462172453901611e-9,3.3157459783261365e-9,2.4578650618080152e-9,1.8175078630994235e-9,1.3407124440918662e-9,9.865876450376946e-10,7.242291705137605e-10,5.303423262948808e-10,3.8741473466756636e-10,2.823158037043268e-10,2.0522634252189396e-10,1.4882282217622966e-10,1.0765746385121517e-10,7.768847581709776e-11,5.592507575942645e-11,4.016000583859088e-11,2.876854173604311e-11,2.055788909399508e-11,1.4654650977302715e-11,1.0420976987965154e-11,7.392257778017794e-12,5.230957544144525e-12,3.692499427235561e-12,2.600126965638173e-12,1.826431061976961e-12,1.279812543885835e-12,8.945889558769844e-13,6.23784446333152e-13,4.3388950271780343e-13,3.010627981117422e-13,2.0838581586720548e-13,1.4388386381575764e-13,9.910342749547509e-14,6.809224890620016e-14,4.6670115887190274e-14,3.1908916729108844e-14,2.1762912097085575e-14,1.4806537490047908e-14,1.0048965656526223e-14,6.803311540773901e-15,4.594627435778562e-15,3.095358771958668e-15,2.0801863521393674e-15,1.394517146659261e-15,9.325575771681205e-16,6.22096057427174e-16,4.139701816273122e-16,2.747959392398221e-16,1.8196213635266084e-16,1.2019351542735647e-16,7.919726314642476e-17,5.2055697448902465e-17,3.413148326458146e-17,2.232393197288031e-17,1.456514112590909e-17,9.47953482220325e-18,6.154425590850395e-18,3.985804962848151e-18,2.5749715380118873e-18,1.6594208699647519e-18,1.0667637375474856e-18,6.840807685935497e-19,4.375964799309017e-19,2.7923343749396233e-19,1.7774117841455144e-19,1.1285884059538324e-19,7.148417011269684e-20,4.516591491435403e-20,2.846677408460209e-20,1.7897488120140146e-20,1.1224633591327901e-20,7.022284240441541e-21,4.38238629906646e-21,2.7281535713460872e-21,1.6941535024881097e-21,1.0494515075362604e-21,6.484814453077208e-22,3.9972212057261192e-22,2.4577864834723153e-22,1.507493168810159e-22,9.223413524939353e-23,5.629282311376514e-23,3.4271987941135974e-23,2.0813752194932085e-23,1.2609160670206559e-23],z:[0,.05,.1,.15000000000000002,.2,.25,.30000000000000004,.35000000000000003,.4,.45,.5,.55,.6000000000000001,.65,.7000000000000001,.75,.8,.8500000000000001,.9,.9500000000000001,1,1.05,1.1,1.1500000000000001,1.2000000000000002,1.25,1.3,1.35,1.4000000000000001,1.4500000000000002,1.5,1.55,1.6,1.6500000000000001,1.7000000000000002,1.75,1.8,1.85,1.9000000000000001,1.9500000000000002,2,2.0500000000000003,2.1,2.15,2.2,2.25,2.3000000000000003,2.35,2.4000000000000004,2.45,2.5,2.5500000000000003,2.6,2.6500000000000004,2.7,2.75,2.8000000000000003,2.85,2.9000000000000004,2.95,3,3.0500000000000003,3.1,3.1500000000000004,3.2,3.25,3.3000000000000003,3.35,3.4000000000000004,3.45,3.5,3.5500000000000003,3.6,3.6500000000000004,3.7,3.75,3.8000000000000003,3.85,3.9000000000000004,3.95,4,4.05,4.1000000000000005,4.15,4.2,4.25,4.3,4.3500000000000005,4.4,4.45,4.5,4.55,4.6000000000000005,4.65,4.7,4.75,4.800000000000001,4.8500000000000005,4.9,4.95,5,5.050000000000001,5.1000000000000005,5.15,5.2,5.25,5.300000000000001,5.3500000000000005,5.4,5.45,5.5,5.550000000000001,5.6000000000000005,5.65,5.7,5.75,5.800000000000001,5.8500000000000005,5.9,5.95,6,6.050000000000001,6.1000000000000005,6.15,6.2,6.25,6.300000000000001,6.3500000000000005,6.4,6.45,6.5,6.550000000000001,6.6000000000000005,6.65,6.7,6.75,6.800000000000001,6.8500000000000005,6.9,6.95,7,7.050000000000001,7.1000000000000005,7.15,7.2,7.25,7.300000000000001,7.3500000000000005,7.4,7.45,7.5,7.550000000000001,7.6000000000000005,7.65,7.7,7.75,7.800000000000001,7.8500000000000005,7.9,7.95,8,8.05,8.1,8.15,8.200000000000001,8.25,8.3,8.35,8.4,8.450000000000001,8.5,8.55,8.6,8.65,8.700000000000001,8.75,8.8,8.85,8.9,8.950000000000001,9,9.05,9.1,9.15,9.200000000000001,9.25,9.3,9.35,9.4,9.450000000000001,9.5,9.55,9.600000000000001,9.65,9.700000000000001,9.75,9.8,9.850000000000001,9.9,9.950000000000001]}},function(t,e,r){"use strict";function n(t,e,n,a){var i=n(r(121)),s=r(45),l=a("factorial",{number:function(t){if(t<0)throw new Error("Value must be non-negative");return i(t+1)},BigNumber:function(t){if(t.isNegative())throw new Error("Value must be non-negative");return i(t.plus(1))},"Array | Matrix":function(t){return o(t,l)}});return l.toTex={1:"\\left(${args[0]}\\right)"+s.operators.factorial},l}var o=r(120);e.name="factorial",e.factory=n},function(t,e){"use strict";t.exports=function t(e,r,n){return e&&"function"==typeof e.map?e.map(function(e){return t(e,r,n)}):r(e)}},function(t,e,r){"use strict";function n(t,e,n,l){function c(r){if(r.isZero())return new t.BigNumber(1);for(var n=e.precision+(0|Math.log(r.toNumber())),o=t.BigNumber.clone({precision:n}),a=new o(r),i=r.toNumber()-1;i>1;)a=a.times(i),i--;return new t.BigNumber(a.toPrecision(t.BigNumber.precision))}var u=n(r(122)),d=n(r(125)),f=l("gamma",{number:function(t){var e,r;if(a(t)){if(t<=0)return isFinite(t)?1/0:NaN;if(t>171)return 1/0;for(var n=t-2,o=t-1;n>1;)o*=n,n--;return 0==o&&(o=1),o}if(t<.5)return Math.PI/(Math.sin(Math.PI*t)*f(1-t));if(t>=171.35)return 1/0;if(t>85){var l=t*t,c=l*t,u=c*t,d=u*t;return Math.sqrt(2*Math.PI/t)*Math.pow(t/Math.E,t)*(1+1/(12*t)+1/(288*l)-139/(51840*c)-571/(2488320*u)+163879/(209018880*d)+5246819/(75246796800*d*t))}--t,r=s[0];for(var p=1;p<s.length;++p)r+=s[p]/(t+p);return e=t+i+.5,Math.sqrt(2*Math.PI)*Math.pow(e,t+.5)*Math.exp(-e)*r},Complex:function(e){var r,n;if(0==e.im)return f(e.re);e=new t.Complex(e.re-1,e.im),n=new t.Complex(s[0],0);for(var o=1;o<s.length;++o){var a=e.re+o,l=a*a+e.im*e.im;0!=l?(n.re+=s[o]*a/l,n.im+=-(s[o]*e.im)/l):n.re=s[o]<0?-(1/0):1/0}r=new t.Complex(e.re+i+.5,e.im);var c=Math.sqrt(2*Math.PI);e.re+=.5;var p=d(r,e);0==p.im?p.re*=c:0==p.re?p.im*=c:(p.re*=c,p.im*=c);var _=Math.exp(-r.re);return r.re=_*Math.cos(-r.im),r.im=_*Math.sin(-r.im),u(u(p,r),n)},BigNumber:function(e){if(e.isInteger())return e.isNegative()||e.isZero()?new t.BigNumber(1/0):c(e.minus(1));if(!e.isFinite())return new t.BigNumber(e.isNegative()?NaN:1/0);throw new Error("Integer BigNumber expected")},"Array | Matrix":function(t){return o(t,f)}});return f.toTex={1:"\\Gamma\\left(${args[0]}\\right)"},f}var o=r(120),a=r(18).isInteger,i=4.7421875,s=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];e.name="gamma",e.factory=n},function(t,e,r){"use strict";function n(t,e,n,i){var s=r(45),l=n(r(43)),c=n(r(44)),u=n(r(123)),d=n(r(39)),f=n(r(124)),p=n(r(50)),_=t.DenseMatrix,h=t.SparseMatrix,v=i("multiply",o({"Array, Array":function(e,r){m(a.size(e),a.size(r));var n=v(l(e),l(r));return t.isMatrix(n)?n.valueOf():n},"Matrix, Matrix":function(t,e){var r=t.size(),n=e.size();return m(r,n),1===r.length?1===n.length?g(t,e,r[0]):y(t,e):1===n.length?x(t,e):b(t,e)},"Matrix, Array":function(t,e){return v(t,l(e))},"Array, Matrix":function(t,e){return v(l(t,e.storage()),e)},"Matrix, any":function(t,e){var r;switch(t.storage()){case"sparse":r=f(t,e,u,!1);break;case"dense":r=p(t,e,u,!1)}return r},"any, Matrix":function(t,e){var r;switch(e.storage()){case"sparse":r=f(e,t,u,!0);break;case"dense":r=p(e,t,u,!0)}return r},"Array, any":function(t,e){return p(l(t),e,u,!1).valueOf()},"any, Array":function(t,e){return p(l(e),t,u,!0).valueOf()},"any, any":u,"Array | Matrix | any, Array | Matrix | any, ...any":function(t,e,r){for(var n=v(t,e),o=0;o<r.length;o++)n=v(n,r[o]);return n}},u.signatures)),m=function(t,e){switch(t.length){case 1:switch(e.length){case 1:if(t[0]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(t[0]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+t[0]+") must match Matrix rows ("+e[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+e.length+" dimensions)")}break;case 2:switch(e.length){case 1:if(t[1]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+t[1]+") must match Vector length ("+e[0]+")");break;case 2:if(t[1]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+t[1]+") must match Matrix B rows ("+e[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+e.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+t.length+" dimensions)")}},g=function(t,e,r){if(0===r)throw new Error("Cannot multiply two empty vectors");var n,o=t._data,a=t._datatype,s=e._data,l=e._datatype,d=c,f=u;a&&l&&a===l&&"string"==typeof a&&(n=a,d=i.find(c,[n,n]),f=i.find(u,[n,n]));for(var p=f(o[0],s[0]),_=1;_<r;_++)p=d(p,f(o[_],s[_]));return p},y=function(t,e){switch(e.storage()){case"dense":return w(t,e)}throw new Error("Not implemented")},w=function(t,e){var r,n=t._data,o=t._size,a=t._datatype,s=e._data,l=e._size,d=e._datatype,f=o[0],p=l[1],h=c,v=u;a&&d&&a===d&&"string"==typeof a&&(r=a,h=i.find(c,[r,r]),v=i.find(u,[r,r]));for(var m=[],g=0;g<p;g++){for(var y=v(n[0],s[0][g]),w=1;w<f;w++)y=h(y,v(n[w],s[w][g]));m[g]=y}return new _({data:m,size:[p],datatype:r})},x=function(t,e){switch(t.storage()){case"dense":return z(t,e);case"sparse":return E(t,e)}},b=function(t,e){switch(t.storage()){case"dense":switch(e.storage()){case"dense":return k(t,e);case"sparse":return A(t,e)}break;case"sparse":switch(e.storage()){case"dense":return N(t,e);case"sparse":return M(t,e)}}},z=function(t,e){var r,n=t._data,o=t._size,a=t._datatype,s=e._data,l=e._datatype,d=o[0],f=o[1],p=c,h=u;a&&l&&a===l&&"string"==typeof a&&(r=a,p=i.find(c,[r,r]),h=i.find(u,[r,r]));for(var v=[],m=0;m<d;m++){for(var g=n[m],y=h(g[0],s[0]),w=1;w<f;w++)y=p(y,h(g[w],s[w]));v[m]=y}return new _({data:v,size:[d],datatype:r})},k=function(t,e){var r,n=t._data,o=t._size,a=t._datatype,s=e._data,l=e._size,d=e._datatype,f=o[0],p=o[1],h=l[1],v=c,m=u;a&&d&&a===d&&"string"==typeof a&&(r=a,v=i.find(c,[r,r]),m=i.find(u,[r,r]));for(var g=[],y=0;y<f;y++){var w=n[y];g[y]=[];for(var x=0;x<h;x++){for(var b=m(w[0],s[0][x]),z=1;z<p;z++)b=v(b,m(w[z],s[z][x]));g[y][x]=b}}return new _({data:g,size:[f,h],datatype:r})},A=function(t,e){var r=t._data,n=t._size,o=t._datatype,a=e._values,s=e._index,l=e._ptr,f=e._size,p=e._datatype;if(!a)throw new Error("Cannot multiply Dense Matrix times Pattern only Matrix");var _,v=n[0],m=f[1],g=c,y=u,w=d,x=0;o&&p&&o===p&&"string"==typeof o&&(_=o,g=i.find(c,[_,_]),y=i.find(u,[_,_]),w=i.find(d,[_,_]),x=i.convert(0,_));for(var b=[],z=[],k=[],A=new h({values:b,index:z,ptr:k,size:[v,m],datatype:_}),E=0;E<m;E++){k[E]=z.length;var N=l[E],M=l[E+1];if(M>N)for(var S=0,O=0;O<v;O++){for(var T,C=O+1,B=N;B<M;B++){var F=s[B];S!==C?(T=y(r[O][F],a[B]),S=C):T=g(T,y(r[O][F],a[B]))}S!==C||w(T,x)||(z.push(O),b.push(T))}}return k[m]=z.length,A},E=function(t,e){var r=t._values,n=t._index,o=t._ptr,a=t._datatype;if(!r)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var s,l=e._data,f=e._datatype,p=t._size[0],_=e._size[0],v=[],m=[],g=[],y=c,w=u,x=d,b=0;a&&f&&a===f&&"string"==typeof a&&(s=a,y=i.find(c,[s,s]),w=i.find(u,[s,s]),x=i.find(d,[s,s]),b=i.convert(0,s));var z=[],k=[];g[0]=0;for(var A=0;A<_;A++){var E=l[A];if(!x(E,b))for(var N=o[A],M=o[A+1],S=N;S<M;S++){var O=n[S];k[O]?z[O]=y(z[O],w(E,r[S])):(k[O]=!0,m.push(O),z[O]=w(E,r[S]))}}for(var T=m.length,C=0;C<T;C++){var B=m[C];v[C]=z[B]}return g[1]=m.length,new h({values:v,index:m,ptr:g,size:[p,1],datatype:s})},N=function(t,e){var r=t._values,n=t._index,o=t._ptr,a=t._datatype;if(!r)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var s,l=e._data,f=e._datatype,p=t._size[0],_=e._size[0],v=e._size[1],m=c,g=u,y=d,w=0;a&&f&&a===f&&"string"==typeof a&&(s=a,m=i.find(c,[s,s]),g=i.find(u,[s,s]),y=i.find(d,[s,s]),w=i.convert(0,s));for(var x=[],b=[],z=[],k=new h({values:x,index:b,ptr:z,size:[p,v],datatype:s}),A=[],E=[],N=0;N<v;N++){z[N]=b.length;for(var M=N+1,S=0;S<_;S++){var O=l[S][N];if(!y(O,w))for(var T=o[S],C=o[S+1],B=T;B<C;B++){var F=n[B];E[F]!==M?(E[F]=M,b.push(F),A[F]=g(O,r[B])):A[F]=m(A[F],g(O,r[B]))}}for(var I=z[N],j=b.length,R=I;R<j;R++){var L=b[R];x[R]=A[L]}}return z[v]=b.length,k},M=function(t,e){var r,n=t._values,o=t._index,a=t._ptr,s=t._datatype,l=e._values,d=e._index,f=e._ptr,p=e._datatype,_=t._size[0],v=e._size[1],m=n&&l,g=c,y=u;s&&p&&s===p&&"string"==typeof s&&(r=s,g=i.find(c,[r,r]),y=i.find(u,[r,r]));for(var w,x,b,z,k,A,E,N,M=m?[]:void 0,S=[],O=[],T=new h({values:M,index:S,ptr:O,size:[_,v],datatype:r}),C=m?[]:void 0,B=[],F=0;F<v;F++){O[F]=S.length;var I=F+1;for(k=f[F],A=f[F+1],z=k;z<A;z++)if(N=d[z],m)for(x=a[N],b=a[N+1],w=x;w<b;w++)E=o[w],B[E]!==I?(B[E]=I,S.push(E),C[E]=y(l[z],n[w])):C[E]=g(C[E],y(l[z],n[w]));else for(x=a[N],b=a[N+1],w=x;w<b;w++)E=o[w],B[E]!==I&&(B[E]=I,S.push(E));if(m)for(var j=O[F],R=S.length,L=j;L<R;L++){var D=S[L];M[L]=C[D]}}return O[v]=S.length,T};return v.toTex={2:"\\left(${args[0]}"+s.operators.multiply+"${args[1]}\\right)"},v}var o=r(14).extend,a=r(28);e.name="multiply",e.factory=n},function(t,e){"use strict";function r(t,e,r,n){var o=n("multiplyScalar",{"number, number":function(t,e){return t*e},"Complex, Complex":function(t,e){return t.mul(e)},"BigNumber, BigNumber":function(t,e){return t.times(e)},"Fraction, Fraction":function(t,e){return t.mul(e)},"number | Fraction | BigNumber | Complex, Unit":function(t,e){var r=e.clone();return r.value=null===r.value?r._normalize(t):o(r.value,t),r},"Unit, number | Fraction | BigNumber | Complex":function(t,e){var r=t.clone();return r.value=null===r.value?r._normalize(e):o(r.value,e),r},"Unit, Unit":function(t,e){return t.multiply(e)}});return o}e.factory=r},function(t,e,r){"use strict";function n(t,e,n,o){var a=n(r(39)),i=t.SparseMatrix,s=function(t,e,r,n){var s=t._values,l=t._index,c=t._ptr,u=t._size,d=t._datatype;if(!s)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var f,p=u[0],_=u[1],h=a,v=0,m=r;"string"==typeof d&&(f=d,h=o.find(a,[f,f]),v=o.convert(0,f),e=o.convert(e,f),m=o.find(r,[f,f]));for(var g=[],y=[],w=[],x=new i({values:g,index:y,ptr:w,size:[p,_],datatype:f}),b=0;b<_;b++){w[b]=y.length;for(var z=c[b],k=c[b+1],A=z;A<k;A++){var E=l[A],N=n?m(e,s[A]):m(s[A],e);h(N,v)||(y.push(E),g.push(N))}}return w[_]=y.length,x};return s}e.name="algorithm11",e.factory=n},function(t,e,r){"use strict";function n(t,e,n,i){function s(r,n){if(e.predictable&&!o(n)&&r<0)try{var a=_(n),i=h(a);if((n===i||Math.abs((n-i)/n)<1e-14)&&a.d%2===1)return(a.n%2===0?1:-1)*Math.pow(-r,n)}catch(t){}return r*r<1&&n===1/0||r*r>1&&n===-(1/0)?0:e.predictable&&(r<-1&&n===1/0||r>-1&&r<0&&n===-(1/0))?NaN:o(n)||r>=0||e.predictable?Math.pow(r,n):new t.Complex(r,0).pow(n,0)}function l(t,e){if(!o(e)||e<0)throw new TypeError("For A^b, b must be a positive integer (value is "+e+")");var r=a(t);if(2!=r.length)throw new Error("For A^b, A must be 2 dimensional (A has "+r.length+" dimensions)");if(r[0]!=r[1])throw new Error("For A^b, A must be square (size is "+r[0]+"x"+r[1]+")");for(var n=d(r[0]).valueOf(),i=t;e>=1;)1==(1&e)&&(n=f(i,n)),e>>=1,i=f(i,i);return n}function c(t,e){return p(l(t.valueOf(),e))}var u=r(45),d=n(r(126)),f=n(r(122)),p=n(r(43)),_=n(r(127)),h=n(r(128)),v=i("pow",{"number, number":s,"Complex, Complex":function(t,e){return t.pow(e)},"BigNumber, BigNumber":function(r,n){return n.isInteger()||r>=0||e.predictable?r.pow(n):new t.Complex(r.toNumber(),0).pow(n.toNumber(),0)},"Fraction, Fraction":function(t,r){if(1!==r.d){if(e.predictable)throw new Error("Function pow does not support non-integer exponents for fractions.");return s(t.valueOf(),r.valueOf())}return t.pow(r)},"Array, number":l,"Array, BigNumber":function(t,e){return l(t,e.toNumber())},"Matrix, number":c,"Matrix, BigNumber":function(t,e){return c(t,e.toNumber())},"Unit, number":function(t,e){return t.pow(e)}});return v.toTex={2:"\\left(${args[0]}\\right)"+u.operators.pow+"{${args[1]}}"},v}var o=r(18).isInteger,a=r(28).size;e.name="pow",e.factory=n},function(t,e,r){"use strict";function n(t,e,n,i){function s(t,e){switch(t.length){case 0:return e?c(e):[];case 1:return l(t[0],t[0],e);case 2:return l(t[0],t[1],e);default:throw new Error("Vector containing two values expected")}}function l(e,r,n){var i=t.isBigNumber(e)||t.isBigNumber(r)?t.BigNumber:null;if(t.isBigNumber(e)&&(e=e.toNumber()),t.isBigNumber(r)&&(r=r.toNumber()),!a(e)||e<1)throw new Error("Parameters in function eye must be positive integers");if(!a(r)||r<1)throw new Error("Parameters in function eye must be positive integers");var s=i?new t.BigNumber(1):1,l=i?new i(0):0,c=[e,r];if(n){var u=t.Matrix.storage(n);return u.diagonal(c,s,0,l)}for(var d=o.resize([],c,l),f=e<r?e:r,p=0;p<f;p++)d[p][p]=s;return d}var c=n(r(43)),u=i("eye",{"":function(){return"Matrix"===e.matrix?c([]):[]},string:function(t){return c(t)},"number | BigNumber":function(t){return l(t,t,"Matrix"===e.matrix?"default":void 0)},"number | BigNumber, string":function(t,e){return l(t,t,e)},"number | BigNumber, number | BigNumber":function(t,r){return l(t,r,"Matrix"===e.matrix?"default":void 0)},"number | BigNumber, number | BigNumber, string":function(t,e,r){return l(t,e,r)},Array:function(t){return s(t)},"Array, string":function(t,e){return s(t,e)},Matrix:function(t){return s(t.valueOf(),t.storage())},"Matrix, string":function(t,e){return s(t.valueOf(),e)}});return u.toTex=void 0,u}var o=r(28),a=r(18).isInteger;e.name="eye",e.factory=n},function(t,e,r){"use strict";function n(t,e,r,n){var a=n("fraction",{number:function(e){if(!isFinite(e)||isNaN(e))throw new Error(e+" cannot be represented as a fraction");return new t.Fraction(e)},string:function(e){return new t.Fraction(e)},"number, number":function(e,r){return new t.Fraction(e,r)},BigNumber:function(e){return new t.Fraction(e.toString())},Fraction:function(t){return t},Object:function(e){return new t.Fraction(e)},"Array | Matrix":function(t){return o(t,a)}});return a}var o=r(120);e.name="fraction",e.factory=n},function(t,e,r){"use strict";function n(t,e,r,n){var a=n("number",{"":function(){return 0},number:function(t){return t},string:function(t){var e=Number(t);if(isNaN(e))throw new SyntaxError('String "'+t+'" is no valid number');return e},BigNumber:function(t){return t.toNumber()},Fraction:function(t){return t.valueOf()},Unit:function(t){throw new Error("Second argument with valueless unit expected")},"Unit, string | Unit":function(t,e){return t.toNumber(e)},"Array | Matrix":function(t){return o(t,a)}});return a.toTex={0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},a}var o=r(120);e.name="number",e.factory=n},function(t,e){"use strict";t.exports=function(t){var e={},r=d3.select(t.root+" .clust_group").attr("transform");return null!=r&&r.indexOf("scale")>0?(e.zoom_x=parseFloat(r.split("scale")[1].replace("(","").replace(")","").split(",")[0]),e.zoom_y=parseFloat(r.split("scale")[1].replace("(","").replace(")","").split(",")[1])):(e.zoom_x=1,e.zoom_y=1),e}},function(t,e,r){"use strict";var n=r(100);t.exports=function(t){if(t.labels.show_label_tooltips){d3.selectAll(t.viz.root_tips+"_row_tip").remove();var e=t.viz.root_tips.replace(".",""),r=n().attr("class",function(){var t=e+" d3-tip "+e+"_row_tip";return t}).direction("e").offset([0,10]).style("display","none").html(function(t){var e=t.name.replace(/_/g," ").split("#")[0];return"<span>"+e+"</span>"});d3.select(t.viz.viz_wrapper).select(t.root+" .row_container").call(r),d3.select(t.root+" .row_label_zoom_container").selectAll("g").on("mouseover",function(e){d3.select(t.viz.root_tips+"_row_tip").classed(e.name,!0),d3.selectAll(t.viz.root_tips+"_row_tip").style("display","block"),d3.select(this).select("text").classed("active",!0),r.show(e),null!=t.row_tip_callback&&t.row_tip_callback(t.viz.root_tips,e)}).on("mouseout",function(e){d3.selectAll(t.viz.root_tips+"_row_tip").style("display","none").classed(e.name,!1),d3.select(this).select("text").classed("active",!1),r.hide(e)})}else d3.select(t.root+" .row_label_zoom_container").selectAll("g").on("mouseover",function(){d3.select(this).select("text").classed("active",!0)}).on("mouseout",function(){d3.select(this).select("text").classed("active",!1)})}},function(t,e,r){"use strict";var n=r(2),o=r(132),a=r(133),i=r(104),s=r(137),l=r(138);
t.exports=function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=t.params,u=c.network_data.col_nodes,d=c.viz.x_scale.rangeBand()/2+c.viz.border_width.x;d3.select(c.root+" .col_container").empty()?(e=d3.select(c.viz.viz_svg).append("g").attr("class","col_container").attr("transform","translate("+c.viz.clust.margin.left+","+c.viz.norm_labels.margin.top+")"),e.append("rect").attr("fill",c.viz.background_color).attr("width",30*c.viz.clust.dim.width+"px").attr("height",c.viz.label_background.col).attr("class","white_bars"),e.append("g").attr("class","col_label_outer_container").attr("transform","translate(0,"+c.viz.norm_labels.width.col+")").append("g").attr("class","col_zoom_container")):(e=d3.select(c.root+" .col_container").attr("transform","translate("+c.viz.clust.margin.left+","+c.viz.norm_labels.margin.top+")"),e.select(".white_bars").attr("fill",c.viz.background_color).attr("width",30*c.viz.clust.dim.width+"px").attr("height",c.viz.label_background.col),e.select(c.root+" .col_label_outer_container"));var f=d3.select(c.root+" .col_zoom_container").selectAll(".col_label_text").data(u,function(t){return t.name}).enter().append("g").attr("class","col_label_text").attr("transform",function(t){var e=t.col_index;return"translate("+c.viz.x_scale(e)+", 0) rotate(-90)"}),p=f.append("g").attr("class","col_label_group").attr("transform","translate("+c.viz.x_scale.rangeBand()/2+","+d+") rotate(45)").on("mouseover",function(){d3.select(this).select("text").classed("active",!0)}).on("mouseout",function(){d3.select(this).select("text").classed("active",!1)});n.has(c.network_data.col_nodes[0],"value")&&p.append("rect").attr("class","col_bars").attr("width",function(t){var e=0;return t.value>0&&(e=c.labels.bar_scale_col(t.value)),e}).attr("height",.66*c.viz.x_scale.rangeBand()).style("fill",function(t){return t.value>0?c.matrix.bar_colors[0]:c.matrix.bar_colors[1]}).attr("opacity",.6),p.append("text").attr("x",0).attr("y",.64*c.viz.x_scale.rangeBand()).attr("dx",c.viz.border_width.x).attr("text-anchor","start").attr("full_name",function(t){return t.name}).style("font-size",c.labels.default_fs_col+"px").style("cursor","default").text(function(t){return n.normal_name(t)}).style("opacity",0).transition().delay(r).duration(r).style("opacity",1),s(c),p.append("path").style("stroke-width",0).attr("d",function(){return l(c)}).attr("fill","#eee").style("opacity",0).transition().delay(r).duration(r).style("opacity",c.viz.triangle_opacity),d3.selectAll(c.root+" .col_label_text").on("click",function(t){"function"==typeof c.click_label?(c.click_label(t.name,"col"),o(c,this,t.ini)):c.tile_click_hlight&&o(c,this,t.ini)}).on("dblclick",function(e){var r="__data__",n=this[r].name;if(c.sim_mat){a(t,this,n);var s=d3.selectAll(c.root+" .row_label_group").filter(function(t){return t.name==n})[0][0];i(t,s,n)}else a(t,this,n);c.tile_click_hlight&&o(c,this,e.ini)})}},function(t,e){"use strict";t.exports=function(t,e,r){if(r!=t.click_hlight_col){t.click_hlight_col=r;var n=6,o=.85,a=n*t.viz.border_width.x;d3.selectAll(t.root+" .click_hlight").remove(),d3.select(e).append("rect").classed("click_hlight",!0).classed("col_top_hlight",!0).attr("width",t.viz.clust.dim.height).attr("height",a).attr("fill",t.matrix.hlight_color).attr("opacity",o).attr("transform",function(){var e=0,r=-(t.viz.clust.dim.height+t.viz.cat_room.col+t.viz.uni_margin);return"translate("+r+","+e+")"}),d3.select(e).append("rect").classed("click_hlight",!0).classed("col_bottom_hlight",!0).attr("width",t.viz.clust.dim.height).attr("height",a).attr("fill",t.matrix.hlight_color).attr("opacity",o).attr("transform",function(){var e=t.viz.x_scale.rangeBand()-a,r=-(t.viz.clust.dim.height+t.viz.cat_room.col+t.viz.uni_margin);return"translate("+r+","+e+")"})}else d3.selectAll(t.root+" .click_hlight").remove(),t.click_hlight_col=-666}},function(t,e,r){"use strict";var n=r(105),o=r(106),a=r(134),i=r(88),s=r(129),l=r(79);t.exports=function(t,e,r){var c=t.params,u=s(c);if(1===u.zoom_y&&1===u.zoom_x){c.viz.inst_order.col="custom",o(t,"col"),d3.selectAll(c.root+" .toggle_row_order .btn").classed("active",!1),c.viz.run_trans=!0;var d=$.extend(!0,{},c.matrix.matrix),f=c.network_data.row_nodes,p=c.network_data.col_nodes,h=[];p.forEach(function(t){h.push(t.name)});var v=_.indexOf(h,r);h=[],f.forEach(function(t,e){h.push(d[e].row_data[v].value)});var m=d3.range(h.length).sort(function(t,e){return h[e]-h[t]});c.viz.y_scale.domain(m),c.matrix.orders.custom_col=m;var g,y=c.network_data.row_nodes_names;if(g=c.network_data.links.length>c.matrix.def_large_matrix?d3.select(c.root+" .viz_svg"):d3.select(c.root+" .viz_svg").transition().duration(2500),g.selectAll(".row_cat_group").attr("transform",function(t){var e=_.indexOf(y,t.name);return"translate(0,"+c.viz.y_scale(e)+")"}),g.select(".row_label_zoom_container").selectAll(".row_label_group").attr("transform",function(t){var e=_.indexOf(y,t.name);return"translate(0,"+c.viz.y_scale(e)+")"}),c.viz.ds_level===-1&&g.selectAll(".row").attr("transform",function(t){var e=_.indexOf(y,t.name);return"translate(0,"+c.viz.y_scale(e)+")"}),d3.selectAll(c.root+" .col_label_text").select(".highlight_rect").style("opacity",0),d3.select(e).select(".highlight_rect").style("opacity",1),c.network_data.links.forEach(function(t){t.x=c.viz.x_scale(t.target),t.y=c.viz.y_scale(t.source)}),n(c),c.zoom_info=i(),setTimeout(function(){c.viz.run_trans=!1},2500),c.viz.ds_num_levels>0&&c.viz.ds_level>=0){l(c);var w=!0,x=!0,b=!0;a(t,w,x,b)}}}},function(t,e,r){"use strict";var n=r(135),o=r(93),a=r(102),i=r(136),s=r(68);t.exports=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=arguments.length>3&&void 0!==arguments[3]&&arguments[3],c=t.params,u=c.zoom_info,d=c.viz.ds_level,f=c.viz.ds_level;null===c.viz.ds?d=-1:(d=Math.floor(Math.log(u.zoom_y)/Math.log(c.viz.ds_zt)),d>c.viz.ds_num_levels-1&&(d=-1));var p=!1;f==-1?d>=0&&(p=!0):d<f&&(p=!0);var h;e===!0||p===!0?(h=d,e=!0,c.viz.ds_level=h):h=f;var v={},m=5;v.min_x=Math.abs(u.trans_x)/u.zoom_x-(m+1)*c.viz.rect_width,v.min_y=Math.abs(u.trans_y)/u.zoom_y-(m+1)*c.viz.rect_height,v.max_x=Math.abs(u.trans_x)/u.zoom_x+c.viz.clust.dim.width/u.zoom_x+m*c.viz.rect_width,v.max_y=Math.abs(u.trans_y)/u.zoom_y+c.viz.clust.dim.height/u.zoom_y+m*c.viz.rect_height,n(c,v);var g;if(l===!1?g=_.difference(c.viz.viz_nodes.row,c.viz.viz_nodes.curr_row):(g="all",d3.selectAll(c.root+" .ds"+String(h)+"_row").remove()),null!=c.viz.ds){var y=".ds"+String(c.viz.ds_level)+"_row";d3.selectAll(y).style("display","block")}h>=0&&(d3.selectAll(c.root+" .row").remove(),d3.selectAll(c.viz.root_tips+"_tile_tip").remove(),d3.selectAll(c.viz.root_tips+"_row_tip").remove());var w;if(h<0?(w=c.matrix.matrix,i(c)):(w=c.matrix.ds_matrix[h],d3.selectAll(c.root+" .row_cat_group path").remove()),r===!0&&d3.selectAll(c.root+" .row_cat_group path").remove(),e===!0&&(h>=0?d3.selectAll(c.root+" .ds"+String(h)+"_row").each(function(t){s.contains(c.viz.viz_nodes.row,t.name)===!1&&d3.select(this).remove()}):d3.selectAll(c.root+" .row").each(function(t){s.contains(c.viz.viz_nodes.row,t.name)===!1&&d3.select(this).remove()}),d3.selectAll(c.root+" .row_label_group").each(function(t){s.contains(c.viz.viz_nodes.row,t.name)===!1&&d3.select(this).remove()}),h!=f&&(g=c.viz.viz_nodes.row,d3.selectAll(c.root+" .ds"+String(f)+"_row").remove())),(g.length>=1||"all"===g)&&o(c,w,g,h),h===-1&&(r===!1||e)){var x=[];d3.selectAll(c.root+" .row_label_group").each(function(t){x.push(t.name)});var b=_.difference(c.viz.viz_nodes.row,x),z=1;b.length>z&&a(t,b)}}},function(t,e){"use strict";t.exports=function(t,e){var r,n=[],o=[],a=t.viz.y_scale,i=t.viz.ds_level,s=t.network_data.row_nodes_names,l=".row";i>=0&&(a=t.viz.ds[i].y_scale,s=d3.range(t.matrix.ds_matrix[i].length).map(String),l=".ds"+String(i)+"_row");for(var c=0;c<s.length;c++)r=a(c),r<e.max_y&&r>e.min_y&&n.push(s[c]);d3.selectAll(t.root+" "+l).each(function(t){o.push(t.name)}),t.viz.viz_nodes.row=n,t.viz.viz_nodes.curr_row=o}},function(t,e){"use strict";t.exports=function(t){d3.select(t.root+" .row_cat_group path").empty()===!0&&d3.selectAll(t.root+" .row_cat_group").append("path").attr("d",function(){var e=t.viz.cat_room.symbol_width-1,r=0,n=1,o=t.viz.y_scale.rangeBand()/2,a=t.viz.cat_room.symbol_width-1,i=t.viz.y_scale.rangeBand(),s="M "+e+","+r+" L "+n+","+o+", L "+a+","+i+" Z";return s}).attr("fill","#eee").style("opacity",t.viz.triangle_opacity)}},function(t,e,r){"use strict";var n=r(100);t.exports=function(t){if(t.labels.show_label_tooltips){d3.selectAll(t.viz.root_tips+"_col_tip").remove();var e=n().attr("class",function(){var e=t.viz.root_tips.replace(".",""),r=e+" d3-tip "+e+"_col_tip";return r}).direction("w").offset([20,0]).style("display","none").html(function(t){var e=t.name.replace(/_/g," ").split("#")[0];return"<span>"+e+"</span>"});d3.select(t.viz.viz_wrapper).select("svg").select(t.root+" .col_zoom_container").selectAll(".col_label_group").select("text").call(e),d3.select(t.root+" .col_zoom_container").selectAll(".col_label_group").on("mouseover",function(r){d3.selectAll(t.viz.root_tips+"_col_tip").style("display","block"),e.show(r),null!=t.col_tip_callback&&t.col_tip_callback(r)}).on("mouseout",function(){e.hide(this),d3.selectAll(t.viz.root_tips+"_col_tip").style("display","none")})}}},function(t,e){"use strict";t.exports=function(t){var e=.36*t.viz.x_scale.rangeBand(),r=-t.viz.border_width.x,n=0,o=t.viz.x_scale.rangeBand()-e,a=-(t.viz.x_scale.rangeBand()-e+t.viz.border_width.x),i=-t.viz.border_width.x,s="M "+r+",0 L "+a+","+n+", L "+i+","+o+" Z";return s}},function(t,e){"use strict";t.exports=function(t){d3.select(t.viz.viz_svg).append("rect").attr("fill",t.viz.background_color).attr("height",t.viz.super_labels.dim.width+"px").attr("width","3000px").classed("super_col_bkg",!0).classed("white_bars",!0).attr("transform","translate("+t.viz.clust.margin.left+","+t.viz.super_labels.margin.top+")"),d3.select(t.viz.viz_svg).append("text").attr("class","super_col").text(t.labels.super.col).attr("text-anchor","center").attr("transform",function(){var e=d3.select(this)[0][0].getBBox().width,r=t.viz.clust.dim.width/2+t.viz.norm_labels.width.row-e/2,n=t.viz.super_labels.dim.width;return"translate("+r+","+n+")"}).style("font-size",function(){var e=t.labels.super_label_fs*t.labels.super_label_scale;return e+"px"}).style("font-weight",300),d3.select(t.viz.viz_svg).append("rect").attr("fill",t.viz.background_color).attr("width",t.viz.super_labels.dim.width+"px").attr("height","3000px").classed("super_row_bkg",!0).classed("white_bars",!0).attr("transform","translate("+t.viz.super_labels.margin.left+",0)"),d3.select(t.viz.viz_svg).append("g").classed("super_row",!0).attr("transform",function(){var e=t.viz.super_labels.dim.width,r=t.viz.clust.dim.height/2+t.viz.norm_labels.width.col;return"translate("+e+","+r+")"}),d3.select(t.root+" .super_row").append("text").text(t.labels.super.row).attr("text-anchor","center").attr("transform",function(){var e=d3.select(this)[0][0].getBBox().width,r=e/2+t.viz.norm_labels.width.col,n="translate(0,"+r+"), rotate(-90)";return n}).style("font-size",function(){var e=t.labels.super_label_fs*t.labels.super_label_scale;return e+"px"}).style("font-weight",300)}},function(t,e,r){"use strict";var n=r(141),o=r(142),a=r(150),i=r(112);t.exports=function(t){var e=t.params,r=e.viz;d3.select(r.root+" .col_container").append("path").style("stroke-width","0").attr("d","M 0,0 L 1000,-1000, L 1000,0 Z").attr("fill",r.background_color).attr("class","right_slant_triangle").attr("transform","translate("+r.clust.dim.width+","+r.norm_labels.width.col+")"),d3.select(r.root+" .col_container").append("path").style("stroke-width","0").attr("d","M 0,0 L 500,-500, L 0,-500 Z").attr("fill",r.background_color).attr("class","left_slant_triangle").attr("transform","translate(-1,"+r.norm_labels.width.col+")");var s=r.clust.margin.top+r.uni_margin/5;d3.select(r.viz_svg).append("rect").attr("fill",r.background_color).attr("width",r.clust.margin.left).attr("height",s).attr("class","top_left_white");var l=r.cat_room.col+1.5*r.uni_margin;d3.select(r.viz_svg).append("rect").attr("fill",r.background_color).attr("width",2*r.clust.dim.width).attr("height",l).attr("class","top_right_white").attr("transform",function(){var t=r.clust.margin.left+r.clust.dim.width,e=r.norm_labels.width.col+r.norm_labels.margin.top-r.uni_margin;return"translate("+t+", "+e+")"}),p=r.clust.margin.left+r.clust.dim.width+r.uni_margin,_=r.norm_labels.margin.top+r.norm_labels.width.col+2.5*r.uni_margin;var c=1.15*r.cat_room.symbol_width,u=.65,d=1.25;r.show_categories.col&&d3.select(r.viz_svg).selectAll().data(r.all_cats.col).enter().append("text").classed("col_cat_super",!0).style("font-size",c+"px").style("opacity",u).style("cursor","default").attr("transform",function(t){var e=parseInt(t.split("-")[1],10),n=_+d*r.cat_room.symbol_width*e;return"translate("+p+","+n+")"}).text(function(t){return n(r,t,"col")}),a(t),_=r.show_dendrogram?r.clust.margin.top+r.clust.dim.height+r.dendro_room.col-2*r.uni_margin:r.clust.margin.top+r.clust.dim.height;var f=d3.select(r.viz_svg).append("g").classed("bottom_spillover_container",!0).attr("transform",function(){return"translate(0,"+_+")"});f.append("rect").attr("class","bottom_spillover").attr("fill",r.background_color).attr("width",r.svg_dim.width).attr("height",2*r.svg_dim.height),p=r.clust.margin.left,_=0,f.append("g").classed("col_dendro_icons_container",!0).attr("transform","translate("+p+","+_+")").append("g").classed("col_dendro_icons_group",!0),e.viz.show_dendrogram&&i(t,"col");var p=r.clust.margin.left+r.clust.dim.width,_=r.clust.margin.top+r.clust.dim.height,h=r.cat_room.col+r.clust.dim.width,v=r.cat_room.row+10*r.uni_margin;d3.select(r.viz_svg).append("rect").attr("fill",r.background_color).attr("width",h).attr("height",v).attr("transform",function(){return"translate("+p+","+_+")"}).classed("white_bars",!0).classed("dendro_corner_spillover",!0),p=0,_=r.clust.margin.top+r.clust.dim.height,h=r.clust.margin.left,v=10*r.clust.dim.height,d3.select(r.viz_svg).append("rect").attr("fill",r.background_color).attr("width",h).attr("height",v).attr("transform",function(){return"translate("+p+","+_+")"}).classed("white_bars",!0).classed("dendro_col_spillover",!0),o(t)}},function(t,e){"use strict";t.exports=function(t,e,r){var n;if(t.cat_names[r][e]===e){var o=parseInt(e.split("-")[1],10)+1;n="Category "+o}else n=t.cat_names[r][e];return n}},function(t,e,r){"use strict";var n=r(143);t.exports=function(t){var e=t.params;_.each(["row","col"],function(r){e.viz.show_categories[r]&&d3.selectAll(e.root+" ."+r+"_cat_super").on("dblclick",function(){e.sim_mat&&(r="both"),d3.selectAll(e.root+" .toggle_"+r+"_order .btn").classed("active",!1);var o=this.__data__.replace("-","_")+"_index";e.viz.sim_mat?(n(t,o,"row"),n(t,o,"col")):n(t,o,r)})})}},function(t,e,r){"use strict";var n=r(106),o=r(134),a=r(88),i=r(79),s=r(144),l=r(129);t.exports=function(t,e,r){var c=t.params,u=l(c),d=0;1==u.zoom_y&&1==u.zoom_x||(s(t,0,0,1),d=1200);var f;"row"===r?f="col":"col"===r&&(f="row"),c.viz.run_trans=!0,"row"===f?c.viz.inst_order.row=e:"col"===f&&(c.viz.inst_order.col=e),c.viz.show_dendrogram&&n(t,r),"row"===f?c.viz.x_scale.domain(c.matrix.orders[c.viz.inst_order.row+"_row"]):"col"==f&&c.viz.y_scale.domain(c.matrix.orders[c.viz.inst_order.col+"_col"]);var p;p=d3.selectAll(c.root+" .tile")[0].length<c.matrix.def_large_matrix?d3.select(c.root+" .viz_svg").transition().duration(2500).delay(d):d3.select(c.root+" .viz_svg");var h=c.network_data.row_nodes_names,v=c.network_data.col_nodes_names;if(c.viz.ds_level===-1&&(p.selectAll(".row").attr("transform",function(t){var e=_.indexOf(h,t.name);return"translate(0,"+c.viz.y_scale(e)+")"}).selectAll(".tile").attr("transform",function(t){return"translate("+c.viz.x_scale(t.pos_x)+" , 0)"}),p.selectAll(".tile_up").attr("transform",function(t){return"translate("+c.viz.x_scale(t.pos_x)+" , 0)"}),p.selectAll(".tile_dn").attr("transform",function(t){return"translate("+c.viz.x_scale(t.pos_x)+" , 0)"})),p.select(".row_label_zoom_container").selectAll(".row_label_group").attr("transform",function(t){var e=_.indexOf(h,t.name);return"translate(0,"+c.viz.y_scale(e)+")"}),p.select(".col_zoom_container").selectAll(".col_label_text").attr("transform",function(t){var e=_.indexOf(v,t.name);return"translate("+c.viz.x_scale(e)+") rotate(-90)"}),p.selectAll(".row_cat_group").attr("transform",function(t){var e=_.indexOf(h,t.name);return"translate(0,"+c.viz.y_scale(e)+")"}),p.selectAll(".col_cat_group").attr("transform",function(t){var e=_.indexOf(v,t.name);return"translate("+c.viz.x_scale(e)+",0)"}),c.network_data.links.forEach(function(t){t.x=c.viz.x_scale(t.target),t.y=c.viz.y_scale(t.source)}),c.zoom_info=a(),c.viz.ds_num_levels>0&&c.viz.ds_level>=0){i(c);var m=!0,g=!0,y=!0;o(t,m,g,y)}setTimeout(function(){c.viz.run_trans=!1},2500)}},function(t,e,r){"use strict";var n=r(2),o=r(145),a=r(134),i=r(88),s=r(149);t.exports=function(t,e,r,l){function c(t,e){d3.selectAll(u.root+" ."+t+"_dendro_crop_buttons").transition().duration(g).style("opacity",e)}var u=t.params;if(d3.selectAll(u.viz.root_tips).style("display","none"),u.zoom_info=i(),a(t),!u.viz.run_trans){var d=u.viz.clust.dim.height/2,f=d/l;if(r>=d-f){var p=d-r,h=-d/l+p;r+=h}r<-(d-f)&&(p=d+r,h=d/l-p,r+=h);var v=l,m=1,g=700,y=-(v-1)*d;d3.select(u.root+" .clust_group").transition().duration(g).attr("transform","translate("+[0,0+y]+") scale("+m+","+v+")translate("+[e,r]+")"),d3.select(u.root+" .row_label_zoom_container").transition().duration(g).attr("transform","translate("+[0,y]+") scale("+v+","+v+")translate("+[0,r]+")"),d3.select(u.root+" .row_cat_container").transition().duration(g).attr("transform","translate("+[0,y]+") scale(1,"+v+")translate("+[0,r]+")"),d3.select(u.root+" .row_dendro_container").transition().duration(g).attr("transform","translate("+[0,y]+") scale("+m+","+v+")translate("+[u.viz.uni_margin/2,r]+")");var w;_.each(["row","col"],function(t){w=d3.select(u.root+" ."+t+"_dendro_crop_buttons").style("opacity"),d3.selectAll(u.root+" ."+t+"_dendro_crop_buttons").style("opacity",0),setTimeout(c,700,t,w)}),d3.select(u.root+" .col_zoom_container").transition().duration(g).attr("transform"," scale("+m+","+m+")translate("+[e,0]+")"),d3.select(u.root+" .col_cat_container").transition().duration(g).attr("transform"," scale("+m+",1)translate("+[e,0]+")"),d3.select(u.root+" .col_dendro_container").transition().duration(g).attr("transform"," scale("+m+",1)translate("+[e,u.viz.uni_margin/2]+")");var x=u.viz.clust.margin.top+y+r*v,b=u.viz.clust.margin.left+e;u.zoom_behavior.scale(v).translate([b,x]),o(u),d3.select(u.root+" .row_label_zoom_container text").empty()===!1&&d3.select(u.root+" .row_label_zoom_container").each(function(){var t=d3.select(this).select("text")[0][0].getBBox();d3.select(this).select("rect").attr("x",.5*t.x).attr("y",0).attr("width",.5*t.width).attr("height",u.viz.y_scale.rangeBand()).style("fill","yellow")}),d3.select(u.root+" .row_dendro_icons_group").attr("transform","translate("+[0,0+y]+") scale("+m+","+v+")translate("+[e,r]+")"),d3.select(u.root+" .row_dendro_icons_group").selectAll("path").attr("transform",function(t){var e=u.viz.uni_margin,r=t.pos_mid;return"translate("+e+","+r+") scale(1, "+1/v+")"}),d3.select(u.root+" .col_dendro_icons_group").attr("transform",function(){var t=" scale("+m+","+v+")";return t}),d3.select(u.root+" .col_dendro_icons_group").selectAll("path").attr("transform",function(t){var e=t.pos_mid,r=u.viz.uni_margin;return"translate("+e+","+r+") scale(1,1)"}),n.has(u.network_data.col_nodes[0],"value")&&d3.selectAll(u.root+" .col_bars").attr("width",function(t){var e=0;return t.value>0&&(e=u.labels.bar_scale_col(t.value)/m),e}),n.has(u.network_data.row_nodes[0],"value")&&d3.selectAll(u.root+" .row_bars").transition().duration(g).attr("width",function(t){var e=0;return e=u.labels.bar_scale_row(Math.abs(t.value))/v}).attr("x",function(t){var e=0;return e=-u.labels.bar_scale_row(Math.abs(t.value))/v}),s(u)}}},function(t,e,r){"use strict";var n=r(2),o=r(146),a=r(147);t.exports=function(t){d3.selectAll(t.root+" .row_label_group").select("text").text(function(t){return n.normal_name(t)}),d3.selectAll(t.root+" .col_label_text").select("text").text(function(t){return n.normal_name(t)}),a(t),d3.selectAll(t.root+" .row_label_group").each(function(){o(t,this,"row")}),d3.selectAll(t.root+" .col_label_group").each(function(){o(t,this,"col")})}},function(t,e){"use strict";t.exports=function(t,e,r){function n(){return u=d3.select(this).text(),c=u.length,f=c-3,l=u.substring(0,f)+".."}function o(t){return u=d3.select(this).text(),c=".."===u.slice(-2)?u.length-2:u.length,d=t.name,f=c+2,l=d.substring(0,f)+"..",l.length>d.length&&(l=d),l}function a(t,e){return s=e<1?t:t*e}if("none"!=d3.select(e).style("display")){var i,s,l,c,u,d,f,p,_=t.viz.norm_labels.width[r];i="row"===r?t.viz.zoom_ratio.y?t.zoom_behavior.scale()/t.viz.zoom_ratio.y:t.zoom_behavior.scale():t.viz.zoom_ratio.x>1?t.zoom_behavior.scale()/t.viz.zoom_ratio.x:t.zoom_behavior.scale();var h;d3.select(e).select("text").each(function(t){h=t.name.length});var v=d3.select(e).select("text").node().getBBox().width;if(s=a(v,i),s>_)for(p=1;p<h;p++)s>_&&(d3.select(e).select("text").text(n),v=d3.select(e).select("text").node().getBBox().width,s=a(v,i));else if(s<.75*_)for(p=1;p<h;p++)s<.75*_&&(d3.select(e).select("text").text(o),v=d3.select(e).select("text").node().getBBox().width,s=a(v,i))}}},function(t,e,r){"use strict";var n=r(148);t.exports=function(t){var e,r=t.labels.default_fs_row,o=3,a=n(t);a.row>o&&(a.row>t.labels.max_allow_fs?(e=t.viz.zoom_ratio.y?t.zoom_behavior.scale()/t.viz.zoom_ratio.y:t.zoom_behavior.scale(),e<1&&(e=1),r=t.labels.max_allow_fs/e,d3.selectAll(t.root+" .row_label_group").select("text").style("font-size",r+"px").attr("y",.5*t.viz.rect_height+.35*r)):d3.selectAll(t.root+" .row_label_group").select("text").style("font-size",t.labels.default_fs_row+"px").attr("y",.5*t.viz.rect_height+.35*t.labels.default_fs_row)),a.col>o&&(a.col>t.labels.max_allow_fs?(e=t.viz.zoom_ratio.x>1?t.zoom_behavior.scale()/t.viz.zoom_ratio.x:t.zoom_behavior.scale(),e<1&&(e=1),r=t.labels.max_allow_fs/e,r>.7*t.viz.rect_width&&(r=.7*t.viz.rect_width),d3.selectAll(t.root+" .col_label_text").select("text").style("font-size",r+"px")):d3.selectAll(t.root+" .col_label_text").select("text").style("font-size",t.labels.default_fs_col+"px"))}},function(t,e){"use strict";t.exports=function(t){var e={};return t.viz.zoom_ratio.x>1?(e.row=t.labels.default_fs_row*t.zoom_behavior.scale(),e.col=t.labels.default_fs_col*t.zoom_behavior.scale()):(e.row=t.labels.default_fs_row*t.zoom_behavior.scale()/t.viz.zoom_ratio.y,e.col=t.labels.default_fs_col*t.zoom_behavior.scale()),e}},function(t,e){"use strict";t.exports=function(t){t.zoom_info.zoom_x*t.viz.border_width.x>1?d3.selectAll(t.root+" .vert_lines").select("line").style("display","block").style("opacity",0).transition().style("opacity",1):d3.selectAll(t.root+" .vert_lines").select("line").style("display","none"),t.zoom_info.zoom_y*t.viz.border_width.y>1?d3.selectAll(t.root+" .horz_lines").select("line").style("display","block").style("opacity",0).transition().style("opacity",1):d3.selectAll(t.root+" .horz_lines").select("line").style("display","none")}},function(t,e,r){"use strict";var n=r(141),o=r(100);t.exports=function(t){var e=t.params,r=e.viz,a=2.75;d3.select(e.root+" .row_cat_label_container").empty()&&(d3.select(t.params.viz.viz_svg).append("g").classed("row_cat_label_container",!0),d3.select(t.params.viz.viz_svg+" .row_cat_label_container").append("g").classed("row_cat_label_bar_container",!0));var i=r.clust.margin.left+r.clust.dim.width+r.uni_margin,s=r.norm_labels.margin.top+r.norm_labels.width.col+2.5*r.uni_margin,l=1.15*r.cat_room.symbol_width,c=.65,u=1.25;d3.select(e.root+" .row_cat_label_container").attr("transform",function(){return i=r.norm_labels.margin.left+r.norm_labels.width.row+r.cat_room.symbol_width+a*r.uni_margin,s=r.clust.margin.top-r.uni_margin,"translate("+i+","+s+") rotate(-90)"}),d3.selectAll(e.root+" .row_cat_label_container text").remove(),d3.selectAll(e.root+" .row_cat_selection_bar").remove(),d3.selectAll(t.params.viz.root_tips+"_row_cat_super").remove();var d=50,f=-75,p=o().attr("class",function(){var t=e.viz.root_tips.replace(".",""),r=t+" d3-tip "+t+"_row_cat_super";return r}).direction("south_custom").offset([d,f]).style("display","none").style("opacity",0).html(function(t){var o,a=e.network_data.row_nodes[0][t];if(a.indexOf("<p>")>-1){var i=a.split(": ")[0],s=a.split("<p>")[1];o=i+"<p>"+s}else o=n(r,t,"row");return o}),h=u*r.cat_room.symbol_width,v=.9*h;if(d3.select(e.root+" .row_cat_label_container").selectAll().data(r.all_cats.row).enter().append("text").style("width","100px").style("height",v+"px").classed("row_cat_super",!0).style("font-size",l+"px").style("opacity",c).style("cursor","default").attr("transform",function(t){var e=u*r.cat_room.symbol_width*parseInt(t.split("-")[1],10);return"translate(0,"+e+")"}).text(function(t){return n(r,t,"row")}),d3.select(e.root+" .row_cat_label_container").selectAll().data(r.all_cats.row).enter().append("rect").classed("row_cat_super",!0).classed("row_cat_selection_bar",!0).style("height",v+"px").style("fill","green").style("width","120px").style("opacity",0).attr("transform",function(t){var e=h*(parseInt(t.split("-")[1],10)-.75);return"translate(0,"+e+")"}).on("mouseover",function(t){d3.selectAll(e.viz.root_tips+"_row_cat_super").style("display","block").style("opacity",1),p.show(t)}).on("mouseout",function(){p.hide(this),d3.selectAll(".d3-tip").style("display","none"),d3.selectAll(e.viz.root_tips+"_row_cat_super").style("display","none").style("opacity",0)}),d3.select(e.root+" .row_cat_selection_bar").empty()===!1&&d3.selectAll(e.root+" .row_cat_selection_bar").call(p),_.has(e.network_data,"row_cat_bars")){d3.select(e.root+" .enr_title").remove();var m=d3.select(e.root+" .viz_svg").append("g").classed("enr_title",!0).attr("transform",function(){var t=d3.select(e.root+" .row_cat_label_container").attr("transform").split("(")[1].split(")")[0],r=Number(t.split(",")[0])-10;return"translate("+String(r)+", 0)"});m.append("rect").attr("width",e.viz.cat_room.row).attr("height",25).attr("fill","white");var g=e.network_data.enrichrgram_lib.substring(0,40);m.append("text").attr("transform","translate(0, 17)").text(g.replace(/_/g," ")).style("font-size","15px").attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif'),d3.selectAll(e.root+" .enrichr_bars").remove();var y=e.viz.clust.margin.top-35,w=e.network_data.row_cat_bars[0],x=d3.scale.linear().domain([0,w]).range([0,y]);d3.select(e.root+" .row_cat_label_bar_container").selectAll().data(e.network_data.row_cat_bars).enter().append("rect").classed("enrichr_bars",!0).attr("height",v+"px").attr("fill","red").attr("width",function(t){var e=x(t);return e+"px"}).attr("opacity",.4).attr("transform",function(t,e){var r=h*(e-.75);return"translate(0, "+r+")"})}}},function(t,e,r){"use strict";var n=r(152);t.exports=function(t){var e,r=t.params;d3.select(r.root+" .expand_button").on("click",null);var o=.4;e=d3.select(r.root+" .expand_button").empty()?d3.select(r.viz.viz_svg).append("text").attr("class","expand_button"):d3.select(r.root+" .expand_button"),e.attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-family","FontAwesome").attr("font-size","30px").text(function(){return r.viz.is_expand===!1?"":""}).attr("y","25px").attr("x","25px").style("cursor","pointer").style("opacity",o).on("mouseover",function(){d3.select(this).style("opacity",.75)}).on("mouseout",function(){d3.select(this).style("opacity",o)}).on("click",function(){r.viz.is_expand===!1?(d3.select(this).text(function(){return""}),r.viz.is_expand=!0,d3.selectAll(r.root+" .borders").style("fill","white"),d3.select(r.root+" .sidebar_wrapper").style("display","none")):(d3.select(this).text(function(){return""}),r.viz.is_expand=!1,d3.selectAll(r.root+" .borders").style("fill","#eee"),d3.select(r.root+" .viz_wrapper").style("width","100px"),d3.select(r.root+" .sidebar_wrapper").style("display","block")),d3.select(r.viz.viz_svg).style("opacity",.5);var e=500;1==r.viz.run_trans&&(e=2500),setTimeout(n,e,t)})}},function(t,e,r){"use strict";var n=r(2),o=r(153),a=r(161),i=r(162),s=r(163),l=r(164),c=r(165),u=r(166),d=r(167),f=r(168),p=r(169),h=r(170),v=r(171),m=r(172),g=r(173),y=r(174),w=r(175),x=r(176),b=r(145),z=r(107),k=r(106),A=r(134),E=r(70),N=r(177),M=r(150),S=r(142),O=r(178),T=r(88),C=r(179);t.exports=function(t){var e=t.params,r=E(e);d3.select(e.root+" .play_button"),d3.select(e.root+" .sidebar_wrapper").style("height",r.height+"px"),d3.select(e.viz.viz_wrapper).style("margin-top",r.top+"px").style("width",r.width+"px").style("height",r.height+"px"),e=y(e),e.zoom_info=T(),i(e);var B=d3.select(e.viz.viz_svg);_.each(e.network_data.links,function(t){t.x=e.viz.x_scale(t.target),t.y=e.viz.y_scale(t.source)}),B.on(".zoom",null),e.zoom_behavior.scaleExtent([1,e.viz.square_zoom*e.viz.zoom_ratio.x]).on("zoom",function(){o(t)}),e.viz.do_zoom&&B.call(e.zoom_behavior),a(t),B.attr("width",e.viz.svg_dim.width).attr("height",e.viz.svg_dim.height),B.select(".super_background").style("width",e.viz.svg_dim.width).style("height",e.viz.svg_dim.height),B.select(".grey_background").attr("width",e.viz.clust.dim.width).attr("height",e.viz.clust.dim.height),setTimeout(N,100,e);var F=e.network_data.row_nodes,I=n.pluck(F,"name");w(e,B),B.selectAll(".highlighting_rect").attr("width",.8*e.viz.x_scale.rangeBand()).attr("height",.8*e.viz.y_scale.rangeBand()),f(e),d(e,B),p(e,B),B.selectAll(".row_label_group").each(function(){var t=d3.select(this).select("text")[0][0].getBBox();d3.select(this).select("rect").attr("x",t.x).attr("y",0).attr("width",t.width).attr("height",e.viz.rect_height).style("fill","yellow").style("opacity",function(t){var e=0;return 1===t.target&&(e=1),e})}),B.selectAll(".row_label_group").select("text").attr("y",.5*e.viz.rect_height+.35*e.labels.default_fs_row),n.has(e.network_data.row_nodes[0],"value")&&x(t,B),B.selectAll(".row_cat_group").attr("transform",function(t){var r=_.indexOf(I,t.name);return"translate(0, "+e.viz.y_scale(r)+")"}),B.selectAll(".row_cat_group").select("path").attr("d",function(){var t=e.viz.cat_room.symbol_width-1,r=0,n=1,o=e.viz.rect_height/2,a=e.viz.cat_room.symbol_width-1,i=e.viz.rect_height,s="M "+t+","+r+" L "+n+","+o+", L "+a+","+i+" Z";return s});var j=!0;e.viz.show_dendrogram?(z(t,"row",j),z(t,"col",j),s(e,B),k(t,"row",0),k(t,"col",0)):s(e,B),h(e,B),v(e,B),m(e,B),g(e,B),l(e,B),c(e.viz,B),C(e),u(e,B),e.zoom_behavior.scale(1).translate([e.viz.clust.margin.left,e.viz.clust.margin.top]),b(e),d3.select(e.root+" .clust_container").attr("transform","translate("+e.viz.clust.margin.left+","+e.viz.clust.margin.top+")"),t.params.viz.ds_level===-1&&A(t),M(t),d3.select(e.viz.viz_svg).style("opacity",1),S(t),d3.select(t.params.root+" .row_slider_group").style("opacity",0),d3.select(t.params.root+" .col_slider_group").style("opacity",0),setTimeout(O,500,t,"row"),setTimeout(O,500,t,"col")}},function(t,e,r){"use strict";var n=r(154),o=r(159),a=r(160);t.exports=function(t){var e=t.params,r={};if(r.zoom_x=d3.event.scale,r.zoom_y=d3.event.scale,r.trans_x=e.zoom_behavior.translate()[0]-e.viz.clust.margin.left,r.trans_y=e.zoom_behavior.translate()[1]-e.viz.clust.margin.top,d3.selectAll(e.viz.root_tips).style("display","none"),e.zoom_info=o(e,r),e.zoom_info=a(e,r),e.is_slider_drag===!1&&e.is_cropping===!1){var i=e.zoom_info.trans_x+e.viz.clust.margin.left,s=e.zoom_info.trans_y+e.viz.clust.margin.top;e.zoom_behavior.translate([i,s]),t.params=e,n(t)}}},function(t,e,r){"use strict";var n=r(147),o=r(134),a=r(155),i=r(114),s=r(129),l=r(156),c=r(158);t.exports=function(t){function e(t){var e=t.params,r=c(e);r===!0&&setTimeout(l,50,t)}var r=t.params,u=r.zoom_info,d=s(r);d3.select(r.root+" .clust_group").attr("transform","translate("+[u.trans_x,u.trans_y]+") scale("+u.zoom_x+","+u.zoom_y+")"),
d3.select(r.root+" .row_label_zoom_container").attr("transform","translate("+[0,u.trans_y]+") scale("+u.zoom_y+")"),d3.select(r.root+" .col_zoom_container").attr("transform","translate("+[u.trans_x,0]+") scale("+u.zoom_x+")"),d3.select(r.root+" .row_cat_container").attr("transform","translate("+[0,u.trans_y]+") scale( 1,"+u.zoom_y+")"),d3.select(r.root+" .row_dendro_container").attr("transform","translate("+[r.viz.uni_margin/2,u.trans_y]+") scale( 1,"+u.zoom_y+")"),d3.select(r.root+" .row_dendro_icons_group").attr("transform",function(){var t=u.trans_y,e="translate("+[0,t]+") ",r="scale(1, "+u.zoom_y+")",n=e+r;return n}),d3.select(r.root+" .col_dendro_icons_group").attr("transform",function(){var t=u.trans_x,e="translate("+[t,0]+")",r="scale("+u.zoom_x+", 1)",n=e+r;return n}),i(r,u,"row"),i(r,u,"col"),d3.select(r.root+" .col_cat_container").attr("transform","translate("+[u.trans_x,0]+") scale("+u.zoom_x+",1)"),d3.select(r.root+" .col_dendro_container").attr("transform","translate("+[u.trans_x,r.viz.uni_margin/2]+") scale("+u.zoom_x+",1)"),a(r,u),d3.select(r.root+" .viz_svg").attr("is_zoom",function(){var t=Number(d3.select(r.root+" .viz_svg").attr("is_zoom"));return d3.select(r.root+" .viz_svg").attr("stopped_zoom",1),t+1});var f=function(){d3.select(r.root+" .viz_svg").attr("is_zoom",function(){var t=Number(d3.select(r.root+" .viz_svg").attr("is_zoom"));return t-1})};if(n(r),u.zoom_y<=d.zoom_y){var p=!1;u.zoom_y<d.zoom_y&&(p=!0);var _=!1;o(t,_,p)}setTimeout(f,50),setTimeout(e,100,t)}},function(t,e,r){"use strict";var n=r(2);t.exports=function(t){var e=t.zoom_info;n.has(t.network_data.row_nodes[0],"value")&&d3.selectAll(t.root+" .row_bars").attr("width",function(r){var n=0;return n=t.labels.bar_scale_row(Math.abs(r.value))/e.zoom_y}).attr("x",function(r){var n=0;return n=-t.labels.bar_scale_row(Math.abs(r.value))/e.zoom_y}),n.has(t.network_data.col_nodes[0],"value")&&d3.selectAll(t.root+" .col_bars").attr("width",function(r){var n=0;return r.value>0&&(n=t.labels.bar_scale_col(r.value)/e.zoom_x),n})}},function(t,e,r){"use strict";var n=r(147),o=r(146),a=r(157),i=r(149),s=r(134),l=r(158);t.exports=function(t){function e(){_.each(["row","col"],function(t){d3.selectAll(r.root+" ."+t+"_label_group").filter(function(){return"none"!=d3.select(this).style("display")}).select("text").style("font-size",function(){var t=Number(d3.select(this).style("font-size").replace("px",""));return t})})}var r=t.params,c=l(r);if(c===!0){_.each(["row","col"],function(t){d3.selectAll(r.root+" ."+t+"_label_group").select("text").style("opacity",1),d3.selectAll(r.root+" ."+t+"_cat_group").select("path").style("display","block")}),s(t,!0),d3.selectAll(r.viz.root_tips).style("display","block"),d3.selectAll(r.root+" .row_label_group").select("text").style("display","none"),d3.selectAll(r.root+" .row_label_group").select("text").style("display","block"),d3.select(r.root+" .viz_svg").attr("stopped_zoom",0),d3.selectAll(r.root+" .row_label_group").select("text").style("display","block"),d3.selectAll(r.root+" .col_label_group").select("text").style("display","block"),i(r),t.params.viz.x_offset=0;var u=150;_.each(["row","col"],function(t){var e=a(r,t);e<u&&d3.selectAll(r.root+" ."+t+"_label_group").each(function(){o(r,this,t)})}),e(),n(r),setTimeout(e,100)}}},function(t,e){"use strict";t.exports=function(t,e){var r;return"row"===e?(r=1e4,t.viz.ds_level===-1&&(r=d3.selectAll(t.root+" .row")[0].length)):"col"===e&&(r=d3.selectAll(t.root+" ."+e+"_label_text").filter(function(){return"none"!=d3.select(this).style("display")})[0].length),r}},function(t,e){"use strict";t.exports=function(t){var e=Number(d3.select(t.root+" .viz_svg").attr("is_zoom")),r=Number(d3.select(t.root+" .viz_svg").attr("stopped_zoom")),n=!1;return 0===e&&0!=r&&(n=!0),n}},function(t,e){"use strict";t.exports=function(t,e){var r=t.viz;return r.zoom_ratio.y>1&&(e.zoom_y<r.zoom_ratio.y?(e.trans_y=0,e.zoom_y=1):e.zoom_y=e.zoom_y/r.zoom_ratio.y),e.pan_room_y=(e.zoom_y-1)*r.clust.dim.height,e.trans_y>=0?e.trans_y=0:e.trans_y<=-e.pan_room_y&&(e.trans_y=-e.pan_room_y),e}},function(t,e){"use strict";t.exports=function(t,e){var r=t.viz;return r.zoom_ratio.x>1&&(e.zoom_x<r.zoom_ratio.x?e.zoom_x=1:e.zoom_x=e.zoom_x/r.zoom_ratio.x),e.pan_room_x=(e.zoom_x-1)*r.clust.dim.width,e.trans_x>0?e.trans_x=0:e.trans_x<=-e.pan_room_x&&(e.trans_x=-e.pan_room_x),e}},function(t,e,r){"use strict";var n=r(144);t.exports=function(t){var e=t.params;d3.selectAll(e.viz.zoom_element).on("dblclick.zoom",null),d3.select(e.viz.zoom_element).on("dblclick",function(){n(t,0,0,1)})}},function(t,e){"use strict";t.exports=function(t){var e=1,r=0,n=0,o=t.viz.clust.dim.height/2,a=-(e-1)*o;d3.select(t.root+" .clust_group").attr("transform","translate("+[0,0+a]+") scale(1,"+e+")translate("+[r,n]+")"),d3.select(t.root+" .row_label_zoom_container").attr("transform","translate("+[0,a]+") scale("+e+","+e+")translate("+[0,n]+")"),d3.select(t.root+" .row_cat_container").attr("transform","translate("+[0,a]+") scale(1,"+e+")translate("+[0,n]+")"),d3.select(t.root+" .row_dendro_container").attr("transform","translate("+[0,a]+") scale("+e+","+e+")translate("+[t.viz.uni_margin/2,n]+")"),d3.select(t.root+" .col_zoom_container").attr("transform"," scale(1,1)translate("+[r,0]+")"),d3.select(t.root+" .col_cat_container").attr("transform"," scale(1,1)translate("+[r,0]+")"),d3.select(t.root+" .col_dendro_container").attr("transform"," scale(1,1)translate("+[r,t.viz.uni_margin/2]+")"),d3.select(t.root+" .row_dendro_icons_group").attr("transform",function(){return"translate(0,0) scale(1)"}),d3.select(t.root+" .row_dendro_icons_group").selectAll("path").attr("transform",function(t){var e=7,r=t.pos_mid;return"translate("+e+","+r+") scale(1, 1)"})}},function(t,e){"use strict";t.exports=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n={};r===!1?n.run_transition=!1:n=r;var o,a=t.viz.duration,i=t.network_data.col_nodes,s=t.network_data.col_nodes_names;n.run_transition?(o=e.transition().delay(n.update).duration(a),e.selectAll(".col_cat_group").data(i,function(t){return t.name}).transition().delay(n.update).duration(a).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+",0)"}),e.selectAll(".col_dendro_group").data(i,function(t){return t.name}).transition().delay(n.update).duration(a).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+",0)"})):(o=e,e.selectAll(".col_cat_group").data(i,function(t){return t.name}).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+",0)"}),d3.select(t.root).selectAll(".col_dendro_group").data(i,function(t){return t.name}).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+",0)"}));var l,c;_.each(["row","col"],function(e){var r=t.viz.all_cats[e].length;for(l=0;l<r;l++)c="."+e+"_cat_rect_"+String(l),"row"===e?o.selectAll(c).attr("height",t.viz.y_scale.rangeBand()):o.selectAll(c).attr("width",t.viz.x_scale.rangeBand())});var u=t.viz.clust.margin.left+t.viz.clust.dim.width,d=t.viz.clust.margin.top,f=t.viz.dendro_room.row+t.viz.uni_margin;d3.select(t.root+" .viz_svg").select("row_dendro_outer_container").attr("transform","translate("+u+","+d+")"),d3.select(t.root+" .row_dendro_outer_container").select(".row_dendro_spillover").attr("width",f+"px").attr("height",t.viz.svg_dim.height),u=t.viz.clust.margin.left,d=t.viz.clust.margin.top+t.viz.clust.dim.height;var p=t.viz.dendro_room.col+t.viz.uni_margin;d3.select(t.root+" .col_dendro_outer_container").select(".col_dendro_spillover").attr("width",t.viz.svg_dim.width).attr("height",p+"px"),d3.select(t.root+" .col_dendro_outer_container").select(".col_dendro_spillover_top").attr("width",t.viz.svg_dim.width).attr("height",t.viz.svg_dim.height).attr("transform","translate(0,"+t.viz.dendro_room.col+")"),u=t.viz.clust.margin.left,d=0,d3.select(t.root+" .col_dendro_icons_container").attr("transform","translate("+u+","+d+")")}},function(t,e){"use strict";t.exports=function(t,e){var r,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o={},a=t.viz.duration;n===!1?o.run_transition=!1:o=n,r=o.run_transition?e.transition().delay(o.update).duration(a):e,r.select(".super_col_bkg").attr("height",t.viz.super_labels.dim.width+"px").attr("transform","translate("+t.viz.clust.margin.left+","+t.viz.grey_border_width+")"),r.select(".super_col").attr("transform",function(){var e=t.viz.clust.dim.width/2+t.viz.norm_labels.width.row,r=t.viz.super_labels.dim.width;return"translate("+e+","+r+")"}),r.select(".super_row_bkg").attr("width",t.viz.super_labels.dim.width+"px").attr("transform","translate("+t.viz.grey_border_width+",0)"),r.select(".super_row").attr("transform",function(){var e=t.viz.super_labels.dim.width,r=t.viz.clust.dim.height/2+t.viz.norm_labels.width.col;return"translate("+e+","+r+")"})}},function(t,e){"use strict";t.exports=function(t,e){var r,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o={},a=t.duration;n===!1?o.run_transition=!1:o=n,r=o.run_transition?e.transition().delay(o.update).duration(a):e,r.select(t.root+" .right_slant_triangle").attr("transform","translate("+t.clust.dim.width+","+t.norm_labels.width.col+")"),r.select(t.root+" .left_slant_triangle").attr("transform","translate(-1,"+t.norm_labels.width.col+")");var i=t.clust.margin.top+t.uni_margin/5;r.select(t.root+" .top_left_white").attr("width",t.clust.margin.left).attr("height",i);var s=t.clust.margin.left+t.clust.dim.width+t.uni_margin+t.dendro_room.row,l=t.norm_labels.margin.top+t.norm_labels.width.col;r.select(t.root+" .right_spillover_container").attr("transform",function(){return"translate("+s+", 0)"}),l=t.norm_labels.margin.top+t.norm_labels.width.col,r.select(t.root+" .right_spillover_container rect").attr("transform",function(){return"translate( 0,"+l+")"}),r.select(t.root+" .right_spillover").attr("height",t.svg_dim.height+"px");var c=t.clust.margin.left+t.clust.dim.width,u=l,d=t.dendro_room.row+t.uni_margin,f=t.cat_room.col+t.uni_margin;d3.select(t.root+" .dendro_row_spillover").attr("width",d).attr("height",f).attr("transform",function(){return"translate("+c+","+u+")"}),c=0,u=t.clust.margin.top+t.clust.dim.height,d=t.clust.margin.left,f=10*t.clust.dim.height,r.select(".dendro_col_spillover").attr("width",d).attr("height",f).attr("transform",function(){return"translate("+c+","+u+")"}),c=t.clust.margin.left+t.clust.dim.width,u=t.clust.margin.top+t.clust.dim.height,d=t.cat_room.col+t.clust.dim.width,f=t.cat_room.row+t.uni_margin,r.select(".dendro_corner_spillover").attr("width",d).attr("height",f).attr("transform",function(){return"translate("+c+","+u+")"}),c=t.clust.margin.left+t.clust.dim.width+t.uni_margin,u=t.norm_labels.margin.top+t.norm_labels.width.col+2.5*t.uni_margin;var p=2.75,_=1.2;t.show_categories.col&&d3.selectAll(t.root+" .col_cat_super").attr("transform",function(e){var r=parseInt(e.split("-")[1],10),n=u+_*t.cat_room.symbol_width*r;return"translate("+c+","+n+")"}),t.show_categories.row&&d3.select(t.root+" .row_cat_label_container").attr("transform",function(){return c=t.norm_labels.margin.left+t.norm_labels.width.row+t.cat_room.symbol_width+p*t.uni_margin,u=t.clust.margin.top-t.uni_margin,"translate("+c+","+u+") rotate(-90)"}),u=t.show_dendrogram?t.clust.margin.top+t.clust.dim.height+t.dendro_room.col-2*t.uni_margin:t.clust.margin.top+t.clust.dim.height,d3.select(t.root+" .bottom_spillover_container").attr("transform",function(){return"translate(0,"+u+")"}),r.select(t.root+" .bottom_spillover").attr("width",t.svg_dim.width).attr("height",2*t.svg_dim.height);var h=t.cat_room.col+1.5*t.uni_margin;d3.select(t.viz_svg+" .top_right_white").attr("fill",t.background_color).attr("width",2*t.clust.dim.width).attr("height",h).attr("transform",function(){var e=t.clust.margin.left+t.clust.dim.width,r=t.norm_labels.width.col+t.norm_labels.margin.top-t.uni_margin;return"translate("+e+", "+r+")"})}},function(t,e){"use strict";t.exports=function(t,e){e.select(".left_border").attr("width",t.viz.grey_border_width).attr("height",t.viz.svg_dim.height).attr("transform","translate(0,0)"),e.select(".right_border").attr("width",t.viz.grey_border_width).attr("height",t.viz.svg_dim.height).attr("transform",function(){var e=t.viz.svg_dim.width-t.viz.grey_border_width;return"translate("+e+",0)"}),e.select(".top_border").attr("width",t.viz.svg_dim.width).attr("height",t.viz.grey_border_width).attr("transform",function(){var t=0;return"translate("+t+",0)"}),e.select(".bottom_border").attr("width",t.viz.svg_dim.width).attr("height",t.viz.grey_border_width).attr("transform",function(){var e=t.viz.svg_dim.height-t.viz.grey_border_width;return"translate(0,"+e+")"})}},function(t,e){"use strict";t.exports=function(t,e){var r,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o={},a=t.viz.duration,i=t.network_data.row_nodes,s=t.network_data.row_nodes_names;n===!1?o.run_transition=!1:o=n,o.run_transition?(e.selectAll(".row_label_group").data(i,function(t){return t.name}).transition().delay(o.update).duration(a).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate(0,"+t.viz.y_scale(r)+")"}).attr("y",.5*t.viz.rect_height+.35*t.labels.default_fs_row),r=e.transition().delay(o.update).duration(a)):(e.selectAll(".row_label_group").data(i,function(t){return t.name}).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate(0,"+t.viz.y_scale(r)+")"}).attr("y",.5*t.viz.rect_height+.35*t.labels.default_fs_row),r=e),r.select(t.root+" .row_container").attr("transform","translate("+t.viz.norm_labels.margin.left+","+t.viz.clust.margin.top+")"),r.select(t.root+" .row_container").select(".white_bars").attr("width",t.viz.label_background.row).attr("height",30*t.viz.clust.dim.height+"px"),r.select(t.root+" .row_container").select(".row_label_container").attr("transform","translate("+t.viz.norm_labels.width.row+",0)")}},function(t,e){"use strict";t.exports=function(t){var e=6,r=e*t.viz.border_width.x,n=e*t.viz.border_width.y;d3.select(t.root+" .top_hlight").attr("width",t.viz.rect_width).attr("height",n).attr("transform",function(){return"translate("+t.viz.x_scale(t.matrix.click_hlight_x)+",0)"}),d3.select(t.root+" .left_hlight").attr("width",r).attr("height",t.viz.rect_width-.99*n).attr("transform",function(){return"translate("+t.viz.x_scale(t.matrix.click_hlight_x)+","+.99*n+")"}),d3.select(t.root+" .right_hlight").attr("width",r).attr("height",t.viz.rect_height-.99*n).attr("transform",function(){var e=t.viz.x_scale(t.matrix.click_hlight_x)+t.viz.rect_width-r;return"translate("+e+","+.99*n+")"}),d3.select(t.root+" .bottom_hlight").attr("width",function(){return t.viz.rect_width-1.98*r}).attr("height",n).attr("transform",function(){var e=t.viz.x_scale(t.matrix.click_hlight_x)+.99*r,o=t.viz.rect_height-n;return"translate("+e+","+o+")"}),d3.select(t.root+" .row_top_hlight").attr("width",t.viz.svg_dim.width).attr("height",n),d3.select(t.root+" .row_bottom_hlight").attr("width",t.viz.svg_dim.width).attr("height",n).attr("transform",function(){var e=t.viz.rect_height-n;return"translate(0,"+e+")"}),d3.select(t.root+" .col_top_hlight").attr("width",t.viz.clust.dim.height).attr("height",r).attr("transform",function(){var e=0,r=-(t.viz.clust.dim.height+t.viz.cat_room.col+t.viz.uni_margin);return"translate("+r+","+e+")"}),d3.select(t.root+" .col_bottom_hlight").attr("width",t.viz.clust.dim.height).attr("height",r).attr("transform",function(){var e=t.viz.rect_width-r,n=-(t.viz.clust.dim.height+t.viz.cat_room.col+t.viz.uni_margin);return"translate("+n+","+e+")"})}},function(t,e){"use strict";t.exports=function(t,e){var r,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o={},a=t.viz.duration;n===!1?o.run_transition=!1:o=n,r=o.run_transition?e.transition().delay(o.update).duration(a):e,r.select(".row_cat_outer_container").attr("transform","translate("+t.viz.norm_labels.width.row+",0)").select("white_bars").attr("width",t.viz.cat_room.row+"px").attr("height",function(){var e=t.viz.clust.dim.height;return e});var i=t.viz.clust.margin.left+t.viz.clust.dim.width,s=t.viz.clust.margin.top;r.select(".row_dendro_outer_container").attr("transform","translate("+i+","+s+")"),i=t.viz.clust.margin.left,s=t.viz.clust.margin.top+t.viz.clust.dim.height,r.select(" .col_dendro_outer_container").attr("transform",function(){return"translate("+i+","+s+")"})}},function(t,e){"use strict";t.exports=function(t,e){var r,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o={},a=t.viz.duration,i=t.network_data.col_nodes,s=t.network_data.col_nodes_names;n===!1?o.run_transition=!1:o=n,o.run_transition?(r=e.transition().delay(o.update).duration(a),e.selectAll(".col_label_text").data(i,function(t){return t.name}).transition().delay(o.update).duration(a).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+", 0) rotate(-90)"})):(r=e,e.selectAll(".col_label_text").data(i,function(t){return t.name}).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+", 0) rotate(-90)"}));var l=t.viz.x_scale.rangeBand()/2+t.viz.border_width.x;r.select(t.root+" .col_container").attr("transform","translate("+t.viz.clust.margin.left+","+t.viz.norm_labels.margin.top+")"),r.select(t.root+" .col_container").select(".white_bars").attr("width",30*t.viz.clust.dim.width+"px").attr("height",t.viz.label_background.col),r.select(t.root+" .col_container").select(".col_label_outer_container").attr("transform","translate(0,"+t.viz.norm_labels.width.col+")"),r.selectAll(".col_label_group").attr("transform","translate("+t.viz.x_scale.rangeBand()/2+","+l+") rotate(45)"),r.selectAll(".col_label_group").select("text").attr("y",.6*t.viz.x_scale.rangeBand()).attr("dx",2*t.viz.border_width.x)}},function(t,e,r){"use strict";var n=r(2);t.exports=function(t,e){e.selectAll(".col_label_group").select("text").style("font-size",t.labels.default_fs_col+"px").text(function(t){return n.normal_name(t)}),e.selectAll(".col_label_group").each(function(){d3.select(this).select("text")[0][0].getBBox()})}},function(t,e,r){"use strict";var n=r(138);t.exports=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=e.selectAll(".col_label_group").select("path"),a={},i=t.viz.duration;r===!1?a.run_transition=!1:a=r;var s;s=a.run_transition?o.transition().delay(a.update).duration(i):o,s.attr("d",function(){return n(t)}).attr("fill","#eee")}},function(t,e,r){"use strict";var n=r(2);t.exports=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o={};r===!1?o.run_transition=!1:o=r,n.has(t.network_data.col_nodes[0],"value")&&e.selectAll(".col_bars").data(t.network_data.col_nodes,function(t){return t.name}).attr("width",function(e){var r=0;return e.value>0&&(r=t.labels.bar_scale_col(e.value)),r}).attr("height",.66*t.viz.rect_width)}},function(t,e,r){"use strict";var n=r(71),o=r(74),a=r(73),i=r(83),s=r(82);t.exports=function(t){if(t=n(t),t.viz=a(t.viz),t.viz=o(t.viz),t.sim_mat&&(t.viz.clust.dim.width<=t.viz.clust.dim.height?t.viz.clust.dim.height=t.viz.clust.dim.width:t.viz.clust.dim.width=t.viz.clust.dim.height),t.viz=s(t.viz),t.viz.x_scale.rangeBands([0,t.viz.clust.dim.width]),t.viz.y_scale.rangeBands([0,t.viz.clust.dim.height]),t.viz.border_width.x=t.viz.x_scale.rangeBand()/t.viz.border_fraction,t.viz.border_width.y=t.viz.y_scale.rangeBand()/t.viz.border_fraction,t.viz.rect_width=t.viz.x_scale.rangeBand()-t.viz.border_width.x,t.viz.rect_height=t.viz.y_scale.rangeBand()-t.viz.border_width.y,null!=t.viz.ds)for(var e;e<t.viz.ds.length;e++)t.viz.ds[e].rect_height=t.viz.ds[e].y_scale.rangeBand()-t.viz.border_width.y;return t.viz.ds_num_levels>0&&_.each(t.viz.ds,function(e){e.y_scale=d3.scale.ordinal().rangeBands([0,t.viz.clust.dim.height]),e.y_scale.domain(d3.range(e.num_rows+1)),e.rect_height=e.y_scale.rangeBand()-t.viz.border_width.y}),t.viz.square_zoom=t.viz.norm_labels.width.col/(t.viz.rect_width/2),t=i(t)}},function(t,e,r){"use strict";var n=r(95),o=r(96),a=r(99);t.exports=function(t,e){var r=t.network_data.row_nodes_names;if(t.viz.ds_level===-1)e.selectAll(".row").attr("transform",function(e){var n=_.indexOf(r,e.name),o=t.viz.y_scale(n);return"translate(0,"+o+")"}),e.selectAll(".row").selectAll(".tile").attr("transform",function(e){return a(t,e)}).attr("width",t.viz.rect_width).attr("height",t.viz.rect_height),e.selectAll(".row").selectAll(".tile_up").attr("d",function(){return n(t)}).attr("transform",function(e){return a(t,e)}),e.selectAll(".row").selectAll(".tile_dn").attr("d",function(){return o(t)}).attr("transform",function(e){return a(t,e)});else{var i=t.viz.ds_level,s=".ds"+String(i)+"_row",l=t.viz.ds[i].rect_height;e.selectAll(s).attr("transform",function(e){var r=t.viz.ds[i].y_scale(e.row_index);return"translate(0,"+r+")"}),e.selectAll(s).selectAll(".tile").attr("transform",function(e){return a(t,e)}).attr("width",t.viz.rect_width).attr("height",l)}}},function(t,e,r){"use strict";var n=r(75);t.exports=function(t,e){var r=t.params;r=n(r),e.selectAll(".row_bars").attr("width",function(t){var e=0;return e=r.labels.bar_scale_row(Math.abs(t.value))}).attr("x",function(t){var e=0;return e=-r.labels.bar_scale_row(Math.abs(t.value))}).attr("height",r.viz.y_scale.rangeBand())}},function(t,e){"use strict";t.exports=function(t){var e=d3.select(t.root+" .clust_container").attr("transform"),r=Number(e.split("(")[1].split(",")[0]),n=Number(e.split(",")[1].replace(")","")),o=r+t.viz.clust.dim.width/2,a=n+t.viz.clust.dim.height/2;d3.select(t.root+" .play_button").attr("transform",function(){return"translate("+o+","+a+")"})}},function(t,e){"use strict";t.exports=function(t,e){var r,n,o=t.params.viz;if("row"===e){var a=o.svg_dim.width-3*o.uni_margin;r=o.clust.margin.left+o.clust.dim.width+5.25*o.dendro_room.row,r>a&&(r=a),n=o.clust.margin.top+3*o.uni_margin-50}else r=2*o.uni_margin,n=o.clust.margin.top+o.clust.dim.height+o.dendro_room.col-2*o.uni_margin;d3.select(t.params.root+" ."+e+"_tree_group").attr("transform",function(){var t;return n-=75,t="translate("+r+","+n+")"}).style("opacity",1),d3.select(t.params.root+" ."+e+"_slider_group").attr("transform",function(){var t;return"row"===e?(r+=.8*o.dendro_room.row,n+=65,t="translate("+r+","+n+")"):t="translate("+r+","+n+"), rotate(-90)",t}).style("opacity",1)}},function(t,e){"use strict";t.exports=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=0;e>0&&(r=2e3);var n=d3.selectAll(t.root+" .horz_lines"),o=d3.selectAll(t.root+" .vert_lines");n.style("opacity",0).attr("transform",function(e){var r=e.row_index,n=t.viz.y_scale(r);return"translate( 0,"+n+") rotate(0)"}).transition().duration(e).delay(r).style("opacity",1),n.append("line").attr("x1",0).attr("x2",t.viz.clust.dim.width).style("stroke-width",function(){var e=t.viz.border_width.y;return e+"px"}),o.style("opacity",0).attr("transform",function(e){var r=e.col_index,n=t.viz.x_scale(r);return"translate("+n+") rotate(-90)"}).transition().duration(e).delay(r).style("opacity",1),o.append("line").attr("x1",0).attr("x2",-t.viz.clust.dim.height).style("stroke-width",function(){var e=t.viz.border_width.x;return e+"px"})}},function(t,e,r){"use strict";var n=r(181),o=r(100),a=r(182),i=r(183),s=r(184);t.exports=function(t){var e=t.params;d3.select(e.root+" .col_cat_outer_container").empty()?d3.select(e.root+" .col_container").append("g").attr("class","col_cat_outer_container").attr("transform",function(){var t=e.viz.norm_labels.width.col+2;return"translate(0,"+t+")"}).append("g").attr("class","col_cat_container"):d3.select(e.root+" .col_container").select("col_cat_outer_container").attr("transform",function(){var t=e.viz.norm_labels.width.col+2;return"translate(0,"+t+")"}),d3.selectAll(e.viz.root_tips+"_col_cat_tip").remove();var r=o().attr("class",function(){var t=e.viz.root_tips.replace(".",""),r=t+" d3-tip "+t+"_col_cat_tip";return r}).direction("s").offset([5,0]).style("display","none").html(function(t){return n(e,t,this,"col")});d3.select(e.root+" .col_cat_container").selectAll("g").data(e.network_data.col_nodes,function(t){return t.name}).enter().append("g").attr("class","col_cat_group").attr("transform",function(t){var r=_.indexOf(e.network_data.col_nodes_names,t.name);return"translate("+e.viz.x_scale(r)+",0)"}),d3.select(e.root+" .col_cat_container").selectAll(".col_cat_group").call(r),d3.selectAll(e.root+" .col_cat_group").each(function(){var t,n=this;_.each(e.viz.all_cats.col,function(o){var l=parseInt(o.split("-")[1],10),c="col_cat_rect_"+String(l);t=d3.select(n).select("."+c).empty()?d3.select(n).append("rect").attr("class",c).attr("cat",o).attr("transform",function(){var t=e.viz.cat_room.symbol_width+e.viz.cat_room.separation,r=l*t;return"translate(0,"+r+")"}).on("click",function(t){if(d3.select(this).classed("cat_strings")){var r=s(e,t,this,"col");$(e.root+" .dendro_info").modal("toggle");var n=r.join(", ");d3.select(e.root+" .dendro_info input").attr("value",n)}}):d3.select(n).select("."+c),t.attr("width",e.viz.x_scale.rangeBand()).attr("height",e.viz.cat_room.symbol_width).style("fill",function(t){var r=t[o],n=e.viz.cat_colors.col[o][r];return n}).on("mouseover",r.show).on("mouseout",function(){r.hide(this),a(e),d3.select(this).classed("hovering",!1),d3.selectAll(".d3-tip").style("display","none")}),i(e.viz,"col",t,o)})})}},function(t,e,r){"use strict";var n=r(141);t.exports=function(t,e,r,o){function a(){var e=!1;if(d3.select(r).classed("hovering")){var n=[o];t.viz.sim_mat&&(n=["row","col"]),_.each(n,function(r){"string"==typeof l&&l.indexOf("Not ")<0&&"false"!=l&&(e=!0),e&&d3.selectAll(t.root+" ."+r+"_cat_group").selectAll("rect").style("opacity",function(e){var r=d3.select(this).style("opacity");if(d3.select(this).classed("cat_strings")&&d3.select(this).classed("filtered_cat")===!1){var n,o=d3.select(this).attr("cat");n=e[o].indexOf(": ")>=0?e[o].split(": ")[1]:e[o],r=o===i&&n===l?t.viz.cat_colors.active_opacity:t.viz.cat_colors.opacity/4}return r})})}}d3.selectAll(t.viz.root_tips+"_col_cat_tip").style("display","block"),d3.selectAll(t.viz.root_tips+"_row_cat_tip").style("display","block");var i=d3.select(r).attr("cat"),s=n(t.viz,i,o),l=e[i];"string"==typeof l&&l.indexOf(": ")>=0&&(l=l.split(": ")[1]);var c=s+": "+l;return d3.select(r).classed("hovering",!0),setTimeout(a,500),c}},function(t,e){"use strict";t.exports=function(t){_.each(["row","col"],function(e){d3.selectAll(t.root+" ."+e+"_cat_group").selectAll("rect").style("opacity",function(){var e=d3.select(this).style("opacity");return d3.select(this).classed("cat_strings")&&d3.select(this).classed("filtered_cat")===!1&&(e=t.viz.cat_colors.opacity),e})})}},function(t,e){"use strict";t.exports=function(t,e,r,n){function o(t){"string"==typeof t&&t.indexOf(i)>-1&&(t=t.split(i)[1]);var e=parseFloat(t);return e}var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=": ",s=t.cat_info[e][n].type;"cat_strings"===s?a?r.classed("cat_strings",!0).style("opacity",0).transition().duration(1e3).style("opacity",t.cat_colors.opacity):r.classed("cat_strings",!0).style("opacity",t.cat_colors.opacity):r.classed("cat_values",!0).style("opacity",function(r){var a=r[n],i=o(a);return t.cat_info[e][n].cat_scale(Math.abs(i))}).style("fill",function(e){var r,a=o(e[n]);return r=a>0?t.cat_value_colors[0]:t.cat_value_colors[1]})}},function(t,e,r){"use strict";var n=r(2);t.exports=function(t,e,r,o){var a=d3.select(r).attr("cat"),i=e[a],s=t.network_data[o+"_nodes"],l=_.filter(s,function(t){return t[a]==i}),c=n.pluck(l,"name");return c}},function(t,e,r){"use strict";var n=r(181),o=r(100),a=r(182),i=r(183),s=r(184);t.exports=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.params;d3.select(r.root+" .row_cat_outer_container").empty()?d3.select(r.root+" .row_container").append("g").attr("class","row_cat_outer_container").attr("transform","translate("+r.viz.norm_labels.width.row+",0)").append("g").attr("class","row_cat_container"):d3.select(r.root+" .row_container").select("row_cat_outer_container").attr("transform","translate("+r.viz.norm_labels.width.row+",0)"),d3.select(r.root+" .row_cat_container").select(".white_bars").empty()?d3.select(r.root+" .row_cat_container").append("rect").attr("class","white_bars").attr("fill",r.viz.background_color).attr("width",r.viz.cat_room.row+"px").attr("height",function(){var t=r.viz.clust.dim.height;return t}):d3.select(r.root+" .row_cat_container").select(".white_bars").attr("fill",r.viz.background_color).attr("width",r.viz.cat_room.row+"px").attr("height",function(){var t=r.viz.clust.dim.height;return t}),d3.selectAll(r.viz.root_tips+"_row_cat_tip").remove();var l=o().attr("class",function(){var t=r.viz.root_tips.replace(".",""),e=t+" d3-tip "+t+"_row_cat_tip";return e}).direction("e").offset([5,0]).style("display","none").html(function(t){return n(r,t,this,"row")});d3.select(r.root+" .row_cat_container").selectAll("g").data(r.network_data.row_nodes,function(t){return t.name}).enter().append("g").attr("class","row_cat_group").attr("transform",function(t){var e=_.indexOf(r.network_data.row_nodes_names,t.name);return"translate(0, "+r.viz.y_scale(e)+")"}),d3.select(r.root+" .row_cat_container").selectAll(".row_cat_group").call(l);var c,u;d3.selectAll(r.root+" .row_cat_group rect").remove(),r.viz.show_categories.row&&d3.selectAll(r.root+" .row_cat_group").each(function(){u=this,_.each(r.viz.all_cats.row,function(t){var n=parseInt(t.split("-")[1],10),o="row_cat_rect_"+String(n);c=d3.select(u).select("."+o).empty()?d3.select(u).append("rect").attr("class",o).attr("cat",t):d3.select(u).select("."+o),c.attr("width",r.viz.cat_room.symbol_width).attr("height",r.viz.y_scale.rangeBand()).style("fill",function(e){var n=e[t],o=r.viz.cat_colors.row[t][n];return o}).attr("x",function(){var t=r.viz.cat_room.symbol_width+r.viz.uni_margin/2;return t+"px"}).attr("transform",function(){var t=r.viz.cat_room.symbol_width+r.viz.cat_room.separation,e=n*t;return"translate("+e+",0)"}).on("click",function(t){if(d3.select(this).classed("cat_strings")){var e=s(r,t,this,"row");$(r.root+" .dendro_info").modal("toggle");var n=e.join(", ");d3.select(r.root+" .dendro_info input").attr("value",n)}}).on("mouseover",l.show).on("mouseout",function(){l.hide(this),a(r),d3.select(this).classed("hovering",!1),d3.selectAll(".d3-tip").style("display","none")}),i(r.viz,"row",c,t,e)})})}},function(t,e,r){"use strict";var n=r(107);t.exports=function(t){var e=t.params,r=e.viz.dendro_room.row+e.viz.uni_margin,o=e.viz.clust.margin.left+e.viz.clust.dim.width,a=e.viz.clust.margin.top;d3.select(e.root+" .row_dendro_outer_container").empty()?(d3.select(e.root+" .viz_svg").append("g").attr("class","row_dendro_outer_container").attr("transform","translate("+o+","+a+")"),d3.select(e.root+" .row_dendro_outer_container").append("rect").classed("row_dendro_spillover",!0).attr("fill",e.viz.background_color).attr("width",r+"px").attr("height",e.viz.svg_dim.height),d3.select(e.root+" .row_dendro_outer_container").append("g").attr("class","row_dendro_container").attr("transform","translate("+e.viz.uni_margin/2+",0)")):(d3.select(e.root+" .viz_svg").select("row_dendro_outer_container").attr("transform","translate("+o+","+a+")"),d3.select(e.root+" .row_dendro_outer_container").select(".row_dendro_spillover").attr("width",r+"px").attr("height",e.viz.svg_dim.height)),n(t,"row",!1),"clust"!=e.viz.inst_order.col&&d3.selectAll(e.root+" .row_dendro_group").remove()}},function(t,e,r){"use strict";var n=r(107);t.exports=function(t){var e=t.params,r=e.viz.clust.margin.left,o=e.viz.clust.margin.top+e.viz.clust.dim.height,a=e.viz.dendro_room.col+e.viz.uni_margin;d3.select(e.root+" .col_dendro_outer_container").empty()?(d3.select(e.root+" .viz_svg").append("g").attr("class","col_dendro_outer_container").attr("transform","translate("+r+","+o+")"),d3.select(e.root+" .col_dendro_outer_container").append("rect").classed("col_dendro_spillover",!0).attr("fill",e.viz.background_color).attr("width",e.viz.svg_dim.width).attr("height",a+"px"),d3.select(e.root+" .col_dendro_outer_container").append("g").attr("class","col_dendro_container").attr("transform","translate(0,"+e.viz.uni_margin/2+")"),
d3.select(e.root+" .col_dendro_outer_container").append("rect").classed("col_dendro_spillover_top",!0).attr("fill",e.viz.background_color).attr("width",e.viz.svg_dim.width).attr("height",e.viz.svg_dim.height).attr("transform","translate(0,"+e.viz.dendro_room.col+")")):(d3.select(e.root+" .viz_svg").select("col_dendro_outer_container").attr("transform","translate("+r+","+o+")"),d3.select(e.root+" .col_dendro_outer_container").select(".col_dendro_spillover").attr("width",e.viz.svg_dim.width).attr("height",a+"px")),n(t,"col",!1),"clust"!=e.viz.inst_order.row&&d3.selectAll(e.root+" .col_dendro_group").remove()}},function(t,e,r){"use strict";var n=r(189);r(191);t.exports=function(t){n(t,"row"),n(t,"col")}},function(t,e,r){"use strict";var n=r(190),o=r(178);t.exports=function(t,e){function r(){t.params.is_slider_drag=!0;var r=d3.event.y;r<0&&(r=0),r>i&&(r=i),this.nextSibling&&this.parentNode.appendChild(this),r=d3.round(r,-1);var o=10-r/10;d3.select(this).attr("transform","translate(0, "+r+")"),n(t,e,o)}function a(){var r=d3.mouse(this),o=d3.round(r[1],-1);d3.select(t.params.root+" ."+e+"_group_circle").attr("transform","translate(0, "+o+")");var a=10-o/10;n(t,e,a)}var i=100,s=d3.behavior.drag().on("drag",r).on("dragend",function(){t.params.is_slider_drag=!1}),l=d3.select(t.params.root+" .viz_svg").append("g").classed(e+"_slider_group",!0);o(t,e);var c=i+20,u=30;l.append("rect").classed(e+"_slider_background",!0).attr("height",c+"px").attr("width",u+"px").attr("fill",t.params.viz.background_color).attr("transform",function(){var t="translate(-10, -5)";return t}).style("opacity",0),l.append("line").style("stroke-width",i/7+"px").style("stroke","black").style("stroke-linecap","round").style("opacity",0).attr("y1",0).attr("y2",function(){return i-2}).on("click",a);var d=-i/40;l.append("path").style("fill","black").attr("transform","translate("+d+", 0)").attr("d",function(){var t=0,e=0,r=0,n=i,o=i/10,a=0,s="M"+t+","+e+", L"+r+", "+n+", L"+o+","+a+" Z";return s}).style("opacity",.35).on("click",a);var f=.35,p=.6;l.append("circle").classed(e+"_group_circle",!0).attr("r",.08*i).attr("transform",function(){return"translate(0, "+i/2+")"}).style("fill","blue").style("opacity",f).on("mouseover",function(){d3.select(this).style("opacity",p)}).on("mouseout",function(){d3.select(this).style("opacity",f)}).call(s)}},function(t,e,r){"use strict";var n=r(107);t.exports=function(t,e,r){var o=t.params;"row"===e?o.group_level.row=r:"col"===e&&(o.group_level.col=r);var a=!0;n(t,e,a)}},function(t,e,r){"use strict";var n=r(178),o=r(100),a=r(192);t.exports=function(t,e){e="row";var r=40,i=t.params,s=.35,l=.6,c=o().attr("class",function(){var t=i.viz.root_tips.replace(".",""),e=t+"_tree_menu_tip d3-tip";return e}).direction("sw").style("display","none").offset([-10,-5]).html(function(){return"Clustering Menu"}),u=d3.select(i.root+" .viz_svg").append("g").classed(e+"_tree_group",!0).on("mouseover",function(){d3.select(i.root+" .tree_menu").empty()&&(d3.selectAll(i.viz.root_tips+"_tree_menu_tip").style("opacity",1).style("display","block"),c.show()),d3.selectAll(i.root+" .tree_leaf_circle").style("opacity",l)}).on("mouseout",function(){c.hide(),d3.selectAll(i.root+" .tree_leaf_circle").style("opacity",s)}).call(c),d=u.append("g").classed("dendro_tree_container",!0).on("click",function(){d3.select(i.root+" .tree_menu").empty()?(a(t,"open"),c.hide()):a(t,"close")});d3.select(i.root+" .dendro_tree_container").attr("transform","scale(0.9)"),n(t,e);var f=0,p=20;d.append("path").style("fill","black").attr("transform","translate("+f+", 0)").attr("d",function(){var t=0,e=r,n=p/2,o=0,a=p,i=r,s="M"+t+","+e+", L"+n+", "+o+", L"+a+","+i+" Z";return s}).style("opacity",.35);var _=30;d.append("path").style("fill","black").attr("transform","translate("+f+", 0)").attr("d",function(){var t=4.3,e=23,r=-5,n=_/2.5,o=5.8,a=_/1.8,i="M"+t+","+e+", L"+r+", "+n+", L"+o+","+a+" Z";return i}).style("opacity",.35),d.append("path").style("fill","black").attr("transform","translate("+f+", 0)").attr("d",function(){var t=15.7,e=23,r=25,n=_/2.5,o=14.2,a=_/1.8,i="M"+t+","+e+", L"+r+", "+n+", L"+o+","+a+" Z";return i}).style("opacity",.35);var h=13,v=9.5;d.selectAll().data([[-3,h,v],[p/2,0,17],[23,h,v]]).enter().append("circle").classed("tree_leaf_circle",!0).attr("r",function(t){return t[2]}).attr("transform",function(t){return"translate("+t[0]+", "+t[1]+")"}).attr("fill","blue").attr("opacity",s).attr(""),d.append("rect").attr("width",50).attr("height",62).attr("transform",function(){return"translate(-15, -19)"}).attr("opacity",0)}},function(t,e,r){"use strict";var n=r(193);t.exports=function(t,e){var r=t.params;"open"===e?n(t):"close"===e&&(d3.select(r.root+" .tree_menu").transition(700).attr("opacity",0),setTimeout(function(){d3.select(r.root+" .tree_menu").remove()},700))}},function(t,e,r){"use strict";var n=r(194);t.exports=function(t){function e(t){return t.charAt(0).toUpperCase()+t.slice(1)}var r=t.params,o=475,a=d3.select(r.root+" .viz_svg").append("g").attr("transform",function(){var t={};return t.x=r.viz.clust.dim.width+r.viz.clust.margin.left-o+25,t.y=r.viz.clust.margin.top,"translate("+t.x+", "+t.y+")"}).classed("tree_menu",!0);a.attr("opacity",0).transition().attr("opacity",1),a.append("rect").classed("tree_menu_background",!0).attr("width",function(){var t=o;return t}).attr("height",function(){var t=500;return t}).attr("fill","white").attr("stroke","#A3A3A3").attr("stroke-width","3px").attr("opacity",.95),a.append("text").classed("tree_menu_title",!0).attr("transform","translate(20,30)").attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-size","18px").attr("font-weight",800).attr("cursor","default").text("Clustering Menu");var i=["cosine","euclidean","correlation","jaccard"],s=30,l=110,c=80;a.append("text").attr("transform","translate(25, 70)").attr("font-size","18px").attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("cursor","default").text("Distance Metric"),a.append("rect").classed("tree_menu_line",!0).attr("height","2px").attr("width","435px").attr("stroke-width","3px").attr("opacity",.3).attr("fill","black").attr("transform","translate(20,"+c+")");var u=a.append("g").attr("transform","translate(20,"+l+")").classed("distance_section",!0),d=u.selectAll("g").data(i).enter().append("g").attr("transform",function(t,e){var r=e*s,n="translate(0,"+r+")";return n}).on("click",function(e){d3.select(r.root+" .tree_menu").transition(700).attr("opacity",0),setTimeout(function(){d3.select(r.root+" .tree_menu").remove()},700),t.params.matrix.distance_metric=e,n(t,e)});d.append("circle").attr("cx",10).attr("cy",-6).attr("r",7).style("stroke","#A3A3A3").style("stroke-width","2px").style("fill",function(e){var r="white";return e===t.params.matrix.distance_metric&&(r="red"),r}),d.append("text").attr("transform","translate(25,0)").style("font-size","16px").attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("cursor","default").text(function(t){return e(t)})}},function(t,e,r){"use strict";var n=r(195),o=r(12),a=o.create(),i=r(199),s=r(200),l=r(202);a.import(r(227)),a.import(r(25)),t.exports=function(t,e){var r={};r.N_row_sum="null",r.N_row_var="null",r.dist=e,r.nodes={},r.nodes.row_nodes=$.extend(!0,[],t.params.network_data.row_nodes),r.nodes.col_nodes=$.extend(!0,[],t.params.network_data.col_nodes),_.each(["row","col"],function(o){var l,c,u,d=a.transpose;"row"===o?(l=$.extend(!0,[],t.params.network_data.mat),c=t.params.network_data.row_nodes_names,u="row_nodes"):"col"===o&&(l=$.extend(!0,[],t.params.network_data.mat),l=d(l),c=t.params.network_data.col_nodes_names,u="col_nodes");for(var f,p,_=n.hcluster(l,i[e]),h=s(_,c),v=r.nodes[u],m=0;m<v.length;m++)f=v[m],p=h.info[m],f.clust=p.order,f.group=p.group}),t.config.network_data.views.push(r),l(t,"dist",e)}},function(t,e,r){"use strict";t.exports={hcluster:r(196),Kmeans:r(198),kmeans:r(198).kmeans}},function(t,e,r){"use strict";var n=r(197),o=function(t,e,r){this.distance=t||"euclidean",this.linkage=e||"average",this.threshold=void 0==r?1/0:r,"string"==typeof this.distance&&(this.distance=n[this.distance])};o.prototype={tree:function(t,e,r){this.tree=[],this.dists=[],this.mins=[],this.index=[];for(var n=0;n<t.length;n++){var o={value:t[n],key:n,index:n,size:1};this.tree[n]=o,this.index[n]=o,this.dists[n]=[],this.mins[n]=0}for(var n=0;n<this.tree.length;n++)for(var a=0;a<=n;a++){var i=n==a?1/0:this.distance(this.tree[n].value,this.tree[a].value);this.dists[n][a]=i,this.dists[a][n]=i,i<this.dists[n][this.mins[n]]&&(this.mins[n]=a)}this.dists_backup=$.extend(!0,[],this.dists);for(var s=this.mergeClosest(),n=0;s;)r&&n++%e==0&&r(this.tree),s=this.mergeClosest();return this.tree},mergeClosest:function(){for(var t=0,e=1/0,r=0;r<this.tree.length;r++){var n=this.tree[r].key,o=this.dists[n][this.mins[n]];o<e&&(t=n,e=o)}if(e>=this.threshold)return!1;var a=this.index[t],i=this.index[this.mins[t]],s={dist:e,left:a,right:i,key:a.key,size:a.size+i.size};this.tree[a.index]=s,this.tree.splice(i.index,1),this.index[a.key]=s;for(var r=0;r<this.tree.length;r++){var o,l=this.tree[r];a.key==l.key?o=1/0:"single"==this.linkage?(o=this.dists[a.key][l.key],this.dists[a.key][l.key]>this.dists[i.key][l.key]&&(o=this.dists[i.key][l.key])):"complete"==this.linkage?(o=this.dists[a.key][l.key],this.dists[a.key][l.key]<this.dists[i.key][l.key]&&(o=this.dists[i.key][l.key])):o="average"==this.linkage?(this.dists[a.key][l.key]*a.size+this.dists[i.key][l.key]*i.size)/(a.size+i.size):this.distance(l.value,a.value),this.dists[a.key][l.key]=this.dists[l.key][a.key]=o}for(var r=0;r<this.tree.length;r++){var c=this.tree[r].key;if(this.mins[c]==a.key||this.mins[c]==i.key){for(var e=c,u=0;u<this.tree.length;u++){var d=this.tree[u].key;this.dists[c][d]<this.dists[c][e]&&(e=d)}this.mins[c]=e}this.tree[r].index=r}return!0},clusters:function(t){function e(t){var e,r=-1;return t.forEach(function(t){t.dist>r&&(r=t.dist,e=t)}),e}function r(t){return 1===t.size?[t.value]:r(t.left).concat(r(t.right))}(t>this.tree.size||t<1)&&(t=this.tree.size);for(var n=[],o=[this.tree];t>1;){var a=e(o);o.splice(o.indexOf(a),1),o.push(a.left,a.right),t--}return o.forEach(function(t){n.push(r(t))}),n}};var a=function(t,e,r,n,a,i){var s=new o(e,r,n),l=s.tree(t,a,i);return{hc:s,tree:void 0===n?l[0]:l,clusters:s.clusters}};t.exports=a},function(t,e){"use strict";t.exports={euclidean:function(t,e){for(var r=0,n=0;n<t.length;n++)r+=Math.pow(e[n]-t[n],2);return Math.sqrt(r)},manhattan:function(t,e){for(var r=0,n=0;n<t.length;n++)r+=Math.abs(e[n]-t[n]);return r},max:function t(e,r){for(var t=0,n=0;n<e.length;n++)t=Math.max(t,Math.abs(r[n]-e[n]));return t}}},function(t,e,r){"use strict";function n(t){this.centroids=t||[]}var o=r(197);n.prototype.randomCentroids=function(t,e){var r=t.slice(0);return r.sort(function(){return Math.round(Math.random())-.5}),r.slice(0,e)},n.prototype.classify=function(t,e){var r=1/0,n=0;e=e||"euclidean","string"==typeof e&&(e=o[e]);for(var a=0;a<this.centroids.length;a++){var i=e(t,this.centroids[a]);i<r&&(r=i,n=a)}return n},n.prototype.cluster=function(t,e,r,n,a){e=e||Math.max(2,Math.ceil(Math.sqrt(t.length/2))),r=r||"euclidean","string"==typeof r&&(r=o[r]),this.centroids=this.randomCentroids(t,e);for(var i=new Array(t.length),s=new Array(e),l=0,c=!0;c;){for(var u=0;u<t.length;u++)i[u]=this.classify(t[u],r);c=!1;for(var d=0;d<e;d++){for(var f=[],u=0;u<i.length;u++)i[u]==d&&f.push(t[u]);if(f.length){for(var p=this.centroids[d],_=new Array(p.length),h=0;h<p.length;h++){for(var v=0,u=0;u<f.length;u++)v+=f[u][h];_[h]=v/f.length,_[h]!=p[h]&&(c=!0)}this.centroids[d]=_,s[d]=f}}a&&l++%n==0&&a(s)}return s},n.prototype.toJSON=function(){return JSON.stringify(this.centroids)},n.prototype.fromJSON=function(t){return this.centroids=JSON.parse(t),this},t.exports=n,t.exports.kmeans=function(t,e){return(new n).cluster(t,e)}},function(t,e){"use strict";function r(t,e){for(var r=0,n=0;n<t.length;n++)r+=t[n]*e[n];return r}function n(t){for(var e=0,r=0;r<t.length;r++)e+=t[r]*t[r];return Math.sqrt(e)}function o(t,e){for(var r=[],n=0;n<t.length;n++)r.push(t[n]-e);return r}function a(t){for(var e,r=0,n=0;n<t.length;n++)r+=t[n];return e=r/t.length}t.exports={euclidean:function(t,e){for(var r=0,n=0;n<t.length;n++)r+=Math.pow(e[n]-t[n],2);return Math.sqrt(r)},cosine:function(t,e){var o=r(t,e)/(n(t)*n(e)),a=1-o;return a},correlation:function(t,e){var i=a(t),s=a(e),l=o(t,i),c=o(e,s),u=r(l,c)/(n(l)*n(c)),d=1-u;return d}}},function(t,e,r){"use strict";var n=r(201);t.exports=function(t,e){function r(t,n,i,d,f){_.each(v,function(t){d<=h[t]?("above"===f[t]&&(l[t]=l[t]+1),f[t]="below"):f[t]="above"}),_.has(t,"dist")?(d=t.dist,i+=1,_.each(["left","right"],function(e){r(t[e],e,i,d,f)})):(a=t.key,_.each(v,function(t){"above"===f[t]&&(l[t]=l[t]+1)}),o={},o.level=i,o.order=s,o.group=$.extend(!0,[],l),o.key=a,o.dist=d,o.name=e[a],c.push(o),u.push(a),s+=1)}for(var o,a,i=n(t.hc.dists_backup),s=0,l=[],c=[],u=[],d=t.tree,f=1,p=d.dist,h=[],v=[],m=[],g=0;g<=10;g++)h.push(i*g/10),m.push("above"),l.push(0),v.push(g);_.each(["left","right"],function(t){r(d[t],t,f,p,m)}),c.sort(function(t,e){return t.key-e.key});var y,w=[];_.each(u,function(t){y=e[t],w.push(y)});var x={};return x.info=c,x.order=u,x.ordered_names=w,x}},function(t,e){"use strict";t.exports=function(t){var e=0;return _.each(t,function(t){_.each(t,function(t){isFinite(t)&&t>e&&(e=t)})}),e}},function(t,e,r){"use strict";var n=r(203),o=r(225);t.exports=function(t,e,r){var a={};a[e]=r,n(t,a),o(t,e,r)}},function(t,e,r){"use strict";var n=r(10),o=r(204),a=r(205);t.exports=function(t,e){o(t.params);var r=n(t.config,t.params,e);d3.select(t.params.root+" .crop_button").style("color","#337ab7").classed("fa-crop",!0).classed("fa-undo",!1).classed("active_cropping",!1),_.each(["row","col"],function(e){d3.select(t.params.root+" ."+e+"_dendro_icons_group").classed("ran_filter",!1),d3.select(t.params.root+" ."+e+"_dendro_icons_container").style("display","block")}),a(t,r)}},function(t,e){"use strict";t.exports=function(t){d3.selectAll(t.root+" .btn").attr("disabled",!0),d3.select(t.viz.viz_svg).style("opacity",.7)}},function(t,e,r){"use strict";var n=r(9),o=r(206),a=r(207),i=r(151),s=r(180),l=r(185),c=r(186),u=r(187),d=r(218),f=r(220),p=r(161),_=r(221),h=r(150),v=r(222),m=r(153),g=r(224),y=r(84);t.exports=function(t,e){function r(){d3.selectAll(".dendro_shadow").remove()}function w(){d3.select(t.params.viz.viz_svg).transition().duration(250).style("opacity",1),setTimeout(x,1e3)}function x(){d3.select(t.params.viz.viz_svg).classed("running_update",!1)}d3.select(t.params.viz.viz_svg).classed("running_update",!0),d3.selectAll(t.params.root+" .ds"+String(t.params.viz.ds_level)+"_row").remove(),null!=t.params.matrix_update_callback&&t.params.matrix_update_callback();var b=t.params.matrix.distance_metric,z=t.params.group_level,k=t.params.crop_filter_nodes,A=jQuery.extend(!0,{},t.config),E=null;if(null!=t.params.new_row_cats){v(t.params.new_row_cats,e.row_nodes),E=t.params.new_row_cats,t.params.new_row_cats=E;var N=!0;t.params.viz=y(t.params,t.params.viz,N)}A.network_data=e,A.inst_order=t.params.viz.inst_order,A.input_domain=t.params.matrix.opacity_scale.domain()[1],_(A,t.params),A.ini_view=null,A.current_col_cat=t.params.current_col_cat,A.cat_colors=t.params.viz.cat_colors;var M=n(A),S=o(t.params,M);t.params=M,t.params.zoom_behavior=d3.behavior.zoom().scaleExtent([1,t.params.viz.square_zoom*t.params.viz.zoom_ratio.x]).on("zoom",function(){m(t)}),t.params.matrix.distance_metric=b,t.params.group_level=z,t.params.crop_filter_nodes=k,0===t.params.viz.ds_num_levels?a(t,e,S):g(t),d3.select(t.params.viz.viz_svg).style("opacity",.7),l(t),h(t),t.params.viz.show_categories.col&&s(t),t.params.viz.show_dendrogram&&(c(t),u(t)),i(t),d3.select(t.params.viz.viz_svg).call(t.params.zoom_behavior),p(t),d(t),t.params.viz.run_trans=!0,setTimeout(f,2500,t.params),setTimeout(r,50),setTimeout(r,100),setTimeout(r,500),setTimeout(r,1e3),setTimeout(r,1500),setTimeout(w,S.enter)}},function(t,e){"use strict";t.exports=function(t,e){var r=t.network_data.row_nodes,n=t.network_data.col_nodes,o=_.map(r,function(t){return t.name}),a=_.map(n,function(t){return t.name}),i=o.concat(a),s=e.network_data.row_nodes,l=e.network_data.col_nodes,c=_.map(s,function(t){return t.name}),u=_.map(l,function(t){return t.name}),d=c.concat(u),f=_.difference(i,d).length,p=_.difference(d,i).length,h={};f>0?h.update=1e3:h.update=0,p>0?h.enter=1e3:h.enter=0,h.enter=h.enter+h.update,h.run_transition=!0;var v=t.network_data.links.length,m=e.network_data.links.length,g=.5*e.matrix.def_large_matrix;return(v>g||m>g)&&(h.run_transition=!1,h.update=0,h.enter=0),h}},function(t,e,r){"use strict";var n=r(208),o=r(101),a=r(131),i=r(209),s=r(213),l=r(91),c=r(214),u=r(217),d=r(145),f=r(100);t.exports=function(t,e,r){var p=t.params;d3.selectAll(p.viz.root_tips).remove();var _=f().attr("class",function(){var t=p.viz.root_tips.replace(".",""),e=t+" d3-tip "+t+"_tile_tip";return e}).direction("nw").offset([0,0]).style("display","none").html(function(t){var e,r=String(t.value.toFixed(3));if(p.keep_orig){var n=String(t.value_orig.toFixed(3));e="<p>"+t.row_name+" and "+t.col_name+"</p><p> normalized value: "+r+"</p><div> original value: "+n+"</div>"}else e="<p>"+t.row_name+" and "+t.col_name+"</p><div> value: "+r+"</div>";return e});d3.select(p.root+" .clust_group").call(_),u(p);for(var h=1e3,v=e.row_nodes,m=e.col_nodes,g=e.links,y=g,w=0;w<y.length;w++){var x=y[w];y[w].name=v[x.source].name+"_"+m[x.target].name}var b=d3.select(p.root+" .clust_group").selectAll(".row").data(p.matrix.matrix,function(t){return t.name});r.run_transition?b.transition().delay(r.update).duration(h).attr("transform",function(t){var e=t.row_index;return"translate(0,"+p.viz.y_scale(e)+")"}):b.attr("transform",function(t){var e=t.row_index;return"translate(0,"+p.viz.y_scale(e)+")"}),d3.select(p.root+" .clust_group").selectAll(".row").each(function(t){var e=this;i(p,t,r,h,e,_)}),d3.selectAll(p.root+" .horz_lines").remove(),d3.selectAll(p.root+" .vert_lines").remove(),s(p,r,h),n(t,h,r),c(p,r,h,_),o(t,h),a(t,h),l(p,r,h),setTimeout(d,2e3,p)}},function(t,e,r){"use strict";var n=r(2),o=r(74),a=r(71),i=r(73),s=r(162),l=r(163),c=r(164),u=r(165),d=r(167),f=r(169),p=r(170),h=r(171),v=r(172),m=r(173),g=r(176),y=r(83),w=r(82),x=r(88);t.exports=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;null===r&&(r={},r.enter=0,r.update=0,r.run_transition=!1);var b=t.params,z=t.params.network_data.row_nodes;b.zoom_info=x();var k=b.network_data.row_nodes_names;s(b),b=a(b),b.viz=i(b.viz),b.viz=o(b.viz),b.sim_mat&&(b.viz.clust.dim.width<=b.viz.clust.dim.height?b.viz.clust.dim.height=b.viz.clust.dim.width:b.viz.clust.dim.width=b.viz.clust.dim.height),b.viz=w(b.viz),b.viz.x_scale.rangeBands([0,b.viz.clust.dim.width]),b.viz.y_scale.rangeBands([0,b.viz.clust.dim.height]),b.viz.square_zoom=b.viz.norm_labels.width.col/(b.viz.x_scale.rangeBand()/2),b.zoom_behavior.scaleExtent([1,b.viz.square_zoom*b.viz.zoom_ratio.x]),b.viz.border_width.x=b.viz.x_scale.rangeBand()/b.viz.border_fraction,b.viz.border_width.y=b.viz.y_scale.rangeBand()/b.viz.border_fraction,b=y(b);var A=d3.select(b.viz.viz_wrapper).select("svg");A.select(b.root+" .grey_background").transition().delay(r.update).duration(e).attr("width",b.viz.clust.dim.width).attr("height",b.viz.clust.dim.height),d(b,A,r),A.selectAll(".row_label_group").select("text").style("font-size",b.labels.default_fs_row+"px").text(function(t){return n.normal_name(t)}),A.selectAll(".row_label_group").each(function(){var t=d3.select(this).select("text")[0][0].getBBox();d3.select(this).select("rect").attr("x",t.x).attr("y",0).attr("width",t.width).attr("height",b.viz.y_scale.rangeBand()).style("fill","yellow").style("opacity",function(t){var e=0;return 1===t.target&&(e=1),e})}),f(b,A,r),r.run_transition?(A.selectAll(".row_label_group").select("text").transition().delay(r.update).duration(e).attr("y",.5*b.viz.rect_height+.35*b.labels.default_fs_row),A.selectAll(".row_cat_group").data(z,function(t){return t.name}).transition().delay(r.update).duration(e).attr("transform",function(t){var e=_.indexOf(k,t.name);return"translate(0, "+b.viz.y_scale(e)+")"}),A.selectAll(".row_cat_group").select("path").transition().delay(r.update).duration(e).attr("d",function(){var t=b.viz.cat_room.symbol_width-1,e=0,r=1,n=b.viz.y_scale.rangeBand()/2,o=b.viz.cat_room.symbol_width-1,a=b.viz.y_scale.rangeBand(),i="M "+t+","+e+" L "+r+","+n+", L "+o+","+a+" Z";return i}),A.selectAll(".row_dendro_group").data(z,function(t){return t.name}).transition().delay(r.update).duration(e).attr("transform",function(t){var e=_.indexOf(k,t.name);return"translate(0, "+b.viz.y_scale(e)+")"})):(A.selectAll(".row_label_group").select("text").attr("y",.5*b.viz.rect_height+.35*b.labels.default_fs_row),A.selectAll(".row_cat_group").data(z,function(t){return t.name}).attr("transform",function(t){var e=_.indexOf(k,t.name);return"translate(0, "+b.viz.y_scale(e)+")"}),A.selectAll(".row_cat_group").select("path").attr("d",function(){var t=b.viz.cat_room.symbol_width-1,e=0,r=1,n=b.viz.y_scale.rangeBand()/2,o=b.viz.cat_room.symbol_width-1,a=b.viz.y_scale.rangeBand(),i="M "+t+","+e+" L "+r+","+n+", L "+o+","+a+" Z";return i}),A.selectAll(".row_dendro_group").data(z,function(t){return t.name}).attr("transform",function(t){var e=_.indexOf(k,t.name);return"translate(0, "+b.viz.y_scale(e)+")"})),n.has(b.network_data.row_nodes[0],"value")&&g(t,A),p(b,A,r),h(b,A),v(b,A,r),m(b,A,r),l(b,A,r),c(b,A,r),u(b.viz,A,r),b.zoom_behavior.scale(1).translate([b.viz.clust.margin.left,b.viz.clust.margin.top])}},function(t,e,r){"use strict";var n=r(210),o=r(211),a=r(212),i=r(97),s=r(98),l=r(99),c=r(68);t.exports=function(t,e,r,u,d,f){var p=e.row_data,h=_.filter(p,function(t){return 0!=t.value}),v=d3.select(d).selectAll(".tile").data(h,function(t){return t.col_name});n(t,r,v,p,d);var m=v.on("mouseover",function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];i(t,this,f,r)}).on("mouseout",function(){s(t,this,f)}),g=t.network_data.col_nodes_names;r.run_transition?m.transition().delay(r.update).duration(u).attr("width",t.viz.rect_width).attr("height",t.viz.rect_height).attr("transform",function(e){return c.contains(g,e.col_name)?l(t,e):"translate(0,0)"}):m.attr("width",t.viz.rect_width).attr("height",t.viz.rect_height).attr("transform",function(e){return c.contains(g,e.col_name)?l(t,e):"translate(0,0)"}),"updn"==t.matrix.tile_type&&a(t,p,d,r,u,v,f),o(t,r,u,v,f)}},function(t,e){"use strict";t.exports=function(t,e,r,n,o){if(e.run_transition?r.exit().transition().duration(300).attr("fill-opacity",0).remove():r.exit().attr("fill-opacity",0).remove(),"updn"==t.matrix.tile_type){var a=_.filter(n,function(t){return 0!=t.value_up||0!=t.value_dn}),i=d3.select(o).selectAll(".tile_up").data(a,function(t){return t.col_name});e.run_transition?i.exit().transition().duration(300).attr("fill","0").remove():i.exit().attr("fill",0).remove();var s=d3.select(o).selectAll(".tile_dn").data(a,function(t){return t.col_name});e.run_transition?s.exit().transition().duration(300).attr("fill",0).remove():s.exit().attr("fill",0).remove()}}},function(t,e,r){"use strict";var n=r(97),o=r(98),a=r(99);t.exports=function(t,e,r,i,s){var l=i.enter().append("rect").attr("class","tile row_tile").attr("width",t.viz.rect_width).attr("height",t.viz.rect_height).on("mouseover",function(){for(var e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];n(t,this,s,r)}).on("mouseout",function(){o(t,this,s)}).attr("fill-opacity",0).attr("transform",function(e){return a(t,e)});e.run_transition?l.transition().delay(e.enter).duration(r).style("fill",function(e){return e.value>0?t.matrix.tile_colors[0]:t.matrix.tile_colors[1]}).attr("fill-opacity",function(e){var r=t.matrix.opacity_scale(Math.abs(e.value));return r}):l.style("fill",function(e){return e.value>0?t.matrix.tile_colors[0]:t.matrix.tile_colors[1]}).attr("fill-opacity",function(e){var r=t.matrix.opacity_scale(Math.abs(e.value));return r}),l.each(function(t){Math.abs(t.value_up)>0&&Math.abs(t.value_dn)>0&&d3.select(this).remove()})}},function(t,e,r){"use strict";var n=r(95),o=r(96),a=r(97),i=r(98),s=r(99);t.exports=function(t,e,r,l,c,u,d){var f=_.filter(e,function(t){return 0!=t.value_up||0!=t.value_dn}),p=d3.select(r).selectAll(".tile_up").data(f,function(t){return t.col_name}),h=p.on("mouseover",function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];a(t,this,d,r)}).on("mouseout",function(){i(t,this,d)});l.run_transition?h.transition().delay(l.update).duration(c).attr("d",function(){return n(t)}).attr("transform",function(e){return s(t,e)}):h.attr("d",function(){return n(t)}).attr("transform",function(e){return s(t,e)});var v=d3.select(r).selectAll(".tile_dn").data(f,function(t){return t.col_name}),m=v.on("mouseover",function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];a(t,this,d,r)}).on("mouseout",function(){i(t,this,d)});l.run_transition?m.transition().delay(l.update).duration(c).attr("d",function(){return o(t)}).attr("transform",function(e){return s(t,e)}):m.attr("d",function(){return o(t)}).attr("transform",function(e){return s(t,e)}),u.selectAll(".tile").each(function(t){Math.abs(t.value_up)>0&&Math.abs(t.value_dn)>0&&d3.select(this).remove()})}},function(t,e){"use strict";t.exports=function(t,e,r){var n=t.network_data.row_nodes,o=t.network_data.col_nodes,a=d3.select(t.root+" .clust_group").selectAll(".row").data(t.matrix.matrix,function(t){return t.name}).exit();e.run_transition?a.transition().duration(r).style("opacity",0).remove():a.style("opacity",0).remove(),d3.selectAll(t.root+" .row_label_group").data(n,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .col_label_group").data(o,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .row_cat_group").data(n,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .row_dendro_group").data(n,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .col_label_text").data(o,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .horz_lines").data(n,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .vert_lines").data(o,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .col_cat_group").data(o,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .col_dendro_group").data(o,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove()}},function(t,e,r){"use strict";var n=r(215);t.exports=function(t,e,r,o){var a=d3.select(t.root+" .clust_group").selectAll(".row").data(t.matrix.matrix,function(t){return t.name}).enter().append("g").classed("row",!0).attr("transform",function(e){return"translate(0,"+t.viz.y_scale(e.row_index)+")"});a.each(function(a){n(t,a,e,r,o,this)})}},function(t,e,r){"use strict";var n=r(216),o=r(97),a=r(98),i=r(99);t.exports=function(t,e,r,s,l,c){var u=e.row_data,d=_.filter(u,function(t){return 0!==t.value}),f=d3.select(c).selectAll("rect").data(d,function(t){return t.col_name}).enter().append("rect").attr("class","tile row_tile").attr("width",t.viz.rect_width).attr("height",t.viz.rect_height).style("fill",function(e){return e.value>0?t.matrix.tile_colors[0]:t.matrix.tile_colors[1]}).on("mouseover",function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];o(t,this,l,r)}).on("mouseout",function(){a(t,this,l)});f.style("fill-opacity",0).transition().delay(r.enter).duration(s).style("fill-opacity",function(e){var r=t.matrix.opacity_scale(Math.abs(e.value));return r}),f.attr("transform",function(e){return i(t,e)}),"updn"==t.matrix.tile_type&&n(t,u,c,l,r,s,f)}},function(t,e,r){"use strict";var n=r(95),o=r(96),a=r(99);t.exports=function(t,e,r,i,s,l,c){var u=_.filter(e,function(t){return 0!=t.value_up||0!=t.value_dn}),d=d3.select(r).selectAll(".tile_up").data(u,function(t){return t.col_name}).enter().append("path").attr("class","tile_up").attr("d",function(){return n(t)}).attr("transform",function(e){return a(t,e)}).style("fill",function(){return t.matrix.tile_colors[0]}).on("mouseover",function(e){d3.selectAll(t.root+" .row_label_group text").classed("active",function(t){return e.row_name===t.name}),d3.selectAll(t.root+" .col_label_text text").classed("active",function(t){return e.col_name===t.name}),t.matrix.show_tile_tooltips&&i.show(e)}).on("mouseout",function(){d3.selectAll(t.root+" text").classed("active",!1),t.matrix.show_tile_tooltips&&i.hide()});d.style("fill-opacity",0).transition().delay(s.enter).duration(l).style("fill-opacity",function(e){var r=0;return Math.abs(e.value_dn)>0&&(r=t.matrix.opacity_scale(Math.abs(e.value_up))),r});var f=d3.select(r).selectAll(".tile_dn").data(u,function(t){return t.col_name}).enter().append("path").attr("class","tile_dn").attr("d",function(){return o(t)}).attr("transform",function(e){return a(t,e)}).style("fill",function(){return t.matrix.tile_colors[1]}).on("mouseover",function(e){d3.selectAll(t.root+" .row_label_group text").classed("active",function(t){return e.row_name===t.name}),d3.selectAll(t.root+" .col_label_text text").classed("active",function(t){return e.col_name===t.name}),t.matrix.show_tile_tooltips&&i.show(e)}).on("mouseout",function(){d3.selectAll(t.root+" text").classed("active",!1),t.matrix.show_tile_tooltips&&i.hide()});f.style("fill-opacity",0).transition().delay(s.enter).duration(l).style("fill-opacity",function(e){var r=0;return Math.abs(e.value_up)>0&&(r=t.matrix.opacity_scale(Math.abs(e.value_dn))),r}),c.each(function(t){Math.abs(t.value_up)>0&&Math.abs(t.value_dn)>0&&d3.select(this).remove()})}},function(t,e){"use strict";t.exports=function(t){d3.select(t.root+" .clust_container").attr("transform","translate("+t.viz.clust.margin.left+","+t.viz.clust.margin.top+")"),d3.select(t.root+" .col_label_outer_container").attr("transform","translate(0,"+t.viz.norm_labels.width.col+")"),d3.select(t.root+" .col_cat_outer_container").attr("transform",function(){var e=t.viz.norm_labels.width.col+2;return"translate(0,"+e+")"})}},function(t,e,r){"use strict";var n=(r(190),r(143)),o=r(142),a=r(219);t.exports=function(t){function e(e,r){var n=2-r,o=t.params.matrix.abs_max_val*n;t.params.matrix.opacity_scale.domain([0,o]),d3.selectAll(t.params.root+" .tile").style("fill-opacity",function(e){var r=t.params.matrix.opacity_scale(Math.abs(e.value));return r})}var r=t.params,i=d3.select(r.root+" .gene_search_box")[0][0],s=new Awesomplete(i,{minChars:1,maxItems:15}),l=t.params.network_data.row_nodes_names;s.list=l,d3.selectAll(".awesomplete ul").style("z-index",99),$(r.root+" .gene_search_box").keyup(function(e){if(13===e.keyCode){var n=$(r.root+" .gene_search_box").val();a(t,n,l)}}),$(r.root+" .submit_gene_button").off().click(function(){var e=$(r.root+" .gene_search_box").val();a(t,e,l)});var c;if(c=r.sim_mat?["both"]:["row","col"],_.each(c,function(e){$(r.root+" .toggle_"+e+"_order .btn").off().click(function(o){var a=$(o.target).attr("name").replace("_row","").replace("_col","");d3.selectAll(r.root+" .toggle_"+e+"_order .btn").classed("active",!1),d3.select(this).classed("active",!0),"both"!=e?n(t,a,e):(n(t,a,"row"),n(t,a,"col"))})}),o(t),d3.select(t.params.root+" .opacity_slider").select("#handle-one").empty()){var u=d3.slider().snap(!0).value(1).min(.1).max(1.9).step(.1).on("slide",function(t,r){e(t,r)});d3.select(t.params.root+" .opacity_slider").call(u)}}},function(t,e,r){"use strict";var n=r(144);t.exports=function(t,e,r){var o="name";if(r.indexOf(e)!==-1){d3.selectAll(t.params.root+" .row_label_group").select("rect").style("opacity",0);var a=_.indexOf(r,e),i=t.params.viz.y_scale(a),s=t.params.viz.clust.dim.height/2-i,l=t.params.viz.zoom_ratio.x;
n(t,0,s,l),t.params.zoom_info.zoom_y=l,d3.selectAll(t.params.root+" .row_label_group").filter(function(t){return t[o]===e}).select("rect").style("opacity",1)}}},function(t,e){"use strict";t.exports=function(t){t.dendro_filter.row===!1&&"clust"===t.viz.inst_order.col&&d3.select(t.root+" .row_slider_group").style("opacity",1).style("pointer-events","all"),d3.selectAll(t.root+" .toggle_row_order .btn").attr("disabled",null),t.dendro_filter.col===!1&&"clust"===t.viz.inst_order.row&&d3.select(t.root+" .col_slider_group").style("opacity",1).style("pointer-events","all"),d3.selectAll(t.root+" .toggle_col_order .btn").attr("disabled",null),d3.selectAll(t.root+" .gene_search_button .btn").attr("disabled",null),t.viz.run_trans=!1}},function(t,e){"use strict";t.exports=function(t,e){_.each(["row","col"],function(r){var n;n="row"===r?"col":"row",d3.selectAll(e.root+" .toggle_"+n+"_order .btn").filter(function(){return d3.select(this).attr("name")===t.inst_order[r]}).classed("active",!0)})}},function(t,e,r){"use strict";var n=r(223),o=r(2),a=r(68);t.exports=function(t,e){var r,i,s,l,c,u,d,f,p=arguments.length>2&&void 0!==arguments[2]&&arguments[2],h=0,v=0;_.each(e,function(e){l=e.name,p===!0&&(l.indexOf(" ")?l=l.split(" ")[0]:l.indexOf("_")&&(l=l.split("_")[0])),h=0,n(e),_.each(t,function(t){if(r=t.cat_title,i=t.cats,c="false",v=-1,f=0,_.each(i,function(t){u=t.cat_name,s=t.members,a.contains(s,l)&&(c=u,v=f),f+=1}),o.has(t,"pval")){var n=t.pval.toExponential();d=r+": "+c+"<p> Pval "+String(n)+"</p>"}else d=r.indexOf("cat-")===-1?r+": "+c:c;e["cat-"+String(h)]=d,e["cat_"+String(h)+"_index"]=v,h+=1})})}},function(t,e){"use strict";t.exports=function(t){var e=_.keys(t);_.each(e,function(e){e.indexOf("cat-")>-1&&delete t[e],e.indexOf("cat_")>-1&&delete t[e]})}},function(t,e,r){"use strict";var n=r(208),o=r(131),a=r(134),i=r(217);t.exports=function(t){d3.selectAll(t.params.root+" .row_cat_group").remove(),d3.selectAll(t.params.root+" .row_label_group").remove(),d3.selectAll(t.params.root+" .row").remove();var e=!0,r=!0,s=!0;a(t,e,r,s),o(t);var l=t.params.network_data.col_nodes;d3.selectAll(t.params.root+" .col_label_group").data(l,function(t){return t.name}).exit().style("opacity",0).remove(),d3.selectAll(t.params.root+" .col_label_text").data(l,function(t){return t.name}).exit().style("opacity",0).remove(),d3.selectAll(t.params.root+" .col_cat_group").data(l,function(t){return t.name}).exit().style("opacity",0).remove(),d3.selectAll(t.params.root+" .col_dendro_group").data(l,function(t){return t.name}).exit().style("opacity",0).remove(),i(t.params);var c={};c.enter=0,c.update=0,c.run_transition=!1;var u=0;n(t,u,c)}},function(t,e,r){"use strict";var n=r(226);t.exports=function(t,e,r){var o,a,i=t.params;d3.select(i.root+" .slider_"+e).attr("current_state",r),_.each(_.keys(i.viz.possible_filters),function(r){if(o=e.indexOf("row")>-1?"row":e.indexOf("col")>-1?"col":"neither",a=r.indexOf("row")>-1?"row":r.indexOf("col")>-1?"col":"neither",e!=r&&"neither"!=o&&o==a){var s=n(i,r);t.slider_functions[r].value(0),d3.select(i.root+" .title_"+r).text(s.text+s.state),d3.select(i.root+" .slider_"+r).attr("current_state",s.state)}});var s=n(i,e);d3.select(i.root+" .title_"+e).text(s.text+r+s.suffix)}},function(t,e,r){"use strict";var n=r(5);t.exports=function(t,e){var r={},o={},a={};return r.state=n(t.viz.filter_data,e),a.top=e.split("_")[0],a.node=e.split("_")[1],a.measure=e.split("_")[2],"row"===a.node?o.node="rows":o.node="columns","N"===a.top&&(r.suffix=""),"pct"===a.top&&(r.suffix="%"),"sum"==a.measure?o.measure="sum":"var"==a.measure&&(o.measure="variance"),"sum"===a.measure&&(r.text="Top "+o.node+" "+o.measure+": "),"var"===a.measure&&(r.text="Top "+o.node+" "+o.measure+": "),_.keys(t.viz.possible_filters).indexOf("enr_score_type")>-1&&"col"===a.node&&(r.text="Top Enriched Terms: ",r.suffix=""),r}},function(t,e,r){"use strict";function n(t,e,n,i){var s=r(45),l=n(r(43)),c=t.DenseMatrix,u=t.SparseMatrix,d=i("transpose",{Array:function(t){return d(l(t)).valueOf()},Matrix:function(t){var e,r=t.size();switch(r.length){case 1:e=t.clone();break;case 2:var n=r[0],o=r[1];if(0===o)throw new RangeError("Cannot transpose a 2D matrix with no columns (size: "+a(r)+")");switch(t.storage()){case"dense":e=f(t,n,o);break;case"sparse":e=p(t,n,o)}break;default:throw new RangeError("Matrix must be a vector or two dimensional (size: "+a(this._size)+")")}return e},any:function(t){return o(t)}}),f=function(t,e,r){for(var n,a=t._data,i=[],s=0;s<r;s++){n=i[s]=[];for(var l=0;l<e;l++)n[l]=o(a[l][s])}return new c({data:i,size:[r,e],datatype:t._datatype})},p=function(t,e,r){for(var n=t._values,a=t._index,i=t._ptr,s=n?[]:void 0,l=[],c=[],d=[],f=0;f<e;f++)d[f]=0;var p,_,h;for(p=0,_=a.length;p<_;p++)d[a[p]]++;for(var v=0,m=0;m<e;m++)c.push(v),v+=d[m],d[m]=c[m];for(c.push(v),h=0;h<r;h++)for(var g=i[h],y=i[h+1],w=g;w<y;w++){var x=d[a[w]]++;l[x]=h,n&&(s[x]=o(n[w]))}return new u({values:s,index:l,ptr:c,size:[r,e],datatype:t._datatype})};return d.toTex={1:"\\left(${args[0]}\\right)"+s.operators.transpose},d}var o=r(14).clone,a=r(29).format;e.name="transpose",e.factory=n},function(t,e,r){"use strict";var n=r(112);t.exports=function(t){var e=t.params.viz,r=e.clust.margin.left+e.clust.dim.width+e.uni_margin+e.dendro_room.row,o=d3.select(e.viz_svg).append("g").classed("right_spillover_container",!0).attr("transform",function(){return"translate("+r+", 0)"}),a=e.norm_labels.margin.top+e.norm_labels.width.col;o.append("rect").attr("fill",e.background_color).attr("width",10*e.clust.dim.width).attr("height",e.svg_dim.height+"px").attr("class","white_bars").attr("class","right_spillover").attr("transform",function(){return"translate( 0,"+a+")"});var i=0,s=e.clust.margin.top;o.append("g").classed("row_dendro_icons_container",!0).attr("transform","translate("+i+","+s+")").append("g").classed("row_dendro_icons_group",!0),n(t,"row"),i=e.clust.margin.left+e.clust.dim.width,s=a;var l=e.dendro_room.row+e.uni_margin,c=e.cat_room.col+e.uni_margin;d3.select(e.viz_svg).append("rect").attr("fill",e.background_color).attr("width",l).attr("height",c).attr("transform",function(){return"translate("+i+","+s+")"}).classed("white_bars",!0).classed("dendro_row_spillover",!0)}},function(t,e,r){"use strict";var n=r(230),o=r(231),a=r(233),i=r(234),s=r(236),l=r(237),c=r(239),u=r(240),d=r(241),f=r(242),p=r(243),_=r(244),h=r(245),v=r(246);t.exports=function(){var t=this,e=t.params;if(d3.select(e.root+" .running_demo").empty()){d3.select(e.root+" .play_button").classed("running_demo",!0),h(e,!1),$.blockUI({css:{border:"none",padding:"15px",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px",opacity:0,color:"#fff",cursor:"default"}}),d3.selectAll(".blockUI").style("opacity",0);var r=750;t.params.viz.is_expand===!1&&(r=n(e,r,d),r-=1500),r=n(e,r,o),r=n(e,r,a),r=n(t,r,i),r=n(e,r,p),r=n(e,r,s),r=n(e,r,v),r=n(e,r,f),r=n(e,r,l),r=n(e,r,c),r=n(t,r,u),r=n(e,r,d),r=n(e,r,_)}}},function(t,e){"use strict";t.exports=function(t,e,r){var n=(setTimeout(r().run,e,t),r().get_duration());return e+=n}},function(t,e,r){"use strict";var n=r(232);t.exports=function(){function t(t){var e="Clustergrammer allows users to generate\ninteractive and sharable visualizations\nby uploading a matrix",o="This demo will quickly overview some\nof Clustergrammer's interactive features";setTimeout(n,0,t,e,4500/r),setTimeout(n,4500/r,t,o,4500/r)}function e(){return 1e4/r}var r=1;return{run:t,get_duration:e}}},function(t,e){"use strict";t.exports=function(t,e,r){var n=e.split("\n");n.length<3&&n.push(""),d3.select(t.root+" .demo_group").style("opacity",0).transition().duration(250).style("opacity",1).transition().duration(250).delay(r).style("opacity",0);for(var o=0;o<n.length;o++){var a=o+1,i=d3.select(t.root+" .demo_group").select("#text_"+a).text(n[o]),s=i[0][0].getBBox(),l=.9,c=Number(d3.select(".demo_group").select("text").style("font-size").replace("px","")),u=1.3*c;d3.select(t.root+" .demo_group").select(".rect_"+a).style("fill","white").attr("width",s.width+20).attr("height",s.height).attr("x",-10).attr("y",s.y+o*u).style("opacity",l)}}},function(t,e,r){"use strict";var n=r(232),o=r(144);t.exports=function(){function t(t){var e=t.params,r="Zoom and pan by\nscrolling and dragging";n(e,r,4e3),setTimeout(o,1500,t,0,0,4)}function e(){return 4e3}return{run:t,get_duration:e}}},function(t,e,r){"use strict";var n=r(232),o=r(144),a=r(235);t.exports=function(){function t(t){var e=t.params,r="Reset zoom by double-clicking\n";n(e,r,4e3),setTimeout(a,2e3,e,"double",300,300),setTimeout(o,2400,t,0,0,1)}function e(){return 4500}return{run:t,get_duration:e}}},function(t,e){"use strict";t.exports=function(t,e,r,n){var o=200,a=d3.select(t.root+" .viz_svg").append("circle").attr("cx",r).attr("cy",n).attr("r",25).style("stroke","black").style("stroke-width","3px").style("fill","#007f00").style("opacity",.5);"double"===e?a.transition().duration(o).style("opacity",0).transition().duration(50).style("opacity",.5).transition().duration(o).style("opacity",0).remove():a.transition().duration(o).style("opacity",0).transition().duration(250).remove()}},function(t,e,r){"use strict";var n=r(232),o=r(235);t.exports=function(){function t(t){var e="Reorder the matrix based on a single\nrow or column by double-clicking a\nlabel";n(t,e,7e3);var i=r(t,"EGFR"),s=d3.select(i).attr("transform"),l=d3.select(t.root+" .clust_container").attr("transform").split(",")[1].replace(")",""),c=.9*t.viz.norm_labels.width.row,u=s.split(",")[1].replace(")",""),d=String(Number(u)+Number(l)+t.viz.rect_height/2),f=4e3;setTimeout(o,f,t,"double",c,d);var p=f+300;setTimeout(a,p,t,i)}function e(){return 8e3}function r(t,e){var r=d3.selectAll(t.root+" .row_label_group").filter(function(){var t=this.__data__;return t.name==e})[0][0];return r}function a(t,e){$(e).d3DblClick()}return jQuery.fn.d3DblClick=function(){this.each(function(t,e){var r=document.createEvent("MouseEvents");r.initMouseEvent("dblclick",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(r)})},{run:t,get_duration:e}}},function(t,e,r){"use strict";var n=r(232),o=r(238);t.exports=function(){function t(t){var e="Reorder all rows and columns\nby clicking the reorder\n buttons";n(t,e,9e3),setTimeout(o,3e3,t,"toggle_col_order"),setTimeout(r,3500,t,"col","rank"),setTimeout(o,7e3,t,"toggle_row_order"),setTimeout(r,7500,t,"row","rank")}function e(){return 11e3}function r(t,e,r){var n=d3.selectAll(".toggle_"+e+"_order .btn").filter(function(){return this.__data__==r})[0];$(n).click()}return{run:t,get_duration:e}}},function(t,e){"use strict";t.exports=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4e3;e.indexOf("slider")<0?d3.select(t.root+" ."+e).style("background","#007f00").style("box-shadow","0px 0px 10px 5px #007f00").transition().duration(1).delay(r).style("background","#FFFFFF").style("box-shadow","none"):d3.select(t.root+" ."+e).style("box-shadow","0px 0px 10px 5px #007f00").transition().duration(1).delay(r).style("box-shadow","none")}},function(t,e,r){"use strict";var n=r(232),o=r(238),a=r(144);t.exports=function(){function t(t){var e=t.params,s="Search for rows using\nthe search box";n(e,s,5e3);var l=2500;setTimeout(o,l,e,"gene_search_container"),setTimeout(r,l+1e3,e,"E"),setTimeout(r,l+1500,e,"EG"),setTimeout(r,l+2e3,e,"EGF"),setTimeout(r,l+2500,e,"EGFR"),setTimeout(i,5500,e),setTimeout(a,7500,t,0,0,1)}function e(){return 1e4}function r(t,e){$(t.root+" .gene_search_box").val(e),$(t.root+" .gene_search_box").autocomplete("search",e)}function i(t){$(t.root+" .submit_gene_button").click(),$(t.root+" .gene_search_box").autocomplete("search","")}return{run:t,get_duration:e}}},function(t,e,r){"use strict";var n=r(232),o=r(238),a=r(203);t.exports=function(){function t(t){var e=t.params,a="Filter rows based on sum or\nvariance using the sliders";n(e,a,4e3);var i="N_row_sum";setTimeout(o,5e3,e,"slider_"+i,13e3),a="Filter: Top 20 rows by sum",setTimeout(n,5e3,e,a,4e3),setTimeout(r,5300,t,i,20,1),a="Filter: Top 10 rows by sum",setTimeout(n,1e4,e,a,4e3),setTimeout(r,10300,t,i,10,2),a="Filter: All rows",setTimeout(n,15e3,e,a,4e3),setTimeout(r,15300,t,i,"all",0)}function e(){return 19500}function r(t,e,r,n){var o=t.params,i={};i[e]=r,a(t,i),$(o.root+" .slider_"+e).slider("value",n);var s;s="N_row_sum"===e?"sum":"variance",d3.select(o.root+" .title_"+e).text("Top rows "+s+": "+r)}return{run:t,get_duration:e}}},function(t,e,r){"use strict";var n=r(235);t.exports=function(){function t(t){var e=Number(d3.select(t.root+" .expand_button").attr("x").replace("px","")),a=Number(d3.select(t.root+" .expand_button").attr("y").replace("px","")),i=0,s=400;setTimeout(n,i,t,"single",e,a),setTimeout(r,s,t),setTimeout(o,1500,t)}function e(){return 3500}function r(t){$(t.root+" .expand_button").d3Click()}function o(t){a(t,"row","clust"),a(t,"col","clust")}function a(t,e,r){var n=d3.selectAll(".toggle_"+e+"_order .btn").filter(function(){return this.__data__==r})[0];$(n).click()}return jQuery.fn.d3Click=function(){this.each(function(t,e){var r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(r)})},{run:t,get_duration:e}}},function(t,e,r){"use strict";var n=r(232),o=r(238),a=r(190);t.exports=function(){function t(t){var e="Identify row and column groups\nof varying sizes using the\nsliders and dendrogram";n(t,e,1e4),setTimeout(o,3e3,t,"slider_col",7e3),setTimeout(r,4e3,t,"row",3),setTimeout(r,5e3,t,"row",4),setTimeout(r,6e3,t,"row",5),setTimeout(r,7e3,t,"row",6),setTimeout(r,8e3,t,"row",7),setTimeout(r,9e3,t,"row",5)}function e(){return 11e3}function r(t,e,r){$(cgm.params.root+" .slider_col").slider("value",r/10),a(cgm,e,r)}return{run:t,get_duration:e}}},function(t,e,r){"use strict";var n=r(232),o=r(235);t.exports=function(){function t(t){var e="Row and column categories\ncan be use to reorder\nby double-clicking";n(t,e,7e3);var a=d3.selectAll(t.root+" .col_cat_super").filter(function(){return"cat-1"===this.__data__})[0],i=d3.select(".col_cat_super").attr("transform"),s=Number(i.split("(")[1].split(",")[0].replace(")",""))+20,l=Number(i.split(",")[1].replace(")","")),c=4e3;setTimeout(o,c,t,"double",s,l);var u=c+300;setTimeout(r,u,t,a)}function e(){return 8e3}function r(t,e){$(e).d3DblClick()}return jQuery.fn.d3DblClick=function(){this.each(function(t,e){var r=document.createEvent("MouseEvents");r.initMouseEvent("dblclick",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(r)})},{run:t,get_duration:e}}},function(t,e,r){"use strict";var n=r(232),o=r(245);t.exports=function(){function t(t){var r="Clustergrammer is built with gene\nexpression data in mind and interfaces\nwith several Ma'ayan lab web tools",o="The example data being visualized is\ngene expression data obtained from the\nCancer Cell Line Encyclopedia",a="For more information please view\nthe help documentation";setTimeout(n,0,t,r,4500),setTimeout(n,4500,t,o,4500),setTimeout(n,9e3,t,a,4500),setTimeout(e,14e3,t)}function e(t){d3.select(t.root+" .play_button").classed("running_demo",!1),o(t,!0)}function r(){return 12e3}return{run:t,get_duration:r}}},function(t,e){"use strict";t.exports=function(t,e){e===!1?d3.select(t.root+" .play_button").transition().duration(500).style("opacity",0):(d3.select(t.root+" .play_button").transition().duration(500).style("opacity",1),$.unblockUI())}},function(t,e,r){"use strict";var n=r(232),o=r(235);t.exports=function(){function t(t){var e="View additional controls\nby clicking the menu button";n(t,e,4e3);var a=Number(d3.select(t.root+" .expand_button").attr("x").replace("px","")),i=Number(d3.select(t.root+" .expand_button").attr("y").replace("px","")),s=3e3,l=3400;setTimeout(o,s,t,"single",a,i),setTimeout(r,l,t)}function e(){return 5e3}function r(t){$(t.root+" .expand_button").d3Click()}return jQuery.fn.d3Click=function(){this.each(function(t,e){var r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(r)})},jQuery.fn.d3DblClick=function(){this.each(function(t,e){var r=document.createEvent("MouseEvents");r.initMouseEvent("dblclick",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(r)})},{run:t,get_duration:e}}},function(t,e,r){"use strict";var n=r(248),o=r(249);t.exports=function(){var t=this,e=t.params;n(t);var r=30;o(e,r)}},function(t,e,r){"use strict";var n=r(177);t.exports=function(t){var e=t.params;if(d3.select(e.root+" .play_button").empty()){var r=d3.select(e.root+" .viz_svg").append("g").classed("play_button",!0).classed("running_demo",!1);n(e),r.append("circle").style("r",45).style("fill","white").style("stroke","black").style("stroke-width","3px").style("opacity",.5),r.append("path").attr("d",function(){var t=40,e=22,r=15;return"M-"+r+",-"+e+" l "+t+","+e+" l -"+t+","+e+" z "}).style("fill","black").style("opacity",.5),r.on("mouseover",function(){d3.select(this).select("path").style("fill","red").style("opacity",1),d3.select(this).select("circle").style("opacity",1)}).on("mouseout",function(){d3.select(this).select("path").style("fill","black").style("opacity",.5),d3.select(this).select("circle").style("opacity",.5)}).on("click",function(){t.play_demo()})}}},function(t,e){"use strict";t.exports=function(t,e){if(d3.select(t.root+" .demo_group").empty()){var r=d3.select(t.root+" .clust_container").attr("transform"),n=Number(r.split("(")[1].split(",")[0]),o=Number(r.split(",")[1].replace(")","")),a=d3.select(t.root+" .viz_svg").append("g").classed("demo_group",!0).attr("transform",function(){var t=n+20,e=o+40;return"translate("+t+","+e+")"});a.append("rect").classed("rect_1",!0),a.append("rect").classed("rect_2",!0),a.append("rect").classed("rect_3",!0);var i=1.3*e;a.append("text").attr("id","text_1").attr("font-size",e+"px").attr("font-weight",1e3).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif'),a.append("text").attr("id","text_2").attr("font-size",e+"px").attr("font-weight",1e3).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("transform",function(){return"translate(0,"+String(i)+")"}),a.append("text").attr("id","text_3").attr("font-size",e+"px").attr("font-weight",1e3).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("transform",function(){return"translate(0,"+String(2*i)+")"})}}},function(t,e,r){"use strict";var n=r(11),o=r(205);t.exports=function(t){var e=n(this.config,t);o(this,e)}},function(t,e,r){"use strict";var n=r(11),o=r(205);t.exports=function(t){var e,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e=r===!1?this:r;var a,i=e.params,s={};_.each(["row","col"],function(e){var r=i.inst_nodes[e+"_nodes"];if(_.has(t,e))if(t[e].length>0){var n=t[e];a=$.grep(r,function(t){return $.inArray(t.name,n)>-1})}else a=r;else a=r;s[e+"_nodes"]=a});var l=e.params.network_data.row_nodes,c=e.params.network_data.col_nodes,u=n(e.config,s);o(e,u),l.length>e.params.inst_nodes.row_nodes.length&&(e.params.inst_nodes.row_nodes=l),c.length>e.params.inst_nodes.col_nodes.length&&(e.params.inst_nodes.col_nodes=c)}},function(t,e,r){"use strict";var n=r(185),o=r(66),a=r(152),i=r(222);t.exports=function(t,e){null!=t.params.cat_update_callback&&t.params.cat_update_callback(this);var r=t.params.viz.cat_colors.col;i(e,t.params.network_data.row_nodes,!0),i(e,t.params.inst_nodes.row_nodes,!0),t.params=o(t.params,!1),n(t,!0),a(t),t.params.new_row_cats=e,t.params.viz.cat_colors.col=r}},function(t,e,r){"use strict";var n=r(185),o=r(66),a=r(152),i=r(222),s=r(254);t.exports=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this,r=s(e),l=e.params.viz.cat_colors.col;if(i(r,e.params.network_data.row_nodes),i(r,e.params.inst_nodes.row_nodes),e.params.new_row_cats=r,e.params.viz.cat_colors.col=l,t){var c=!0;e.params=o(e.params,c),n(e,!0),a(e)}}},function(t,e){"use strict";t.exports=function(t){function e(t,e,o){r={},r.cat_title=t,r.cats=[],n={},n.cat_name=e,n.members=[],n.members.push(o),r.cats.push(n),f.push(r)}var r,n,o,a,i,s,l,c,u=t.config.network_data.row_nodes,d=": ",f=[],p=u[0],h=_.keys(p),v={};_.each(h,function(t){t.indexOf("cat-")>=0&&(s=p[t],c=parseInt(t.split("cat-")[1],10),l=s.indexOf(d)>=0?s.split(d)[0]:t,v[c]=l)});var m,g=_.keys(v).sort();return _.each(g,function(t){m={},m.cat_title=v[t],m.cats=[],f.push(m)}),_.each(u,function(t){var r=_.keys(t);_.each(r,function(r){if(r.indexOf("cat-")>-1){i=t[r],c=parseInt(r.split("cat-")[1],10);var s=r;i=t[r];var l=t[r],u=t.name;l.indexOf(d)>-1?(s=l.split(d)[0],i=l.split(d)[1]):(s=r,i=l),0===f.length?e(s,i,u):(o=!1,_.each(f,function(t){s===t.cat_title&&(o=!0,a=!1,_.each(t.cats,function(t){i===t.cat_name&&(a=!0,t.members.push(u))}),a===!1&&(n={},n.cat_name=i,n.members=[],n.members.push(u),t.cats.push(n)))}))}})}),f}},function(t,e,r){"use strict";var n=r(256),o=r(257);t.exports=function(){var t=n(),e=this.params,r=o(e),a=new Blob([r],{type:"text/plain;charset=utf-8"});t(a,"clustergrammer.txt")}},function(t,e){"use strict";t.exports=function(){/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
var t=t||navigator.msSaveBlob&&navigator.msSaveBlob.bind(navigator)||function(t){var e=t.document,r=function(){return t.URL||t.webkitURL||t},n=t.URL||t.webkitURL||t,o=e.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in o,i=function(r){var n=e.createEvent("MouseEvents");n.initMouseEvent("click",!0,!1,t,0,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(n)},s=t.webkitRequestFileSystem,l=t.requestFileSystem||s||t.mozRequestFileSystem,c=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},u="application/octet-stream",d=0,f=[],p=function(){for(var t=f.length;t--;){var e=f[t];"string"==typeof e?n.revokeObjectURL(e):e.remove()}f.length=0},_=function(t,e,r){e=[].concat(e);for(var n=e.length;n--;){var o=t["on"+e[n]];if("function"==typeof o)try{o.call(t,r||t)}catch(t){c(t)}}},h=function(e,n){var c,p,h,v=this,m=e.type,g=!1,y=function(){var t=r().createObjectURL(e);return f.push(t),t},w=function(){_(v,"writestart progress write writeend".split(" "))},x=function(){!g&&c||(c=y(e)),p&&(p.location.href=c),v.readyState=v.DONE,w()},b=function(t){return function(){if(v.readyState!==v.DONE)return t.apply(this,arguments)}},z={create:!0,exclusive:!1};return v.readyState=v.INIT,n||(n="download"),a?(c=y(e),o.href=c,o.download=n,i(o),v.readyState=v.DONE,void w()):(t.chrome&&m&&m!==u&&(h=e.slice||e.webkitSlice,e=h.call(e,0,e.size,u),g=!0),s&&"download"!==n&&(n+=".download"),p=m===u||s?t:t.open(),l?(d+=e.size,void l(t.TEMPORARY,d,b(function(t){t.root.getDirectory("saved",z,b(function(t){var r=function(){t.getFile(n,z,b(function(t){t.createWriter(b(function(r){r.onwriteend=function(e){p.location.href=t.toURL(),f.push(t),v.readyState=v.DONE,_(v,"writeend",e)},r.onerror=function(){var t=r.error;t.code!==t.ABORT_ERR&&x()},"writestart progress write abort".split(" ").forEach(function(t){r["on"+t]=v["on"+t]}),r.write(e),v.abort=function(){r.abort(),v.readyState=v.DONE},v.readyState=v.WRITING}),x)}),x)};t.getFile(n,{create:!1},b(function(t){t.remove(),r()}),b(function(t){t.code===t.NOT_FOUND_ERR?r():x()}))}),x)}),x)):void x())},v=h.prototype,m=function(t,e){return new h(t,e)};return v.abort=function(){var t=this;t.readyState=t.DONE,_(t,"abort")},v.readyState=v.INIT=0,v.WRITING=1,v.DONE=2,v.error=v.onwritestart=v.onprogress=v.onwrite=v.onabort=v.onerror=v.onwriteend=null,t.addEventListener("unload",p,!1),m}(self);return t}},function(t,e,r){"use strict";var n=r(258);t.exports=function(t){var e,r=t.matrix,o={};_.each(["row","col"],function(n){var a;a="row"===n?"col":"row",e=t.inst_order[n],o[a]=r.orders[e+"_"+n]});for(var a="\t",i=t.network_data.row_nodes,s=t.network_data.col_nodes,l=0;l<o.col.length;l++){var c=o.col[l],u=s[c],d=n(t,u,"col");l<o.col.length-1?a=a+d+"\t":a+=d}var f;return a+="\n",_.each(o.row,function(e){f=r.matrix[e].row_data;var s=i[e],l=n(t,s,"row");a=a+l+"\t";for(var c=0;c<o.col.length;c++){var u=o.col[c];c<o.col.length-1?a=a+String(f[u].value)+"\t":a+=String(f[u].value)}a+="\n"}),a}},function(t,e){"use strict";t.exports=function(t,e,r){var n,o=e.name,a=t.viz.all_cats[r].length;if(a>0){o="('"+o+"'";for(var i=0;i<a;i++)n="cat-"+String(i),o=o+", '"+String(e[n])+"'";o+=")"}else o=String(o);return o}},function(t,e,r){"use strict";var n=r(260);t.exports=function(){function t(){d3.select(r.params.root+" .col_dendro_icons_container").style("display","none"),d3.select(r.params.root+" .row_dendro_icons_container").style("display","none");var t=c.extent(),a=t[0],i=t[1],s=a[0],l=i[0],u=a[1],d=i[1];if(s!=l&&u!=d){setTimeout(n,500,r);var f=e(s,l,u,d,a,i);r.filter_viz_using_names(f),d3.select(o.root+" .crop_button").style("color","#337ab7").classed("fa-crop",!1).classed("fa-undo",!0)}}function e(t,e,r,n,a,i){t>e&&(t=i[0],e=a[0]),r>n&&(r=i[1],n=a[1]),r-=o.viz.rect_height,t-=o.viz.rect_width;var s={};return s.row=[],s.col=[],_.each(o.matrix.matrix,function(t){var e=o.viz.y_scale(t.row_index);e>r&&e<n&&s.row.push(t.name)}),d3.selectAll(o.root+" .col_label_text").each(function(r){var n=d3.select(this).attr("transform"),o=Number(n.split(",")[0].split("(")[1]);o>t&&o<e&&s.col.push(r.name)}),s}var r=this,o=r.params,a=o.viz.clust.dim.width,i=o.viz.clust.dim.height,s=d3.scale.linear().domain([0,a]).range([0,a]),l=d3.scale.linear().domain([0,i]).range([0,i]);d3.select(o.root+" .clust_container").append("g").classed("brush_group",!0),r.params.is_cropping=!0;var c=d3.svg.brush().x(s).y(l).on("brushend",t);d3.select(o.root+" .brush_group").call(c),d3.selectAll(o.root+" .extent").style("opacity",.2).style("fill","black")}},function(t,e){"use strict";t.exports=function(t){d3.select(t.params.root+" .brush_group").transition().style("opacity",0).remove(),t.params.is_cropping=!1}},function(t,e,r){var n,o,a;"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(i,s){o=[r(262)],n=s,a="function"==typeof n?n.apply(e,o):n,!(void 0!==a&&(t.exports=a))}(void 0,function(t){return function(){"use strict";function e(e){e.each(function(){function e(e){"boolean"==typeof m&&(m=t.svg.axis().ticks(Math.round(d/100)).tickFormat(z).orient("horizontal"===v?"bottom":"right")),l=s.ticks?s.copy().range([0,d]):s.copy().rangePoints([0,d],.5),m.scale(l);var r=e.append("svg").classed("d3-slider-axis d3-slider-axis-"+m.orient(),!0).on("click",E),n=r.append("g");"horizontal"===v?(r.style("margin-left",-g+"px"),r.attr({width:d+2*g,height:g}),"top"===m.orient()?(r.style("top",-g+"px"),n.attr("transform","translate("+g+","+g+")")):n.attr("transform","translate("+g+",0)")):(r.style("top",-g+"px"),r.attr({width:g,height:d+2*g}),"left"===m.orient()?(r.style("left",-g+"px"),n.attr("transform","translate("+g+","+g+")")):n.attr("transform","translate(0,"+g+")")),n.call(m)}function _(){if("array"!=a(i)){var e=Math.max(0,Math.min(d,t.event.offsetX||t.event.layerX));r(s.invert?n(s.invert(e/d)):o(e/d))}}function h(){if("array"!=a(i)){var e=d-Math.max(0,Math.min(d,t.event.offsetY||t.event.layerY));r(s.invert?n(s.invert(e/d)):o(e/d))}}function w(){"handle-one"===t.event.sourceEvent.target.id?y=1:"handle-two"==t.event.sourceEvent.target.id&&(y=2);var e=Math.max(0,Math.min(d,t.event.x));r(s.invert?n(s.invert(e/d)):o(e/d))}function A(){"handle-one"===t.event.sourceEvent.target.id?y=1:"handle-two"==t.event.sourceEvent.target.id&&(y=2);var e=d-Math.max(0,Math.min(d,t.event.y));r(s.invert?n(s.invert(e/d)):o(e/d))}function E(){t.event.stopPropagation()}s||(s=t.scale.linear().domain([f,p])),i=i||s.domain()[0];var N=t.select(this).classed("d3-slider d3-slider-"+v,!0),M=t.behavior.drag();if(M.on("dragend",function(){x.slideend(t.event,i)}),"array"==a(i)&&2==i.length?(c=N.append("a").classed("d3-slider-handle",!0).attr("xlink:href","#").attr("id","handle-one").on("click",E).call(M),k=N.append("a").classed("d3-slider-handle",!0).attr("id","handle-two").attr("xlink:href","#").on("click",E).call(M)):c=N.append("a").classed("d3-slider-handle",!0).attr("xlink:href","#").attr("id","handle-one").on("click",E).call(M),"horizontal"===v){if(N.on("click",_),"array"==a(i)&&2==i.length){u=t.select(this).append("div").classed("d3-slider-range",!0),c.style("left",b(s(i[0]))),u.style("left",b(s(i[0]))),M.on("drag",w);var S=100-parseFloat(b(s(i[1])));k.style("left",b(s(i[1]))),u.style("right",S+"%"),M.on("drag",w)}else c.style("left",b(s(i))),M.on("drag",w);d=parseInt(N.style("width"),10)}else{if(N.on("click",h),M.on("drag",A),"array"==a(i)&&2==i.length){u=t.select(this).append("div").classed("d3-slider-range-vertical",!0),c.style("bottom",b(s(i[0]))),u.style("bottom",b(s(i[0]))),M.on("drag",A);var O=100-parseFloat(b(s(i[1])));k.style("bottom",b(s(i[1]))),u.style("top",O+"%"),M.on("drag",A)}else c.style("bottom",b(s(i))),M.on("drag",A);d=parseInt(N.style("height"),10)}m&&e(N)})}function r(e){var r="array"==a(i)&&2==i.length?i[y-1]:i,o=b(s(n(r))),l=b(s(n(e))),d="horizontal"===v?"left":"bottom";if(o!==l){if("array"==a(i)&&2==i.length?(i[y-1]=e,t.event&&x.slide(t.event,i)):t.event&&x.slide(t.event.sourceEvent||t.event,i=e),i[0]>=i[1])return;if(1===y)"array"==a(i)&&2==i.length&&("left"===d?u.style("left",l):u.style("bottom",l)),h?c.transition().styleTween(d,function(){return t.interpolate(o,l)}).duration("number"==typeof h?h:250):c.style(d,l);else{var f=100-parseFloat(l),p=100-parseFloat(l);"left"===d?u.style("right",f+"%"):u.style("top",p+"%"),h?k.transition().styleTween(d,function(){return t.interpolate(o,l)}).duration("number"==typeof h?h:250):k.style(d,l)}}}function n(t){if(t===s.domain()[0]||t===s.domain()[1])return t;var e=t;if(w)e=o(s(t));else{var r=(t-s.domain()[0])%_;e=t-r,2*Math.abs(r)>=_&&(e+=r>0?_:-_)}return e}function o(t){var e=s.ticks?s.ticks():s.domain(),r=e.map(function(e){return t-s(e)}),n=-1,o=0,a=s.ticks?s.range()[1]:s.rangeExtent()[1];do n++,Math.abs(r[n])<a&&(a=Math.abs(r[n]),o=n);while(r[n]>0&&n<r.length-1);return e[o]}function a(t){return{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}var i,s,l,c,u,d,f=0,p=100,_=.01,h=!1,v="horizontal",m=!1,g=50,y=1,w=!1,x=t.dispatch("slide","slideend"),b=t.format(".2%"),z=t.format(".0"),k=null;return e.min=function(t){return arguments.length?(f=t,e):f},e.max=function(t){return arguments.length?(p=t,e):p},e.step=function(t){return arguments.length?(_=t,e):_},e.animate=function(t){return arguments.length?(h=t,e):h},e.orientation=function(t){return arguments.length?(v=t,e):v},e.axis=function(t){return arguments.length?(m=t,e):m},e.margin=function(t){return arguments.length?(g=t,e):g},e.value=function(t){return arguments.length?(i&&r(n(t)),i=t,e):i},e.snap=function(t){return arguments.length?(w=t,e):w},e.scale=function(t){return arguments.length?(s=t,e):s},t.rebind(e,x,"on"),e}})},function(t,e){t.exports=require("d3")},function(t,e,r){(function(t){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(){function r(t){var r=Array.isArray(t)?{label:t[0],value:t[1]}:"object"===("undefined"==typeof t?"undefined":e(t))&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=r.label||r.value,this.value=r.value}function n(t,e,r){for(var n in e){var o=e[n],a=t.input.getAttribute("data-"+n.toLowerCase());"number"==typeof o?t[n]=parseInt(a):o===!1?t[n]=null!==a:o instanceof Function?t[n]=null:t[n]=a,t[n]||0===t[n]||(t[n]=n in r?r[n]:o)}}function o(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function a(t,e){return l.call((e||document).querySelectorAll(t))}function i(){a("input.awesomplete").forEach(function(t){new s(t)})}var s=function t(e,r){var a=this;this.input=o(e),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-autocomplete","list"),r=r||{},n(this,{minChars:2,maxItems:10,autoFirst:!1,data:t.DATA,filter:t.FILTER_CONTAINS,sort:t.SORT_BYLENGTH,item:t.ITEM,replace:t.REPLACE},r),this.index=-1,this.container=o.create("div",{className:"awesomplete",around:e}),this.ul=o.create("ul",{hidden:"hidden",inside:this.container}),this.status=o.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-relevant":"additions",inside:this.container}),o.bind(this.input,{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;a.opened&&(13===e&&a.selected?(t.preventDefault(),a.select()):27===e?a.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),a[38===e?"previous":"next"]()))}}),o.bind(this.input.form,{submit:this.close.bind(this,{reason:"submit"})}),o.bind(this.ul,{mousedown:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),a.select(e,t.target))}}}),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||r.list||[],t.all.push(this)};s.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if(t=o(t),t&&t.children){var e=[];l.apply(t.children).forEach(function(t){if(!t.disabled){var r=t.textContent.trim(),n=t.value||r,o=t.label||r;""!==n&&e.push({label:o,value:n})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return!this.ul.hasAttribute("hidden")},close:function(t){this.opened&&(this.ul.setAttribute("hidden",""),this.index=-1,o.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.ul.removeAttribute("hidden"),this.autoFirst&&this.index===-1&&this.goto(0),o.fire(this.input,"awesomplete-open")},next:function(){var t=this.ul.children.length;this.goto(this.index<t-1?this.index+1:-1)},previous:function(){var t=this.ul.children.length;this.goto(this.selected?this.index-1:t-1)},goto:function(t){var e=this.ul.children;this.selected&&e[this.index].setAttribute("aria-selected","false"),this.index=t,t>-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.status.textContent=e[t].textContent,o.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e){if(t?this.index=o.siblingIndex(t):t=this.ul.children[this.index],t){var r=this.suggestions[this.index],n=o.fire(this.input,"awesomplete-select",{text:r,origin:e||t});n&&(this.replace(r),this.close({reason:"select"}),o.fire(this.input,"awesomplete-selectcomplete",{text:r}))}},evaluate:function(){var t=this,e=this.input.value;e.length>=this.minChars&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(n){return new r(t.data(n,e))}).filter(function(r){return t.filter(r,e)}).sort(this.sort).slice(0,this.maxItems),this.suggestions.forEach(function(r){t.ul.appendChild(t.item(r,e))}),0===this.ul.children.length?this.close({reason:"nomatches"}):this.open()):this.close({reason:"nomatches"})}},s.all=[],s.FILTER_CONTAINS=function(t,e){return RegExp(o.regExpEscape(e.trim()),"i").test(t)},s.FILTER_STARTSWITH=function(t,e){return RegExp("^"+o.regExpEscape(e.trim()),"i").test(t)},s.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t<e?-1:1},s.ITEM=function(t,e){var r=""===e?t:t.replace(RegExp(o.regExpEscape(e.trim()),"gi"),"<mark>$&</mark>");return o.create("li",{innerHTML:r,"aria-selected":"false"})},s.REPLACE=function(t){this.input.value=t.value},s.DATA=function(t){return t},Object.defineProperty(r.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),r.prototype.toString=r.prototype.valueOf=function(){return""+this.label};var l=Array.prototype.slice;return o.create=function(t,e){var r=document.createElement(t);for(var n in e){var a=e[n];if("inside"===n)o(a).appendChild(r);else if("around"===n){var i=o(a);i.parentNode.insertBefore(r,i),r.appendChild(i)}else n in r?r[n]=a:r.setAttribute(n,a)}return r},o.bind=function(t,e){if(t)for(var r in e){var n=e[r];r.split(/\s+/).forEach(function(e){t.addEventListener(e,n)})}},o.fire=function(t,e,r){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0);for(var o in r)n[o]=r[o];return t.dispatchEvent(n)},o.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},o.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof Document&&("loading"!==document.readyState?i():document.addEventListener("DOMContentLoaded",i)),s.$=o,s.$$=a,"undefined"!=typeof self&&(self.Awesomplete=s),"object"===e(t)&&t.exports&&(t.exports=s),s}()}).call(e,r(264)(t))},function(t,e){"use strict";t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,r){var n=r(266);"string"==typeof n&&(n=[[t.id,n,""]]);r(268)(n,{});n.locals&&(t.exports=n.locals)},function(t,e,r){e=t.exports=r(267)(),e.push([t.id,".d3-slider{position:relative;font-family:Verdana,Arial,sans-serif;font-size:1.1em;border:1px solid #aaa;z-index:2}.d3-slider-horizontal{height:.8em}.d3-slider-range{height:.8em}.d3-slider-range,.d3-slider-range-vertical{background:#2980b9;left:0;right:0;position:absolute}.d3-slider-range-vertical{top:0}.d3-slider-vertical{width:.8em;height:100px}.d3-slider-handle{position:absolute;width:1.2em;height:1.2em;border:1px solid #d3d3d3;border-radius:4px;background:#eee;background:linear-gradient(180deg,#eee 0,#ddd);z-index:3}.d3-slider-handle:hover{border:1px solid #999}.d3-slider-horizontal .d3-slider-handle{top:-.3em;margin-left:-.6em}.d3-slider-axis{position:relative;z-index:1}.d3-slider-axis-bottom{top:.8em}.d3-slider-axis-right{left:.8em}.d3-slider-axis path{stroke-width:0;fill:none}.d3-slider-axis line{fill:none;stroke:#aaa;shape-rendering:crispEdges}.d3-slider-axis text{font-size:11px}.d3-slider-vertical .d3-slider-handle{left:-.25em;margin-left:0;margin-bottom:-.6em}",""])},function(t,e){"use strict";t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var r=this[e];r[2]?t.push("@media "+r[2]+"{"+r[1]+"}"):t.push(r[1])}return t.join("")},t.i=function(e,r){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},o=0;o<this.length;o++){var a=this[o][0];"number"==typeof a&&(n[a]=!0)}for(o=0;o<e.length;o++){var i=e[o];"number"==typeof i[0]&&n[i[0]]||(r&&!i[2]?i[2]=r:r&&(i[2]="("+i[2]+") and ("+r+")"),t.push(i))}},t}},function(t,e,r){function n(t,e){for(var r=0;r<t.length;r++){var n=t[r],o=p[n.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](n.parts[a]);for(;a<n.parts.length;a++)o.parts.push(c(n.parts[a],e))}else{for(var i=[],a=0;a<n.parts.length;a++)i.push(c(n.parts[a],e));p[n.id]={id:n.id,refs:1,parts:i}}}}function o(t){for(var e=[],r={},n=0;n<t.length;n++){var o=t[n],a=o[0],i=o[1],s=o[2],l=o[3],c={css:i,media:s,sourceMap:l};r[a]?r[a].parts.push(c):e.push(r[a]={id:a,parts:[c]})}return e}function a(t,e){var r=v(),n=y[y.length-1];if("top"===t.insertAt)n?n.nextSibling?r.insertBefore(e,n.nextSibling):r.appendChild(e):r.insertBefore(e,r.firstChild),y.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");r.appendChild(e)}}function i(t){t.parentNode.removeChild(t);var e=y.indexOf(t);e>=0&&y.splice(e,1)}function s(t){var e=document.createElement("style");return e.type="text/css",a(t,e),e}function l(t){var e=document.createElement("link");return e.rel="stylesheet",a(t,e),e}function c(t,e){var r,n,o;if(e.singleton){var a=g++;r=m||(m=s(e)),n=u.bind(null,r,a,!1),o=u.bind(null,r,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=l(e),n=f.bind(null,r),o=function(){i(r),r.href&&URL.revokeObjectURL(r.href)}):(r=s(e),n=d.bind(null,r),o=function(){i(r)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else o()}}function u(t,e,r,n){var o=r?"":n.css;if(t.styleSheet)t.styleSheet.cssText=w(e,o);else{var a=document.createTextNode(o),i=t.childNodes;i[e]&&t.removeChild(i[e]),i.length?t.insertBefore(a,i[e]):t.appendChild(a)}}function d(t,e){var r=e.css,n=e.media;if(n&&t.setAttribute("media",n),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}function f(t,e){var r=e.css,n=e.sourceMap;n&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var o=new Blob([r],{type:"text/css"}),a=t.href;t.href=URL.createObjectURL(o),a&&URL.revokeObjectURL(a)}var p={},_=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},h=_(function(){return/msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase())}),v=_(function(){return document.head||document.getElementsByTagName("head")[0]}),m=null,g=0,y=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=h()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var r=o(t);return n(r,e),function(t){for(var a=[],i=0;i<r.length;i++){var s=r[i],l=p[s.id];l.refs--,a.push(l)}if(t){var c=o(t);n(c,e)}for(var i=0;i<a.length;i++){var l=a[i];if(0===l.refs){for(var u=0;u<l.parts.length;u++)l.parts[u]();delete p[l.id]}}}};var w=function(){var t=[];return function(e,r){return t[e]=r,t.filter(Boolean).join("\n")}}()},function(t,e,r){var n=r(270);"string"==typeof n&&(n=[[t.id,n,""]]);r(268)(n,{});n.locals&&(t.exports=n.locals)},function(t,e,r){e=t.exports=r(267)(),e.push([t.id,'[hidden]{display:none}.visually-hidden{position:absolute;clip:rect(0,0,0,0)}div.awesomplete{display:inline-block;position:relative}div.awesomplete>input{display:block}div.awesomplete>ul{position:absolute;left:0;z-index:1;min-width:100%;box-sizing:border-box;list-style:none;padding:0;border-radius:.3em;margin:.2em 0 0;background:hsla(0,0%,100%,.9);background:linear-gradient(to bottom right,#fff,hsla(0,0%,100%,.8));border:1px solid rgba(0,0,0,.3);box-shadow:.05em .2em .6em rgba(0,0,0,.2);text-shadow:none}div.awesomplete>ul:empty,div.awesomplete>ul[hidden]{display:none}@supports (transform:scale(0)){div.awesomplete>ul{transition:.3s cubic-bezier(.4,.2,.5,1.4);transform-origin:1.43em -.43em}div.awesomplete>ul:empty,div.awesomplete>ul[hidden]{opacity:0;transform:scale(0);display:block;transition-timing-function:ease}}div.awesomplete>ul:before{content:"";position:absolute;top:-.43em;left:1em;width:0;height:0;padding:.4em;background:#fff;border:inherit;border-right:0;border-bottom:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}div.awesomplete>ul>li{position:relative;padding:.2em .5em;cursor:pointer}div.awesomplete>ul>li:hover{background:#b8d3e0;color:#000}div.awesomplete>ul>li[aria-selected=true]{background:#3d6d8f;color:#fff}div.awesomplete mark{background:#eaff00}div.awesomplete li:hover mark{background:#b5d100}div.awesomplete li[aria-selected=true] mark{background:#3d6b00;color:inherit}',""])},function(t,e,r){"use strict";var n=r(218),o=r(272),a=r(277),i=r(278),s=r(279),l=r(280),c=r(282),u=r(284),d=r(285);t.exports=function t(e){var r=e.params,t=d3.select(r.root+" .sidebar_wrapper");r.viz.is_expand&&t.style("display","none"),t.append("div").classed("title_section",!0),null!=r.sidebar.title&&t.select(".title_section").append("h4").style("margin-left","20px").style("margin-top","5px").style("margin-bottom","0px").text(r.sidebar.title),t.append("div").style("padding-right","2px").classed("about_section",!0),null!=r.sidebar.about&&t.select(".about_section").append("h5").classed("sidebar_text",!0).style("margin-left","7px").style("margin-top","5px").style("margin-bottom","2px").style("text-align","justify").html(r.sidebar.about),t.append("div").classed("icons_section",!0).style("text-align","center"),e.params.make_modals&&c(r),r.sidebar.icons&&l(e,t),i(r,t),a(t,r),u(t);var f=_.keys(r.viz.possible_filters);f.indexOf("enr_score_type")>-1&&f.sort(function(t,e){return t.toLowerCase().localeCompare(e.toLowerCase())}),e.slider_functions={},_.each(f,function(t){o(e,t)}),n(e),null!==r.ini_view&&(s(r),r.ini_view=null),d(e)}},function(t,e,r){"use strict";var n=r(273),o=r(276);t.exports=function(t,e){var r=t.params,a=d3.select(r.root+" .sidebar_wrapper").append("div").classed("div_filters",!0).style("padding-left","10px").style("padding-right","10px");"numerical"==r.viz.possible_filters[e]?n(t,e,a):"categorical"==r.viz.possible_filters[e]&&o(t,e,a)}},function(t,e,r){"use strict";var n=r(226),o=r(274),a=r(5),i=r(63);d3.slider=r(261),t.exports=function(t,e,r){var s=t.params,l={},c=_.keys(s.viz.possible_filters);_.each(c,function(t){if(t!=e){var r=a(s.viz.filter_data,t);l[t]=r}});var u=n(s,e);r.append("div").classed("title_"+e,!0).classed("sidebar_text",!0).classed("slider_description",!0).style("margin-top","5px").style("margin-bottom","3px").text(u.text+u.state+u.suffix),r.append("div").classed("slider_"+e,!0).classed("slider",!0).attr("current_state",u.state);var d=s.network_data.views,f=i(s,d,l);f=f.sort(function(t,r){return r[e]-t[e]});var p=f.length-1,h=0;if(null!==s.requested_view&&e in s.requested_view){var v=s.requested_view[e];if("all"!=v){var m=f.map(function(t){return t[e]}).indexOf(v);m>0&&(h=m)}}var g=d3.slider().value(h).min(0).max(p).step(1).on("slide",function(r,n){y(t,e,f,n)}).on("slideend",function(r,n){y(t,e,f,n)});t.slider_functions[e]=g,d3.select(t.params.root+" .slider_"+e).call(g);var y=_.debounce(o,800)}},function(t,e,r){"use strict";var n=r(203),o=r(225),a=r(275),i=r(65);t.exports=function(t,e,r,s){if(d3.select(t.params.viz.viz_svg).classed("running_update")===!1){var l=t.params,c=r[s][e];o(t,e,c),l=a(l);var u={};if(u[e]=c,u=i(l,u),_.has(r[0],"enr_score_type")){var d=d3.select(l.root+" .toggle_enr_score_type").attr("current_state");u.enr_score_type=d}n(t,u)}}},function(t,e){"use strict";t.exports=function(t){var e;return _.each(["row","col"],function(r){e="row"===r?"col":"row",d3.select(t.root+" .toggle_"+e+"_order .active").empty()===!1?t.viz.inst_order[r]=d3.select(t.root+" .toggle_"+e+"_order").select(".active").attr("name"):t.viz.inst_order[r]="clust"}),t}},function(t,e,r){"use strict";var n=r(65);t.exports=function(t,e,r,o){var a=o.append("div").classed("categorical_filter",!0).classed("toggle_"+r,!0).classed("btn-group-vertical",!0).style("width","100%").style("margin-top","10px").attr("current_state","combined_score"),i=e.viz.filter_data[r],s={combined_score:"Combined Score",pval:"P-Value",zscore:"Z-score"};a.selectAll("button").data(i).enter().append("button").attr("type","button").classed("btn",!0).classed("btn-primary",!0).classed(".filter_button",!0).classed("active",function(t){var e=!1;return"combined_score"==t&&(e=!0),e}).attr("name",function(t){return t}).html(function(t){return s[t]}),$(e.root+" .categorical_filter .btn").off().click(function(){d3.selectAll(e.root+" .categorical_filter .btn").classed("active",!1),d3.select(this).classed("active",!0);var t=d3.select(this).attr("name"),r={enr_score_type:t};n(e,r),d3.select(e.root+" .toggle_enr_score_type").attr("current_state",t)})}},function(t,e){"use strict";t.exports=function(t,e){var r=t.append("div").classed("gene_search_container",!0).style("padding-left","10px").style("padding-right","10px").style("margin-top","10px");r.append("input").classed("form-control",!0).classed("gene_search_box",!0).classed("sidebar_text",!0).attr("type","text").attr("placeholder",e.sidebar.row_search.placeholder).style("height",e.sidebar.row_search.box.height+"px").style("margin-top","10px"),r.append("div").classed("gene_search_button",!0).style("margin-top","5px").attr("data-toggle","buttons").append("button").classed("sidebar_text",!0).html("Search").attr("type","button").classed("btn",!0).classed("btn-primary",!0).classed("submit_gene_button",!0).style("width","100%").style("font-size","14px")}},function(t,e){"use strict";t.exports=function(t,e){var r,n,o,a,i,s={row:"Row",col:"Column",both:""},l=e.append("div").style("padding-left","10px").style("padding-right","10px").classed("reorder_section",!0);i=t.sim_mat?["both"]:["row","col"],_.each(i,function(e){r={clust:"Cluster",rank:"Rank by Sum",rankvar:"Rank by Variance",ini:"Initial Order",alpha:"Alphabetically"};var i;i="row"===e?"col":"row",n=Object.keys(t.matrix.orders);var c=[];_.each(n,function(t){t.indexOf(i)>-1&&(t=t.replace("_row","").replace("_col",""),t.indexOf("cat_")<0&&c.push(t))}),_.keys(t.viz.filter_data).indexOf("enr_score_type")>-1&&(c=["clust","rank"]),c=_.uniq(c),c=c.sort();var u;u="both"!=e?" Order":"Reorder Matrix",l.append("div").classed("sidebar_button_text",!0).style("clear","both").style("margin-top","10px").html(s[e]+u),a=l.append("div").classed("btn-group-vertical",!0).style("width","100%").classed("toggle_"+e+"_order",!0).attr("role","group"),a.selectAll(".button").data(c).enter().append("button").attr("type","button").classed("btn",!0).classed("btn-primary",!0).classed("sidebar_button_text",!0).classed("active",function(e){return o=!1,e==t.viz.inst_order[i]&&(o=!0),o}).attr("name",function(t){return t}).html(function(t){return r[t]})})}},function(t,e,r){"use strict";var n=r(226);t.exports=function(t){_.each(_.keys(t.ini_view),function(e){var r=t.ini_view[e],o=t.viz.possible_filters[e];if("numerical"===o){"all"!=r&&(r=parseInt(r,10)),t.viz.filter_data[e].indexOf(r)<=-1&&(r="all");var a=n(t,e);d3.select(t.root+" .title_"+e).text(a.text+r+a.suffix),d3.select(t.root+" .slider_"+e).attr("current_state",r)}})}},function(t,e,r){"use strict";var n=r(256),o=r(144),a=r(260),i=r(281);t.exports=function(t,e){function r(){d3.select(s.root+" .expand_button").style("opacity",0);var t=d3.select(s.root+" .viz_svg").attr("title","test2").attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg").node().parentNode.innerHTML,e=new Blob([t],{type:"image/svg+xml"});l(e,"clustergrammer.svg"),d3.select(s.root+" .expand_button").style("opacity",.4)}var s=t.params,l=n(),c=e.select(".icons_section").style("margin-top","7px").style("margin-left","5%"),u="22%",d="0px",f="0px";c.append("div").classed("clust_icon",!0).style("float","left").style("width",u).style("padding-left",d).style("padding-right",f).append("i").classed("fa",!0).classed("fa-share-alt",!0).classed("icon_buttons",!0).style("font-size","25px").on("click",function(){$(s.root+" .share_info").modal("toggle"),$(".share_url").val(window.location.href)}).classed("sidebar_tooltip",!0).append("span").classed("sidebar_tooltip_text",!0).html("Share").style("left","0%"),c.append("div").classed("clust_icon",!0).style("float","left").style("width",u).style("padding-left",d).style("padding-right",f).append("i").classed("fa",!0).classed("fa-camera",!0).classed("icon_buttons",!0).style("font-size","25px").on("click",function(){$(s.root+" .picture_info").modal("toggle")}).classed("sidebar_tooltip",!0).append("span").classed("sidebar_tooltip_text",!0).html("Take snapshot").style("left","-100%"),c.append("div").classed("clust_icon",!0).style("float","left").style("width",u).style("padding-left",d).style("padding-right",f).append("i").classed("fa",!0).classed("fa fa-cloud-download",!0).classed("icon_buttons",!0).style("font-size","25px").on("click",function(){t.save_matrix()}).classed("sidebar_tooltip",!0).append("span").classed("sidebar_tooltip_text",!0).html("Download matrix").style("left","-200%"),c.append("div").classed("clust_icon",!0).style("float","left").style("width",u).style("padding-left",d).style("padding-right","-5px").append("i").classed("fa",!0).classed("fa-crop",!0).classed("crop_button",!0).classed("icon_buttons",!0).style("font-size","25px").on("click",function(){if(t.params.dendro_filter.row===!1&&t.params.dendro_filter.col===!1){var e=d3.select(this).classed("fa-crop"),r=d3.select(this).classed("fa-undo");e&&(t.params.crop_filter_nodes={},t.params.crop_filter_nodes.row_nodes=t.params.network_data.row_nodes,t.params.crop_filter_nodes.col_nodes=t.params.network_data.col_nodes,t.brush_crop_matrix(),d3.select(this).classed("active_cropping")===!1?d3.select(this).classed("active_cropping",!0).style("color","red"):(d3.select(this).classed("active_cropping",!1).style("color","#337ab7"),a(t))),r&&(d3.select(s.root+" .crop_button").style("color","#337ab7").classed("fa-crop",!0).classed("fa-undo",!1),t.filter_viz_using_nodes(t.params.crop_filter_nodes),d3.select(t.params.root+" .col_dendro_icons_container").style("display","block"),d3.select(t.params.root+" .row_dendro_icons_container").style("display","block")),o(t,0,0,1)}}).classed("sidebar_tooltip",!0).append("span").classed("sidebar_tooltip_text",!0).html("Crop matrix").style("left","-400%"),d3.select(s.root+" .download_buttons").append("p").append("a").html("Download SVG").on("click",function(){r()});var p="svg_"+s.root.replace("#","");d3.select(s.root+" .download_buttons").append("p").append("a").html("Download PNG").on("click",function(){d3.select(s.root+" .expand_button").style("opacity",0),i.saveSvgAsPng(document.getElementById(p),"clustergrammer.png"),d3.select(s.root+" .expand_button").style("opacity",.4);
})}},function(t,e,r){var n;!function(){function o(t){return t instanceof HTMLElement||t instanceof SVGElement}function a(t){if(!o(t))throw new Error("an HTMLElement or SVGElement is required; got "+t)}function i(t){return t&&0==t.lastIndexOf("http",0)&&t.lastIndexOf(window.location.host)==-1}function s(t,e){a(t);var r=t.querySelectorAll("image"),n=r.length,o=function(){0===n&&e()};o();for(var s=0;s<r.length;s++)!function(t){var e=t.getAttributeNS("http://www.w3.org/1999/xlink","href");if(e&&i(e.value))return void console.warn("Cannot render embedded images linking to external hosts: "+e.value);var r=document.createElement("canvas"),a=r.getContext("2d"),s=new Image;s.crossOrigin="anonymous",e=e||t.getAttribute("href"),e?(s.src=e,s.onload=function(){r.width=s.width,r.height=s.height,a.drawImage(s,0,0),t.setAttributeNS("http://www.w3.org/1999/xlink","href",r.toDataURL("image/png")),n--,o()},s.onerror=function(){console.log("Could not load "+e),n--,o()}):(n--,o())}(r[s])}function l(t,e,r){function n(t){for(var e={woff2:"font/woff2",woff:"font/woff",otf:"application/x-font-opentype",ttf:"application/x-font-ttf",eot:"application/vnd.ms-fontobject",sfnt:"application/font-sfnt",svg:"image/svg+xml"},r=Object.keys(e),n=0;n<r.length;++n){var o=r[n];if(t.indexOf("."+o)>0)return e[o]}return console.error("Unknown font format for "+t+"; Fonts may not be working correctly"),"application/octet-stream"}function o(t){function e(e){function r(){var t=s.response,r=a(t);i(e,r)}function n(t){console.warn("Failed to load font from: "+e.url),console.warn(t),l+=e.text+"\n",o()}function i(e,r){var n='url("data:'+e.format+";base64,"+r+'")';l+=e.text.replace(e.fontUrlRegexp,n)+"\n",setTimeout(function(){o(t)},0)}var s=new XMLHttpRequest;s.addEventListener("load",r),s.addEventListener("error",n),s.addEventListener("abort",n),s.open("GET",e.url),s.responseType="arraybuffer",s.send()}if(t.length>0){var n=t.pop();e(n)}else r(l)}function a(t){for(var e="",r=new Uint8Array(t),n=r.byteLength,o=0;o<n;o++)e+=String.fromCharCode(r[o]);return window.btoa(e)}for(var i=e.selectorRemap,s=e.modifyStyle,l="",c=[],u=document.styleSheets,d=0;d<u.length;d++){try{var f=u[d].cssRules}catch(t){console.warn("Stylesheet could not be loaded: "+u[d].href);continue}if(null!=f)for(var p,_=0;_<f.length;_++,p=null){var h=f[_];if("undefined"!=typeof h.style){var v;try{v=h.selectorText}catch(t){console.warn('The following CSS rule has an invalid selector: "'+h+'"',t)}try{v&&(p=t.querySelector(v)||t.parentNode.querySelector(v))}catch(t){console.warn('Invalid CSS selector "'+v+'"',t)}if(p){var m=i?i(h.selectorText):h.selectorText,g=s?s(h.style.cssText):h.style.cssText;l+=m+" { "+g+" }\n"}else if(h.cssText.match(/^@font-face/)){var y=/url\(["']?(.+?)["']?\)/,w=h.cssText.match(y),x=w&&w[1]||"",b=x.match(/^data:/);b&&(x=""),x?(x.startsWith("../")?x=u[d].href+"/../"+x:x.startsWith("./")&&(x=u[d].href+"/."+x),c.push({text:h.cssText,fontUrlRegexp:y,format:n(x),url:x})):l+=h.cssText+"\n"}}}}o(c)}function c(t,e,r){var n=t.viewBox&&t.viewBox.baseVal&&t.viewBox.baseVal[r]||null!==e.getAttribute(r)&&!e.getAttribute(r).match(/%$/)&&parseInt(e.getAttribute(r))||t.getBoundingClientRect()[r]||parseInt(e.style[r])||parseInt(window.getComputedStyle(t).getPropertyValue(r));return"undefined"==typeof n||null===n||isNaN(parseFloat(n))?0:n}function u(t){return t=encodeURIComponent(t),t=t.replace(/%([0-9A-F]{2})/g,function(t,e){var r=String.fromCharCode("0x"+e);return"%"===r?"%25":r}),decodeURIComponent(t)}function d(t){for(var e=window.atob(t.split(",")[1]),r=t.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(e.length),o=new Uint8Array(n),a=0;a<e.length;a++)o[a]=e.charCodeAt(a);return new Blob([n],{type:r})}var f="undefined"!=typeof e&&e||{}||this,p='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [<!ENTITY nbsp " ">]>';f.prepareSvg=function(t,e,r){a(t),e=e||{},e.scale=e.scale||1,e.responsive=e.responsive||!1;var n="http://www.w3.org/2000/xmlns/";s(t,function(){function o(t){var e=document.createElement("style");e.setAttribute("type","text/css"),e.innerHTML="<![CDATA[\n"+t+"\n]]>";var n=document.createElement("defs");if(n.appendChild(e),u.insertBefore(n,u.firstChild),r){var o=s.innerHTML;o=o.replace(/NS\d+:href/gi,'xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href'),r(o,a,i)}}var a,i,s=document.createElement("div"),u=t.cloneNode(!0);if("svg"==t.tagName)a=e.width||c(t,u,"width"),i=e.height||c(t,u,"height");else{if(!t.getBBox)return void console.error("Attempted to render non-SVG element",t);var d=t.getBBox();a=d.x+d.width,i=d.y+d.height,u.setAttribute("transform",u.getAttribute("transform").replace(/translate\(.*?\)/,""));var f=document.createElementNS("http://www.w3.org/2000/svg","svg");f.appendChild(u),u=f}u.setAttribute("version","1.1"),u.getAttribute("xmlns")||u.setAttributeNS(n,"xmlns","http://www.w3.org/2000/svg"),u.getAttribute("xmlns:xlink")||u.setAttributeNS(n,"xmlns:xlink","http://www.w3.org/1999/xlink"),e.responsive?(u.removeAttribute("width"),u.removeAttribute("height"),u.setAttribute("preserveAspectRatio","xMinYMin meet")):(u.setAttribute("width",a*e.scale),u.setAttribute("height",i*e.scale)),u.setAttribute("viewBox",[e.left||0,e.top||0,a,i].join(" "));for(var p=u.querySelectorAll("foreignObject > *"),_=0;_<p.length;_++)p[_].getAttribute("xmlns")||p[_].setAttributeNS(n,"xmlns","http://www.w3.org/1999/xhtml");s.appendChild(u),l(t,e,o)})},f.svgAsDataUri=function(t,e,r){f.prepareSvg(t,e,function(t){var e="data:image/svg+xml;base64,"+window.btoa(u(p+t));r&&r(e)})},f.svgAsPngUri=function(t,e,r){a(t),e=e||{},e.encoderType=e.encoderType||"image/png",e.encoderOptions=e.encoderOptions||.8;var n=function(t,n,o){var a=document.createElement("canvas"),i=a.getContext("2d");a.width=n,a.height=o,e.canvg?e.canvg(a,t):i.drawImage(t,0,0),e.backgroundColor&&(i.globalCompositeOperation="destination-over",i.fillStyle=e.backgroundColor,i.fillRect(0,0,a.width,a.height));var s;try{s=a.toDataURL(e.encoderType,e.encoderOptions)}catch(t){if("undefined"!=typeof SecurityError&&t instanceof SecurityError||"SecurityError"==t.name)return void console.error("Rendered SVG images cannot be downloaded in this browser.");throw t}r(s)};e.canvg?f.prepareSvg(t,e,n):f.svgAsDataUri(t,e,function(t){var e=new Image;e.onload=function(){n(e,e.width,e.height)},e.onerror=function(){console.error("There was an error loading the data URI as an image on the following SVG\n",window.atob(t.slice(26)),"\n","Open the following link to see browser's diagnosis\n",t)},e.src=t})},f.download=function(t,e){if(navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(d(e),t);else{var r=document.createElement("a"),n="download"in r;if(n){r.download=t,r.style.display="none",document.body.appendChild(r);try{var o=d(e),a=URL.createObjectURL(o);r.href=a,r.onclick=function(){requestAnimationFrame(function(){URL.revokeObjectURL(a)})}}catch(t){console.warn("This browser does not support object URLs. Falling back to string URL."),r.href=e}r.click(),document.body.removeChild(r)}else window.open(e,"_temp","menubar=no,toolbar=no,status=no")}},f.saveSvg=function(t,e,r){a(t),r=r||{},f.svgAsDataUri(t,r,function(t){f.download(e,t)})},f.saveSvgAsPng=function(t,e,r){a(t),r=r||{},f.svgAsPngUri(t,r,function(t){f.download(e,t)})},n=function(){return f}.call(e,r,e,t),!(void 0!==n&&(t.exports=n))}()},function(t,e,r){"use strict";var n=r(283);t.exports=function(t){var e=n(t,"share_info");e.header.append("a").attr("target","_blank").attr("href","/clustergrammer/"),e.header.append("h4").classed("modal-title",!0).html("Share the visualization using the current URL:"),e.body.append("input").classed("bootstrap_highlight",!0).classed("share_url",!0);var r=n(t,"picture_info");r.header.append("h4").classed("modal-title",!0).html("Save a snapshot of the visualization"),r.body.append("div").classed("download_buttons",!0);var o=n(t,"dendro_info");o.header.append("h4").classed("modal-title",!0).html("Cluster Information"),o.body.append("g").classed("cluster_info_container",!0),o.body.append("div").classed("dendro_text",!0).append("input").classed("bootstrap_highlight",!0).classed("current_names",!0).style("width","100%")}},function(t,e){"use strict";t.exports=function(t,e){var r={},n=d3.select(t.root).append("div").classed("modal",!0).classed("fade",!0).classed(e,!0).attr("role","dialog"),o=n.append("div").classed("modal-dialog",!0),a=o.append("div").classed("modal-content",!0);return r.header=a.append("div").classed("modal-header",!0),r.header.append("button").attr("type","button").classed("close",!0).attr("data-dismiss","modal").html("×"),r.body=a.append("div").classed("modal-body",!0),r}},function(t,e){"use strict";t.exports=function(t){var e=t.append("div").classed("opacity_slider_container",!0).style("margin-top","5px").style("padding-left","10px").style("padding-right","10px");e.append("div").classed("sidebar_text",!0).classed("opacity_slider_text",!0).style("margin-bottom","3px").text("Opacity Slider"),e.append("div").classed("slider",!0).classed("opacity_slider",!0)}},function(t,e,r){"use strict";var n=r(68);t.exports=function(t){var e=t.params;d3.select(e.root+" .sidebar_wrapper").append("div").classed("sidebar_text",!0).style("padding-left","10px").style("padding-top","5px").text("Matrix Values");var r=e.sidebar.width-20,o=13,a=3*o,i=1.2*r,s=10,l=33,c=r+10,u=10,d=3,f=e.network_data,p=n.max(f.links,function(t){return t.value}).value,h=_.min(f.links,function(t){return t.value}).value,v=d3.select(e.root+" .sidebar_wrapper").append("svg").attr("height",a+"px").attr("width",i+"px"),m=v.append("defs"),g=m.append("linearGradient").attr("id","linear-gradient"),y="none";h>=0?(g.append("stop").attr("offset","0%").attr("stop-color","white"),g.append("stop").attr("offset","100%").attr("stop-color","red"),y="all_postiive"):p<=0?(g.append("stop").attr("offset","0%").attr("stop-color","blue"),g.append("stop").attr("offset","100%").attr("stop-color","white"),y="all_negative"):(g.append("stop").attr("offset","0%").attr("stop-color","blue"),g.append("stop").attr("offset","50%").attr("stop-color","white"),g.append("stop").attr("offset","100%").attr("stop-color","red")),v.append("rect").classed("background",!0).attr("height",o+"px").attr("width",r+"px").attr("fill","url(#linear-gradient)").attr("transform","translate("+u+", "+d+")").attr("stroke","grey").attr("stroke-width","0.25px");var w=Math.abs(Math.round(10*e.matrix.max_link)/10),x=13;v.append("text").text(function(){var t;return t="all_postiive"===y?0:"-"+w.toLocaleString()}).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",300).style("font-size",x).attr("transform","translate("+s+","+l+")").attr("text-anchor","start"),v.append("text").text(w.toLocaleString()).text(function(){var t;return t="all_negative"===y?0:w.toLocaleString()}).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",300).style("font-size",x).attr("transform","translate("+c+","+l+")").attr("text-anchor","end")}}]);
//# sourceMappingURL=clustergrammer.node.min.js.map