diff --git a/CHANGELOG.md b/CHANGELOG.md index 70d96767c..202528fbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ ### Changed * [#589](https://github.com/plotly/dash-bio/pull/593) Merged dash-bio-utils into the dash bio package namespace. +### Fixed +* [#646](https://github.com/plotly/dash-bio/pull/646) Fixed dendrogram domain whitespaces for Clustergram when dendrogram property is not set for either axis (for more infor see [#644](https://github.com/plotly/dash-bio/issues/644)). + ## [0.9.0] - 2021-12-14 ### Fixed diff --git a/DESCRIPTION b/DESCRIPTION index 05b9b29ec..a06fa91b3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: dashBio Title: Open-source Bioinformatics Components for Dash -Version: 0.9.0 +Version: 1.0.0 Description: A suite of components that makes it simpler to analyze and visualize bioinformatics data and interact with them in a Dash application. Depends: R (>= 3.0.2), manhattanly Imports: dash diff --git a/R/internal.R b/R/internal.R index 34a68b4a0..81bf762a6 100644 --- a/R/internal.R +++ b/R/internal.R @@ -1,180 +1,180 @@ .dashBio_js_metadata <- function() { deps_metadata <- list(`dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-alignment.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, async = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-circos.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, async = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-ideogram.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, async = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-igv.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, async = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-pileup.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, async = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-moleculeviewer2.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, async = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-moleculeviewer3.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, async = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-needle.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, async = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-nglmoleculeviewer.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, async = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-onco.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, async = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-sequence.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, async = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-speck.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, async = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-jsme.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, async = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-alignment.js.map', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, dynamic = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-circos.js.map', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, dynamic = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-ideogram.js.map', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, dynamic = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-igv.js.map', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, dynamic = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-pileup.js.map', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, dynamic = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-moleculeviewer2.js.map', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, dynamic = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-moleculeviewer3.js.map', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, dynamic = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-needle.js.map', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, dynamic = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-nglmoleculeviewer.js.map', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, dynamic = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-onco.js.map', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, dynamic = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-sequence.js.map', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, dynamic = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-speck.js.map', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, dynamic = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-jsme.js.map', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, dynamic = TRUE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'bundle.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE), class = "html_dependency"), `dash_bio` = structure(list(name = "dash_bio", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'bundle.js.map', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, dynamic = TRUE), class = "html_dependency"), `dash_bio-shared` = structure(list(name = "dash_bio-shared", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'dash_bio-shared.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", all_files = FALSE, async = TRUE), class = "html_dependency"), `dash_bio-shared` = structure(list(name = "dash_bio-shared", -version = "0.9.0", src = list(href = NULL, +version = "1.0.0", src = list(href = NULL, file = "deps"), meta = NULL, script = 'dash_bio-shared.js.map', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashBio", diff --git a/dash_bio/bundle.js b/dash_bio/bundle.js index 3c58dbc13..d53c61081 100644 --- a/dash_bio/bundle.js +++ b/dash_bio/bundle.js @@ -1,2 +1,2 @@ -window.dash_bio=function(t){function n(n){for(var e,o,a=n[0],i=n[1],u=0,s=[];u0&&(o=1/Math.sqrt(o),t[0]=n[0]*o,t[1]=n[1]*o),t},u.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]},u.cross=function(t,n,e){var r=n[0]*e[1]-n[1]*e[0];return t[0]=t[1]=0,t[2]=r,t},u.lerp=function(t,n,e,r){var o=n[0],a=n[1];return t[0]=o+r*(e[0]-o),t[1]=a+r*(e[1]-a),t},u.random=function(t,n){n=n||1;var e=2*r()*Math.PI;return t[0]=Math.cos(e)*n,t[1]=Math.sin(e)*n,t},u.transformMat2=function(t,n,e){var r=n[0],o=n[1];return t[0]=e[0]*r+e[2]*o,t[1]=e[1]*r+e[3]*o,t},u.transformMat2d=function(t,n,e){var r=n[0],o=n[1];return t[0]=e[0]*r+e[2]*o+e[4],t[1]=e[1]*r+e[3]*o+e[5],t},u.transformMat3=function(t,n,e){var r=n[0],o=n[1];return t[0]=e[0]*r+e[3]*o+e[6],t[1]=e[1]*r+e[4]*o+e[7],t},u.transformMat4=function(t,n,e){var r=n[0],o=n[1];return t[0]=e[0]*r+e[4]*o+e[12],t[1]=e[1]*r+e[5]*o+e[13],t},u.forEach=(i=u.create(),function(t,n,e,r,o,a){var u,s;for(n||(n=2),e||(e=0),s=r?Math.min(r*n+e,t.length):t.length,u=e;u0&&(a=1/Math.sqrt(a),t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a),t},s.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]},s.cross=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=e[0],u=e[1],s=e[2];return t[0]=o*s-a*u,t[1]=a*i-r*s,t[2]=r*u-o*i,t},s.lerp=function(t,n,e,r){var o=n[0],a=n[1],i=n[2];return t[0]=o+r*(e[0]-o),t[1]=a+r*(e[1]-a),t[2]=i+r*(e[2]-i),t},s.random=function(t,n){n=n||1;var e=2*r()*Math.PI,o=2*r()-1,a=Math.sqrt(1-o*o)*n;return t[0]=Math.cos(e)*a,t[1]=Math.sin(e)*a,t[2]=o*n,t},s.transformMat4=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=e[3]*r+e[7]*o+e[11]*a+e[15];return i=i||1,t[0]=(e[0]*r+e[4]*o+e[8]*a+e[12])/i,t[1]=(e[1]*r+e[5]*o+e[9]*a+e[13])/i,t[2]=(e[2]*r+e[6]*o+e[10]*a+e[14])/i,t},s.transformMat3=function(t,n,e){var r=n[0],o=n[1],a=n[2];return t[0]=r*e[0]+o*e[3]+a*e[6],t[1]=r*e[1]+o*e[4]+a*e[7],t[2]=r*e[2]+o*e[5]+a*e[8],t},s.transformQuat=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=e[0],u=e[1],s=e[2],l=e[3],c=l*r+u*a-s*o,f=l*o+s*r-i*a,h=l*a+i*o-u*r,p=-i*r-u*o-s*a;return t[0]=c*l+p*-i+f*-s-h*-u,t[1]=f*l+p*-u+h*-i-c*-s,t[2]=h*l+p*-s+c*-u-f*-i,t},s.rotateX=function(t,n,e,r){var o=[],a=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],a[0]=o[0],a[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),a[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t},s.rotateY=function(t,n,e,r){var o=[],a=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],a[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),a[1]=o[1],a[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t},s.rotateZ=function(t,n,e,r){var o=[],a=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],a[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),a[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),a[2]=o[2],t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t},s.forEach=function(){var t=s.create();return function(n,e,r,o,a,i){var u,s;for(e||(e=3),r||(r=0),s=o?Math.min(o*e+r,n.length):n.length,u=r;u1?0:Math.acos(o)},s.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},void 0!==t&&(t.vec3=s);var l={create:function(){var t=new e(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},clone:function(t){var n=new e(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n},fromValues:function(t,n,r,o){var a=new e(4);return a[0]=t,a[1]=n,a[2]=r,a[3]=o,a},copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t},set:function(t,n,e,r,o){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t},add:function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t},subtract:function(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t}};l.sub=l.subtract,l.multiply=function(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t[3]=n[3]*e[3],t},l.mul=l.multiply,l.divide=function(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t[3]=n[3]/e[3],t},l.div=l.divide,l.min=function(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t[3]=Math.min(n[3],e[3]),t},l.max=function(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t[3]=Math.max(n[3],e[3]),t},l.scale=function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t},l.scaleAndAdd=function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t},l.distance=function(t,n){var e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],a=n[3]-t[3];return Math.sqrt(e*e+r*r+o*o+a*a)},l.dist=l.distance,l.squaredDistance=function(t,n){var e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],a=n[3]-t[3];return e*e+r*r+o*o+a*a},l.sqrDist=l.squaredDistance,l.length=function(t){var n=t[0],e=t[1],r=t[2],o=t[3];return Math.sqrt(n*n+e*e+r*r+o*o)},l.len=l.length,l.squaredLength=function(t){var n=t[0],e=t[1],r=t[2],o=t[3];return n*n+e*e+r*r+o*o},l.sqrLen=l.squaredLength,l.negate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t},l.inverse=function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t},l.normalize=function(t,n){var e=n[0],r=n[1],o=n[2],a=n[3],i=e*e+r*r+o*o+a*a;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=n[3]*i),t},l.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]},l.lerp=function(t,n,e,r){var o=n[0],a=n[1],i=n[2],u=n[3];return t[0]=o+r*(e[0]-o),t[1]=a+r*(e[1]-a),t[2]=i+r*(e[2]-i),t[3]=u+r*(e[3]-u),t},l.random=function(t,n){return n=n||1,t[0]=r(),t[1]=r(),t[2]=r(),t[3]=r(),l.normalize(t,t),l.scale(t,t,n),t},l.transformMat4=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=n[3];return t[0]=e[0]*r+e[4]*o+e[8]*a+e[12]*i,t[1]=e[1]*r+e[5]*o+e[9]*a+e[13]*i,t[2]=e[2]*r+e[6]*o+e[10]*a+e[14]*i,t[3]=e[3]*r+e[7]*o+e[11]*a+e[15]*i,t},l.transformQuat=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=e[0],u=e[1],s=e[2],l=e[3],c=l*r+u*a-s*o,f=l*o+s*r-i*a,h=l*a+i*o-u*r,p=-i*r-u*o-s*a;return t[0]=c*l+p*-i+f*-s-h*-u,t[1]=f*l+p*-u+h*-i-c*-s,t[2]=h*l+p*-s+c*-u-f*-i,t},l.forEach=function(){var t=l.create();return function(n,e,r,o,a,i){var u,s;for(e||(e=4),r||(r=0),s=o?Math.min(o*e+r,n.length):n.length,u=r;u.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(s.cross(d,n,e),t[0]=d[0],t[1]=d[1],t[2]=d[2],t[3]=1+r,y.normalize(t,t))}),y.setAxes=(v=h.create(),function(t,n,e,r){return v[0]=e[0],v[3]=e[1],v[6]=e[2],v[1]=r[0],v[4]=r[1],v[7]=r[2],v[2]=-n[0],v[5]=-n[1],v[8]=-n[2],y.normalize(t,y.fromMat3(t,v))}),y.clone=l.clone,y.fromValues=l.fromValues,y.copy=l.copy,y.set=l.set,y.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},y.setAxisAngle=function(t,n,e){e*=.5;var r=Math.sin(e);return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=Math.cos(e),t},y.add=l.add,y.multiply=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=n[3],u=e[0],s=e[1],l=e[2],c=e[3];return t[0]=r*c+i*u+o*l-a*s,t[1]=o*c+i*s+a*u-r*l,t[2]=a*c+i*l+r*s-o*u,t[3]=i*c-r*u-o*s-a*l,t},y.mul=y.multiply,y.scale=l.scale,y.rotateX=function(t,n,e){e*=.5;var r=n[0],o=n[1],a=n[2],i=n[3],u=Math.sin(e),s=Math.cos(e);return t[0]=r*s+i*u,t[1]=o*s+a*u,t[2]=a*s-o*u,t[3]=i*s-r*u,t},y.rotateY=function(t,n,e){e*=.5;var r=n[0],o=n[1],a=n[2],i=n[3],u=Math.sin(e),s=Math.cos(e);return t[0]=r*s-a*u,t[1]=o*s+i*u,t[2]=a*s+r*u,t[3]=i*s-o*u,t},y.rotateZ=function(t,n,e){e*=.5;var r=n[0],o=n[1],a=n[2],i=n[3],u=Math.sin(e),s=Math.cos(e);return t[0]=r*s+o*u,t[1]=o*s-r*u,t[2]=a*s+i*u,t[3]=i*s-a*u,t},y.calculateW=function(t,n){var e=n[0],r=n[1],o=n[2];return t[0]=e,t[1]=r,t[2]=o,t[3]=Math.sqrt(Math.abs(1-e*e-r*r-o*o)),t},y.dot=l.dot,y.lerp=l.lerp,y.slerp=function(t,n,e,r){var o,a,i,u,s,l=n[0],c=n[1],f=n[2],h=n[3],p=e[0],d=e[1],m=e[2],g=e[3];return(a=l*p+c*d+f*m+h*g)<0&&(a=-a,p=-p,d=-d,m=-m,g=-g),1-a>1e-6?(o=Math.acos(a),i=Math.sin(o),u=Math.sin((1-r)*o)/i,s=Math.sin(r*o)/i):(u=1-r,s=r),t[0]=u*l+s*p,t[1]=u*c+s*d,t[2]=u*f+s*m,t[3]=u*h+s*g,t},y.invert=function(t,n){var e=n[0],r=n[1],o=n[2],a=n[3],i=e*e+r*r+o*o+a*a,u=i?1/i:0;return t[0]=-e*u,t[1]=-r*u,t[2]=-o*u,t[3]=a*u,t},y.conjugate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t},y.length=l.length,y.len=y.length,y.squaredLength=l.squaredLength,y.sqrLen=y.squaredLength,y.normalize=l.normalize,y.fromMat3=function(t,n){var e,r=n[0]+n[4]+n[8];if(r>0)e=Math.sqrt(r+1),t[3]=.5*e,e=.5/e,t[0]=(n[5]-n[7])*e,t[1]=(n[6]-n[2])*e,t[2]=(n[1]-n[3])*e;else{var o=0;n[4]>n[0]&&(o=1),n[8]>n[3*o+o]&&(o=2);var a=(o+1)%3,i=(o+2)%3;e=Math.sqrt(n[3*o+o]-n[3*a+a]-n[3*i+i]+1),t[o]=.5*e,e=.5/e,t[3]=(n[3*a+i]-n[3*i+a])*e,t[a]=(n[3*a+o]+n[3*o+a])*e,t[i]=(n[3*i+o]+n[3*o+i])*e}return t},y.str=function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},void 0!==t&&(t.quat=y)}(e.exports)}()},function(t,n,e){"use strict";var r=e(7),o=e(6),a=e(26);function i(t,n,e){return Math.min(n,Math.max(t,e))}t.exports.new=function(){return{aspect:1,zoom:.125,translation:{x:0,y:0},atomScale:.6,relativeAtomScale:1,bondScale:.5,rotation:r.mat4.create(),ao:.75,aoRes:256,brightness:.5,outline:0,spf:32,bonds:!1,bondThreshold:1.2,bondShade:.5,atomShade:.5,resolution:768,dofStrength:0,dofPosition:.5,fxaa:1}},t.exports.center=function(t,n){for(var e=-1/0,a=1/0,i=-1/0,u=1/0,s=0;s=0;)n=s[e],Object(o.a)(n,t)&&!c(r,n)&&(r[r.length]=n),e-=1;return r})):Object(r.a)((function(t){return Object(t)!==t?[]:Object.keys(t)}));n.a=f},function(t,n,e){"use strict";var r=e(3),o=Object(r.a)((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));n.a=o},function(t,n,e){"use strict";e.d(n,"a",(function(){return a}));var r=e(3),o=e(4);function a(t){return function n(e,a){switch(arguments.length){case 0:return n;case 1:return Object(o.a)(e)?n:Object(r.a)((function(n){return t(e,n)}));default:return Object(o.a)(e)&&Object(o.a)(a)?n:Object(o.a)(e)?Object(r.a)((function(n){return t(n,a)})):Object(o.a)(a)?Object(r.a)((function(n){return t(e,n)})):t(e,a)}}}},function(t,n,e){"use strict";e.d(n,"a",(function(){return m})),e.d(n,"c",(function(){return g})),e.d(n,"b",(function(){return v}));var r=e(0),o=e.n(r),a=e(1),i=e.n(a),u=e(2);function s(t){return(s="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)}function l(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function c(t,n){for(var e=0;en&&(n=u,t.farAtom=r)}return t.farAtom});t.exports.getRadius=function(t){var n=u(t),e=a.MAX_ATOM_RADIUS,r=2.5*Math.sqrt(e*e+e*e+e*e);return Math.sqrt(n.x*n.x+n.y*n.y+n.z*n.z)+r}},function(t,n,e){var o;o=function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}return e.m=t,e.c=n,e.p="",e(0)}([function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.rnaPlot=n.RNAGraph=void 0;var o=e(1);Object.defineProperty(n,"RNAGraph",{enumerable:!0,get:function(){return o.RNAGraph}});var a=e(3);Object.defineProperty(n,"rnaPlot",{enumerable:!0,get:function(){return a.rnaPlot}}),n.FornaContainer=function(t,n){var e=this;if(e.options={displayAllLinks:!1,labelInterval:10,applyForce:!0,chargeDistance:110,friction:.35,middleCharge:-30,otherCharge:-30,linkDistanceMultiplier:15,initialSize:null,layout:"standard-polygonal",allowPanningAndZooming:!0,transitionDuration:500,hoverPattern:"",resizeSvgOnResize:!0},arguments.length>1)for(var a in n)e.options.hasOwnProperty(a)&&(e.options[a]=n[a]);null!==e.options.initialSize?(e.options.svgW=e.options.initialSize[0],e.options.svgH=e.options.initialSize[1]):(e.options.svgW=800,e.options.svgH=800),l.default.scale.category20();var u=null,s=null,p=l.default.scale.linear().domain([0,e.options.svgW]).range([0,e.options.svgW]),d=l.default.scale.linear().domain([0,e.options.svgH]).range([0,e.options.svgH]),m=e.graph={nodes:[],links:[]};function g(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function v(t){var n=t,e=t.prevNode;if(null!==e&&t.linked){var r=[-(n.x-e.x),-(n.y-e.y)],o=[-(r=[r[0]/g(r),r[1]/g(r)])[1],r[0]],a=[t.radius*r[0],t.radius*r[1]],i="M"+(a[0]+6*(r[0]+o[0])/2)+","+(a[1]+6*(r[1]+o[1])/2)+"L"+a[0]+","+a[1]+"L"+(a[0]+6*(r[0]-o[0])/2)+","+(a[1]+6*(r[1]-o[1])/2);l.default.select(this).attr("d",i)}}function y(t){return"basepair"==t.linkType||"backbone"==t.linkType||"pseudoknot"==t.linkType||"label_link"==t.linkType||"external"==t.linkType||"chain_chain"==t.linkType}function b(t,n,e){if(t.hasOwnProperty(n.num)){var r=parseFloat(t[n.num]);return isNaN(r)?t[n.num]:e(r)}return"white"}function x(){}function M(){u&&(mpos=l.default.mouse(A.node()),N.attr("x1",u.x).attr("y1",u.y).attr("x2",mpos[0]).attr("y2",mpos[1]))}function _(){u&&N.attr("class","drag_line_hidden"),O()}e.linkStrengths={pseudoknot:0,proteinChain:0,chainChain:0,intermolecule:10,external:0,other:10},e.displayParameters={displayBackground:"true",displayNumbering:"true",displayNodeOutline:"true",displayNodeLabel:"true",displayLinks:"true",displayPseudoknotLinks:"true",displayProteinLinks:"true"},e.colorScheme="structure",e.customColors={},e.animation=e.options.applyForce,e.deaf=!1,e.rnas={},e.extraLinks=[],Array.prototype.equals=function(t){if(!t)return!1;if(this.length!=t.length)return!1;for(var n=0,e=this.length;n0?l.default.max(e.graph.nodes.map((function(t){return t.x}))):0,o=l.default.min(t.nodes.map((function(t){return t.x}))),t.nodes.forEach((function(t){t.x+=r-o+20,t.px+=r-o}))),t.nodes.forEach((function(n){n.rna=t})),e.rnas[t.uid]=t,e.recalculateGraph(),e.update(),e.centerView(),t},e.transitionRNA=function(t,n){var r=e.options.transitionDuration,o={uids:e.graph.nodes.filter((function(t){return"nucleotide"==t.nodeType})).map((function(t){return t.uid}))},a=e.createInitialLayout(t,o),i=T.selectAll("g.gnode").data(a.nodes,Y);0===(r=e.options.transitionDuration)?i.attr("transform",(function(t){return"translate("+[t.x,t.y]+")"})):i.transition().attr("transform",(function(t){return"translate("+[t.x,t.y]+")"})).duration(r);var u=E.selectAll("line.link").data(a.links.filter(y),X),s=e.createNewNodes(i.enter()).attr("transform",(function(t){return void 0!==t.x&&void 0!==t.y?"translate("+[0,0]+")":""}));0===r?i.exit().remove():i.exit().transition().attr("transform",(function(t){return void 0!==t.x&&void 0!==t.y?"translate("+[0,0]+")":""})),i.select("path").each(v),e.graph.nodes=i.data(),e.updateStyle(),e.centerView(r),u.exit().remove(),0===r?(u.attr("x1",(function(t){return t.source.x})).attr("y1",(function(t){return t.source.y})).attr("x2",(function(t){return t.target.x})).attr("y2",(function(t){return t.target.y})),e.createNewLinks(u.enter()),e.graph.links=u.data(),e.updateStyle()):u.transition().attr("x1",(function(t){return t.source.x})).attr("y1",(function(t){return t.source.y})).attr("x2",(function(t){return t.target.x})).attr("y2",(function(t){return t.target.y})).duration(r).call((function(t,n){0===t.size()&&setTimeout(n,r);var e=0;t.each((function(){++e})).each("end",(function(){--e||n.apply(this,arguments)}))}),(function(){e.createNewLinks(u.enter()),e.graph.links=u.data(),e.updateStyle(),void 0!==n&&n()})),0===r?s.attr("transform",(function(t){return void 0!==t.x&&void 0!==t.y?"translate("+[t.x,t.y]+")":""})):s.transition().attr("transform",(function(t){return void 0!==t.x&&void 0!==t.y?"translate("+[t.x,t.y]+")":""}))},e.recalculateGraph=function(){for(var t in e.graph.nodes=[],e.graph.links=[],e.rnas)e.graph.nodes=e.graph.nodes.concat(e.rnas[t].nodes),e.graph.links=e.graph.links.concat(e.rnas[t].links);for(var n={},r=0;r0?(maxX=l.default.max(e.graph.nodes.map((function(t){return t.x}))),maxY=l.default.max(e.graph.nodes.map((function(t){return t.y})))):(maxX=0,maxY=0),t.nodes.forEach((function(t){t.rna.uid in e.rnas||(e.rnas[t.rna.uid]=t.rna),t.x+=maxX,t.px+=maxX})),r=new o.RNAGraph("",""),r.nodes=t.nodes,r.links=t.links,e.recalculateGraph(),e.update(),e.centerView()},e.addCustomColors=function(t){e.customColors=t},e.addCustomColorsText=function(t){var n=new f.ColorScheme(t);e.customColors=n.colorsJson,e.changeColorScheme("custom")},e.clearNodes=function(){e.graph.nodes=[],e.graph.links=[],e.rnas={},e.extraLinks=[],e.update()},e.toJSON=function(){var t={rnas:e.rnas,extraLinks:e.extraLinks};return JSON.stringify(t,(function(t,n){return"rna"==t?void 0:n}),"\t")},e.fromJSON=function(t){var n,a;try{var i=JSON.parse(t);n=i.rnas,a=i.extraLinks}catch(t){throw t}for(var u in n)"rna"==n[u].type?(r=new o.RNAGraph,r.seq=n[u].seq,r.dotbracket=n[u].dotbracket,r.circular=n[u].circular,r.pairtable=n[u].pairtable,r.uid=n[u].uid,r.structName=n[u].structName,r.nodes=n[u].nodes,r.links=n[u].links,r.rnaLength=n[u].rnaLength,r.elements=n[u].elements,r.nucsToNodes=n[u].nucsToNodes,r.pseudoknotPairs=n[u].pseudoknotPairs):(r=new ProteinGraph,r.size=n[u].size,r.nodes=n[u].nodes,r.uid=n[u].uid),e.addRNAJSON(r,!1);a.forEach((function(t){e.extraLinks.push(t)})),e.recalculateGraph(),e.update()},e.setSize=function(){if(null==e.options.initialSize){var n=l.default.select(t).node().offsetHeight,r=l.default.select(t).node().offsetWidth;e.options.svgW=r,e.options.svgH=n,p.range([0,r]).domain([0,r]),d.range([0,n]).domain([0,n]),e.zoomer.x(p).y(d),e.brusher.x(p).y(d),e.centerView(),e.options.resizeSvgOnResize&&w.attr("width",r).attr("height",n)}},e.setOutlineColor=function(t){T.selectAll("g.gnode").select("[node_type=nucleotide]").style("fill",t)},e.changeColorScheme=function(t){T.selectAll("[node_type=protein]").classed("protein",!0).attr("r",(function(t){return t.radius})),T.selectAll("g.gnode"),T.selectAll("g.gnode").selectAll("circle");var n=T.selectAll("g.gnode").select("[node_type=nucleotide]");if(e.colorScheme=t,"sequence"==t){var r=l.default.scale.ordinal().range(["#dbdb8d","#98df8a","#ff9896","#aec7e8","#aec7e8"]).domain(["A","C","G","U","T"]);n.style("fill",(function(t){return r(t.name)}))}else"structure"==t?(r=l.default.scale.category10().domain(["s","m","i","e","t","h","x"]).range(["lightgreen","#ff9896","#dbdb8d","lightsalmon","lightcyan","lightblue","transparent"]),n.style("fill",(function(t){return r(t.elemType)}))):"positions"==t?n.style("fill",(function(t){return l.default.scale.linear().range(["#98df8a","#dbdb8d","#ff9896"]).interpolate(l.default.interpolateLab).domain([1,1+(t.rna.rnaLength-1)/2,t.rna.rnaLength])(t.num)})):"custom"==t&&(void 0!==e.customColors&&"domain"in e.customColors&&"range"in e.customColors&&(r=l.default.scale.linear().interpolate(l.default.interpolateLab).domain(e.customColors.domain).range(e.customColors.range)),n.style("fill",(function(t){return void 0!==e.customColors&&e.customColors.hasOwnProperty("colorValues")?e.customColors.colorValues.hasOwnProperty(t.structName)&&e.customColors.colorValues[t.structName].hasOwnProperty(t.num)?b(e.customColors.colorValues[t.structName],t,r):e.customColors.colorValues.hasOwnProperty("")?b(e.customColors.colorValues[""],t,r):"white":"white"})))},e.setHoverPattern=function(t){e.options.hoverPattern=t||""},window.addEventListener("resize",e.setSize,!1),e.zoomer=l.default.behavior.zoom().scaleExtent([.1,10]).x(p).y(d).on("zoomstart",P).on("zoom",R),l.default.select(t).select("svg").remove();var w=l.default.select(t).classed("forna-container",!0).attr("tabindex",1).on("keydown.brush",B).on("keyup.brush",I).each((function(){this.focus()})).append("svg:svg").attr("width",e.options.svgW).attr("height",e.options.svgH).attr("id","plotting-area");e.options.svg=w;var k=w.append("svg:g").on("mousemove",M).on("mousedown",x).on("mouseup",_);e.options.allowPanningAndZooming&&k.call(e.zoomer);var S=k.append("g").datum((function(){return{selected:!1,previouslySelected:!1}})).attr("class","brush"),A=k.append("svg:g"),E=A.append("svg:g"),T=A.append("svg:g");function P(){var t=T.selectAll("g.gnode").selectAll(".outline_node");t.each((function(t){t.selected=!1,t.previouslySelected=!1})),t.classed("selected",!1)}function R(){A.attr("transform","translate("+l.default.event.translate+") scale("+l.default.event.scale+")")}e.brusher=l.default.svg.brush().x(p).y(d).on("brushstart",(function(t){T.selectAll("g.gnode").selectAll(".outline_node").each((function(t){t.previouslySelected=L&&t.selected}))})).on("brush",(function(){var t=T.selectAll("g.gnode").selectAll(".outline_node"),n=l.default.event.target.extent();t.classed("selected",(function(t){return t.selected=e.options.applyForce&&t.previouslySelected^(n[0][0]<=t.x&&t.xr||sa||l-1){if(t.source.rna==t.target.rna){var n=t.source.rna;n.addPseudoknots(),n.pairtable[t.source.num]=0,n.pairtable[t.target.num]=0,V(n)}else extraLinkIndex=e.extraLinks.indexOf(t),e.extraLinks.splice(extraLinkIndex,1);e.recalculateGraph()}e.update()},G=function(t){C&&(t.linkType in{backbone:!0,fake:!0,fake_fake:!0,label_link:!0}||H(t))};e.addLink=function(t){t.source.rna==t.target.rna?(r=t.source.rna,r.pairtable[t.source.num]=t.target.num,r.pairtable[t.target.num]=t.source.num,V(r)):(t.linkType="intermolecule",e.extraLinks.push(t)),e.recalculateGraph(),e.update()};var W=function(t){l.default.event.defaultPrevented||(L||T.selectAll("g.gnode").selectAll(".outline_node").classed("selected",(function(t){return t.selected=e.options.applyForce&&(t.previouslySelected=!1)})),l.default.select(this).select("circle").classed("selected",t.selected=e.options.applyForce&&!t.previouslySelected))},Z=function(t){if(u){if((s=t)==u)return void O();var n={source:u,target:s,linkType:"basepair",value:1,uid:generateUUID()};for(i=0;i0?e.options.hoverPattern:n},e.setSize()},e(15);var u,s=e(17),l=(u=s)&&u.__esModule?u:{default:u},c=e(4),f=e(2),h=e(5)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ProteinGraph=i,n.RNAGraph=u,n.moleculesToJson=function(t){for(var n={},e=[],r=[],o=0;o0&&"*"==u.dotbracket[u.dotbracket.length-1]&&(u.dotbracket=u.dotbracket.slice(0,u.dotbracket.length-1),u.circular=!0),u.uid=a(),u.elements=[],u.pseudoknotPairs=[],u.nucsToNodes={},u.addUids=function(t){for(var n=u.nodes.filter((function(t){return"nucleotide"==t.nodeType})),e=0;e=0;)n.push(e),t=t.substring(0,e)+"oo"+t.substring(e+1,t.length);return{targetString:t,breaks:n}};var s=u.removeBreaks(u.dotbracket);u.dotbracket=s.targetString,u.dotBracketBreaks=s.breaks,s=u.removeBreaks(u.seq),u.seq=s.targetString,u.seqBreaks=s.breaks,u.calculateStartNumberArray=function(){u.startNumberArray=[];for(var t=0;t=0&&(e=!0);e?u.elements[n][2].map((function(t){0!=t&&(u.nodes[t-1].elemType="e")})):u.elements[n][2].map((function(t){0!=t&&(u.nodes[t-1].elemType=u.elements[n][0])}))}return u},u.getPositions=function(t){for(var n=[],e=u.nodes.filter((function(n){return n.nodeType==t})),r=0;r=4})),e=0;eu.dotbracket.length)){u.links.push({source:u.nodes[t[f]-1],target:u.nodes[u.nodes.length-1],linkType:"fake",value:e,uid:a()}),t.length>4&&u.links.push({source:u.nodes[t[f]-1],target:u.nodes[t[(f+Math.floor(t.length/2))%t.length]-1],linkType:"fake",value:2*e,uid:a()});var h=3.14159*(t.length-2)/t.length,p=2*Math.cos(1.570795-h/2);u.links.push({source:u.nodes[t[f]-1],target:u.nodes[t[(f+2)%t.length]-1],linkType:"fake",value:p});var d=u.nodes[t[f]-1];"x"in d&&(s+=d.x,l+=d.y,c+=1)}return c>0&&(i.x=s/c,i.y=l/c,i.px=i.x,i.py=i.y),u},u.connectFakeNodes=function(){for(var t={},n=u.nodes.filter((function(t){return"middle"==t.nodeType})),e=new Set,r=1;r<=u.nodes.length;r++)t[r]=[];for(r=0;r=0||u.dotBracketBreaks.indexOf(e-2)>=0)&&(i=""),u.nodes.push({name:i,num:e+u.startNumberArray[e-1]-1,radius:5,rna:u,nodeType:"nucleotide",structName:u.structName,elemType:n[e],uid:a(),linked:!1})}for(e=0;e1&&-1===u.dotBracketBreaks.indexOf(e-1)&&-1==u.dotBracketBreaks.indexOf(e-2)&&-1==u.dotBracketBreaks.indexOf(e-3)&&(u.links.push({source:u.nodes[e-2],target:u.nodes[e-1],linkType:"backbone",value:1,uid:a()}),u.nodes[e-1].linked=!0);for(e=0;er)return[];for(;0===t[e];e++)i.push(e);for(;0===t[r];r--)s.push(r);if(e>r){if(i.push(e),0===n)return[["e",n,i.sort(o)]];for(var l=!1,c=[],f=[],h=0;h=0&&(l=!0);return[["h",n,i.sort(o)]]}if(t[e]!=r){var p=i;for(h=e,p.push(h);h<=r;){for(a=a.concat(u.ptToElements(t,n,h,t[h])),p.push(t[h]),h=t[h]+1;0===t[h]&&h<=r;h++)p.push(h);p.push(h)}return p.pop(),(p=p.concat(s)).length>0&&(0===n?a.push(["e",n,p.sort(o)]):a.push(["m",n,p.sort(o)])),a}t[e]===r&&(i.push(e),s.push(r),i.concat(s).length>4&&(0===n?a.push(["e",n,i.concat(s).sort(o)]):a.push(["i",n,i.concat(s).sort(o)])));for(var d=[];t[e]===r&&e0)){eloop=externalLoop[0],nucs=eloop[2].sort(o),prev=nucs[0],hloop=!0,numGreater=0;for(var t=1;t1&&(numGreater+=1),prev=nucs[t];1==numGreater?eloop[0]="h":2==numGreater?eloop[0]="i":eloop[0]="m"}return u},u.reassignLinkUids=function(){for(var t=0;t1&&(u.pseudoknotPairs=u.pseudoknotPairs.concat(r.rnaUtilities.removePseudoknotsFromPairtable(u.pairtable))),u},u.addPseudoknots=function(){for(var t=u.pairtable,n=u.pseudoknotPairs,e=0;e0&&u.recalculateElements()}void 0===String.prototype.trim&&(String.prototype.trim=function(){return String(this).replace(/^\s+|\s+$/g,"")})},function(t,n,e){t.exports=function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){t.exports=e(1)},function(t,n){"use strict";function e(){var t=this;t.bracketLeft="([{abcdefghijklmnopqrstuvwxyz".split(""),t.inverseBrackets=function(t){for(var n={},e=0;e=r;r++){e[r]=new Array(n+1);for(var o=r;n>=o;o++)e[r][o]=0}var a=0;for(r=n-0-1;r>0;r--)for(o=r+0+1;n>=o;o++){a=e[r][o-1];for(var i=o-0-1;i>=r;i--)t[i]===o&&(a=Math.max(a,(i>r?e[r][i-1]:0)+1+(o-i-1>0?e[i+1][o-1]:0)));e[r][o]=a}return a=e[1][n],e},t.backtrackMaximumMatching=function(n,e){var r=Array.apply(null,Array(n.length)).map((function(){return 0}));return t.mmBt(n,r,e,1,n.length-1),r},t.mmBt=function(n,e,r,o,a){var i=n[o][a];if(!(0>a-o-1)){if(n[o][a-1]==i)return void t.mmBt(n,e,r,o,a-1);for(var u=a-0-1;u>=o;u--)if(r[a]===u&&(u>o?n[o][u-1]:0)+(a-u-1>0?n[u+1][a-1]:0)+1==i)return e[u]=a,e[a]=u,u>o&&t.mmBt(n,e,r,o,u-1),void t.mmBt(n,e,r,u+1,a-1);console.log("FAILED!!!"+o+","+a+": backtracking failed!")}},t.dotbracketToPairtable=function(n){var e=Array.apply(null,new Array(n.length+1)).map(Number.prototype.valueOf,0);e[0]=n.length;for(var r={},o=0;o0)throw"Unmatched base at position "+r[c][0];return e},t.insertIntoStack=function(t,n,e){for(var r=0;t[r].length>0&&t[r][t[r].length-1]r?t.bracketLeft[t.insertIntoStack(e,r,n[r])]:t.bracketRight[t.deleteFromStack(e,r)]}return a},t.findUnmatched=function(n,e,r){for(var o=[],a=[],i=e,u=r,s=e;r>=s;s++)0!==n[s]&&(n[s]r)&&a.push([s,n[s]]);for(s=i;u>=s;s++){for(;0===n[s]&&u>=s;)s++;for(r=n[s];n[s]===r;)s++,r--;o=o.concat(t.findUnmatched(n,s,r))}return a.length>0&&o.push(a),o},t.removePseudoknotsFromPairtable=function(n){for(var e=t.maximumMatching(n),r=t.backtrackMaximumMatching(e,n),o=[],a=1;aa)return[];for(;0===n[o];o++)s.push(o);for(;0===n[a];a--)l.push(a);if(o>a){if(s.push(o),0===e)return[["e",e,s.sort(r)]];for(var c=!1,f=[],h=[],p=0;p=0&&(c=!0);return[["h",e,s.sort(r)]]}if(n[o]!=a){var d=s;for(p=o,d.push(p);a>=p;){for(u=u.concat(t.ptToElements(n,e,p,n[p],i)),d.push(n[p]),p=n[p]+1;0===n[p]&&a>=p;p++)d.push(p);d.push(p)}return d.pop(),(d=d.concat(l)).length>0&&(0===e?u.push(["e",e,d.sort(r)]):u.push(["m",e,d.sort(r)])),u}if(n[o]===a){s.push(o),l.push(a);var m=s.concat(l);m.length>4&&(0===e?u.push(["e",e,s.concat(l).sort(r)]):u.push(["i",e,s.concat(l).sort(r)]))}for(var g=[];n[o]===a&&a>o;)g.push(o),g.push(a),o+=1,a-=1,e+=1;return s=[o-1],l=[a+1],u.push(["s",e,g.sort(r)]),u.concat(t.ptToElements(n,e,o,a,i))}}Object.defineProperty(n,"__esModule",{value:!0}),n.arraysEqual=function(t,n){if(t===n)return!0;if(null===t||null===n)return!1;if(t.length!=n.length)return!1;for(var e=0;e=u;u++)e.push(u);else console.log("Malformed range (too many dashes):",t)}return e},n.parseColorText=function(t){for(var e=t.split("\n"),r="",o=1,a={colorValues:{"":{}},range:["white","steelblue"]},i=[],u=0;u"!=e[u][0])for(var s=e[u].trim().split(/[\s]+/),l=0;lt&&(r=t),t>o&&(o=t));for(a in n.colorsJson.colorValues[e])"number"==typeof(t=n.colorsJson.colorValues[e][a])&&(n.colorsJson.colorValues[e][a]=(t-r)/(o-r))}return n},n.parseColorText(n.colorsText),n};var r=function(t,n){return t-n};n.rnaUtilities=new e}])},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.rnaPlot=function(){var t,n,e={width:400,height:400,nucleotideRadius:5,rnaEdgePadding:0,labelInterval:0,showNucleotideLabels:!0,startNucleotideNumber:1,bundleExternalLinks:!1};function a(a){a.each((function(a){var i=new r.RNAGraph(a.sequence,a.structure,a.name).recalculateElements().elementsToJson().addName(a.name);a.rnaGraph=i;for(var u=(new o.NAView).naview_xy_coordinates(i.pairtable),s=[],l=0;l2&&void 0!==arguments[2]?arguments[2]:"",i=d3.extent(r),u=d3.extent(o),s=30;""!=a&&(u[1]+=s),i[0]-=e.nucleotideRadius+e.rnaEdgePadding,u[0]-=e.nucleotideRadius+e.rnaEdgePadding,i[1]+=e.nucleotideRadius+e.rnaEdgePadding,u[1]+=e.nucleotideRadius+e.rnaEdgePadding;var l,c=i[1]-i[0],f=u[1]-u[0],h=c-e.width,p=f-e.height;function d(t,n,e){var r=(t.range()[1]-t.range()[0])/(t.domain()[1]-t.domain()[0]),o=(n[1]-n[0])*r,a=(e[1]-e[0]-o)/2;return{scaleFactor:r,scale:d3.scale.linear().domain(n).range([e[0]+a,e[1]-a])}}return h>p?(l=d(t=d3.scale.linear().domain(i).range([0,e.width]),u,[0,e.height]),n=l.scale):(l=d(n=d3.scale.linear().domain(u).range([0,e.height]),i,[0,e.width]),t=l.scale),t.range()[0],t.domain()[0],n.range()[0],n.domain()[0],"translate("+-(t.domain()[0]*l.scaleFactor-t.range()[0])+","+-(n.domain()[0]*l.scaleFactor-n.range()[0])+")scale("+l.scaleFactor+")"}(i.nodes.map((function(t){return t.x})),i.nodes.map((function(t){return t.y}))),f=d3.select(this).append("g").attr("transform",c),h=i.nodes.filter((function(t){return"nucleotide"==t.nodeType})),p=i.nodes.filter((function(t){return"label"==t.nodeType})),d=i.links;!function(t,n){n=n.filter((function(t){return null!==t.source&&null!==t.target})),t.selectAll(".rna-link").data(n).enter().append("svg:line").attr("x1",(function(t){return t.source.x})).attr("x2",(function(t){return t.target.x})).attr("y1",(function(t){return t.source.y})).attr("y2",(function(t){return t.target.y})).attr("link-type",(function(t){return t.linkType})).attr("extra-link-type",(function(t){return t.extraLinkType})).classed("rna-link",!0)}(f,d),function(t,n){var r=t.selectAll(".rna-base").data(n).enter().append("svg:g").attr("transform",(function(t){return"translate("+t.x+","+t.y+")"}));r.append("svg:circle").attr("r",e.nucleotideRadius).classed("rna-base",!0),e.showNucleotideLabels&&r.append("svg:text").text((function(t){return t.name})).attr("text-anchor","middle").attr("dominant-baseline","central").classed("nucleotide-label",!0).append("svg:title").text((function(t){return t.struct_name+":"+t.num}))}(f,h),function(t,n){t.selectAll(".rnaLabel").data(n).enter().append("svg:g").attr("transform",(function(t){return"translate("+t.x+","+t.y+")"})).append("svg:text").text((function(t){return t.name})).attr("text-anchor","middle").attr("font-weight","bold").attr("dominant-baseline","central").classed("number-label",!0)}(f,p),function(r,o){r.append("svg:text").attr("transform","translate("+t.invert(e.width/2)+","+n.invert(e.height)+")").attr("dy",-10).classed("rna-name",!0).text(o)}(f,a.name),e.bundleExternalLinks&&function(t,n){var e={},r=[];n=n.filter((function(t){return"correct"==t.linkType||"incorrect"==t.linkType||"extra"==t.linkType})),t.selectAll("[link-type=extra]").remove();for(var o=0;oh);if(g=v-2,v>=2&&(i[d+1+g]+=f,i[m-1-g]+=f,i[d]+=f,i[m]+=f,v>2))for(;g>=1;g--)i[d+g]=Math.PI,i[m-g]=Math.PI;s[++c]=v,h<=p&&t(h,p,r)}else n++,_++,k++;for(M=Math.PI*(_-2)/_,S[++w]=e,y=o<0?0:o,b=1;b<=w;b++){for(x=S[b]-y,g=0;g<=x;g++)i[y+g]+=M;if(b>w)break;y=S[++b]}u[++l]=k})(0,e+1,t),u[l]-=2,r=0,o[0]=100,a[0]=100;var h=[];for(h.push([o[0],a[0]]),n=1;n=0&&(1==++n?e=r:e>r&&(e=r));return t.setMark(!1),e+1}s.prototype.naview_xy_coordinates=function(t){var n,e=[],r=[];if(0===t.length||0===t[0])return 0;this.nbase=t[0],this.bases=[];for(var o=0;on&&e++;0==e&&(this.bases[1].setMate(this.nbase),this.bases[this.nbase].setMate(1))},s.prototype.find_regions=function(){var t,n=null,e=null;t=this.nbase+1;var r=[];for(n=0;nthis.nbase&&(n=0)}while(n!=t);return i},s.prototype.find_central_loop=function(){var t=new u.Loop,n=null,e=null,r=null;for(l.bind(this)(),n=0,e=-1,r=0;rn?(e=t.getDepth(),n=t.getNconnection(),this.root=t):t.getDepth()>e&&t.getNconnection()==n&&(e=t.getDepth(),this.root=t)},s.prototype.traverse_loop=function(t,n){var e,r,o,a,i,u,s,l,c,f,h,p,d,m,g,v,y,b,x,M,_,w,k,S,A,E,T,P,R,N,O,C,L,U,j,D,z,q,F,B,I,X,Y,V,H,G,W,Z,J,$,K,Q,tt,nt,et,rt,ot,at,it,ut,st,lt,ct,ft,ht,pt,dt,mt,gt,vt=0;u=2*Math.PI/(this.nbase+1),b=null,N=-1;var yt=0;for(k=0;null!=(v=t.getConnection(yt));yt++,k++)e=-Math.sin(u*v.getStart()),r=Math.cos(u*v.getStart()),o=-Math.sin(u*v.getEnd()),a=Math.cos(u*v.getEnd())-r,i=e-o,s=Math.sqrt(a*a+i*i),v.setXrad(a/s),v.setYrad(i/s),v.setAngle(Math.atan2(i,a)),v.getAngle()<0&&v.setAngle(v.getAngle()+2*Math.PI),null!=n&&n.getRegion()==v.getRegion()&&(b=v,N=k);t:for(;;){this.determine_radius(t,this.lencut),l=t.getRadius()/this.RADIUS_REDUCTION_FACTOR,null==n?c=f=0:(h=(this.bases[b.getStart()].getX()+this.bases[b.getEnd()].getX())/2,p=(this.bases[b.getStart()].getY()+this.bases[b.getEnd()].getY())/2,c=h-l*b.getXrad(),f=p-l*b.getYrad()),T=-1==N?0:N,v=t.getConnection(T),E=0,O=!1;do{if((_=T-1)<0&&(_=t.getNconnection()-1),x=t.getConnection(_),this.connected_connection(x,v)?(T=_,v=x):O=!0,++E>t.getNconnection()){for(A=-1,k=0;k=t.getNconnection()&&(_=0),v=t.getConnection(k),(ht=(y=t.getConnection(_)).getAngle()-v.getAngle())<0&&(ht+=2*Math.PI),ht>A&&(A=ht,vt=k);P=vt,(T=vt+1)>=t.getNconnection()&&(T=0),(v=t.getConnection(P)).setBroken(!0),O=!0}}while(!O);for(C=!1,G=T;!C;){for(E=0,O=!1,P=T,L=!1;!O;)if(v=t.getConnection(P),P==N&&(L=!0),(_=P+1)>=t.getNconnection()&&(_=0),y=t.getConnection(_),this.connected_connection(v,y)){if(++E>=t.getNconnection())break;P=_}else O=!0;for(k=W=Z=R=this.find_ic_middle(T,P,n,b,t),O=!1,$=0;!O;)(k=$<0?W:0==$?R:Z)>=0&&(v=t.getConnection(k),null!=n&&b==v||(0==$?(d=v.getAngle()-Math.asin(.5/l),m=v.getAngle()+Math.asin(.5/l),this.bases[v.getStart()].setX(c+l*Math.cos(d)),this.bases[v.getStart()].setY(f+l*Math.sin(d)),this.bases[v.getEnd()].setX(c+l*Math.cos(m)),this.bases[v.getEnd()].setY(f+l*Math.sin(m))):$<0?((_=k+1)>=t.getNconnection()&&(_=0),v=t.getConnection(k),y=t.getConnection(_),et=v.getXrad(),rt=v.getYrad(),ht=(v.getAngle()+y.getAngle())/2,v.getAngle()>y.getAngle()&&(ht-=Math.PI),it=Math.cos(ht),lt=Math.sin(ht),ct=-it,(S=y.getAngle()-v.getAngle())<0&&(S+=2*Math.PI),ft=v.isExtruded()?S<=Math.PI/2?2:1.5:1,this.bases[v.getEnd()].setX(this.bases[y.getStart()].getX()+ft*lt),this.bases[v.getEnd()].setY(this.bases[y.getStart()].getY()+ft*ct),this.bases[v.getStart()].setX(this.bases[v.getEnd()].getX()+rt),this.bases[v.getStart()].setY(this.bases[v.getEnd()].getY()-et)):((_=k-1)<0&&(_=t.getNconnection()-1),v=t.getConnection(_),ot=(y=t.getConnection(k)).getXrad(),at=y.getYrad(),ht=(v.getAngle()+y.getAngle())/2,v.getAngle()>y.getAngle()&&(ht-=Math.PI),it=Math.cos(ht),lt=-Math.sin(ht),ct=it,(S=y.getAngle()-v.getAngle())<0&&(S+=2*Math.PI),ft=v.isExtruded()?S<=Math.PI/2?2:1.5:1,this.bases[y.getStart()].setX(this.bases[v.getEnd()].getX()+ft*lt),this.bases[y.getStart()].setY(this.bases[v.getEnd()].getY()+ft*ct),this.bases[y.getEnd()].setX(this.bases[y.getStart()].getX()-at),this.bases[y.getEnd()].setY(this.bases[y.getStart()].getY()+ot)))),$<0?(Z==P?Z=-1:Z>=0&&++Z>=t.getNconnection()&&(Z=0),$=1):(W==T?W=-1:W>=0&&--W<0&&(W=t.getNconnection()-1),$=-1),O=-1==W&&-1==Z;if((J=P+1)>=t.getNconnection()&&(J=0),P!=T&&(T!=G||J!=G))if(v=t.getConnection(T),y=t.getConnection(P),Q=this.bases[y.getEnd()].getX()-this.bases[v.getStart()].getX(),tt=this.bases[y.getEnd()].getY()-this.bases[v.getStart()].getY(),j=this.bases[v.getStart()].getX()+Q/2,D=this.bases[v.getStart()].getY()+tt/2,F=Q/(nt=Math.sqrt(Q*Q+tt*tt)),B=tt/nt,I=c-j,X=f-D,z=(Y=(I/=nt=Math.sqrt(Q*Q+tt*tt))*F+(X/=nt)*B)*F-I,q=Y*B-X,z/=nt=Math.sqrt(z*z+q*q),q/=nt,Q=this.bases[v.getStart()].getX()-c,tt=this.bases[v.getStart()].getY()-f,(ht=Math.atan2(tt,Q))<0&&(ht+=2*Math.PI),Q=this.bases[y.getEnd()].getX()-c,tt=this.bases[y.getEnd()].getY()-f,(pt=Math.atan2(tt,Q))<0&&(pt+=2*Math.PI),ptMath.PI?-1:1)*l*z,H=f+U*l*q,L)c-=V-j,f-=H-D;else for(k=T;M=(v=t.getConnection(k)).getStart(),this.bases[M].setX(this.bases[M].getX()+V-j),this.bases[M].setY(this.bases[M].getY()+H-D),M=v.getEnd(),this.bases[M].setX(this.bases[M].getX()+V-j),this.bases[M].setY(this.bases[M].getY()+H-D),k!=P;)++k>=t.getNconnection()&&(k=0);C=(T=J)==G}for(k=0;k=t.getNconnection()&&(_=0),y=t.getConnection(_),Q=this.bases[v.getEnd()].getX()-c,tt=this.bases[v.getEnd()].getY()-f,st=Math.sqrt(Q*Q+tt*tt),(ht=Math.atan2(tt,Q))<0&&(ht+=2*Math.PI),Q=this.bases[y.getStart()].getX()-c,tt=this.bases[y.getStart()].getY()-f,ut=Math.sqrt(Q*Q+tt*tt),(pt=Math.atan2(tt,Q))<0&&(pt+=2*Math.PI),ptMath.PI)if(v.isExtruded())console.log("Warning from traverse_loop. Loop "+t.getNumber()+" has crossed regions\n");else if(y.getStart()-v.getEnd()!=1){v.setExtruded(!0);continue t}if(v.isExtruded())this.construct_extruded_segment(v,y);else for((w=y.getStart()-v.getEnd())<0&&(w+=this.nbase+1),u=K/w,_=1;_this.nbase&&(M-=this.nbase+1),nt=st+(ut-st)*((g=ht+_*u)-ht)/K,this.bases[M].setX(c+nt*Math.cos(g)),this.bases[M].setY(f+nt*Math.sin(g))}break}for(k=0;k=t.getNconnection()&&(_=0),v=t.getConnection(k),y=t.getConnection(_),w+=2,dt+=this.bases[v.getStart()].getX()+this.bases[v.getEnd()].getX(),mt+=this.bases[v.getStart()].getY()+this.bases[v.getEnd()].getY(),!v.isExtruded())for(_=v.getEnd()+1;_!=y.getStart();_++)_>this.nbase&&(_-=this.nbase+1),w++,dt+=this.bases[_].getX(),mt+=this.bases[_].getY();t.setX(dt/w),t.setY(mt/w)},s.prototype.determine_radius=function(t,n){var e,r,a,i,u,s,l,c,f,h,p,d=0,m=new o.Connection,g=new o.Connection;do{for(e=1e10,u=0,i=0,c=0;c=t.getNconnection()&&(f=0),g=t.getConnection(f),h=m.getEnd(),(p=g.getStart())1&&(e=l,d=c);(s=i/u)<.7071068&&(s=.7071068),e*s0?s=t.getRadius():t.setRadius(s)},s.prototype.find_ic_middle=function(t,n,e,r,o){var a,i,u,s,l;for(a=0,i=-1,u=t,l=!1;!l;)a++>2*o.getNconnection()&&console.log("Infinite loop in 'find_ic_middle'"),null!=e&&o.getConnection(u)==r&&(i=u),l=u==n,++u>=o.getNconnection()&&(u=0);if(-1==i){for(s=1,u=t;s<(a+1)/2;s++)++u>=o.getNconnection()&&(u=0);i=u}return i},s.prototype.construct_extruded_segment=function(t,n){var e,r,o,a,i,u,s,l,c,f,h,p,d,m,g,v,y,b;if(e=t.getAngle(),(o=r=n.getAngle())=1.5&&h<=Math.PI/2&&((v=d+1)>this.nbase&&(v-=this.nbase+1),(y=m-1)<0&&(y+=this.nbase+1),this.bases[v].setX(this.bases[d].getX()+.5*i),this.bases[v].setY(this.bases[d].getY()+.5*u),this.bases[y].setX(this.bases[m].getX()-.5*i),this.bases[y].setY(this.bases[m].getY()-.5*u),d=v,m=y);do{b=!1,this.construct_circle_segment(d,m),(v=d+1)>this.nbase&&(v-=this.nbase+1),i=this.bases[v].getX()-this.bases[d].getX(),u=this.bases[v].getY()-this.bases[d].getY(),(s=Math.atan2(u,i))<0&&(s+=2*Math.PI),(p=s-e)<0&&(p+=2*Math.PI),p>Math.PI&&(b=!0),(y=m-1)<0&&(y+=this.nbase+1),i=this.bases[y].getX()-this.bases[m].getX(),u=this.bases[y].getY()-this.bases[m].getY(),(l=Math.atan2(u,i))<0&&(l+=2*Math.PI),(p=r-l)<0&&(p+=2*Math.PI),p>Math.PI&&(b=!0),b&&(c=this.minf2(a,e+.5),this.bases[v].setX(this.bases[d].getX()+Math.cos(c)),this.bases[v].setY(this.bases[d].getY()+Math.sin(c)),d=v,c=this.maxf2(a,o-.5),this.bases[y].setX(this.bases[m].getX()+Math.cos(c)),this.bases[y].setY(this.bases[m].getY()+Math.sin(c)),m=y,g-=2)}while(b&&g>1)}},s.prototype.construct_circle_segment=function(t,n){var e,r,o,a,i,u,s,l,c,f,h,p,d,m,g;if(e=this.bases[n].getX()-this.bases[t].getX(),r=this.bases[n].getY()-this.bases[t].getY(),o=Math.sqrt(e*e+r*r),(d=n-t)<0&&(d+=this.nbase+1),o>=d)for(e/=o,r/=o,m=1;mthis.nbase&&(g-=this.nbase+1),this.bases[g].setX(this.bases[t].getX()+e*m/d),this.bases[g].setY(this.bases[t].getY()+r*m/d);else for(this.find_center_for_arc(d-1,o),e/=o,r/=o,a=this.bases[t].getX()+e*o/2,i=this.bases[t].getY()+r*o/2,u=r,s=-e,l=a+this._h*u,c=i+this._h*s,f=this.bases[t].getX()-l,h=this.bases[t].getY()-c,o=Math.sqrt(f*f+h*h),p=Math.atan2(h,f),m=1;mthis.nbase&&(g-=this.nbase+1),this.bases[g].setX(l+o*Math.cos(p+m*this.angleinc)),this.bases[g].setY(c+o*Math.sin(p+m*this.angleinc))},s.prototype.find_center_for_arc=function(t,n){var e,r,o,a,i,u,s,l;o=-(r=(t+1)/Math.PI)-n/(t+1.000001-n),n<1&&(o=0),l=0;do{e=(r+o)/2,i=1-.5/((a=Math.sqrt(e*e+n*n/4))*a),Math.abs(i)>1&&console.log("Unexpected large magnitude discriminant = "+i+" "+a),(s=(u=Math.acos(i))*(t+1)+2*Math.acos(e/a)-2*Math.PI)>0?o=e:r=e}while(Math.abs(s)>1e-4&&++l=this.MAXITER&&(noIterationFailureYet&&(console.log("Iteration failed in find_center_for_arc"),noIterationFailureYet=!1),e=0,u=0),this._h=e,this.angleinc=u},s.prototype.generate_region=function(t){var n,e,r,o,a,i;for(i=t.getRegion(),n=0,t.getStart()==i.getStart1()?(e=i.getStart1(),r=i.getEnd1()):(e=i.getStart2(),r=i.getEnd2()),(this.bases[t.getStart()].getX()>this.ANUM-100||this.bases[t.getEnd()].getX()>this.ANUM-100)&&console.log("Bad region passed to generate_region. Coordinates not defined."),o=e+1;o<=r;o++)n++,this.bases[o].setX(this.bases[t.getStart()].getX()+this.HELIX_FACTOR*n*t.getXrad()),this.bases[o].setY(this.bases[t.getStart()].getY()+this.HELIX_FACTOR*n*t.getYrad()),a=this.bases[o].getMate(),this.bases[a].setX(this.bases[t.getEnd()].getX()+this.HELIX_FACTOR*n*t.getXrad()),this.bases[a].setY(this.bases[t.getEnd()].getY()+this.HELIX_FACTOR*n*t.getYrad())},s.prototype.minf2=function(t,n){return tn?t:n},s.prototype.connected_connection=function(t,n){return!!t.isExtruded()||t.getEnd()+1==n.getStart()}},function(t,n){"use strict";function e(){this.radius=null,this.loopnumber=null,this.next=null,this.prev=null}Object.defineProperty(n,"__esModule",{value:!0}),n.Radloop=e,e.prototype.getRadius=function(){return this.radius},e.prototype.setRadius=function(t){this.radius=t},e.prototype.getLoopnumber=function(){return this.loopnumber},e.prototype.setLoopnumber=function(t){this.loopnumber=t},e.prototype.getNext=function(){return this.next},e.prototype.setNext=function(t){this.next=t},e.prototype.getPrev=function(){return this.prev},e.prototype.setPrev=function(t){this.prev=t}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Connection=a;var r=e(8),o=e(9);function a(){this.loop=new r.Loop,this.region=new o.Region,this.start=null,this.end=null,this.xrad=null,this.yrad=null,this.angle=null,this.extruded=null,this.broken=null,this._isNull=!1}a.prototype.isNull=function(){return this._isNull},a.prototype.setNull=function(t){this._isNull=t},a.prototype.getLoop=function(){return this.loop},a.prototype.setLoop=function(t){this.loop=t},a.prototype.getRegion=function(){return this.region},a.prototype.setRegion=function(t){this.region=t},a.prototype.getStart=function(){return this.start},a.prototype.setStart=function(t){this.start=t},a.prototype.getEnd=function(){return this.end},a.prototype.setEnd=function(t){this.end=t},a.prototype.getXrad=function(){return this.xrad},a.prototype.setXrad=function(t){this.xrad=t},a.prototype.getYrad=function(){return this.yrad},a.prototype.setYrad=function(t){this.yrad=t},a.prototype.getAngle=function(){return this.angle},a.prototype.setAngle=function(t){this.angle=t},a.prototype.isExtruded=function(){return this.extruded},a.prototype.setExtruded=function(t){this.extruded=t},a.prototype.isBroken=function(){return this.broken},a.prototype.setBroken=function(t){this.broken=t}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Loop=o;var r=e(7);function o(){this.nconnection=null,this.connections=[],this._connections=[],this.number=null,this.depth=null,this.mark=null,this.x=null,this.y=null,this.radius=null}o.prototype.getNconnection=function(){return this.nconnection},o.prototype.setNconnection=function(t){this.nconnection=t},o.prototype.setConnection=function(t,n){null!=n?this._connections[t]=n:(this._connections[t]||(this._connections[t]=new r.Connection),this._connections[t].setNull(!0))},o.prototype.getConnection=function(t){var n=e(7);this._connections[t]||(this._connections[t]=new n);var r=this._connections[t];return r.isNull()?null:r},o.prototype.addConnection=function(t,n){this._connections.push(n)},o.prototype.getNumber=function(){return this.number},o.prototype.setNumber=function(t){this.number=t},o.prototype.getDepth=function(){return this.depth},o.prototype.setDepth=function(t){this.depth=t},o.prototype.isMark=function(){return this.mark},o.prototype.setMark=function(t){this.mark=t},o.prototype.getX=function(){return this.x},o.prototype.setX=function(t){this.x=t},o.prototype.getY=function(){return this.y},o.prototype.setY=function(t){this.y=t},o.prototype.getRadius=function(){return this.radius},o.prototype.setRadius=function(t){this.radius=t}},function(t,n){"use strict";function e(){this._start1=null,this._end1=null,this._start2=null,this._end2=null}Object.defineProperty(n,"__esModule",{value:!0}),n.Region=e,e.prototype.getStart1=function(){return this._start1},e.prototype.setStart1=function(t){this._start1=t},e.prototype.getEnd1=function(){return this._end1},e.prototype.setEnd1=function(t){this._end1=t},e.prototype.getStart2=function(){return this._start2},e.prototype.setStart2=function(t){this._start2=t},e.prototype.getEnd2=function(){return this._end2},e.prototype.setEnd2=function(t){this._end2=t}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Base=o;var r=e(9);function o(){this.mate=null,this.x=null,this.y=null,this.extracted=null,this.region=new r.Region}o.prototype.getMate=function(){return this.mate},o.prototype.setMate=function(t){this.mate=t},o.prototype.getX=function(){return this.x},o.prototype.setX=function(t){this.x=t},o.prototype.getY=function(){return this.y},o.prototype.setY=function(t){this.y=t},o.prototype.isExtracted=function(){return this.extracted},o.prototype.setExtracted=function(t){this.extracted=t},o.prototype.getRegion=function(){return this.region},o.prototype.setRegion=function(t){this.region=t}},function(t,n,e){var r=e(12);"string"==typeof r&&(r=[[t.id,r,""]]),e(14)(r,{}),r.locals&&(t.exports=r.locals)},function(t,n,e){(t.exports=e(13)()).push([t.id,'.forna-container .structure-background-rect {\n stroke: black;\n stroke-width: 5;\n fill: transparent;\n}\n\n.forna-container circle.rna-base {\n stroke: #ccc;\n stroke-width: 1px;\n opacity: 1;\n fill: white;\n}\n\n.forna-container circle.rna-base.label {\n stroke: transparent;\n stroke-width: 0;\n fill: white;\n}\n\n.forna-container line.link {\n stroke: #999;\n stroke-opacity: 0.8;\n stroke-width: 2;\n}\n\n.forna-container line.rna-link {\n stroke: #999;\n stroke-opacity: 0.8;\n stroke-width: 2;\n}\n\n.forna-container .overlay {\n fill: transparent;\n}\n\n.forna-container .rna-name {\n text-anchor: middle;\n dy: -10;\n font-family: Tahoma, Geneva, sans-serif;\n font-size: 8pt;\n}\n\n.forna-container line.rna-link[link-type="backbone"] {\n stroke: transparent;\n}\n\n.forna-container line.rna-link[link-type="basepair"] {\n stroke: transparent;\n}\n\n.forna-container line.rna-link[link-type="fake"] {\n stroke: transparent;\n}\n\n.forna-container line.rna-link[link-type="extra"] {\n stroke: grey;\n}\n\n.forna-container line.rna-link[extra-link-type="correct"] {\n stroke: green;\n}\n\n.forna-container line.rna-link[extra-link-type="incorrect"] {\n stroke: green;\n}\n\n\n.forna-container path {\n stroke-width: 2;\n}\n\n.forna-container path[extra-link-type="correct"] {\n stroke: green;\n}\n\n.forna-container path[extra-link-type="incorrect"] {\n stroke: red;\n}\n\n\n.forna-container line.basepair {\n stroke: red;\n}\n\n.forna-container line.intermolecule {\n stroke: blue;\n}\n\n.forna-container line.chain_chain {\n stroke-dasharray: 3,3;\n}\n\n.forna-container line.fake {\n stroke: green;\n}\n\n.forna-container .transparent {\n fill: transparent;\n stroke-width: 0;\n stroke-opacity: 0;\n opacity: 0;\n}\n\n.forna-container .d3-tip {\n line-height: 1;\n font-weight: bold;\n padding: 6px;\n background: rgba(0, 0, 0, 0.6);\n color: #fff;\n border-radius: 4px;\n pointer-events: none;\n}\n\n.forna-container text.nucleotide-label {\n font-size: 5.5pt;\n font-weight: bold;\n font-family: Tahoma, Geneva, sans-serif;\n color: rgb(100,100,100);\n pointer-events: none;\n}\n\n.forna-container text.number-label {\n font-size: 5.5pt;\n font-weight: bold;\n font-family: Tahoma, Geneva, sans-serif;\n color: rgb(100,100,100);\n pointer-events: none;\n}\n\n.forna-container text {\n pointer-events: none;\n}\n\n.forna-container g.gnode {\n\n}\n\n.forna-container .brush .extent {\n fill-opacity: .1;\n stroke: #fff;\n shape-rendering: crispEdges;\n}\n\n.forna-container .noselect {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n',""])},function(t,n){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],n=0;n=0&&l.splice(n,1)}function d(t){var n=document.createElement("style");return n.type="text/css",h(t,n),n}function m(t,n){var e,r,o;if(n.singleton){var a=s++;e=u||(u=d(n)),r=y.bind(null,e,a,!1),o=y.bind(null,e,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(e=function(t){var n=document.createElement("link");return n.rel="stylesheet",h(t,n),n}(n),r=x.bind(null,e),o=function(){p(e),e.href&&URL.revokeObjectURL(e.href)}):(e=d(n),r=b.bind(null,e),o=function(){p(e)});return r(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;r(t=n)}else o()}}t.exports=function(t,n){void 0===(n=n||{}).singleton&&(n.singleton=a()),void 0===n.insertAt&&(n.insertAt="bottom");var e=f(t);return c(e,n),function(t){for(var o=[],a=0;an?1:t>=n?0:NaN}function v(t){return null===t?NaN:+t}function y(t){return!isNaN(t)}function b(t){return{left:function(n,e,r,o){for(arguments.length<3&&(r=0),arguments.length<4&&(o=n.length);r>>1;t(n[a],e)<0?r=a+1:o=a}return r},right:function(n,e,r,o){for(arguments.length<3&&(r=0),arguments.length<4&&(o=n.length);r>>1;t(n[a],e)>0?o=a:r=a+1}return r}}}a.ascending=g,a.descending=function(t,n){return nt?1:n>=t?0:NaN},a.min=function(t,n){var e,r,o=-1,a=t.length;if(1===arguments.length){for(;++o=r){e=r;break}for(;++or&&(e=r)}else{for(;++o=r){e=r;break}for(;++or&&(e=r)}return e},a.max=function(t,n){var e,r,o=-1,a=t.length;if(1===arguments.length){for(;++o=r){e=r;break}for(;++oe&&(e=r)}else{for(;++o=r){e=r;break}for(;++oe&&(e=r)}return e},a.extent=function(t,n){var e,r,o,a=-1,i=t.length;if(1===arguments.length){for(;++a=r){e=o=r;break}for(;++ar&&(e=r),o=r){e=o=r;break}for(;++ar&&(e=r),o1)return i/(s-1)},a.deviation=function(){var t=a.variance.apply(this,arguments);return t?Math.sqrt(t):t};var x=b(g);function M(t){return t.length}a.bisectLeft=x.left,a.bisect=a.bisectRight=x.right,a.bisector=function(t){return b(1===t.length?function(n,e){return g(t(n),e)}:t)},a.shuffle=function(t,n,e){(a=arguments.length)<3&&(e=t.length,a<2&&(n=0));for(var r,o,a=e-n;a;)o=Math.random()*a--|0,r=t[a+n],t[a+n]=t[o+n],t[o+n]=r;return t},a.permute=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},a.pairs=function(t){for(var n=0,e=t.length-1,r=t[0],o=new Array(e<0?0:e);n=0;)for(n=(r=t[o]).length;--n>=0;)e[--i]=r[n];return e};var _=Math.abs;function w(t){for(var n=1;t*n%1;)n*=10;return n}function k(t,n){for(var e in n)Object.defineProperty(t.prototype,e,{value:n[e],enumerable:!1})}function S(){this._=Object.create(null)}function A(t){return"__proto__"==(t+="")||"\0"===t[0]?"\0"+t:t}function E(t){return"\0"===(t+="")[0]?t.slice(1):t}function T(t){return A(t)in this._}function P(t){return(t=A(t))in this._&&delete this._[t]}function R(){var t=[];for(var n in this._)t.push(E(n));return t}function N(){var t=0;for(var n in this._)++t;return t}function O(){for(var t in this._)return!1;return!0}function C(){this._=Object.create(null)}function L(t){return t}function U(t,n,e){return function(){var r=e.apply(n,arguments);return r===n?t:r}}function j(t,n){if(n in t)return n;n=n.charAt(0).toUpperCase()+n.slice(1);for(var e=0,r=D.length;en;)o.push(r/a);else for(;(r=t+e*++i)=r.length)return n?n.call(e,a):t?a.sort(t):a;for(var s,l,c,f,h=-1,p=a.length,d=r[u++],m=new S;++h=r.length)return n;var a=[],i=o[e++];return n.forEach((function(n,r){a.push({key:n,values:t(r,e)})})),i?a.sort((function(t,n){return i(t.key,n.key)})):a}(i(a.map,t,0),0)},e.key=function(t){return r.push(t),e},e.sortKeys=function(t){return o[r.length-1]=t,e},e.sortValues=function(n){return t=n,e},e.rollup=function(t){return n=t,e},e},a.set=function(t){var n=new C;if(t)for(var e=0,r=t.length;e=0&&(r=t.slice(e+1),t=t.slice(0,e)),t)return arguments.length<2?this[t].on(r):this[t].on(r,n);if(2===arguments.length){if(null==n)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},a.event=null,a.requote=function(t){return t.replace(Y,"\\$&")};var Y=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,V={}.__proto__?function(t,n){t.__proto__=n}:function(t,n){for(var e in n)t[e]=n[e]};function H(t){return V(t,J),t}var G=function(t,n){return n.querySelector(t)},W=function(t,n){return n.querySelectorAll(t)},Z=function(t,n){var e=t.matches||t[j(t,"matchesSelector")];return(Z=function(t,n){return e.call(t,n)})(t,n)};"function"==typeof Sizzle&&(G=function(t,n){return Sizzle(t,n)[0]||null},W=Sizzle,Z=Sizzle.matchesSelector),a.selection=function(){return a.select(s.documentElement)};var J=a.selection.prototype=[];function $(t){return"function"==typeof t?t:function(){return G(t,this)}}function K(t){return"function"==typeof t?t:function(){return W(t,this)}}J.select=function(t){var n,e,r,o,a=[];t=$(t);for(var i=-1,u=this.length;++i=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),tt.hasOwnProperty(e)?{space:tt[e],local:t}:t}},J.attr=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node();return(t=a.ns.qualify(t)).local?e.getAttributeNS(t.space,t.local):e.getAttribute(t)}for(n in t)this.each(nt(n,t[n]));return this}return this.each(nt(t,n))},J.classed=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node(),r=(t=ot(t)).length,o=-1;if(n=e.classList){for(;++o=0;)(e=r[o])&&(a&&a!==e.nextSibling&&a.parentNode.insertBefore(e,a),a=e);return this},J.sort=function(t){t=pt.apply(this,arguments);for(var n=-1,e=this.length;++n=n&&(n=o+1);!(i=u[n])&&++n0&&(t=t.slice(0,o));var s=bt.get(t);function l(){var n=this[r];n&&(this.removeEventListener(t,n,n.$),delete this[r])}return s&&(t=s,i=Mt),o?n?function(){var o=i(n,u(arguments));l.call(this),this.addEventListener(t,this[r]=o,o.$=e),o._=n}:l:n?z:function(){var n,e=new RegExp("^__on([^.]+)"+a.requote(t)+"$");for(var r in this)if(n=r.match(e)){var o=this[r];this.removeEventListener(n[1],o,o.$),delete this[r]}}}a.selection.enter=mt,a.selection.enter.prototype=gt,gt.append=J.append,gt.empty=J.empty,gt.node=J.node,gt.call=J.call,gt.size=J.size,gt.select=function(t){for(var n,e,r,o,a,i=[],u=-1,s=this.length;++u0?1:t<0?-1:0}function Dt(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])}function zt(t){return t>1?0:t<-1?Rt:Math.acos(t)}function qt(t){return t>1?Ct:t<-1?-Ct:Math.asin(t)}function Ft(t){return((t=Math.exp(t))+1/t)/2}function Bt(t){return(t=Math.sin(t/2))*t}var It=Math.SQRT2;a.interpolateZoom=function(t,n){var e,r,o=t[0],a=t[1],i=t[2],u=n[0],s=n[1],l=n[2],c=u-o,f=s-a,h=c*c+f*f;if(h0&&(t=t.transition().duration(m)),t.call(_.event)}function E(){u&&u.domain(i.range().map((function(t){return(t-h.x)/h.k})).map(i.invert)),f&&f.domain(l.range().map((function(t){return(t-h.y)/h.k})).map(l.invert))}function T(t){g++||t({type:"zoomstart"})}function P(t){E(),t({type:"zoom",scale:h.k,translate:[h.x,h.y]})}function R(t){--g||(t({type:"zoomend"}),n=null)}function N(){var t=this,n=M.of(t,arguments),e=0,r=a.select(c(t)).on(y,u).on(b,s),o=w(a.mouse(t)),i=kt(t);function u(){e=1,S(a.mouse(t),o),P(n)}function s(){r.on(y,null).on(b,null),i(e),R(n)}Mu.call(t),T(n)}function O(){var t,n=this,e=M.of(n,arguments),r={},i=0,u=".zoom-"+a.event.changedTouches[0].identifier,s="touchmove"+u,l="touchend"+u,c=[],f=a.select(n),p=kt(n);function d(){var e=a.touches(n);return t=h.k,e.forEach((function(t){t.identifier in r&&(r[t.identifier]=w(t))})),e}function m(){var t=a.event.target;a.select(t).on(s,g).on(l,y),c.push(t);for(var e=a.event.changedTouches,u=0,f=e.length;u1){v=p[0];var b=p[1],x=v[0]-b[0],M=v[1]-b[1];i=x*x+M*M}}function g(){var u,s,l,c,f=a.touches(n);Mu.call(n);for(var h=0,p=f.length;h360?t-=360:t<0&&(t+=360),t<60?r+(o-r)*t/60:t<180?o:t<240?r+(o-r)*(240-t)/60:r}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,n=isNaN(n)?0:n<0?0:n>1?1:n,r=2*(e=e<0?0:e>1?1:e)-(o=e<=.5?e*(1+n):e+n-e*n),new sn(a(t+120),a(t),a(t-120))}function Jt(t,n,e){return this instanceof Jt?(this.h=+t,this.c=+n,void(this.l=+e)):arguments.length<2?t instanceof Jt?new Jt(t.h,t.c,t.l):rn(t instanceof Qt?t.l:(t=mn((t=a.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Jt(t,n,e)}Wt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Gt(this.h,this.s,this.l/t)},Wt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Gt(this.h,this.s,t*this.l)},Wt.rgb=function(){return Zt(this.h,this.s,this.l)},a.hcl=Jt;var $t=Jt.prototype=new Ht;function Kt(t,n,e){return isNaN(t)&&(t=0),isNaN(n)&&(n=0),new Qt(e,Math.cos(t*=Lt)*n,Math.sin(t)*n)}function Qt(t,n,e){return this instanceof Qt?(this.l=+t,this.a=+n,void(this.b=+e)):arguments.length<2?t instanceof Qt?new Qt(t.l,t.a,t.b):t instanceof Jt?Kt(t.h,t.c,t.l):mn((t=sn(t)).r,t.g,t.b):new Qt(t,n,e)}$t.brighter=function(t){return new Jt(this.h,this.c,Math.min(100,this.l+tn*(arguments.length?t:1)))},$t.darker=function(t){return new Jt(this.h,this.c,Math.max(0,this.l-tn*(arguments.length?t:1)))},$t.rgb=function(){return Kt(this.h,this.c,this.l).rgb()},a.lab=Qt;var tn=18,nn=Qt.prototype=new Ht;function en(t,n,e){var r=(t+16)/116,o=r+n/500,a=r-e/200;return new sn(un(3.2404542*(o=.95047*on(o))-1.5371385*(r=1*on(r))-.4985314*(a=1.08883*on(a))),un(-.969266*o+1.8760108*r+.041556*a),un(.0556434*o-.2040259*r+1.0572252*a))}function rn(t,n,e){return t>0?new Jt(Math.atan2(e,n)*Ut,Math.sqrt(n*n+e*e),t):new Jt(NaN,NaN,t)}function on(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function an(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function un(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function sn(t,n,e){return this instanceof sn?(this.r=~~t,this.g=~~n,void(this.b=~~e)):arguments.length<2?t instanceof sn?new sn(t.r,t.g,t.b):pn(""+t,sn,Zt):new sn(t,n,e)}function ln(t){return new sn(t>>16,t>>8&255,255&t)}function cn(t){return ln(t)+""}nn.brighter=function(t){return new Qt(Math.min(100,this.l+tn*(arguments.length?t:1)),this.a,this.b)},nn.darker=function(t){return new Qt(Math.max(0,this.l-tn*(arguments.length?t:1)),this.a,this.b)},nn.rgb=function(){return en(this.l,this.a,this.b)},a.rgb=sn;var fn=sn.prototype=new Ht;function hn(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function pn(t,n,e){var r,o,a,i=0,u=0,s=0;if(r=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(o=r[2].split(","),r[1]){case"hsl":return e(parseFloat(o[0]),parseFloat(o[1])/100,parseFloat(o[2])/100);case"rgb":return n(vn(o[0]),vn(o[1]),vn(o[2]))}return(a=yn.get(t))?n(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(i=(3840&a)>>4,i|=i>>4,u=240&a,u|=u>>4,s=15&a,s|=s<<4):7===t.length&&(i=(16711680&a)>>16,u=(65280&a)>>8,s=255&a)),n(i,u,s))}function dn(t,n,e){var r,o,a=Math.min(t/=255,n/=255,e/=255),i=Math.max(t,n,e),u=i-a,s=(i+a)/2;return u?(o=s<.5?u/(i+a):u/(2-i-a),r=t==i?(n-e)/u+(n0&&s<1?0:r),new Gt(r,o,s)}function mn(t,n,e){var r=an((.4124564*(t=gn(t))+.3575761*(n=gn(n))+.1804375*(e=gn(e)))/.95047),o=an((.2126729*t+.7151522*n+.072175*e)/1);return Qt(116*o-16,500*(r-o),200*(o-an((.0193339*t+.119192*n+.9503041*e)/1.08883)))}function gn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function vn(t){var n=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*n):n}fn.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var n=this.r,e=this.g,r=this.b,o=30;return n||e||r?(n&&n=200&&n<300||304===n){try{t=e.call(o,l)}catch(t){return void i.error.call(o,t)}i.load.call(o,t)}else i.error.call(o,l)}return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(t)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=f:l.onreadystatechange=function(){l.readyState>3&&f()},l.onprogress=function(t){var n=a.event;a.event=t;try{i.progress.call(o,l)}finally{a.event=n}},o.header=function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?s[t]:(null==n?delete s[t]:s[t]=n+"",o)},o.mimeType=function(t){return arguments.length?(n=null==t?null:t+"",o):n},o.responseType=function(t){return arguments.length?(c=t,o):c},o.response=function(t){return e=t,o},["get","post"].forEach((function(t){o[t]=function(){return o.send.apply(o,[t].concat(u(arguments)))}})),o.send=function(e,r,a){if(2===arguments.length&&"function"==typeof r&&(a=r,r=null),l.open(e,t,!0),null==n||"accept"in s||(s.accept=n+",*/*"),l.setRequestHeader)for(var u in s)l.setRequestHeader(u,s[u]);return null!=n&&l.overrideMimeType&&l.overrideMimeType(n),null!=c&&(l.responseType=c),null!=a&&o.on("error",a).on("load",(function(t){a(null,t)})),i.beforesend.call(o,l),l.send(null==r?null:r),o},o.abort=function(){return l.abort(),o},a.rebind(o,i,"on"),null==r?o:o.get(function(t){return 1===t.length?function(n,e){t(null==n?e:null)}:t}(r))}yn.forEach((function(t,n){yn.set(t,ln(n))})),a.functor=bn,a.xhr=xn(L),a.dsv=function(t,n){var e=new RegExp('["'+t+"\n]"),r=t.charCodeAt(0);function o(t,e,r){arguments.length<3&&(r=e,e=null);var o=Mn(t,n,null==e?a:i(e),r);return o.row=function(t){return arguments.length?o.response(null==(e=t)?a:i(t)):e},o}function a(t){return o.parse(t.responseText)}function i(t){return function(n){return o.parse(n.responseText,t)}}function u(n){return n.map(s).join(t)}function s(t){return e.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return o.parse=function(t,n){var e;return o.parseRows(t,(function(t,r){if(e)return e(t,r-1);var o=new Function("d","return {"+t.map((function(t,n){return JSON.stringify(t)+": d["+n+"]"})).join(",")+"}");e=n?function(t,e){return n(o(t),e)}:o}))},o.parseRows=function(t,n){var e,o,a={},i={},u=[],s=t.length,l=0,c=0;function f(){if(l>=s)return i;if(o)return o=!1,a;var n=l;if(34===t.charCodeAt(n)){for(var e=n;e++24?(isFinite(n)&&(clearTimeout(Sn),Sn=setTimeout(Tn,n)),kn=0):(kn=1,An(Tn))}function Pn(){for(var t=Date.now(),n=_n;n;)t>=n.t&&n.c(t-n.t)&&(n.c=null),n=n.n;return t}function Rn(){for(var t,n=_n,e=1/0;n;)n.c?(n.t8?function(t){return t/e}:function(t){return t*e},symbol:t}}));function Cn(t){var n=t.decimal,e=t.thousands,r=t.grouping,o=t.currency,i=r&&e?function(t,n){for(var o=t.length,a=[],i=0,u=r[0],s=0;o>0&&u>0&&(s+u+1>n&&(u=Math.max(1,n-s)),a.push(t.substring(o-=u,o+u)),!((s+=u+1)>n));)u=r[i=(i+1)%r.length];return a.reverse().join(e)}:L;return function(t){var e=Ln.exec(t),r=e[1]||" ",u=e[2]||">",s=e[3]||"-",l=e[4]||"",c=e[5],f=+e[6],h=e[7],p=e[8],d=e[9],m=1,g="",v="",y=!1,b=!0;switch(p&&(p=+p.substring(1)),(c||"0"===r&&"="===u)&&(c=r="0",u="="),d){case"n":h=!0,d="g";break;case"%":m=100,v="%",d="f";break;case"p":m=100,v="%",d="r";break;case"b":case"o":case"x":case"X":"#"===l&&(g="0"+d.toLowerCase());case"c":b=!1;case"d":y=!0,p=0;break;case"s":m=-1,d="r"}"$"===l&&(g=o[0],v=o[1]),"r"!=d||p||(d="g"),null!=p&&("g"==d?p=Math.max(1,Math.min(21,p)):"e"!=d&&"f"!=d||(p=Math.max(0,Math.min(20,p)))),d=Un.get(d)||jn;var x=c&&h;return function(t){var e=v;if(y&&t%1)return"";var o=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===s?"":s;if(m<0){var l=a.formatPrefix(t,p);t=l.scale(t),e=l.symbol+v}else t*=m;var M,_,w=(t=d(t,p)).lastIndexOf(".");if(w<0){var k=b?t.lastIndexOf("e"):-1;k<0?(M=t,_=""):(M=t.substring(0,k),_=t.substring(k))}else M=t.substring(0,w),_=n+t.substring(w+1);!c&&h&&(M=i(M,1/0));var S=g.length+M.length+_.length+(x?0:o.length),A=S"===u?A+o+t:"^"===u?A.substring(0,S>>=1)+o+t+A.substring(S):o+(x?t:A+t))+e}}}a.formatPrefix=function(t,n){var e=0;return(t=+t)&&(t<0&&(t*=-1),n&&(t=a.round(t,Nn(t,n))),e=1+Math.floor(1e-12+Math.log(t)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),On[8+e/3]};var Ln=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Un=a.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,n){return t.toPrecision(n)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},r:function(t,n){return(t=a.round(t,Nn(t,n))).toFixed(Math.max(0,Math.min(20,Nn(t*(1+1e-15),n))))}});function jn(t){return t+""}var Dn=a.time={},zn=Date;function qn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}qn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Fn.setUTCDate.apply(this._,arguments)},setDay:function(){Fn.setUTCDay.apply(this._,arguments)},setFullYear:function(){Fn.setUTCFullYear.apply(this._,arguments)},setHours:function(){Fn.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Fn.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Fn.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Fn.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Fn.setUTCSeconds.apply(this._,arguments)},setTime:function(){Fn.setTime.apply(this._,arguments)}};var Fn=Date.prototype;function Bn(t,n,e){function r(n){var e=t(n),r=a(e,1);return n-e1)for(;i=l)return-1;if(37===(o=n.charCodeAt(u++))){if(i=n.charAt(u++),!(a=_[i in Yn?n.charAt(u++):i])||(r=a(t,e,r))<0)return-1}else if(o!=e.charCodeAt(r++))return-1}return r}c.utc=function(t){var n=c(t);function e(t){try{var e=new(zn=qn);return e._=t,n(e)}finally{zn=Date}}return e.parse=function(t){try{zn=qn;var e=n.parse(t);return e&&e._}finally{zn=Date}},e.toString=n.toString,e},c.multi=c.utc.multi=fe;var h=a.map(),p=Wn(i),d=Zn(i),m=Wn(u),g=Zn(u),v=Wn(s),y=Zn(s),b=Wn(l),x=Zn(l);o.forEach((function(t,n){h.set(t.toLowerCase(),n)}));var M={a:function(t){return u[t.getDay()]},A:function(t){return i[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:c(n),d:function(t,n){return Gn(t.getDate(),n,2)},e:function(t,n){return Gn(t.getDate(),n,2)},H:function(t,n){return Gn(t.getHours(),n,2)},I:function(t,n){return Gn(t.getHours()%12||12,n,2)},j:function(t,n){return Gn(1+Dn.dayOfYear(t),n,3)},L:function(t,n){return Gn(t.getMilliseconds(),n,3)},m:function(t,n){return Gn(t.getMonth()+1,n,2)},M:function(t,n){return Gn(t.getMinutes(),n,2)},p:function(t){return o[+(t.getHours()>=12)]},S:function(t,n){return Gn(t.getSeconds(),n,2)},U:function(t,n){return Gn(Dn.sundayOfYear(t),n,2)},w:function(t){return t.getDay()},W:function(t,n){return Gn(Dn.mondayOfYear(t),n,2)},x:c(e),X:c(r),y:function(t,n){return Gn(t.getFullYear()%100,n,2)},Y:function(t,n){return Gn(t.getFullYear()%1e4,n,4)},Z:le,"%":function(){return"%"}},_={a:function(t,n,e){m.lastIndex=0;var r=m.exec(n.slice(e));return r?(t.w=g.get(r[0].toLowerCase()),e+r[0].length):-1},A:function(t,n,e){p.lastIndex=0;var r=p.exec(n.slice(e));return r?(t.w=d.get(r[0].toLowerCase()),e+r[0].length):-1},b:function(t,n,e){b.lastIndex=0;var r=b.exec(n.slice(e));return r?(t.m=x.get(r[0].toLowerCase()),e+r[0].length):-1},B:function(t,n,e){v.lastIndex=0;var r=v.exec(n.slice(e));return r?(t.m=y.get(r[0].toLowerCase()),e+r[0].length):-1},c:function(t,n,e){return f(t,M.c.toString(),n,e)},d:re,e:re,H:ae,I:ae,j:oe,L:se,m:ee,M:ie,p:function(t,n,e){var r=h.get(n.slice(e,e+=2).toLowerCase());return null==r?-1:(t.p=r,e)},S:ue,U:$n,w:Jn,W:Kn,x:function(t,n,e){return f(t,M.x.toString(),n,e)},X:function(t,n,e){return f(t,M.X.toString(),n,e)},y:te,Y:Qn,Z:ne,"%":ce};return c}Dn.year=Bn((function(t){return(t=Dn.day(t)).setMonth(0,1),t}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t){return t.getFullYear()})),Dn.years=Dn.year.range,Dn.years.utc=Dn.year.utc.range,Dn.day=Bn((function(t){var n=new zn(2e3,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n}),(function(t,n){t.setDate(t.getDate()+n)}),(function(t){return t.getDate()-1})),Dn.days=Dn.day.range,Dn.days.utc=Dn.day.utc.range,Dn.dayOfYear=function(t){var n=Dn.year(t);return Math.floor((t-n-6e4*(t.getTimezoneOffset()-n.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach((function(t,n){n=7-n;var e=Dn[t]=Bn((function(t){return(t=Dn.day(t)).setDate(t.getDate()-(t.getDay()+n)%7),t}),(function(t,n){t.setDate(t.getDate()+7*Math.floor(n))}),(function(t){var e=Dn.year(t).getDay();return Math.floor((Dn.dayOfYear(t)+(e+n)%7)/7)-(e!==n)}));Dn[t+"s"]=e.range,Dn[t+"s"].utc=e.utc.range,Dn[t+"OfYear"]=function(t){var e=Dn.year(t).getDay();return Math.floor((Dn.dayOfYear(t)+(e+n)%7)/7)}})),Dn.week=Dn.sunday,Dn.weeks=Dn.sunday.range,Dn.weeks.utc=Dn.sunday.utc.range,Dn.weekOfYear=Dn.sundayOfYear;var Yn={"-":"",_:" ",0:"0"},Vn=/^\s*\d+/,Hn=/^%/;function Gn(t,n,e){var r=t<0?"-":"",o=(r?-t:t)+"",a=o.length;return r+(a68?1900:2e3),e+o[0].length):-1}function ne(t,n,e){return/^[+-]\d{4}$/.test(n=n.slice(e,e+5))?(t.Z=-n,e+5):-1}function ee(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function re(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function oe(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+3));return r?(t.j=+r[0],e+r[0].length):-1}function ae(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function ie(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function ue(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function se(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function le(t){var n=t.getTimezoneOffset(),e=n>0?"-":"+",r=_(n)/60|0,o=_(n)%60;return e+Gn(r,"0",2)+Gn(o,"0",2)}function ce(t,n,e){Hn.lastIndex=0;var r=Hn.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function fe(t){for(var n=t.length,e=-1;++e=0?1:-1,u=i*a,s=Math.cos(n),l=Math.sin(n),c=o*l,f=r*s+c*Math.cos(u),h=c*i*Math.sin(u);Ce.add(Math.atan2(h,f)),e=t,r=s,o=l}Le.point=function(i,u){Le.point=a,e=(t=i)*Lt,r=Math.cos(u=(n=u)*Lt/2+Rt/4),o=Math.sin(u)},Le.lineEnd=function(){a(t,n)}}function je(t){var n=t[0],e=t[1],r=Math.cos(e);return[r*Math.cos(n),r*Math.sin(n),Math.sin(e)]}function De(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function ze(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function qe(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function Fe(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function Be(t){var n=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function Ie(t){return[Math.atan2(t[1],t[0]),qt(t[2])]}function Xe(t,n){return _(t[0]-n[0])Tt?r=90:l<-Tt&&(n=-90),f[0]=t,f[1]=e}};function p(o,a){c.push(f=[t=o,e=o]),ar&&(r=a)}function d(a,i){var u=je([a*Lt,i*Lt]);if(s){var l=ze(s,u),c=ze([l[1],-l[0],0],l);Be(c),c=Ie(c);var f=a-o,h=f>0?1:-1,d=c[0]*Ut*h,m=_(f)>180;if(m^(h*or&&(r=g);else if(m^(h*o<(d=(d+360)%360-180)&&dr&&(r=i);m?ax(t,e)&&(e=a):x(a,e)>x(t,e)&&(t=a):e>=t?(ae&&(e=a)):a>o?x(t,a)>x(t,e)&&(e=a):x(a,e)>x(t,e)&&(t=a)}else p(a,i);s=u,o=a}function m(){h.point=d}function g(){f[0]=t,f[1]=e,h.point=p,s=null}function v(t,n){if(s){var e=t-o;l+=_(e)>180?e+(e>0?360:-360):e}else i=t,u=n;Le.point(t,n),d(t,n)}function y(){Le.lineStart()}function b(){v(i,u),Le.lineEnd(),_(l)>Tt&&(t=-(e=180)),f[0]=t,f[1]=e,s=null}function x(t,n){return(n-=t)<0?n+360:n}function M(t,n){return t[0]-n[0]}function w(t,n){return n[0]<=n[1]?n[0]<=t&&t<=n[1]:tx(m[0],m[1])&&(m[1]=p[1]),x(p[0],m[1])>x(m[0],m[1])&&(m[0]=p[0])):u.push(m=p);for(var s,l,p,d=-1/0,m=(i=0,u[l=u.length-1]);i<=l;m=p,++i)p=u[i],(s=x(m[1],p[0]))>d&&(d=s,t=p[0],e=m[1])}return c=f=null,t===1/0||n===1/0?[[NaN,NaN],[NaN,NaN]]:[[t,n],[e,r]]}}(),a.geo.centroid=function(t){_e=we=ke=Se=Ae=Ee=Te=Pe=Re=Ne=Oe=0,a.geo.stream(t,Ye);var n=Re,e=Ne,r=Oe,o=n*n+e*e+r*r;return o=0;--u)o.point((f=c[u])[0],f[1]);else r(p.x,p.p.x,-1,o);p=p.p}c=(p=p.o).z,d=!d}while(!p.v);o.lineEnd()}}}function Qe(t){if(n=t.length){for(var n,e,r=0,o=t[0];++r=0?1:-1,w=_*M,k=w>Rt,S=d*b;if(Ce.add(Math.atan2(S*_*Math.sin(w),m*x+S*Math.cos(w))),a+=k?M+_*Nt:M,k^h>=e^v>=e){var A=ze(je(f),je(t));Be(A);var E=ze(o,A);Be(E);var T=(k^M>=0?-1:1)*qt(E[2]);(r>T||r===T&&(A[0]||A[1]))&&(i+=k^M>=0?1:-1)}if(!g++)break;h=v,d=b,m=x,f=t}}return(a<-Tt||a0){for(b||(i.polygonStart(),b=!0),i.lineStart();++a1&&2&n&&e.push(e.pop().concat(e.shift())),u.push(e.filter(er))}return c}}function er(t){return t.length>1}function rr(){var t,n=[];return{lineStart:function(){n.push(t=[])},point:function(n,e){t.push([n,e])},lineEnd:z,buffer:function(){var e=n;return n=[],t=null,e},rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))}}}function or(t,n){return((t=t.x)[0]<0?t[1]-Ct-Tt:Ct-t[1])-((n=n.x)[0]<0?n[1]-Ct-Tt:Ct-n[1])}var ar=nr($e,(function(t){var n,e=NaN,r=NaN,o=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(a,i){var u=a>0?Rt:-Rt,s=_(a-e);_(s-Rt)0?Ct:-Ct),t.point(o,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(a,r),n=0):o!==u&&s>=Rt&&(_(e-o)Tt?Math.atan((Math.sin(n)*(a=Math.cos(r))*Math.sin(e)-Math.sin(r)*(o=Math.cos(n))*Math.sin(t))/(o*a*i)):(n+r)/2}(e,r,a,i),t.point(o,r),t.lineEnd(),t.lineStart(),t.point(u,r),n=0),t.point(e=a,r=i),o=u},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}),(function(t,n,e,r){var o;if(null==t)o=e*Ct,r.point(-Rt,o),r.point(0,o),r.point(Rt,o),r.point(Rt,0),r.point(Rt,-o),r.point(0,-o),r.point(-Rt,-o),r.point(-Rt,0),r.point(-Rt,o);else if(_(t[0]-n[0])>Tt){var a=t[0]0,r=_(n)>Tt;return nr(o,(function(t){var n,u,s,l,c;return{lineStart:function(){l=s=!1,c=1},point:function(f,h){var p,d=[f,h],m=o(f,h),g=e?m?0:i(f,h):m?i(f+(f<0?Rt:-Rt),h):0;if(!n&&(l=s=m)&&t.lineStart(),m!==s&&(p=a(n,d),(Xe(n,p)||Xe(d,p))&&(d[0]+=Tt,d[1]+=Tt,m=o(d[0],d[1]))),m!==s)c=0,m?(t.lineStart(),p=a(d,n),t.point(p[0],p[1])):(p=a(n,d),t.point(p[0],p[1]),t.lineEnd()),n=p;else if(r&&n&&e^m){var v;g&u||!(v=a(d,n,!0))||(c=0,e?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!m||n&&Xe(n,d)||t.point(d[0],d[1]),n=d,s=m,u=g},lineEnd:function(){s&&t.lineEnd(),n=null},clean:function(){return c|(l&&s)<<1}}}),Ir(t,6*Lt),e?[0,-t]:[-Rt,t-Rt]);function o(t,e){return Math.cos(t)*Math.cos(e)>n}function a(t,e,r){var o=[1,0,0],a=ze(je(t),je(e)),i=De(a,a),u=a[0],s=i-u*u;if(!s)return!r&&t;var l=n*i/s,c=-n*u/s,f=ze(o,a),h=Fe(o,l);qe(h,Fe(a,c));var p=f,d=De(h,p),m=De(p,p),g=d*d-m*(De(h,h)-1);if(!(g<0)){var v=Math.sqrt(g),y=Fe(p,(-d-v)/m);if(qe(y,h),y=Ie(y),!r)return y;var b,x=t[0],M=e[0],w=t[1],k=e[1];M0^y[1]<(_(y[0]-x)Rt^(x<=y[0]&&y[0]<=M)){var E=Fe(p,(-d+v)/m);return qe(E,h),[y,Ie(E)]}}}function i(n,r){var o=e?t:Rt-t,a=0;return n<-o?a|=1:n>o&&(a|=2),r<-o?a|=4:r>o&&(a|=8),a}}function ur(t,n,e,r){return function(o){var a,i=o.a,u=o.b,s=i.x,l=i.y,c=0,f=1,h=u.x-s,p=u.y-l;if(a=t-s,h||!(a>0)){if(a/=h,h<0){if(a0){if(a>f)return;a>c&&(c=a)}if(a=e-s,h||!(a<0)){if(a/=h,h<0){if(a>f)return;a>c&&(c=a)}else if(h>0){if(a0)){if(a/=p,p<0){if(a0){if(a>f)return;a>c&&(c=a)}if(a=r-l,p||!(a<0)){if(a/=p,p<0){if(a>f)return;a>c&&(c=a)}else if(p>0){if(a0&&(o.a={x:s+c*h,y:l+c*p}),f<1&&(o.b={x:s+f*h,y:l+f*p}),o}}}}}}function sr(t,n,e,r){return function(s){var l,c,f,h,p,d,m,g,v,y,b,x=s,M=rr(),_=ur(t,n,e,r),w={point:A,lineStart:function(){w.point=E,c&&c.push(f=[]),y=!0,v=!1,m=g=NaN},lineEnd:function(){l&&(E(h,p),d&&v&&M.rejoin(),l.push(M.buffer())),w.point=A,v&&s.lineEnd()},polygonStart:function(){s=M,l=[],c=[],b=!0},polygonEnd:function(){s=x,l=a.merge(l);var n=function(t){for(var n=0,e=c.length,r=t[1],o=0;or&&Dt(l,a,t)>0&&++n:a[1]<=r&&Dt(l,a,t)<0&&--n,l=a;return 0!==n}([t,r]),e=b&&n,o=l.length;(e||o)&&(s.polygonStart(),e&&(s.lineStart(),k(null,null,1,s),s.lineEnd()),o&&Ke(l,i,n,k,s),s.polygonEnd()),l=c=f=null}};function k(a,i,s,l){var c=0,f=0;if(null==a||(c=o(a,s))!==(f=o(i,s))||u(a,i)<0^s>0)do{l.point(0===c||3===c?t:e,c>1?r:n)}while((c=(c+s+4)%4)!==f);else l.point(i[0],i[1])}function S(o,a){return t<=o&&o<=e&&n<=a&&a<=r}function A(t,n){S(t,n)&&s.point(t,n)}function E(t,n){var e=S(t=Math.max(-1e9,Math.min(1e9,t)),n=Math.max(-1e9,Math.min(1e9,n)));if(c&&f.push([t,n]),y)h=t,p=n,d=e,y=!1,e&&(s.lineStart(),s.point(t,n));else if(e&&v)s.point(t,n);else{var r={a:{x:m,y:g},b:{x:t,y:n}};_(r)?(v||(s.lineStart(),s.point(r.a.x,r.a.y)),s.point(r.b.x,r.b.y),e||s.lineEnd(),b=!1):e&&(s.lineStart(),s.point(t,n),b=!1)}m=t,g=n,v=e}return w};function o(r,o){return _(r[0]-t)0?0:3:_(r[0]-e)0?2:1:_(r[1]-n)0?1:0:o>0?3:2}function i(t,n){return u(t.x,n.x)}function u(t,n){var e=o(t,1),r=o(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}}function lr(t){var n=0,e=Rt/3,r=Lr(t),o=r(n,e);return o.parallels=function(t){return arguments.length?r(n=t[0]*Rt/180,e=t[1]*Rt/180):[n/Rt*180,e/Rt*180]},o}function cr(t,n){var e=Math.sin(t),r=(e+Math.sin(n))/2,o=1+e*(2*r-e),a=Math.sqrt(o)/r;function i(t,n){var e=Math.sqrt(o-2*r*Math.sin(n))/r;return[e*Math.sin(t*=r),a-e*Math.cos(t)]}return i.invert=function(t,n){var e=a-n;return[Math.atan2(t,e)/r,qt((o-(t*t+e*e)*r*r)/(2*r))]},i}a.geo.clipExtent=function(){var t,n,e,r,o,a,i={stream:function(t){return o&&(o.valid=!1),(o=a(t)).valid=!0,o},extent:function(u){return arguments.length?(a=sr(t=+u[0][0],n=+u[0][1],e=+u[1][0],r=+u[1][1]),o&&(o.valid=!1,o=null),i):[[t,n],[e,r]]}};return i.extent([[0,0],[960,500]])},(a.geo.conicEqualArea=function(){return lr(cr)}).raw=cr,a.geo.albers=function(){return a.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},a.geo.albersUsa=function(){var t,n,e,r,o=a.geo.albers(),i=a.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=a.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(n,e){t=[n,e]}};function l(o){var a=o[0],i=o[1];return t=null,n(a,i),t||(e(a,i),t)||r(a,i),t}return l.invert=function(t){var n=o.scale(),e=o.translate(),r=(t[0]-e[0])/n,a=(t[1]-e[1])/n;return(a>=.12&&a<.234&&r>=-.425&&r<-.214?i:a>=.166&&a<.234&&r>=-.214&&r<-.115?u:o).invert(t)},l.stream=function(t){var n=o.stream(t),e=i.stream(t),r=u.stream(t);return{point:function(t,o){n.point(t,o),e.point(t,o),r.point(t,o)},sphere:function(){n.sphere(),e.sphere(),r.sphere()},lineStart:function(){n.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){n.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){n.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){n.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},l.precision=function(t){return arguments.length?(o.precision(t),i.precision(t),u.precision(t),l):o.precision()},l.scale=function(t){return arguments.length?(o.scale(t),i.scale(.35*t),u.scale(t),l.translate(o.translate())):o.scale()},l.translate=function(t){if(!arguments.length)return o.translate();var a=o.scale(),c=+t[0],f=+t[1];return n=o.translate(t).clipExtent([[c-.455*a,f-.238*a],[c+.455*a,f+.238*a]]).stream(s).point,e=i.translate([c-.307*a,f+.201*a]).clipExtent([[c-.425*a+Tt,f+.12*a+Tt],[c-.214*a-Tt,f+.234*a-Tt]]).stream(s).point,r=u.translate([c-.205*a,f+.212*a]).clipExtent([[c-.214*a+Tt,f+.166*a+Tt],[c-.115*a-Tt,f+.234*a-Tt]]).stream(s).point,l},l.scale(1070)};var fr,hr,pr,dr,mr,gr,vr={point:z,lineStart:z,lineEnd:z,polygonStart:function(){hr=0,vr.lineStart=yr},polygonEnd:function(){vr.lineStart=vr.lineEnd=vr.point=z,fr+=_(hr/2)}};function yr(){var t,n,e,r;function o(t,n){hr+=r*t-e*n,e=t,r=n}vr.point=function(a,i){vr.point=o,t=e=a,n=r=i},vr.lineEnd=function(){o(t,n)}}var br={point:function(t,n){tmr&&(mr=t),ngr&&(gr=n)},lineStart:z,lineEnd:z,polygonStart:z,polygonEnd:z};function xr(){var t=Mr(4.5),n=[],e={point:r,lineStart:function(){e.point=o},lineEnd:i,polygonStart:function(){e.lineEnd=u},polygonEnd:function(){e.lineEnd=i,e.point=r},pointRadius:function(n){return t=Mr(n),e},result:function(){if(n.length){var t=n.join("");return n=[],t}}};function r(e,r){n.push("M",e,",",r,t)}function o(t,r){n.push("M",t,",",r),e.point=a}function a(t,e){n.push("L",t,",",e)}function i(){e.point=r}function u(){n.push("Z")}return e}function Mr(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}var _r,wr={point:kr,lineStart:Sr,lineEnd:Ar,polygonStart:function(){wr.lineStart=Er},polygonEnd:function(){wr.point=kr,wr.lineStart=Sr,wr.lineEnd=Ar}};function kr(t,n){ke+=t,Se+=n,++Ae}function Sr(){var t,n;function e(e,r){var o=e-t,a=r-n,i=Math.sqrt(o*o+a*a);Ee+=i*(t+e)/2,Te+=i*(n+r)/2,Pe+=i,kr(t=e,n=r)}wr.point=function(r,o){wr.point=e,kr(t=r,n=o)}}function Ar(){wr.point=kr}function Er(){var t,n,e,r;function o(t,n){var o=t-e,a=n-r,i=Math.sqrt(o*o+a*a);Ee+=i*(e+t)/2,Te+=i*(r+n)/2,Pe+=i,Re+=(i=r*t-e*n)*(e+t),Ne+=i*(r+n),Oe+=3*i,kr(e=t,r=n)}wr.point=function(a,i){wr.point=o,kr(t=e=a,n=r=i)},wr.lineEnd=function(){o(t,n)}}function Tr(t){var n=4.5,e={point:r,lineStart:function(){e.point=o},lineEnd:i,polygonStart:function(){e.lineEnd=u},polygonEnd:function(){e.lineEnd=i,e.point=r},pointRadius:function(t){return n=t,e},result:z};function r(e,r){t.moveTo(e+n,r),t.arc(e,r,n,0,Nt)}function o(n,r){t.moveTo(n,r),e.point=a}function a(n,e){t.lineTo(n,e)}function i(){e.point=r}function u(){t.closePath()}return e}function Pr(t){var n=.5,e=Math.cos(30*Lt),r=16;function o(t){return(r?i:a)(t)}function a(n){return Or(n,(function(e,r){e=t(e,r),n.point(e[0],e[1])}))}function i(n){var e,o,a,i,s,l,c,f,h,p,d,m,g={point:v,lineStart:y,lineEnd:x,polygonStart:function(){n.polygonStart(),g.lineStart=M},polygonEnd:function(){n.polygonEnd(),g.lineStart=y}};function v(e,r){e=t(e,r),n.point(e[0],e[1])}function y(){f=NaN,g.point=b,n.lineStart()}function b(e,o){var a=je([e,o]),i=t(e,o);u(f,h,c,p,d,m,f=i[0],h=i[1],c=e,p=a[0],d=a[1],m=a[2],r,n),n.point(f,h)}function x(){g.point=v,n.lineEnd()}function M(){y(),g.point=_,g.lineEnd=w}function _(t,n){b(e=t,n),o=f,a=h,i=p,s=d,l=m,g.point=b}function w(){u(f,h,c,p,d,m,o,a,e,i,s,l,r,n),g.lineEnd=x,x()}return g}function u(r,o,a,i,s,l,c,f,h,p,d,m,g,v){var y=c-r,b=f-o,x=y*y+b*b;if(x>4*n&&g--){var M=i+p,w=s+d,k=l+m,S=Math.sqrt(M*M+w*w+k*k),A=Math.asin(k/=S),E=_(_(k)-1)n||_((y*N+b*O)/x-.5)>.3||i*p+s*d+l*m0&&16,o):Math.sqrt(n)},o}function Rr(t){var n=Pr((function(n,e){return t([n*Ut,e*Ut])}));return function(t){return Ur(n(t))}}function Nr(t){this.stream=t}function Or(t,n){return{point:n,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function Cr(t){return Lr((function(){return t}))()}function Lr(t){var n,e,r,o,i,u,s=Pr((function(t,e){return[(t=n(t,e))[0]*l+o,i-t[1]*l]})),l=150,c=480,f=250,h=0,p=0,d=0,m=0,g=0,v=ar,y=L,b=null,x=null;function M(t){return[(t=r(t[0]*Lt,t[1]*Lt))[0]*l+o,i-t[1]*l]}function _(t){return(t=r.invert((t[0]-o)/l,(i-t[1])/l))&&[t[0]*Ut,t[1]*Ut]}function w(){r=Je(e=zr(d,m,g),n);var t=n(h,p);return o=c-t[0]*l,i=f+t[1]*l,k()}function k(){return u&&(u.valid=!1,u=null),M}return M.stream=function(t){return u&&(u.valid=!1),(u=Ur(v(e,s(y(t))))).valid=!0,u},M.clipAngle=function(t){return arguments.length?(v=null==t?(b=t,ar):ir((b=+t)*Lt),k()):b},M.clipExtent=function(t){return arguments.length?(x=t,y=t?sr(t[0][0],t[0][1],t[1][0],t[1][1]):L,k()):x},M.scale=function(t){return arguments.length?(l=+t,w()):l},M.translate=function(t){return arguments.length?(c=+t[0],f=+t[1],w()):[c,f]},M.center=function(t){return arguments.length?(h=t[0]%360*Lt,p=t[1]%360*Lt,w()):[h*Ut,p*Ut]},M.rotate=function(t){return arguments.length?(d=t[0]%360*Lt,m=t[1]%360*Lt,g=t.length>2?t[2]%360*Lt:0,w()):[d*Ut,m*Ut,g*Ut]},a.rebind(M,s,"precision"),function(){return n=t.apply(this,arguments),M.invert=n.invert&&_,w()}}function Ur(t){return Or(t,(function(n,e){t.point(n*Lt,e*Lt)}))}function jr(t,n){return[t,n]}function Dr(t,n){return[t>Rt?t-Nt:t<-Rt?t+Nt:t,n]}function zr(t,n,e){return t?n||e?Je(Fr(t),Br(n,e)):Fr(t):n||e?Br(n,e):Dr}function qr(t){return function(n,e){return[(n+=t)>Rt?n-Nt:n<-Rt?n+Nt:n,e]}}function Fr(t){var n=qr(t);return n.invert=qr(-t),n}function Br(t,n){var e=Math.cos(t),r=Math.sin(t),o=Math.cos(n),a=Math.sin(n);function i(t,n){var i=Math.cos(n),u=Math.cos(t)*i,s=Math.sin(t)*i,l=Math.sin(n),c=l*e+u*r;return[Math.atan2(s*o-c*a,u*e-l*r),qt(c*o+s*a)]}return i.invert=function(t,n){var i=Math.cos(n),u=Math.cos(t)*i,s=Math.sin(t)*i,l=Math.sin(n),c=l*o-s*a;return[Math.atan2(s*o+l*a,u*e+c*r),qt(c*e-u*r)]},i}function Ir(t,n){var e=Math.cos(t),r=Math.sin(t);return function(o,a,i,u){var s=i*n;null!=o?(o=Xr(e,o),a=Xr(e,a),(i>0?oa)&&(o+=i*Nt)):(o=t+i*Nt,a=t-.5*s);for(var l,c=o;i>0?c>a:c2?t[2]*Lt:0),n.invert=function(n){return(n=t.invert(n[0]*Lt,n[1]*Lt))[0]*=Ut,n[1]*=Ut,n},n},Dr.invert=jr,a.geo.circle=function(){var t,n,e=[0,0],r=6;function o(){var t="function"==typeof e?e.apply(this,arguments):e,r=zr(-t[0]*Lt,-t[1]*Lt,0).invert,o=[];return n(null,null,1,{point:function(t,n){o.push(t=r(t,n)),t[0]*=Ut,t[1]*=Ut}}),{type:"Polygon",coordinates:[o]}}return o.origin=function(t){return arguments.length?(e=t,o):e},o.angle=function(e){return arguments.length?(n=Ir((t=+e)*Lt,r*Lt),o):t},o.precision=function(e){return arguments.length?(n=Ir(t*Lt,(r=+e)*Lt),o):r},o.angle(90)},a.geo.distance=function(t,n){var e,r=(n[0]-t[0])*Lt,o=t[1]*Lt,a=n[1]*Lt,i=Math.sin(r),u=Math.cos(r),s=Math.sin(o),l=Math.cos(o),c=Math.sin(a),f=Math.cos(a);return Math.atan2(Math.sqrt((e=f*i)*e+(e=l*c-s*f*u)*e),s*c+l*f*u)},a.geo.graticule=function(){var t,n,e,r,o,i,u,s,l,c,f,h,p=10,d=p,m=90,g=360,v=2.5;function y(){return{type:"MultiLineString",coordinates:b()}}function b(){return a.range(Math.ceil(r/m)*m,e,m).map(f).concat(a.range(Math.ceil(s/g)*g,u,g).map(h)).concat(a.range(Math.ceil(n/p)*p,t,p).filter((function(t){return _(t%m)>Tt})).map(l)).concat(a.range(Math.ceil(i/d)*d,o,d).filter((function(t){return _(t%g)>Tt})).map(c))}return y.lines=function(){return b().map((function(t){return{type:"LineString",coordinates:t}}))},y.outline=function(){return{type:"Polygon",coordinates:[f(r).concat(h(u).slice(1),f(e).reverse().slice(1),h(s).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.majorExtent(t).minorExtent(t):y.minorExtent()},y.majorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],s=+t[0][1],u=+t[1][1],r>e&&(t=r,r=e,e=t),s>u&&(t=s,s=u,u=t),y.precision(v)):[[r,s],[e,u]]},y.minorExtent=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],i=+e[0][1],o=+e[1][1],n>t&&(e=n,n=t,t=e),i>o&&(e=i,i=o,o=e),y.precision(v)):[[n,i],[t,o]]},y.step=function(t){return arguments.length?y.majorStep(t).minorStep(t):y.minorStep()},y.majorStep=function(t){return arguments.length?(m=+t[0],g=+t[1],y):[m,g]},y.minorStep=function(t){return arguments.length?(p=+t[0],d=+t[1],y):[p,d]},y.precision=function(a){return arguments.length?(v=+a,l=Yr(i,o,90),c=Vr(n,t,v),f=Yr(s,u,90),h=Vr(r,e,v),y):v},y.majorExtent([[-180,-90+Tt],[180,90-Tt]]).minorExtent([[-180,-80-Tt],[180,80+Tt]])},a.geo.greatArc=function(){var t,n,e=Hr,r=Gr;function o(){return{type:"LineString",coordinates:[t||e.apply(this,arguments),n||r.apply(this,arguments)]}}return o.distance=function(){return a.geo.distance(t||e.apply(this,arguments),n||r.apply(this,arguments))},o.source=function(n){return arguments.length?(e=n,t="function"==typeof n?null:n,o):e},o.target=function(t){return arguments.length?(r=t,n="function"==typeof t?null:t,o):r},o.precision=function(){return arguments.length?o:0},o},a.geo.interpolate=function(t,n){return e=t[0]*Lt,r=t[1]*Lt,o=n[0]*Lt,a=n[1]*Lt,i=Math.cos(r),u=Math.sin(r),s=Math.cos(a),l=Math.sin(a),c=i*Math.cos(e),f=i*Math.sin(e),h=s*Math.cos(o),p=s*Math.sin(o),d=2*Math.asin(Math.sqrt(Bt(a-r)+i*s*Bt(o-e))),m=1/Math.sin(d),(g=d?function(t){var n=Math.sin(t*=d)*m,e=Math.sin(d-t)*m,r=e*c+n*h,o=e*f+n*p,a=e*u+n*l;return[Math.atan2(o,r)*Ut,Math.atan2(a,Math.sqrt(r*r+o*o))*Ut]}:function(){return[e*Ut,r*Ut]}).distance=d,g;var e,r,o,a,i,u,s,l,c,f,h,p,d,m,g},a.geo.length=function(t){return _r=0,a.geo.stream(t,Wr),_r};var Wr={sphere:z,point:z,lineStart:function(){var t,n,e;function r(r,o){var a=Math.sin(o*=Lt),i=Math.cos(o),u=_((r*=Lt)-t),s=Math.cos(u);_r+=Math.atan2(Math.sqrt((u=i*Math.sin(u))*u+(u=e*a-n*i*s)*u),n*a+e*i*s),t=r,n=a,e=i}Wr.point=function(o,a){t=o*Lt,n=Math.sin(a*=Lt),e=Math.cos(a),Wr.point=r},Wr.lineEnd=function(){Wr.point=Wr.lineEnd=z}},lineEnd:z,polygonStart:z,polygonEnd:z};function Zr(t,n){function e(n,e){var r=Math.cos(n),o=Math.cos(e),a=t(r*o);return[a*o*Math.sin(n),a*Math.sin(e)]}return e.invert=function(t,e){var r=Math.sqrt(t*t+e*e),o=n(r),a=Math.sin(o),i=Math.cos(o);return[Math.atan2(t*a,r*i),Math.asin(r&&e*a/r)]},e}var Jr=Zr((function(t){return Math.sqrt(2/(1+t))}),(function(t){return 2*Math.asin(t/2)}));(a.geo.azimuthalEqualArea=function(){return Cr(Jr)}).raw=Jr;var $r=Zr((function(t){var n=Math.acos(t);return n&&n/Math.sin(n)}),L);function Kr(t,n){var e=Math.cos(t),r=function(t){return Math.tan(Rt/4+t/2)},o=t===n?Math.sin(t):Math.log(e/Math.cos(n))/Math.log(r(n)/r(t)),a=e*Math.pow(r(t),o)/o;if(!o)return no;function i(t,n){a>0?n<-Ct+Tt&&(n=-Ct+Tt):n>Ct-Tt&&(n=Ct-Tt);var e=a/Math.pow(r(n),o);return[e*Math.sin(o*t),a-e*Math.cos(o*t)]}return i.invert=function(t,n){var e=a-n,r=jt(o)*Math.sqrt(t*t+e*e);return[Math.atan2(t,e)/o,2*Math.atan(Math.pow(a/r,1/o))-Ct]},i}function Qr(t,n){var e=Math.cos(t),r=t===n?Math.sin(t):(e-Math.cos(n))/(n-t),o=e/r+t;if(_(r)1&&Dt(t[e[r-2]],t[e[r-1]],t[o])<=0;)--r;e[r++]=o}return e.slice(0,r)}function lo(t,n){return t[0]-n[0]||t[1]-n[1]}(a.geo.stereographic=function(){return Cr(oo)}).raw=oo,ao.invert=function(t,n){return[-n,2*Math.atan(Math.exp(t))-Ct]},(a.geo.transverseMercator=function(){var t=eo(ao),n=t.center,e=t.rotate;return t.center=function(t){return t?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return t?e([t[0],t[1],t.length>2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90])}).raw=ao,a.geom={},a.geom.hull=function(t){var n=io,e=uo;if(arguments.length)return r(t);function r(t){if(t.length<3)return[];var r,o=bn(n),a=bn(e),i=t.length,u=[],s=[];for(r=0;r=0;--r)p.push(t[u[l[r]][2]]);for(r=+f;rTt)u=u.L;else{if(!((o=a-To(u,i))>Tt)){r>-Tt?(n=u.P,e=u):o>-Tt?(n=u,e=u.N):n=e=u;break}if(!u.R){n=u;break}u=u.R}var s=wo(t);if(vo.insert(n,s),n||e){if(n===e)return Co(n),e=wo(n.site),vo.insert(s,e),s.edge=e.edge=jo(n.site,s.site),Oo(n),void Oo(e);if(e){Co(n),Co(e);var l=n.site,c=l.x,f=l.y,h=t.x-c,p=t.y-f,d=e.site,m=d.x-c,g=d.y-f,v=2*(h*g-p*m),y=h*h+p*p,b=m*m+g*g,x={x:(g*y-p*b)/v+c,y:(h*b-m*y)/v+f};Do(e.edge,l,d,x),s.edge=jo(l,t,null,x),e.edge=jo(t,d,null,x),Oo(n),Oo(e)}else s.edge=jo(n.site,s.site)}}function Eo(t,n){var e=t.site,r=e.x,o=e.y,a=o-n;if(!a)return r;var i=t.P;if(!i)return-1/0;var u=(e=i.site).x,s=e.y,l=s-n;if(!l)return u;var c=u-r,f=1/a-1/l,h=c/l;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*l)-s+l/2+o-a/2)))/f+r:(r+u)/2}function To(t,n){var e=t.N;if(e)return Eo(e,n);var r=t.site;return r.y===n?r.x:1/0}function Po(t){this.site=t,this.edges=[]}function Ro(t,n){return n.angle-t.angle}function No(){Fo(this),this.x=this.y=this.arc=this.site=this.cy=null}function Oo(t){var n=t.P,e=t.N;if(n&&e){var r=n.site,o=t.site,a=e.site;if(r!==a){var i=o.x,u=o.y,s=r.x-i,l=r.y-u,c=a.x-i,f=2*(s*(g=a.y-u)-l*c);if(!(f>=-Pt)){var h=s*s+l*l,p=c*c+g*g,d=(g*h-l*p)/f,m=(s*p-c*h)/f,g=m+u,v=Mo.pop()||new No;v.arc=t,v.site=o,v.x=d+i,v.y=g+Math.sqrt(d*d+m*m),v.cy=g,t.circle=v;for(var y=null,b=bo._;b;)if(v.y=u)return;if(h>d){if(a){if(a.y>=l)return}else a={x:g,y:s};e={x:g,y:l}}else{if(a){if(a.y1)if(h>d){if(a){if(a.y>=l)return}else a={x:(s-o)/r,y:s};e={x:(l-o)/r,y:l}}else{if(a){if(a.y=u)return}else a={x:i,y:r*i+o};e={x:u,y:r*u+o}}else{if(a){if(a.xTt||_(o-e)>Tt)&&(u.splice(i,0,new zo((v=a.site,y=c,b=_(r-f)Tt?{x:f,y:_(n-f)Tt?{x:_(e-d)Tt?{x:h,y:_(n-h)Tt?{x:_(e-p)=e&&l.x<=o&&l.y>=r&&l.y<=i?[[e,i],[o,i],[o,r],[e,r]]:[]).point=t[u]})),n}function u(t){return t.map((function(t,n){return{x:Math.round(r(t,n)/Tt)*Tt,y:Math.round(o(t,n)/Tt)*Tt,i:n}}))}return i.links=function(t){return Yo(u(t)).edges.filter((function(t){return t.l&&t.r})).map((function(n){return{source:t[n.l.i],target:t[n.r.i]}}))},i.triangles=function(t){var n=[];return Yo(u(t)).cells.forEach((function(e,r){for(var o,a=e.site,i=e.edges.sort(Ro),u=-1,s=i.length,l=i[s-1].edge,c=l.l===a?l.r:l.l;++ua||f>i||h=M)<<1|n>=x,w=_+4;_a&&(o=n.slice(a,o),u[i]?u[i]+=o:u[++i]=o),(e=e[0])===(r=r[0])?u[i]?u[i]+=r:u[++i]=r:(u[++i]=null,s.push({i:i,x:ta(e,r)})),a=ra.lastIndex;return am&&(m=s.x),s.y>g&&(g=s.y),l.push(s.x),c.push(s.y);else for(f=0;fm&&(m=b),x>g&&(g=x),l.push(b),c.push(x)}var M=m-p,w=g-d;function k(t,n,e,r,o,a,i,u){if(!isNaN(e)&&!isNaN(r))if(t.leaf){var s=t.x,l=t.y;if(null!=s)if(_(s-e)+_(l-r)<.01)S(t,n,e,r,o,a,i,u);else{var c=t.point;t.x=t.y=t.point=null,S(t,c,s,l,o,a,i,u),S(t,n,e,r,o,a,i,u)}else t.x=e,t.y=r,t.point=n}else S(t,n,e,r,o,a,i,u)}function S(t,n,e,r,o,a,i,u){var s=.5*(o+i),l=.5*(a+u),c=e>=s,f=r>=l,h=f<<1|c;t.leaf=!1,c?o=s:i=s,f?a=l:u=l,k(t=t.nodes[h]||(t.nodes[h]={leaf:!0,nodes:[],point:null,x:null,y:null}),n,e,r,o,a,i,u)}M>w?g=d+M:m=p+w;var A={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){k(A,t,+v(t,++f),+y(t,f),p,d,m,g)},visit:function(t){Jo(t,A,p,d,m,g)},find:function(t){return $o(A,t[0],t[1],p,d,m,g)}};if(f=-1,null==n){for(;++f=0&&!(e=a.interpolators[r](t,n)););return e}function aa(t,n){var e,r=[],o=[],a=t.length,i=n.length,u=Math.min(t.length,n.length);for(e=0;e=1?1:t(n)}}function ca(t){return function(n){return 1-t(1-n)}}function fa(t){return function(n){return.5*(n<.5?t(2*n):2-t(2-2*n))}}function ha(t){return t*t}function pa(t){return t*t*t}function da(t){if(t<=0)return 0;if(t>=1)return 1;var n=t*t,e=n*t;return 4*(t<.5?e:3*(t-n)+e-.75)}function ma(t){return 1-Math.cos(t*Ct)}function ga(t){return Math.pow(2,10*(t-1))}function va(t){return 1-Math.sqrt(1-t*t)}function ya(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function ba(t,n){return n-=t,function(e){return Math.round(t+n*e)}}function xa(t){var n=[t.a,t.b],e=[t.c,t.d],r=_a(n),o=Ma(n,e),a=_a(function(t,n,e){return t[0]+=e*n[0],t[1]+=e*n[1],t}(e,n,-o))||0;n[0]*e[1]=0?t.slice(0,n):t,r=n>=0?t.slice(n+1):"in";return e=ua.get(e)||ia,la((r=sa.get(r)||L)(e.apply(null,i.call(arguments,1))))},a.interpolateHcl=function(t,n){t=a.hcl(t),n=a.hcl(n);var e=t.h,r=t.c,o=t.l,i=n.h-e,u=n.c-r,s=n.l-o;return isNaN(u)&&(u=0,r=isNaN(r)?n.c:r),isNaN(i)?(i=0,e=isNaN(e)?n.h:e):i>180?i-=360:i<-180&&(i+=360),function(t){return Kt(e+i*t,r+u*t,o+s*t)+""}},a.interpolateHsl=function(t,n){t=a.hsl(t),n=a.hsl(n);var e=t.h,r=t.s,o=t.l,i=n.h-e,u=n.s-r,s=n.l-o;return isNaN(u)&&(u=0,r=isNaN(r)?n.s:r),isNaN(i)?(i=0,e=isNaN(e)?n.h:e):i>180?i-=360:i<-180&&(i+=360),function(t){return Zt(e+i*t,r+u*t,o+s*t)+""}},a.interpolateLab=function(t,n){t=a.lab(t),n=a.lab(n);var e=t.l,r=t.a,o=t.b,i=n.l-e,u=n.a-r,s=n.b-o;return function(t){return en(e+i*t,r+u*t,o+s*t)+""}},a.interpolateRound=ba,a.transform=function(t){var n=s.createElementNS(a.ns.prefix.svg,"g");return(a.transform=function(t){if(null!=t){n.setAttribute("transform",t);var e=n.transform.baseVal.consolidate()}return new xa(e?e.matrix:wa)})(t)},xa.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var wa={a:1,b:0,c:0,d:1,e:0,f:0};function ka(t){return t.length?t.pop()+",":""}function Sa(t,n){var e=[],r=[];return t=a.transform(t),n=a.transform(n),function(t,n,e,r){if(t[0]!==n[0]||t[1]!==n[1]){var o=e.push("translate(",null,",",null,")");r.push({i:o-4,x:ta(t[0],n[0])},{i:o-2,x:ta(t[1],n[1])})}else(n[0]||n[1])&&e.push("translate("+n+")")}(t.translate,n.translate,e,r),function(t,n,e,r){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),r.push({i:e.push(ka(e)+"rotate(",null,")")-2,x:ta(t,n)})):n&&e.push(ka(e)+"rotate("+n+")")}(t.rotate,n.rotate,e,r),function(t,n,e,r){t!==n?r.push({i:e.push(ka(e)+"skewX(",null,")")-2,x:ta(t,n)}):n&&e.push(ka(e)+"skewX("+n+")")}(t.skew,n.skew,e,r),function(t,n,e,r){if(t[0]!==n[0]||t[1]!==n[1]){var o=e.push(ka(e)+"scale(",null,",",null,")");r.push({i:o-4,x:ta(t[0],n[0])},{i:o-2,x:ta(t[1],n[1])})}else 1===n[0]&&1===n[1]||e.push(ka(e)+"scale("+n+")")}(t.scale,n.scale,e,r),t=n=null,function(t){for(var n,o=-1,a=r.length;++o0?e=n:(t.c=null,t.t=NaN,t=null,s.end({type:"end",alpha:e=0})):n>0&&(s.start({type:"start",alpha:e=n}),t=En(u.tick)),u):e},u.start=function(){var t,n,e,a=v.length,s=y.length,c=l[0],d=l[1];for(t=0;t=0;)e.push(o[r])}function qa(t,n){for(var e=[t],r=[];null!=(t=e.pop());)if(r.push(t),(a=t.children)&&(o=a.length))for(var o,a,i=-1;++i=0;)i.push(c=l[s]),c.parent=a,c.depth=a.depth+1;e&&(a.value=0),a.children=l}else e&&(a.value=+e.call(r,a,a.depth)||0),delete a.children;return qa(o,(function(n){var r,o;t&&(r=n.children)&&r.sort(t),e&&(o=n.parent)&&(o.value+=n.value)})),u}return r.sort=function(n){return arguments.length?(t=n,r):t},r.children=function(t){return arguments.length?(n=t,r):n},r.value=function(t){return arguments.length?(e=t,r):e},r.revalue=function(t){return e&&(za(t,(function(t){t.children&&(t.value=0)})),qa(t,(function(t){var n;t.children||(t.value=+e.call(r,t,t.depth)||0),(n=t.parent)&&(n.value+=t.value)}))),t},r},a.layout.partition=function(){var t=a.layout.hierarchy(),n=[1,1];function e(e,r){var o=t.call(this,e,r);return function t(n,e,r,o){var a=n.children;if(n.x=e,n.y=n.depth*o,n.dx=r,n.dy=o,a&&(i=a.length)){var i,u,s,l=-1;for(r=n.value?r/n.value:0;++lu&&(u=r),i.push(r)}for(e=0;eo&&(r=e,o=n);return r}function Qa(t){return t.reduce(ti,0)}function ti(t,n){return t+n[1]}function ni(t,n){return ei(t,Math.ceil(Math.log(n.length)/Math.LN2+1))}function ei(t,n){for(var e=-1,r=+t[0],o=(t[1]-r)/n,a=[];++e<=n;)a[e]=o*e+r;return a}function ri(t){return[a.min(t),a.max(t)]}function oi(t,n){return t.value-n.value}function ai(t,n){var e=t._pack_next;t._pack_next=n,n._pack_prev=t,n._pack_next=e,e._pack_prev=n}function ii(t,n){t._pack_next=n,n._pack_prev=t}function ui(t,n){var e=n.x-t.x,r=n.y-t.y,o=t.r+n.r;return.999*o*o>e*e+r*r}function si(t){if((n=t.children)&&(s=n.length)){var n,e,r,o,a,i,u,s,l=1/0,c=-1/0,f=1/0,h=-1/0;if(n.forEach(li),(e=n[0]).x=-e.r,e.y=0,b(e),s>1&&((r=n[1]).x=r.r,r.y=0,b(r),s>2))for(fi(e,r,o=n[2]),b(o),ai(e,o),e._pack_prev=o,ai(o,r),r=e._pack_next,a=3;a0)for(i=-1;++i=f[0]&&s<=f[1]&&((u=l[a.bisect(h,s,1,d)-1]).y+=m,u.push(o[i]));return l}return o.value=function(t){return arguments.length?(n=t,o):n},o.range=function(t){return arguments.length?(e=bn(t),o):e},o.bins=function(t){return arguments.length?(r="number"==typeof t?function(n){return ei(n,t)}:bn(t),o):r},o.frequency=function(n){return arguments.length?(t=!!n,o):t},o},a.layout.pack=function(){var t,n=a.layout.hierarchy().sort(oi),e=0,r=[1,1];function o(o,a){var i=n.call(this,o,a),u=i[0],s=r[0],l=r[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(u.x=u.y=0,qa(u,(function(t){t.r=+c(t.value)})),qa(u,si),e){var f=e*(t?1:Math.max(2*u.r/s,2*u.r/l))/2;qa(u,(function(t){t.r+=f})),qa(u,si),qa(u,(function(t){t.r-=f}))}return function t(n,e,r,o){var a=n.children;if(n.x=e+=o*n.x,n.y=r+=o*n.y,n.r*=o,a)for(var i=-1,u=a.length;++ip.x&&(p=t),t.depth>d.depth&&(d=t)}));var m=n(h,p)/2-h.x,g=e[0]/(p.x+n(p,h)/2+m),v=e[1]/(d.depth||1);za(c,(function(t){t.x=(t.x+m)*g,t.y=t.depth*v}))}return l}function i(t){var e=t.children,r=t.parent.children,o=t.i?r[t.i-1]:null;if(e.length){!function(t){for(var n,e=0,r=0,o=t.children,a=o.length;--a>=0;)(n=o[a]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(t);var a=(e[0].z+e[e.length-1].z)/2;o?(t.z=o.z+n(t._,o._),t.m=t.z-a):t.z=a}else o&&(t.z=o.z+n(t._,o._));t.parent.A=function(t,e,r){if(e){for(var o,a=t,i=t,u=e,s=a.parent.children[0],l=a.m,c=i.m,f=u.m,h=s.m;u=di(u),a=pi(a),u&&a;)s=pi(s),(i=di(i)).a=t,(o=u.z+f-a.z-l+n(u._,a._))>0&&(mi(gi(u,t,r),t,o),l+=o,c+=o),f+=u.m,l+=a.m,h+=s.m,c+=i.m;u&&!di(i)&&(i.t=u,i.m+=f-c),a&&!pi(s)&&(s.t=a,s.m+=l-h,r=t)}return r}(t,o,t.parent.A||r[0])}function u(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e[0],t.y=t.depth*e[1]}return o.separation=function(t){return arguments.length?(n=t,o):n},o.size=function(t){return arguments.length?(r=null==(e=t)?s:null,o):r?null:e},o.nodeSize=function(t){return arguments.length?(r=null==(e=t)?null:s,o):r?e:null},Da(o,t)},a.layout.cluster=function(){var t=a.layout.hierarchy().sort(null).value(null),n=hi,e=[1,1],r=!1;function o(o,i){var u,s=t.call(this,o,i),l=s[0],c=0;qa(l,(function(t){var e=t.children;e&&e.length?(t.x=function(t){return t.reduce((function(t,n){return t+n.x}),0)/t.length}(e),t.y=function(t){return 1+a.max(t,(function(t){return t.y}))}(e)):(t.x=u?c+=n(t,u):0,t.y=0,u=t)}));var f=function t(n){var e=n.children;return e&&e.length?t(e[0]):n}(l),h=function t(n){var e,r=n.children;return r&&(e=r.length)?t(r[e-1]):n}(l),p=f.x-n(f,h)/2,d=h.x+n(h,f)/2;return qa(l,r?function(t){t.x=(t.x-l.x)*e[0],t.y=(l.y-t.y)*e[1]}:function(t){t.x=(t.x-p)/(d-p)*e[0],t.y=(1-(l.y?t.y/l.y:1))*e[1]}),s}return o.separation=function(t){return arguments.length?(n=t,o):n},o.size=function(t){return arguments.length?(r=null==(e=t),o):r?null:e},o.nodeSize=function(t){return arguments.length?(r=null!=(e=t),o):r?e:null},Da(o,t)},a.layout.treemap=function(){var t,n=a.layout.hierarchy(),e=Math.round,r=[1,1],o=null,i=vi,u=!1,s="squarify",l=.5*(1+Math.sqrt(5));function c(t,n){for(var e,r,o=-1,a=t.length;++o0;)u.push(e=l[o-1]),u.area+=e.area,"squarify"!==s||(r=p(u,m))<=h?(l.pop(),h=r):(u.area-=u.pop().area,d(u,m,a,!1),m=Math.min(a.dx,a.dy),u.length=u.area=0,h=1/0);u.length&&(d(u,m,a,!0),u.length=u.area=0),n.forEach(f)}}function h(t){var n=t.children;if(n&&n.length){var e,r=i(t),o=n.slice(),a=[];for(c(o,r.dx*r.dy/t.value),a.area=0;e=o.pop();)a.push(e),a.area+=e.area,null!=e.z&&(d(a,e.z?r.dx:r.dy,r,!o.length),a.length=a.area=0);n.forEach(h)}}function p(t,n){for(var e,r=t.area,o=0,a=1/0,i=-1,u=t.length;++io&&(o=e));return n*=n,(r*=r)?Math.max(n*o*l/r,r/(n*a*l)):1/0}function d(t,n,r,o){var a,i=-1,u=t.length,s=r.x,l=r.y,c=n?e(t.area/n):0;if(n==r.dx){for((o||c>r.dy)&&(c=r.dy);++ir.dx)&&(c=r.dx);++i1);return t+n*e*Math.sqrt(-2*Math.log(o)/o)}},logNormal:function(){var t=a.random.normal.apply(a,arguments);return function(){return Math.exp(t())}},bates:function(t){var n=a.random.irwinHall(t);return function(){return n()/t}},irwinHall:function(t){return function(){for(var n=0,e=0;e2?Si:Mi,u=o?Ea:Aa;return a=t(n,e,u,r),i=t(e,n,u,oa),s}function s(t){return a(t)}return s.invert=function(t){return i(t)},s.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},s.range=function(t){return arguments.length?(e=t,u()):e},s.rangeRound=function(t){return s.range(t).interpolate(ba)},s.clamp=function(t){return arguments.length?(o=t,u()):o},s.interpolate=function(t){return arguments.length?(r=t,u()):r},s.ticks=function(t){return Pi(n,t)},s.tickFormat=function(t,e){return Ri(n,t,e)},s.nice=function(t){return Ei(n,t),u()},s.copy=function(){return t(n,e,r,o)},u()}([0,1],[0,1],oa,!1)};var Ni={s:1,g:1,p:1,r:1,e:1};function Oi(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}a.scale.log=function(){return function t(n,e,r,o){function i(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function u(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function s(t){return n(i(t))}return s.invert=function(t){return u(n.invert(t))},s.domain=function(t){return arguments.length?(r=t[0]>=0,n.domain((o=t.map(Number)).map(i)),s):o},s.base=function(t){return arguments.length?(e=+t,n.domain(o.map(i)),s):e},s.nice=function(){var t=_i(o.map(i),r?Math:Li);return n.domain(t),o=t.map(u),s},s.ticks=function(){var t=bi(o),n=[],a=t[0],s=t[1],l=Math.floor(i(a)),c=Math.ceil(i(s)),f=e%1?2:e;if(isFinite(c-l)){if(r){for(;l0;h--)n.push(u(l)*h);for(l=0;n[l]s;c--);n=n.slice(l,c)}return n},s.tickFormat=function(t,n){if(!arguments.length)return Ci;arguments.length<2?n=Ci:"function"!=typeof n&&(n=a.format(n));var r=Math.max(1,e*t/s.ticks().length);return function(t){var o=t/u(Math.round(i(t)));return o*e0?r[t-1]:n[0],tf?0:1;if(l=Ot)return s(l,p)+(u?s(u,1-p):"")+"Z";var d,m,g,v,y,b,x,M,_,w,k,S,A=0,E=0,T=[];if((v=(+i.apply(this,arguments)||0)/2)&&(g=r===Bi?Math.sqrt(u*u+l*l):+r.apply(this,arguments),p||(E*=-1),l&&(E=qt(g/l*Math.sin(v))),u&&(A=qt(g/u*Math.sin(v)))),l){y=l*Math.cos(c+E),b=l*Math.sin(c+E),x=l*Math.cos(f-E),M=l*Math.sin(f-E);var P=Math.abs(f-c-2*E)<=Rt?0:1;if(E&&Gi(y,b,x,M)===p^P){var R=(c+f)/2;y=l*Math.cos(R),b=l*Math.sin(R),x=M=null}}else y=b=0;if(u){_=u*Math.cos(f-A),w=u*Math.sin(f-A),k=u*Math.cos(c+A),S=u*Math.sin(c+A);var N=Math.abs(c-f+2*A)<=Rt?0:1;if(A&&Gi(_,w,k,S)===1-p^N){var O=(c+f)/2;_=u*Math.cos(O),w=u*Math.sin(O),k=S=null}}else _=w=0;if(h>Tt&&(d=Math.min(Math.abs(l-u)/2,+e.apply(this,arguments)))>.001){m=u0?0:1}function Wi(t,n,e,r,o){var a=t[0]-n[0],i=t[1]-n[1],u=(o?r:-r)/Math.sqrt(a*a+i*i),s=u*i,l=-u*a,c=t[0]+s,f=t[1]+l,h=n[0]+s,p=n[1]+l,d=(c+h)/2,m=(f+p)/2,g=h-c,v=p-f,y=g*g+v*v,b=e-r,x=c*p-h*f,M=(v<0?-1:1)*Math.sqrt(Math.max(0,b*b*y-x*x)),_=(x*v-g*M)/y,w=(-x*g-v*M)/y,k=(x*v+g*M)/y,S=(-x*g+v*M)/y,A=_-d,E=w-m,T=k-d,P=S-m;return A*A+E*E>T*T+P*P&&(_=k,w=S),[[_-s,w-l],[_*e/b,w*e/b]]}function Zi(t){var n=io,e=uo,r=$e,o=$i,a=o.key,i=.7;function u(a){var u,s=[],l=[],c=-1,f=a.length,h=bn(n),p=bn(e);function d(){s.push("M",o(t(l),i))}for(;++c1&&o.push("H",r[0]),o.join("")},"step-before":Qi,"step-after":tu,basis:ru,"basis-open":function(t){if(t.length<4)return $i(t);for(var n,e=[],r=-1,o=t.length,a=[0],i=[0];++r<3;)n=t[r],a.push(n[0]),i.push(n[1]);for(e.push(ou(uu,a)+","+ou(uu,i)),--r;++r9&&(o=3*n/Math.sqrt(o),i[u]=o*e,i[u+1]=o*r));for(u=-1;++u<=s;)o=(t[Math.min(s,u+1)][0]-t[Math.max(0,u-1)][0])/(6*(1+i[u]*i[u])),a.push([o||0,i[u]*o||0]);return a}(t))}});function $i(t){return t.length>1?t.join("L"):t+"Z"}function Ki(t){return t.join("L")+"Z"}function Qi(t){for(var n=0,e=t.length,r=t[0],o=[r[0],",",r[1]];++n1){u=n[1],a=t[s],s++,r+="C"+(o[0]+i[0])+","+(o[1]+i[1])+","+(a[0]-u[0])+","+(a[1]-u[1])+","+a[0]+","+a[1];for(var l=2;lRt)+",1 "+n}function s(t,n,e,r){return"Q 0,0 "+r}return a.radius=function(t){return arguments.length?(e=bn(t),a):e},a.source=function(n){return arguments.length?(t=bn(n),a):t},a.target=function(t){return arguments.length?(n=bn(t),a):n},a.startAngle=function(t){return arguments.length?(r=bn(t),a):r},a.endAngle=function(t){return arguments.length?(o=bn(t),a):o},a},a.svg.diagonal=function(){var t=Hr,n=Gr,e=pu;function r(r,o){var a=t.call(this,r,o),i=n.call(this,r,o),u=(a.y+i.y)/2,s=[a,{x:a.x,y:u},{x:i.x,y:u},i];return"M"+(s=s.map(e))[0]+"C"+s[1]+" "+s[2]+" "+s[3]}return r.source=function(n){return arguments.length?(t=bn(n),r):t},r.target=function(t){return arguments.length?(n=bn(t),r):n},r.projection=function(t){return arguments.length?(e=t,r):e},r},a.svg.diagonal.radial=function(){var t=a.svg.diagonal(),n=pu,e=t.projection;return t.projection=function(t){return arguments.length?e(du(n=t)):n},t},a.svg.symbol=function(){var t=gu,n=mu;function e(e,r){return(yu.get(t.call(this,e,r))||vu)(n.call(this,e,r))}return e.type=function(n){return arguments.length?(t=bn(n),e):t},e.size=function(t){return arguments.length?(n=bn(t),e):n},e};var yu=a.map({circle:vu,cross:function(t){var n=Math.sqrt(t/5)/2;return"M"+-3*n+","+-n+"H"+-n+"V"+-3*n+"H"+n+"V"+-n+"H"+3*n+"V"+n+"H"+n+"V"+3*n+"H"+-n+"V"+n+"H"+-3*n+"Z"},diamond:function(t){var n=Math.sqrt(t/(2*xu)),e=n*xu;return"M0,"+-n+"L"+e+",0 0,"+n+" "+-e+",0Z"},square:function(t){var n=Math.sqrt(t)/2;return"M"+-n+","+-n+"L"+n+","+-n+" "+n+","+n+" "+-n+","+n+"Z"},"triangle-down":function(t){var n=Math.sqrt(t/bu),e=n*bu/2;return"M0,"+e+"L"+n+","+-e+" "+-n+","+-e+"Z"},"triangle-up":function(t){var n=Math.sqrt(t/bu),e=n*bu/2;return"M0,"+-e+"L"+n+","+e+" "+-n+","+e+"Z"}});a.svg.symbolTypes=yu.keys();var bu=Math.sqrt(3),xu=Math.tan(30*Lt);J.transition=function(t){for(var n,e,r=ku||++Eu,o=Ru(t),a=[],i=Su||{time:Date.now(),ease:da,delay:0,duration:250},u=-1,s=this.length;++u0;)l[--h].call(t,i);if(a>=1)return f.event&&f.event.end.call(t,t.__data__,n),--c.count?delete c[r]:delete t[e],1}f||(a=o.time,i=En((function(t){var n=f.delay;if(i.t=n+a,n<=t)return h(t-n);i.c=h}),0,a),f=c[r]={tween:new S,time:a,timer:i,delay:o.delay,duration:o.duration,ease:o.ease,index:n},o=null,++c.count)}Au.call=J.call,Au.empty=J.empty,Au.node=J.node,Au.size=J.size,a.transition=function(t,n){return t&&t.transition?ku?t.transition(n):t:a.selection().transition(t)},a.transition.prototype=Au,Au.select=function(t){var n,e,r,o=this.id,a=this.namespace,i=[];t=$(t);for(var u=-1,s=this.length;++urect,.s>rect").attr("width",i[1]-i[0])}function m(t){t.select(".extent").attr("y",u[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",u[1]-u[0])}function g(){var f,g,v=this,y=a.select(a.event.target),b=e.of(v,arguments),x=a.select(v),M=y.datum(),_=!/^(n|s)$/.test(M)&&r,w=!/^(e|w)$/.test(M)&&o,k=y.classed("extent"),S=kt(v),A=a.mouse(v),E=a.select(c(v)).on("keydown.brush",R).on("keyup.brush",N);if(a.event.changedTouches?E.on("touchmove.brush",O).on("touchend.brush",L):E.on("mousemove.brush",O).on("mouseup.brush",L),x.interrupt().selectAll("*").interrupt(),k)A[0]=i[0]-A[0],A[1]=u[0]-A[1];else if(M){var T=+/w$/.test(M),P=+/^n/.test(M);g=[i[1-T]-A[0],u[1-P]-A[1]],A[0]=i[T],A[1]=u[P]}else a.event.altKey&&(f=A.slice());function R(){32==a.event.keyCode&&(k||(f=null,A[0]-=i[1],A[1]-=u[1],k=2),B())}function N(){32==a.event.keyCode&&2==k&&(A[0]+=i[1],A[1]+=u[1],k=0,B())}function O(){var t=a.mouse(v),n=!1;g&&(t[0]+=g[0],t[1]+=g[1]),k||(a.event.altKey?(f||(f=[(i[0]+i[1])/2,(u[0]+u[1])/2]),A[0]=i[+(t[0]1?{floor:function(n){for(;u(n=t.floor(n));)n=Xu(n-1);return n},ceil:function(n){for(;u(n=t.ceil(n));)n=Xu(+n+1);return n}}:t))},r.ticks=function(t,n){var e=bi(r.domain()),a=null==t?o(e,10):"number"==typeof t?o(e,t):!t.range&&[{range:t},n];return a&&(t=a[0],n=a[1]),t.range(e[0],Xu(+e[1]+1),n<1?1:n)},r.tickFormat=function(){return e},r.copy=function(){return Iu(t.copy(),n,e)},Ai(r,t)}function Xu(t){return new Date(t)}zu.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Bu:Fu,Bu.parse=function(t){var n=new Date(t);return isNaN(n)?null:n},Bu.toString=Fu.toString,Dn.second=Bn((function(t){return new zn(1e3*Math.floor(t/1e3))}),(function(t,n){t.setTime(t.getTime()+1e3*Math.floor(n))}),(function(t){return t.getSeconds()})),Dn.seconds=Dn.second.range,Dn.seconds.utc=Dn.second.utc.range,Dn.minute=Bn((function(t){return new zn(6e4*Math.floor(t/6e4))}),(function(t,n){t.setTime(t.getTime()+6e4*Math.floor(n))}),(function(t){return t.getMinutes()})),Dn.minutes=Dn.minute.range,Dn.minutes.utc=Dn.minute.utc.range,Dn.hour=Bn((function(t){var n=t.getTimezoneOffset()/60;return new zn(36e5*(Math.floor(t/36e5-n)+n))}),(function(t,n){t.setTime(t.getTime()+36e5*Math.floor(n))}),(function(t){return t.getHours()})),Dn.hours=Dn.hour.range,Dn.hours.utc=Dn.hour.utc.range,Dn.month=Bn((function(t){return(t=Dn.day(t)).setDate(1),t}),(function(t,n){t.setMonth(t.getMonth()+n)}),(function(t){return t.getMonth()})),Dn.months=Dn.month.range,Dn.months.utc=Dn.month.utc.range;var Yu=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Vu=[[Dn.second,1],[Dn.second,5],[Dn.second,15],[Dn.second,30],[Dn.minute,1],[Dn.minute,5],[Dn.minute,15],[Dn.minute,30],[Dn.hour,1],[Dn.hour,3],[Dn.hour,6],[Dn.hour,12],[Dn.day,1],[Dn.day,2],[Dn.week,1],[Dn.month,1],[Dn.month,3],[Dn.year,1]],Hu=zu.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",$e]]),Gu={range:function(t,n,e){return a.range(Math.ceil(t/e)*e,+n,e).map(Xu)},floor:L,ceil:L};Vu.year=Dn.year,Dn.scale=function(){return Iu(a.scale.linear(),Vu,Hu)};var Wu=Vu.map((function(t){return[t[0].utc,t[1]]})),Zu=qu.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",$e]]);function Ju(t){return JSON.parse(t.responseText)}function $u(t){var n=s.createRange();return n.selectNode(s.body),n.createContextualFragment(t.responseText)}Wu.year=Dn.year.utc,Dn.scale.utc=function(){return Iu(a.scale.linear(),Wu,Zu)},a.text=xn((function(t){return t.responseText})),a.json=function(t,n){return Mn(t,"application/json",Ju,n)},a.html=function(t,n){return Mn(t,"text/html",$u,n)},a.xml=xn((function(t){return t.responseXML})),this.d3=a,void 0===(o="function"==typeof(r=a)?r.call(n,e,n,t):r)||(t.exports=o)}()}])},t.exports=o()},function(t,n,e){"use strict";var r=e(30);function o(){}t.exports=function(){function t(t,n,e,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function n(){return t}t.isRequired=t;var e={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:n,element:t,instanceOf:n,node:t,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n};return e.checkPropTypes=o,e.PropTypes=e,e}},function(t,n,e){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,n,e){"use strict";var r=e(7),o=e(32),a=e(33),i=e(6),u=e(8),s=e(27),l=e(34);function c(t,n){return n=n.split("// __split__"),new o.Program(t,n[0],n[1])}t.exports=function(t,n,e){var f,h,p,d,m,g,v,y,b,x,M,_,w,k,S,A,E,T,P,R,N,O,C,L,U,j,D,z=this,q=null,F=null,B=null,I=null,X=null,Y=null,V=0,H=!1,G=!1;function W(t){p.viewport(0,0,e,e);var o=u.clone(t);o.zoom=1/f,o.translation.x=0,o.translation.y=0;for(var a=r.mat4.create(),i=0;i<3;i++){var s=r.vec3.random(r.vec3.create(),1);r.mat4.rotate(a,a,10*Math.random(),s)}o.rotation=r.mat4.multiply(r.mat4.create(),a,o.rotation),E.bind(),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT);var l=u.getRect(o),c=r.mat4.create();r.mat4.ortho(c,l.left,l.right,l.bottom,l.top,0,f);var h=r.mat4.create();r.mat4.lookAt(h,[0,0,0],[0,0,-1],[0,1,0]);var d=r.mat4.create();r.mat4.translate(d,d,[0,0,-f/2]),r.mat4.multiply(d,d,o.rotation),N.setUniform("uProjection","Matrix4fv",!1,c),N.setUniform("uView","Matrix4fv",!1,h),N.setUniform("uModel","Matrix4fv",!1,d),N.setUniform("uBottomLeft","2fv",[l.left,l.bottom]),N.setUniform("uTopRight","2fv",[l.right,l.top]),N.setUniform("uAtomScale","1f",2.5*o.atomScale),N.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),N.setUniform("uRes","1f",e),N.setUniform("uDepth","1f",f),N.setUniform("uMode","1i",0),N.setUniform("uAtomShade","1f",t.atomShade),q.render(),t.bonds&&null!=F&&(O.setUniform("uProjection","Matrix4fv",!1,c),O.setUniform("uView","Matrix4fv",!1,h),O.setUniform("uModel","Matrix4fv",!1,d),O.setUniform("uRotation","Matrix4fv",!1,o.rotation),O.setUniform("uDepth","1f",f),O.setUniform("uBottomLeft","2fv",[l.left,l.bottom]),O.setUniform("uTopRight","2fv",[l.right,l.top]),O.setUniform("uRes","1f",e),O.setUniform("uBondRadius","1f",2.5*u.getBondRadius(t)),O.setUniform("uBondShade","1f",t.bondShade),O.setUniform("uAtomScale","1f",2.5*t.atomScale),O.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),O.setUniform("uMode","1i",0),F.render()),p.viewport(0,0,n,n);var y=u.getRect(t),x=u.getRect(o),M=r.mat4.invert(r.mat4.create(),a);T.bind(),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT),C.setUniform("uSceneDepth","1i",g.index),C.setUniform("uSceneNormal","1i",m.index),C.setUniform("uRandRotDepth","1i",v.index),C.setUniform("uAccumulator","1i",b.index),C.setUniform("uSceneBottomLeft","2fv",[y.left,y.bottom]),C.setUniform("uSceneTopRight","2fv",[y.right,y.top]),C.setUniform("uRotBottomLeft","2fv",[x.left,x.bottom]),C.setUniform("uRotTopRight","2fv",[x.right,x.top]),C.setUniform("uRes","1f",n),C.setUniform("uDepth","1f",f),C.setUniform("uRot","Matrix4fv",!1,a),C.setUniform("uInvRot","Matrix4fv",!1,M),C.setUniform("uSampleCount","1i",V),B.render(),b.activate(),b.bind(),p.copyTexImage2D(p.TEXTURE_2D,0,p.RGBA,0,0,n,n,0)}z.getAOProgress=function(){return V/1024},z.initialize=function(){t.width=t.height=n,(p=t.getContext("webgl")).enable(p.DEPTH_TEST),p.enable(p.CULL_FACE),p.clearColor(0,0,0,0),p.clearDepth(1),p.viewport(0,0,n,n),window.gl=p,o.getExtensions(p,["EXT_frag_depth","WEBGL_depth_texture"]),z.createTextures(),N=c(p,l.shaders.atom),O=c(p,l.shaders.bond),D=c(p,l.shaders["textured-quad"]),C=c(p,l.shaders.accumulator),L=c(p,l.shaders.ao),U=c(p,l.shaders.fxaa),j=c(p,l.shaders.dof);var e=[-1,-1,0,1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,1,0],r=o.buildAttribs(p,{aPosition:3});r.aPosition.buffer.set(new Float32Array(e));var a=e.length/9;new o.Renderable(p,D,r,a),B=new o.Renderable(p,C,r,a),I=new o.Renderable(p,L,r,a),Y=new o.Renderable(p,U,r,a),X=new o.Renderable(p,j,r,a),0},z.createTextures=function(){y=new o.Texture(p,0,null,e,e),v=new o.Texture(p,1,null,e,e,{internalFormat:p.DEPTH_COMPONENT,format:p.DEPTH_COMPONENT,type:p.UNSIGNED_SHORT}),E=new o.Framebuffer(p,[y],v),d=new o.Texture(p,2,null,n,n),m=new o.Texture(p,3,null,n,n),g=new o.Texture(p,4,null,n,n,{internalFormat:p.DEPTH_COMPONENT,format:p.DEPTH_COMPONENT,type:p.UNSIGNED_SHORT}),S=new o.Framebuffer(p,[d],g),A=new o.Framebuffer(p,[m],g),b=new o.Texture(p,5,null,n,n),x=new o.Texture(p,6,null,n,n),T=new o.Framebuffer(p,[x]),k=new o.Texture(p,7,null,n,n),R=new o.Framebuffer(p,[k]),M=new o.Texture(p,8,null,n,n),_=new o.Texture(p,9,null,n,n),P=new o.Framebuffer(p,[_]),w=new o.Texture(p,10,null,n,n),new o.Framebuffer(p,[w])},z.setResolution=function(r,o){e=o,n=r,t.width=t.height=n,p.viewport(0,0,n,n),z.createTextures()},z.setSystem=function(t,n){function e(t){for(var n=[],e=0;e<36;e++)n.push.apply(n,t);return n}h=t;for(var r=o.buildAttribs(p,{aImposter:3,aPosition:3,aRadius:1,aColor:3}),u=[],s=[],l=[],c=[],f=0;f0)){r=o.buildAttribs(p,{aImposter:3,aPosA:3,aPosB:3,aRadA:1,aRadB:1,aColA:3,aColB:3}),u=[];var v=[],y=[],b=[],x=[],M=[],_=[];for(f=0;fn.bondThreshold)break;u.push.apply(u,a.position),v.push.apply(v,e([w.posA.x,w.posA.y,w.posA.z])),y.push.apply(y,e([w.posB.x,w.posB.y,w.posB.z])),b.push.apply(b,e([w.radA])),x.push.apply(x,e([w.radB])),M.push.apply(M,e([w.colA.r,w.colA.g,w.colA.b])),_.push.apply(_,e([w.colB.r,w.colB.g,w.colB.b]))}r.aImposter.buffer.set(new Float32Array(u)),r.aPosA.buffer.set(new Float32Array(v)),r.aPosB.buffer.set(new Float32Array(y)),r.aRadA.buffer.set(new Float32Array(b)),r.aRadB.buffer.set(new Float32Array(x)),r.aColA.buffer.set(new Float32Array(M)),r.aColB.buffer.set(new Float32Array(_));g=u.length/9;F=new o.Renderable(p,O,r,g)}},z.reset=function(){V=0,H=!1,G=!1,b.reset(),x.reset()},z.render=function(t){if(void 0!==h&&null!=q){if(f=2*s.getRadius(h),H)if(G)for(var e=0;e1024);e++)W(t),V++;else!function(t){G=!0,p.viewport(0,0,n,n),A.bind(),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT);var e=u.getRect(t),o=r.mat4.create();r.mat4.ortho(o,e.left,e.right,e.bottom,e.top,0,f);var a=r.mat4.create();r.mat4.lookAt(a,[0,0,0],[0,0,-1],[0,1,0]);var i=r.mat4.create();r.mat4.translate(i,i,[0,0,-f/2]),r.mat4.multiply(i,i,t.rotation),N.setUniform("uProjection","Matrix4fv",!1,o),N.setUniform("uView","Matrix4fv",!1,a),N.setUniform("uModel","Matrix4fv",!1,i),N.setUniform("uBottomLeft","2fv",[e.left,e.bottom]),N.setUniform("uTopRight","2fv",[e.right,e.top]),N.setUniform("uAtomScale","1f",2.5*t.atomScale),N.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),N.setUniform("uRes","1f",n),N.setUniform("uDepth","1f",f),N.setUniform("uMode","1i",1),N.setUniform("uAtomShade","1f",t.atomShade),q.render(),t.bonds&&null!=F&&(A.bind(),O.setUniform("uProjection","Matrix4fv",!1,o),O.setUniform("uView","Matrix4fv",!1,a),O.setUniform("uModel","Matrix4fv",!1,i),O.setUniform("uRotation","Matrix4fv",!1,t.rotation),O.setUniform("uDepth","1f",f),O.setUniform("uBottomLeft","2fv",[e.left,e.bottom]),O.setUniform("uTopRight","2fv",[e.right,e.top]),O.setUniform("uRes","1f",n),O.setUniform("uBondRadius","1f",2.5*u.getBondRadius(t)),O.setUniform("uBondShade","1f",t.bondShade),O.setUniform("uAtomScale","1f",2.5*t.atomScale),O.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),O.setUniform("uMode","1i",1),F.render())}(t);else!function(t){H=!0,p.viewport(0,0,n,n),S.bind(),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT);var e=u.getRect(t),o=r.mat4.create();r.mat4.ortho(o,e.left,e.right,e.bottom,e.top,0,f);var a=r.mat4.create();r.mat4.lookAt(a,[0,0,0],[0,0,-1],[0,1,0]);var i=r.mat4.create();r.mat4.translate(i,i,[0,0,-f/2]),r.mat4.multiply(i,i,t.rotation),N.setUniform("uProjection","Matrix4fv",!1,o),N.setUniform("uView","Matrix4fv",!1,a),N.setUniform("uModel","Matrix4fv",!1,i),N.setUniform("uBottomLeft","2fv",[e.left,e.bottom]),N.setUniform("uTopRight","2fv",[e.right,e.top]),N.setUniform("uAtomScale","1f",2.5*t.atomScale),N.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),N.setUniform("uRes","1f",n),N.setUniform("uDepth","1f",f),N.setUniform("uMode","1i",0),N.setUniform("uAtomShade","1f",t.atomShade),q.render(),t.bonds&&null!=F&&(S.bind(),O.setUniform("uProjection","Matrix4fv",!1,o),O.setUniform("uView","Matrix4fv",!1,a),O.setUniform("uModel","Matrix4fv",!1,i),O.setUniform("uRotation","Matrix4fv",!1,t.rotation),O.setUniform("uDepth","1f",f),O.setUniform("uBottomLeft","2fv",[e.left,e.bottom]),O.setUniform("uTopRight","2fv",[e.right,e.top]),O.setUniform("uRes","1f",n),O.setUniform("uBondRadius","1f",2.5*u.getBondRadius(t)),O.setUniform("uBondShade","1f",t.bondShade),O.setUniform("uAtomScale","1f",2.5*t.atomScale),O.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),O.setUniform("uMode","1i",0),F.render())}(t);!function(t){p.viewport(0,0,n,n),t.fxaa>0||t.dofStrength>0?R.bind():p.bindFramebuffer(p.FRAMEBUFFER,null);if(p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT),L.setUniform("uSceneColor","1i",d.index),L.setUniform("uSceneDepth","1i",g.index),L.setUniform("uAccumulatorOut","1i",x.index),L.setUniform("uRes","1f",n),L.setUniform("uAO","1f",2*t.ao),L.setUniform("uBrightness","1f",2*t.brightness),L.setUniform("uOutlineStrength","1f",t.outline),I.render(),t.fxaa>0){t.dofStrength>0?P.bind():p.bindFramebuffer(p.FRAMEBUFFER,null);for(var e=0;e0&&(p.bindFramebuffer(p.FRAMEBUFFER,null),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT),t.fxaa>0?j.setUniform("uColor","1i",M.index):j.setUniform("uColor","1i",k.index),j.setUniform("uDepth","1i",g.index),j.setUniform("uDOFPosition","1f",t.dofPosition),j.setUniform("uDOFStrength","1f",t.dofStrength),j.setUniform("uRes","1f",n),X.render())}(t)}},z.initialize()}},function(t,n){function e(t){var n=this;n.initialize=function(){n.buffer=t.createBuffer()},n.bind=function(){t.bindBuffer(t.ARRAY_BUFFER,n.buffer)},n.set=function(e){n.bind(),t.bufferData(t.ARRAY_BUFFER,e,t.STATIC_DRAW)},n.initialize()}t.exports.buildAttribs=function(t,n){var r={};for(var o in n)r[o]={buffer:new e(t),size:n[o]};return r},t.exports.getExtensions=function(t,n){for(var e={},r=0;r1){for(var a=[],i=0;i 0.0) {\n float depth = texture2D(uSceneDepth, p).r;\n float r = 1.0/511.0;\n float d0 = abs(texture2D(uSceneDepth, p + vec2(-r, 0)).r - depth);\n float d1 = abs(texture2D(uSceneDepth, p + vec2( r, 0)).r - depth);\n float d2 = abs(texture2D(uSceneDepth, p + vec2( 0, -r)).r - depth);\n float d3 = abs(texture2D(uSceneDepth, p + vec2( 0, r)).r - depth);\n float d = max(d0, d1);\n d = max(d, d2);\n d = max(d, d3);\n sceneColor.rgb *= pow(1.0 - d, uOutlineStrength * 32.0);\n sceneColor.a = max(step(0.003, d), sceneColor.a);\n }\n vec4 dAccum = texture2D(uAccumulatorOut, p);\n float shade = max(0.0, 1.0 - (dAccum.r + dAccum.g + dAccum.b + dAccum.a) * 0.25 * uAO);\n shade = pow(shade, 2.0);\n gl_FragColor = vec4(uBrightness * sceneColor.rgb * shade, sceneColor.a);\n}\n",atom:"#version 100\nprecision highp float;\n\nattribute vec3 aImposter;\nattribute vec3 aPosition;\nattribute float aRadius;\nattribute vec3 aColor;\n\nuniform mat4 uView;\nuniform mat4 uProjection;\nuniform mat4 uModel;\nuniform float uAtomScale;\nuniform float uRelativeAtomScale;\nuniform float uAtomShade;\n\nvarying vec3 vColor;\nvarying vec3 vPosition;\nvarying float vRadius;\n\nvoid main() {\n vRadius = uAtomScale * (1.0 + (aRadius - 1.0) * uRelativeAtomScale);\n gl_Position = uProjection * uView * uModel * vec4(vRadius * aImposter + aPosition, 1.0);\n vColor = mix(aColor, vec3(1,1,1), uAtomShade);\n vPosition = vec3(uModel * vec4(aPosition, 1));\n}\n\n\n// __split__\n\n\n#version 100\n#extension GL_EXT_frag_depth: enable\nprecision highp float;\n\nuniform vec2 uBottomLeft;\nuniform vec2 uTopRight;\nuniform float uRes;\nuniform float uDepth;\nuniform int uMode;\n\nvarying vec3 vPosition;\nvarying float vRadius;\nvarying vec3 vColor;\n\nvec2 res = vec2(uRes, uRes);\n\nfloat raySphereIntersect(vec3 r0, vec3 rd) {\n float a = dot(rd, rd);\n vec3 s0_r0 = r0 - vPosition;\n float b = 2.0 * dot(rd, s0_r0);\n float c = dot(s0_r0, s0_r0) - (vRadius * vRadius);\n float disc = b*b - 4.0*a*c;\n if (disc <= 0.0) {\n return -1.0;\n }\n return (-b - sqrt(disc))/(2.0*a);\n}\n\nvoid main() {\n vec3 r0 = vec3(uBottomLeft + (gl_FragCoord.xy/res) * (uTopRight - uBottomLeft), 0.0);\n vec3 rd = vec3(0, 0, -1);\n float t = raySphereIntersect(r0, rd);\n if (t < 0.0) {\n discard;\n }\n vec3 coord = r0 + rd * t;\n vec3 normal = normalize(coord - vPosition);\n if (uMode == 0) {\n gl_FragColor = vec4(vColor, 1);\n } else if (uMode == 1) {\n gl_FragColor = vec4(normal * 0.5 + 0.5, 1.0);\n }\n gl_FragDepthEXT = -coord.z/uDepth;\n}\n",blur:"#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uTexture;\nuniform float uRes;\nuniform int leftRight;\n\nvoid main() {\n vec2 dir;\n if (leftRight == 1) {\n dir = vec2(1,0)/uRes;\n } else {\n dir = vec2(0,1)/uRes;\n }\n const int range = 16;\n vec4 sample = vec4(0,0,0,0);\n for (int i = -range; i <= range; i++) {\n vec2 p = gl_FragCoord.xy/uRes + dir * float(i);\n sample += texture2D(uTexture, p);\n }\n sample /= float(range) * 2.0 + 1.0;\n gl_FragColor = sample;\n}\n",bond:"#version 100\nprecision highp float;\n\nattribute vec3 aImposter;\nattribute vec3 aPosA;\nattribute vec3 aPosB;\nattribute float aRadA;\nattribute float aRadB;\nattribute vec3 aColA;\nattribute vec3 aColB;\n\nuniform mat4 uView;\nuniform mat4 uProjection;\nuniform mat4 uModel;\nuniform mat4 uRotation;\nuniform float uBondRadius;\nuniform float uAtomScale;\nuniform float uRelativeAtomScale;\n\nvarying vec3 vNormal;\nvarying vec3 vPosA, vPosB;\nvarying float vRadA, vRadB;\nvarying vec3 vColA, vColB;\nvarying float vRadius;\n\nmat3 alignVector(vec3 a, vec3 b) {\n vec3 v = cross(a, b);\n float s = length(v);\n float c = dot(a, b);\n mat3 I = mat3(\n 1, 0, 0,\n 0, 1, 0,\n 0, 0, 1\n );\n mat3 vx = mat3(\n 0, v.z, -v.y,\n -v.z, 0, v.x,\n v.y, -v.x, 0\n );\n return I + vx + vx * vx * ((1.0 - c) / (s * s));\n}\n\nvoid main() {\n vRadius = uBondRadius;\n vec3 pos = vec3(aImposter);\n // Scale the box in x and z to be bond-radius.\n pos = pos * vec3(vRadius, 1, vRadius);\n // Shift the origin-centered cube so that the bottom is at the origin.\n pos = pos + vec3(0, 1, 0);\n // Stretch the box in y so that it is the length of the bond.\n pos = pos * vec3(1, length(aPosA - aPosB) * 0.5, 1);\n // Find the rotation that aligns vec3(0, 1, 0) with vec3(uPosB - uPosA) and apply it.\n vec3 a = normalize(vec3(-0.000001, 1.000001, 0.000001));\n vec3 b = normalize(aPosB - aPosA);\n mat3 R = alignVector(a, b);\n pos = R * pos;\n // Shift the cube so that the bottom is centered at the middle of atom A.\n pos = pos + aPosA;\n\n vec4 position = uModel * vec4(pos, 1);\n gl_Position = uProjection * uView * position;\n vPosA = aPosA;\n vPosB = aPosB;\n vRadA = uAtomScale * (1.0 + (aRadA - 1.0) * uRelativeAtomScale);\n vRadB = uAtomScale * (1.0 + (aRadB - 1.0) * uRelativeAtomScale);\n vColA = aColA;\n vColB = aColB;\n}\n\n\n// __split__\n\n\n#version 100\n#extension GL_EXT_frag_depth: enable\nprecision highp float;\n\nuniform mat4 uRotation;\nuniform vec2 uBottomLeft;\nuniform vec2 uTopRight;\nuniform float uDepth;\nuniform float uRes;\nuniform float uBondShade;\nuniform int uMode;\n\nvarying vec3 vPosA, vPosB;\nvarying float vRadA, vRadB;\nvarying vec3 vColA, vColB;\nvarying float vRadius;\n\nmat3 alignVector(vec3 a, vec3 b) {\n vec3 v = cross(a, b);\n float s = length(v);\n float c = dot(a, b);\n mat3 I = mat3(\n 1, 0, 0,\n 0, 1, 0,\n 0, 0, 1\n );\n mat3 vx = mat3(\n 0, v.z, -v.y,\n -v.z, 0, v.x,\n v.y, -v.x, 0\n );\n return I + vx + vx * vx * ((1.0 - c) / (s * s));\n}\n\nvoid main() {\n\n vec2 res = vec2(uRes, uRes);\n vec3 r0 = vec3(uBottomLeft + (gl_FragCoord.xy/res) * (uTopRight - uBottomLeft), uDepth/2.0);\n vec3 rd = vec3(0, 0, -1);\n\n vec3 i = normalize(vPosB - vPosA);\n i = vec3(uRotation * vec4(i, 0));\n vec3 j = normalize(vec3(-0.000001, 1.000001, 0.000001));\n mat3 R = alignVector(i, j);\n\n vec3 r0p = r0 - vec3(uRotation * vec4(vPosA, 0));\n r0p = R * r0p;\n vec3 rdp = R * rd;\n\n float a = dot(rdp.xz, rdp.xz);\n float b = 2.0 * dot(rdp.xz, r0p.xz);\n float c = dot(r0p.xz, r0p.xz) - vRadius*vRadius;\n float disc = b*b - 4.0*a*c;\n if (disc <= 0.0) {\n discard;\n }\n float t = (-b - sqrt(disc))/(2.0*a);\n if (t < 0.0) {\n discard;\n }\n\n vec3 coord = r0p + rdp * t;\n if (coord.y < 0.0 || coord.y > length(vPosA - vPosB)) {\n discard;\n }\n\n vec3 color;\n if (coord.y < vRadA + 0.5 * (length(vPosA - vPosB) - (vRadA + vRadB))) {\n color = vColA;\n } else {\n color = vColB;\n }\n\n color = mix(color, vec3(1,1,1), uBondShade);\n\n R = alignVector(j, i);\n vec3 normal = normalize(R * vec3(coord.x, 0, coord.z));\n\n coord = r0 + rd * t;\n if (uMode == 0) {\n gl_FragColor = vec4(color, 1);\n } else if (uMode == 1) {\n gl_FragColor = vec4(normal * 0.5 + 0.5, 1.0);\n }\n gl_FragDepthEXT = -(coord.z - uDepth/2.0)/uDepth;\n}\n",dof:"#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uColor;\nuniform sampler2D uDepth;\nuniform float uRes;\nuniform float uDOFPosition;\nuniform float uDOFStrength;\nuniform int leftRight;\n\nvoid main() {\n\n vec2 samples[64];\n samples[0] = vec2(0.857612, 0.019885);\n samples[1] = vec2(0.563809, -0.028071);\n samples[2] = vec2(0.825599, -0.346856);\n samples[3] = vec2(0.126584, -0.380959);\n samples[4] = vec2(0.782948, 0.594322);\n samples[5] = vec2(0.292148, -0.543265);\n samples[6] = vec2(0.130700, 0.330220);\n samples[7] = vec2(0.236088, 0.159604);\n samples[8] = vec2(-0.305259, 0.810505);\n samples[9] = vec2(0.269616, 0.923026);\n samples[10] = vec2(0.484486, 0.371845);\n samples[11] = vec2(-0.638057, 0.080447);\n samples[12] = vec2(0.199629, 0.667280);\n samples[13] = vec2(-0.861043, -0.370583);\n samples[14] = vec2(-0.040652, -0.996174);\n samples[15] = vec2(0.330458, -0.282111);\n samples[16] = vec2(0.647795, -0.214354);\n samples[17] = vec2(0.030422, -0.189908);\n samples[18] = vec2(0.177430, -0.721124);\n samples[19] = vec2(-0.461163, -0.327434);\n samples[20] = vec2(-0.410012, -0.734504);\n samples[21] = vec2(-0.616334, -0.626069);\n samples[22] = vec2(0.590759, -0.726479);\n samples[23] = vec2(-0.590794, 0.805365);\n samples[24] = vec2(-0.924561, -0.163739);\n samples[25] = vec2(-0.323028, 0.526960);\n samples[26] = vec2(0.642128, 0.752577);\n samples[27] = vec2(0.173625, -0.952386);\n samples[28] = vec2(0.759014, 0.330311);\n samples[29] = vec2(-0.360526, -0.032013);\n samples[30] = vec2(-0.035320, 0.968156);\n samples[31] = vec2(0.585478, -0.431068);\n samples[32] = vec2(-0.244766, -0.906947);\n samples[33] = vec2(-0.853096, 0.184615);\n samples[34] = vec2(-0.089061, 0.104648);\n samples[35] = vec2(-0.437613, 0.285308);\n samples[36] = vec2(-0.654098, 0.379841);\n samples[37] = vec2(-0.128663, 0.456572);\n samples[38] = vec2(0.015980, -0.568170);\n samples[39] = vec2(-0.043966, -0.771940);\n samples[40] = vec2(0.346512, -0.071238);\n samples[41] = vec2(-0.207921, -0.209121);\n samples[42] = vec2(-0.624075, -0.189224);\n samples[43] = vec2(-0.120618, 0.689339);\n samples[44] = vec2(-0.664679, -0.410200);\n samples[45] = vec2(0.371945, -0.880573);\n samples[46] = vec2(-0.743251, 0.629998);\n samples[47] = vec2(-0.191926, -0.413946);\n samples[48] = vec2(0.449574, 0.833373);\n samples[49] = vec2(0.299587, 0.449113);\n samples[50] = vec2(-0.900432, 0.399319);\n samples[51] = vec2(0.762613, -0.544796);\n samples[52] = vec2(0.606462, 0.174233);\n samples[53] = vec2(0.962185, -0.167019);\n samples[54] = vec2(0.960990, 0.249552);\n samples[55] = vec2(0.570397, 0.559146);\n samples[56] = vec2(-0.537514, 0.555019);\n samples[57] = vec2(0.108491, -0.003232);\n samples[58] = vec2(-0.237693, -0.615428);\n samples[59] = vec2(-0.217313, 0.261084);\n samples[60] = vec2(-0.998966, 0.025692);\n samples[61] = vec2(-0.418554, -0.527508);\n samples[62] = vec2(-0.822629, -0.567797);\n samples[63] = vec2(0.061945, 0.522105);\n\n float invRes = 1.0/uRes;\n vec2 coord = gl_FragCoord.xy * invRes;\n\n float strength = uDOFStrength * uRes/768.0;\n\n float depth = texture2D(uDepth, coord).r;\n float range = uDOFPosition - depth;\n float scale = abs(range);\n\n vec4 sample = texture2D(uColor, coord);\n float count = 1.0;\n for(int i = 0; i < 64; i++) {\n vec2 p = samples[i];\n p = coord + scale * 64.0 * strength * p * invRes;\n float d = texture2D(uDepth, p).r;\n float r = uDOFPosition - d;\n float s = abs(r);\n sample += texture2D(uColor, p) * s;\n count += s;\n }\n\n gl_FragColor = sample/count;\n}",fxaa:"#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uTexture;\nuniform float uRes;\n\nvoid main() {\n float FXAA_SPAN_MAX = 8.0;\n float FXAA_REDUCE_MUL = 1.0/8.0;\n float FXAA_REDUCE_MIN = 1.0/128.0;\n\n vec2 texCoords = gl_FragCoord.xy/uRes;\n\n vec4 rgbNW = texture2D(uTexture, texCoords + (vec2(-1.0, -1.0) / uRes));\n vec4 rgbNE = texture2D(uTexture, texCoords + (vec2(1.0, -1.0) / uRes));\n vec4 rgbSW = texture2D(uTexture, texCoords + (vec2(-1.0, 1.0) / uRes));\n vec4 rgbSE = texture2D(uTexture, texCoords + (vec2(1.0, 1.0) / uRes));\n vec4 rgbM = texture2D(uTexture, texCoords);\n\n vec4 luma = vec4(0.299, 0.587, 0.114, 1.0);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) * (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n float rcpDirMin = 1.0/(min(abs(dir.x), abs(dir.y)) + dirReduce);\n\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX), max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX), dir * rcpDirMin)) / uRes;\n\n vec4 rgbA = (1.0/2.0) * \n (texture2D(uTexture, texCoords.xy + dir * (1.0/3.0 - 0.5)) + \n texture2D(uTexture, texCoords.xy + dir * (2.0/3.0 - 0.5)));\n vec4 rgbB = rgbA * (1.0/2.0) + (1.0/4.0) * \n (texture2D(uTexture, texCoords.xy + dir * (0.0/3.0 - 0.5)) +\n texture2D(uTexture, texCoords.xy + dir * (3.0/3.0 - 0.5)));\n float lumaB = dot(rgbB, luma);\n\n if((lumaB < lumaMin) || (lumaB > lumaMax)){\n gl_FragColor = rgbA;\n } else {\n gl_FragColor = rgbB;\n }\n\n}","textured-quad":"#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uTexture;\nuniform float uRes;\n\nvoid main() {\n gl_FragColor = texture2D(uTexture, gl_FragCoord.xy/uRes);\n}\n"};t.exports={shaders:r}},function(t,n,e){"use strict";function r(t){return(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)}var o=e(8);t.exports=function(t){if(arguments.length>1)throw"Error: The Speck Interactions module has changed!";if(0===arguments.length||"object"!==r(t))throw"Error: Arguments not provided to interactions";var n=void 0===t.scrollZoom||t.scrollZoom,e=t.container,a=t.getRotation,i=t.setRotation,u=t.getTranslation,s=t.setTranslation,l=t.getZoom,c=t.setZoom,f=t.refreshView,h={buttonDown:!1,shiftDown:!1,lastX:0,lastY:0};function p(t){0===t.button&&(h={buttonDown:!0,shiftDown:h.shiftDown,lastX:t.clientX,lastY:t.clientY})}function d(t){if(0===t.button){if(!h.buttonDown)return;h.buttonDown=!1}}function m(t){h.shiftDown=t.shiftKey}function g(t){if(h.buttonDown&&0!==t.buttons){t.preventDefault();var n=t.clientX-h.lastX,e=t.clientY-h.lastY;if(0!==n||0!==e){if(h.lastX=t.clientX,h.lastY=t.clientY,h.shiftDown){var r=u(),c=.001/l();s({x:r.x-n*c,y:r.y+e*c})}else{var p={rotation:new Float32Array(a())};o.rotate(p,n,e),i(p.rotation)}f()}}}function v(t){t.preventDefault(),c(l()*(t.deltaY<0?1/.9:.9)),f()}function y(){e.removeEventListener("mousedown",p),window.removeEventListener("mouseup",d),window.removeEventListener("keydown",m),window.removeEventListener("keyup",m),window.removeEventListener("mousemove",g),e.removeEventListener("wheel",v)}return e.addEventListener("mousedown",p),window.addEventListener("mouseup",d),window.addEventListener("keydown",m),window.addEventListener("keyup",m),window.addEventListener("mousemove",g),n&&e.addEventListener("wheel",v),y}},function(t,n){t.exports={default:{atomScale:.6,relativeAtomScale:1,bondScale:.5,ao:.75,aoRes:256,brightness:.5,outline:0,spf:32,bonds:!1,bondThreshold:1.2,bondShade:.5,atomShade:.5,dofStrength:0,dofPosition:.5,fxaa:1},stickball:{atomScale:.24,relativeAtomScale:.64,bondScale:.5,bonds:!0,bondThreshold:1.2},toon:{ao:0,spf:0,brightness:.5,outline:1},licorice:{atomScale:.1,relativeAtomScale:0,bondScale:1,bonds:!0,bondThreshold:1.2}}},function(t,n,e){"use strict";e.r(n);var r=e(12),o=e(13),a=e(1),i=e.n(a),u=e(0),s=e.n(u),l=e(28),c=e(51);function f(t){return(f="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)}function h(t,n){for(var e=0;e=0;){if(e[p]===t)return r[p]===n;p-=1}switch(h){case"Map":return t.size===n.size&&c(t.entries(),n.entries(),e.concat([t]),r.concat([n]));case"Set":return t.size===n.size&&c(t.values(),n.values(),e.concat([t]),r.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var d=Object(s.a)(t);if(d.length!==Object(s.a)(n).length)return!1;var m=e.concat([t]),g=r.concat([n]);for(p=d.length-1;p>=0;){var v=d[p];if(!Object(i.a)(v,n)||!f(n[v],t[v],m,g))return!1;p-=1}return!0}var h=Object(r.a)((function(t,n){return f(t,n,[],[])}));n.a=h}]); +window.dash_bio=function(t){function n(n){for(var e,o,a=n[0],i=n[1],u=0,s=[];u0&&(o=1/Math.sqrt(o),t[0]=n[0]*o,t[1]=n[1]*o),t},u.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]},u.cross=function(t,n,e){var r=n[0]*e[1]-n[1]*e[0];return t[0]=t[1]=0,t[2]=r,t},u.lerp=function(t,n,e,r){var o=n[0],a=n[1];return t[0]=o+r*(e[0]-o),t[1]=a+r*(e[1]-a),t},u.random=function(t,n){n=n||1;var e=2*r()*Math.PI;return t[0]=Math.cos(e)*n,t[1]=Math.sin(e)*n,t},u.transformMat2=function(t,n,e){var r=n[0],o=n[1];return t[0]=e[0]*r+e[2]*o,t[1]=e[1]*r+e[3]*o,t},u.transformMat2d=function(t,n,e){var r=n[0],o=n[1];return t[0]=e[0]*r+e[2]*o+e[4],t[1]=e[1]*r+e[3]*o+e[5],t},u.transformMat3=function(t,n,e){var r=n[0],o=n[1];return t[0]=e[0]*r+e[3]*o+e[6],t[1]=e[1]*r+e[4]*o+e[7],t},u.transformMat4=function(t,n,e){var r=n[0],o=n[1];return t[0]=e[0]*r+e[4]*o+e[12],t[1]=e[1]*r+e[5]*o+e[13],t},u.forEach=(i=u.create(),function(t,n,e,r,o,a){var u,s;for(n||(n=2),e||(e=0),s=r?Math.min(r*n+e,t.length):t.length,u=e;u0&&(a=1/Math.sqrt(a),t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a),t},s.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]},s.cross=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=e[0],u=e[1],s=e[2];return t[0]=o*s-a*u,t[1]=a*i-r*s,t[2]=r*u-o*i,t},s.lerp=function(t,n,e,r){var o=n[0],a=n[1],i=n[2];return t[0]=o+r*(e[0]-o),t[1]=a+r*(e[1]-a),t[2]=i+r*(e[2]-i),t},s.random=function(t,n){n=n||1;var e=2*r()*Math.PI,o=2*r()-1,a=Math.sqrt(1-o*o)*n;return t[0]=Math.cos(e)*a,t[1]=Math.sin(e)*a,t[2]=o*n,t},s.transformMat4=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=e[3]*r+e[7]*o+e[11]*a+e[15];return i=i||1,t[0]=(e[0]*r+e[4]*o+e[8]*a+e[12])/i,t[1]=(e[1]*r+e[5]*o+e[9]*a+e[13])/i,t[2]=(e[2]*r+e[6]*o+e[10]*a+e[14])/i,t},s.transformMat3=function(t,n,e){var r=n[0],o=n[1],a=n[2];return t[0]=r*e[0]+o*e[3]+a*e[6],t[1]=r*e[1]+o*e[4]+a*e[7],t[2]=r*e[2]+o*e[5]+a*e[8],t},s.transformQuat=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=e[0],u=e[1],s=e[2],l=e[3],c=l*r+u*a-s*o,f=l*o+s*r-i*a,h=l*a+i*o-u*r,p=-i*r-u*o-s*a;return t[0]=c*l+p*-i+f*-s-h*-u,t[1]=f*l+p*-u+h*-i-c*-s,t[2]=h*l+p*-s+c*-u-f*-i,t},s.rotateX=function(t,n,e,r){var o=[],a=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],a[0]=o[0],a[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),a[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t},s.rotateY=function(t,n,e,r){var o=[],a=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],a[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),a[1]=o[1],a[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t},s.rotateZ=function(t,n,e,r){var o=[],a=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],a[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),a[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),a[2]=o[2],t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t},s.forEach=function(){var t=s.create();return function(n,e,r,o,a,i){var u,s;for(e||(e=3),r||(r=0),s=o?Math.min(o*e+r,n.length):n.length,u=r;u1?0:Math.acos(o)},s.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},void 0!==t&&(t.vec3=s);var l={create:function(){var t=new e(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},clone:function(t){var n=new e(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n},fromValues:function(t,n,r,o){var a=new e(4);return a[0]=t,a[1]=n,a[2]=r,a[3]=o,a},copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t},set:function(t,n,e,r,o){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t},add:function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t},subtract:function(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t}};l.sub=l.subtract,l.multiply=function(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t[3]=n[3]*e[3],t},l.mul=l.multiply,l.divide=function(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t[3]=n[3]/e[3],t},l.div=l.divide,l.min=function(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t[3]=Math.min(n[3],e[3]),t},l.max=function(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t[3]=Math.max(n[3],e[3]),t},l.scale=function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t},l.scaleAndAdd=function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t},l.distance=function(t,n){var e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],a=n[3]-t[3];return Math.sqrt(e*e+r*r+o*o+a*a)},l.dist=l.distance,l.squaredDistance=function(t,n){var e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],a=n[3]-t[3];return e*e+r*r+o*o+a*a},l.sqrDist=l.squaredDistance,l.length=function(t){var n=t[0],e=t[1],r=t[2],o=t[3];return Math.sqrt(n*n+e*e+r*r+o*o)},l.len=l.length,l.squaredLength=function(t){var n=t[0],e=t[1],r=t[2],o=t[3];return n*n+e*e+r*r+o*o},l.sqrLen=l.squaredLength,l.negate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t},l.inverse=function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t},l.normalize=function(t,n){var e=n[0],r=n[1],o=n[2],a=n[3],i=e*e+r*r+o*o+a*a;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=n[3]*i),t},l.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]},l.lerp=function(t,n,e,r){var o=n[0],a=n[1],i=n[2],u=n[3];return t[0]=o+r*(e[0]-o),t[1]=a+r*(e[1]-a),t[2]=i+r*(e[2]-i),t[3]=u+r*(e[3]-u),t},l.random=function(t,n){return n=n||1,t[0]=r(),t[1]=r(),t[2]=r(),t[3]=r(),l.normalize(t,t),l.scale(t,t,n),t},l.transformMat4=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=n[3];return t[0]=e[0]*r+e[4]*o+e[8]*a+e[12]*i,t[1]=e[1]*r+e[5]*o+e[9]*a+e[13]*i,t[2]=e[2]*r+e[6]*o+e[10]*a+e[14]*i,t[3]=e[3]*r+e[7]*o+e[11]*a+e[15]*i,t},l.transformQuat=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=e[0],u=e[1],s=e[2],l=e[3],c=l*r+u*a-s*o,f=l*o+s*r-i*a,h=l*a+i*o-u*r,p=-i*r-u*o-s*a;return t[0]=c*l+p*-i+f*-s-h*-u,t[1]=f*l+p*-u+h*-i-c*-s,t[2]=h*l+p*-s+c*-u-f*-i,t},l.forEach=function(){var t=l.create();return function(n,e,r,o,a,i){var u,s;for(e||(e=4),r||(r=0),s=o?Math.min(o*e+r,n.length):n.length,u=r;u.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(s.cross(d,n,e),t[0]=d[0],t[1]=d[1],t[2]=d[2],t[3]=1+r,y.normalize(t,t))}),y.setAxes=(v=h.create(),function(t,n,e,r){return v[0]=e[0],v[3]=e[1],v[6]=e[2],v[1]=r[0],v[4]=r[1],v[7]=r[2],v[2]=-n[0],v[5]=-n[1],v[8]=-n[2],y.normalize(t,y.fromMat3(t,v))}),y.clone=l.clone,y.fromValues=l.fromValues,y.copy=l.copy,y.set=l.set,y.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},y.setAxisAngle=function(t,n,e){e*=.5;var r=Math.sin(e);return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=Math.cos(e),t},y.add=l.add,y.multiply=function(t,n,e){var r=n[0],o=n[1],a=n[2],i=n[3],u=e[0],s=e[1],l=e[2],c=e[3];return t[0]=r*c+i*u+o*l-a*s,t[1]=o*c+i*s+a*u-r*l,t[2]=a*c+i*l+r*s-o*u,t[3]=i*c-r*u-o*s-a*l,t},y.mul=y.multiply,y.scale=l.scale,y.rotateX=function(t,n,e){e*=.5;var r=n[0],o=n[1],a=n[2],i=n[3],u=Math.sin(e),s=Math.cos(e);return t[0]=r*s+i*u,t[1]=o*s+a*u,t[2]=a*s-o*u,t[3]=i*s-r*u,t},y.rotateY=function(t,n,e){e*=.5;var r=n[0],o=n[1],a=n[2],i=n[3],u=Math.sin(e),s=Math.cos(e);return t[0]=r*s-a*u,t[1]=o*s+i*u,t[2]=a*s+r*u,t[3]=i*s-o*u,t},y.rotateZ=function(t,n,e){e*=.5;var r=n[0],o=n[1],a=n[2],i=n[3],u=Math.sin(e),s=Math.cos(e);return t[0]=r*s+o*u,t[1]=o*s-r*u,t[2]=a*s+i*u,t[3]=i*s-a*u,t},y.calculateW=function(t,n){var e=n[0],r=n[1],o=n[2];return t[0]=e,t[1]=r,t[2]=o,t[3]=Math.sqrt(Math.abs(1-e*e-r*r-o*o)),t},y.dot=l.dot,y.lerp=l.lerp,y.slerp=function(t,n,e,r){var o,a,i,u,s,l=n[0],c=n[1],f=n[2],h=n[3],p=e[0],d=e[1],m=e[2],g=e[3];return(a=l*p+c*d+f*m+h*g)<0&&(a=-a,p=-p,d=-d,m=-m,g=-g),1-a>1e-6?(o=Math.acos(a),i=Math.sin(o),u=Math.sin((1-r)*o)/i,s=Math.sin(r*o)/i):(u=1-r,s=r),t[0]=u*l+s*p,t[1]=u*c+s*d,t[2]=u*f+s*m,t[3]=u*h+s*g,t},y.invert=function(t,n){var e=n[0],r=n[1],o=n[2],a=n[3],i=e*e+r*r+o*o+a*a,u=i?1/i:0;return t[0]=-e*u,t[1]=-r*u,t[2]=-o*u,t[3]=a*u,t},y.conjugate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t},y.length=l.length,y.len=y.length,y.squaredLength=l.squaredLength,y.sqrLen=y.squaredLength,y.normalize=l.normalize,y.fromMat3=function(t,n){var e,r=n[0]+n[4]+n[8];if(r>0)e=Math.sqrt(r+1),t[3]=.5*e,e=.5/e,t[0]=(n[5]-n[7])*e,t[1]=(n[6]-n[2])*e,t[2]=(n[1]-n[3])*e;else{var o=0;n[4]>n[0]&&(o=1),n[8]>n[3*o+o]&&(o=2);var a=(o+1)%3,i=(o+2)%3;e=Math.sqrt(n[3*o+o]-n[3*a+a]-n[3*i+i]+1),t[o]=.5*e,e=.5/e,t[3]=(n[3*a+i]-n[3*i+a])*e,t[a]=(n[3*a+o]+n[3*o+a])*e,t[i]=(n[3*i+o]+n[3*o+i])*e}return t},y.str=function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},void 0!==t&&(t.quat=y)}(e.exports)}()},function(t,n,e){"use strict";var r=e(7),o=e(6),a=e(26);function i(t,n,e){return Math.min(n,Math.max(t,e))}t.exports.new=function(){return{aspect:1,zoom:.125,translation:{x:0,y:0},atomScale:.6,relativeAtomScale:1,bondScale:.5,rotation:r.mat4.create(),ao:.75,aoRes:256,brightness:.5,outline:0,spf:32,bonds:!1,bondThreshold:1.2,bondShade:.5,atomShade:.5,resolution:768,dofStrength:0,dofPosition:.5,fxaa:1}},t.exports.center=function(t,n){for(var e=-1/0,a=1/0,i=-1/0,u=1/0,s=0;s=0;)n=s[e],Object(o.a)(n,t)&&!c(r,n)&&(r[r.length]=n),e-=1;return r})):Object(r.a)((function(t){return Object(t)!==t?[]:Object.keys(t)}));n.a=f},function(t,n,e){"use strict";var r=e(3),o=Object(r.a)((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));n.a=o},function(t,n,e){"use strict";e.d(n,"a",(function(){return a}));var r=e(3),o=e(4);function a(t){return function n(e,a){switch(arguments.length){case 0:return n;case 1:return Object(o.a)(e)?n:Object(r.a)((function(n){return t(e,n)}));default:return Object(o.a)(e)&&Object(o.a)(a)?n:Object(o.a)(e)?Object(r.a)((function(n){return t(n,a)})):Object(o.a)(a)?Object(r.a)((function(n){return t(e,n)})):t(e,a)}}}},function(t,n,e){"use strict";e.d(n,"a",(function(){return m})),e.d(n,"c",(function(){return g})),e.d(n,"b",(function(){return v}));var r=e(0),o=e.n(r),a=e(1),i=e.n(a),u=e(2);function s(t){return(s="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)}function l(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function c(t,n){for(var e=0;en&&(n=u,t.farAtom=r)}return t.farAtom});t.exports.getRadius=function(t){var n=u(t),e=a.MAX_ATOM_RADIUS,r=2.5*Math.sqrt(e*e+e*e+e*e);return Math.sqrt(n.x*n.x+n.y*n.y+n.z*n.z)+r}},function(t,n,e){var o;o=function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}return e.m=t,e.c=n,e.p="",e(0)}([function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.rnaPlot=n.RNAGraph=void 0;var o=e(1);Object.defineProperty(n,"RNAGraph",{enumerable:!0,get:function(){return o.RNAGraph}});var a=e(3);Object.defineProperty(n,"rnaPlot",{enumerable:!0,get:function(){return a.rnaPlot}}),n.FornaContainer=function(t,n){var e=this;if(e.options={displayAllLinks:!1,labelInterval:10,applyForce:!0,chargeDistance:110,friction:.35,middleCharge:-30,otherCharge:-30,linkDistanceMultiplier:15,initialSize:null,layout:"standard-polygonal",allowPanningAndZooming:!0,transitionDuration:500,hoverPattern:"",resizeSvgOnResize:!0},arguments.length>1)for(var a in n)e.options.hasOwnProperty(a)&&(e.options[a]=n[a]);null!==e.options.initialSize?(e.options.svgW=e.options.initialSize[0],e.options.svgH=e.options.initialSize[1]):(e.options.svgW=800,e.options.svgH=800),l.default.scale.category20();var u=null,s=null,p=l.default.scale.linear().domain([0,e.options.svgW]).range([0,e.options.svgW]),d=l.default.scale.linear().domain([0,e.options.svgH]).range([0,e.options.svgH]),m=e.graph={nodes:[],links:[]};function g(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function v(t){var n=t,e=t.prevNode;if(null!==e&&t.linked){var r=[-(n.x-e.x),-(n.y-e.y)],o=[-(r=[r[0]/g(r),r[1]/g(r)])[1],r[0]],a=[t.radius*r[0],t.radius*r[1]],i="M"+(a[0]+6*(r[0]+o[0])/2)+","+(a[1]+6*(r[1]+o[1])/2)+"L"+a[0]+","+a[1]+"L"+(a[0]+6*(r[0]-o[0])/2)+","+(a[1]+6*(r[1]-o[1])/2);l.default.select(this).attr("d",i)}}function y(t){return"basepair"==t.linkType||"backbone"==t.linkType||"pseudoknot"==t.linkType||"label_link"==t.linkType||"external"==t.linkType||"chain_chain"==t.linkType}function b(t,n,e){if(t.hasOwnProperty(n.num)){var r=parseFloat(t[n.num]);return isNaN(r)?t[n.num]:e(r)}return"white"}function x(){}function M(){u&&(mpos=l.default.mouse(A.node()),N.attr("x1",u.x).attr("y1",u.y).attr("x2",mpos[0]).attr("y2",mpos[1]))}function _(){u&&N.attr("class","drag_line_hidden"),O()}e.linkStrengths={pseudoknot:0,proteinChain:0,chainChain:0,intermolecule:10,external:0,other:10},e.displayParameters={displayBackground:"true",displayNumbering:"true",displayNodeOutline:"true",displayNodeLabel:"true",displayLinks:"true",displayPseudoknotLinks:"true",displayProteinLinks:"true"},e.colorScheme="structure",e.customColors={},e.animation=e.options.applyForce,e.deaf=!1,e.rnas={},e.extraLinks=[],Array.prototype.equals=function(t){if(!t)return!1;if(this.length!=t.length)return!1;for(var n=0,e=this.length;n0?l.default.max(e.graph.nodes.map((function(t){return t.x}))):0,o=l.default.min(t.nodes.map((function(t){return t.x}))),t.nodes.forEach((function(t){t.x+=r-o+20,t.px+=r-o}))),t.nodes.forEach((function(n){n.rna=t})),e.rnas[t.uid]=t,e.recalculateGraph(),e.update(),e.centerView(),t},e.transitionRNA=function(t,n){var r=e.options.transitionDuration,o={uids:e.graph.nodes.filter((function(t){return"nucleotide"==t.nodeType})).map((function(t){return t.uid}))},a=e.createInitialLayout(t,o),i=T.selectAll("g.gnode").data(a.nodes,Y);0===(r=e.options.transitionDuration)?i.attr("transform",(function(t){return"translate("+[t.x,t.y]+")"})):i.transition().attr("transform",(function(t){return"translate("+[t.x,t.y]+")"})).duration(r);var u=E.selectAll("line.link").data(a.links.filter(y),X),s=e.createNewNodes(i.enter()).attr("transform",(function(t){return void 0!==t.x&&void 0!==t.y?"translate("+[0,0]+")":""}));0===r?i.exit().remove():i.exit().transition().attr("transform",(function(t){return void 0!==t.x&&void 0!==t.y?"translate("+[0,0]+")":""})),i.select("path").each(v),e.graph.nodes=i.data(),e.updateStyle(),e.centerView(r),u.exit().remove(),0===r?(u.attr("x1",(function(t){return t.source.x})).attr("y1",(function(t){return t.source.y})).attr("x2",(function(t){return t.target.x})).attr("y2",(function(t){return t.target.y})),e.createNewLinks(u.enter()),e.graph.links=u.data(),e.updateStyle()):u.transition().attr("x1",(function(t){return t.source.x})).attr("y1",(function(t){return t.source.y})).attr("x2",(function(t){return t.target.x})).attr("y2",(function(t){return t.target.y})).duration(r).call((function(t,n){0===t.size()&&setTimeout(n,r);var e=0;t.each((function(){++e})).each("end",(function(){--e||n.apply(this,arguments)}))}),(function(){e.createNewLinks(u.enter()),e.graph.links=u.data(),e.updateStyle(),void 0!==n&&n()})),0===r?s.attr("transform",(function(t){return void 0!==t.x&&void 0!==t.y?"translate("+[t.x,t.y]+")":""})):s.transition().attr("transform",(function(t){return void 0!==t.x&&void 0!==t.y?"translate("+[t.x,t.y]+")":""}))},e.recalculateGraph=function(){for(var t in e.graph.nodes=[],e.graph.links=[],e.rnas)e.graph.nodes=e.graph.nodes.concat(e.rnas[t].nodes),e.graph.links=e.graph.links.concat(e.rnas[t].links);for(var n={},r=0;r0?(maxX=l.default.max(e.graph.nodes.map((function(t){return t.x}))),maxY=l.default.max(e.graph.nodes.map((function(t){return t.y})))):(maxX=0,maxY=0),t.nodes.forEach((function(t){t.rna.uid in e.rnas||(e.rnas[t.rna.uid]=t.rna),t.x+=maxX,t.px+=maxX})),r=new o.RNAGraph("",""),r.nodes=t.nodes,r.links=t.links,e.recalculateGraph(),e.update(),e.centerView()},e.addCustomColors=function(t){e.customColors=t},e.addCustomColorsText=function(t){var n=new f.ColorScheme(t);e.customColors=n.colorsJson,e.changeColorScheme("custom")},e.clearNodes=function(){e.graph.nodes=[],e.graph.links=[],e.rnas={},e.extraLinks=[],e.update()},e.toJSON=function(){var t={rnas:e.rnas,extraLinks:e.extraLinks};return JSON.stringify(t,(function(t,n){return"rna"==t?void 0:n}),"\t")},e.fromJSON=function(t){var n,a;try{var i=JSON.parse(t);n=i.rnas,a=i.extraLinks}catch(t){throw t}for(var u in n)"rna"==n[u].type?(r=new o.RNAGraph,r.seq=n[u].seq,r.dotbracket=n[u].dotbracket,r.circular=n[u].circular,r.pairtable=n[u].pairtable,r.uid=n[u].uid,r.structName=n[u].structName,r.nodes=n[u].nodes,r.links=n[u].links,r.rnaLength=n[u].rnaLength,r.elements=n[u].elements,r.nucsToNodes=n[u].nucsToNodes,r.pseudoknotPairs=n[u].pseudoknotPairs):(r=new ProteinGraph,r.size=n[u].size,r.nodes=n[u].nodes,r.uid=n[u].uid),e.addRNAJSON(r,!1);a.forEach((function(t){e.extraLinks.push(t)})),e.recalculateGraph(),e.update()},e.setSize=function(){if(null==e.options.initialSize){var n=l.default.select(t).node().offsetHeight,r=l.default.select(t).node().offsetWidth;e.options.svgW=r,e.options.svgH=n,p.range([0,r]).domain([0,r]),d.range([0,n]).domain([0,n]),e.zoomer.x(p).y(d),e.brusher.x(p).y(d),e.centerView(),e.options.resizeSvgOnResize&&w.attr("width",r).attr("height",n)}},e.setOutlineColor=function(t){T.selectAll("g.gnode").select("[node_type=nucleotide]").style("fill",t)},e.changeColorScheme=function(t){T.selectAll("[node_type=protein]").classed("protein",!0).attr("r",(function(t){return t.radius})),T.selectAll("g.gnode"),T.selectAll("g.gnode").selectAll("circle");var n=T.selectAll("g.gnode").select("[node_type=nucleotide]");if(e.colorScheme=t,"sequence"==t){var r=l.default.scale.ordinal().range(["#dbdb8d","#98df8a","#ff9896","#aec7e8","#aec7e8"]).domain(["A","C","G","U","T"]);n.style("fill",(function(t){return r(t.name)}))}else"structure"==t?(r=l.default.scale.category10().domain(["s","m","i","e","t","h","x"]).range(["lightgreen","#ff9896","#dbdb8d","lightsalmon","lightcyan","lightblue","transparent"]),n.style("fill",(function(t){return r(t.elemType)}))):"positions"==t?n.style("fill",(function(t){return l.default.scale.linear().range(["#98df8a","#dbdb8d","#ff9896"]).interpolate(l.default.interpolateLab).domain([1,1+(t.rna.rnaLength-1)/2,t.rna.rnaLength])(t.num)})):"custom"==t&&(void 0!==e.customColors&&"domain"in e.customColors&&"range"in e.customColors&&(r=l.default.scale.linear().interpolate(l.default.interpolateLab).domain(e.customColors.domain).range(e.customColors.range)),n.style("fill",(function(t){return void 0!==e.customColors&&e.customColors.hasOwnProperty("colorValues")?e.customColors.colorValues.hasOwnProperty(t.structName)&&e.customColors.colorValues[t.structName].hasOwnProperty(t.num)?b(e.customColors.colorValues[t.structName],t,r):e.customColors.colorValues.hasOwnProperty("")?b(e.customColors.colorValues[""],t,r):"white":"white"})))},e.setHoverPattern=function(t){e.options.hoverPattern=t||""},window.addEventListener("resize",e.setSize,!1),e.zoomer=l.default.behavior.zoom().scaleExtent([.1,10]).x(p).y(d).on("zoomstart",P).on("zoom",R),l.default.select(t).select("svg").remove();var w=l.default.select(t).classed("forna-container",!0).attr("tabindex",1).on("keydown.brush",B).on("keyup.brush",I).each((function(){this.focus()})).append("svg:svg").attr("width",e.options.svgW).attr("height",e.options.svgH).attr("id","plotting-area");e.options.svg=w;var k=w.append("svg:g").on("mousemove",M).on("mousedown",x).on("mouseup",_);e.options.allowPanningAndZooming&&k.call(e.zoomer);var S=k.append("g").datum((function(){return{selected:!1,previouslySelected:!1}})).attr("class","brush"),A=k.append("svg:g"),E=A.append("svg:g"),T=A.append("svg:g");function P(){var t=T.selectAll("g.gnode").selectAll(".outline_node");t.each((function(t){t.selected=!1,t.previouslySelected=!1})),t.classed("selected",!1)}function R(){A.attr("transform","translate("+l.default.event.translate+") scale("+l.default.event.scale+")")}e.brusher=l.default.svg.brush().x(p).y(d).on("brushstart",(function(t){T.selectAll("g.gnode").selectAll(".outline_node").each((function(t){t.previouslySelected=L&&t.selected}))})).on("brush",(function(){var t=T.selectAll("g.gnode").selectAll(".outline_node"),n=l.default.event.target.extent();t.classed("selected",(function(t){return t.selected=e.options.applyForce&&t.previouslySelected^(n[0][0]<=t.x&&t.xr||sa||l-1){if(t.source.rna==t.target.rna){var n=t.source.rna;n.addPseudoknots(),n.pairtable[t.source.num]=0,n.pairtable[t.target.num]=0,V(n)}else extraLinkIndex=e.extraLinks.indexOf(t),e.extraLinks.splice(extraLinkIndex,1);e.recalculateGraph()}e.update()},G=function(t){C&&(t.linkType in{backbone:!0,fake:!0,fake_fake:!0,label_link:!0}||H(t))};e.addLink=function(t){t.source.rna==t.target.rna?(r=t.source.rna,r.pairtable[t.source.num]=t.target.num,r.pairtable[t.target.num]=t.source.num,V(r)):(t.linkType="intermolecule",e.extraLinks.push(t)),e.recalculateGraph(),e.update()};var W=function(t){l.default.event.defaultPrevented||(L||T.selectAll("g.gnode").selectAll(".outline_node").classed("selected",(function(t){return t.selected=e.options.applyForce&&(t.previouslySelected=!1)})),l.default.select(this).select("circle").classed("selected",t.selected=e.options.applyForce&&!t.previouslySelected))},Z=function(t){if(u){if((s=t)==u)return void O();var n={source:u,target:s,linkType:"basepair",value:1,uid:generateUUID()};for(i=0;i0?e.options.hoverPattern:n},e.setSize()},e(15);var u,s=e(17),l=(u=s)&&u.__esModule?u:{default:u},c=e(4),f=e(2),h=e(5)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ProteinGraph=i,n.RNAGraph=u,n.moleculesToJson=function(t){for(var n={},e=[],r=[],o=0;o0&&"*"==u.dotbracket[u.dotbracket.length-1]&&(u.dotbracket=u.dotbracket.slice(0,u.dotbracket.length-1),u.circular=!0),u.uid=a(),u.elements=[],u.pseudoknotPairs=[],u.nucsToNodes={},u.addUids=function(t){for(var n=u.nodes.filter((function(t){return"nucleotide"==t.nodeType})),e=0;e=0;)n.push(e),t=t.substring(0,e)+"oo"+t.substring(e+1,t.length);return{targetString:t,breaks:n}};var s=u.removeBreaks(u.dotbracket);u.dotbracket=s.targetString,u.dotBracketBreaks=s.breaks,s=u.removeBreaks(u.seq),u.seq=s.targetString,u.seqBreaks=s.breaks,u.calculateStartNumberArray=function(){u.startNumberArray=[];for(var t=0;t=0&&(e=!0);e?u.elements[n][2].map((function(t){0!=t&&(u.nodes[t-1].elemType="e")})):u.elements[n][2].map((function(t){0!=t&&(u.nodes[t-1].elemType=u.elements[n][0])}))}return u},u.getPositions=function(t){for(var n=[],e=u.nodes.filter((function(n){return n.nodeType==t})),r=0;r=4})),e=0;eu.dotbracket.length)){u.links.push({source:u.nodes[t[f]-1],target:u.nodes[u.nodes.length-1],linkType:"fake",value:e,uid:a()}),t.length>4&&u.links.push({source:u.nodes[t[f]-1],target:u.nodes[t[(f+Math.floor(t.length/2))%t.length]-1],linkType:"fake",value:2*e,uid:a()});var h=3.14159*(t.length-2)/t.length,p=2*Math.cos(1.570795-h/2);u.links.push({source:u.nodes[t[f]-1],target:u.nodes[t[(f+2)%t.length]-1],linkType:"fake",value:p});var d=u.nodes[t[f]-1];"x"in d&&(s+=d.x,l+=d.y,c+=1)}return c>0&&(i.x=s/c,i.y=l/c,i.px=i.x,i.py=i.y),u},u.connectFakeNodes=function(){for(var t={},n=u.nodes.filter((function(t){return"middle"==t.nodeType})),e=new Set,r=1;r<=u.nodes.length;r++)t[r]=[];for(r=0;r=0||u.dotBracketBreaks.indexOf(e-2)>=0)&&(i=""),u.nodes.push({name:i,num:e+u.startNumberArray[e-1]-1,radius:5,rna:u,nodeType:"nucleotide",structName:u.structName,elemType:n[e],uid:a(),linked:!1})}for(e=0;e1&&-1===u.dotBracketBreaks.indexOf(e-1)&&-1==u.dotBracketBreaks.indexOf(e-2)&&-1==u.dotBracketBreaks.indexOf(e-3)&&(u.links.push({source:u.nodes[e-2],target:u.nodes[e-1],linkType:"backbone",value:1,uid:a()}),u.nodes[e-1].linked=!0);for(e=0;er)return[];for(;0===t[e];e++)i.push(e);for(;0===t[r];r--)s.push(r);if(e>r){if(i.push(e),0===n)return[["e",n,i.sort(o)]];for(var l=!1,c=[],f=[],h=0;h=0&&(l=!0);return[["h",n,i.sort(o)]]}if(t[e]!=r){var p=i;for(h=e,p.push(h);h<=r;){for(a=a.concat(u.ptToElements(t,n,h,t[h])),p.push(t[h]),h=t[h]+1;0===t[h]&&h<=r;h++)p.push(h);p.push(h)}return p.pop(),(p=p.concat(s)).length>0&&(0===n?a.push(["e",n,p.sort(o)]):a.push(["m",n,p.sort(o)])),a}t[e]===r&&(i.push(e),s.push(r),i.concat(s).length>4&&(0===n?a.push(["e",n,i.concat(s).sort(o)]):a.push(["i",n,i.concat(s).sort(o)])));for(var d=[];t[e]===r&&e0)){eloop=externalLoop[0],nucs=eloop[2].sort(o),prev=nucs[0],hloop=!0,numGreater=0;for(var t=1;t1&&(numGreater+=1),prev=nucs[t];1==numGreater?eloop[0]="h":2==numGreater?eloop[0]="i":eloop[0]="m"}return u},u.reassignLinkUids=function(){for(var t=0;t1&&(u.pseudoknotPairs=u.pseudoknotPairs.concat(r.rnaUtilities.removePseudoknotsFromPairtable(u.pairtable))),u},u.addPseudoknots=function(){for(var t=u.pairtable,n=u.pseudoknotPairs,e=0;e0&&u.recalculateElements()}void 0===String.prototype.trim&&(String.prototype.trim=function(){return String(this).replace(/^\s+|\s+$/g,"")})},function(t,n,e){t.exports=function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){t.exports=e(1)},function(t,n){"use strict";function e(){var t=this;t.bracketLeft="([{abcdefghijklmnopqrstuvwxyz".split(""),t.inverseBrackets=function(t){for(var n={},e=0;e=r;r++){e[r]=new Array(n+1);for(var o=r;n>=o;o++)e[r][o]=0}var a=0;for(r=n-0-1;r>0;r--)for(o=r+0+1;n>=o;o++){a=e[r][o-1];for(var i=o-0-1;i>=r;i--)t[i]===o&&(a=Math.max(a,(i>r?e[r][i-1]:0)+1+(o-i-1>0?e[i+1][o-1]:0)));e[r][o]=a}return a=e[1][n],e},t.backtrackMaximumMatching=function(n,e){var r=Array.apply(null,Array(n.length)).map((function(){return 0}));return t.mmBt(n,r,e,1,n.length-1),r},t.mmBt=function(n,e,r,o,a){var i=n[o][a];if(!(0>a-o-1)){if(n[o][a-1]==i)return void t.mmBt(n,e,r,o,a-1);for(var u=a-0-1;u>=o;u--)if(r[a]===u&&(u>o?n[o][u-1]:0)+(a-u-1>0?n[u+1][a-1]:0)+1==i)return e[u]=a,e[a]=u,u>o&&t.mmBt(n,e,r,o,u-1),void t.mmBt(n,e,r,u+1,a-1);console.log("FAILED!!!"+o+","+a+": backtracking failed!")}},t.dotbracketToPairtable=function(n){var e=Array.apply(null,new Array(n.length+1)).map(Number.prototype.valueOf,0);e[0]=n.length;for(var r={},o=0;o0)throw"Unmatched base at position "+r[c][0];return e},t.insertIntoStack=function(t,n,e){for(var r=0;t[r].length>0&&t[r][t[r].length-1]r?t.bracketLeft[t.insertIntoStack(e,r,n[r])]:t.bracketRight[t.deleteFromStack(e,r)]}return a},t.findUnmatched=function(n,e,r){for(var o=[],a=[],i=e,u=r,s=e;r>=s;s++)0!==n[s]&&(n[s]r)&&a.push([s,n[s]]);for(s=i;u>=s;s++){for(;0===n[s]&&u>=s;)s++;for(r=n[s];n[s]===r;)s++,r--;o=o.concat(t.findUnmatched(n,s,r))}return a.length>0&&o.push(a),o},t.removePseudoknotsFromPairtable=function(n){for(var e=t.maximumMatching(n),r=t.backtrackMaximumMatching(e,n),o=[],a=1;aa)return[];for(;0===n[o];o++)s.push(o);for(;0===n[a];a--)l.push(a);if(o>a){if(s.push(o),0===e)return[["e",e,s.sort(r)]];for(var c=!1,f=[],h=[],p=0;p=0&&(c=!0);return[["h",e,s.sort(r)]]}if(n[o]!=a){var d=s;for(p=o,d.push(p);a>=p;){for(u=u.concat(t.ptToElements(n,e,p,n[p],i)),d.push(n[p]),p=n[p]+1;0===n[p]&&a>=p;p++)d.push(p);d.push(p)}return d.pop(),(d=d.concat(l)).length>0&&(0===e?u.push(["e",e,d.sort(r)]):u.push(["m",e,d.sort(r)])),u}if(n[o]===a){s.push(o),l.push(a);var m=s.concat(l);m.length>4&&(0===e?u.push(["e",e,s.concat(l).sort(r)]):u.push(["i",e,s.concat(l).sort(r)]))}for(var g=[];n[o]===a&&a>o;)g.push(o),g.push(a),o+=1,a-=1,e+=1;return s=[o-1],l=[a+1],u.push(["s",e,g.sort(r)]),u.concat(t.ptToElements(n,e,o,a,i))}}Object.defineProperty(n,"__esModule",{value:!0}),n.arraysEqual=function(t,n){if(t===n)return!0;if(null===t||null===n)return!1;if(t.length!=n.length)return!1;for(var e=0;e=u;u++)e.push(u);else console.log("Malformed range (too many dashes):",t)}return e},n.parseColorText=function(t){for(var e=t.split("\n"),r="",o=1,a={colorValues:{"":{}},range:["white","steelblue"]},i=[],u=0;u"!=e[u][0])for(var s=e[u].trim().split(/[\s]+/),l=0;lt&&(r=t),t>o&&(o=t));for(a in n.colorsJson.colorValues[e])"number"==typeof(t=n.colorsJson.colorValues[e][a])&&(n.colorsJson.colorValues[e][a]=(t-r)/(o-r))}return n},n.parseColorText(n.colorsText),n};var r=function(t,n){return t-n};n.rnaUtilities=new e}])},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.rnaPlot=function(){var t,n,e={width:400,height:400,nucleotideRadius:5,rnaEdgePadding:0,labelInterval:0,showNucleotideLabels:!0,startNucleotideNumber:1,bundleExternalLinks:!1};function a(a){a.each((function(a){var i=new r.RNAGraph(a.sequence,a.structure,a.name).recalculateElements().elementsToJson().addName(a.name);a.rnaGraph=i;for(var u=(new o.NAView).naview_xy_coordinates(i.pairtable),s=[],l=0;l2&&void 0!==arguments[2]?arguments[2]:"",i=d3.extent(r),u=d3.extent(o),s=30;""!=a&&(u[1]+=s),i[0]-=e.nucleotideRadius+e.rnaEdgePadding,u[0]-=e.nucleotideRadius+e.rnaEdgePadding,i[1]+=e.nucleotideRadius+e.rnaEdgePadding,u[1]+=e.nucleotideRadius+e.rnaEdgePadding;var l,c=i[1]-i[0],f=u[1]-u[0],h=c-e.width,p=f-e.height;function d(t,n,e){var r=(t.range()[1]-t.range()[0])/(t.domain()[1]-t.domain()[0]),o=(n[1]-n[0])*r,a=(e[1]-e[0]-o)/2;return{scaleFactor:r,scale:d3.scale.linear().domain(n).range([e[0]+a,e[1]-a])}}return h>p?(l=d(t=d3.scale.linear().domain(i).range([0,e.width]),u,[0,e.height]),n=l.scale):(l=d(n=d3.scale.linear().domain(u).range([0,e.height]),i,[0,e.width]),t=l.scale),t.range()[0],t.domain()[0],n.range()[0],n.domain()[0],"translate("+-(t.domain()[0]*l.scaleFactor-t.range()[0])+","+-(n.domain()[0]*l.scaleFactor-n.range()[0])+")scale("+l.scaleFactor+")"}(i.nodes.map((function(t){return t.x})),i.nodes.map((function(t){return t.y}))),f=d3.select(this).append("g").attr("transform",c),h=i.nodes.filter((function(t){return"nucleotide"==t.nodeType})),p=i.nodes.filter((function(t){return"label"==t.nodeType})),d=i.links;!function(t,n){n=n.filter((function(t){return null!==t.source&&null!==t.target})),t.selectAll(".rna-link").data(n).enter().append("svg:line").attr("x1",(function(t){return t.source.x})).attr("x2",(function(t){return t.target.x})).attr("y1",(function(t){return t.source.y})).attr("y2",(function(t){return t.target.y})).attr("link-type",(function(t){return t.linkType})).attr("extra-link-type",(function(t){return t.extraLinkType})).classed("rna-link",!0)}(f,d),function(t,n){var r=t.selectAll(".rna-base").data(n).enter().append("svg:g").attr("transform",(function(t){return"translate("+t.x+","+t.y+")"}));r.append("svg:circle").attr("r",e.nucleotideRadius).classed("rna-base",!0),e.showNucleotideLabels&&r.append("svg:text").text((function(t){return t.name})).attr("text-anchor","middle").attr("dominant-baseline","central").classed("nucleotide-label",!0).append("svg:title").text((function(t){return t.struct_name+":"+t.num}))}(f,h),function(t,n){t.selectAll(".rnaLabel").data(n).enter().append("svg:g").attr("transform",(function(t){return"translate("+t.x+","+t.y+")"})).append("svg:text").text((function(t){return t.name})).attr("text-anchor","middle").attr("font-weight","bold").attr("dominant-baseline","central").classed("number-label",!0)}(f,p),function(r,o){r.append("svg:text").attr("transform","translate("+t.invert(e.width/2)+","+n.invert(e.height)+")").attr("dy",-10).classed("rna-name",!0).text(o)}(f,a.name),e.bundleExternalLinks&&function(t,n){var e={},r=[];n=n.filter((function(t){return"correct"==t.linkType||"incorrect"==t.linkType||"extra"==t.linkType})),t.selectAll("[link-type=extra]").remove();for(var o=0;oh);if(g=v-2,v>=2&&(i[d+1+g]+=f,i[m-1-g]+=f,i[d]+=f,i[m]+=f,v>2))for(;g>=1;g--)i[d+g]=Math.PI,i[m-g]=Math.PI;s[++c]=v,h<=p&&t(h,p,r)}else n++,_++,k++;for(M=Math.PI*(_-2)/_,S[++w]=e,y=o<0?0:o,b=1;b<=w;b++){for(x=S[b]-y,g=0;g<=x;g++)i[y+g]+=M;if(b>w)break;y=S[++b]}u[++l]=k})(0,e+1,t),u[l]-=2,r=0,o[0]=100,a[0]=100;var h=[];for(h.push([o[0],a[0]]),n=1;n=0&&(1==++n?e=r:e>r&&(e=r));return t.setMark(!1),e+1}s.prototype.naview_xy_coordinates=function(t){var n,e=[],r=[];if(0===t.length||0===t[0])return 0;this.nbase=t[0],this.bases=[];for(var o=0;on&&e++;0==e&&(this.bases[1].setMate(this.nbase),this.bases[this.nbase].setMate(1))},s.prototype.find_regions=function(){var t,n=null,e=null;t=this.nbase+1;var r=[];for(n=0;nthis.nbase&&(n=0)}while(n!=t);return i},s.prototype.find_central_loop=function(){var t=new u.Loop,n=null,e=null,r=null;for(l.bind(this)(),n=0,e=-1,r=0;rn?(e=t.getDepth(),n=t.getNconnection(),this.root=t):t.getDepth()>e&&t.getNconnection()==n&&(e=t.getDepth(),this.root=t)},s.prototype.traverse_loop=function(t,n){var e,r,o,a,i,u,s,l,c,f,h,p,d,m,g,v,y,b,x,M,_,w,k,S,A,E,T,P,R,N,O,C,L,U,j,D,z,q,F,B,I,X,Y,V,H,G,W,Z,J,$,K,Q,tt,nt,et,rt,ot,at,it,ut,st,lt,ct,ft,ht,pt,dt,mt,gt,vt=0;u=2*Math.PI/(this.nbase+1),b=null,N=-1;var yt=0;for(k=0;null!=(v=t.getConnection(yt));yt++,k++)e=-Math.sin(u*v.getStart()),r=Math.cos(u*v.getStart()),o=-Math.sin(u*v.getEnd()),a=Math.cos(u*v.getEnd())-r,i=e-o,s=Math.sqrt(a*a+i*i),v.setXrad(a/s),v.setYrad(i/s),v.setAngle(Math.atan2(i,a)),v.getAngle()<0&&v.setAngle(v.getAngle()+2*Math.PI),null!=n&&n.getRegion()==v.getRegion()&&(b=v,N=k);t:for(;;){this.determine_radius(t,this.lencut),l=t.getRadius()/this.RADIUS_REDUCTION_FACTOR,null==n?c=f=0:(h=(this.bases[b.getStart()].getX()+this.bases[b.getEnd()].getX())/2,p=(this.bases[b.getStart()].getY()+this.bases[b.getEnd()].getY())/2,c=h-l*b.getXrad(),f=p-l*b.getYrad()),T=-1==N?0:N,v=t.getConnection(T),E=0,O=!1;do{if((_=T-1)<0&&(_=t.getNconnection()-1),x=t.getConnection(_),this.connected_connection(x,v)?(T=_,v=x):O=!0,++E>t.getNconnection()){for(A=-1,k=0;k=t.getNconnection()&&(_=0),v=t.getConnection(k),(ht=(y=t.getConnection(_)).getAngle()-v.getAngle())<0&&(ht+=2*Math.PI),ht>A&&(A=ht,vt=k);P=vt,(T=vt+1)>=t.getNconnection()&&(T=0),(v=t.getConnection(P)).setBroken(!0),O=!0}}while(!O);for(C=!1,G=T;!C;){for(E=0,O=!1,P=T,L=!1;!O;)if(v=t.getConnection(P),P==N&&(L=!0),(_=P+1)>=t.getNconnection()&&(_=0),y=t.getConnection(_),this.connected_connection(v,y)){if(++E>=t.getNconnection())break;P=_}else O=!0;for(k=W=Z=R=this.find_ic_middle(T,P,n,b,t),O=!1,$=0;!O;)(k=$<0?W:0==$?R:Z)>=0&&(v=t.getConnection(k),null!=n&&b==v||(0==$?(d=v.getAngle()-Math.asin(.5/l),m=v.getAngle()+Math.asin(.5/l),this.bases[v.getStart()].setX(c+l*Math.cos(d)),this.bases[v.getStart()].setY(f+l*Math.sin(d)),this.bases[v.getEnd()].setX(c+l*Math.cos(m)),this.bases[v.getEnd()].setY(f+l*Math.sin(m))):$<0?((_=k+1)>=t.getNconnection()&&(_=0),v=t.getConnection(k),y=t.getConnection(_),et=v.getXrad(),rt=v.getYrad(),ht=(v.getAngle()+y.getAngle())/2,v.getAngle()>y.getAngle()&&(ht-=Math.PI),it=Math.cos(ht),lt=Math.sin(ht),ct=-it,(S=y.getAngle()-v.getAngle())<0&&(S+=2*Math.PI),ft=v.isExtruded()?S<=Math.PI/2?2:1.5:1,this.bases[v.getEnd()].setX(this.bases[y.getStart()].getX()+ft*lt),this.bases[v.getEnd()].setY(this.bases[y.getStart()].getY()+ft*ct),this.bases[v.getStart()].setX(this.bases[v.getEnd()].getX()+rt),this.bases[v.getStart()].setY(this.bases[v.getEnd()].getY()-et)):((_=k-1)<0&&(_=t.getNconnection()-1),v=t.getConnection(_),ot=(y=t.getConnection(k)).getXrad(),at=y.getYrad(),ht=(v.getAngle()+y.getAngle())/2,v.getAngle()>y.getAngle()&&(ht-=Math.PI),it=Math.cos(ht),lt=-Math.sin(ht),ct=it,(S=y.getAngle()-v.getAngle())<0&&(S+=2*Math.PI),ft=v.isExtruded()?S<=Math.PI/2?2:1.5:1,this.bases[y.getStart()].setX(this.bases[v.getEnd()].getX()+ft*lt),this.bases[y.getStart()].setY(this.bases[v.getEnd()].getY()+ft*ct),this.bases[y.getEnd()].setX(this.bases[y.getStart()].getX()-at),this.bases[y.getEnd()].setY(this.bases[y.getStart()].getY()+ot)))),$<0?(Z==P?Z=-1:Z>=0&&++Z>=t.getNconnection()&&(Z=0),$=1):(W==T?W=-1:W>=0&&--W<0&&(W=t.getNconnection()-1),$=-1),O=-1==W&&-1==Z;if((J=P+1)>=t.getNconnection()&&(J=0),P!=T&&(T!=G||J!=G))if(v=t.getConnection(T),y=t.getConnection(P),Q=this.bases[y.getEnd()].getX()-this.bases[v.getStart()].getX(),tt=this.bases[y.getEnd()].getY()-this.bases[v.getStart()].getY(),j=this.bases[v.getStart()].getX()+Q/2,D=this.bases[v.getStart()].getY()+tt/2,F=Q/(nt=Math.sqrt(Q*Q+tt*tt)),B=tt/nt,I=c-j,X=f-D,z=(Y=(I/=nt=Math.sqrt(Q*Q+tt*tt))*F+(X/=nt)*B)*F-I,q=Y*B-X,z/=nt=Math.sqrt(z*z+q*q),q/=nt,Q=this.bases[v.getStart()].getX()-c,tt=this.bases[v.getStart()].getY()-f,(ht=Math.atan2(tt,Q))<0&&(ht+=2*Math.PI),Q=this.bases[y.getEnd()].getX()-c,tt=this.bases[y.getEnd()].getY()-f,(pt=Math.atan2(tt,Q))<0&&(pt+=2*Math.PI),ptMath.PI?-1:1)*l*z,H=f+U*l*q,L)c-=V-j,f-=H-D;else for(k=T;M=(v=t.getConnection(k)).getStart(),this.bases[M].setX(this.bases[M].getX()+V-j),this.bases[M].setY(this.bases[M].getY()+H-D),M=v.getEnd(),this.bases[M].setX(this.bases[M].getX()+V-j),this.bases[M].setY(this.bases[M].getY()+H-D),k!=P;)++k>=t.getNconnection()&&(k=0);C=(T=J)==G}for(k=0;k=t.getNconnection()&&(_=0),y=t.getConnection(_),Q=this.bases[v.getEnd()].getX()-c,tt=this.bases[v.getEnd()].getY()-f,st=Math.sqrt(Q*Q+tt*tt),(ht=Math.atan2(tt,Q))<0&&(ht+=2*Math.PI),Q=this.bases[y.getStart()].getX()-c,tt=this.bases[y.getStart()].getY()-f,ut=Math.sqrt(Q*Q+tt*tt),(pt=Math.atan2(tt,Q))<0&&(pt+=2*Math.PI),ptMath.PI)if(v.isExtruded())console.log("Warning from traverse_loop. Loop "+t.getNumber()+" has crossed regions\n");else if(y.getStart()-v.getEnd()!=1){v.setExtruded(!0);continue t}if(v.isExtruded())this.construct_extruded_segment(v,y);else for((w=y.getStart()-v.getEnd())<0&&(w+=this.nbase+1),u=K/w,_=1;_this.nbase&&(M-=this.nbase+1),nt=st+(ut-st)*((g=ht+_*u)-ht)/K,this.bases[M].setX(c+nt*Math.cos(g)),this.bases[M].setY(f+nt*Math.sin(g))}break}for(k=0;k=t.getNconnection()&&(_=0),v=t.getConnection(k),y=t.getConnection(_),w+=2,dt+=this.bases[v.getStart()].getX()+this.bases[v.getEnd()].getX(),mt+=this.bases[v.getStart()].getY()+this.bases[v.getEnd()].getY(),!v.isExtruded())for(_=v.getEnd()+1;_!=y.getStart();_++)_>this.nbase&&(_-=this.nbase+1),w++,dt+=this.bases[_].getX(),mt+=this.bases[_].getY();t.setX(dt/w),t.setY(mt/w)},s.prototype.determine_radius=function(t,n){var e,r,a,i,u,s,l,c,f,h,p,d=0,m=new o.Connection,g=new o.Connection;do{for(e=1e10,u=0,i=0,c=0;c=t.getNconnection()&&(f=0),g=t.getConnection(f),h=m.getEnd(),(p=g.getStart())1&&(e=l,d=c);(s=i/u)<.7071068&&(s=.7071068),e*s0?s=t.getRadius():t.setRadius(s)},s.prototype.find_ic_middle=function(t,n,e,r,o){var a,i,u,s,l;for(a=0,i=-1,u=t,l=!1;!l;)a++>2*o.getNconnection()&&console.log("Infinite loop in 'find_ic_middle'"),null!=e&&o.getConnection(u)==r&&(i=u),l=u==n,++u>=o.getNconnection()&&(u=0);if(-1==i){for(s=1,u=t;s<(a+1)/2;s++)++u>=o.getNconnection()&&(u=0);i=u}return i},s.prototype.construct_extruded_segment=function(t,n){var e,r,o,a,i,u,s,l,c,f,h,p,d,m,g,v,y,b;if(e=t.getAngle(),(o=r=n.getAngle())=1.5&&h<=Math.PI/2&&((v=d+1)>this.nbase&&(v-=this.nbase+1),(y=m-1)<0&&(y+=this.nbase+1),this.bases[v].setX(this.bases[d].getX()+.5*i),this.bases[v].setY(this.bases[d].getY()+.5*u),this.bases[y].setX(this.bases[m].getX()-.5*i),this.bases[y].setY(this.bases[m].getY()-.5*u),d=v,m=y);do{b=!1,this.construct_circle_segment(d,m),(v=d+1)>this.nbase&&(v-=this.nbase+1),i=this.bases[v].getX()-this.bases[d].getX(),u=this.bases[v].getY()-this.bases[d].getY(),(s=Math.atan2(u,i))<0&&(s+=2*Math.PI),(p=s-e)<0&&(p+=2*Math.PI),p>Math.PI&&(b=!0),(y=m-1)<0&&(y+=this.nbase+1),i=this.bases[y].getX()-this.bases[m].getX(),u=this.bases[y].getY()-this.bases[m].getY(),(l=Math.atan2(u,i))<0&&(l+=2*Math.PI),(p=r-l)<0&&(p+=2*Math.PI),p>Math.PI&&(b=!0),b&&(c=this.minf2(a,e+.5),this.bases[v].setX(this.bases[d].getX()+Math.cos(c)),this.bases[v].setY(this.bases[d].getY()+Math.sin(c)),d=v,c=this.maxf2(a,o-.5),this.bases[y].setX(this.bases[m].getX()+Math.cos(c)),this.bases[y].setY(this.bases[m].getY()+Math.sin(c)),m=y,g-=2)}while(b&&g>1)}},s.prototype.construct_circle_segment=function(t,n){var e,r,o,a,i,u,s,l,c,f,h,p,d,m,g;if(e=this.bases[n].getX()-this.bases[t].getX(),r=this.bases[n].getY()-this.bases[t].getY(),o=Math.sqrt(e*e+r*r),(d=n-t)<0&&(d+=this.nbase+1),o>=d)for(e/=o,r/=o,m=1;mthis.nbase&&(g-=this.nbase+1),this.bases[g].setX(this.bases[t].getX()+e*m/d),this.bases[g].setY(this.bases[t].getY()+r*m/d);else for(this.find_center_for_arc(d-1,o),e/=o,r/=o,a=this.bases[t].getX()+e*o/2,i=this.bases[t].getY()+r*o/2,u=r,s=-e,l=a+this._h*u,c=i+this._h*s,f=this.bases[t].getX()-l,h=this.bases[t].getY()-c,o=Math.sqrt(f*f+h*h),p=Math.atan2(h,f),m=1;mthis.nbase&&(g-=this.nbase+1),this.bases[g].setX(l+o*Math.cos(p+m*this.angleinc)),this.bases[g].setY(c+o*Math.sin(p+m*this.angleinc))},s.prototype.find_center_for_arc=function(t,n){var e,r,o,a,i,u,s,l;o=-(r=(t+1)/Math.PI)-n/(t+1.000001-n),n<1&&(o=0),l=0;do{e=(r+o)/2,i=1-.5/((a=Math.sqrt(e*e+n*n/4))*a),Math.abs(i)>1&&console.log("Unexpected large magnitude discriminant = "+i+" "+a),(s=(u=Math.acos(i))*(t+1)+2*Math.acos(e/a)-2*Math.PI)>0?o=e:r=e}while(Math.abs(s)>1e-4&&++l=this.MAXITER&&(noIterationFailureYet&&(console.log("Iteration failed in find_center_for_arc"),noIterationFailureYet=!1),e=0,u=0),this._h=e,this.angleinc=u},s.prototype.generate_region=function(t){var n,e,r,o,a,i;for(i=t.getRegion(),n=0,t.getStart()==i.getStart1()?(e=i.getStart1(),r=i.getEnd1()):(e=i.getStart2(),r=i.getEnd2()),(this.bases[t.getStart()].getX()>this.ANUM-100||this.bases[t.getEnd()].getX()>this.ANUM-100)&&console.log("Bad region passed to generate_region. Coordinates not defined."),o=e+1;o<=r;o++)n++,this.bases[o].setX(this.bases[t.getStart()].getX()+this.HELIX_FACTOR*n*t.getXrad()),this.bases[o].setY(this.bases[t.getStart()].getY()+this.HELIX_FACTOR*n*t.getYrad()),a=this.bases[o].getMate(),this.bases[a].setX(this.bases[t.getEnd()].getX()+this.HELIX_FACTOR*n*t.getXrad()),this.bases[a].setY(this.bases[t.getEnd()].getY()+this.HELIX_FACTOR*n*t.getYrad())},s.prototype.minf2=function(t,n){return tn?t:n},s.prototype.connected_connection=function(t,n){return!!t.isExtruded()||t.getEnd()+1==n.getStart()}},function(t,n){"use strict";function e(){this.radius=null,this.loopnumber=null,this.next=null,this.prev=null}Object.defineProperty(n,"__esModule",{value:!0}),n.Radloop=e,e.prototype.getRadius=function(){return this.radius},e.prototype.setRadius=function(t){this.radius=t},e.prototype.getLoopnumber=function(){return this.loopnumber},e.prototype.setLoopnumber=function(t){this.loopnumber=t},e.prototype.getNext=function(){return this.next},e.prototype.setNext=function(t){this.next=t},e.prototype.getPrev=function(){return this.prev},e.prototype.setPrev=function(t){this.prev=t}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Connection=a;var r=e(8),o=e(9);function a(){this.loop=new r.Loop,this.region=new o.Region,this.start=null,this.end=null,this.xrad=null,this.yrad=null,this.angle=null,this.extruded=null,this.broken=null,this._isNull=!1}a.prototype.isNull=function(){return this._isNull},a.prototype.setNull=function(t){this._isNull=t},a.prototype.getLoop=function(){return this.loop},a.prototype.setLoop=function(t){this.loop=t},a.prototype.getRegion=function(){return this.region},a.prototype.setRegion=function(t){this.region=t},a.prototype.getStart=function(){return this.start},a.prototype.setStart=function(t){this.start=t},a.prototype.getEnd=function(){return this.end},a.prototype.setEnd=function(t){this.end=t},a.prototype.getXrad=function(){return this.xrad},a.prototype.setXrad=function(t){this.xrad=t},a.prototype.getYrad=function(){return this.yrad},a.prototype.setYrad=function(t){this.yrad=t},a.prototype.getAngle=function(){return this.angle},a.prototype.setAngle=function(t){this.angle=t},a.prototype.isExtruded=function(){return this.extruded},a.prototype.setExtruded=function(t){this.extruded=t},a.prototype.isBroken=function(){return this.broken},a.prototype.setBroken=function(t){this.broken=t}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Loop=o;var r=e(7);function o(){this.nconnection=null,this.connections=[],this._connections=[],this.number=null,this.depth=null,this.mark=null,this.x=null,this.y=null,this.radius=null}o.prototype.getNconnection=function(){return this.nconnection},o.prototype.setNconnection=function(t){this.nconnection=t},o.prototype.setConnection=function(t,n){null!=n?this._connections[t]=n:(this._connections[t]||(this._connections[t]=new r.Connection),this._connections[t].setNull(!0))},o.prototype.getConnection=function(t){var n=e(7);this._connections[t]||(this._connections[t]=new n);var r=this._connections[t];return r.isNull()?null:r},o.prototype.addConnection=function(t,n){this._connections.push(n)},o.prototype.getNumber=function(){return this.number},o.prototype.setNumber=function(t){this.number=t},o.prototype.getDepth=function(){return this.depth},o.prototype.setDepth=function(t){this.depth=t},o.prototype.isMark=function(){return this.mark},o.prototype.setMark=function(t){this.mark=t},o.prototype.getX=function(){return this.x},o.prototype.setX=function(t){this.x=t},o.prototype.getY=function(){return this.y},o.prototype.setY=function(t){this.y=t},o.prototype.getRadius=function(){return this.radius},o.prototype.setRadius=function(t){this.radius=t}},function(t,n){"use strict";function e(){this._start1=null,this._end1=null,this._start2=null,this._end2=null}Object.defineProperty(n,"__esModule",{value:!0}),n.Region=e,e.prototype.getStart1=function(){return this._start1},e.prototype.setStart1=function(t){this._start1=t},e.prototype.getEnd1=function(){return this._end1},e.prototype.setEnd1=function(t){this._end1=t},e.prototype.getStart2=function(){return this._start2},e.prototype.setStart2=function(t){this._start2=t},e.prototype.getEnd2=function(){return this._end2},e.prototype.setEnd2=function(t){this._end2=t}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Base=o;var r=e(9);function o(){this.mate=null,this.x=null,this.y=null,this.extracted=null,this.region=new r.Region}o.prototype.getMate=function(){return this.mate},o.prototype.setMate=function(t){this.mate=t},o.prototype.getX=function(){return this.x},o.prototype.setX=function(t){this.x=t},o.prototype.getY=function(){return this.y},o.prototype.setY=function(t){this.y=t},o.prototype.isExtracted=function(){return this.extracted},o.prototype.setExtracted=function(t){this.extracted=t},o.prototype.getRegion=function(){return this.region},o.prototype.setRegion=function(t){this.region=t}},function(t,n,e){var r=e(12);"string"==typeof r&&(r=[[t.id,r,""]]),e(14)(r,{}),r.locals&&(t.exports=r.locals)},function(t,n,e){(t.exports=e(13)()).push([t.id,'.forna-container .structure-background-rect {\n stroke: black;\n stroke-width: 5;\n fill: transparent;\n}\n\n.forna-container circle.rna-base {\n stroke: #ccc;\n stroke-width: 1px;\n opacity: 1;\n fill: white;\n}\n\n.forna-container circle.rna-base.label {\n stroke: transparent;\n stroke-width: 0;\n fill: white;\n}\n\n.forna-container line.link {\n stroke: #999;\n stroke-opacity: 0.8;\n stroke-width: 2;\n}\n\n.forna-container line.rna-link {\n stroke: #999;\n stroke-opacity: 0.8;\n stroke-width: 2;\n}\n\n.forna-container .overlay {\n fill: transparent;\n}\n\n.forna-container .rna-name {\n text-anchor: middle;\n dy: -10;\n font-family: Tahoma, Geneva, sans-serif;\n font-size: 8pt;\n}\n\n.forna-container line.rna-link[link-type="backbone"] {\n stroke: transparent;\n}\n\n.forna-container line.rna-link[link-type="basepair"] {\n stroke: transparent;\n}\n\n.forna-container line.rna-link[link-type="fake"] {\n stroke: transparent;\n}\n\n.forna-container line.rna-link[link-type="extra"] {\n stroke: grey;\n}\n\n.forna-container line.rna-link[extra-link-type="correct"] {\n stroke: green;\n}\n\n.forna-container line.rna-link[extra-link-type="incorrect"] {\n stroke: green;\n}\n\n\n.forna-container path {\n stroke-width: 2;\n}\n\n.forna-container path[extra-link-type="correct"] {\n stroke: green;\n}\n\n.forna-container path[extra-link-type="incorrect"] {\n stroke: red;\n}\n\n\n.forna-container line.basepair {\n stroke: red;\n}\n\n.forna-container line.intermolecule {\n stroke: blue;\n}\n\n.forna-container line.chain_chain {\n stroke-dasharray: 3,3;\n}\n\n.forna-container line.fake {\n stroke: green;\n}\n\n.forna-container .transparent {\n fill: transparent;\n stroke-width: 0;\n stroke-opacity: 0;\n opacity: 0;\n}\n\n.forna-container .d3-tip {\n line-height: 1;\n font-weight: bold;\n padding: 6px;\n background: rgba(0, 0, 0, 0.6);\n color: #fff;\n border-radius: 4px;\n pointer-events: none;\n}\n\n.forna-container text.nucleotide-label {\n font-size: 5.5pt;\n font-weight: bold;\n font-family: Tahoma, Geneva, sans-serif;\n color: rgb(100,100,100);\n pointer-events: none;\n}\n\n.forna-container text.number-label {\n font-size: 5.5pt;\n font-weight: bold;\n font-family: Tahoma, Geneva, sans-serif;\n color: rgb(100,100,100);\n pointer-events: none;\n}\n\n.forna-container text {\n pointer-events: none;\n}\n\n.forna-container g.gnode {\n\n}\n\n.forna-container .brush .extent {\n fill-opacity: .1;\n stroke: #fff;\n shape-rendering: crispEdges;\n}\n\n.forna-container .noselect {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n',""])},function(t,n){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],n=0;n=0&&l.splice(n,1)}function d(t){var n=document.createElement("style");return n.type="text/css",h(t,n),n}function m(t,n){var e,r,o;if(n.singleton){var a=s++;e=u||(u=d(n)),r=y.bind(null,e,a,!1),o=y.bind(null,e,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(e=function(t){var n=document.createElement("link");return n.rel="stylesheet",h(t,n),n}(n),r=x.bind(null,e),o=function(){p(e),e.href&&URL.revokeObjectURL(e.href)}):(e=d(n),r=b.bind(null,e),o=function(){p(e)});return r(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;r(t=n)}else o()}}t.exports=function(t,n){void 0===(n=n||{}).singleton&&(n.singleton=a()),void 0===n.insertAt&&(n.insertAt="bottom");var e=f(t);return c(e,n),function(t){for(var o=[],a=0;an?1:t>=n?0:NaN}function v(t){return null===t?NaN:+t}function y(t){return!isNaN(t)}function b(t){return{left:function(n,e,r,o){for(arguments.length<3&&(r=0),arguments.length<4&&(o=n.length);r>>1;t(n[a],e)<0?r=a+1:o=a}return r},right:function(n,e,r,o){for(arguments.length<3&&(r=0),arguments.length<4&&(o=n.length);r>>1;t(n[a],e)>0?o=a:r=a+1}return r}}}a.ascending=g,a.descending=function(t,n){return nt?1:n>=t?0:NaN},a.min=function(t,n){var e,r,o=-1,a=t.length;if(1===arguments.length){for(;++o=r){e=r;break}for(;++or&&(e=r)}else{for(;++o=r){e=r;break}for(;++or&&(e=r)}return e},a.max=function(t,n){var e,r,o=-1,a=t.length;if(1===arguments.length){for(;++o=r){e=r;break}for(;++oe&&(e=r)}else{for(;++o=r){e=r;break}for(;++oe&&(e=r)}return e},a.extent=function(t,n){var e,r,o,a=-1,i=t.length;if(1===arguments.length){for(;++a=r){e=o=r;break}for(;++ar&&(e=r),o=r){e=o=r;break}for(;++ar&&(e=r),o1)return i/(s-1)},a.deviation=function(){var t=a.variance.apply(this,arguments);return t?Math.sqrt(t):t};var x=b(g);function M(t){return t.length}a.bisectLeft=x.left,a.bisect=a.bisectRight=x.right,a.bisector=function(t){return b(1===t.length?function(n,e){return g(t(n),e)}:t)},a.shuffle=function(t,n,e){(a=arguments.length)<3&&(e=t.length,a<2&&(n=0));for(var r,o,a=e-n;a;)o=Math.random()*a--|0,r=t[a+n],t[a+n]=t[o+n],t[o+n]=r;return t},a.permute=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},a.pairs=function(t){for(var n=0,e=t.length-1,r=t[0],o=new Array(e<0?0:e);n=0;)for(n=(r=t[o]).length;--n>=0;)e[--i]=r[n];return e};var _=Math.abs;function w(t){for(var n=1;t*n%1;)n*=10;return n}function k(t,n){for(var e in n)Object.defineProperty(t.prototype,e,{value:n[e],enumerable:!1})}function S(){this._=Object.create(null)}function A(t){return"__proto__"==(t+="")||"\0"===t[0]?"\0"+t:t}function E(t){return"\0"===(t+="")[0]?t.slice(1):t}function T(t){return A(t)in this._}function P(t){return(t=A(t))in this._&&delete this._[t]}function R(){var t=[];for(var n in this._)t.push(E(n));return t}function N(){var t=0;for(var n in this._)++t;return t}function O(){for(var t in this._)return!1;return!0}function C(){this._=Object.create(null)}function L(t){return t}function U(t,n,e){return function(){var r=e.apply(n,arguments);return r===n?t:r}}function j(t,n){if(n in t)return n;n=n.charAt(0).toUpperCase()+n.slice(1);for(var e=0,r=D.length;en;)o.push(r/a);else for(;(r=t+e*++i)=r.length)return n?n.call(e,a):t?a.sort(t):a;for(var s,l,c,f,h=-1,p=a.length,d=r[u++],m=new S;++h=r.length)return n;var a=[],i=o[e++];return n.forEach((function(n,r){a.push({key:n,values:t(r,e)})})),i?a.sort((function(t,n){return i(t.key,n.key)})):a}(i(a.map,t,0),0)},e.key=function(t){return r.push(t),e},e.sortKeys=function(t){return o[r.length-1]=t,e},e.sortValues=function(n){return t=n,e},e.rollup=function(t){return n=t,e},e},a.set=function(t){var n=new C;if(t)for(var e=0,r=t.length;e=0&&(r=t.slice(e+1),t=t.slice(0,e)),t)return arguments.length<2?this[t].on(r):this[t].on(r,n);if(2===arguments.length){if(null==n)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},a.event=null,a.requote=function(t){return t.replace(Y,"\\$&")};var Y=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,V={}.__proto__?function(t,n){t.__proto__=n}:function(t,n){for(var e in n)t[e]=n[e]};function H(t){return V(t,J),t}var G=function(t,n){return n.querySelector(t)},W=function(t,n){return n.querySelectorAll(t)},Z=function(t,n){var e=t.matches||t[j(t,"matchesSelector")];return(Z=function(t,n){return e.call(t,n)})(t,n)};"function"==typeof Sizzle&&(G=function(t,n){return Sizzle(t,n)[0]||null},W=Sizzle,Z=Sizzle.matchesSelector),a.selection=function(){return a.select(s.documentElement)};var J=a.selection.prototype=[];function $(t){return"function"==typeof t?t:function(){return G(t,this)}}function K(t){return"function"==typeof t?t:function(){return W(t,this)}}J.select=function(t){var n,e,r,o,a=[];t=$(t);for(var i=-1,u=this.length;++i=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),tt.hasOwnProperty(e)?{space:tt[e],local:t}:t}},J.attr=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node();return(t=a.ns.qualify(t)).local?e.getAttributeNS(t.space,t.local):e.getAttribute(t)}for(n in t)this.each(nt(n,t[n]));return this}return this.each(nt(t,n))},J.classed=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node(),r=(t=ot(t)).length,o=-1;if(n=e.classList){for(;++o=0;)(e=r[o])&&(a&&a!==e.nextSibling&&a.parentNode.insertBefore(e,a),a=e);return this},J.sort=function(t){t=pt.apply(this,arguments);for(var n=-1,e=this.length;++n=n&&(n=o+1);!(i=u[n])&&++n0&&(t=t.slice(0,o));var s=bt.get(t);function l(){var n=this[r];n&&(this.removeEventListener(t,n,n.$),delete this[r])}return s&&(t=s,i=Mt),o?n?function(){var o=i(n,u(arguments));l.call(this),this.addEventListener(t,this[r]=o,o.$=e),o._=n}:l:n?z:function(){var n,e=new RegExp("^__on([^.]+)"+a.requote(t)+"$");for(var r in this)if(n=r.match(e)){var o=this[r];this.removeEventListener(n[1],o,o.$),delete this[r]}}}a.selection.enter=mt,a.selection.enter.prototype=gt,gt.append=J.append,gt.empty=J.empty,gt.node=J.node,gt.call=J.call,gt.size=J.size,gt.select=function(t){for(var n,e,r,o,a,i=[],u=-1,s=this.length;++u0?1:t<0?-1:0}function Dt(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])}function zt(t){return t>1?0:t<-1?Rt:Math.acos(t)}function qt(t){return t>1?Ct:t<-1?-Ct:Math.asin(t)}function Ft(t){return((t=Math.exp(t))+1/t)/2}function Bt(t){return(t=Math.sin(t/2))*t}var It=Math.SQRT2;a.interpolateZoom=function(t,n){var e,r,o=t[0],a=t[1],i=t[2],u=n[0],s=n[1],l=n[2],c=u-o,f=s-a,h=c*c+f*f;if(h0&&(t=t.transition().duration(m)),t.call(_.event)}function E(){u&&u.domain(i.range().map((function(t){return(t-h.x)/h.k})).map(i.invert)),f&&f.domain(l.range().map((function(t){return(t-h.y)/h.k})).map(l.invert))}function T(t){g++||t({type:"zoomstart"})}function P(t){E(),t({type:"zoom",scale:h.k,translate:[h.x,h.y]})}function R(t){--g||(t({type:"zoomend"}),n=null)}function N(){var t=this,n=M.of(t,arguments),e=0,r=a.select(c(t)).on(y,u).on(b,s),o=w(a.mouse(t)),i=kt(t);function u(){e=1,S(a.mouse(t),o),P(n)}function s(){r.on(y,null).on(b,null),i(e),R(n)}Mu.call(t),T(n)}function O(){var t,n=this,e=M.of(n,arguments),r={},i=0,u=".zoom-"+a.event.changedTouches[0].identifier,s="touchmove"+u,l="touchend"+u,c=[],f=a.select(n),p=kt(n);function d(){var e=a.touches(n);return t=h.k,e.forEach((function(t){t.identifier in r&&(r[t.identifier]=w(t))})),e}function m(){var t=a.event.target;a.select(t).on(s,g).on(l,y),c.push(t);for(var e=a.event.changedTouches,u=0,f=e.length;u1){v=p[0];var b=p[1],x=v[0]-b[0],M=v[1]-b[1];i=x*x+M*M}}function g(){var u,s,l,c,f=a.touches(n);Mu.call(n);for(var h=0,p=f.length;h360?t-=360:t<0&&(t+=360),t<60?r+(o-r)*t/60:t<180?o:t<240?r+(o-r)*(240-t)/60:r}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,n=isNaN(n)?0:n<0?0:n>1?1:n,r=2*(e=e<0?0:e>1?1:e)-(o=e<=.5?e*(1+n):e+n-e*n),new sn(a(t+120),a(t),a(t-120))}function Jt(t,n,e){return this instanceof Jt?(this.h=+t,this.c=+n,void(this.l=+e)):arguments.length<2?t instanceof Jt?new Jt(t.h,t.c,t.l):rn(t instanceof Qt?t.l:(t=mn((t=a.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Jt(t,n,e)}Wt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Gt(this.h,this.s,this.l/t)},Wt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Gt(this.h,this.s,t*this.l)},Wt.rgb=function(){return Zt(this.h,this.s,this.l)},a.hcl=Jt;var $t=Jt.prototype=new Ht;function Kt(t,n,e){return isNaN(t)&&(t=0),isNaN(n)&&(n=0),new Qt(e,Math.cos(t*=Lt)*n,Math.sin(t)*n)}function Qt(t,n,e){return this instanceof Qt?(this.l=+t,this.a=+n,void(this.b=+e)):arguments.length<2?t instanceof Qt?new Qt(t.l,t.a,t.b):t instanceof Jt?Kt(t.h,t.c,t.l):mn((t=sn(t)).r,t.g,t.b):new Qt(t,n,e)}$t.brighter=function(t){return new Jt(this.h,this.c,Math.min(100,this.l+tn*(arguments.length?t:1)))},$t.darker=function(t){return new Jt(this.h,this.c,Math.max(0,this.l-tn*(arguments.length?t:1)))},$t.rgb=function(){return Kt(this.h,this.c,this.l).rgb()},a.lab=Qt;var tn=18,nn=Qt.prototype=new Ht;function en(t,n,e){var r=(t+16)/116,o=r+n/500,a=r-e/200;return new sn(un(3.2404542*(o=.95047*on(o))-1.5371385*(r=1*on(r))-.4985314*(a=1.08883*on(a))),un(-.969266*o+1.8760108*r+.041556*a),un(.0556434*o-.2040259*r+1.0572252*a))}function rn(t,n,e){return t>0?new Jt(Math.atan2(e,n)*Ut,Math.sqrt(n*n+e*e),t):new Jt(NaN,NaN,t)}function on(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function an(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function un(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function sn(t,n,e){return this instanceof sn?(this.r=~~t,this.g=~~n,void(this.b=~~e)):arguments.length<2?t instanceof sn?new sn(t.r,t.g,t.b):pn(""+t,sn,Zt):new sn(t,n,e)}function ln(t){return new sn(t>>16,t>>8&255,255&t)}function cn(t){return ln(t)+""}nn.brighter=function(t){return new Qt(Math.min(100,this.l+tn*(arguments.length?t:1)),this.a,this.b)},nn.darker=function(t){return new Qt(Math.max(0,this.l-tn*(arguments.length?t:1)),this.a,this.b)},nn.rgb=function(){return en(this.l,this.a,this.b)},a.rgb=sn;var fn=sn.prototype=new Ht;function hn(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function pn(t,n,e){var r,o,a,i=0,u=0,s=0;if(r=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(o=r[2].split(","),r[1]){case"hsl":return e(parseFloat(o[0]),parseFloat(o[1])/100,parseFloat(o[2])/100);case"rgb":return n(vn(o[0]),vn(o[1]),vn(o[2]))}return(a=yn.get(t))?n(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(i=(3840&a)>>4,i|=i>>4,u=240&a,u|=u>>4,s=15&a,s|=s<<4):7===t.length&&(i=(16711680&a)>>16,u=(65280&a)>>8,s=255&a)),n(i,u,s))}function dn(t,n,e){var r,o,a=Math.min(t/=255,n/=255,e/=255),i=Math.max(t,n,e),u=i-a,s=(i+a)/2;return u?(o=s<.5?u/(i+a):u/(2-i-a),r=t==i?(n-e)/u+(n0&&s<1?0:r),new Gt(r,o,s)}function mn(t,n,e){var r=an((.4124564*(t=gn(t))+.3575761*(n=gn(n))+.1804375*(e=gn(e)))/.95047),o=an((.2126729*t+.7151522*n+.072175*e)/1);return Qt(116*o-16,500*(r-o),200*(o-an((.0193339*t+.119192*n+.9503041*e)/1.08883)))}function gn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function vn(t){var n=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*n):n}fn.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var n=this.r,e=this.g,r=this.b,o=30;return n||e||r?(n&&n=200&&n<300||304===n){try{t=e.call(o,l)}catch(t){return void i.error.call(o,t)}i.load.call(o,t)}else i.error.call(o,l)}return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(t)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=f:l.onreadystatechange=function(){l.readyState>3&&f()},l.onprogress=function(t){var n=a.event;a.event=t;try{i.progress.call(o,l)}finally{a.event=n}},o.header=function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?s[t]:(null==n?delete s[t]:s[t]=n+"",o)},o.mimeType=function(t){return arguments.length?(n=null==t?null:t+"",o):n},o.responseType=function(t){return arguments.length?(c=t,o):c},o.response=function(t){return e=t,o},["get","post"].forEach((function(t){o[t]=function(){return o.send.apply(o,[t].concat(u(arguments)))}})),o.send=function(e,r,a){if(2===arguments.length&&"function"==typeof r&&(a=r,r=null),l.open(e,t,!0),null==n||"accept"in s||(s.accept=n+",*/*"),l.setRequestHeader)for(var u in s)l.setRequestHeader(u,s[u]);return null!=n&&l.overrideMimeType&&l.overrideMimeType(n),null!=c&&(l.responseType=c),null!=a&&o.on("error",a).on("load",(function(t){a(null,t)})),i.beforesend.call(o,l),l.send(null==r?null:r),o},o.abort=function(){return l.abort(),o},a.rebind(o,i,"on"),null==r?o:o.get(function(t){return 1===t.length?function(n,e){t(null==n?e:null)}:t}(r))}yn.forEach((function(t,n){yn.set(t,ln(n))})),a.functor=bn,a.xhr=xn(L),a.dsv=function(t,n){var e=new RegExp('["'+t+"\n]"),r=t.charCodeAt(0);function o(t,e,r){arguments.length<3&&(r=e,e=null);var o=Mn(t,n,null==e?a:i(e),r);return o.row=function(t){return arguments.length?o.response(null==(e=t)?a:i(t)):e},o}function a(t){return o.parse(t.responseText)}function i(t){return function(n){return o.parse(n.responseText,t)}}function u(n){return n.map(s).join(t)}function s(t){return e.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return o.parse=function(t,n){var e;return o.parseRows(t,(function(t,r){if(e)return e(t,r-1);var o=new Function("d","return {"+t.map((function(t,n){return JSON.stringify(t)+": d["+n+"]"})).join(",")+"}");e=n?function(t,e){return n(o(t),e)}:o}))},o.parseRows=function(t,n){var e,o,a={},i={},u=[],s=t.length,l=0,c=0;function f(){if(l>=s)return i;if(o)return o=!1,a;var n=l;if(34===t.charCodeAt(n)){for(var e=n;e++24?(isFinite(n)&&(clearTimeout(Sn),Sn=setTimeout(Tn,n)),kn=0):(kn=1,An(Tn))}function Pn(){for(var t=Date.now(),n=_n;n;)t>=n.t&&n.c(t-n.t)&&(n.c=null),n=n.n;return t}function Rn(){for(var t,n=_n,e=1/0;n;)n.c?(n.t8?function(t){return t/e}:function(t){return t*e},symbol:t}}));function Cn(t){var n=t.decimal,e=t.thousands,r=t.grouping,o=t.currency,i=r&&e?function(t,n){for(var o=t.length,a=[],i=0,u=r[0],s=0;o>0&&u>0&&(s+u+1>n&&(u=Math.max(1,n-s)),a.push(t.substring(o-=u,o+u)),!((s+=u+1)>n));)u=r[i=(i+1)%r.length];return a.reverse().join(e)}:L;return function(t){var e=Ln.exec(t),r=e[1]||" ",u=e[2]||">",s=e[3]||"-",l=e[4]||"",c=e[5],f=+e[6],h=e[7],p=e[8],d=e[9],m=1,g="",v="",y=!1,b=!0;switch(p&&(p=+p.substring(1)),(c||"0"===r&&"="===u)&&(c=r="0",u="="),d){case"n":h=!0,d="g";break;case"%":m=100,v="%",d="f";break;case"p":m=100,v="%",d="r";break;case"b":case"o":case"x":case"X":"#"===l&&(g="0"+d.toLowerCase());case"c":b=!1;case"d":y=!0,p=0;break;case"s":m=-1,d="r"}"$"===l&&(g=o[0],v=o[1]),"r"!=d||p||(d="g"),null!=p&&("g"==d?p=Math.max(1,Math.min(21,p)):"e"!=d&&"f"!=d||(p=Math.max(0,Math.min(20,p)))),d=Un.get(d)||jn;var x=c&&h;return function(t){var e=v;if(y&&t%1)return"";var o=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===s?"":s;if(m<0){var l=a.formatPrefix(t,p);t=l.scale(t),e=l.symbol+v}else t*=m;var M,_,w=(t=d(t,p)).lastIndexOf(".");if(w<0){var k=b?t.lastIndexOf("e"):-1;k<0?(M=t,_=""):(M=t.substring(0,k),_=t.substring(k))}else M=t.substring(0,w),_=n+t.substring(w+1);!c&&h&&(M=i(M,1/0));var S=g.length+M.length+_.length+(x?0:o.length),A=S"===u?A+o+t:"^"===u?A.substring(0,S>>=1)+o+t+A.substring(S):o+(x?t:A+t))+e}}}a.formatPrefix=function(t,n){var e=0;return(t=+t)&&(t<0&&(t*=-1),n&&(t=a.round(t,Nn(t,n))),e=1+Math.floor(1e-12+Math.log(t)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),On[8+e/3]};var Ln=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Un=a.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,n){return t.toPrecision(n)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},r:function(t,n){return(t=a.round(t,Nn(t,n))).toFixed(Math.max(0,Math.min(20,Nn(t*(1+1e-15),n))))}});function jn(t){return t+""}var Dn=a.time={},zn=Date;function qn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}qn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Fn.setUTCDate.apply(this._,arguments)},setDay:function(){Fn.setUTCDay.apply(this._,arguments)},setFullYear:function(){Fn.setUTCFullYear.apply(this._,arguments)},setHours:function(){Fn.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Fn.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Fn.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Fn.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Fn.setUTCSeconds.apply(this._,arguments)},setTime:function(){Fn.setTime.apply(this._,arguments)}};var Fn=Date.prototype;function Bn(t,n,e){function r(n){var e=t(n),r=a(e,1);return n-e1)for(;i=l)return-1;if(37===(o=n.charCodeAt(u++))){if(i=n.charAt(u++),!(a=_[i in Yn?n.charAt(u++):i])||(r=a(t,e,r))<0)return-1}else if(o!=e.charCodeAt(r++))return-1}return r}c.utc=function(t){var n=c(t);function e(t){try{var e=new(zn=qn);return e._=t,n(e)}finally{zn=Date}}return e.parse=function(t){try{zn=qn;var e=n.parse(t);return e&&e._}finally{zn=Date}},e.toString=n.toString,e},c.multi=c.utc.multi=fe;var h=a.map(),p=Wn(i),d=Zn(i),m=Wn(u),g=Zn(u),v=Wn(s),y=Zn(s),b=Wn(l),x=Zn(l);o.forEach((function(t,n){h.set(t.toLowerCase(),n)}));var M={a:function(t){return u[t.getDay()]},A:function(t){return i[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:c(n),d:function(t,n){return Gn(t.getDate(),n,2)},e:function(t,n){return Gn(t.getDate(),n,2)},H:function(t,n){return Gn(t.getHours(),n,2)},I:function(t,n){return Gn(t.getHours()%12||12,n,2)},j:function(t,n){return Gn(1+Dn.dayOfYear(t),n,3)},L:function(t,n){return Gn(t.getMilliseconds(),n,3)},m:function(t,n){return Gn(t.getMonth()+1,n,2)},M:function(t,n){return Gn(t.getMinutes(),n,2)},p:function(t){return o[+(t.getHours()>=12)]},S:function(t,n){return Gn(t.getSeconds(),n,2)},U:function(t,n){return Gn(Dn.sundayOfYear(t),n,2)},w:function(t){return t.getDay()},W:function(t,n){return Gn(Dn.mondayOfYear(t),n,2)},x:c(e),X:c(r),y:function(t,n){return Gn(t.getFullYear()%100,n,2)},Y:function(t,n){return Gn(t.getFullYear()%1e4,n,4)},Z:le,"%":function(){return"%"}},_={a:function(t,n,e){m.lastIndex=0;var r=m.exec(n.slice(e));return r?(t.w=g.get(r[0].toLowerCase()),e+r[0].length):-1},A:function(t,n,e){p.lastIndex=0;var r=p.exec(n.slice(e));return r?(t.w=d.get(r[0].toLowerCase()),e+r[0].length):-1},b:function(t,n,e){b.lastIndex=0;var r=b.exec(n.slice(e));return r?(t.m=x.get(r[0].toLowerCase()),e+r[0].length):-1},B:function(t,n,e){v.lastIndex=0;var r=v.exec(n.slice(e));return r?(t.m=y.get(r[0].toLowerCase()),e+r[0].length):-1},c:function(t,n,e){return f(t,M.c.toString(),n,e)},d:re,e:re,H:ae,I:ae,j:oe,L:se,m:ee,M:ie,p:function(t,n,e){var r=h.get(n.slice(e,e+=2).toLowerCase());return null==r?-1:(t.p=r,e)},S:ue,U:$n,w:Jn,W:Kn,x:function(t,n,e){return f(t,M.x.toString(),n,e)},X:function(t,n,e){return f(t,M.X.toString(),n,e)},y:te,Y:Qn,Z:ne,"%":ce};return c}Dn.year=Bn((function(t){return(t=Dn.day(t)).setMonth(0,1),t}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t){return t.getFullYear()})),Dn.years=Dn.year.range,Dn.years.utc=Dn.year.utc.range,Dn.day=Bn((function(t){var n=new zn(2e3,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n}),(function(t,n){t.setDate(t.getDate()+n)}),(function(t){return t.getDate()-1})),Dn.days=Dn.day.range,Dn.days.utc=Dn.day.utc.range,Dn.dayOfYear=function(t){var n=Dn.year(t);return Math.floor((t-n-6e4*(t.getTimezoneOffset()-n.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach((function(t,n){n=7-n;var e=Dn[t]=Bn((function(t){return(t=Dn.day(t)).setDate(t.getDate()-(t.getDay()+n)%7),t}),(function(t,n){t.setDate(t.getDate()+7*Math.floor(n))}),(function(t){var e=Dn.year(t).getDay();return Math.floor((Dn.dayOfYear(t)+(e+n)%7)/7)-(e!==n)}));Dn[t+"s"]=e.range,Dn[t+"s"].utc=e.utc.range,Dn[t+"OfYear"]=function(t){var e=Dn.year(t).getDay();return Math.floor((Dn.dayOfYear(t)+(e+n)%7)/7)}})),Dn.week=Dn.sunday,Dn.weeks=Dn.sunday.range,Dn.weeks.utc=Dn.sunday.utc.range,Dn.weekOfYear=Dn.sundayOfYear;var Yn={"-":"",_:" ",0:"0"},Vn=/^\s*\d+/,Hn=/^%/;function Gn(t,n,e){var r=t<0?"-":"",o=(r?-t:t)+"",a=o.length;return r+(a68?1900:2e3),e+o[0].length):-1}function ne(t,n,e){return/^[+-]\d{4}$/.test(n=n.slice(e,e+5))?(t.Z=-n,e+5):-1}function ee(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function re(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function oe(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+3));return r?(t.j=+r[0],e+r[0].length):-1}function ae(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function ie(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function ue(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function se(t,n,e){Vn.lastIndex=0;var r=Vn.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function le(t){var n=t.getTimezoneOffset(),e=n>0?"-":"+",r=_(n)/60|0,o=_(n)%60;return e+Gn(r,"0",2)+Gn(o,"0",2)}function ce(t,n,e){Hn.lastIndex=0;var r=Hn.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function fe(t){for(var n=t.length,e=-1;++e=0?1:-1,u=i*a,s=Math.cos(n),l=Math.sin(n),c=o*l,f=r*s+c*Math.cos(u),h=c*i*Math.sin(u);Ce.add(Math.atan2(h,f)),e=t,r=s,o=l}Le.point=function(i,u){Le.point=a,e=(t=i)*Lt,r=Math.cos(u=(n=u)*Lt/2+Rt/4),o=Math.sin(u)},Le.lineEnd=function(){a(t,n)}}function je(t){var n=t[0],e=t[1],r=Math.cos(e);return[r*Math.cos(n),r*Math.sin(n),Math.sin(e)]}function De(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function ze(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function qe(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function Fe(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function Be(t){var n=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function Ie(t){return[Math.atan2(t[1],t[0]),qt(t[2])]}function Xe(t,n){return _(t[0]-n[0])Tt?r=90:l<-Tt&&(n=-90),f[0]=t,f[1]=e}};function p(o,a){c.push(f=[t=o,e=o]),ar&&(r=a)}function d(a,i){var u=je([a*Lt,i*Lt]);if(s){var l=ze(s,u),c=ze([l[1],-l[0],0],l);Be(c),c=Ie(c);var f=a-o,h=f>0?1:-1,d=c[0]*Ut*h,m=_(f)>180;if(m^(h*or&&(r=g);else if(m^(h*o<(d=(d+360)%360-180)&&dr&&(r=i);m?ax(t,e)&&(e=a):x(a,e)>x(t,e)&&(t=a):e>=t?(ae&&(e=a)):a>o?x(t,a)>x(t,e)&&(e=a):x(a,e)>x(t,e)&&(t=a)}else p(a,i);s=u,o=a}function m(){h.point=d}function g(){f[0]=t,f[1]=e,h.point=p,s=null}function v(t,n){if(s){var e=t-o;l+=_(e)>180?e+(e>0?360:-360):e}else i=t,u=n;Le.point(t,n),d(t,n)}function y(){Le.lineStart()}function b(){v(i,u),Le.lineEnd(),_(l)>Tt&&(t=-(e=180)),f[0]=t,f[1]=e,s=null}function x(t,n){return(n-=t)<0?n+360:n}function M(t,n){return t[0]-n[0]}function w(t,n){return n[0]<=n[1]?n[0]<=t&&t<=n[1]:tx(m[0],m[1])&&(m[1]=p[1]),x(p[0],m[1])>x(m[0],m[1])&&(m[0]=p[0])):u.push(m=p);for(var s,l,p,d=-1/0,m=(i=0,u[l=u.length-1]);i<=l;m=p,++i)p=u[i],(s=x(m[1],p[0]))>d&&(d=s,t=p[0],e=m[1])}return c=f=null,t===1/0||n===1/0?[[NaN,NaN],[NaN,NaN]]:[[t,n],[e,r]]}}(),a.geo.centroid=function(t){_e=we=ke=Se=Ae=Ee=Te=Pe=Re=Ne=Oe=0,a.geo.stream(t,Ye);var n=Re,e=Ne,r=Oe,o=n*n+e*e+r*r;return o=0;--u)o.point((f=c[u])[0],f[1]);else r(p.x,p.p.x,-1,o);p=p.p}c=(p=p.o).z,d=!d}while(!p.v);o.lineEnd()}}}function Qe(t){if(n=t.length){for(var n,e,r=0,o=t[0];++r=0?1:-1,w=_*M,k=w>Rt,S=d*b;if(Ce.add(Math.atan2(S*_*Math.sin(w),m*x+S*Math.cos(w))),a+=k?M+_*Nt:M,k^h>=e^v>=e){var A=ze(je(f),je(t));Be(A);var E=ze(o,A);Be(E);var T=(k^M>=0?-1:1)*qt(E[2]);(r>T||r===T&&(A[0]||A[1]))&&(i+=k^M>=0?1:-1)}if(!g++)break;h=v,d=b,m=x,f=t}}return(a<-Tt||a0){for(b||(i.polygonStart(),b=!0),i.lineStart();++a1&&2&n&&e.push(e.pop().concat(e.shift())),u.push(e.filter(er))}return c}}function er(t){return t.length>1}function rr(){var t,n=[];return{lineStart:function(){n.push(t=[])},point:function(n,e){t.push([n,e])},lineEnd:z,buffer:function(){var e=n;return n=[],t=null,e},rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))}}}function or(t,n){return((t=t.x)[0]<0?t[1]-Ct-Tt:Ct-t[1])-((n=n.x)[0]<0?n[1]-Ct-Tt:Ct-n[1])}var ar=nr($e,(function(t){var n,e=NaN,r=NaN,o=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(a,i){var u=a>0?Rt:-Rt,s=_(a-e);_(s-Rt)0?Ct:-Ct),t.point(o,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(a,r),n=0):o!==u&&s>=Rt&&(_(e-o)Tt?Math.atan((Math.sin(n)*(a=Math.cos(r))*Math.sin(e)-Math.sin(r)*(o=Math.cos(n))*Math.sin(t))/(o*a*i)):(n+r)/2}(e,r,a,i),t.point(o,r),t.lineEnd(),t.lineStart(),t.point(u,r),n=0),t.point(e=a,r=i),o=u},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}),(function(t,n,e,r){var o;if(null==t)o=e*Ct,r.point(-Rt,o),r.point(0,o),r.point(Rt,o),r.point(Rt,0),r.point(Rt,-o),r.point(0,-o),r.point(-Rt,-o),r.point(-Rt,0),r.point(-Rt,o);else if(_(t[0]-n[0])>Tt){var a=t[0]0,r=_(n)>Tt;return nr(o,(function(t){var n,u,s,l,c;return{lineStart:function(){l=s=!1,c=1},point:function(f,h){var p,d=[f,h],m=o(f,h),g=e?m?0:i(f,h):m?i(f+(f<0?Rt:-Rt),h):0;if(!n&&(l=s=m)&&t.lineStart(),m!==s&&(p=a(n,d),(Xe(n,p)||Xe(d,p))&&(d[0]+=Tt,d[1]+=Tt,m=o(d[0],d[1]))),m!==s)c=0,m?(t.lineStart(),p=a(d,n),t.point(p[0],p[1])):(p=a(n,d),t.point(p[0],p[1]),t.lineEnd()),n=p;else if(r&&n&&e^m){var v;g&u||!(v=a(d,n,!0))||(c=0,e?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!m||n&&Xe(n,d)||t.point(d[0],d[1]),n=d,s=m,u=g},lineEnd:function(){s&&t.lineEnd(),n=null},clean:function(){return c|(l&&s)<<1}}}),Ir(t,6*Lt),e?[0,-t]:[-Rt,t-Rt]);function o(t,e){return Math.cos(t)*Math.cos(e)>n}function a(t,e,r){var o=[1,0,0],a=ze(je(t),je(e)),i=De(a,a),u=a[0],s=i-u*u;if(!s)return!r&&t;var l=n*i/s,c=-n*u/s,f=ze(o,a),h=Fe(o,l);qe(h,Fe(a,c));var p=f,d=De(h,p),m=De(p,p),g=d*d-m*(De(h,h)-1);if(!(g<0)){var v=Math.sqrt(g),y=Fe(p,(-d-v)/m);if(qe(y,h),y=Ie(y),!r)return y;var b,x=t[0],M=e[0],w=t[1],k=e[1];M0^y[1]<(_(y[0]-x)Rt^(x<=y[0]&&y[0]<=M)){var E=Fe(p,(-d+v)/m);return qe(E,h),[y,Ie(E)]}}}function i(n,r){var o=e?t:Rt-t,a=0;return n<-o?a|=1:n>o&&(a|=2),r<-o?a|=4:r>o&&(a|=8),a}}function ur(t,n,e,r){return function(o){var a,i=o.a,u=o.b,s=i.x,l=i.y,c=0,f=1,h=u.x-s,p=u.y-l;if(a=t-s,h||!(a>0)){if(a/=h,h<0){if(a0){if(a>f)return;a>c&&(c=a)}if(a=e-s,h||!(a<0)){if(a/=h,h<0){if(a>f)return;a>c&&(c=a)}else if(h>0){if(a0)){if(a/=p,p<0){if(a0){if(a>f)return;a>c&&(c=a)}if(a=r-l,p||!(a<0)){if(a/=p,p<0){if(a>f)return;a>c&&(c=a)}else if(p>0){if(a0&&(o.a={x:s+c*h,y:l+c*p}),f<1&&(o.b={x:s+f*h,y:l+f*p}),o}}}}}}function sr(t,n,e,r){return function(s){var l,c,f,h,p,d,m,g,v,y,b,x=s,M=rr(),_=ur(t,n,e,r),w={point:A,lineStart:function(){w.point=E,c&&c.push(f=[]),y=!0,v=!1,m=g=NaN},lineEnd:function(){l&&(E(h,p),d&&v&&M.rejoin(),l.push(M.buffer())),w.point=A,v&&s.lineEnd()},polygonStart:function(){s=M,l=[],c=[],b=!0},polygonEnd:function(){s=x,l=a.merge(l);var n=function(t){for(var n=0,e=c.length,r=t[1],o=0;or&&Dt(l,a,t)>0&&++n:a[1]<=r&&Dt(l,a,t)<0&&--n,l=a;return 0!==n}([t,r]),e=b&&n,o=l.length;(e||o)&&(s.polygonStart(),e&&(s.lineStart(),k(null,null,1,s),s.lineEnd()),o&&Ke(l,i,n,k,s),s.polygonEnd()),l=c=f=null}};function k(a,i,s,l){var c=0,f=0;if(null==a||(c=o(a,s))!==(f=o(i,s))||u(a,i)<0^s>0)do{l.point(0===c||3===c?t:e,c>1?r:n)}while((c=(c+s+4)%4)!==f);else l.point(i[0],i[1])}function S(o,a){return t<=o&&o<=e&&n<=a&&a<=r}function A(t,n){S(t,n)&&s.point(t,n)}function E(t,n){var e=S(t=Math.max(-1e9,Math.min(1e9,t)),n=Math.max(-1e9,Math.min(1e9,n)));if(c&&f.push([t,n]),y)h=t,p=n,d=e,y=!1,e&&(s.lineStart(),s.point(t,n));else if(e&&v)s.point(t,n);else{var r={a:{x:m,y:g},b:{x:t,y:n}};_(r)?(v||(s.lineStart(),s.point(r.a.x,r.a.y)),s.point(r.b.x,r.b.y),e||s.lineEnd(),b=!1):e&&(s.lineStart(),s.point(t,n),b=!1)}m=t,g=n,v=e}return w};function o(r,o){return _(r[0]-t)0?0:3:_(r[0]-e)0?2:1:_(r[1]-n)0?1:0:o>0?3:2}function i(t,n){return u(t.x,n.x)}function u(t,n){var e=o(t,1),r=o(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}}function lr(t){var n=0,e=Rt/3,r=Lr(t),o=r(n,e);return o.parallels=function(t){return arguments.length?r(n=t[0]*Rt/180,e=t[1]*Rt/180):[n/Rt*180,e/Rt*180]},o}function cr(t,n){var e=Math.sin(t),r=(e+Math.sin(n))/2,o=1+e*(2*r-e),a=Math.sqrt(o)/r;function i(t,n){var e=Math.sqrt(o-2*r*Math.sin(n))/r;return[e*Math.sin(t*=r),a-e*Math.cos(t)]}return i.invert=function(t,n){var e=a-n;return[Math.atan2(t,e)/r,qt((o-(t*t+e*e)*r*r)/(2*r))]},i}a.geo.clipExtent=function(){var t,n,e,r,o,a,i={stream:function(t){return o&&(o.valid=!1),(o=a(t)).valid=!0,o},extent:function(u){return arguments.length?(a=sr(t=+u[0][0],n=+u[0][1],e=+u[1][0],r=+u[1][1]),o&&(o.valid=!1,o=null),i):[[t,n],[e,r]]}};return i.extent([[0,0],[960,500]])},(a.geo.conicEqualArea=function(){return lr(cr)}).raw=cr,a.geo.albers=function(){return a.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},a.geo.albersUsa=function(){var t,n,e,r,o=a.geo.albers(),i=a.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=a.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(n,e){t=[n,e]}};function l(o){var a=o[0],i=o[1];return t=null,n(a,i),t||(e(a,i),t)||r(a,i),t}return l.invert=function(t){var n=o.scale(),e=o.translate(),r=(t[0]-e[0])/n,a=(t[1]-e[1])/n;return(a>=.12&&a<.234&&r>=-.425&&r<-.214?i:a>=.166&&a<.234&&r>=-.214&&r<-.115?u:o).invert(t)},l.stream=function(t){var n=o.stream(t),e=i.stream(t),r=u.stream(t);return{point:function(t,o){n.point(t,o),e.point(t,o),r.point(t,o)},sphere:function(){n.sphere(),e.sphere(),r.sphere()},lineStart:function(){n.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){n.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){n.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){n.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},l.precision=function(t){return arguments.length?(o.precision(t),i.precision(t),u.precision(t),l):o.precision()},l.scale=function(t){return arguments.length?(o.scale(t),i.scale(.35*t),u.scale(t),l.translate(o.translate())):o.scale()},l.translate=function(t){if(!arguments.length)return o.translate();var a=o.scale(),c=+t[0],f=+t[1];return n=o.translate(t).clipExtent([[c-.455*a,f-.238*a],[c+.455*a,f+.238*a]]).stream(s).point,e=i.translate([c-.307*a,f+.201*a]).clipExtent([[c-.425*a+Tt,f+.12*a+Tt],[c-.214*a-Tt,f+.234*a-Tt]]).stream(s).point,r=u.translate([c-.205*a,f+.212*a]).clipExtent([[c-.214*a+Tt,f+.166*a+Tt],[c-.115*a-Tt,f+.234*a-Tt]]).stream(s).point,l},l.scale(1070)};var fr,hr,pr,dr,mr,gr,vr={point:z,lineStart:z,lineEnd:z,polygonStart:function(){hr=0,vr.lineStart=yr},polygonEnd:function(){vr.lineStart=vr.lineEnd=vr.point=z,fr+=_(hr/2)}};function yr(){var t,n,e,r;function o(t,n){hr+=r*t-e*n,e=t,r=n}vr.point=function(a,i){vr.point=o,t=e=a,n=r=i},vr.lineEnd=function(){o(t,n)}}var br={point:function(t,n){tmr&&(mr=t),ngr&&(gr=n)},lineStart:z,lineEnd:z,polygonStart:z,polygonEnd:z};function xr(){var t=Mr(4.5),n=[],e={point:r,lineStart:function(){e.point=o},lineEnd:i,polygonStart:function(){e.lineEnd=u},polygonEnd:function(){e.lineEnd=i,e.point=r},pointRadius:function(n){return t=Mr(n),e},result:function(){if(n.length){var t=n.join("");return n=[],t}}};function r(e,r){n.push("M",e,",",r,t)}function o(t,r){n.push("M",t,",",r),e.point=a}function a(t,e){n.push("L",t,",",e)}function i(){e.point=r}function u(){n.push("Z")}return e}function Mr(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}var _r,wr={point:kr,lineStart:Sr,lineEnd:Ar,polygonStart:function(){wr.lineStart=Er},polygonEnd:function(){wr.point=kr,wr.lineStart=Sr,wr.lineEnd=Ar}};function kr(t,n){ke+=t,Se+=n,++Ae}function Sr(){var t,n;function e(e,r){var o=e-t,a=r-n,i=Math.sqrt(o*o+a*a);Ee+=i*(t+e)/2,Te+=i*(n+r)/2,Pe+=i,kr(t=e,n=r)}wr.point=function(r,o){wr.point=e,kr(t=r,n=o)}}function Ar(){wr.point=kr}function Er(){var t,n,e,r;function o(t,n){var o=t-e,a=n-r,i=Math.sqrt(o*o+a*a);Ee+=i*(e+t)/2,Te+=i*(r+n)/2,Pe+=i,Re+=(i=r*t-e*n)*(e+t),Ne+=i*(r+n),Oe+=3*i,kr(e=t,r=n)}wr.point=function(a,i){wr.point=o,kr(t=e=a,n=r=i)},wr.lineEnd=function(){o(t,n)}}function Tr(t){var n=4.5,e={point:r,lineStart:function(){e.point=o},lineEnd:i,polygonStart:function(){e.lineEnd=u},polygonEnd:function(){e.lineEnd=i,e.point=r},pointRadius:function(t){return n=t,e},result:z};function r(e,r){t.moveTo(e+n,r),t.arc(e,r,n,0,Nt)}function o(n,r){t.moveTo(n,r),e.point=a}function a(n,e){t.lineTo(n,e)}function i(){e.point=r}function u(){t.closePath()}return e}function Pr(t){var n=.5,e=Math.cos(30*Lt),r=16;function o(t){return(r?i:a)(t)}function a(n){return Or(n,(function(e,r){e=t(e,r),n.point(e[0],e[1])}))}function i(n){var e,o,a,i,s,l,c,f,h,p,d,m,g={point:v,lineStart:y,lineEnd:x,polygonStart:function(){n.polygonStart(),g.lineStart=M},polygonEnd:function(){n.polygonEnd(),g.lineStart=y}};function v(e,r){e=t(e,r),n.point(e[0],e[1])}function y(){f=NaN,g.point=b,n.lineStart()}function b(e,o){var a=je([e,o]),i=t(e,o);u(f,h,c,p,d,m,f=i[0],h=i[1],c=e,p=a[0],d=a[1],m=a[2],r,n),n.point(f,h)}function x(){g.point=v,n.lineEnd()}function M(){y(),g.point=_,g.lineEnd=w}function _(t,n){b(e=t,n),o=f,a=h,i=p,s=d,l=m,g.point=b}function w(){u(f,h,c,p,d,m,o,a,e,i,s,l,r,n),g.lineEnd=x,x()}return g}function u(r,o,a,i,s,l,c,f,h,p,d,m,g,v){var y=c-r,b=f-o,x=y*y+b*b;if(x>4*n&&g--){var M=i+p,w=s+d,k=l+m,S=Math.sqrt(M*M+w*w+k*k),A=Math.asin(k/=S),E=_(_(k)-1)n||_((y*N+b*O)/x-.5)>.3||i*p+s*d+l*m0&&16,o):Math.sqrt(n)},o}function Rr(t){var n=Pr((function(n,e){return t([n*Ut,e*Ut])}));return function(t){return Ur(n(t))}}function Nr(t){this.stream=t}function Or(t,n){return{point:n,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function Cr(t){return Lr((function(){return t}))()}function Lr(t){var n,e,r,o,i,u,s=Pr((function(t,e){return[(t=n(t,e))[0]*l+o,i-t[1]*l]})),l=150,c=480,f=250,h=0,p=0,d=0,m=0,g=0,v=ar,y=L,b=null,x=null;function M(t){return[(t=r(t[0]*Lt,t[1]*Lt))[0]*l+o,i-t[1]*l]}function _(t){return(t=r.invert((t[0]-o)/l,(i-t[1])/l))&&[t[0]*Ut,t[1]*Ut]}function w(){r=Je(e=zr(d,m,g),n);var t=n(h,p);return o=c-t[0]*l,i=f+t[1]*l,k()}function k(){return u&&(u.valid=!1,u=null),M}return M.stream=function(t){return u&&(u.valid=!1),(u=Ur(v(e,s(y(t))))).valid=!0,u},M.clipAngle=function(t){return arguments.length?(v=null==t?(b=t,ar):ir((b=+t)*Lt),k()):b},M.clipExtent=function(t){return arguments.length?(x=t,y=t?sr(t[0][0],t[0][1],t[1][0],t[1][1]):L,k()):x},M.scale=function(t){return arguments.length?(l=+t,w()):l},M.translate=function(t){return arguments.length?(c=+t[0],f=+t[1],w()):[c,f]},M.center=function(t){return arguments.length?(h=t[0]%360*Lt,p=t[1]%360*Lt,w()):[h*Ut,p*Ut]},M.rotate=function(t){return arguments.length?(d=t[0]%360*Lt,m=t[1]%360*Lt,g=t.length>2?t[2]%360*Lt:0,w()):[d*Ut,m*Ut,g*Ut]},a.rebind(M,s,"precision"),function(){return n=t.apply(this,arguments),M.invert=n.invert&&_,w()}}function Ur(t){return Or(t,(function(n,e){t.point(n*Lt,e*Lt)}))}function jr(t,n){return[t,n]}function Dr(t,n){return[t>Rt?t-Nt:t<-Rt?t+Nt:t,n]}function zr(t,n,e){return t?n||e?Je(Fr(t),Br(n,e)):Fr(t):n||e?Br(n,e):Dr}function qr(t){return function(n,e){return[(n+=t)>Rt?n-Nt:n<-Rt?n+Nt:n,e]}}function Fr(t){var n=qr(t);return n.invert=qr(-t),n}function Br(t,n){var e=Math.cos(t),r=Math.sin(t),o=Math.cos(n),a=Math.sin(n);function i(t,n){var i=Math.cos(n),u=Math.cos(t)*i,s=Math.sin(t)*i,l=Math.sin(n),c=l*e+u*r;return[Math.atan2(s*o-c*a,u*e-l*r),qt(c*o+s*a)]}return i.invert=function(t,n){var i=Math.cos(n),u=Math.cos(t)*i,s=Math.sin(t)*i,l=Math.sin(n),c=l*o-s*a;return[Math.atan2(s*o+l*a,u*e+c*r),qt(c*e-u*r)]},i}function Ir(t,n){var e=Math.cos(t),r=Math.sin(t);return function(o,a,i,u){var s=i*n;null!=o?(o=Xr(e,o),a=Xr(e,a),(i>0?oa)&&(o+=i*Nt)):(o=t+i*Nt,a=t-.5*s);for(var l,c=o;i>0?c>a:c2?t[2]*Lt:0),n.invert=function(n){return(n=t.invert(n[0]*Lt,n[1]*Lt))[0]*=Ut,n[1]*=Ut,n},n},Dr.invert=jr,a.geo.circle=function(){var t,n,e=[0,0],r=6;function o(){var t="function"==typeof e?e.apply(this,arguments):e,r=zr(-t[0]*Lt,-t[1]*Lt,0).invert,o=[];return n(null,null,1,{point:function(t,n){o.push(t=r(t,n)),t[0]*=Ut,t[1]*=Ut}}),{type:"Polygon",coordinates:[o]}}return o.origin=function(t){return arguments.length?(e=t,o):e},o.angle=function(e){return arguments.length?(n=Ir((t=+e)*Lt,r*Lt),o):t},o.precision=function(e){return arguments.length?(n=Ir(t*Lt,(r=+e)*Lt),o):r},o.angle(90)},a.geo.distance=function(t,n){var e,r=(n[0]-t[0])*Lt,o=t[1]*Lt,a=n[1]*Lt,i=Math.sin(r),u=Math.cos(r),s=Math.sin(o),l=Math.cos(o),c=Math.sin(a),f=Math.cos(a);return Math.atan2(Math.sqrt((e=f*i)*e+(e=l*c-s*f*u)*e),s*c+l*f*u)},a.geo.graticule=function(){var t,n,e,r,o,i,u,s,l,c,f,h,p=10,d=p,m=90,g=360,v=2.5;function y(){return{type:"MultiLineString",coordinates:b()}}function b(){return a.range(Math.ceil(r/m)*m,e,m).map(f).concat(a.range(Math.ceil(s/g)*g,u,g).map(h)).concat(a.range(Math.ceil(n/p)*p,t,p).filter((function(t){return _(t%m)>Tt})).map(l)).concat(a.range(Math.ceil(i/d)*d,o,d).filter((function(t){return _(t%g)>Tt})).map(c))}return y.lines=function(){return b().map((function(t){return{type:"LineString",coordinates:t}}))},y.outline=function(){return{type:"Polygon",coordinates:[f(r).concat(h(u).slice(1),f(e).reverse().slice(1),h(s).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.majorExtent(t).minorExtent(t):y.minorExtent()},y.majorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],s=+t[0][1],u=+t[1][1],r>e&&(t=r,r=e,e=t),s>u&&(t=s,s=u,u=t),y.precision(v)):[[r,s],[e,u]]},y.minorExtent=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],i=+e[0][1],o=+e[1][1],n>t&&(e=n,n=t,t=e),i>o&&(e=i,i=o,o=e),y.precision(v)):[[n,i],[t,o]]},y.step=function(t){return arguments.length?y.majorStep(t).minorStep(t):y.minorStep()},y.majorStep=function(t){return arguments.length?(m=+t[0],g=+t[1],y):[m,g]},y.minorStep=function(t){return arguments.length?(p=+t[0],d=+t[1],y):[p,d]},y.precision=function(a){return arguments.length?(v=+a,l=Yr(i,o,90),c=Vr(n,t,v),f=Yr(s,u,90),h=Vr(r,e,v),y):v},y.majorExtent([[-180,-90+Tt],[180,90-Tt]]).minorExtent([[-180,-80-Tt],[180,80+Tt]])},a.geo.greatArc=function(){var t,n,e=Hr,r=Gr;function o(){return{type:"LineString",coordinates:[t||e.apply(this,arguments),n||r.apply(this,arguments)]}}return o.distance=function(){return a.geo.distance(t||e.apply(this,arguments),n||r.apply(this,arguments))},o.source=function(n){return arguments.length?(e=n,t="function"==typeof n?null:n,o):e},o.target=function(t){return arguments.length?(r=t,n="function"==typeof t?null:t,o):r},o.precision=function(){return arguments.length?o:0},o},a.geo.interpolate=function(t,n){return e=t[0]*Lt,r=t[1]*Lt,o=n[0]*Lt,a=n[1]*Lt,i=Math.cos(r),u=Math.sin(r),s=Math.cos(a),l=Math.sin(a),c=i*Math.cos(e),f=i*Math.sin(e),h=s*Math.cos(o),p=s*Math.sin(o),d=2*Math.asin(Math.sqrt(Bt(a-r)+i*s*Bt(o-e))),m=1/Math.sin(d),(g=d?function(t){var n=Math.sin(t*=d)*m,e=Math.sin(d-t)*m,r=e*c+n*h,o=e*f+n*p,a=e*u+n*l;return[Math.atan2(o,r)*Ut,Math.atan2(a,Math.sqrt(r*r+o*o))*Ut]}:function(){return[e*Ut,r*Ut]}).distance=d,g;var e,r,o,a,i,u,s,l,c,f,h,p,d,m,g},a.geo.length=function(t){return _r=0,a.geo.stream(t,Wr),_r};var Wr={sphere:z,point:z,lineStart:function(){var t,n,e;function r(r,o){var a=Math.sin(o*=Lt),i=Math.cos(o),u=_((r*=Lt)-t),s=Math.cos(u);_r+=Math.atan2(Math.sqrt((u=i*Math.sin(u))*u+(u=e*a-n*i*s)*u),n*a+e*i*s),t=r,n=a,e=i}Wr.point=function(o,a){t=o*Lt,n=Math.sin(a*=Lt),e=Math.cos(a),Wr.point=r},Wr.lineEnd=function(){Wr.point=Wr.lineEnd=z}},lineEnd:z,polygonStart:z,polygonEnd:z};function Zr(t,n){function e(n,e){var r=Math.cos(n),o=Math.cos(e),a=t(r*o);return[a*o*Math.sin(n),a*Math.sin(e)]}return e.invert=function(t,e){var r=Math.sqrt(t*t+e*e),o=n(r),a=Math.sin(o),i=Math.cos(o);return[Math.atan2(t*a,r*i),Math.asin(r&&e*a/r)]},e}var Jr=Zr((function(t){return Math.sqrt(2/(1+t))}),(function(t){return 2*Math.asin(t/2)}));(a.geo.azimuthalEqualArea=function(){return Cr(Jr)}).raw=Jr;var $r=Zr((function(t){var n=Math.acos(t);return n&&n/Math.sin(n)}),L);function Kr(t,n){var e=Math.cos(t),r=function(t){return Math.tan(Rt/4+t/2)},o=t===n?Math.sin(t):Math.log(e/Math.cos(n))/Math.log(r(n)/r(t)),a=e*Math.pow(r(t),o)/o;if(!o)return no;function i(t,n){a>0?n<-Ct+Tt&&(n=-Ct+Tt):n>Ct-Tt&&(n=Ct-Tt);var e=a/Math.pow(r(n),o);return[e*Math.sin(o*t),a-e*Math.cos(o*t)]}return i.invert=function(t,n){var e=a-n,r=jt(o)*Math.sqrt(t*t+e*e);return[Math.atan2(t,e)/o,2*Math.atan(Math.pow(a/r,1/o))-Ct]},i}function Qr(t,n){var e=Math.cos(t),r=t===n?Math.sin(t):(e-Math.cos(n))/(n-t),o=e/r+t;if(_(r)1&&Dt(t[e[r-2]],t[e[r-1]],t[o])<=0;)--r;e[r++]=o}return e.slice(0,r)}function lo(t,n){return t[0]-n[0]||t[1]-n[1]}(a.geo.stereographic=function(){return Cr(oo)}).raw=oo,ao.invert=function(t,n){return[-n,2*Math.atan(Math.exp(t))-Ct]},(a.geo.transverseMercator=function(){var t=eo(ao),n=t.center,e=t.rotate;return t.center=function(t){return t?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return t?e([t[0],t[1],t.length>2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90])}).raw=ao,a.geom={},a.geom.hull=function(t){var n=io,e=uo;if(arguments.length)return r(t);function r(t){if(t.length<3)return[];var r,o=bn(n),a=bn(e),i=t.length,u=[],s=[];for(r=0;r=0;--r)p.push(t[u[l[r]][2]]);for(r=+f;rTt)u=u.L;else{if(!((o=a-To(u,i))>Tt)){r>-Tt?(n=u.P,e=u):o>-Tt?(n=u,e=u.N):n=e=u;break}if(!u.R){n=u;break}u=u.R}var s=wo(t);if(vo.insert(n,s),n||e){if(n===e)return Co(n),e=wo(n.site),vo.insert(s,e),s.edge=e.edge=jo(n.site,s.site),Oo(n),void Oo(e);if(e){Co(n),Co(e);var l=n.site,c=l.x,f=l.y,h=t.x-c,p=t.y-f,d=e.site,m=d.x-c,g=d.y-f,v=2*(h*g-p*m),y=h*h+p*p,b=m*m+g*g,x={x:(g*y-p*b)/v+c,y:(h*b-m*y)/v+f};Do(e.edge,l,d,x),s.edge=jo(l,t,null,x),e.edge=jo(t,d,null,x),Oo(n),Oo(e)}else s.edge=jo(n.site,s.site)}}function Eo(t,n){var e=t.site,r=e.x,o=e.y,a=o-n;if(!a)return r;var i=t.P;if(!i)return-1/0;var u=(e=i.site).x,s=e.y,l=s-n;if(!l)return u;var c=u-r,f=1/a-1/l,h=c/l;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*l)-s+l/2+o-a/2)))/f+r:(r+u)/2}function To(t,n){var e=t.N;if(e)return Eo(e,n);var r=t.site;return r.y===n?r.x:1/0}function Po(t){this.site=t,this.edges=[]}function Ro(t,n){return n.angle-t.angle}function No(){Fo(this),this.x=this.y=this.arc=this.site=this.cy=null}function Oo(t){var n=t.P,e=t.N;if(n&&e){var r=n.site,o=t.site,a=e.site;if(r!==a){var i=o.x,u=o.y,s=r.x-i,l=r.y-u,c=a.x-i,f=2*(s*(g=a.y-u)-l*c);if(!(f>=-Pt)){var h=s*s+l*l,p=c*c+g*g,d=(g*h-l*p)/f,m=(s*p-c*h)/f,g=m+u,v=Mo.pop()||new No;v.arc=t,v.site=o,v.x=d+i,v.y=g+Math.sqrt(d*d+m*m),v.cy=g,t.circle=v;for(var y=null,b=bo._;b;)if(v.y=u)return;if(h>d){if(a){if(a.y>=l)return}else a={x:g,y:s};e={x:g,y:l}}else{if(a){if(a.y1)if(h>d){if(a){if(a.y>=l)return}else a={x:(s-o)/r,y:s};e={x:(l-o)/r,y:l}}else{if(a){if(a.y=u)return}else a={x:i,y:r*i+o};e={x:u,y:r*u+o}}else{if(a){if(a.xTt||_(o-e)>Tt)&&(u.splice(i,0,new zo((v=a.site,y=c,b=_(r-f)Tt?{x:f,y:_(n-f)Tt?{x:_(e-d)Tt?{x:h,y:_(n-h)Tt?{x:_(e-p)=e&&l.x<=o&&l.y>=r&&l.y<=i?[[e,i],[o,i],[o,r],[e,r]]:[]).point=t[u]})),n}function u(t){return t.map((function(t,n){return{x:Math.round(r(t,n)/Tt)*Tt,y:Math.round(o(t,n)/Tt)*Tt,i:n}}))}return i.links=function(t){return Yo(u(t)).edges.filter((function(t){return t.l&&t.r})).map((function(n){return{source:t[n.l.i],target:t[n.r.i]}}))},i.triangles=function(t){var n=[];return Yo(u(t)).cells.forEach((function(e,r){for(var o,a=e.site,i=e.edges.sort(Ro),u=-1,s=i.length,l=i[s-1].edge,c=l.l===a?l.r:l.l;++ua||f>i||h=M)<<1|n>=x,w=_+4;_a&&(o=n.slice(a,o),u[i]?u[i]+=o:u[++i]=o),(e=e[0])===(r=r[0])?u[i]?u[i]+=r:u[++i]=r:(u[++i]=null,s.push({i:i,x:ta(e,r)})),a=ra.lastIndex;return am&&(m=s.x),s.y>g&&(g=s.y),l.push(s.x),c.push(s.y);else for(f=0;fm&&(m=b),x>g&&(g=x),l.push(b),c.push(x)}var M=m-p,w=g-d;function k(t,n,e,r,o,a,i,u){if(!isNaN(e)&&!isNaN(r))if(t.leaf){var s=t.x,l=t.y;if(null!=s)if(_(s-e)+_(l-r)<.01)S(t,n,e,r,o,a,i,u);else{var c=t.point;t.x=t.y=t.point=null,S(t,c,s,l,o,a,i,u),S(t,n,e,r,o,a,i,u)}else t.x=e,t.y=r,t.point=n}else S(t,n,e,r,o,a,i,u)}function S(t,n,e,r,o,a,i,u){var s=.5*(o+i),l=.5*(a+u),c=e>=s,f=r>=l,h=f<<1|c;t.leaf=!1,c?o=s:i=s,f?a=l:u=l,k(t=t.nodes[h]||(t.nodes[h]={leaf:!0,nodes:[],point:null,x:null,y:null}),n,e,r,o,a,i,u)}M>w?g=d+M:m=p+w;var A={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){k(A,t,+v(t,++f),+y(t,f),p,d,m,g)},visit:function(t){Jo(t,A,p,d,m,g)},find:function(t){return $o(A,t[0],t[1],p,d,m,g)}};if(f=-1,null==n){for(;++f=0&&!(e=a.interpolators[r](t,n)););return e}function aa(t,n){var e,r=[],o=[],a=t.length,i=n.length,u=Math.min(t.length,n.length);for(e=0;e=1?1:t(n)}}function ca(t){return function(n){return 1-t(1-n)}}function fa(t){return function(n){return.5*(n<.5?t(2*n):2-t(2-2*n))}}function ha(t){return t*t}function pa(t){return t*t*t}function da(t){if(t<=0)return 0;if(t>=1)return 1;var n=t*t,e=n*t;return 4*(t<.5?e:3*(t-n)+e-.75)}function ma(t){return 1-Math.cos(t*Ct)}function ga(t){return Math.pow(2,10*(t-1))}function va(t){return 1-Math.sqrt(1-t*t)}function ya(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function ba(t,n){return n-=t,function(e){return Math.round(t+n*e)}}function xa(t){var n=[t.a,t.b],e=[t.c,t.d],r=_a(n),o=Ma(n,e),a=_a(function(t,n,e){return t[0]+=e*n[0],t[1]+=e*n[1],t}(e,n,-o))||0;n[0]*e[1]=0?t.slice(0,n):t,r=n>=0?t.slice(n+1):"in";return e=ua.get(e)||ia,la((r=sa.get(r)||L)(e.apply(null,i.call(arguments,1))))},a.interpolateHcl=function(t,n){t=a.hcl(t),n=a.hcl(n);var e=t.h,r=t.c,o=t.l,i=n.h-e,u=n.c-r,s=n.l-o;return isNaN(u)&&(u=0,r=isNaN(r)?n.c:r),isNaN(i)?(i=0,e=isNaN(e)?n.h:e):i>180?i-=360:i<-180&&(i+=360),function(t){return Kt(e+i*t,r+u*t,o+s*t)+""}},a.interpolateHsl=function(t,n){t=a.hsl(t),n=a.hsl(n);var e=t.h,r=t.s,o=t.l,i=n.h-e,u=n.s-r,s=n.l-o;return isNaN(u)&&(u=0,r=isNaN(r)?n.s:r),isNaN(i)?(i=0,e=isNaN(e)?n.h:e):i>180?i-=360:i<-180&&(i+=360),function(t){return Zt(e+i*t,r+u*t,o+s*t)+""}},a.interpolateLab=function(t,n){t=a.lab(t),n=a.lab(n);var e=t.l,r=t.a,o=t.b,i=n.l-e,u=n.a-r,s=n.b-o;return function(t){return en(e+i*t,r+u*t,o+s*t)+""}},a.interpolateRound=ba,a.transform=function(t){var n=s.createElementNS(a.ns.prefix.svg,"g");return(a.transform=function(t){if(null!=t){n.setAttribute("transform",t);var e=n.transform.baseVal.consolidate()}return new xa(e?e.matrix:wa)})(t)},xa.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var wa={a:1,b:0,c:0,d:1,e:0,f:0};function ka(t){return t.length?t.pop()+",":""}function Sa(t,n){var e=[],r=[];return t=a.transform(t),n=a.transform(n),function(t,n,e,r){if(t[0]!==n[0]||t[1]!==n[1]){var o=e.push("translate(",null,",",null,")");r.push({i:o-4,x:ta(t[0],n[0])},{i:o-2,x:ta(t[1],n[1])})}else(n[0]||n[1])&&e.push("translate("+n+")")}(t.translate,n.translate,e,r),function(t,n,e,r){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),r.push({i:e.push(ka(e)+"rotate(",null,")")-2,x:ta(t,n)})):n&&e.push(ka(e)+"rotate("+n+")")}(t.rotate,n.rotate,e,r),function(t,n,e,r){t!==n?r.push({i:e.push(ka(e)+"skewX(",null,")")-2,x:ta(t,n)}):n&&e.push(ka(e)+"skewX("+n+")")}(t.skew,n.skew,e,r),function(t,n,e,r){if(t[0]!==n[0]||t[1]!==n[1]){var o=e.push(ka(e)+"scale(",null,",",null,")");r.push({i:o-4,x:ta(t[0],n[0])},{i:o-2,x:ta(t[1],n[1])})}else 1===n[0]&&1===n[1]||e.push(ka(e)+"scale("+n+")")}(t.scale,n.scale,e,r),t=n=null,function(t){for(var n,o=-1,a=r.length;++o0?e=n:(t.c=null,t.t=NaN,t=null,s.end({type:"end",alpha:e=0})):n>0&&(s.start({type:"start",alpha:e=n}),t=En(u.tick)),u):e},u.start=function(){var t,n,e,a=v.length,s=y.length,c=l[0],d=l[1];for(t=0;t=0;)e.push(o[r])}function qa(t,n){for(var e=[t],r=[];null!=(t=e.pop());)if(r.push(t),(a=t.children)&&(o=a.length))for(var o,a,i=-1;++i=0;)i.push(c=l[s]),c.parent=a,c.depth=a.depth+1;e&&(a.value=0),a.children=l}else e&&(a.value=+e.call(r,a,a.depth)||0),delete a.children;return qa(o,(function(n){var r,o;t&&(r=n.children)&&r.sort(t),e&&(o=n.parent)&&(o.value+=n.value)})),u}return r.sort=function(n){return arguments.length?(t=n,r):t},r.children=function(t){return arguments.length?(n=t,r):n},r.value=function(t){return arguments.length?(e=t,r):e},r.revalue=function(t){return e&&(za(t,(function(t){t.children&&(t.value=0)})),qa(t,(function(t){var n;t.children||(t.value=+e.call(r,t,t.depth)||0),(n=t.parent)&&(n.value+=t.value)}))),t},r},a.layout.partition=function(){var t=a.layout.hierarchy(),n=[1,1];function e(e,r){var o=t.call(this,e,r);return function t(n,e,r,o){var a=n.children;if(n.x=e,n.y=n.depth*o,n.dx=r,n.dy=o,a&&(i=a.length)){var i,u,s,l=-1;for(r=n.value?r/n.value:0;++lu&&(u=r),i.push(r)}for(e=0;eo&&(r=e,o=n);return r}function Qa(t){return t.reduce(ti,0)}function ti(t,n){return t+n[1]}function ni(t,n){return ei(t,Math.ceil(Math.log(n.length)/Math.LN2+1))}function ei(t,n){for(var e=-1,r=+t[0],o=(t[1]-r)/n,a=[];++e<=n;)a[e]=o*e+r;return a}function ri(t){return[a.min(t),a.max(t)]}function oi(t,n){return t.value-n.value}function ai(t,n){var e=t._pack_next;t._pack_next=n,n._pack_prev=t,n._pack_next=e,e._pack_prev=n}function ii(t,n){t._pack_next=n,n._pack_prev=t}function ui(t,n){var e=n.x-t.x,r=n.y-t.y,o=t.r+n.r;return.999*o*o>e*e+r*r}function si(t){if((n=t.children)&&(s=n.length)){var n,e,r,o,a,i,u,s,l=1/0,c=-1/0,f=1/0,h=-1/0;if(n.forEach(li),(e=n[0]).x=-e.r,e.y=0,b(e),s>1&&((r=n[1]).x=r.r,r.y=0,b(r),s>2))for(fi(e,r,o=n[2]),b(o),ai(e,o),e._pack_prev=o,ai(o,r),r=e._pack_next,a=3;a0)for(i=-1;++i=f[0]&&s<=f[1]&&((u=l[a.bisect(h,s,1,d)-1]).y+=m,u.push(o[i]));return l}return o.value=function(t){return arguments.length?(n=t,o):n},o.range=function(t){return arguments.length?(e=bn(t),o):e},o.bins=function(t){return arguments.length?(r="number"==typeof t?function(n){return ei(n,t)}:bn(t),o):r},o.frequency=function(n){return arguments.length?(t=!!n,o):t},o},a.layout.pack=function(){var t,n=a.layout.hierarchy().sort(oi),e=0,r=[1,1];function o(o,a){var i=n.call(this,o,a),u=i[0],s=r[0],l=r[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(u.x=u.y=0,qa(u,(function(t){t.r=+c(t.value)})),qa(u,si),e){var f=e*(t?1:Math.max(2*u.r/s,2*u.r/l))/2;qa(u,(function(t){t.r+=f})),qa(u,si),qa(u,(function(t){t.r-=f}))}return function t(n,e,r,o){var a=n.children;if(n.x=e+=o*n.x,n.y=r+=o*n.y,n.r*=o,a)for(var i=-1,u=a.length;++ip.x&&(p=t),t.depth>d.depth&&(d=t)}));var m=n(h,p)/2-h.x,g=e[0]/(p.x+n(p,h)/2+m),v=e[1]/(d.depth||1);za(c,(function(t){t.x=(t.x+m)*g,t.y=t.depth*v}))}return l}function i(t){var e=t.children,r=t.parent.children,o=t.i?r[t.i-1]:null;if(e.length){!function(t){for(var n,e=0,r=0,o=t.children,a=o.length;--a>=0;)(n=o[a]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(t);var a=(e[0].z+e[e.length-1].z)/2;o?(t.z=o.z+n(t._,o._),t.m=t.z-a):t.z=a}else o&&(t.z=o.z+n(t._,o._));t.parent.A=function(t,e,r){if(e){for(var o,a=t,i=t,u=e,s=a.parent.children[0],l=a.m,c=i.m,f=u.m,h=s.m;u=di(u),a=pi(a),u&&a;)s=pi(s),(i=di(i)).a=t,(o=u.z+f-a.z-l+n(u._,a._))>0&&(mi(gi(u,t,r),t,o),l+=o,c+=o),f+=u.m,l+=a.m,h+=s.m,c+=i.m;u&&!di(i)&&(i.t=u,i.m+=f-c),a&&!pi(s)&&(s.t=a,s.m+=l-h,r=t)}return r}(t,o,t.parent.A||r[0])}function u(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e[0],t.y=t.depth*e[1]}return o.separation=function(t){return arguments.length?(n=t,o):n},o.size=function(t){return arguments.length?(r=null==(e=t)?s:null,o):r?null:e},o.nodeSize=function(t){return arguments.length?(r=null==(e=t)?null:s,o):r?e:null},Da(o,t)},a.layout.cluster=function(){var t=a.layout.hierarchy().sort(null).value(null),n=hi,e=[1,1],r=!1;function o(o,i){var u,s=t.call(this,o,i),l=s[0],c=0;qa(l,(function(t){var e=t.children;e&&e.length?(t.x=function(t){return t.reduce((function(t,n){return t+n.x}),0)/t.length}(e),t.y=function(t){return 1+a.max(t,(function(t){return t.y}))}(e)):(t.x=u?c+=n(t,u):0,t.y=0,u=t)}));var f=function t(n){var e=n.children;return e&&e.length?t(e[0]):n}(l),h=function t(n){var e,r=n.children;return r&&(e=r.length)?t(r[e-1]):n}(l),p=f.x-n(f,h)/2,d=h.x+n(h,f)/2;return qa(l,r?function(t){t.x=(t.x-l.x)*e[0],t.y=(l.y-t.y)*e[1]}:function(t){t.x=(t.x-p)/(d-p)*e[0],t.y=(1-(l.y?t.y/l.y:1))*e[1]}),s}return o.separation=function(t){return arguments.length?(n=t,o):n},o.size=function(t){return arguments.length?(r=null==(e=t),o):r?null:e},o.nodeSize=function(t){return arguments.length?(r=null!=(e=t),o):r?e:null},Da(o,t)},a.layout.treemap=function(){var t,n=a.layout.hierarchy(),e=Math.round,r=[1,1],o=null,i=vi,u=!1,s="squarify",l=.5*(1+Math.sqrt(5));function c(t,n){for(var e,r,o=-1,a=t.length;++o0;)u.push(e=l[o-1]),u.area+=e.area,"squarify"!==s||(r=p(u,m))<=h?(l.pop(),h=r):(u.area-=u.pop().area,d(u,m,a,!1),m=Math.min(a.dx,a.dy),u.length=u.area=0,h=1/0);u.length&&(d(u,m,a,!0),u.length=u.area=0),n.forEach(f)}}function h(t){var n=t.children;if(n&&n.length){var e,r=i(t),o=n.slice(),a=[];for(c(o,r.dx*r.dy/t.value),a.area=0;e=o.pop();)a.push(e),a.area+=e.area,null!=e.z&&(d(a,e.z?r.dx:r.dy,r,!o.length),a.length=a.area=0);n.forEach(h)}}function p(t,n){for(var e,r=t.area,o=0,a=1/0,i=-1,u=t.length;++io&&(o=e));return n*=n,(r*=r)?Math.max(n*o*l/r,r/(n*a*l)):1/0}function d(t,n,r,o){var a,i=-1,u=t.length,s=r.x,l=r.y,c=n?e(t.area/n):0;if(n==r.dx){for((o||c>r.dy)&&(c=r.dy);++ir.dx)&&(c=r.dx);++i1);return t+n*e*Math.sqrt(-2*Math.log(o)/o)}},logNormal:function(){var t=a.random.normal.apply(a,arguments);return function(){return Math.exp(t())}},bates:function(t){var n=a.random.irwinHall(t);return function(){return n()/t}},irwinHall:function(t){return function(){for(var n=0,e=0;e2?Si:Mi,u=o?Ea:Aa;return a=t(n,e,u,r),i=t(e,n,u,oa),s}function s(t){return a(t)}return s.invert=function(t){return i(t)},s.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},s.range=function(t){return arguments.length?(e=t,u()):e},s.rangeRound=function(t){return s.range(t).interpolate(ba)},s.clamp=function(t){return arguments.length?(o=t,u()):o},s.interpolate=function(t){return arguments.length?(r=t,u()):r},s.ticks=function(t){return Pi(n,t)},s.tickFormat=function(t,e){return Ri(n,t,e)},s.nice=function(t){return Ei(n,t),u()},s.copy=function(){return t(n,e,r,o)},u()}([0,1],[0,1],oa,!1)};var Ni={s:1,g:1,p:1,r:1,e:1};function Oi(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}a.scale.log=function(){return function t(n,e,r,o){function i(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function u(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function s(t){return n(i(t))}return s.invert=function(t){return u(n.invert(t))},s.domain=function(t){return arguments.length?(r=t[0]>=0,n.domain((o=t.map(Number)).map(i)),s):o},s.base=function(t){return arguments.length?(e=+t,n.domain(o.map(i)),s):e},s.nice=function(){var t=_i(o.map(i),r?Math:Li);return n.domain(t),o=t.map(u),s},s.ticks=function(){var t=bi(o),n=[],a=t[0],s=t[1],l=Math.floor(i(a)),c=Math.ceil(i(s)),f=e%1?2:e;if(isFinite(c-l)){if(r){for(;l0;h--)n.push(u(l)*h);for(l=0;n[l]s;c--);n=n.slice(l,c)}return n},s.tickFormat=function(t,n){if(!arguments.length)return Ci;arguments.length<2?n=Ci:"function"!=typeof n&&(n=a.format(n));var r=Math.max(1,e*t/s.ticks().length);return function(t){var o=t/u(Math.round(i(t)));return o*e0?r[t-1]:n[0],tf?0:1;if(l=Ot)return s(l,p)+(u?s(u,1-p):"")+"Z";var d,m,g,v,y,b,x,M,_,w,k,S,A=0,E=0,T=[];if((v=(+i.apply(this,arguments)||0)/2)&&(g=r===Bi?Math.sqrt(u*u+l*l):+r.apply(this,arguments),p||(E*=-1),l&&(E=qt(g/l*Math.sin(v))),u&&(A=qt(g/u*Math.sin(v)))),l){y=l*Math.cos(c+E),b=l*Math.sin(c+E),x=l*Math.cos(f-E),M=l*Math.sin(f-E);var P=Math.abs(f-c-2*E)<=Rt?0:1;if(E&&Gi(y,b,x,M)===p^P){var R=(c+f)/2;y=l*Math.cos(R),b=l*Math.sin(R),x=M=null}}else y=b=0;if(u){_=u*Math.cos(f-A),w=u*Math.sin(f-A),k=u*Math.cos(c+A),S=u*Math.sin(c+A);var N=Math.abs(c-f+2*A)<=Rt?0:1;if(A&&Gi(_,w,k,S)===1-p^N){var O=(c+f)/2;_=u*Math.cos(O),w=u*Math.sin(O),k=S=null}}else _=w=0;if(h>Tt&&(d=Math.min(Math.abs(l-u)/2,+e.apply(this,arguments)))>.001){m=u0?0:1}function Wi(t,n,e,r,o){var a=t[0]-n[0],i=t[1]-n[1],u=(o?r:-r)/Math.sqrt(a*a+i*i),s=u*i,l=-u*a,c=t[0]+s,f=t[1]+l,h=n[0]+s,p=n[1]+l,d=(c+h)/2,m=(f+p)/2,g=h-c,v=p-f,y=g*g+v*v,b=e-r,x=c*p-h*f,M=(v<0?-1:1)*Math.sqrt(Math.max(0,b*b*y-x*x)),_=(x*v-g*M)/y,w=(-x*g-v*M)/y,k=(x*v+g*M)/y,S=(-x*g+v*M)/y,A=_-d,E=w-m,T=k-d,P=S-m;return A*A+E*E>T*T+P*P&&(_=k,w=S),[[_-s,w-l],[_*e/b,w*e/b]]}function Zi(t){var n=io,e=uo,r=$e,o=$i,a=o.key,i=.7;function u(a){var u,s=[],l=[],c=-1,f=a.length,h=bn(n),p=bn(e);function d(){s.push("M",o(t(l),i))}for(;++c1&&o.push("H",r[0]),o.join("")},"step-before":Qi,"step-after":tu,basis:ru,"basis-open":function(t){if(t.length<4)return $i(t);for(var n,e=[],r=-1,o=t.length,a=[0],i=[0];++r<3;)n=t[r],a.push(n[0]),i.push(n[1]);for(e.push(ou(uu,a)+","+ou(uu,i)),--r;++r9&&(o=3*n/Math.sqrt(o),i[u]=o*e,i[u+1]=o*r));for(u=-1;++u<=s;)o=(t[Math.min(s,u+1)][0]-t[Math.max(0,u-1)][0])/(6*(1+i[u]*i[u])),a.push([o||0,i[u]*o||0]);return a}(t))}});function $i(t){return t.length>1?t.join("L"):t+"Z"}function Ki(t){return t.join("L")+"Z"}function Qi(t){for(var n=0,e=t.length,r=t[0],o=[r[0],",",r[1]];++n1){u=n[1],a=t[s],s++,r+="C"+(o[0]+i[0])+","+(o[1]+i[1])+","+(a[0]-u[0])+","+(a[1]-u[1])+","+a[0]+","+a[1];for(var l=2;lRt)+",1 "+n}function s(t,n,e,r){return"Q 0,0 "+r}return a.radius=function(t){return arguments.length?(e=bn(t),a):e},a.source=function(n){return arguments.length?(t=bn(n),a):t},a.target=function(t){return arguments.length?(n=bn(t),a):n},a.startAngle=function(t){return arguments.length?(r=bn(t),a):r},a.endAngle=function(t){return arguments.length?(o=bn(t),a):o},a},a.svg.diagonal=function(){var t=Hr,n=Gr,e=pu;function r(r,o){var a=t.call(this,r,o),i=n.call(this,r,o),u=(a.y+i.y)/2,s=[a,{x:a.x,y:u},{x:i.x,y:u},i];return"M"+(s=s.map(e))[0]+"C"+s[1]+" "+s[2]+" "+s[3]}return r.source=function(n){return arguments.length?(t=bn(n),r):t},r.target=function(t){return arguments.length?(n=bn(t),r):n},r.projection=function(t){return arguments.length?(e=t,r):e},r},a.svg.diagonal.radial=function(){var t=a.svg.diagonal(),n=pu,e=t.projection;return t.projection=function(t){return arguments.length?e(du(n=t)):n},t},a.svg.symbol=function(){var t=gu,n=mu;function e(e,r){return(yu.get(t.call(this,e,r))||vu)(n.call(this,e,r))}return e.type=function(n){return arguments.length?(t=bn(n),e):t},e.size=function(t){return arguments.length?(n=bn(t),e):n},e};var yu=a.map({circle:vu,cross:function(t){var n=Math.sqrt(t/5)/2;return"M"+-3*n+","+-n+"H"+-n+"V"+-3*n+"H"+n+"V"+-n+"H"+3*n+"V"+n+"H"+n+"V"+3*n+"H"+-n+"V"+n+"H"+-3*n+"Z"},diamond:function(t){var n=Math.sqrt(t/(2*xu)),e=n*xu;return"M0,"+-n+"L"+e+",0 0,"+n+" "+-e+",0Z"},square:function(t){var n=Math.sqrt(t)/2;return"M"+-n+","+-n+"L"+n+","+-n+" "+n+","+n+" "+-n+","+n+"Z"},"triangle-down":function(t){var n=Math.sqrt(t/bu),e=n*bu/2;return"M0,"+e+"L"+n+","+-e+" "+-n+","+-e+"Z"},"triangle-up":function(t){var n=Math.sqrt(t/bu),e=n*bu/2;return"M0,"+-e+"L"+n+","+e+" "+-n+","+e+"Z"}});a.svg.symbolTypes=yu.keys();var bu=Math.sqrt(3),xu=Math.tan(30*Lt);J.transition=function(t){for(var n,e,r=ku||++Eu,o=Ru(t),a=[],i=Su||{time:Date.now(),ease:da,delay:0,duration:250},u=-1,s=this.length;++u0;)l[--h].call(t,i);if(a>=1)return f.event&&f.event.end.call(t,t.__data__,n),--c.count?delete c[r]:delete t[e],1}f||(a=o.time,i=En((function(t){var n=f.delay;if(i.t=n+a,n<=t)return h(t-n);i.c=h}),0,a),f=c[r]={tween:new S,time:a,timer:i,delay:o.delay,duration:o.duration,ease:o.ease,index:n},o=null,++c.count)}Au.call=J.call,Au.empty=J.empty,Au.node=J.node,Au.size=J.size,a.transition=function(t,n){return t&&t.transition?ku?t.transition(n):t:a.selection().transition(t)},a.transition.prototype=Au,Au.select=function(t){var n,e,r,o=this.id,a=this.namespace,i=[];t=$(t);for(var u=-1,s=this.length;++urect,.s>rect").attr("width",i[1]-i[0])}function m(t){t.select(".extent").attr("y",u[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",u[1]-u[0])}function g(){var f,g,v=this,y=a.select(a.event.target),b=e.of(v,arguments),x=a.select(v),M=y.datum(),_=!/^(n|s)$/.test(M)&&r,w=!/^(e|w)$/.test(M)&&o,k=y.classed("extent"),S=kt(v),A=a.mouse(v),E=a.select(c(v)).on("keydown.brush",R).on("keyup.brush",N);if(a.event.changedTouches?E.on("touchmove.brush",O).on("touchend.brush",L):E.on("mousemove.brush",O).on("mouseup.brush",L),x.interrupt().selectAll("*").interrupt(),k)A[0]=i[0]-A[0],A[1]=u[0]-A[1];else if(M){var T=+/w$/.test(M),P=+/^n/.test(M);g=[i[1-T]-A[0],u[1-P]-A[1]],A[0]=i[T],A[1]=u[P]}else a.event.altKey&&(f=A.slice());function R(){32==a.event.keyCode&&(k||(f=null,A[0]-=i[1],A[1]-=u[1],k=2),B())}function N(){32==a.event.keyCode&&2==k&&(A[0]+=i[1],A[1]+=u[1],k=0,B())}function O(){var t=a.mouse(v),n=!1;g&&(t[0]+=g[0],t[1]+=g[1]),k||(a.event.altKey?(f||(f=[(i[0]+i[1])/2,(u[0]+u[1])/2]),A[0]=i[+(t[0]1?{floor:function(n){for(;u(n=t.floor(n));)n=Xu(n-1);return n},ceil:function(n){for(;u(n=t.ceil(n));)n=Xu(+n+1);return n}}:t))},r.ticks=function(t,n){var e=bi(r.domain()),a=null==t?o(e,10):"number"==typeof t?o(e,t):!t.range&&[{range:t},n];return a&&(t=a[0],n=a[1]),t.range(e[0],Xu(+e[1]+1),n<1?1:n)},r.tickFormat=function(){return e},r.copy=function(){return Iu(t.copy(),n,e)},Ai(r,t)}function Xu(t){return new Date(t)}zu.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Bu:Fu,Bu.parse=function(t){var n=new Date(t);return isNaN(n)?null:n},Bu.toString=Fu.toString,Dn.second=Bn((function(t){return new zn(1e3*Math.floor(t/1e3))}),(function(t,n){t.setTime(t.getTime()+1e3*Math.floor(n))}),(function(t){return t.getSeconds()})),Dn.seconds=Dn.second.range,Dn.seconds.utc=Dn.second.utc.range,Dn.minute=Bn((function(t){return new zn(6e4*Math.floor(t/6e4))}),(function(t,n){t.setTime(t.getTime()+6e4*Math.floor(n))}),(function(t){return t.getMinutes()})),Dn.minutes=Dn.minute.range,Dn.minutes.utc=Dn.minute.utc.range,Dn.hour=Bn((function(t){var n=t.getTimezoneOffset()/60;return new zn(36e5*(Math.floor(t/36e5-n)+n))}),(function(t,n){t.setTime(t.getTime()+36e5*Math.floor(n))}),(function(t){return t.getHours()})),Dn.hours=Dn.hour.range,Dn.hours.utc=Dn.hour.utc.range,Dn.month=Bn((function(t){return(t=Dn.day(t)).setDate(1),t}),(function(t,n){t.setMonth(t.getMonth()+n)}),(function(t){return t.getMonth()})),Dn.months=Dn.month.range,Dn.months.utc=Dn.month.utc.range;var Yu=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Vu=[[Dn.second,1],[Dn.second,5],[Dn.second,15],[Dn.second,30],[Dn.minute,1],[Dn.minute,5],[Dn.minute,15],[Dn.minute,30],[Dn.hour,1],[Dn.hour,3],[Dn.hour,6],[Dn.hour,12],[Dn.day,1],[Dn.day,2],[Dn.week,1],[Dn.month,1],[Dn.month,3],[Dn.year,1]],Hu=zu.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",$e]]),Gu={range:function(t,n,e){return a.range(Math.ceil(t/e)*e,+n,e).map(Xu)},floor:L,ceil:L};Vu.year=Dn.year,Dn.scale=function(){return Iu(a.scale.linear(),Vu,Hu)};var Wu=Vu.map((function(t){return[t[0].utc,t[1]]})),Zu=qu.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",$e]]);function Ju(t){return JSON.parse(t.responseText)}function $u(t){var n=s.createRange();return n.selectNode(s.body),n.createContextualFragment(t.responseText)}Wu.year=Dn.year.utc,Dn.scale.utc=function(){return Iu(a.scale.linear(),Wu,Zu)},a.text=xn((function(t){return t.responseText})),a.json=function(t,n){return Mn(t,"application/json",Ju,n)},a.html=function(t,n){return Mn(t,"text/html",$u,n)},a.xml=xn((function(t){return t.responseXML})),this.d3=a,void 0===(o="function"==typeof(r=a)?r.call(n,e,n,t):r)||(t.exports=o)}()}])},t.exports=o()},function(t,n,e){"use strict";var r=e(30);function o(){}t.exports=function(){function t(t,n,e,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function n(){return t}t.isRequired=t;var e={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:n,element:t,instanceOf:n,node:t,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n};return e.checkPropTypes=o,e.PropTypes=e,e}},function(t,n,e){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,n,e){"use strict";var r=e(7),o=e(32),a=e(33),i=e(6),u=e(8),s=e(27),l=e(34);function c(t,n){return n=n.split("// __split__"),new o.Program(t,n[0],n[1])}t.exports=function(t,n,e){var f,h,p,d,m,g,v,y,b,x,M,_,w,k,S,A,E,T,P,R,N,O,C,L,U,j,D,z=this,q=null,F=null,B=null,I=null,X=null,Y=null,V=0,H=!1,G=!1;function W(t){p.viewport(0,0,e,e);var o=u.clone(t);o.zoom=1/f,o.translation.x=0,o.translation.y=0;for(var a=r.mat4.create(),i=0;i<3;i++){var s=r.vec3.random(r.vec3.create(),1);r.mat4.rotate(a,a,10*Math.random(),s)}o.rotation=r.mat4.multiply(r.mat4.create(),a,o.rotation),E.bind(),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT);var l=u.getRect(o),c=r.mat4.create();r.mat4.ortho(c,l.left,l.right,l.bottom,l.top,0,f);var h=r.mat4.create();r.mat4.lookAt(h,[0,0,0],[0,0,-1],[0,1,0]);var d=r.mat4.create();r.mat4.translate(d,d,[0,0,-f/2]),r.mat4.multiply(d,d,o.rotation),N.setUniform("uProjection","Matrix4fv",!1,c),N.setUniform("uView","Matrix4fv",!1,h),N.setUniform("uModel","Matrix4fv",!1,d),N.setUniform("uBottomLeft","2fv",[l.left,l.bottom]),N.setUniform("uTopRight","2fv",[l.right,l.top]),N.setUniform("uAtomScale","1f",2.5*o.atomScale),N.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),N.setUniform("uRes","1f",e),N.setUniform("uDepth","1f",f),N.setUniform("uMode","1i",0),N.setUniform("uAtomShade","1f",t.atomShade),q.render(),t.bonds&&null!=F&&(O.setUniform("uProjection","Matrix4fv",!1,c),O.setUniform("uView","Matrix4fv",!1,h),O.setUniform("uModel","Matrix4fv",!1,d),O.setUniform("uRotation","Matrix4fv",!1,o.rotation),O.setUniform("uDepth","1f",f),O.setUniform("uBottomLeft","2fv",[l.left,l.bottom]),O.setUniform("uTopRight","2fv",[l.right,l.top]),O.setUniform("uRes","1f",e),O.setUniform("uBondRadius","1f",2.5*u.getBondRadius(t)),O.setUniform("uBondShade","1f",t.bondShade),O.setUniform("uAtomScale","1f",2.5*t.atomScale),O.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),O.setUniform("uMode","1i",0),F.render()),p.viewport(0,0,n,n);var y=u.getRect(t),x=u.getRect(o),M=r.mat4.invert(r.mat4.create(),a);T.bind(),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT),C.setUniform("uSceneDepth","1i",g.index),C.setUniform("uSceneNormal","1i",m.index),C.setUniform("uRandRotDepth","1i",v.index),C.setUniform("uAccumulator","1i",b.index),C.setUniform("uSceneBottomLeft","2fv",[y.left,y.bottom]),C.setUniform("uSceneTopRight","2fv",[y.right,y.top]),C.setUniform("uRotBottomLeft","2fv",[x.left,x.bottom]),C.setUniform("uRotTopRight","2fv",[x.right,x.top]),C.setUniform("uRes","1f",n),C.setUniform("uDepth","1f",f),C.setUniform("uRot","Matrix4fv",!1,a),C.setUniform("uInvRot","Matrix4fv",!1,M),C.setUniform("uSampleCount","1i",V),B.render(),b.activate(),b.bind(),p.copyTexImage2D(p.TEXTURE_2D,0,p.RGBA,0,0,n,n,0)}z.getAOProgress=function(){return V/1024},z.initialize=function(){t.width=t.height=n,(p=t.getContext("webgl")).enable(p.DEPTH_TEST),p.enable(p.CULL_FACE),p.clearColor(0,0,0,0),p.clearDepth(1),p.viewport(0,0,n,n),window.gl=p,o.getExtensions(p,["EXT_frag_depth","WEBGL_depth_texture"]),z.createTextures(),N=c(p,l.shaders.atom),O=c(p,l.shaders.bond),D=c(p,l.shaders["textured-quad"]),C=c(p,l.shaders.accumulator),L=c(p,l.shaders.ao),U=c(p,l.shaders.fxaa),j=c(p,l.shaders.dof);var e=[-1,-1,0,1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,1,0],r=o.buildAttribs(p,{aPosition:3});r.aPosition.buffer.set(new Float32Array(e));var a=e.length/9;new o.Renderable(p,D,r,a),B=new o.Renderable(p,C,r,a),I=new o.Renderable(p,L,r,a),Y=new o.Renderable(p,U,r,a),X=new o.Renderable(p,j,r,a),0},z.createTextures=function(){y=new o.Texture(p,0,null,e,e),v=new o.Texture(p,1,null,e,e,{internalFormat:p.DEPTH_COMPONENT,format:p.DEPTH_COMPONENT,type:p.UNSIGNED_SHORT}),E=new o.Framebuffer(p,[y],v),d=new o.Texture(p,2,null,n,n),m=new o.Texture(p,3,null,n,n),g=new o.Texture(p,4,null,n,n,{internalFormat:p.DEPTH_COMPONENT,format:p.DEPTH_COMPONENT,type:p.UNSIGNED_SHORT}),S=new o.Framebuffer(p,[d],g),A=new o.Framebuffer(p,[m],g),b=new o.Texture(p,5,null,n,n),x=new o.Texture(p,6,null,n,n),T=new o.Framebuffer(p,[x]),k=new o.Texture(p,7,null,n,n),R=new o.Framebuffer(p,[k]),M=new o.Texture(p,8,null,n,n),_=new o.Texture(p,9,null,n,n),P=new o.Framebuffer(p,[_]),w=new o.Texture(p,10,null,n,n),new o.Framebuffer(p,[w])},z.setResolution=function(r,o){e=o,n=r,t.width=t.height=n,p.viewport(0,0,n,n),z.createTextures()},z.setSystem=function(t,n){function e(t){for(var n=[],e=0;e<36;e++)n.push.apply(n,t);return n}h=t;for(var r=o.buildAttribs(p,{aImposter:3,aPosition:3,aRadius:1,aColor:3}),u=[],s=[],l=[],c=[],f=0;f0)){r=o.buildAttribs(p,{aImposter:3,aPosA:3,aPosB:3,aRadA:1,aRadB:1,aColA:3,aColB:3}),u=[];var v=[],y=[],b=[],x=[],M=[],_=[];for(f=0;fn.bondThreshold)break;u.push.apply(u,a.position),v.push.apply(v,e([w.posA.x,w.posA.y,w.posA.z])),y.push.apply(y,e([w.posB.x,w.posB.y,w.posB.z])),b.push.apply(b,e([w.radA])),x.push.apply(x,e([w.radB])),M.push.apply(M,e([w.colA.r,w.colA.g,w.colA.b])),_.push.apply(_,e([w.colB.r,w.colB.g,w.colB.b]))}r.aImposter.buffer.set(new Float32Array(u)),r.aPosA.buffer.set(new Float32Array(v)),r.aPosB.buffer.set(new Float32Array(y)),r.aRadA.buffer.set(new Float32Array(b)),r.aRadB.buffer.set(new Float32Array(x)),r.aColA.buffer.set(new Float32Array(M)),r.aColB.buffer.set(new Float32Array(_));g=u.length/9;F=new o.Renderable(p,O,r,g)}},z.reset=function(){V=0,H=!1,G=!1,b.reset(),x.reset()},z.render=function(t){if(void 0!==h&&null!=q){if(f=2*s.getRadius(h),H)if(G)for(var e=0;e1024);e++)W(t),V++;else!function(t){G=!0,p.viewport(0,0,n,n),A.bind(),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT);var e=u.getRect(t),o=r.mat4.create();r.mat4.ortho(o,e.left,e.right,e.bottom,e.top,0,f);var a=r.mat4.create();r.mat4.lookAt(a,[0,0,0],[0,0,-1],[0,1,0]);var i=r.mat4.create();r.mat4.translate(i,i,[0,0,-f/2]),r.mat4.multiply(i,i,t.rotation),N.setUniform("uProjection","Matrix4fv",!1,o),N.setUniform("uView","Matrix4fv",!1,a),N.setUniform("uModel","Matrix4fv",!1,i),N.setUniform("uBottomLeft","2fv",[e.left,e.bottom]),N.setUniform("uTopRight","2fv",[e.right,e.top]),N.setUniform("uAtomScale","1f",2.5*t.atomScale),N.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),N.setUniform("uRes","1f",n),N.setUniform("uDepth","1f",f),N.setUniform("uMode","1i",1),N.setUniform("uAtomShade","1f",t.atomShade),q.render(),t.bonds&&null!=F&&(A.bind(),O.setUniform("uProjection","Matrix4fv",!1,o),O.setUniform("uView","Matrix4fv",!1,a),O.setUniform("uModel","Matrix4fv",!1,i),O.setUniform("uRotation","Matrix4fv",!1,t.rotation),O.setUniform("uDepth","1f",f),O.setUniform("uBottomLeft","2fv",[e.left,e.bottom]),O.setUniform("uTopRight","2fv",[e.right,e.top]),O.setUniform("uRes","1f",n),O.setUniform("uBondRadius","1f",2.5*u.getBondRadius(t)),O.setUniform("uBondShade","1f",t.bondShade),O.setUniform("uAtomScale","1f",2.5*t.atomScale),O.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),O.setUniform("uMode","1i",1),F.render())}(t);else!function(t){H=!0,p.viewport(0,0,n,n),S.bind(),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT);var e=u.getRect(t),o=r.mat4.create();r.mat4.ortho(o,e.left,e.right,e.bottom,e.top,0,f);var a=r.mat4.create();r.mat4.lookAt(a,[0,0,0],[0,0,-1],[0,1,0]);var i=r.mat4.create();r.mat4.translate(i,i,[0,0,-f/2]),r.mat4.multiply(i,i,t.rotation),N.setUniform("uProjection","Matrix4fv",!1,o),N.setUniform("uView","Matrix4fv",!1,a),N.setUniform("uModel","Matrix4fv",!1,i),N.setUniform("uBottomLeft","2fv",[e.left,e.bottom]),N.setUniform("uTopRight","2fv",[e.right,e.top]),N.setUniform("uAtomScale","1f",2.5*t.atomScale),N.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),N.setUniform("uRes","1f",n),N.setUniform("uDepth","1f",f),N.setUniform("uMode","1i",0),N.setUniform("uAtomShade","1f",t.atomShade),q.render(),t.bonds&&null!=F&&(S.bind(),O.setUniform("uProjection","Matrix4fv",!1,o),O.setUniform("uView","Matrix4fv",!1,a),O.setUniform("uModel","Matrix4fv",!1,i),O.setUniform("uRotation","Matrix4fv",!1,t.rotation),O.setUniform("uDepth","1f",f),O.setUniform("uBottomLeft","2fv",[e.left,e.bottom]),O.setUniform("uTopRight","2fv",[e.right,e.top]),O.setUniform("uRes","1f",n),O.setUniform("uBondRadius","1f",2.5*u.getBondRadius(t)),O.setUniform("uBondShade","1f",t.bondShade),O.setUniform("uAtomScale","1f",2.5*t.atomScale),O.setUniform("uRelativeAtomScale","1f",t.relativeAtomScale),O.setUniform("uMode","1i",0),F.render())}(t);!function(t){p.viewport(0,0,n,n),t.fxaa>0||t.dofStrength>0?R.bind():p.bindFramebuffer(p.FRAMEBUFFER,null);if(p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT),L.setUniform("uSceneColor","1i",d.index),L.setUniform("uSceneDepth","1i",g.index),L.setUniform("uAccumulatorOut","1i",x.index),L.setUniform("uRes","1f",n),L.setUniform("uAO","1f",2*t.ao),L.setUniform("uBrightness","1f",2*t.brightness),L.setUniform("uOutlineStrength","1f",t.outline),I.render(),t.fxaa>0){t.dofStrength>0?P.bind():p.bindFramebuffer(p.FRAMEBUFFER,null);for(var e=0;e0&&(p.bindFramebuffer(p.FRAMEBUFFER,null),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT),t.fxaa>0?j.setUniform("uColor","1i",M.index):j.setUniform("uColor","1i",k.index),j.setUniform("uDepth","1i",g.index),j.setUniform("uDOFPosition","1f",t.dofPosition),j.setUniform("uDOFStrength","1f",t.dofStrength),j.setUniform("uRes","1f",n),X.render())}(t)}},z.initialize()}},function(t,n){function e(t){var n=this;n.initialize=function(){n.buffer=t.createBuffer()},n.bind=function(){t.bindBuffer(t.ARRAY_BUFFER,n.buffer)},n.set=function(e){n.bind(),t.bufferData(t.ARRAY_BUFFER,e,t.STATIC_DRAW)},n.initialize()}t.exports.buildAttribs=function(t,n){var r={};for(var o in n)r[o]={buffer:new e(t),size:n[o]};return r},t.exports.getExtensions=function(t,n){for(var e={},r=0;r1){for(var a=[],i=0;i 0.0) {\n float depth = texture2D(uSceneDepth, p).r;\n float r = 1.0/511.0;\n float d0 = abs(texture2D(uSceneDepth, p + vec2(-r, 0)).r - depth);\n float d1 = abs(texture2D(uSceneDepth, p + vec2( r, 0)).r - depth);\n float d2 = abs(texture2D(uSceneDepth, p + vec2( 0, -r)).r - depth);\n float d3 = abs(texture2D(uSceneDepth, p + vec2( 0, r)).r - depth);\n float d = max(d0, d1);\n d = max(d, d2);\n d = max(d, d3);\n sceneColor.rgb *= pow(1.0 - d, uOutlineStrength * 32.0);\n sceneColor.a = max(step(0.003, d), sceneColor.a);\n }\n vec4 dAccum = texture2D(uAccumulatorOut, p);\n float shade = max(0.0, 1.0 - (dAccum.r + dAccum.g + dAccum.b + dAccum.a) * 0.25 * uAO);\n shade = pow(shade, 2.0);\n gl_FragColor = vec4(uBrightness * sceneColor.rgb * shade, sceneColor.a);\n}\n",atom:"#version 100\nprecision highp float;\n\nattribute vec3 aImposter;\nattribute vec3 aPosition;\nattribute float aRadius;\nattribute vec3 aColor;\n\nuniform mat4 uView;\nuniform mat4 uProjection;\nuniform mat4 uModel;\nuniform float uAtomScale;\nuniform float uRelativeAtomScale;\nuniform float uAtomShade;\n\nvarying vec3 vColor;\nvarying vec3 vPosition;\nvarying float vRadius;\n\nvoid main() {\n vRadius = uAtomScale * (1.0 + (aRadius - 1.0) * uRelativeAtomScale);\n gl_Position = uProjection * uView * uModel * vec4(vRadius * aImposter + aPosition, 1.0);\n vColor = mix(aColor, vec3(1,1,1), uAtomShade);\n vPosition = vec3(uModel * vec4(aPosition, 1));\n}\n\n\n// __split__\n\n\n#version 100\n#extension GL_EXT_frag_depth: enable\nprecision highp float;\n\nuniform vec2 uBottomLeft;\nuniform vec2 uTopRight;\nuniform float uRes;\nuniform float uDepth;\nuniform int uMode;\n\nvarying vec3 vPosition;\nvarying float vRadius;\nvarying vec3 vColor;\n\nvec2 res = vec2(uRes, uRes);\n\nfloat raySphereIntersect(vec3 r0, vec3 rd) {\n float a = dot(rd, rd);\n vec3 s0_r0 = r0 - vPosition;\n float b = 2.0 * dot(rd, s0_r0);\n float c = dot(s0_r0, s0_r0) - (vRadius * vRadius);\n float disc = b*b - 4.0*a*c;\n if (disc <= 0.0) {\n return -1.0;\n }\n return (-b - sqrt(disc))/(2.0*a);\n}\n\nvoid main() {\n vec3 r0 = vec3(uBottomLeft + (gl_FragCoord.xy/res) * (uTopRight - uBottomLeft), 0.0);\n vec3 rd = vec3(0, 0, -1);\n float t = raySphereIntersect(r0, rd);\n if (t < 0.0) {\n discard;\n }\n vec3 coord = r0 + rd * t;\n vec3 normal = normalize(coord - vPosition);\n if (uMode == 0) {\n gl_FragColor = vec4(vColor, 1);\n } else if (uMode == 1) {\n gl_FragColor = vec4(normal * 0.5 + 0.5, 1.0);\n }\n gl_FragDepthEXT = -coord.z/uDepth;\n}\n",blur:"#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uTexture;\nuniform float uRes;\nuniform int leftRight;\n\nvoid main() {\n vec2 dir;\n if (leftRight == 1) {\n dir = vec2(1,0)/uRes;\n } else {\n dir = vec2(0,1)/uRes;\n }\n const int range = 16;\n vec4 sample = vec4(0,0,0,0);\n for (int i = -range; i <= range; i++) {\n vec2 p = gl_FragCoord.xy/uRes + dir * float(i);\n sample += texture2D(uTexture, p);\n }\n sample /= float(range) * 2.0 + 1.0;\n gl_FragColor = sample;\n}\n",bond:"#version 100\nprecision highp float;\n\nattribute vec3 aImposter;\nattribute vec3 aPosA;\nattribute vec3 aPosB;\nattribute float aRadA;\nattribute float aRadB;\nattribute vec3 aColA;\nattribute vec3 aColB;\n\nuniform mat4 uView;\nuniform mat4 uProjection;\nuniform mat4 uModel;\nuniform mat4 uRotation;\nuniform float uBondRadius;\nuniform float uAtomScale;\nuniform float uRelativeAtomScale;\n\nvarying vec3 vNormal;\nvarying vec3 vPosA, vPosB;\nvarying float vRadA, vRadB;\nvarying vec3 vColA, vColB;\nvarying float vRadius;\n\nmat3 alignVector(vec3 a, vec3 b) {\n vec3 v = cross(a, b);\n float s = length(v);\n float c = dot(a, b);\n mat3 I = mat3(\n 1, 0, 0,\n 0, 1, 0,\n 0, 0, 1\n );\n mat3 vx = mat3(\n 0, v.z, -v.y,\n -v.z, 0, v.x,\n v.y, -v.x, 0\n );\n return I + vx + vx * vx * ((1.0 - c) / (s * s));\n}\n\nvoid main() {\n vRadius = uBondRadius;\n vec3 pos = vec3(aImposter);\n // Scale the box in x and z to be bond-radius.\n pos = pos * vec3(vRadius, 1, vRadius);\n // Shift the origin-centered cube so that the bottom is at the origin.\n pos = pos + vec3(0, 1, 0);\n // Stretch the box in y so that it is the length of the bond.\n pos = pos * vec3(1, length(aPosA - aPosB) * 0.5, 1);\n // Find the rotation that aligns vec3(0, 1, 0) with vec3(uPosB - uPosA) and apply it.\n vec3 a = normalize(vec3(-0.000001, 1.000001, 0.000001));\n vec3 b = normalize(aPosB - aPosA);\n mat3 R = alignVector(a, b);\n pos = R * pos;\n // Shift the cube so that the bottom is centered at the middle of atom A.\n pos = pos + aPosA;\n\n vec4 position = uModel * vec4(pos, 1);\n gl_Position = uProjection * uView * position;\n vPosA = aPosA;\n vPosB = aPosB;\n vRadA = uAtomScale * (1.0 + (aRadA - 1.0) * uRelativeAtomScale);\n vRadB = uAtomScale * (1.0 + (aRadB - 1.0) * uRelativeAtomScale);\n vColA = aColA;\n vColB = aColB;\n}\n\n\n// __split__\n\n\n#version 100\n#extension GL_EXT_frag_depth: enable\nprecision highp float;\n\nuniform mat4 uRotation;\nuniform vec2 uBottomLeft;\nuniform vec2 uTopRight;\nuniform float uDepth;\nuniform float uRes;\nuniform float uBondShade;\nuniform int uMode;\n\nvarying vec3 vPosA, vPosB;\nvarying float vRadA, vRadB;\nvarying vec3 vColA, vColB;\nvarying float vRadius;\n\nmat3 alignVector(vec3 a, vec3 b) {\n vec3 v = cross(a, b);\n float s = length(v);\n float c = dot(a, b);\n mat3 I = mat3(\n 1, 0, 0,\n 0, 1, 0,\n 0, 0, 1\n );\n mat3 vx = mat3(\n 0, v.z, -v.y,\n -v.z, 0, v.x,\n v.y, -v.x, 0\n );\n return I + vx + vx * vx * ((1.0 - c) / (s * s));\n}\n\nvoid main() {\n\n vec2 res = vec2(uRes, uRes);\n vec3 r0 = vec3(uBottomLeft + (gl_FragCoord.xy/res) * (uTopRight - uBottomLeft), uDepth/2.0);\n vec3 rd = vec3(0, 0, -1);\n\n vec3 i = normalize(vPosB - vPosA);\n i = vec3(uRotation * vec4(i, 0));\n vec3 j = normalize(vec3(-0.000001, 1.000001, 0.000001));\n mat3 R = alignVector(i, j);\n\n vec3 r0p = r0 - vec3(uRotation * vec4(vPosA, 0));\n r0p = R * r0p;\n vec3 rdp = R * rd;\n\n float a = dot(rdp.xz, rdp.xz);\n float b = 2.0 * dot(rdp.xz, r0p.xz);\n float c = dot(r0p.xz, r0p.xz) - vRadius*vRadius;\n float disc = b*b - 4.0*a*c;\n if (disc <= 0.0) {\n discard;\n }\n float t = (-b - sqrt(disc))/(2.0*a);\n if (t < 0.0) {\n discard;\n }\n\n vec3 coord = r0p + rdp * t;\n if (coord.y < 0.0 || coord.y > length(vPosA - vPosB)) {\n discard;\n }\n\n vec3 color;\n if (coord.y < vRadA + 0.5 * (length(vPosA - vPosB) - (vRadA + vRadB))) {\n color = vColA;\n } else {\n color = vColB;\n }\n\n color = mix(color, vec3(1,1,1), uBondShade);\n\n R = alignVector(j, i);\n vec3 normal = normalize(R * vec3(coord.x, 0, coord.z));\n\n coord = r0 + rd * t;\n if (uMode == 0) {\n gl_FragColor = vec4(color, 1);\n } else if (uMode == 1) {\n gl_FragColor = vec4(normal * 0.5 + 0.5, 1.0);\n }\n gl_FragDepthEXT = -(coord.z - uDepth/2.0)/uDepth;\n}\n",dof:"#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uColor;\nuniform sampler2D uDepth;\nuniform float uRes;\nuniform float uDOFPosition;\nuniform float uDOFStrength;\nuniform int leftRight;\n\nvoid main() {\n\n vec2 samples[64];\n samples[0] = vec2(0.857612, 0.019885);\n samples[1] = vec2(0.563809, -0.028071);\n samples[2] = vec2(0.825599, -0.346856);\n samples[3] = vec2(0.126584, -0.380959);\n samples[4] = vec2(0.782948, 0.594322);\n samples[5] = vec2(0.292148, -0.543265);\n samples[6] = vec2(0.130700, 0.330220);\n samples[7] = vec2(0.236088, 0.159604);\n samples[8] = vec2(-0.305259, 0.810505);\n samples[9] = vec2(0.269616, 0.923026);\n samples[10] = vec2(0.484486, 0.371845);\n samples[11] = vec2(-0.638057, 0.080447);\n samples[12] = vec2(0.199629, 0.667280);\n samples[13] = vec2(-0.861043, -0.370583);\n samples[14] = vec2(-0.040652, -0.996174);\n samples[15] = vec2(0.330458, -0.282111);\n samples[16] = vec2(0.647795, -0.214354);\n samples[17] = vec2(0.030422, -0.189908);\n samples[18] = vec2(0.177430, -0.721124);\n samples[19] = vec2(-0.461163, -0.327434);\n samples[20] = vec2(-0.410012, -0.734504);\n samples[21] = vec2(-0.616334, -0.626069);\n samples[22] = vec2(0.590759, -0.726479);\n samples[23] = vec2(-0.590794, 0.805365);\n samples[24] = vec2(-0.924561, -0.163739);\n samples[25] = vec2(-0.323028, 0.526960);\n samples[26] = vec2(0.642128, 0.752577);\n samples[27] = vec2(0.173625, -0.952386);\n samples[28] = vec2(0.759014, 0.330311);\n samples[29] = vec2(-0.360526, -0.032013);\n samples[30] = vec2(-0.035320, 0.968156);\n samples[31] = vec2(0.585478, -0.431068);\n samples[32] = vec2(-0.244766, -0.906947);\n samples[33] = vec2(-0.853096, 0.184615);\n samples[34] = vec2(-0.089061, 0.104648);\n samples[35] = vec2(-0.437613, 0.285308);\n samples[36] = vec2(-0.654098, 0.379841);\n samples[37] = vec2(-0.128663, 0.456572);\n samples[38] = vec2(0.015980, -0.568170);\n samples[39] = vec2(-0.043966, -0.771940);\n samples[40] = vec2(0.346512, -0.071238);\n samples[41] = vec2(-0.207921, -0.209121);\n samples[42] = vec2(-0.624075, -0.189224);\n samples[43] = vec2(-0.120618, 0.689339);\n samples[44] = vec2(-0.664679, -0.410200);\n samples[45] = vec2(0.371945, -0.880573);\n samples[46] = vec2(-0.743251, 0.629998);\n samples[47] = vec2(-0.191926, -0.413946);\n samples[48] = vec2(0.449574, 0.833373);\n samples[49] = vec2(0.299587, 0.449113);\n samples[50] = vec2(-0.900432, 0.399319);\n samples[51] = vec2(0.762613, -0.544796);\n samples[52] = vec2(0.606462, 0.174233);\n samples[53] = vec2(0.962185, -0.167019);\n samples[54] = vec2(0.960990, 0.249552);\n samples[55] = vec2(0.570397, 0.559146);\n samples[56] = vec2(-0.537514, 0.555019);\n samples[57] = vec2(0.108491, -0.003232);\n samples[58] = vec2(-0.237693, -0.615428);\n samples[59] = vec2(-0.217313, 0.261084);\n samples[60] = vec2(-0.998966, 0.025692);\n samples[61] = vec2(-0.418554, -0.527508);\n samples[62] = vec2(-0.822629, -0.567797);\n samples[63] = vec2(0.061945, 0.522105);\n\n float invRes = 1.0/uRes;\n vec2 coord = gl_FragCoord.xy * invRes;\n\n float strength = uDOFStrength * uRes/768.0;\n\n float depth = texture2D(uDepth, coord).r;\n float range = uDOFPosition - depth;\n float scale = abs(range);\n\n vec4 sample = texture2D(uColor, coord);\n float count = 1.0;\n for(int i = 0; i < 64; i++) {\n vec2 p = samples[i];\n p = coord + scale * 64.0 * strength * p * invRes;\n float d = texture2D(uDepth, p).r;\n float r = uDOFPosition - d;\n float s = abs(r);\n sample += texture2D(uColor, p) * s;\n count += s;\n }\n\n gl_FragColor = sample/count;\n}",fxaa:"#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uTexture;\nuniform float uRes;\n\nvoid main() {\n float FXAA_SPAN_MAX = 8.0;\n float FXAA_REDUCE_MUL = 1.0/8.0;\n float FXAA_REDUCE_MIN = 1.0/128.0;\n\n vec2 texCoords = gl_FragCoord.xy/uRes;\n\n vec4 rgbNW = texture2D(uTexture, texCoords + (vec2(-1.0, -1.0) / uRes));\n vec4 rgbNE = texture2D(uTexture, texCoords + (vec2(1.0, -1.0) / uRes));\n vec4 rgbSW = texture2D(uTexture, texCoords + (vec2(-1.0, 1.0) / uRes));\n vec4 rgbSE = texture2D(uTexture, texCoords + (vec2(1.0, 1.0) / uRes));\n vec4 rgbM = texture2D(uTexture, texCoords);\n\n vec4 luma = vec4(0.299, 0.587, 0.114, 1.0);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) * (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n float rcpDirMin = 1.0/(min(abs(dir.x), abs(dir.y)) + dirReduce);\n\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX), max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX), dir * rcpDirMin)) / uRes;\n\n vec4 rgbA = (1.0/2.0) * \n (texture2D(uTexture, texCoords.xy + dir * (1.0/3.0 - 0.5)) + \n texture2D(uTexture, texCoords.xy + dir * (2.0/3.0 - 0.5)));\n vec4 rgbB = rgbA * (1.0/2.0) + (1.0/4.0) * \n (texture2D(uTexture, texCoords.xy + dir * (0.0/3.0 - 0.5)) +\n texture2D(uTexture, texCoords.xy + dir * (3.0/3.0 - 0.5)));\n float lumaB = dot(rgbB, luma);\n\n if((lumaB < lumaMin) || (lumaB > lumaMax)){\n gl_FragColor = rgbA;\n } else {\n gl_FragColor = rgbB;\n }\n\n}","textured-quad":"#version 100\nprecision highp float;\n\nattribute vec3 aPosition;\n\nvoid main() {\n gl_Position = vec4(aPosition, 1);\n}\n\n\n// __split__\n\n\n#version 100\nprecision highp float;\n\nuniform sampler2D uTexture;\nuniform float uRes;\n\nvoid main() {\n gl_FragColor = texture2D(uTexture, gl_FragCoord.xy/uRes);\n}\n"};t.exports={shaders:r}},function(t,n,e){"use strict";function r(t){return(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)}var o=e(8);t.exports=function(t){if(arguments.length>1)throw"Error: The Speck Interactions module has changed!";if(0===arguments.length||"object"!==r(t))throw"Error: Arguments not provided to interactions";var n=void 0===t.scrollZoom||t.scrollZoom,e=t.container,a=t.getRotation,i=t.setRotation,u=t.getTranslation,s=t.setTranslation,l=t.getZoom,c=t.setZoom,f=t.refreshView,h={buttonDown:!1,shiftDown:!1,lastX:0,lastY:0};function p(t){0===t.button&&(h={buttonDown:!0,shiftDown:h.shiftDown,lastX:t.clientX,lastY:t.clientY})}function d(t){if(0===t.button){if(!h.buttonDown)return;h.buttonDown=!1}}function m(t){h.shiftDown=t.shiftKey}function g(t){if(h.buttonDown&&0!==t.buttons){t.preventDefault();var n=t.clientX-h.lastX,e=t.clientY-h.lastY;if(0!==n||0!==e){if(h.lastX=t.clientX,h.lastY=t.clientY,h.shiftDown){var r=u(),c=.001/l();s({x:r.x-n*c,y:r.y+e*c})}else{var p={rotation:new Float32Array(a())};o.rotate(p,n,e),i(p.rotation)}f()}}}function v(t){t.preventDefault(),c(l()*(t.deltaY<0?1/.9:.9)),f()}function y(){e.removeEventListener("mousedown",p),window.removeEventListener("mouseup",d),window.removeEventListener("keydown",m),window.removeEventListener("keyup",m),window.removeEventListener("mousemove",g),e.removeEventListener("wheel",v)}return e.addEventListener("mousedown",p),window.addEventListener("mouseup",d),window.addEventListener("keydown",m),window.addEventListener("keyup",m),window.addEventListener("mousemove",g),n&&e.addEventListener("wheel",v),y}},function(t,n){t.exports={default:{atomScale:.6,relativeAtomScale:1,bondScale:.5,ao:.75,aoRes:256,brightness:.5,outline:0,spf:32,bonds:!1,bondThreshold:1.2,bondShade:.5,atomShade:.5,dofStrength:0,dofPosition:.5,fxaa:1},stickball:{atomScale:.24,relativeAtomScale:.64,bondScale:.5,bonds:!0,bondThreshold:1.2},toon:{ao:0,spf:0,brightness:.5,outline:1},licorice:{atomScale:.1,relativeAtomScale:0,bondScale:1,bonds:!0,bondThreshold:1.2}}},function(t,n,e){"use strict";e.r(n);var r=e(12),o=e(13),a=e(1),i=e.n(a),u=e(0),s=e.n(u),l=e(28),c=e(51);function f(t){return(f="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)}function h(t,n){for(var e=0;e=0;){if(e[p]===t)return r[p]===n;p-=1}switch(h){case"Map":return t.size===n.size&&c(t.entries(),n.entries(),e.concat([t]),r.concat([n]));case"Set":return t.size===n.size&&c(t.values(),n.values(),e.concat([t]),r.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var d=Object(s.a)(t);if(d.length!==Object(s.a)(n).length)return!1;var m=e.concat([t]),g=r.concat([n]);for(p=d.length-1;p>=0;){var v=d[p];if(!Object(i.a)(v,n)||!f(n[v],t[v],m,g))return!1;p-=1}return!0}var h=Object(r.a)((function(t,n){return f(t,n,[],[])}));n.a=h}]); //# sourceMappingURL=bundle.js.map \ No newline at end of file diff --git a/dash_bio/bundle.js.map b/dash_bio/bundle.js.map index 4053752eb..c851de1d2 100644 --- a/dash_bio/bundle.js.map +++ b/dash_bio/bundle.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/prop-types/index.js","webpack:///external \"React\"","webpack:///./src/lib/LazyLoader.js","webpack:///./node_modules/ramda/es/internal/_curry1.js","webpack:///./node_modules/ramda/es/internal/_isPlaceholder.js","webpack:///./node_modules/ramda/es/internal/_has.js","webpack:///./node_modules/speck/src/elements.js","webpack:///./node_modules/speck/src/gl-matrix.js","webpack:///./node_modules/speck/src/view.js","webpack:///./node_modules/ramda/es/internal/_isArguments.js","webpack:///./node_modules/ramda/es/keys.js","webpack:///./node_modules/ramda/es/type.js","webpack:///./node_modules/ramda/es/internal/_curry2.js","webpack:///./src/lib/components/AlignmentChart.react.js","webpack:///./src/lib/components/Circos.react.js","webpack:///./src/lib/components/Ideogram.react.js","webpack:///./src/lib/components/Igv.react.js","webpack:///./src/lib/components/Pileup.react.js","webpack:///./src/lib/components/Molecule2dViewer.react.js","webpack:///./src/lib/components/Molecule3dViewer.js","webpack:///./src/lib/components/NeedlePlot.react.js","webpack:///./src/lib/components/NglMoleculeViewer.react.js","webpack:///./src/lib/components/OncoPrint.react.js","webpack:///./src/lib/components/SequenceViewer.react.js","webpack:///./src/lib/components/Speck.react.js","webpack:///./src/lib/components/Jsme.react.js","webpack:///./node_modules/speck/build/index.js","webpack:///./node_modules/speck/src/const.js","webpack:///./node_modules/speck/src/system.js","webpack:///./node_modules/fornac/dist/scripts/fornac.js","webpack:///./node_modules/prop-types/factoryWithThrowingShims.js","webpack:///./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/speck/src/renderer.js","webpack:///./node_modules/speck/src/webgl.js","webpack:///./node_modules/speck/src/cube.js","webpack:///./node_modules/speck/src/shaders.js","webpack:///./node_modules/speck/src/interactions.js","webpack:///./node_modules/speck/src/presets.js","webpack:///./src/lib/components/FornaContainer.react.js","webpack:///./src/lib/index.js","webpack:///external \"ReactDOM\"","webpack:///./node_modules/ramda/es/internal/_arrayFromIterator.js","webpack:///./node_modules/ramda/es/internal/_includesWith.js","webpack:///./node_modules/ramda/es/internal/_objectIs.js","webpack:///./node_modules/ramda/es/internal/_equals.js","webpack:///./node_modules/ramda/es/internal/_functionName.js","webpack:///./node_modules/ramda/es/equals.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","installedModules","14","jsonpScriptSrc","__webpack_require__","p","exports","module","l","e","promises","installedChunkData","promise","Promise","resolve","reject","onScriptComplete","script","document","createElement","charset","timeout","nc","setAttribute","src","error","Error","event","onerror","onload","clearTimeout","chunk","errorType","type","realSrc","target","message","name","request","undefined","setTimeout","head","appendChild","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","err","console","url","getCurrentScript","currentScript","doc_scripts","getElementsByTagName","scripts","filter","s","async","text","textContent","slice","split","join","__jsonpScriptSrc__","isLocal","test","isLocalScript","srcFragments","fileFragments","splice","jsonpArray","window","oldJsonpFunction","alignmentChart","circos","ideogram","igv","pileup","molecule2dViewer","molecule3dViewer","nglmoleculeViewer","needlePlot","oncoPrint","sequenceViewer","speck","jsme","_curry1","fn","f1","a","arguments","apply","this","_isPlaceholder","_has","prop","obj","_global","shim","GLMAT_EPSILON","GLMAT_ARRAY_TYPE","Float32Array","Array","GLMAT_RANDOM","Math","random","glMatrix","degree","PI","toRadian","vec","vec2","out","clone","fromValues","x","y","copy","set","add","b","subtract","sub","multiply","mul","divide","div","min","max","scale","scaleAndAdd","distance","sqrt","dist","squaredDistance","sqrDist","len","squaredLength","sqrLen","negate","inverse","normalize","dot","cross","z","lerp","ax","ay","cos","sin","transformMat2","transformMat2d","transformMat3","transformMat4","forEach","stride","offset","count","arg","str","vec3","az","bx","by","bz","zScale","w","transformQuat","q","qx","qy","qz","qw","ix","iy","iz","iw","rotateX","rotateY","rotateZ","angle","tempA","tempB","cosine","acos","vec4","aw","mat2","a1","a0","a2","a3","det","b0","b1","b2","b3","rotate","rad","v","v0","v1","frob","pow","LDU","L","D","U","mat2d","aa","ab","ac","ad","atx","aty","a4","a5","b4","b5","translate","mat3","a01","a02","a12","a00","a10","a11","a20","a21","a22","b01","b11","b21","b00","b02","b10","b12","b20","b22","fromMat2d","fromQuat","x2","y2","z2","xx","yx","yy","zx","zy","zz","wx","wy","wz","normalFromMat4","a03","a13","a23","a30","a31","a32","a33","b03","b04","b05","b06","b07","b08","b09","mat4","axis","abs","fromRotationTranslation","xy","xz","yz","frustum","left","right","bottom","top","near","far","rl","tb","nf","perspective","fovy","aspect","f","tan","ortho","lr","bt","lookAt","eye","center","up","x0","x1","y0","y1","z0","z1","eyex","eyey","eyez","upx","upy","upz","centerx","centery","centerz","identity","tmpvec3","xUnitVec3","yUnitVec3","matr","quat","rotationTo","setAxisAngle","setAxes","view","fromMat3","bw","calculateW","slerp","omega","cosom","sinom","scale0","scale1","invert","invDot","conjugate","fRoot","fTrace","j","k","glm","require","elements","consts","clamp","zoom","translation","atomScale","relativeAtomScale","bondScale","rotation","ao","aoRes","brightness","outline","spf","bonds","bondThreshold","bondShade","atomShade","resolution","dofStrength","dofPosition","fxaa","system","maxX","Infinity","minX","maxY","minY","atoms","symbol","radius","cx","cy","override","deserialize","serialize","JSON","stringify","parse","dx","dy","getRect","width","height","getBondRadius","MIN_ATOM_RADIUS","toString","hasEnumBug","propertyIsEnumerable","nonEnumerableProps","hasArgsEnumBug","contains","list","item","idx","keys","nIdx","ks","checkArgsLength","val","_curry2","f2","_b","_a","RealAlignmentChart","lazy","LazyLoader","AlignmentChart","fallback","props","Component","propTypes","id","PropTypes","string","setProps","func","eventDatum","extension","colorscale","oneOfType","opacity","number","textcolor","textsize","showlabel","bool","showid","showconservation","conservationcolor","conservationcolorscale","array","conservationopacity","conservationmethod","oneOf","correctgap","showgap","gapcolor","gapcolorscale","gapopacity","groupbars","showconsensus","tilewidth","tileheight","overview","numtiles","scrollskip","tickstart","ticksteps","sequenceIds","loading_state","shape","is_loading","prop_name","component_name","defaultProps","RealCircos","Circos","config","size","tracks","enableDownloadSVG","enableZoomPan","style","selectEvent","layout","arrayOf","isRequired","color","label","innerRadius","outerRadius","cornerRadius","gap","labels","display","radialOffset","ticks","spacing","labelSpacing","labelSuffix","labelDenominator","labelDisplay0","labelSize","labelColor","labelFont","majorSpacing","minor","major","RealIdeogram","Ideogram","organism","dataDir","annotationsColor","annotationsLayout","barWidth","chrHeight","chrMargin","chrWidth","ploidy","rotatable","showBandLabels","showChromosomeLabels","showAnnotTooltip","showFullyBanded","showNonNuclearChromosomes","className","annotations","chr","start","stop","annotationsPath","annotationsData","annotationTracks","annotationHeight","histogramScaling","assembly","brush","brushData","end","extent","container","chromosomes","localOrganism","homology","chrOne","chrTwo","fullChromosomeLabels","filterable","orientation","ploidyDesc","ancestors","rangeSet","rotated","sex","RealIgv","Igv","genome","reference","locus","minimumBases","RealPileup","Pileup","range","exact","contig","viz","vizOptions","source","sourceOptions","RealMolecule2dViewer","Molecule2dViewer","modelData","nodes","links","selectedAtomIds","atom","bond","strength","scrollZoom","RealMolecule3dViewer","Molecule3dViewer","selectionType","backgroundColor","backgroundOpacity","factor","animationDuration","fixedPath","zoomTo","sel","styles","visualization_type","atomLabelsShown","orbital","cube_file","iso_val","positiveVolumetricColor","negativeVolumetricColor","chain","resi","shapes","onRenderNewData","onChangeSelection","RealNeedlePlot","NeedlePlot","mutationData","mutationGroups","domains","margin","xlabel","ylabel","rangeSlider","needleStyle","stemColor","stemThickness","stemConstHeight","headSize","headColor","headSymbol","domainStyle","domainColor","displayMinorDomains","textangle","clickData","RealNglMoleculeViewer","NglMoleculeViewer","filename","ext","selectedValue","aaRange","chosen","chosenAtoms","chosenResidues","input","uploaded","resetView","stageParameters","quality","cameraType","imageParameters","antialias","transparent","trim","defaultFilename","downloadImage","molStyles","representations","chosenAtomsColor","chosenAtomsRadius","molSpacingXaxis","sideByside","pdbString","residues","RealOncoPrint","OncoPrint","padding","backgroundcolor","showlegend","showoverview","RealSequenceViewer","SequenceViewer","sequence","showLineNumbers","wrapAminoAcids","charsPerLine","toolbar","search","title","sequenceMaxHeight","badge","selection","coverage","propName","componentName","bgcolor","tooltip","underscore","onclick","legend","coverageClicked","mouseSelection","subpartSelected","RealSpeck","Speck","speckView","showLegend","position","presetView","RealJsme","Jsme","options","eventSmiles","smiles","speckRenderer","speckSystem","speckInteractions","speckPresetViews","speckElements","MAX_ATOM_RADIUS","getCentroid","farAtom","calculateBonds","sorted","sort","ea","eb","posA","posB","radA","radB","colA","g","colB","cutoff","addAtom","xsum","ysum","zsum","getFarAtom","maxd","rd","getRadius","factory","loaded","rnaPlot","RNAGraph","_rnagraph","_rnaplot","FornaContainer","element","passedOptions","self","option","initialSize","svgW","svgH","_d2","default","category20","mousedownNode","mouseupNode","xScale","linear","domain","yScale","graph","magnitude","positionAnyNode","endPoint","startPoint","prevNode","linked","u","arrowTip","path","select","attr","realLinkFilter","linkType","changeColors","moleculeColors","num","parseFloat","isNaN","mousedown","mousemove","mpos","mouse","vis","node","dragLine","mouseup","resetMouseVars","linkStrengths","displayParameters","colorScheme","customColors","animation","applyForce","deaf","rnas","extraLinks","equals","createInitialLayout","structure","labelInterval","rg","circularizeExternal","rnaJson","recalculateElements","positions","naview","_naview","NAView","naViewPositions","naview_xy_coordinates","pairtable","_i","nbase","_simplernaplot","simpleXyCoordinates","elementsToJson","addUids","uids","addPositions","addLabels","reinforceStems","reinforceLoops","connectFakeNodes","reassignLinkUids","breakNodesToFakeNodes","addRNA","newLinks","addExternalLinks","concat","addRNAJSON","avoidOthers","externalLinks","newLink","uid","generateUUID","nucs","log","rnaGraph","map","px","rna","recalculateGraph","update","centerView","transitionRNA","newStructure","nextFunction","duration","transitionDuration","nodeType","newRNAJson","gnodes","visNodes","selectAll","nodeKey","transition","visLinks","linkKey","newNodes","createNewNodes","enter","exit","remove","each","updateStyle","createNewLinks","callback","uidsToNodes","link","fakeLinks","linkIndex","indexOf","addNodes","json","entry","addCustomColors","addCustomColorsText","customColorsText","cs","_rnautils","ColorScheme","colorsJson","changeColorScheme","clearNodes","toJSON","fromJSON","jsonString","seq","dotbracket","circular","structName","rnaLength","nucsToNodes","pseudoknotPairs","ProteinGraph","setSize","offsetHeight","offsetWidth","zoomer","brusher","resizeSvgOnResize","svg","setOutlineColor","newColorScheme","classed","ordinal","category10","elemType","interpolate","interpolateLab","colorValues","setHoverPattern","newPattern","addEventListener","behavior","scaleExtent","on","zoomstart","redraw","keydown","keyup","focus","append","svgGraph","allowPanningAndZooming","datum","selected","previouslySelected","ctrlKeydown","clear","getBoundingBoxTransform","molWidth","molHeight","widthRatio","heightRatio","minRatio","newMolWidth","newMolHeight","bbTransform","force","charge","middleCharge","otherCharge","friction","linkDistance","linkDistanceMultiplier","linkStrength","other","gravity","chargeDistance","shiftKeydown","selectedNodes","mouseDownNode","dragstarted","sourceEvent","stopPropagation","d1","fixed","dragged","py","resumeForce","preventDefault","dragended","collide","nx1","nx2","ny1","ny2","quad","point","resume","drag","keyCode","updateRnaGraph","nucleotidePositions","getPositions","labelPositions","getUids","addPseudoknots","updateLinkUids","removeLink","index","extraLinkIndex","linkClick","addLink","nodeMouseclick","defaultPrevented","nodeMouseup","nodeMousedown","startAnimation","stopAnimation","setFriction","setCharge","setGravity","setPseudoknotStrength","pseudoknot","displayBackground","displayNumbering","displayNodeOutline","displayNodeLabel","displayLinks","displayPseudoknotLinks","displayProteinLinks","displayAllLinks","linksEnter","linkLines","gnodesEnter","ease","labelAndProteinNodes","nucleotideNodes","getTitleText","allLinks","xlink","realNodes","displayFakeLinks","geom","quadtree","visit","pattern","getHoverPattern","result","elem","fieldValue","warn","replace","defaultPattern","_d","moleculesToJson","moleculesJson","graphs","molecules","molecule","ss","header","numberSort","Date","getTime","floor","startNumber","computePairtable","rnaUtilities","dotbracketToPairtable","removeBreaks","targetString","breaks","breakIndex","substring","ret","dotBracketBreaks","seqBreaks","calculateStartNumberArray","startNumberArray","arraysEqual","labelNodes","broken","pt","relevantElements","allNucs","addFakeNode","filterNucs","newNode1","newNode2","fakeNodeUid","newNode","newX","newY","coordsCounted","ia","fromNode","fakeNodes","Set","thisNode","thisNuc","has","addExtraLinks","getNodeFromNucleotides","from","to","elemTypes","nodeName","nextNode","ptToElements","level","u5","u3","external","pop","prevVec","nextVec","combinedVec","vecLength","normedVec","offsetVec","removePseudoknots","externalLoop","eloop","prev","hloop","numGreater","removePseudoknotsFromPairtable","addName","String","bracketLeft","bracketRight","inverseBrackets","maximumMatching","backtrackMaximumMatching","mmBt","Number","valueOf","insertIntoStack","deleteFromStack","pairtableToDotbracket","findUnmatched","h","RNAUtilities","colorsText","parseRange","parseInt","parseColorText","normalizeColors","MAX_VALUE","MIN_VALUE","chart","startNucleotideNumber","fillViewportTransform","xValues","yValues","molName","xExtent","d3","yExtent","NAME_OFFSET","nucleotideRadius","rnaEdgePadding","xRange","yRange","xExtra","yExtra","createOtherScale","firstScale","newDomain","newRange","scaleFactor","newWidth","newMargin","createTransformToFillViewport","gTransform","extraLinkType","createLinks","gs","showNucleotideLabels","struct_name","createNucleotides","createLabels","createName","bundleExternalLinks","nodesDict","linksList","results","ForceEdgeBundling","edges","compatibility_threshold","step_size","fbundling","d3line","line","edge_subpoint_data","makeExternalLinksBundle","_","pair_table","alpha","loop_size","stack_size","lp","stk","PIHALF","loop","i_old","partner","start_k","start_l","fill","ladder","begin","diff","polygon","bubble","remember","poss","_radloop","_connection","_region","_base","_loop","ANUM","MAXITER","bases","nregion","loop_count","root","Loop","loops","regions","rlphead","Radloop","lencut","RADIUS_REDUCTION_FACTOR","angleinc","_h","HELIX_FACTOR","BACKBONE_DISTANCE","determine_depths","setMark","setDepth","depth","getNconnection","isMark","getConnection","getLoop","Base","Region","read_in_bases","find_regions","construct_loop","find_central_loop","traverse_loop","getX","getY","npairs","setMate","setExtracted","setX","setY","nb1","mate","mark","getMate","setStart1","setEnd2","setRegion","setEnd1","setStart2","ibase","retloop","cp","Connection","rp","rlp","setNconnection","setNumber","setRadius","getNext","getLoopnumber","getRegion","getStart1","isExtracted","getEnd1","getStart2","getEnd2","setConnection","setLoop","setStart","setEnd","setExtruded","setBroken","maxconn","maxdepth","getDepth","anchor_connection","xs","ys","xe","xn","yn","xc","yc","xo","yo","astart","aend","cpnext","acp","cpprev","ic","da","maxang","icstart","icend","icmiddle","icroot","done","done_all_connections","rooted","sign","midx","midy","nrx","nry","mx","my","vx","vy","dotmv","nmidx","nmidy","icstart1","icup","icdown","icnext","direction","dan","rr","cpx","cpy","cpnextx","cpnexty","cnx","rcn","rc","lnx","lny","acn","sx","sy","dcp","imaxloop","indice","getStart","getEnd","setXrad","setYrad","setAngle","atan2","getAngle","set_radius","determine_radius","getXrad","getYrad","connected_connection","find_ic_middle","asin","isExtruded","getNumber","construct_extruded_segment","generate_region","mindit","ci","dt","sumn","sumd","dit","imindit","aend1","aend2","aave","dac","nstart","nend","collision","construct_circle_segment","minf2","maxf2","find_center_for_arc","hhi","hlow","disc","theta","iter","noIterationFailureYet","loopnumber","next","setLoopnumber","setNext","getPrev","setPrev","region","xrad","yrad","extruded","_isNull","isNull","setNull","isBroken","nconnection","connections","_connections","addConnection","_start1","_end1","_start2","_end2","start1","end1","start2","end2","extracted","content","locals","mediaQuery","alreadyImportedModules","stylesInDom","memoize","memo","isOldIE","navigator","userAgent","toLowerCase","getHeadElement","singletonElement","singletonCounter","styleElementsInsertedAtTop","addStylesToDom","domStyle","refs","parts","addStyle","listToStyles","newStyles","part","css","media","sourceMap","insertStyleElement","styleElement","lastStyleElementInsertedAtTop","insertAt","nextSibling","insertBefore","firstChild","removeStyleElement","parentNode","removeChild","createStyleElement","singleton","styleIndex","applyToSingletonTag","URL","createObjectURL","revokeObjectURL","Blob","btoa","linkElement","rel","createLinkElement","updateLink","href","applyToTag","newObj","newList","mayRemove","textStore","replaceText","replacement","Boolean","styleSheet","cssText","cssNode","createTextNode","childNodes","unescape","encodeURIComponent","blob","oldSrc","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_RESULT__","version","d3_arraySlice","d3_array","d3_document","d3_documentElement","ownerDocument","documentElement","d3_window","defaultView","now","setProperty","d3_element_prototype","Element","d3_element_setAttribute","d3_element_setAttributeNS","setAttributeNS","d3_style_prototype","CSSStyleDeclaration","d3_style_setProperty","space","local","priority","d3_ascending","NaN","d3_number","d3_numeric","d3_bisector","compare","lo","hi","mid","ascending","descending","sum","mean","quantile","values","H","median","numbers","variance","deviation","d3_bisect","d3_transposeLength","bisectLeft","bisect","bisectRight","bisector","shuffle","i0","i1","permute","indexes","permutes","pairs","p1","transpose","matrix","row","zip","entries","merge","arrays","merged","d3_range_integerScale","d3_class","ctor","properties","d3_Map","d3_map_escape","d3_map_unescape","d3_map_has","d3_map_remove","d3_map_keys","d3_map_size","d3_map_empty","d3_Set","d3_identity","d3_rebind","method","d3_vendorSymbol","charAt","toUpperCase","d3_vendorPrefixes","prefixName","step","isArray","empty","nest","sortValues","rollup","sortKeys","mapType","keyValue","setter","valuesByKey","sortKey","keyMap","order","rebind","d3_noop","d3_dispatch","d3_dispatch_event","dispatch","listeners","listenerByName","listener","d3_eventPreventDefault","d3_eventSource","d3_eventDispatch","of","thiz","argumentz","e1","e0","requote","d3_requote_re","d3_subclass","__proto__","d3_selection","groups","d3_selectionPrototype","d3_select","querySelector","d3_selectAll","querySelectorAll","d3_selectMatches","d3_selectMatcher","matches","Sizzle","matchesSelector","d3_selection_selector","selector","d3_selection_selectorAll","subgroup","subnode","group","subgroups","__data__","d3_nsXhtml","d3_nsPrefix","xhtml","xml","xmlns","d3_selection_attr","qualify","removeAttributeNS","removeAttribute","d3_collapse","d3_selection_classedRe","RegExp","d3_selection_classes","d3_selection_classed","d3_selection_classedName","re","classList","getAttribute","lastIndex","d3_selection_style","removeProperty","d3_selection_property","d3_selection_creator","createElementNS","namespace","namespaceURI","d3_selectionRemove","parent","d3_selection_dataNode","d3_selection_filter","d3_selection_sortComparator","comparator","d3_selection_each","d3_selection_enter","d3_selection_enterPrototype","prefix","getAttributeNS","getComputedStyle","getPropertyValue","html","innerHTML","insert","before","groupData","nodeData","n0","updateNodes","enterNodes","exitNodes","nodeByKeyValue","keyValues","args","d3_selection_enterInsertBefore","j0","d3_selection_on","capture","wrap","d3_selection_onListener","d3_selection_onFilters","onRemove","removeEventListener","$","d3_selection_onFilter","match","upgroup","mouseenter","mouseleave","related","relatedTarget","compareDocumentPosition","d3_event_dragSelect","d3_event_dragId","d3_event_dragSuppress","click","suppressClick","off","d3_mousePoint","d3_mouse_bug44083","changedTouches","ownerSVGElement","createSVGPoint","scrollX","scrollY","ctm","border","getScreenCTM","pageX","pageY","clientX","clientY","matrixTransform","rect","getBoundingClientRect","clientLeft","clientTop","d3_behavior_dragTouchId","identifier","touch","touches","origin","dragstart","touchstart","subject","move","dragOffset","that","correspondingElement","dragId","dragName","dragSubject","moved","ended","dragRestore","position0","position1","ε","ε2","π","τ","τε","halfπ","d3_radians","d3_degrees","d3_sgn","d3_cross2d","d3_acos","d3_asin","d3_cosh","exp","d3_haversin","ρ","SQRT2","interpolateZoom","p0","S","ux0","uy0","w0","ux1","uy1","w1","d2","r0","r1","coshr0","d3_sinh","translate0","center0","mousewheelTimer","touchtime","d3_behavior_zoomInfinity","zooming","mousedowned","d3_behavior_zoomWheel","mousewheeled","dblclicked","touchstarted","location","scaleTo","translateTo","__chart__","rescale","zoomstarted","zoomed","zoomended","location0","d3_selection_interrupt","locations0","distance0","zoomName","touchmove","touchend","targets","relocate","started","changed","LN2","l0","l1","distance1","d3_behavior_zoomDelta","shiftKey","ceil","deltaY","deltaMode","wheelDelta","detail","view1","d3_transitionInheritId","tween","d3_color","d3_hsl","d3_rgb_parse","d3_rgb_hsl","rgb","hsl","d3_hslPrototype","d3_hsl_rgb","m1","m2","vv","round","d3_rgb","d3_hcl","d3_lab_hcl","d3_lab","d3_rgb_lab","brighter","darker","hcl","d3_hclPrototype","d3_hcl_lab","d3_lab_K","lab","d3_labPrototype","d3_lab_rgb","d3_xyz_rgb","d3_lab_xyz","d3_xyz_lab","d3_rgbNumber","d3_rgbString","d3_rgbPrototype","d3_rgb_hex","format","exec","d3_rgb_parseNumber","d3_rgb_names","d3_rgb_xyz","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","d3_functor","d3_xhrType","response","mimeType","d3_xhr","xhr","headers","XMLHttpRequest","responseType","respond","status","responseText","d3_xhrHasResponse","load","XDomainRequest","onreadystatechange","readyState","onprogress","progress","send","open","setRequestHeader","overrideMimeType","beforesend","abort","d3_xhr_fixCallback","functor","dsv","delimiter","reFormat","delimiterCode","charCodeAt","typedResponse","formatRow","formatValue","parseRows","Function","eol","EOL","EOF","rows","N","I","token","formatRows","fieldSet","fields","field","csv","tsv","d3_timer_queueHead","d3_timer_queueTail","d3_timer_interval","d3_timer_timeout","d3_timer_frame","d3_timer","delay","then","time","timer","d3_timer_step","d3_timer_mark","d3_timer_sweep","isFinite","t0","t1","d3_format_precision","LN10","flush","d3_formatPrefixes","d3_locale_numberFormat","locale","locale_decimal","decimal","locale_thousands","thousands","locale_grouping","grouping","locale_currency","currency","formatGroup","reverse","specifier","d3_format_re","align","zfill","comma","precision","suffix","integer","exponent","d3_format_types","d3_format_typeDefault","zcomma","fullSuffix","negative","unit","formatPrefix","after","lastIndexOf","fromCharCode","X","toPrecision","toExponential","toFixed","d3_time","d3_date","d3_date_utc","UTC","getDate","getUTCDate","getDay","getUTCDay","getFullYear","getUTCFullYear","getHours","getUTCHours","getMilliseconds","getUTCMilliseconds","getMinutes","getUTCMinutes","getMonth","getUTCMonth","getSeconds","getUTCSeconds","getTimezoneOffset","setDate","d3_time_prototype","setUTCDate","setDay","setUTCDay","setFullYear","setUTCFullYear","setHours","setUTCHours","setMilliseconds","setUTCMilliseconds","setMinutes","setUTCMinutes","setMonth","setUTCMonth","setSeconds","setUTCSeconds","setTime","d3_time_interval","date","d0","times","utc","d3_time_interval_utc","d3_locale_timeFormat","locale_dateTime","dateTime","locale_date","locale_time","locale_periods","periods","locale_days","days","locale_shortDays","shortDays","locale_months","months","locale_shortMonths","shortMonths","d3_time_format","template","d3_time_formatPads","d3_time_formats","M","Z","d3_time_parse","localZ","W","d3_time_parsers","multi","d3_time_formatMulti","d3_time_periodLookup","d3_time_dayRe","d3_time_formatRe","d3_time_dayLookup","d3_time_formatLookup","d3_time_dayAbbrevRe","d3_time_dayAbbrevLookup","d3_time_monthRe","d3_time_monthLookup","d3_time_monthAbbrevRe","d3_time_monthAbbrevLookup","A","B","d3_time_formatPad","dayOfYear","sundayOfYear","mondayOfYear","Y","d3_time_zone","d3_time_parseDay","d3_time_parseHour24","d3_time_parseDayOfYear","d3_time_parseMilliseconds","d3_time_parseMonthNumber","d3_time_parseMinutes","d3_time_parseSeconds","d3_time_parseWeekNumberSunday","d3_time_parseWeekdayNumber","d3_time_parseWeekNumberMonday","d3_time_parseYear","d3_time_parseFullYear","d3_time_parseZone","d3_time_parseLiteralPercent","year","day","years","interval","week","sunday","weeks","weekOfYear","d3_time_numberRe","d3_time_percentRe","names","zs","zh","zm","formats","numberFormat","timeFormat","d3_locale_enUS","d3_adder","geo","d3_adderSum","d3_adderTemp","reset","bv","av","d3_geo_streamGeometry","geometry","d3_geo_streamGeometryType","stream","d3_geo_streamObjectType","Feature","feature","FeatureCollection","features","Sphere","sphere","Point","coordinates","MultiPoint","LineString","d3_geo_streamLine","MultiLineString","Polygon","d3_geo_streamPolygon","MultiPolygon","GeometryCollection","geometries","closed","coordinate","lineStart","lineEnd","polygonStart","polygonEnd","area","d3_geo_areaSum","d3_geo_area","d3_geo_centroidW0","d3_geo_centroidW1","d3_geo_centroidX0","d3_geo_centroidY0","d3_geo_centroidZ0","d3_geo_centroidX1","d3_geo_centroidY1","d3_geo_centroidZ1","d3_geo_centroidX2","d3_geo_centroidY2","d3_geo_centroidZ2","d3_geo_areaRingSum","d3_geo_areaRingStart","λ00","φ00","λ0","cosφ0","sinφ0","nextPoint","λ","φ","dλ","sdλ","adλ","cosφ","sinφ","d3_geo_cartesian","spherical","d3_geo_cartesianDot","d3_geo_cartesianCross","d3_geo_cartesianAdd","d3_geo_cartesianScale","vector","d3_geo_cartesianNormalize","d3_geo_spherical","cartesian","d3_geo_sphericalEqual","bounds","φ0","λ1","φ1","λ_","λ__","φ__","dλSum","ranges","bound","ringPoint","ringStart","ringEnd","linePoint","normal","inflection","λi","antimeridian","φi","compareRanges","withinRange","best","centroid","d3_geo_centroid","d3_geo_centroidPoint","d3_geo_centroidLineStart","d3_geo_centroidLineEnd","d3_geo_centroidRingStart","d3_geo_centroidPointXYZ","cz","d3_geo_compose","compose","d3_true","d3_geo_clipPolygon","segments","clipStartInside","clip","segment","d3_geo_clipPolygonIntersection","d3_geo_clipPolygonLinkCircular","points","current","isSubject","d3_geo_clip","pointVisible","clipLine","clipStart","rotatedClipStart","pointRing","meridian","parallel","meridianNormal","polarAngle","winding","ring","point0","arc","intersection","φarc","d3_geo_pointInPolygon","polygonStarted","d3_geo_clipSort","pointLine","buffer","d3_geo_clipBufferListener","ringListener","clean","ringSegments","d3_geo_clipSegmentLength1","lines","rejoin","d3_geo_clipAntimeridian","sλ0","sλ1","cosφ1","sinλ0_λ1","atan","d3_geo_clipAntimeridianIntersect","d3_geo_clipCircle","cr","smallRadius","notHemisphere","visible","c0","v00","point2","point1","code","intersect","d3_geo_circleInterpolate","two","n1","n2","n2n2","n1n2","determinant","c1","c2","n1xn2","uu","t2","δλ","polar","q1","d3_geom_clipLine","d3_geo_clipExtent","x__","y__","v__","x_","y_","v_","first","listener_","bufferListener","wn","insidePolygon","inside","corner","comparePoints","ca","cb","d3_geo_conic","projectAt","d3_geo_projectionMutator","parallels","d3_geo_conicEqualArea","C","ρ0","forward","ρ0_y","clipExtent","output","valid","conicEqualArea","raw","albers","albersUsa","lower48Point","alaskaPoint","hawaiiPoint","lower48","alaska","hawaii","pointStream","lower48Stream","alaskaStream","hawaiiStream","d3_geo_pathAreaSum","d3_geo_pathAreaPolygon","d3_geo_pathBoundsX0","d3_geo_pathBoundsY0","d3_geo_pathBoundsX1","d3_geo_pathBoundsY1","d3_geo_pathArea","d3_geo_pathAreaRingStart","x00","y00","d3_geo_pathBounds","d3_geo_pathBuffer","pointCircle","d3_geo_pathBufferCircle","pointLineStart","lineEndPolygon","pointRadius","d3_geo_lengthSum","d3_geo_pathCentroid","d3_geo_pathCentroidPoint","d3_geo_pathCentroidLineStart","d3_geo_pathCentroidLineEnd","d3_geo_pathCentroidRingStart","d3_geo_pathContext","context","moveTo","lineTo","closePath","d3_geo_resample","project","δ2","cosMinDistance","maxDepth","resample","resampleRecursive","resampleNone","d3_geo_transformPoint","c00","resampleLineTo","φ2","λ2","dx2","dy2","dz","d3_geo_pathProjectStream","d3_geo_projectionRadians","d3_geo_transform","d3_geo_projection","projectRotate","δx","δy","projectResample","δφ","δγ","preclip","postclip","clipAngle","projection","d3_geo_rotation","invalidate","d3_geo_equirectangular","d3_geo_identityRotation","d3_geo_rotationλ","d3_geo_rotationφγ","d3_geo_forwardRotationλ","cosδφ","sinδφ","cosδγ","sinδγ","sr","d3_geo_circleAngle","d3_geo_graticuleX","d3_geo_graticuleY","d3_source","d3_target","projectStream","contextStream","cacheStream","transform","methods","projectionMutator","equirectangular","circle","Δλ","sinΔλ","cosΔλ","sinφ1","graticule","X1","X0","Y1","Y0","DX","DY","majorExtent","minorExtent","majorStep","minorStep","greatArc","source_","target_","cy0","sy0","cy1","sy1","kx0","ky0","kx1","ky1","d3_geo_length","d3_geo_azimuthal","azimuthal","cosλ","sinc","cosc","d3_geo_azimuthalEqualArea","cosλcosφ","azimuthalEqualArea","d3_geo_azimuthalEquidistant","d3_geo_conicConformal","F","d3_geo_mercator","d3_geo_conicEquidistant","G","azimuthalEquidistant","conicConformal","conicEquidistant","d3_geo_gnomonic","d3_geo_mercatorProjection","clipAuto","gnomonic","mercator","d3_geo_orthographic","orthographic","d3_geo_stereographic","d3_geo_transverseMercator","d3_geom_pointX","d3_geom_pointY","d3_geom_hullUpper","hull","hs","d3_geom_hullOrder","stereographic","transverseMercator","vertices","fx","fy","flippedPoints","upper","lower","skipLeft","skipRight","d3_geom_polygonPrototype","d3_geom_polygonInside","d3_geom_polygonIntersect","x3","x21","x43","y3","y21","y43","ua","d3_geom_polygonClosed","d3_geom_voronoiEdges","d3_geom_voronoiCells","d3_geom_voronoiBeaches","d3_geom_voronoiFirstCircle","d3_geom_voronoiCircles","d3_geom_voronoiBeachPool","d3_geom_voronoiCirclePool","d3_geom_voronoiBeach","d3_geom_voronoiRedBlackNode","edge","site","d3_geom_voronoiCreateBeach","beach","d3_geom_voronoiDetachBeach","d3_geom_voronoiDetachCircle","d3_geom_voronoiRemoveBeach","vertex","previous","P","disappearing","lArc","unshift","rArc","iArc","nArcs","d3_geom_voronoiSetEdgeEnd","d3_geom_voronoiCreateEdge","d3_geom_voronoiAttachCircle","d3_geom_voronoiAddBeach","dxl","dxr","directrix","d3_geom_voronoiLeftBreakPoint","d3_geom_voronoiRightBreakPoint","R","newArc","lSite","rSite","hb","hc","rfocx","rfocy","pby2","lfocx","lfocy","plby2","hl","aby2","d3_geom_voronoiCell","d3_geom_voronoiHalfEdgeOrder","d3_geom_voronoiCircle","cSite","ha","d3_geom_voronoiConnectEdge","vb","fm","fb","va","lx","ly","rx","ry","d3_geom_voronoiEdge","d3_geom_voronoiHalfEdge","d3_geom_voronoiRedBlackTree","d3_geom_voronoiRedBlackRotateLeft","tree","d3_geom_voronoiRedBlackRotateRight","d3_geom_voronoiRedBlackFirst","d3_geom_voronoi","sites","bbox","d3_geom_voronoiVertexOrder","d3_geom_voronoiClipEdges","cell","iHalfEdge","halfEdges","nHalfEdges","cells","iCell","prepare","d3_geom_voronoiCloseCells","diagram","grandpa","uncle","sibling","voronoi","d3_geom_voronoiClipExtent","polygons","triangles","s0","s1","d3_geom_voronoiTriangleArea","d3_geom_quadtreeCompatX","d3_geom_quadtreeCompatY","d3_geom_quadtreeVisit","children","d3_geom_quadtreeFind","closestPoint","minDistance2","find","distance2","xm","ym","d3_interpolateRgb","ar","ag","br","bg","bb","d3_interpolateObject","d3_interpolate","d3_interpolateNumber","d3_interpolateString","am","bm","bs","bi","d3_interpolate_numberA","d3_interpolate_numberB","delaunay","compat","x1_","y1_","x2_","y2_","leaf","nx","ny","insertChild","nPoint","below","interpolateRgb","interpolateObject","interpolateNumber","interpolateString","interpolators","d3_interpolateArray","na","nb","interpolateArray","d3_ease_default","d3_ease","poly","d3_ease_quad","cubic","d3_ease_cubic","d3_ease_sin","d3_ease_exp","d3_ease_circle","elastic","back","bounce","d3_ease_bounce","d3_ease_mode","d3_ease_reverse","d3_ease_reflect","d3_ease_clamp","d3_ease_cubicInOut","t3","d3_interpolateRound","d3_transform","kx","d3_transformNormalize","kz","d3_transformDot","ky","d3_transformCombine","skew","interpolateHcl","ah","al","bh","bc","bl","interpolateHsl","as","ba","interpolateRound","baseVal","consolidate","d3_transformIdentity","d3_interpolateTransformPop","d3_interpolateTransform","ta","d3_interpolateTranslate","ra","rb","d3_interpolateRotate","wa","wb","d3_interpolateSkew","ka","kb","d3_interpolateScale","d3_uninterpolateNumber","d3_uninterpolateClamp","d3_layout_bundlePath","lca","aNodes","d3_layout_bundleAncestors","bNodes","aNode","bNode","sharedNode","d3_layout_bundleLeastCommonAncestor","d3_layout_forceDragstart","d3_layout_forceDragend","d3_layout_forceMouseover","d3_layout_forceMouseout","interpolateTransform","bundle","paths","chord","chords","sortGroups","sortSubgroups","sortChords","relayout","groupSums","groupIndex","subgroupIndex","di","dj","subindex","startAngle","endAngle","resort","distances","strengths","charges","d3_layout_forceLinkDistance","d3_layout_forceLinkStrength","chargeDistance2","d3_layout_forceChargeDistance2","theta2","repulse","dw","dn","pointCharge","dragmove","tick","weight","d3_layout_forceAccumulate","neighbors","dimension","candidates","d3_layout_hierarchyRebind","hierarchy","d3_layout_hierarchyLinks","d3_layout_hierarchyVisitBefore","d3_layout_hierarchyVisitAfter","nodes2","d3_layout_hierarchyChildren","d3_layout_hierarchyValue","d3_layout_hierarchySort","child","stack","childs","revalue","partition","pie","d3_layout_pieSortByValue","padAngle","pa","arcs","d3_layout_stackX","d3_layout_stackY","d3_layout_stackOut","d3_layout_stackOrderDefault","d3_layout_stackOffsetZero","series","orders","offsets","d3_layout_stackOrders","d3_layout_stackOffsets","d3_layout_stackMaxIndex","sums","d3_layout_stackReduceSum","tops","bottoms","silhouette","wiggle","s2","s3","o0","expand","zero","reduce","d3_layout_stackSum","d3_layout_histogramBinSturges","d3_layout_histogramBinFixed","d3_layout_histogramRange","d3_layout_packSort","d3_layout_packInsert","_pack_next","_pack_prev","d3_layout_packSplice","d3_layout_packIntersects","dr","d3_layout_packSiblings","xMin","xMax","yMin","yMax","d3_layout_packLink","d3_layout_packPlace","isect","d3_layout_packUnlink","db","dc","d3_layout_treeSeparation","d3_layout_treeLeft","d3_layout_treeRight","d3_layout_treeMove","wm","wp","change","d3_layout_treeAncestor","vim","ancestor","d3_layout_treemapPadNull","d3_layout_treemapPad","d3_scaleExtent","d3_scaleRange","rangeExtent","d3_scale_bilinear","uninterpolate","d3_scale_nice","nice","d3_scale_niceStep","d3_scale_niceIdentity","histogram","frequency","valuer","ranger","binner","bin","bins","thresholds","pack","d3_layout_packTransform","separation","nodeSize","root0","root1","node1","queue","wrapTree","firstWalk","secondWalk","sizeNode","tx","siblings","d3_layout_treeShift","midpoint","vip","vop","vom","sip","sop","sim","som","apportion","cluster","previousNode","d3_layout_clusterX","d3_layout_clusterY","d3_layout_clusterLeft","d3_layout_clusterRight","treemap","stickies","pad","sticky","ratio","squarify","score","remaining","worst","stickify","rmax","rmin","padFunction","padConstant","µ","σ","logNormal","bates","irwinHall","d3_scale_polylinear","d3_scale_linearRebind","d3_scale_linearNice","d3_scale_linearTickRange","span","d3_scale_linearTicks","d3_scale_linearTickFormat","d3_scale_linearPrecision","d3_scale_linearFormatSignificant","d3_scale_linearFormatPrecision","d3_scale_linear","rangeRound","tickFormat","d3_scale_log","base","positive","niced","d3_scale_logNiceNegative","d3_scale_logFormat","d3_scale_powPow","d3_scale_pow","powp","powb","d3_scale_ordinal","rangeBand","steps","xi","rangePoints","rangeRoundPoints","rangeBands","outerPadding","rangeRoundBands","d3_category10","d3_category20","category20b","d3_category20b","category20c","d3_category20c","d3_zero","d3_scale_quantile","quantiles","invertExtent","quantize","d3_scale_quantize","threshold","d3_scale_threshold","d3_scale_identity","d3_svg_arcInnerRadius","d3_svg_arcOuterRadius","padRadius","d3_svg_arcAuto","d3_svg_arcStartAngle","d3_svg_arcEndAngle","d3_svg_arcPadAngle","cw","circleSegment","ap","d3_svg_arcSweep","h1","h0","rc1","rc0","oc","kc","lc","t30","d3_svg_arcCornerTangents","t12","t03","t21","x01","y01","ox","oy","cx0","cx1","dx0","dy0","dx1","dy1","d3_svg_line","defined","d3_svg_lineLinear","interpolateKey","tension","d3_svg_lineInterpolators","d3_svg_lineLinearClosed","d3_svg_lineStepBefore","d3_svg_lineStepAfter","basis","d3_svg_lineBasis","pi","d3_svg_lineDot4","d3_svg_lineBasisBezier3","d3_svg_lineBasisBezier","cardinal","d3_svg_lineHermite","d3_svg_lineCardinalTangents","monotone","tangents","d3_svg_lineSlope","d3_svg_lineFiniteDifferences","d3_svg_lineMonotoneTangents","p2","d3_svg_lineBasisBezier1","d3_svg_lineBasisBezier2","d3_svg_lineRadial","d3_svg_area","interpolateReverse","points0","points1","fx0","fy0","fx1","fy1","d3_svg_chordRadius","d3_svg_diagonalProjection","d3_svg_diagonalRadialProjection","d3_svg_symbolSize","d3_svg_symbolType","d3_svg_symbolCircle","radial","curve","diagonal","p3","projection_","d3_svg_symbols","diamond","d3_svg_symbolTan30","square","d3_svg_symbolSqrt3","symbolTypes","d3_transitionId","d3_transitionNamespace","d3_transitionInherit","d3_transitionNode","d3_transition","interrupt","d3_selection_interruptNS","lock","activeId","active","d3_transitionPrototype","d3_transition_tween","d3_transition_text","inherit","tweens","elapsed","cancelId","cancel","subnodes","nameNS","attrNull","attrNullNS","attrTween","attrTweenNS","styleNull","styleString","styleTween","inheritId","id0","id1","tickFormat_","orient","d3_svg_axisDefaultOrient","innerTickSize","outerTickSize","tickPadding","tickArguments_","tickValues","tickTransform","tickEnter","tickExit","tickUpdate","tickSpacing","pathUpdate","lineEnter","lineUpdate","textEnter","textUpdate","d3_svg_axisX","d3_svg_axisY","d3_svg_axisOrients","tickSize","tickSubdivide","xExtentDomain","yExtentDomain","xClamp","yClamp","resizes","d3_svg_brushResizes","brushstart","background","resize","d3_svg_brushCursor","gUpdate","backgroundUpdate","redrawX","redrawY","eventTarget","event_","resizing","resizingX","resizingY","dragging","brushmove","brushend","ex","ey","altKey","move1","extent1","extent0","yi","nw","ne","se","sw","d3_time_formatUtc","d3_time_formatIso","d3_time_formatIsoNative","toISOString","d3_time_scale","tickMethod","d3_time_scaleSteps","d3_time_scaleMilliseconds","d3_time_scaleDate","skip","skipped","iso","second","seconds","minute","minutes","hour","timezone","hours","month","d3_time_scaleLocalMethods","d3_time_scaleLocalFormat","d3_time_scaleUtcMethods","d3_time_scaleUtcFormat","d3_json","d3_html","createRange","selectNode","body","createContextualFragment","responseXML","ReactPropTypesSecret","emptyFunction","propFullName","secret","getShim","ReactPropTypes","any","instanceOf","objectOf","checkPropTypes","webgl","cube","View","System","shaders","loadProgram","gl","Program","canvas","aoResolution","tSceneColor","tSceneNormal","tSceneDepth","tRandRotDepth","tRandRotColor","tAccumulator","tAccumulatorOut","tFXAA","tFXAAOut","tDOF","tAO","fbSceneColor","fbSceneNormal","fbRandRot","fbAccumulator","fbFXAA","fbAO","progAtoms","progBonds","progAccumulator","progAO","progFXAA","progDOF","progDisplayQuad","rAtoms","rBonds","rAccumulator","rAO","rDOF","rFXAA","sampleCount","colorRendered","normalRendered","sample","viewport","rot","COLOR_BUFFER_BIT","DEPTH_BUFFER_BIT","viewMat","model","setUniform","render","sceneRect","rotRect","invRot","activate","copyTexImage2D","TEXTURE_2D","RGBA","getAOProgress","initialize","getContext","enable","DEPTH_TEST","CULL_FACE","clearColor","clearDepth","getExtensions","createTextures","attribs","buildAttribs","aPosition","Renderable","Texture","internalFormat","DEPTH_COMPONENT","UNSIGNED_SHORT","Framebuffer","setResolution","res","setSystem","newSystem","make36","arr","aImposter","aRadius","aColor","imposter","aPosA","aPosB","aRadA","aRadB","aColA","aColB","posa","posb","rada","radb","cola","colb","bindFramebuffer","FRAMEBUFFER","GLBuffer","createBuffer","bindBuffer","ARRAY_BUFFER","bufferData","STATIC_DRAW","extArray","getExtension","createFramebuffer","drawBuffers","drawBuffersWEBGL","framebufferTexture2D","texture","COLOR_ATTACHMENT0","DEPTH_ATTACHMENT","mag","NEAREST","wraps","CLAMP_TO_EDGE","wrapt","UNSIGNED_BYTE","createTexture","texParameteri","TEXTURE_MAG_FILTER","TEXTURE_MIN_FILTER","TEXTURE_WRAP_S","TEXTURE_WRAP_T","texImage2D","bindTexture","activeTexture","TEXTURE0","program","buffers","primitiveCount","use","enableVertexAttribArray","vertexAttribPointer","FLOAT","drawArrays","TRIANGLES","disableVertexAttribArray","attributes","InstancedRenderable","instancedExt","vertexAttribDivisorANGLE","divisor","drawArraysInstancedANGLE","vertexSource","fragmentSource","compileProgram","gatherAttribs","uniforms","gatherUniforms","useProgram","vertexShader","compileShader","VERTEX_SHADER","fragmentShader","FRAGMENT_SHADER","createProgram","attachShader","linkProgram","getProgramParameter","LINK_STATUS","getProgramInfoLog","shader","createShader","shaderSource","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","lineno","typeString","nUniforms","ACTIVE_UNIFORMS","uniform","getActiveUniform","getUniformLocation","nAttribs","ACTIVE_ATTRIBUTES","attrib","getActiveAttrib","getAttribLocation","getRotation","setRotation","getTranslation","setTranslation","getZoom","setZoom","refreshView","interactions","buttonDown","shiftDown","lastX","lastY","mousedownFn","button","mouseupFn","keychangeFn","mousemoveFn","buttons","inverseZoom","viewDummyObj","wheelFn","removeAllEventListeners","stickball","toon","licorice","renderNewSequences","containerRef","React","createRef","nodeFillColor","hoverPattern","_fornaContainer","PreFornaContainer","sequences","unpackedOptions","assign","nextProps","ref","data-dash-is-loading","_arrayFromIterator","_includesWith","pred","_uniqContentEquals","aIterator","bIterator","stackA","stackB","eq","_equals","aItem","typeA","constructor","global","ignoreCase","multiline","unicode","keysA","extendedStackA","extendedStackB"],"mappings":"4BACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GAKAK,EAAI,EAAGC,EAAW,GACpCD,EAAIF,EAASI,OAAQF,IACzBH,EAAUC,EAASE,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBV,IAAYU,EAAgBV,IACpFI,EAASO,KAAKD,EAAgBV,GAAS,IAExCU,EAAgBV,GAAW,EAE5B,IAAID,KAAYG,EACZI,OAAOC,UAAUC,eAAeC,KAAKP,EAAaH,KACpDa,EAAQb,GAAYG,EAAYH,IAKlC,IAFGc,GAAqBA,EAAoBf,GAEtCM,EAASC,QACdD,EAASU,OAATV,GAOF,IAAIW,EAAmB,GAKnBL,EAAkB,CACrBM,GAAI,GAML,SAASC,EAAejB,GACvB,OAAOkB,EAAoBC,EAAI,IAAM,CAAC,EAAI,kBAAkB,EAAI,kBAAkB,EAAI,eAAe,EAAI,iBAAiB,EAAI,YAAY,EAAI,aAAa,EAAI,wBAAwB,EAAI,wBAAwB,EAAI,eAAe,EAAI,0BAA0B,GAAK,aAAa,GAAK,eAAe,GAAK,iBAAiB,GAAK,eAAenB,IAAUA,GAAW,MAI1W,SAASkB,EAAoBnB,GAG5B,GAAGgB,EAAiBhB,GACnB,OAAOgB,EAAiBhB,GAAUqB,QAGnC,IAAIC,EAASN,EAAiBhB,GAAY,CACzCI,EAAGJ,EACHuB,GAAG,EACHF,QAAS,IAUV,OANAR,EAAQb,GAAUU,KAAKY,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAA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AM++F,EAAMt5G,OAAS,EACdua,GAAO,GAAG,CACf,IAAIjW,EAAMg1G,EAAM/+F,GAChB,IAAM,OAAA5S,EAAA,GAAKrD,EAAK+E,KAAMyvG,EAAQzvG,EAAE/E,GAAMgD,EAAEhD,GAAMi1G,EAAgBC,GAC5D,OAAO,EAETj/F,GAAO,EAET,OAAO,EEvHT,IAAI,EAAsB,OAAAM,EAAA,IAAQ,SAAgBvT,EAAG+B,GACnD,OAAOyvG,EAAQxxG,EAAG+B,EAAG,GAAI,OAEZ","file":"bundle.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t};\n\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t14: 0\n \t};\n\n\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"\" + ({\"0\":\"async-alignment\",\"1\":\"dash_bio-shared\",\"2\":\"async-circos\",\"3\":\"async-ideogram\",\"4\":\"async-igv\",\"5\":\"async-jsme\",\"6\":\"async-moleculeviewer2\",\"7\":\"async-moleculeviewer3\",\"8\":\"async-needle\",\"9\":\"async-nglmoleculeviewer\",\"10\":\"async-onco\",\"11\":\"async-pileup\",\"12\":\"async-sequence\",\"13\":\"async-speck\"}[chunkId]||chunkId) + \".js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n \tvar getCurrentScript = function() {\n \t var script = document.currentScript;\n \t if (!script) {\n \t /* Shim for IE11 and below */\n \t /* Do not take into account async scripts and inline scripts */\n\n \t var doc_scripts = document.getElementsByTagName('script');\n \t var scripts = [];\n\n \t for (var i = 0; i < doc_scripts.length; i++) {\n \t scripts.push(doc_scripts[i]);\n \t }\n\n \t scripts = scripts.filter(function(s) { return !s.async && !s.text && !s.textContent; });\n \t script = scripts.slice(-1)[0];\n \t }\n\n \t return script;\n \t};\n\n \tvar isLocalScript = function(script) {\n \t return /\\/_dash-component-suites\\//.test(script.src);\n \t};\n\n \tObject.defineProperty(__webpack_require__, 'p', {\n \t get: (function () {\n \t var script = getCurrentScript();\n\n \t var url = script.src.split('/').slice(0, -1).join('/') + '/';\n\n \t return function() {\n \t return url;\n \t };\n \t })()\n \t});\n\n \tif (typeof jsonpScriptSrc !== 'undefined') {\n \t var __jsonpScriptSrc__ = jsonpScriptSrc;\n \t jsonpScriptSrc = function(chunkId) {\n \t var script = getCurrentScript();\n \t var isLocal = isLocalScript(script);\n\n \t var src = __jsonpScriptSrc__(chunkId);\n\n \t if(!isLocal) {\n \t return src;\n \t }\n\n \t var srcFragments = src.split('/');\n \t var fileFragments = srcFragments.slice(-1)[0].split('.');\n\n \t fileFragments.splice(1, 0, \"v0_9_0m1642372372\");\n \t srcFragments.splice(-1, 1, fileFragments.join('.'))\n\n \t return srcFragments.join('/');\n \t };\n \t}\n\n\n \tvar jsonpArray = window[\"webpackJsonpdash_bio\"] = window[\"webpackJsonpdash_bio\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 37);\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","(function() { module.exports = window[\"React\"]; }());","/* eslint-disable no-inline-comments */\nexport default {\n alignmentChart: () =>\n import(\n /* webpackChunkName: \"alignment\" */ './fragments/AlignmentChart.react'\n ),\n circos: () =>\n import(/* webpackChunkName: \"circos\" */ './fragments/Circos.react'),\n ideogram: () =>\n import(/* webpackChunkName: \"ideogram\" */ './fragments/Ideogram.react'),\n igv: () => import(/* webpackChunkName: \"igv\" */ './fragments/Igv.react'),\n pileup: () =>\n import(/* webpackChunkName: \"pileup\" */ './fragments/Pileup.react'),\n molecule2dViewer: () =>\n import(\n /* webpackChunkName: \"moleculeviewer2\" */ './fragments/Molecule2dViewer.react'\n ),\n molecule3dViewer: () =>\n import(\n /* webpackChunkName: \"moleculeviewer3\" */ './fragments/Molecule3dViewer'\n ),\n nglmoleculeViewer: () =>\n import(\n /* webpackChunkName: \"nglmoleculeviewer\" */ './fragments/NglMoleculeViewer.react'\n ),\n needlePlot: () =>\n import(/* webpackChunkName: \"needle\" */ './fragments/NeedlePlot.react'),\n oncoPrint: () =>\n import(/* webpackChunkName: \"onco\" */ './fragments/OncoPrint.react'),\n sequenceViewer: () =>\n import(\n /* webpackChunkName: \"sequence\" */ './fragments/SequenceViewer.react'\n ),\n speck: () =>\n import(/* webpackChunkName: \"speck\" */ './fragments/Speck.react'),\n jsme: () => import(/* webpackChunkName: \"jsme\" */ './fragments/Jsme.react'),\n};\n","import _isPlaceholder from './_isPlaceholder.js';\n\n/**\n * Optimized internal one-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry1(fn) {\n return function f1(a) {\n if (arguments.length === 0 || _isPlaceholder(a)) {\n return f1;\n } else {\n return fn.apply(this, arguments);\n }\n };\n}","export default function _isPlaceholder(a) {\n return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;\n}","export default function _has(prop, obj) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}","module.exports = {};\nmodule.exports[ 0] = module.exports[ 'Xx'] = {'symbol': 'Xx', 'name': 'unknown', 'mass': 1.00000000, 'radius': 1.0000, 'color': [1.000, 0.078, 0.576], 'number': 0};\nmodule.exports[ 1] = module.exports[ 'H'] = {'symbol': 'H', 'name': 'hydrogen', 'mass': 1.00794000, 'radius': 0.3100, 'color': [1.000, 1.000, 1.000], 'number': 1};\nmodule.exports[ 2] = module.exports[ 'He'] = {'symbol': 'He', 'name': 'helium', 'mass': 4.00260200, 'radius': 0.2800, 'color': [0.851, 1.000, 1.000], 'number': 2};\nmodule.exports[ 3] = module.exports[ 'Li'] = {'symbol': 'Li', 'name': 'lithium', 'mass': 6.94100000, 'radius': 1.2800, 'color': [0.800, 0.502, 1.000], 'number': 3};\nmodule.exports[ 4] = module.exports[ 'Be'] = {'symbol': 'Be', 'name': 'beryllium', 'mass': 9.01218200, 'radius': 0.9600, 'color': [0.761, 1.000, 0.000], 'number': 4};\nmodule.exports[ 5] = module.exports[ 'B'] = {'symbol': 'B', 'name': 'boron', 'mass': 10.81100000, 'radius': 0.8400, 'color': [1.000, 0.710, 0.710], 'number': 5};\nmodule.exports[ 6] = module.exports[ 'C'] = {'symbol': 'C', 'name': 'carbon', 'mass': 12.01070000, 'radius': 0.7300, 'color': [0.565, 0.565, 0.565], 'number': 6};\nmodule.exports[ 7] = module.exports[ 'N'] = {'symbol': 'N', 'name': 'nitrogen', 'mass': 14.00670000, 'radius': 0.7100, 'color': [0.188, 0.314, 0.973], 'number': 7};\nmodule.exports[ 8] = module.exports[ 'O'] = {'symbol': 'O', 'name': 'oxygen', 'mass': 15.99940000, 'radius': 0.6600, 'color': [1.000, 0.051, 0.051], 'number': 8};\nmodule.exports[ 9] = module.exports[ 'F'] = {'symbol': 'F', 'name': 'fluorine', 'mass': 18.99840320, 'radius': 0.5700, 'color': [0.565, 0.878, 0.314], 'number': 9};\nmodule.exports[ 10] = module.exports[ 'Ne'] = {'symbol': 'Ne', 'name': 'neon', 'mass': 20.17970000, 'radius': 0.5800, 'color': [0.702, 0.890, 0.961], 'number': 10};\nmodule.exports[ 11] = module.exports[ 'Na'] = {'symbol': 'Na', 'name': 'sodium', 'mass': 22.98976928, 'radius': 1.6600, 'color': [0.671, 0.361, 0.949], 'number': 11};\nmodule.exports[ 12] = module.exports[ 'Mg'] = {'symbol': 'Mg', 'name': 'magnesium', 'mass': 24.30500000, 'radius': 1.4100, 'color': [0.541, 1.000, 0.000], 'number': 12};\nmodule.exports[ 13] = module.exports[ 'Al'] = {'symbol': 'Al', 'name': 'aluminum', 'mass': 26.98153860, 'radius': 1.2100, 'color': [0.749, 0.651, 0.651], 'number': 13};\nmodule.exports[ 14] = module.exports[ 'Si'] = {'symbol': 'Si', 'name': 'silicon', 'mass': 28.08550000, 'radius': 1.1100, 'color': [0.941, 0.784, 0.627], 'number': 14};\nmodule.exports[ 15] = module.exports[ 'P'] = {'symbol': 'P', 'name': 'phosphorus', 'mass': 30.97376200, 'radius': 1.0700, 'color': [1.000, 0.502, 0.000], 'number': 15};\nmodule.exports[ 16] = module.exports[ 'S'] = {'symbol': 'S', 'name': 'sulfur', 'mass': 32.06500000, 'radius': 1.0500, 'color': [1.000, 1.000, 0.188], 'number': 16};\nmodule.exports[ 17] = module.exports[ 'Cl'] = {'symbol': 'Cl', 'name': 'chlorine', 'mass': 35.45300000, 'radius': 1.0200, 'color': [0.122, 0.941, 0.122], 'number': 17};\nmodule.exports[ 18] = module.exports[ 'Ar'] = {'symbol': 'Ar', 'name': 'argon', 'mass': 39.94800000, 'radius': 1.0600, 'color': [0.502, 0.820, 0.890], 'number': 18};\nmodule.exports[ 19] = module.exports[ 'K'] = {'symbol': 'K', 'name': 'potassium', 'mass': 39.09830000, 'radius': 2.0300, 'color': [0.561, 0.251, 0.831], 'number': 19};\nmodule.exports[ 20] = module.exports[ 'Ca'] = {'symbol': 'Ca', 'name': 'calcium', 'mass': 40.07800000, 'radius': 1.7600, 'color': [0.239, 1.000, 0.000], 'number': 20};\nmodule.exports[ 21] = module.exports[ 'Sc'] = {'symbol': 'Sc', 'name': 'scandium', 'mass': 44.95591200, 'radius': 1.7000, 'color': [0.902, 0.902, 0.902], 'number': 21};\nmodule.exports[ 22] = module.exports[ 'Ti'] = {'symbol': 'Ti', 'name': 'titanium', 'mass': 47.86700000, 'radius': 1.6000, 'color': [0.749, 0.761, 0.780], 'number': 22};\nmodule.exports[ 23] = module.exports[ 'V'] = {'symbol': 'V', 'name': 'vanadium', 'mass': 50.94150000, 'radius': 1.5300, 'color': [0.651, 0.651, 0.671], 'number': 23};\nmodule.exports[ 24] = module.exports[ 'Cr'] = {'symbol': 'Cr', 'name': 'chromium', 'mass': 51.99610000, 'radius': 1.3900, 'color': [0.541, 0.600, 0.780], 'number': 24};\nmodule.exports[ 25] = module.exports[ 'Mn'] = {'symbol': 'Mn', 'name': 'manganese', 'mass': 54.93804500, 'radius': 1.3900, 'color': [0.611, 0.478, 0.780], 'number': 25};\nmodule.exports[ 26] = module.exports[ 'Fe'] = {'symbol': 'Fe', 'name': 'iron', 'mass': 55.84500000, 'radius': 1.3200, 'color': [0.878, 0.400, 0.200], 'number': 26};\nmodule.exports[ 27] = module.exports[ 'Co'] = {'symbol': 'Co', 'name': 'cobalt', 'mass': 58.69340000, 'radius': 1.2600, 'color': [0.941, 0.565, 0.627], 'number': 27};\nmodule.exports[ 28] = module.exports[ 'Ni'] = {'symbol': 'Ni', 'name': 'nickel', 'mass': 58.93319500, 'radius': 1.2400, 'color': [0.314, 0.816, 0.314], 'number': 28};\nmodule.exports[ 29] = module.exports[ 'Cu'] = {'symbol': 'Cu', 'name': 'copper', 'mass': 63.54600000, 'radius': 1.3200, 'color': [0.784, 0.502, 0.200], 'number': 29};\nmodule.exports[ 30] = module.exports[ 'Zn'] = {'symbol': 'Zn', 'name': 'zinc', 'mass': 65.38000000, 'radius': 1.2200, 'color': [0.490, 0.502, 0.690], 'number': 30};\nmodule.exports[ 31] = module.exports[ 'Ga'] = {'symbol': 'Ga', 'name': 'gallium', 'mass': 69.72300000, 'radius': 1.2200, 'color': [0.761, 0.561, 0.561], 'number': 31};\nmodule.exports[ 32] = module.exports[ 'Ge'] = {'symbol': 'Ge', 'name': 'germanium', 'mass': 72.64000000, 'radius': 1.2000, 'color': [0.400, 0.561, 0.561], 'number': 32};\nmodule.exports[ 33] = module.exports[ 'As'] = {'symbol': 'As', 'name': 'arsenic', 'mass': 74.92160000, 'radius': 1.1900, 'color': [0.741, 0.502, 0.890], 'number': 33};\nmodule.exports[ 34] = module.exports[ 'Se'] = {'symbol': 'Se', 'name': 'selenium', 'mass': 78.96000000, 'radius': 1.2000, 'color': [1.000, 0.631, 0.000], 'number': 34};\nmodule.exports[ 35] = module.exports[ 'Br'] = {'symbol': 'Br', 'name': 'bromine', 'mass': 79.90400000, 'radius': 1.2000, 'color': [0.651, 0.161, 0.161], 'number': 35};\nmodule.exports[ 36] = module.exports[ 'Kr'] = {'symbol': 'Kr', 'name': 'krypton', 'mass': 83.79800000, 'radius': 1.1600, 'color': [0.361, 0.722, 0.820], 'number': 36};\nmodule.exports[ 37] = module.exports[ 'Rb'] = {'symbol': 'Rb', 'name': 'rubidium', 'mass': 85.46780000, 'radius': 2.2000, 'color': [0.439, 0.180, 0.690], 'number': 37};\nmodule.exports[ 38] = module.exports[ 'Sr'] = {'symbol': 'Sr', 'name': 'strontium', 'mass': 87.62000000, 'radius': 1.9500, 'color': [0.000, 1.000, 0.000], 'number': 38};\nmodule.exports[ 39] = module.exports[ 'Y'] = {'symbol': 'Y', 'name': 'yttrium', 'mass': 88.90585000, 'radius': 1.9000, 'color': [0.580, 1.000, 1.000], 'number': 39};\nmodule.exports[ 40] = module.exports[ 'Zr'] = {'symbol': 'Zr', 'name': 'zirconium', 'mass': 91.22400000, 'radius': 1.7500, 'color': [0.580, 0.878, 0.878], 'number': 40};\nmodule.exports[ 41] = module.exports[ 'Nb'] = {'symbol': 'Nb', 'name': 'niobium', 'mass': 92.90638000, 'radius': 1.6400, 'color': [0.451, 0.761, 0.788], 'number': 41};\nmodule.exports[ 42] = module.exports[ 'Mo'] = {'symbol': 'Mo', 'name': 'molybdenum', 'mass': 95.96000000, 'radius': 1.5400, 'color': [0.329, 0.710, 0.710], 'number': 42};\nmodule.exports[ 43] = module.exports[ 'Tc'] = {'symbol': 'Tc', 'name': 'technetium', 'mass': 98.00000000, 'radius': 1.4700, 'color': [0.231, 0.620, 0.620], 'number': 43};\nmodule.exports[ 44] = module.exports[ 'Ru'] = {'symbol': 'Ru', 'name': 'ruthenium', 'mass': 101.07000000, 'radius': 1.4600, 'color': [0.141, 0.561, 0.561], 'number': 44};\nmodule.exports[ 45] = module.exports[ 'Rh'] = {'symbol': 'Rh', 'name': 'rhodium', 'mass': 102.90550000, 'radius': 1.4200, 'color': [0.039, 0.490, 0.549], 'number': 45};\nmodule.exports[ 46] = module.exports[ 'Pd'] = {'symbol': 'Pd', 'name': 'palladium', 'mass': 106.42000000, 'radius': 1.3900, 'color': [0.000, 0.412, 0.522], 'number': 46};\nmodule.exports[ 47] = module.exports[ 'Ag'] = {'symbol': 'Ag', 'name': 'silver', 'mass': 107.86820000, 'radius': 1.4500, 'color': [0.753, 0.753, 0.753], 'number': 47};\nmodule.exports[ 48] = module.exports[ 'Cd'] = {'symbol': 'Cd', 'name': 'cadmium', 'mass': 112.41100000, 'radius': 1.4400, 'color': [1.000, 0.851, 0.561], 'number': 48};\nmodule.exports[ 49] = module.exports[ 'In'] = {'symbol': 'In', 'name': 'indium', 'mass': 114.81800000, 'radius': 1.4200, 'color': [0.651, 0.459, 0.451], 'number': 49};\nmodule.exports[ 50] = module.exports[ 'Sn'] = {'symbol': 'Sn', 'name': 'tin', 'mass': 118.71000000, 'radius': 1.3900, 'color': [0.400, 0.502, 0.502], 'number': 50};\nmodule.exports[ 51] = module.exports[ 'Sb'] = {'symbol': 'Sb', 'name': 'antimony', 'mass': 121.76000000, 'radius': 1.3900, 'color': [0.620, 0.388, 0.710], 'number': 51};\nmodule.exports[ 52] = module.exports[ 'Te'] = {'symbol': 'Te', 'name': 'tellurium', 'mass': 127.60000000, 'radius': 1.3800, 'color': [0.831, 0.478, 0.000], 'number': 52};\nmodule.exports[ 53] = module.exports[ 'I'] = {'symbol': 'I', 'name': 'iodine', 'mass': 126.90470000, 'radius': 1.3900, 'color': [0.580, 0.000, 0.580], 'number': 53};\nmodule.exports[ 54] = module.exports[ 'Xe'] = {'symbol': 'Xe', 'name': 'xenon', 'mass': 131.29300000, 'radius': 1.4000, 'color': [0.259, 0.620, 0.690], 'number': 54};\nmodule.exports[ 55] = module.exports[ 'Cs'] = {'symbol': 'Cs', 'name': 'cesium', 'mass': 132.90545190, 'radius': 2.4400, 'color': [0.341, 0.090, 0.561], 'number': 55};\nmodule.exports[ 56] = module.exports[ 'Ba'] = {'symbol': 'Ba', 'name': 'barium', 'mass': 137.32700000, 'radius': 2.1500, 'color': [0.000, 0.788, 0.000], 'number': 56};\nmodule.exports[ 57] = module.exports[ 'La'] = {'symbol': 'La', 'name': 'lanthanum', 'mass': 138.90547000, 'radius': 2.0700, 'color': [0.439, 0.831, 1.000], 'number': 57};\nmodule.exports[ 58] = module.exports[ 'Ce'] = {'symbol': 'Ce', 'name': 'cerium', 'mass': 140.11600000, 'radius': 2.0400, 'color': [1.000, 1.000, 0.780], 'number': 58};\nmodule.exports[ 59] = module.exports[ 'Pr'] = {'symbol': 'Pr', 'name': 'praseodymium', 'mass': 140.90765000, 'radius': 2.0300, 'color': [0.851, 1.000, 0.780], 'number': 59};\nmodule.exports[ 60] = module.exports[ 'Nd'] = {'symbol': 'Nd', 'name': 'neodymium', 'mass': 144.24200000, 'radius': 2.0100, 'color': [0.780, 1.000, 0.780], 'number': 60};\nmodule.exports[ 61] = module.exports[ 'Pm'] = {'symbol': 'Pm', 'name': 'promethium', 'mass': 145.00000000, 'radius': 1.9900, 'color': [0.639, 1.000, 0.780], 'number': 61};\nmodule.exports[ 62] = module.exports[ 'Sm'] = {'symbol': 'Sm', 'name': 'samarium', 'mass': 150.36000000, 'radius': 1.9800, 'color': [0.561, 1.000, 0.780], 'number': 62};\nmodule.exports[ 63] = module.exports[ 'Eu'] = {'symbol': 'Eu', 'name': 'europium', 'mass': 151.96400000, 'radius': 1.9800, 'color': [0.380, 1.000, 0.780], 'number': 63};\nmodule.exports[ 64] = module.exports[ 'Gd'] = {'symbol': 'Gd', 'name': 'gadolinium', 'mass': 157.25000000, 'radius': 1.9600, 'color': [0.271, 1.000, 0.780], 'number': 64};\nmodule.exports[ 65] = module.exports[ 'Tb'] = {'symbol': 'Tb', 'name': 'terbium', 'mass': 158.92535000, 'radius': 1.9400, 'color': [0.189, 1.000, 0.780], 'number': 65};\nmodule.exports[ 66] = module.exports[ 'Dy'] = {'symbol': 'Dy', 'name': 'dysprosium', 'mass': 162.50000000, 'radius': 1.9200, 'color': [0.122, 1.000, 0.780], 'number': 66};\nmodule.exports[ 67] = module.exports[ 'Ho'] = {'symbol': 'Ho', 'name': 'holmium', 'mass': 164.93032000, 'radius': 1.9200, 'color': [0.000, 1.000, 0.612], 'number': 67};\nmodule.exports[ 68] = module.exports[ 'Er'] = {'symbol': 'Er', 'name': 'erbium', 'mass': 167.25900000, 'radius': 1.8900, 'color': [0.000, 0.902, 0.459], 'number': 68};\nmodule.exports[ 69] = module.exports[ 'Tm'] = {'symbol': 'Tm', 'name': 'thulium', 'mass': 168.93421000, 'radius': 1.9000, 'color': [0.000, 0.831, 0.322], 'number': 69};\nmodule.exports[ 70] = module.exports[ 'Yb'] = {'symbol': 'Yb', 'name': 'ytterbium', 'mass': 173.05400000, 'radius': 1.8700, 'color': [0.000, 0.749, 0.220], 'number': 70};\nmodule.exports[ 71] = module.exports[ 'Lu'] = {'symbol': 'Lu', 'name': 'lutetium', 'mass': 174.96680000, 'radius': 1.8700, 'color': [0.000, 0.671, 0.141], 'number': 71};\nmodule.exports[ 72] = module.exports[ 'Hf'] = {'symbol': 'Hf', 'name': 'hafnium', 'mass': 178.49000000, 'radius': 1.7500, 'color': [0.302, 0.761, 1.000], 'number': 72};\nmodule.exports[ 73] = module.exports[ 'Ta'] = {'symbol': 'Ta', 'name': 'tantalum', 'mass': 180.94788000, 'radius': 1.7000, 'color': [0.302, 0.651, 1.000], 'number': 73};\nmodule.exports[ 74] = module.exports[ 'W'] = {'symbol': 'W', 'name': 'tungsten', 'mass': 183.84000000, 'radius': 1.6200, 'color': [0.129, 0.580, 0.839], 'number': 74};\nmodule.exports[ 75] = module.exports[ 'Re'] = {'symbol': 'Re', 'name': 'rhenium', 'mass': 186.20700000, 'radius': 1.5100, 'color': [0.149, 0.490, 0.671], 'number': 75};\nmodule.exports[ 76] = module.exports[ 'Os'] = {'symbol': 'Os', 'name': 'osmium', 'mass': 190.23000000, 'radius': 1.4400, 'color': [0.149, 0.400, 0.588], 'number': 76};\nmodule.exports[ 77] = module.exports[ 'Ir'] = {'symbol': 'Ir', 'name': 'iridium', 'mass': 192.21700000, 'radius': 1.4100, 'color': [0.090, 0.329, 0.529], 'number': 77};\nmodule.exports[ 78] = module.exports[ 'Pt'] = {'symbol': 'Pt', 'name': 'platinum', 'mass': 195.08400000, 'radius': 1.3600, 'color': [0.816, 0.816, 0.878], 'number': 78};\nmodule.exports[ 79] = module.exports[ 'Au'] = {'symbol': 'Au', 'name': 'gold', 'mass': 196.96656900, 'radius': 1.3600, 'color': [1.000, 0.820, 0.137], 'number': 79};\nmodule.exports[ 80] = module.exports[ 'Hg'] = {'symbol': 'Hg', 'name': 'mercury', 'mass': 200.59000000, 'radius': 1.3200, 'color': [0.722, 0.722, 0.816], 'number': 80};\nmodule.exports[ 81] = module.exports[ 'Tl'] = {'symbol': 'Tl', 'name': 'thallium', 'mass': 204.38330000, 'radius': 1.4500, 'color': [0.651, 0.329, 0.302], 'number': 81};\nmodule.exports[ 82] = module.exports[ 'Pb'] = {'symbol': 'Pb', 'name': 'lead', 'mass': 207.20000000, 'radius': 1.4600, 'color': [0.341, 0.349, 0.380], 'number': 82};\nmodule.exports[ 83] = module.exports[ 'Bi'] = {'symbol': 'Bi', 'name': 'bismuth', 'mass': 208.98040000, 'radius': 1.4800, 'color': [0.620, 0.310, 0.710], 'number': 83};\nmodule.exports[ 84] = module.exports[ 'Po'] = {'symbol': 'Po', 'name': 'polonium', 'mass': 210.00000000, 'radius': 1.4000, 'color': [0.671, 0.361, 0.000], 'number': 84};\nmodule.exports[ 85] = module.exports[ 'At'] = {'symbol': 'At', 'name': 'astatine', 'mass': 210.00000000, 'radius': 1.5000, 'color': [0.459, 0.310, 0.271], 'number': 85};\nmodule.exports[ 86] = module.exports[ 'Rn'] = {'symbol': 'Rn', 'name': 'radon', 'mass': 220.00000000, 'radius': 1.5000, 'color': [0.259, 0.510, 0.588], 'number': 86};\nmodule.exports[ 87] = module.exports[ 'Fr'] = {'symbol': 'Fr', 'name': 'francium', 'mass': 223.00000000, 'radius': 2.6000, 'color': [0.259, 0.000, 0.400], 'number': 87};\nmodule.exports[ 88] = module.exports[ 'Ra'] = {'symbol': 'Ra', 'name': 'radium', 'mass': 226.00000000, 'radius': 2.2100, 'color': [0.000, 0.490, 0.000], 'number': 88};\nmodule.exports[ 89] = module.exports[ 'Ac'] = {'symbol': 'Ac', 'name': 'actinium', 'mass': 227.00000000, 'radius': 2.1500, 'color': [0.439, 0.671, 0.980], 'number': 89};\nmodule.exports[ 90] = module.exports[ 'Th'] = {'symbol': 'Th', 'name': 'thorium', 'mass': 231.03588000, 'radius': 2.0600, 'color': [0.000, 0.729, 1.000], 'number': 90};\nmodule.exports[ 91] = module.exports[ 'Pa'] = {'symbol': 'Pa', 'name': 'protactinium', 'mass': 232.03806000, 'radius': 2.0000, 'color': [0.000, 0.631, 1.000], 'number': 91};\nmodule.exports[ 92] = module.exports[ 'U'] = {'symbol': 'U', 'name': 'uranium', 'mass': 237.00000000, 'radius': 1.9600, 'color': [0.000, 0.561, 1.000], 'number': 92};\nmodule.exports[ 93] = module.exports[ 'Np'] = {'symbol': 'Np', 'name': 'neptunium', 'mass': 238.02891000, 'radius': 1.9000, 'color': [0.000, 0.502, 1.000], 'number': 93};\nmodule.exports[ 94] = module.exports[ 'Pu'] = {'symbol': 'Pu', 'name': 'plutonium', 'mass': 243.00000000, 'radius': 1.8700, 'color': [0.000, 0.420, 1.000], 'number': 94};\nmodule.exports[ 95] = module.exports[ 'Am'] = {'symbol': 'Am', 'name': 'americium', 'mass': 244.00000000, 'radius': 1.8000, 'color': [0.329, 0.361, 0.949], 'number': 95};\nmodule.exports[ 96] = module.exports[ 'Cm'] = {'symbol': 'Cm', 'name': 'curium', 'mass': 247.00000000, 'radius': 1.6900, 'color': [0.471, 0.361, 0.890], 'number': 96};\nmodule.exports[ 97] = module.exports[ 'Bk'] = {'symbol': 'Bk', 'name': 'berkelium', 'mass': 247.00000000, 'radius': 1.6600, 'color': [0.541, 0.310, 0.890], 'number': 97};\nmodule.exports[ 98] = module.exports[ 'Cf'] = {'symbol': 'Cf', 'name': 'californium', 'mass': 251.00000000, 'radius': 1.6800, 'color': [0.631, 0.212, 0.831], 'number': 98};\nmodule.exports[ 99] = module.exports[ 'Es'] = {'symbol': 'Es', 'name': 'einsteinium', 'mass': 252.00000000, 'radius': 1.6500, 'color': [0.702, 0.122, 0.831], 'number': 99};\nmodule.exports[100] = module.exports[ 'Fm'] = {'symbol': 'Fm', 'name': 'fermium', 'mass': 257.00000000, 'radius': 1.6700, 'color': [0.702, 0.122, 0.729], 'number': 100};\nmodule.exports[101] = module.exports[ 'Md'] = {'symbol': 'Md', 'name': 'mendelevium', 'mass': 258.00000000, 'radius': 1.7300, 'color': [0.702, 0.051, 0.651], 'number': 101};\nmodule.exports[102] = module.exports[ 'No'] = {'symbol': 'No', 'name': 'nobelium', 'mass': 259.00000000, 'radius': 1.7600, 'color': [0.741, 0.051, 0.529], 'number': 102};\nmodule.exports[103] = module.exports[ 'Lr'] = {'symbol': 'Lr', 'name': 'lawrencium', 'mass': 262.00000000, 'radius': 1.6100, 'color': [0.780, 0.000, 0.400], 'number': 103};\nmodule.exports[104] = module.exports[ 'Rf'] = {'symbol': 'Rf', 'name': 'rutherfordium', 'mass': 261.00000000, 'radius': 1.5700, 'color': [0.800, 0.000, 0.349], 'number': 104};\nmodule.exports[105] = module.exports[ 'Db'] = {'symbol': 'Db', 'name': 'dubnium', 'mass': 262.00000000, 'radius': 1.4900, 'color': [0.820, 0.000, 0.310], 'number': 105};\nmodule.exports[106] = module.exports[ 'Sg'] = {'symbol': 'Sg', 'name': 'seaborgium', 'mass': 266.00000000, 'radius': 1.4300, 'color': [0.851, 0.000, 0.271], 'number': 106};\nmodule.exports[107] = module.exports[ 'Bh'] = {'symbol': 'Bh', 'name': 'bohrium', 'mass': 264.00000000, 'radius': 1.4100, 'color': [0.878, 0.000, 0.220], 'number': 107};\nmodule.exports[108] = module.exports[ 'Hs'] = {'symbol': 'Hs', 'name': 'hassium', 'mass': 277.00000000, 'radius': 1.3400, 'color': [0.902, 0.000, 0.180], 'number': 108};\nmodule.exports[109] = module.exports[ 'Mt'] = {'symbol': 'Mt', 'name': 'meitnerium', 'mass': 268.00000000, 'radius': 1.2900, 'color': [0.922, 0.000, 0.149], 'number': 109};\nmodule.exports[110] = module.exports[ 'Ds'] = {'symbol': 'Ds', 'name': 'Ds', 'mass': 271.00000000, 'radius': 1.2800, 'color': [0.922, 0.000, 0.149], 'number': 110};\nmodule.exports[111] = module.exports['Uuu'] = {'symbol': 'Uuu', 'name': 'Uuu', 'mass': 272.00000000, 'radius': 1.2100, 'color': [0.922, 0.000, 0.149], 'number': 111};\nmodule.exports[112] = module.exports['Uub'] = {'symbol': 'Uub', 'name': 'Uub', 'mass': 285.00000000, 'radius': 1.2200, 'color': [0.922, 0.000, 0.149], 'number': 112};\nmodule.exports[113] = module.exports['Uut'] = {'symbol': 'Uut', 'name': 'Uut', 'mass': 284.00000000, 'radius': 1.3600, 'color': [0.922, 0.000, 0.149], 'number': 113};\nmodule.exports[114] = module.exports['Uuq'] = {'symbol': 'Uuq', 'name': 'Uuq', 'mass': 289.00000000, 'radius': 1.4300, 'color': [0.922, 0.000, 0.149], 'number': 114};\nmodule.exports[115] = module.exports['Uup'] = {'symbol': 'Uup', 'name': 'Uup', 'mass': 288.00000000, 'radius': 1.6200, 'color': [0.922, 0.000, 0.149], 'number': 115};\nmodule.exports[116] = module.exports['Uuh'] = {'symbol': 'Uuh', 'name': 'Uuh', 'mass': 292.00000000, 'radius': 1.7500, 'color': [0.922, 0.000, 0.149], 'number': 116};\nmodule.exports[117] = module.exports['Uus'] = {'symbol': 'Uus', 'name': 'Uus', 'mass': 294.00000000, 'radius': 1.6500, 'color': [0.922, 0.000, 0.149], 'number': 117};\nmodule.exports[118] = module.exports['Uuo'] = {'symbol': 'Uuo', 'name': 'Uuo', 'mass': 296.00000000, 'radius': 1.5700, 'color': [0.922, 0.000, 0.149], 'number': 118};\n","/**\n * @fileoverview gl-matrix - High performance matrix and vector operations\n * @author Brandon Jones\n * @author Colin MacKenzie IV\n * @version 2.2.2\n */\n\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n\n(function(_global) {\n \"use strict\";\n\n var shim = {};\n if (typeof(exports) === 'undefined') {\n if(typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\n shim.exports = {};\n define(function() {\n return shim.exports;\n });\n } else {\n // gl-matrix lives in a browser, define its namespaces in global\n shim.exports = typeof(window) !== 'undefined' ? window : _global;\n }\n }\n else {\n // gl-matrix lives in commonjs, define its namespaces in exports\n shim.exports = exports;\n }\n\n (function(exports) {\n /* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n\nif(!GLMAT_EPSILON) {\n var GLMAT_EPSILON = 0.000001;\n}\n\nif(!GLMAT_ARRAY_TYPE) {\n var GLMAT_ARRAY_TYPE = (typeof Float32Array !== 'undefined') ? Float32Array : Array;\n}\n\nif(!GLMAT_RANDOM) {\n var GLMAT_RANDOM = Math.random;\n}\n\n/**\n * @class Common utilities\n * @name glMatrix\n */\nvar glMatrix = {};\n\n/**\n * Sets the type of array used when creating new vectors and matrices\n *\n * @param {Type} type Array type, such as Float32Array or Array\n */\nglMatrix.setMatrixArrayType = function(type) {\n GLMAT_ARRAY_TYPE = type;\n}\n\nif(typeof(exports) !== 'undefined') {\n exports.glMatrix = glMatrix;\n}\n\nvar degree = Math.PI / 180;\n\n/**\n* Convert Degree To Radian\n*\n* @param {Number} Angle in Degrees\n*/\nglMatrix.toRadian = function(a){\n return a * degree;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 2 Dimensional Vector\n * @name vec2\n */\n\nvar vec2 = {};\n\n/**\n * Creates a new, empty vec2\n *\n * @returns {vec2} a new 2D vector\n */\nvec2.create = function() {\n var out = new GLMAT_ARRAY_TYPE(2);\n out[0] = 0;\n out[1] = 0;\n return out;\n};\n\n/**\n * Creates a new vec2 initialized with values from an existing vector\n *\n * @param {vec2} a vector to clone\n * @returns {vec2} a new 2D vector\n */\nvec2.clone = function(a) {\n var out = new GLMAT_ARRAY_TYPE(2);\n out[0] = a[0];\n out[1] = a[1];\n return out;\n};\n\n/**\n * Creates a new vec2 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @returns {vec2} a new 2D vector\n */\nvec2.fromValues = function(x, y) {\n var out = new GLMAT_ARRAY_TYPE(2);\n out[0] = x;\n out[1] = y;\n return out;\n};\n\n/**\n * Copy the values from one vec2 to another\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the source vector\n * @returns {vec2} out\n */\nvec2.copy = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n return out;\n};\n\n/**\n * Set the components of a vec2 to the given values\n *\n * @param {vec2} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @returns {vec2} out\n */\nvec2.set = function(out, x, y) {\n out[0] = x;\n out[1] = y;\n return out;\n};\n\n/**\n * Adds two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.add = function(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n return out;\n};\n\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.subtract = function(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n return out;\n};\n\n/**\n * Alias for {@link vec2.subtract}\n * @function\n */\nvec2.sub = vec2.subtract;\n\n/**\n * Multiplies two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.multiply = function(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n return out;\n};\n\n/**\n * Alias for {@link vec2.multiply}\n * @function\n */\nvec2.mul = vec2.multiply;\n\n/**\n * Divides two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.divide = function(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n return out;\n};\n\n/**\n * Alias for {@link vec2.divide}\n * @function\n */\nvec2.div = vec2.divide;\n\n/**\n * Returns the minimum of two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.min = function(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n return out;\n};\n\n/**\n * Returns the maximum of two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.max = function(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n return out;\n};\n\n/**\n * Scales a vec2 by a scalar number\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec2} out\n */\nvec2.scale = function(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n return out;\n};\n\n/**\n * Adds two vec2's after scaling the second operand by a scalar value\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec2} out\n */\nvec2.scaleAndAdd = function(out, a, b, scale) {\n out[0] = a[0] + (b[0] * scale);\n out[1] = a[1] + (b[1] * scale);\n return out;\n};\n\n/**\n * Calculates the euclidian distance between two vec2's\n *\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {Number} distance between a and b\n */\nvec2.distance = function(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return Math.sqrt(x*x + y*y);\n};\n\n/**\n * Alias for {@link vec2.distance}\n * @function\n */\nvec2.dist = vec2.distance;\n\n/**\n * Calculates the squared euclidian distance between two vec2's\n *\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {Number} squared distance between a and b\n */\nvec2.squaredDistance = function(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return x*x + y*y;\n};\n\n/**\n * Alias for {@link vec2.squaredDistance}\n * @function\n */\nvec2.sqrDist = vec2.squaredDistance;\n\n/**\n * Calculates the length of a vec2\n *\n * @param {vec2} a vector to calculate length of\n * @returns {Number} length of a\n */\nvec2.length = function (a) {\n var x = a[0],\n y = a[1];\n return Math.sqrt(x*x + y*y);\n};\n\n/**\n * Alias for {@link vec2.length}\n * @function\n */\nvec2.len = vec2.length;\n\n/**\n * Calculates the squared length of a vec2\n *\n * @param {vec2} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\nvec2.squaredLength = function (a) {\n var x = a[0],\n y = a[1];\n return x*x + y*y;\n};\n\n/**\n * Alias for {@link vec2.squaredLength}\n * @function\n */\nvec2.sqrLen = vec2.squaredLength;\n\n/**\n * Negates the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to negate\n * @returns {vec2} out\n */\nvec2.negate = function(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n return out;\n};\n\n/**\n * Returns the inverse of the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to invert\n * @returns {vec2} out\n */\nvec2.inverse = function(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n return out;\n};\n\n/**\n * Normalize a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to normalize\n * @returns {vec2} out\n */\nvec2.normalize = function(out, a) {\n var x = a[0],\n y = a[1];\n var len = x*x + y*y;\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n }\n return out;\n};\n\n/**\n * Calculates the dot product of two vec2's\n *\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {Number} dot product of a and b\n */\nvec2.dot = function (a, b) {\n return a[0] * b[0] + a[1] * b[1];\n};\n\n/**\n * Computes the cross product of two vec2's\n * Note that the cross product must by definition produce a 3D vector\n *\n * @param {vec3} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec3} out\n */\nvec2.cross = function(out, a, b) {\n var z = a[0] * b[1] - a[1] * b[0];\n out[0] = out[1] = 0;\n out[2] = z;\n return out;\n};\n\n/**\n * Performs a linear interpolation between two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {vec2} out\n */\nvec2.lerp = function (out, a, b, t) {\n var ax = a[0],\n ay = a[1];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n return out;\n};\n\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec2} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec2} out\n */\nvec2.random = function (out, scale) {\n scale = scale || 1.0;\n var r = GLMAT_RANDOM() * 2.0 * Math.PI;\n out[0] = Math.cos(r) * scale;\n out[1] = Math.sin(r) * scale;\n return out;\n};\n\n/**\n * Transforms the vec2 with a mat2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat2} m matrix to transform with\n * @returns {vec2} out\n */\nvec2.transformMat2 = function(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n return out;\n};\n\n/**\n * Transforms the vec2 with a mat2d\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat2d} m matrix to transform with\n * @returns {vec2} out\n */\nvec2.transformMat2d = function(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y + m[4];\n out[1] = m[1] * x + m[3] * y + m[5];\n return out;\n};\n\n/**\n * Transforms the vec2 with a mat3\n * 3rd vector component is implicitly '1'\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat3} m matrix to transform with\n * @returns {vec2} out\n */\nvec2.transformMat3 = function(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[3] * y + m[6];\n out[1] = m[1] * x + m[4] * y + m[7];\n return out;\n};\n\n/**\n * Transforms the vec2 with a mat4\n * 3rd vector component is implicitly '0'\n * 4th vector component is implicitly '1'\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat4} m matrix to transform with\n * @returns {vec2} out\n */\nvec2.transformMat4 = function(out, a, m) {\n var x = a[0], \n y = a[1];\n out[0] = m[0] * x + m[4] * y + m[12];\n out[1] = m[1] * x + m[5] * y + m[13];\n return out;\n};\n\n/**\n * Perform some operation over an array of vec2s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\nvec2.forEach = (function() {\n var vec = vec2.create();\n\n return function(a, stride, offset, count, fn, arg) {\n var i, l;\n if(!stride) {\n stride = 2;\n }\n\n if(!offset) {\n offset = 0;\n }\n \n if(count) {\n l = Math.min((count * stride) + offset, a.length);\n } else {\n l = a.length;\n }\n\n for(i = offset; i < l; i += stride) {\n vec[0] = a[i]; vec[1] = a[i+1];\n fn(vec, vec, arg);\n a[i] = vec[0]; a[i+1] = vec[1];\n }\n \n return a;\n };\n})();\n\n/**\n * Returns a string representation of a vector\n *\n * @param {vec2} vec vector to represent as a string\n * @returns {String} string representation of the vector\n */\nvec2.str = function (a) {\n return 'vec2(' + a[0] + ', ' + a[1] + ')';\n};\n\nif(typeof(exports) !== 'undefined') {\n exports.vec2 = vec2;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 3 Dimensional Vector\n * @name vec3\n */\n\nvar vec3 = {};\n\n/**\n * Creates a new, empty vec3\n *\n * @returns {vec3} a new 3D vector\n */\nvec3.create = function() {\n var out = new GLMAT_ARRAY_TYPE(3);\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n return out;\n};\n\n/**\n * Creates a new vec3 initialized with values from an existing vector\n *\n * @param {vec3} a vector to clone\n * @returns {vec3} a new 3D vector\n */\nvec3.clone = function(a) {\n var out = new GLMAT_ARRAY_TYPE(3);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n};\n\n/**\n * Creates a new vec3 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} a new 3D vector\n */\nvec3.fromValues = function(x, y, z) {\n var out = new GLMAT_ARRAY_TYPE(3);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n};\n\n/**\n * Copy the values from one vec3 to another\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the source vector\n * @returns {vec3} out\n */\nvec3.copy = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n};\n\n/**\n * Set the components of a vec3 to the given values\n *\n * @param {vec3} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} out\n */\nvec3.set = function(out, x, y, z) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n};\n\n/**\n * Adds two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.add = function(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n return out;\n};\n\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.subtract = function(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n return out;\n};\n\n/**\n * Alias for {@link vec3.subtract}\n * @function\n */\nvec3.sub = vec3.subtract;\n\n/**\n * Multiplies two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.multiply = function(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n return out;\n};\n\n/**\n * Alias for {@link vec3.multiply}\n * @function\n */\nvec3.mul = vec3.multiply;\n\n/**\n * Divides two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.divide = function(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n return out;\n};\n\n/**\n * Alias for {@link vec3.divide}\n * @function\n */\nvec3.div = vec3.divide;\n\n/**\n * Returns the minimum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.min = function(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n return out;\n};\n\n/**\n * Returns the maximum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.max = function(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n return out;\n};\n\n/**\n * Scales a vec3 by a scalar number\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec3} out\n */\nvec3.scale = function(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n return out;\n};\n\n/**\n * Adds two vec3's after scaling the second operand by a scalar value\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec3} out\n */\nvec3.scaleAndAdd = function(out, a, b, scale) {\n out[0] = a[0] + (b[0] * scale);\n out[1] = a[1] + (b[1] * scale);\n out[2] = a[2] + (b[2] * scale);\n return out;\n};\n\n/**\n * Calculates the euclidian distance between two vec3's\n *\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {Number} distance between a and b\n */\nvec3.distance = function(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1],\n z = b[2] - a[2];\n return Math.sqrt(x*x + y*y + z*z);\n};\n\n/**\n * Alias for {@link vec3.distance}\n * @function\n */\nvec3.dist = vec3.distance;\n\n/**\n * Calculates the squared euclidian distance between two vec3's\n *\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {Number} squared distance between a and b\n */\nvec3.squaredDistance = function(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1],\n z = b[2] - a[2];\n return x*x + y*y + z*z;\n};\n\n/**\n * Alias for {@link vec3.squaredDistance}\n * @function\n */\nvec3.sqrDist = vec3.squaredDistance;\n\n/**\n * Calculates the length of a vec3\n *\n * @param {vec3} a vector to calculate length of\n * @returns {Number} length of a\n */\nvec3.length = function (a) {\n var x = a[0],\n y = a[1],\n z = a[2];\n return Math.sqrt(x*x + y*y + z*z);\n};\n\n/**\n * Alias for {@link vec3.length}\n * @function\n */\nvec3.len = vec3.length;\n\n/**\n * Calculates the squared length of a vec3\n *\n * @param {vec3} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\nvec3.squaredLength = function (a) {\n var x = a[0],\n y = a[1],\n z = a[2];\n return x*x + y*y + z*z;\n};\n\n/**\n * Alias for {@link vec3.squaredLength}\n * @function\n */\nvec3.sqrLen = vec3.squaredLength;\n\n/**\n * Negates the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to negate\n * @returns {vec3} out\n */\nvec3.negate = function(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n return out;\n};\n\n/**\n * Returns the inverse of the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to invert\n * @returns {vec3} out\n */\nvec3.inverse = function(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n return out;\n};\n\n/**\n * Normalize a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to normalize\n * @returns {vec3} out\n */\nvec3.normalize = function(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var len = x*x + y*y + z*z;\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n }\n return out;\n};\n\n/**\n * Calculates the dot product of two vec3's\n *\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {Number} dot product of a and b\n */\nvec3.dot = function (a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n};\n\n/**\n * Computes the cross product of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.cross = function(out, a, b) {\n var ax = a[0], ay = a[1], az = a[2],\n bx = b[0], by = b[1], bz = b[2];\n\n out[0] = ay * bz - az * by;\n out[1] = az * bx - ax * bz;\n out[2] = ax * by - ay * bx;\n return out;\n};\n\n/**\n * Performs a linear interpolation between two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {vec3} out\n */\nvec3.lerp = function (out, a, b, t) {\n var ax = a[0],\n ay = a[1],\n az = a[2];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n return out;\n};\n\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec3} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec3} out\n */\nvec3.random = function (out, scale) {\n scale = scale || 1.0;\n\n var r = GLMAT_RANDOM() * 2.0 * Math.PI;\n var z = (GLMAT_RANDOM() * 2.0) - 1.0;\n var zScale = Math.sqrt(1.0-z*z) * scale;\n\n out[0] = Math.cos(r) * zScale;\n out[1] = Math.sin(r) * zScale;\n out[2] = z * scale;\n return out;\n};\n\n/**\n * Transforms the vec3 with a mat4.\n * 4th vector component is implicitly '1'\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to transform\n * @param {mat4} m matrix to transform with\n * @returns {vec3} out\n */\nvec3.transformMat4 = function(out, a, m) {\n var x = a[0], y = a[1], z = a[2],\n w = m[3] * x + m[7] * y + m[11] * z + m[15];\n w = w || 1.0;\n out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;\n out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;\n out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;\n return out;\n};\n\n/**\n * Transforms the vec3 with a mat3.\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to transform\n * @param {mat4} m the 3x3 matrix to transform with\n * @returns {vec3} out\n */\nvec3.transformMat3 = function(out, a, m) {\n var x = a[0], y = a[1], z = a[2];\n out[0] = x * m[0] + y * m[3] + z * m[6];\n out[1] = x * m[1] + y * m[4] + z * m[7];\n out[2] = x * m[2] + y * m[5] + z * m[8];\n return out;\n};\n\n/**\n * Transforms the vec3 with a quat\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to transform\n * @param {quat} q quaternion to transform with\n * @returns {vec3} out\n */\nvec3.transformQuat = function(out, a, q) {\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\n\n var x = a[0], y = a[1], z = a[2],\n qx = q[0], qy = q[1], qz = q[2], qw = q[3],\n\n // calculate quat * vec\n ix = qw * x + qy * z - qz * y,\n iy = qw * y + qz * x - qx * z,\n iz = qw * z + qx * y - qy * x,\n iw = -qx * x - qy * y - qz * z;\n\n // calculate result * inverse quat\n out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n return out;\n};\n\n/**\n * Rotate a 3D vector around the x-axis\n * @param {vec3} out The receiving vec3\n * @param {vec3} a The vec3 point to rotate\n * @param {vec3} b The origin of the rotation\n * @param {Number} c The angle of rotation\n * @returns {vec3} out\n */\nvec3.rotateX = function(out, a, b, c){\n var p = [], r=[];\n\t //Translate point to the origin\n\t p[0] = a[0] - b[0];\n\t p[1] = a[1] - b[1];\n \tp[2] = a[2] - b[2];\n\n\t //perform rotation\n\t r[0] = p[0];\n\t r[1] = p[1]*Math.cos(c) - p[2]*Math.sin(c);\n\t r[2] = p[1]*Math.sin(c) + p[2]*Math.cos(c);\n\n\t //translate to correct position\n\t out[0] = r[0] + b[0];\n\t out[1] = r[1] + b[1];\n\t out[2] = r[2] + b[2];\n\n \treturn out;\n};\n\n/**\n * Rotate a 3D vector around the y-axis\n * @param {vec3} out The receiving vec3\n * @param {vec3} a The vec3 point to rotate\n * @param {vec3} b The origin of the rotation\n * @param {Number} c The angle of rotation\n * @returns {vec3} out\n */\nvec3.rotateY = function(out, a, b, c){\n \tvar p = [], r=[];\n \t//Translate point to the origin\n \tp[0] = a[0] - b[0];\n \tp[1] = a[1] - b[1];\n \tp[2] = a[2] - b[2];\n \n \t//perform rotation\n \tr[0] = p[2]*Math.sin(c) + p[0]*Math.cos(c);\n \tr[1] = p[1];\n \tr[2] = p[2]*Math.cos(c) - p[0]*Math.sin(c);\n \n \t//translate to correct position\n \tout[0] = r[0] + b[0];\n \tout[1] = r[1] + b[1];\n \tout[2] = r[2] + b[2];\n \n \treturn out;\n};\n\n/**\n * Rotate a 3D vector around the z-axis\n * @param {vec3} out The receiving vec3\n * @param {vec3} a The vec3 point to rotate\n * @param {vec3} b The origin of the rotation\n * @param {Number} c The angle of rotation\n * @returns {vec3} out\n */\nvec3.rotateZ = function(out, a, b, c){\n \tvar p = [], r=[];\n \t//Translate point to the origin\n \tp[0] = a[0] - b[0];\n \tp[1] = a[1] - b[1];\n \tp[2] = a[2] - b[2];\n \n \t//perform rotation\n \tr[0] = p[0]*Math.cos(c) - p[1]*Math.sin(c);\n \tr[1] = p[0]*Math.sin(c) + p[1]*Math.cos(c);\n \tr[2] = p[2];\n \n \t//translate to correct position\n \tout[0] = r[0] + b[0];\n \tout[1] = r[1] + b[1];\n \tout[2] = r[2] + b[2];\n \n \treturn out;\n};\n\n/**\n * Perform some operation over an array of vec3s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\nvec3.forEach = (function() {\n var vec = vec3.create();\n\n return function(a, stride, offset, count, fn, arg) {\n var i, l;\n if(!stride) {\n stride = 3;\n }\n\n if(!offset) {\n offset = 0;\n }\n \n if(count) {\n l = Math.min((count * stride) + offset, a.length);\n } else {\n l = a.length;\n }\n\n for(i = offset; i < l; i += stride) {\n vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2];\n fn(vec, vec, arg);\n a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2];\n }\n \n return a;\n };\n})();\n\n/**\n * Get the angle between two 3D vectors\n * @param {vec3} a The first operand\n * @param {vec3} b The second operand\n * @returns {Number} The angle in radians\n */\nvec3.angle = function(a, b) {\n \n var tempA = vec3.fromValues(a[0], a[1], a[2]);\n var tempB = vec3.fromValues(b[0], b[1], b[2]);\n \n vec3.normalize(tempA, tempA);\n vec3.normalize(tempB, tempB);\n \n var cosine = vec3.dot(tempA, tempB);\n\n if(cosine > 1.0){\n return 0;\n } else {\n return Math.acos(cosine);\n } \n};\n\n/**\n * Returns a string representation of a vector\n *\n * @param {vec3} vec vector to represent as a string\n * @returns {String} string representation of the vector\n */\nvec3.str = function (a) {\n return 'vec3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ')';\n};\n\nif(typeof(exports) !== 'undefined') {\n exports.vec3 = vec3;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 4 Dimensional Vector\n * @name vec4\n */\n\nvar vec4 = {};\n\n/**\n * Creates a new, empty vec4\n *\n * @returns {vec4} a new 4D vector\n */\nvec4.create = function() {\n var out = new GLMAT_ARRAY_TYPE(4);\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n return out;\n};\n\n/**\n * Creates a new vec4 initialized with values from an existing vector\n *\n * @param {vec4} a vector to clone\n * @returns {vec4} a new 4D vector\n */\nvec4.clone = function(a) {\n var out = new GLMAT_ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n};\n\n/**\n * Creates a new vec4 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} a new 4D vector\n */\nvec4.fromValues = function(x, y, z, w) {\n var out = new GLMAT_ARRAY_TYPE(4);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n};\n\n/**\n * Copy the values from one vec4 to another\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the source vector\n * @returns {vec4} out\n */\nvec4.copy = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n};\n\n/**\n * Set the components of a vec4 to the given values\n *\n * @param {vec4} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} out\n */\nvec4.set = function(out, x, y, z, w) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n};\n\n/**\n * Adds two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.add = function(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n};\n\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.subtract = function(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n};\n\n/**\n * Alias for {@link vec4.subtract}\n * @function\n */\nvec4.sub = vec4.subtract;\n\n/**\n * Multiplies two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.multiply = function(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n out[3] = a[3] * b[3];\n return out;\n};\n\n/**\n * Alias for {@link vec4.multiply}\n * @function\n */\nvec4.mul = vec4.multiply;\n\n/**\n * Divides two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.divide = function(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n out[3] = a[3] / b[3];\n return out;\n};\n\n/**\n * Alias for {@link vec4.divide}\n * @function\n */\nvec4.div = vec4.divide;\n\n/**\n * Returns the minimum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.min = function(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n out[3] = Math.min(a[3], b[3]);\n return out;\n};\n\n/**\n * Returns the maximum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.max = function(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n out[3] = Math.max(a[3], b[3]);\n return out;\n};\n\n/**\n * Scales a vec4 by a scalar number\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec4} out\n */\nvec4.scale = function(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n};\n\n/**\n * Adds two vec4's after scaling the second operand by a scalar value\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec4} out\n */\nvec4.scaleAndAdd = function(out, a, b, scale) {\n out[0] = a[0] + (b[0] * scale);\n out[1] = a[1] + (b[1] * scale);\n out[2] = a[2] + (b[2] * scale);\n out[3] = a[3] + (b[3] * scale);\n return out;\n};\n\n/**\n * Calculates the euclidian distance between two vec4's\n *\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {Number} distance between a and b\n */\nvec4.distance = function(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1],\n z = b[2] - a[2],\n w = b[3] - a[3];\n return Math.sqrt(x*x + y*y + z*z + w*w);\n};\n\n/**\n * Alias for {@link vec4.distance}\n * @function\n */\nvec4.dist = vec4.distance;\n\n/**\n * Calculates the squared euclidian distance between two vec4's\n *\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {Number} squared distance between a and b\n */\nvec4.squaredDistance = function(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1],\n z = b[2] - a[2],\n w = b[3] - a[3];\n return x*x + y*y + z*z + w*w;\n};\n\n/**\n * Alias for {@link vec4.squaredDistance}\n * @function\n */\nvec4.sqrDist = vec4.squaredDistance;\n\n/**\n * Calculates the length of a vec4\n *\n * @param {vec4} a vector to calculate length of\n * @returns {Number} length of a\n */\nvec4.length = function (a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n return Math.sqrt(x*x + y*y + z*z + w*w);\n};\n\n/**\n * Alias for {@link vec4.length}\n * @function\n */\nvec4.len = vec4.length;\n\n/**\n * Calculates the squared length of a vec4\n *\n * @param {vec4} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\nvec4.squaredLength = function (a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n return x*x + y*y + z*z + w*w;\n};\n\n/**\n * Alias for {@link vec4.squaredLength}\n * @function\n */\nvec4.sqrLen = vec4.squaredLength;\n\n/**\n * Negates the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to negate\n * @returns {vec4} out\n */\nvec4.negate = function(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = -a[3];\n return out;\n};\n\n/**\n * Returns the inverse of the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to invert\n * @returns {vec4} out\n */\nvec4.inverse = function(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n out[3] = 1.0 / a[3];\n return out;\n};\n\n/**\n * Normalize a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to normalize\n * @returns {vec4} out\n */\nvec4.normalize = function(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n var len = x*x + y*y + z*z + w*w;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n out[3] = a[3] * len;\n }\n return out;\n};\n\n/**\n * Calculates the dot product of two vec4's\n *\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {Number} dot product of a and b\n */\nvec4.dot = function (a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n};\n\n/**\n * Performs a linear interpolation between two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {vec4} out\n */\nvec4.lerp = function (out, a, b, t) {\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n out[3] = aw + t * (b[3] - aw);\n return out;\n};\n\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec4} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec4} out\n */\nvec4.random = function (out, scale) {\n scale = scale || 1.0;\n\n //TODO: This is a pretty awful way of doing this. Find something better.\n out[0] = GLMAT_RANDOM();\n out[1] = GLMAT_RANDOM();\n out[2] = GLMAT_RANDOM();\n out[3] = GLMAT_RANDOM();\n vec4.normalize(out, out);\n vec4.scale(out, out, scale);\n return out;\n};\n\n/**\n * Transforms the vec4 with a mat4.\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the vector to transform\n * @param {mat4} m matrix to transform with\n * @returns {vec4} out\n */\nvec4.transformMat4 = function(out, a, m) {\n var x = a[0], y = a[1], z = a[2], w = a[3];\n out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n return out;\n};\n\n/**\n * Transforms the vec4 with a quat\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the vector to transform\n * @param {quat} q quaternion to transform with\n * @returns {vec4} out\n */\nvec4.transformQuat = function(out, a, q) {\n var x = a[0], y = a[1], z = a[2],\n qx = q[0], qy = q[1], qz = q[2], qw = q[3],\n\n // calculate quat * vec\n ix = qw * x + qy * z - qz * y,\n iy = qw * y + qz * x - qx * z,\n iz = qw * z + qx * y - qy * x,\n iw = -qx * x - qy * y - qz * z;\n\n // calculate result * inverse quat\n out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n return out;\n};\n\n/**\n * Perform some operation over an array of vec4s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\nvec4.forEach = (function() {\n var vec = vec4.create();\n\n return function(a, stride, offset, count, fn, arg) {\n var i, l;\n if(!stride) {\n stride = 4;\n }\n\n if(!offset) {\n offset = 0;\n }\n \n if(count) {\n l = Math.min((count * stride) + offset, a.length);\n } else {\n l = a.length;\n }\n\n for(i = offset; i < l; i += stride) {\n vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2]; vec[3] = a[i+3];\n fn(vec, vec, arg);\n a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2]; a[i+3] = vec[3];\n }\n \n return a;\n };\n})();\n\n/**\n * Returns a string representation of a vector\n *\n * @param {vec4} vec vector to represent as a string\n * @returns {String} string representation of the vector\n */\nvec4.str = function (a) {\n return 'vec4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';\n};\n\nif(typeof(exports) !== 'undefined') {\n exports.vec4 = vec4;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 2x2 Matrix\n * @name mat2\n */\n\nvar mat2 = {};\n\n/**\n * Creates a new identity mat2\n *\n * @returns {mat2} a new 2x2 matrix\n */\nmat2.create = function() {\n var out = new GLMAT_ARRAY_TYPE(4);\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n};\n\n/**\n * Creates a new mat2 initialized with values from an existing matrix\n *\n * @param {mat2} a matrix to clone\n * @returns {mat2} a new 2x2 matrix\n */\nmat2.clone = function(a) {\n var out = new GLMAT_ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n};\n\n/**\n * Copy the values from one mat2 to another\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\nmat2.copy = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n};\n\n/**\n * Set a mat2 to the identity matrix\n *\n * @param {mat2} out the receiving matrix\n * @returns {mat2} out\n */\nmat2.identity = function(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n};\n\n/**\n * Transpose the values of a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\nmat2.transpose = function(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a1 = a[1];\n out[1] = a[2];\n out[2] = a1;\n } else {\n out[0] = a[0];\n out[1] = a[2];\n out[2] = a[1];\n out[3] = a[3];\n }\n \n return out;\n};\n\n/**\n * Inverts a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\nmat2.invert = function(out, a) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n\n // Calculate the determinant\n det = a0 * a3 - a2 * a1;\n\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n \n out[0] = a3 * det;\n out[1] = -a1 * det;\n out[2] = -a2 * det;\n out[3] = a0 * det;\n\n return out;\n};\n\n/**\n * Calculates the adjugate of a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\nmat2.adjoint = function(out, a) {\n // Caching this value is nessecary if out == a\n var a0 = a[0];\n out[0] = a[3];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a0;\n\n return out;\n};\n\n/**\n * Calculates the determinant of a mat2\n *\n * @param {mat2} a the source matrix\n * @returns {Number} determinant of a\n */\nmat2.determinant = function (a) {\n return a[0] * a[3] - a[2] * a[1];\n};\n\n/**\n * Multiplies two mat2's\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the first operand\n * @param {mat2} b the second operand\n * @returns {mat2} out\n */\nmat2.multiply = function (out, a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\n out[0] = a0 * b0 + a2 * b1;\n out[1] = a1 * b0 + a3 * b1;\n out[2] = a0 * b2 + a2 * b3;\n out[3] = a1 * b2 + a3 * b3;\n return out;\n};\n\n/**\n * Alias for {@link mat2.multiply}\n * @function\n */\nmat2.mul = mat2.multiply;\n\n/**\n * Rotates a mat2 by the given angle\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2} out\n */\nmat2.rotate = function (out, a, rad) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n return out;\n};\n\n/**\n * Scales the mat2 by the dimensions in the given vec2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the matrix to rotate\n * @param {vec2} v the vec2 to scale the matrix by\n * @returns {mat2} out\n **/\nmat2.scale = function(out, a, v) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n v0 = v[0], v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n return out;\n};\n\n/**\n * Returns a string representation of a mat2\n *\n * @param {mat2} mat matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\nmat2.str = function (a) {\n return 'mat2(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';\n};\n\n/**\n * Returns Frobenius norm of a mat2\n *\n * @param {mat2} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\nmat2.frob = function (a) {\n return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2)))\n};\n\n/**\n * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix\n * @param {mat2} L the lower triangular matrix \n * @param {mat2} D the diagonal matrix \n * @param {mat2} U the upper triangular matrix \n * @param {mat2} a the input matrix to factorize\n */\n\nmat2.LDU = function (L, D, U, a) { \n L[2] = a[2]/a[0]; \n U[0] = a[0]; \n U[1] = a[1]; \n U[3] = a[3] - L[2] * U[1]; \n return [L, D, U]; \n}; \n\nif(typeof(exports) !== 'undefined') {\n exports.mat2 = mat2;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 2x3 Matrix\n * @name mat2d\n * \n * @description \n * A mat2d contains six elements defined as:\n *
\n * [a, c, tx,\n *  b, d, ty]\n * 
\n * This is a short form for the 3x3 matrix:\n *
\n * [a, c, tx,\n *  b, d, ty,\n *  0, 0, 1]\n * 
\n * The last row is ignored so the array is shorter and operations are faster.\n */\n\nvar mat2d = {};\n\n/**\n * Creates a new identity mat2d\n *\n * @returns {mat2d} a new 2x3 matrix\n */\nmat2d.create = function() {\n var out = new GLMAT_ARRAY_TYPE(6);\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n return out;\n};\n\n/**\n * Creates a new mat2d initialized with values from an existing matrix\n *\n * @param {mat2d} a matrix to clone\n * @returns {mat2d} a new 2x3 matrix\n */\nmat2d.clone = function(a) {\n var out = new GLMAT_ARRAY_TYPE(6);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n return out;\n};\n\n/**\n * Copy the values from one mat2d to another\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the source matrix\n * @returns {mat2d} out\n */\nmat2d.copy = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n return out;\n};\n\n/**\n * Set a mat2d to the identity matrix\n *\n * @param {mat2d} out the receiving matrix\n * @returns {mat2d} out\n */\nmat2d.identity = function(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n return out;\n};\n\n/**\n * Inverts a mat2d\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the source matrix\n * @returns {mat2d} out\n */\nmat2d.invert = function(out, a) {\n var aa = a[0], ab = a[1], ac = a[2], ad = a[3],\n atx = a[4], aty = a[5];\n\n var det = aa * ad - ab * ac;\n if(!det){\n return null;\n }\n det = 1.0 / det;\n\n out[0] = ad * det;\n out[1] = -ab * det;\n out[2] = -ac * det;\n out[3] = aa * det;\n out[4] = (ac * aty - ad * atx) * det;\n out[5] = (ab * atx - aa * aty) * det;\n return out;\n};\n\n/**\n * Calculates the determinant of a mat2d\n *\n * @param {mat2d} a the source matrix\n * @returns {Number} determinant of a\n */\nmat2d.determinant = function (a) {\n return a[0] * a[3] - a[1] * a[2];\n};\n\n/**\n * Multiplies two mat2d's\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the first operand\n * @param {mat2d} b the second operand\n * @returns {mat2d} out\n */\nmat2d.multiply = function (out, a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],\n b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5];\n out[0] = a0 * b0 + a2 * b1;\n out[1] = a1 * b0 + a3 * b1;\n out[2] = a0 * b2 + a2 * b3;\n out[3] = a1 * b2 + a3 * b3;\n out[4] = a0 * b4 + a2 * b5 + a4;\n out[5] = a1 * b4 + a3 * b5 + a5;\n return out;\n};\n\n/**\n * Alias for {@link mat2d.multiply}\n * @function\n */\nmat2d.mul = mat2d.multiply;\n\n\n/**\n * Rotates a mat2d by the given angle\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2d} out\n */\nmat2d.rotate = function (out, a, rad) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],\n s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n out[4] = a4;\n out[5] = a5;\n return out;\n};\n\n/**\n * Scales the mat2d by the dimensions in the given vec2\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the matrix to translate\n * @param {vec2} v the vec2 to scale the matrix by\n * @returns {mat2d} out\n **/\nmat2d.scale = function(out, a, v) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],\n v0 = v[0], v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n out[4] = a4;\n out[5] = a5;\n return out;\n};\n\n/**\n * Translates the mat2d by the dimensions in the given vec2\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the matrix to translate\n * @param {vec2} v the vec2 to translate the matrix by\n * @returns {mat2d} out\n **/\nmat2d.translate = function(out, a, v) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],\n v0 = v[0], v1 = v[1];\n out[0] = a0;\n out[1] = a1;\n out[2] = a2;\n out[3] = a3;\n out[4] = a0 * v0 + a2 * v1 + a4;\n out[5] = a1 * v0 + a3 * v1 + a5;\n return out;\n};\n\n/**\n * Returns a string representation of a mat2d\n *\n * @param {mat2d} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\nmat2d.str = function (a) {\n return 'mat2d(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + \n a[3] + ', ' + a[4] + ', ' + a[5] + ')';\n};\n\n/**\n * Returns Frobenius norm of a mat2d\n *\n * @param {mat2d} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\nmat2d.frob = function (a) { \n return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + 1))\n}; \n\nif(typeof(exports) !== 'undefined') {\n exports.mat2d = mat2d;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 3x3 Matrix\n * @name mat3\n */\n\nvar mat3 = {};\n\n/**\n * Creates a new identity mat3\n *\n * @returns {mat3} a new 3x3 matrix\n */\nmat3.create = function() {\n var out = new GLMAT_ARRAY_TYPE(9);\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n};\n\n/**\n * Copies the upper-left 3x3 values into the given mat3.\n *\n * @param {mat3} out the receiving 3x3 matrix\n * @param {mat4} a the source 4x4 matrix\n * @returns {mat3} out\n */\nmat3.fromMat4 = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[4];\n out[4] = a[5];\n out[5] = a[6];\n out[6] = a[8];\n out[7] = a[9];\n out[8] = a[10];\n return out;\n};\n\n/**\n * Creates a new mat3 initialized with values from an existing matrix\n *\n * @param {mat3} a matrix to clone\n * @returns {mat3} a new 3x3 matrix\n */\nmat3.clone = function(a) {\n var out = new GLMAT_ARRAY_TYPE(9);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n};\n\n/**\n * Copy the values from one mat3 to another\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\nmat3.copy = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n};\n\n/**\n * Set a mat3 to the identity matrix\n *\n * @param {mat3} out the receiving matrix\n * @returns {mat3} out\n */\nmat3.identity = function(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n};\n\n/**\n * Transpose the values of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\nmat3.transpose = function(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1], a02 = a[2], a12 = a[5];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a01;\n out[5] = a[7];\n out[6] = a02;\n out[7] = a12;\n } else {\n out[0] = a[0];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a[1];\n out[4] = a[4];\n out[5] = a[7];\n out[6] = a[2];\n out[7] = a[5];\n out[8] = a[8];\n }\n \n return out;\n};\n\n/**\n * Inverts a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\nmat3.invert = function(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2],\n a10 = a[3], a11 = a[4], a12 = a[5],\n a20 = a[6], a21 = a[7], a22 = a[8],\n\n b01 = a22 * a11 - a12 * a21,\n b11 = -a22 * a10 + a12 * a20,\n b21 = a21 * a10 - a11 * a20,\n\n // Calculate the determinant\n det = a00 * b01 + a01 * b11 + a02 * b21;\n\n if (!det) { \n return null; \n }\n det = 1.0 / det;\n\n out[0] = b01 * det;\n out[1] = (-a22 * a01 + a02 * a21) * det;\n out[2] = (a12 * a01 - a02 * a11) * det;\n out[3] = b11 * det;\n out[4] = (a22 * a00 - a02 * a20) * det;\n out[5] = (-a12 * a00 + a02 * a10) * det;\n out[6] = b21 * det;\n out[7] = (-a21 * a00 + a01 * a20) * det;\n out[8] = (a11 * a00 - a01 * a10) * det;\n return out;\n};\n\n/**\n * Calculates the adjugate of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\nmat3.adjoint = function(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2],\n a10 = a[3], a11 = a[4], a12 = a[5],\n a20 = a[6], a21 = a[7], a22 = a[8];\n\n out[0] = (a11 * a22 - a12 * a21);\n out[1] = (a02 * a21 - a01 * a22);\n out[2] = (a01 * a12 - a02 * a11);\n out[3] = (a12 * a20 - a10 * a22);\n out[4] = (a00 * a22 - a02 * a20);\n out[5] = (a02 * a10 - a00 * a12);\n out[6] = (a10 * a21 - a11 * a20);\n out[7] = (a01 * a20 - a00 * a21);\n out[8] = (a00 * a11 - a01 * a10);\n return out;\n};\n\n/**\n * Calculates the determinant of a mat3\n *\n * @param {mat3} a the source matrix\n * @returns {Number} determinant of a\n */\nmat3.determinant = function (a) {\n var a00 = a[0], a01 = a[1], a02 = a[2],\n a10 = a[3], a11 = a[4], a12 = a[5],\n a20 = a[6], a21 = a[7], a22 = a[8];\n\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\n};\n\n/**\n * Multiplies two mat3's\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the first operand\n * @param {mat3} b the second operand\n * @returns {mat3} out\n */\nmat3.multiply = function (out, a, b) {\n var a00 = a[0], a01 = a[1], a02 = a[2],\n a10 = a[3], a11 = a[4], a12 = a[5],\n a20 = a[6], a21 = a[7], a22 = a[8],\n\n b00 = b[0], b01 = b[1], b02 = b[2],\n b10 = b[3], b11 = b[4], b12 = b[5],\n b20 = b[6], b21 = b[7], b22 = b[8];\n\n out[0] = b00 * a00 + b01 * a10 + b02 * a20;\n out[1] = b00 * a01 + b01 * a11 + b02 * a21;\n out[2] = b00 * a02 + b01 * a12 + b02 * a22;\n\n out[3] = b10 * a00 + b11 * a10 + b12 * a20;\n out[4] = b10 * a01 + b11 * a11 + b12 * a21;\n out[5] = b10 * a02 + b11 * a12 + b12 * a22;\n\n out[6] = b20 * a00 + b21 * a10 + b22 * a20;\n out[7] = b20 * a01 + b21 * a11 + b22 * a21;\n out[8] = b20 * a02 + b21 * a12 + b22 * a22;\n return out;\n};\n\n/**\n * Alias for {@link mat3.multiply}\n * @function\n */\nmat3.mul = mat3.multiply;\n\n/**\n * Translate a mat3 by the given vector\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the matrix to translate\n * @param {vec2} v vector to translate by\n * @returns {mat3} out\n */\nmat3.translate = function(out, a, v) {\n var a00 = a[0], a01 = a[1], a02 = a[2],\n a10 = a[3], a11 = a[4], a12 = a[5],\n a20 = a[6], a21 = a[7], a22 = a[8],\n x = v[0], y = v[1];\n\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n\n out[3] = a10;\n out[4] = a11;\n out[5] = a12;\n\n out[6] = x * a00 + y * a10 + a20;\n out[7] = x * a01 + y * a11 + a21;\n out[8] = x * a02 + y * a12 + a22;\n return out;\n};\n\n/**\n * Rotates a mat3 by the given angle\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat3} out\n */\nmat3.rotate = function (out, a, rad) {\n var a00 = a[0], a01 = a[1], a02 = a[2],\n a10 = a[3], a11 = a[4], a12 = a[5],\n a20 = a[6], a21 = a[7], a22 = a[8],\n\n s = Math.sin(rad),\n c = Math.cos(rad);\n\n out[0] = c * a00 + s * a10;\n out[1] = c * a01 + s * a11;\n out[2] = c * a02 + s * a12;\n\n out[3] = c * a10 - s * a00;\n out[4] = c * a11 - s * a01;\n out[5] = c * a12 - s * a02;\n\n out[6] = a20;\n out[7] = a21;\n out[8] = a22;\n return out;\n};\n\n/**\n * Scales the mat3 by the dimensions in the given vec2\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the matrix to rotate\n * @param {vec2} v the vec2 to scale the matrix by\n * @returns {mat3} out\n **/\nmat3.scale = function(out, a, v) {\n var x = v[0], y = v[1];\n\n out[0] = x * a[0];\n out[1] = x * a[1];\n out[2] = x * a[2];\n\n out[3] = y * a[3];\n out[4] = y * a[4];\n out[5] = y * a[5];\n\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n};\n\n/**\n * Copies the values from a mat2d into a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat2d} a the matrix to copy\n * @returns {mat3} out\n **/\nmat3.fromMat2d = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = 0;\n\n out[3] = a[2];\n out[4] = a[3];\n out[5] = 0;\n\n out[6] = a[4];\n out[7] = a[5];\n out[8] = 1;\n return out;\n};\n\n/**\n* Calculates a 3x3 matrix from the given quaternion\n*\n* @param {mat3} out mat3 receiving operation result\n* @param {quat} q Quaternion to create matrix from\n*\n* @returns {mat3} out\n*/\nmat3.fromQuat = function (out, q) {\n var x = q[0], y = q[1], z = q[2], w = q[3],\n x2 = x + x,\n y2 = y + y,\n z2 = z + z,\n\n xx = x * x2,\n yx = y * x2,\n yy = y * y2,\n zx = z * x2,\n zy = z * y2,\n zz = z * z2,\n wx = w * x2,\n wy = w * y2,\n wz = w * z2;\n\n out[0] = 1 - yy - zz;\n out[3] = yx - wz;\n out[6] = zx + wy;\n\n out[1] = yx + wz;\n out[4] = 1 - xx - zz;\n out[7] = zy - wx;\n\n out[2] = zx - wy;\n out[5] = zy + wx;\n out[8] = 1 - xx - yy;\n\n return out;\n};\n\n/**\n* Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix\n*\n* @param {mat3} out mat3 receiving operation result\n* @param {mat4} a Mat4 to derive the normal matrix from\n*\n* @returns {mat3} out\n*/\nmat3.normalFromMat4 = function (out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],\n\n b00 = a00 * a11 - a01 * a10,\n b01 = a00 * a12 - a02 * a10,\n b02 = a00 * a13 - a03 * a10,\n b03 = a01 * a12 - a02 * a11,\n b04 = a01 * a13 - a03 * a11,\n b05 = a02 * a13 - a03 * a12,\n b06 = a20 * a31 - a21 * a30,\n b07 = a20 * a32 - a22 * a30,\n b08 = a20 * a33 - a23 * a30,\n b09 = a21 * a32 - a22 * a31,\n b10 = a21 * a33 - a23 * a31,\n b11 = a22 * a33 - a23 * a32,\n\n // Calculate the determinant\n det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) { \n return null; \n }\n det = 1.0 / det;\n\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n\n return out;\n};\n\n/**\n * Returns a string representation of a mat3\n *\n * @param {mat3} mat matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\nmat3.str = function (a) {\n return 'mat3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + \n a[3] + ', ' + a[4] + ', ' + a[5] + ', ' + \n a[6] + ', ' + a[7] + ', ' + a[8] + ')';\n};\n\n/**\n * Returns Frobenius norm of a mat3\n *\n * @param {mat3} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\nmat3.frob = function (a) {\n return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2)))\n};\n\n\nif(typeof(exports) !== 'undefined') {\n exports.mat3 = mat3;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 4x4 Matrix\n * @name mat4\n */\n\nvar mat4 = {};\n\n/**\n * Creates a new identity mat4\n *\n * @returns {mat4} a new 4x4 matrix\n */\nmat4.create = function() {\n var out = new GLMAT_ARRAY_TYPE(16);\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n};\n\n/**\n * Creates a new mat4 initialized with values from an existing matrix\n *\n * @param {mat4} a matrix to clone\n * @returns {mat4} a new 4x4 matrix\n */\nmat4.clone = function(a) {\n var out = new GLMAT_ARRAY_TYPE(16);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n};\n\n/**\n * Copy the values from one mat4 to another\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\nmat4.copy = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n};\n\n/**\n * Set a mat4 to the identity matrix\n *\n * @param {mat4} out the receiving matrix\n * @returns {mat4} out\n */\nmat4.identity = function(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n};\n\n/**\n * Transpose the values of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\nmat4.transpose = function(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1], a02 = a[2], a03 = a[3],\n a12 = a[6], a13 = a[7],\n a23 = a[11];\n\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a01;\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a02;\n out[9] = a12;\n out[11] = a[14];\n out[12] = a03;\n out[13] = a13;\n out[14] = a23;\n } else {\n out[0] = a[0];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a[1];\n out[5] = a[5];\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a[2];\n out[9] = a[6];\n out[10] = a[10];\n out[11] = a[14];\n out[12] = a[3];\n out[13] = a[7];\n out[14] = a[11];\n out[15] = a[15];\n }\n \n return out;\n};\n\n/**\n * Inverts a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\nmat4.invert = function(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],\n\n b00 = a00 * a11 - a01 * a10,\n b01 = a00 * a12 - a02 * a10,\n b02 = a00 * a13 - a03 * a10,\n b03 = a01 * a12 - a02 * a11,\n b04 = a01 * a13 - a03 * a11,\n b05 = a02 * a13 - a03 * a12,\n b06 = a20 * a31 - a21 * a30,\n b07 = a20 * a32 - a22 * a30,\n b08 = a20 * a33 - a23 * a30,\n b09 = a21 * a32 - a22 * a31,\n b10 = a21 * a33 - a23 * a31,\n b11 = a22 * a33 - a23 * a32,\n\n // Calculate the determinant\n det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) { \n return null; \n }\n det = 1.0 / det;\n\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n\n return out;\n};\n\n/**\n * Calculates the adjugate of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\nmat4.adjoint = function(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n\n out[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));\n out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n out[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));\n out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n out[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));\n out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n out[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));\n out[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));\n out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n out[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));\n out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n out[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));\n out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n out[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));\n return out;\n};\n\n/**\n * Calculates the determinant of a mat4\n *\n * @param {mat4} a the source matrix\n * @returns {Number} determinant of a\n */\nmat4.determinant = function (a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],\n\n b00 = a00 * a11 - a01 * a10,\n b01 = a00 * a12 - a02 * a10,\n b02 = a00 * a13 - a03 * a10,\n b03 = a01 * a12 - a02 * a11,\n b04 = a01 * a13 - a03 * a11,\n b05 = a02 * a13 - a03 * a12,\n b06 = a20 * a31 - a21 * a30,\n b07 = a20 * a32 - a22 * a30,\n b08 = a20 * a33 - a23 * a30,\n b09 = a21 * a32 - a22 * a31,\n b10 = a21 * a33 - a23 * a31,\n b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n};\n\n/**\n * Multiplies two mat4's\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the first operand\n * @param {mat4} b the second operand\n * @returns {mat4} out\n */\nmat4.multiply = function (out, a, b) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n\n // Cache only the current line of the second matrix\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; \n out[0] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n out[1] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n out[2] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n out[3] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n\n b0 = b[4]; b1 = b[5]; b2 = b[6]; b3 = b[7];\n out[4] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n out[5] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n out[6] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n out[7] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n\n b0 = b[8]; b1 = b[9]; b2 = b[10]; b3 = b[11];\n out[8] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n out[9] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n out[10] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n out[11] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n\n b0 = b[12]; b1 = b[13]; b2 = b[14]; b3 = b[15];\n out[12] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n out[13] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n out[14] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n out[15] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n return out;\n};\n\n/**\n * Alias for {@link mat4.multiply}\n * @function\n */\nmat4.mul = mat4.multiply;\n\n/**\n * Translate a mat4 by the given vector\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to translate\n * @param {vec3} v vector to translate by\n * @returns {mat4} out\n */\nmat4.translate = function (out, a, v) {\n var x = v[0], y = v[1], z = v[2],\n a00, a01, a02, a03,\n a10, a11, a12, a13,\n a20, a21, a22, a23;\n\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n } else {\n a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];\n a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];\n a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];\n\n out[0] = a00; out[1] = a01; out[2] = a02; out[3] = a03;\n out[4] = a10; out[5] = a11; out[6] = a12; out[7] = a13;\n out[8] = a20; out[9] = a21; out[10] = a22; out[11] = a23;\n\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n\n return out;\n};\n\n/**\n * Scales the mat4 by the dimensions in the given vec3\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to scale\n * @param {vec3} v the vec3 to scale the matrix by\n * @returns {mat4} out\n **/\nmat4.scale = function(out, a, v) {\n var x = v[0], y = v[1], z = v[2];\n\n out[0] = a[0] * x;\n out[1] = a[1] * x;\n out[2] = a[2] * x;\n out[3] = a[3] * x;\n out[4] = a[4] * y;\n out[5] = a[5] * y;\n out[6] = a[6] * y;\n out[7] = a[7] * y;\n out[8] = a[8] * z;\n out[9] = a[9] * z;\n out[10] = a[10] * z;\n out[11] = a[11] * z;\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n};\n\n/**\n * Rotates a mat4 by the given angle\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @param {vec3} axis the axis to rotate around\n * @returns {mat4} out\n */\nmat4.rotate = function (out, a, rad, axis) {\n var x = axis[0], y = axis[1], z = axis[2],\n len = Math.sqrt(x * x + y * y + z * z),\n s, c, t,\n a00, a01, a02, a03,\n a10, a11, a12, a13,\n a20, a21, a22, a23,\n b00, b01, b02,\n b10, b11, b12,\n b20, b21, b22;\n\n if (Math.abs(len) < GLMAT_EPSILON) { return null; }\n \n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c;\n\n a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];\n a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];\n a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];\n\n // Construct the elements of the rotation matrix\n b00 = x * x * t + c; b01 = y * x * t + z * s; b02 = z * x * t - y * s;\n b10 = x * y * t - z * s; b11 = y * y * t + c; b12 = z * y * t + x * s;\n b20 = x * z * t + y * s; b21 = y * z * t - x * s; b22 = z * z * t + c;\n\n // Perform rotation-specific matrix multiplication\n out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n if (a !== out) { // If the source and destination differ, copy the unchanged last row\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n return out;\n};\n\n/**\n * Rotates a matrix by the given angle around the X axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nmat4.rotateX = function (out, a, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad),\n a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7],\n a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n\n if (a !== out) { // If the source and destination differ, copy the unchanged rows\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n // Perform axis-specific matrix multiplication\n out[4] = a10 * c + a20 * s;\n out[5] = a11 * c + a21 * s;\n out[6] = a12 * c + a22 * s;\n out[7] = a13 * c + a23 * s;\n out[8] = a20 * c - a10 * s;\n out[9] = a21 * c - a11 * s;\n out[10] = a22 * c - a12 * s;\n out[11] = a23 * c - a13 * s;\n return out;\n};\n\n/**\n * Rotates a matrix by the given angle around the Y axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nmat4.rotateY = function (out, a, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad),\n a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3],\n a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n\n if (a !== out) { // If the source and destination differ, copy the unchanged rows\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n // Perform axis-specific matrix multiplication\n out[0] = a00 * c - a20 * s;\n out[1] = a01 * c - a21 * s;\n out[2] = a02 * c - a22 * s;\n out[3] = a03 * c - a23 * s;\n out[8] = a00 * s + a20 * c;\n out[9] = a01 * s + a21 * c;\n out[10] = a02 * s + a22 * c;\n out[11] = a03 * s + a23 * c;\n return out;\n};\n\n/**\n * Rotates a matrix by the given angle around the Z axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nmat4.rotateZ = function (out, a, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad),\n a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3],\n a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n\n if (a !== out) { // If the source and destination differ, copy the unchanged last row\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n // Perform axis-specific matrix multiplication\n out[0] = a00 * c + a10 * s;\n out[1] = a01 * c + a11 * s;\n out[2] = a02 * c + a12 * s;\n out[3] = a03 * c + a13 * s;\n out[4] = a10 * c - a00 * s;\n out[5] = a11 * c - a01 * s;\n out[6] = a12 * c - a02 * s;\n out[7] = a13 * c - a03 * s;\n return out;\n};\n\n/**\n * Creates a matrix from a quaternion rotation and vector translation\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, vec);\n * var quatMat = mat4.create();\n * quat4.toMat4(quat, quatMat);\n * mat4.multiply(dest, quatMat);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {vec3} v Translation vector\n * @returns {mat4} out\n */\nmat4.fromRotationTranslation = function (out, q, v) {\n // Quaternion math\n var x = q[0], y = q[1], z = q[2], w = q[3],\n x2 = x + x,\n y2 = y + y,\n z2 = z + z,\n\n xx = x * x2,\n xy = x * y2,\n xz = x * z2,\n yy = y * y2,\n yz = y * z2,\n zz = z * z2,\n wx = w * x2,\n wy = w * y2,\n wz = w * z2;\n\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n \n return out;\n};\n\nmat4.fromQuat = function (out, q) {\n var x = q[0], y = q[1], z = q[2], w = q[3],\n x2 = x + x,\n y2 = y + y,\n z2 = z + z,\n\n xx = x * x2,\n yx = y * x2,\n yy = y * y2,\n zx = z * x2,\n zy = z * y2,\n zz = z * z2,\n wx = w * x2,\n wy = w * y2,\n wz = w * z2;\n\n out[0] = 1 - yy - zz;\n out[1] = yx + wz;\n out[2] = zx - wy;\n out[3] = 0;\n\n out[4] = yx - wz;\n out[5] = 1 - xx - zz;\n out[6] = zy + wx;\n out[7] = 0;\n\n out[8] = zx + wy;\n out[9] = zy - wx;\n out[10] = 1 - xx - yy;\n out[11] = 0;\n\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n\n return out;\n};\n\n/**\n * Generates a frustum matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {Number} left Left bound of the frustum\n * @param {Number} right Right bound of the frustum\n * @param {Number} bottom Bottom bound of the frustum\n * @param {Number} top Top bound of the frustum\n * @param {Number} near Near bound of the frustum\n * @param {Number} far Far bound of the frustum\n * @returns {mat4} out\n */\nmat4.frustum = function (out, left, right, bottom, top, near, far) {\n var rl = 1 / (right - left),\n tb = 1 / (top - bottom),\n nf = 1 / (near - far);\n out[0] = (near * 2) * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = (near * 2) * tb;\n out[6] = 0;\n out[7] = 0;\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = (far * near * 2) * nf;\n out[15] = 0;\n return out;\n};\n\n/**\n * Generates a perspective projection matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} fovy Vertical field of view in radians\n * @param {number} aspect Aspect ratio. typically viewport width/height\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\nmat4.perspective = function (out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2),\n nf = 1 / (near - far);\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = (2 * far * near) * nf;\n out[15] = 0;\n return out;\n};\n\n/**\n * Generates a orthogonal projection matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} left Left bound of the frustum\n * @param {number} right Right bound of the frustum\n * @param {number} bottom Bottom bound of the frustum\n * @param {number} top Top bound of the frustum\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\nmat4.ortho = function (out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right),\n bt = 1 / (bottom - top),\n nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n};\n\n/**\n * Generates a look-at matrix with the given eye position, focal point, and up axis\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {vec3} eye Position of the viewer\n * @param {vec3} center Point the viewer is looking at\n * @param {vec3} up vec3 pointing up\n * @returns {mat4} out\n */\nmat4.lookAt = function (out, eye, center, up) {\n var x0, x1, x2, y0, y1, y2, z0, z1, z2, len,\n eyex = eye[0],\n eyey = eye[1],\n eyez = eye[2],\n upx = up[0],\n upy = up[1],\n upz = up[2],\n centerx = center[0],\n centery = center[1],\n centerz = center[2];\n\n if (Math.abs(eyex - centerx) < GLMAT_EPSILON &&\n Math.abs(eyey - centery) < GLMAT_EPSILON &&\n Math.abs(eyez - centerz) < GLMAT_EPSILON) {\n return mat4.identity(out);\n }\n\n z0 = eyex - centerx;\n z1 = eyey - centery;\n z2 = eyez - centerz;\n\n len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n\n x0 = upy * z2 - upz * z1;\n x1 = upz * z0 - upx * z2;\n x2 = upx * z1 - upy * z0;\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\n if (!len) {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n } else {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n y0 = z1 * x2 - z2 * x1;\n y1 = z2 * x0 - z0 * x2;\n y2 = z0 * x1 - z1 * x0;\n\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\n if (!len) {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n } else {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n\n return out;\n};\n\n/**\n * Returns a string representation of a mat4\n *\n * @param {mat4} mat matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\nmat4.str = function (a) {\n return 'mat4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ', ' +\n a[4] + ', ' + a[5] + ', ' + a[6] + ', ' + a[7] + ', ' +\n a[8] + ', ' + a[9] + ', ' + a[10] + ', ' + a[11] + ', ' + \n a[12] + ', ' + a[13] + ', ' + a[14] + ', ' + a[15] + ')';\n};\n\n/**\n * Returns Frobenius norm of a mat4\n *\n * @param {mat4} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\nmat4.frob = function (a) {\n return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2) + Math.pow(a[9], 2) + Math.pow(a[10], 2) + Math.pow(a[11], 2) + Math.pow(a[12], 2) + Math.pow(a[13], 2) + Math.pow(a[14], 2) + Math.pow(a[15], 2) ))\n};\n\n\nif(typeof(exports) !== 'undefined') {\n exports.mat4 = mat4;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class Quaternion\n * @name quat\n */\n\nvar quat = {};\n\n/**\n * Creates a new identity quat\n *\n * @returns {quat} a new quaternion\n */\nquat.create = function() {\n var out = new GLMAT_ARRAY_TYPE(4);\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n};\n\n/**\n * Sets a quaternion to represent the shortest rotation from one\n * vector to another.\n *\n * Both vectors are assumed to be unit length.\n *\n * @param {quat} out the receiving quaternion.\n * @param {vec3} a the initial vector\n * @param {vec3} b the destination vector\n * @returns {quat} out\n */\nquat.rotationTo = (function() {\n var tmpvec3 = vec3.create();\n var xUnitVec3 = vec3.fromValues(1,0,0);\n var yUnitVec3 = vec3.fromValues(0,1,0);\n\n return function(out, a, b) {\n var dot = vec3.dot(a, b);\n if (dot < -0.999999) {\n vec3.cross(tmpvec3, xUnitVec3, a);\n if (vec3.length(tmpvec3) < 0.000001)\n vec3.cross(tmpvec3, yUnitVec3, a);\n vec3.normalize(tmpvec3, tmpvec3);\n quat.setAxisAngle(out, tmpvec3, Math.PI);\n return out;\n } else if (dot > 0.999999) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n } else {\n vec3.cross(tmpvec3, a, b);\n out[0] = tmpvec3[0];\n out[1] = tmpvec3[1];\n out[2] = tmpvec3[2];\n out[3] = 1 + dot;\n return quat.normalize(out, out);\n }\n };\n})();\n\n/**\n * Sets the specified quaternion with values corresponding to the given\n * axes. Each axis is a vec3 and is expected to be unit length and\n * perpendicular to all other specified axes.\n *\n * @param {vec3} view the vector representing the viewing direction\n * @param {vec3} right the vector representing the local \"right\" direction\n * @param {vec3} up the vector representing the local \"up\" direction\n * @returns {quat} out\n */\nquat.setAxes = (function() {\n var matr = mat3.create();\n\n return function(out, view, right, up) {\n matr[0] = right[0];\n matr[3] = right[1];\n matr[6] = right[2];\n\n matr[1] = up[0];\n matr[4] = up[1];\n matr[7] = up[2];\n\n matr[2] = -view[0];\n matr[5] = -view[1];\n matr[8] = -view[2];\n\n return quat.normalize(out, quat.fromMat3(out, matr));\n };\n})();\n\n/**\n * Creates a new quat initialized with values from an existing quaternion\n *\n * @param {quat} a quaternion to clone\n * @returns {quat} a new quaternion\n * @function\n */\nquat.clone = vec4.clone;\n\n/**\n * Creates a new quat initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} a new quaternion\n * @function\n */\nquat.fromValues = vec4.fromValues;\n\n/**\n * Copy the values from one quat to another\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the source quaternion\n * @returns {quat} out\n * @function\n */\nquat.copy = vec4.copy;\n\n/**\n * Set the components of a quat to the given values\n *\n * @param {quat} out the receiving quaternion\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} out\n * @function\n */\nquat.set = vec4.set;\n\n/**\n * Set a quat to the identity quaternion\n *\n * @param {quat} out the receiving quaternion\n * @returns {quat} out\n */\nquat.identity = function(out) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n};\n\n/**\n * Sets a quat from the given angle and rotation axis,\n * then returns it.\n *\n * @param {quat} out the receiving quaternion\n * @param {vec3} axis the axis around which to rotate\n * @param {Number} rad the angle in radians\n * @returns {quat} out\n **/\nquat.setAxisAngle = function(out, axis, rad) {\n rad = rad * 0.5;\n var s = Math.sin(rad);\n out[0] = s * axis[0];\n out[1] = s * axis[1];\n out[2] = s * axis[2];\n out[3] = Math.cos(rad);\n return out;\n};\n\n/**\n * Adds two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @returns {quat} out\n * @function\n */\nquat.add = vec4.add;\n\n/**\n * Multiplies two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @returns {quat} out\n */\nquat.multiply = function(out, a, b) {\n var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n bx = b[0], by = b[1], bz = b[2], bw = b[3];\n\n out[0] = ax * bw + aw * bx + ay * bz - az * by;\n out[1] = ay * bw + aw * by + az * bx - ax * bz;\n out[2] = az * bw + aw * bz + ax * by - ay * bx;\n out[3] = aw * bw - ax * bx - ay * by - az * bz;\n return out;\n};\n\n/**\n * Alias for {@link quat.multiply}\n * @function\n */\nquat.mul = quat.multiply;\n\n/**\n * Scales a quat by a scalar number\n *\n * @param {quat} out the receiving vector\n * @param {quat} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {quat} out\n * @function\n */\nquat.scale = vec4.scale;\n\n/**\n * Rotates a quaternion by the given angle about the X axis\n *\n * @param {quat} out quat receiving operation result\n * @param {quat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\nquat.rotateX = function (out, a, rad) {\n rad *= 0.5; \n\n var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n bx = Math.sin(rad), bw = Math.cos(rad);\n\n out[0] = ax * bw + aw * bx;\n out[1] = ay * bw + az * bx;\n out[2] = az * bw - ay * bx;\n out[3] = aw * bw - ax * bx;\n return out;\n};\n\n/**\n * Rotates a quaternion by the given angle about the Y axis\n *\n * @param {quat} out quat receiving operation result\n * @param {quat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\nquat.rotateY = function (out, a, rad) {\n rad *= 0.5; \n\n var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n by = Math.sin(rad), bw = Math.cos(rad);\n\n out[0] = ax * bw - az * by;\n out[1] = ay * bw + aw * by;\n out[2] = az * bw + ax * by;\n out[3] = aw * bw - ay * by;\n return out;\n};\n\n/**\n * Rotates a quaternion by the given angle about the Z axis\n *\n * @param {quat} out quat receiving operation result\n * @param {quat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\nquat.rotateZ = function (out, a, rad) {\n rad *= 0.5; \n\n var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n bz = Math.sin(rad), bw = Math.cos(rad);\n\n out[0] = ax * bw + ay * bz;\n out[1] = ay * bw - ax * bz;\n out[2] = az * bw + aw * bz;\n out[3] = aw * bw - az * bz;\n return out;\n};\n\n/**\n * Calculates the W component of a quat from the X, Y, and Z components.\n * Assumes that quaternion is 1 unit in length.\n * Any existing W component will be ignored.\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate W component of\n * @returns {quat} out\n */\nquat.calculateW = function (out, a) {\n var x = a[0], y = a[1], z = a[2];\n\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));\n return out;\n};\n\n/**\n * Calculates the dot product of two quat's\n *\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @returns {Number} dot product of a and b\n * @function\n */\nquat.dot = vec4.dot;\n\n/**\n * Performs a linear interpolation between two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {quat} out\n * @function\n */\nquat.lerp = vec4.lerp;\n\n/**\n * Performs a spherical linear interpolation between two quat\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {quat} out\n */\nquat.slerp = function (out, a, b, t) {\n // benchmarks:\n // http://jsperf.com/quaternion-slerp-implementations\n\n var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n bx = b[0], by = b[1], bz = b[2], bw = b[3];\n\n var omega, cosom, sinom, scale0, scale1;\n\n // calc cosine\n cosom = ax * bx + ay * by + az * bz + aw * bw;\n // adjust signs (if necessary)\n if ( cosom < 0.0 ) {\n cosom = -cosom;\n bx = - bx;\n by = - by;\n bz = - bz;\n bw = - bw;\n }\n // calculate coefficients\n if ( (1.0 - cosom) > 0.000001 ) {\n // standard case (slerp)\n omega = Math.acos(cosom);\n sinom = Math.sin(omega);\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n } else { \n // \"from\" and \"to\" quaternions are very close \n // ... so we can do a linear interpolation\n scale0 = 1.0 - t;\n scale1 = t;\n }\n // calculate final values\n out[0] = scale0 * ax + scale1 * bx;\n out[1] = scale0 * ay + scale1 * by;\n out[2] = scale0 * az + scale1 * bz;\n out[3] = scale0 * aw + scale1 * bw;\n \n return out;\n};\n\n/**\n * Calculates the inverse of a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate inverse of\n * @returns {quat} out\n */\nquat.invert = function(out, a) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n dot = a0*a0 + a1*a1 + a2*a2 + a3*a3,\n invDot = dot ? 1.0/dot : 0;\n \n // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\n\n out[0] = -a0*invDot;\n out[1] = -a1*invDot;\n out[2] = -a2*invDot;\n out[3] = a3*invDot;\n return out;\n};\n\n/**\n * Calculates the conjugate of a quat\n * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate conjugate of\n * @returns {quat} out\n */\nquat.conjugate = function (out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a[3];\n return out;\n};\n\n/**\n * Calculates the length of a quat\n *\n * @param {quat} a vector to calculate length of\n * @returns {Number} length of a\n * @function\n */\nquat.length = vec4.length;\n\n/**\n * Alias for {@link quat.length}\n * @function\n */\nquat.len = quat.length;\n\n/**\n * Calculates the squared length of a quat\n *\n * @param {quat} a vector to calculate squared length of\n * @returns {Number} squared length of a\n * @function\n */\nquat.squaredLength = vec4.squaredLength;\n\n/**\n * Alias for {@link quat.squaredLength}\n * @function\n */\nquat.sqrLen = quat.squaredLength;\n\n/**\n * Normalize a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quaternion to normalize\n * @returns {quat} out\n * @function\n */\nquat.normalize = vec4.normalize;\n\n/**\n * Creates a quaternion from the given 3x3 rotation matrix.\n *\n * NOTE: The resultant quaternion is not normalized, so you should be sure\n * to renormalize the quaternion yourself where necessary.\n *\n * @param {quat} out the receiving quaternion\n * @param {mat3} m rotation matrix\n * @returns {quat} out\n * @function\n */\nquat.fromMat3 = function(out, m) {\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n // article \"Quaternion Calculus and Fast Animation\".\n var fTrace = m[0] + m[4] + m[8];\n var fRoot;\n\n if ( fTrace > 0.0 ) {\n // |w| > 1/2, may as well choose w > 1/2\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\n out[3] = 0.5 * fRoot;\n fRoot = 0.5/fRoot; // 1/(4w)\n out[0] = (m[5]-m[7])*fRoot;\n out[1] = (m[6]-m[2])*fRoot;\n out[2] = (m[1]-m[3])*fRoot;\n } else {\n // |w| <= 1/2\n var i = 0;\n if ( m[4] > m[0] )\n i = 1;\n if ( m[8] > m[i*3+i] )\n i = 2;\n var j = (i+1)%3;\n var k = (i+2)%3;\n \n fRoot = Math.sqrt(m[i*3+i]-m[j*3+j]-m[k*3+k] + 1.0);\n out[i] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot;\n out[3] = (m[j*3+k] - m[k*3+j]) * fRoot;\n out[j] = (m[j*3+i] + m[i*3+j]) * fRoot;\n out[k] = (m[k*3+i] + m[i*3+k]) * fRoot;\n }\n \n return out;\n};\n\n/**\n * Returns a string representation of a quatenion\n *\n * @param {quat} vec vector to represent as a string\n * @returns {String} string representation of the vector\n */\nquat.str = function (a) {\n return 'quat(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';\n};\n\nif(typeof(exports) !== 'undefined') {\n exports.quat = quat;\n}\n;\n\n\n\n\n\n\n\n\n\n\n\n\n\n })(shim.exports);\n})(this);\n","\"use strict\";\n\n\nvar glm = require(\"./gl-matrix\");\nvar elements = require(\"./elements\");\nvar consts = require(\"./const\");\n\nfunction clamp(min, max, value) {\n return Math.min(max, Math.max(min, value));\n}\n\n\nvar newView = module.exports.new = function() {\n return {\n aspect: 1.0,\n zoom: 0.125,\n translation: {\n x: 0.0,\n y: 0.0\n },\n atomScale: 0.6,\n relativeAtomScale: 1.0,\n bondScale: 0.5,\n rotation: glm.mat4.create(),\n ao: 0.75,\n aoRes: 256,\n brightness: 0.5,\n outline: 0.0,\n spf: 32,\n bonds: false,\n bondThreshold: 1.2,\n bondShade: 0.5,\n atomShade: 0.5,\n resolution: 768,\n dofStrength: 0.0,\n dofPosition: 0.5,\n fxaa: 1\n };\n};\n\n\nvar center = module.exports.center = function(v, system) {\n var maxX = -Infinity;\n var minX = Infinity;\n var maxY = -Infinity;\n var minY = Infinity;\n for(var i = 0; i < system.atoms.length; i++) {\n var a = system.atoms[i];\n var r = elements[a.symbol].radius;\n r = 2.5 * v.atomScale * (1 + (r - 1) * v.relativeAtomScale);\n var p = glm.vec4.fromValues(a.x, a.y, a.z, 0);\n glm.vec4.transformMat4(p, p, v.rotation);\n maxX = Math.max(maxX, p[0] + r);\n minX = Math.min(minX, p[0] - r);\n maxY = Math.max(maxY, p[1] + r);\n minY = Math.min(minY, p[1] - r);\n }\n var cx = minX + (maxX - minX) / 2.0;\n var cy = minY + (maxY - minY) / 2.0;\n v.translation.x = cx;\n v.translation.y = cy;\n var scale = Math.max(maxX - minX, maxY - minY);\n v.zoom = 1/(scale * 1.01);\n};\n\n\nvar override = module.exports.override = function(v, data) {\n for (var key in data) {\n v[key] = data[key];\n }\n resolve(v);\n};\n\n\nvar clone = module.exports.clone = function(v) {\n return deserialize(serialize(v));\n};\n\n\nvar serialize = module.exports.serialize = function(v) {\n return JSON.stringify(v);\n};\n\n\nvar deserialize = module.exports.deserialize = function(v) {\n v = JSON.parse(v);\n v.rotation = glm.mat4.clone(v.rotation);\n return v;\n};\n\n\nvar resolve = module.exports.resolve = function(v) {\n v.dofStrength = clamp(0, 1, v.dofStrength);\n v.dofPosition = clamp(0, 1, v.dofPosition);\n v.zoom = clamp(0.001, 2.0, v.zoom);\n v.atomScale = clamp(0, 1, v.atomScale);\n v.relativeAtomScale = clamp(0, 1, v.relativeAtomScale);\n v.bondScale = clamp(0, 1, v.bondScale);\n v.bondShade = clamp(0, 1, v.bondShade);\n v.atomShade = clamp(0, 1, v.atomShade);\n v.ao = clamp(0, 1, v.ao);\n v.brightness = clamp(0, 1, v.brightness);\n v.outline = clamp(0, 1, v.outline);\n};\n\n\nvar translate = module.exports.translate = function(v, dx, dy) {\n v.translation.x -= dx/(v.resolution * v.zoom);\n v.translation.y += dy/(v.resolution * v.zoom);\n resolve(v);\n};\n\n\nvar rotate = module.exports.rotate = function(v, dx, dy) {\n var m = glm.mat4.create();\n glm.mat4.rotateY(m, m, dx * 0.005);\n glm.mat4.rotateX(m, m, dy * 0.005);\n glm.mat4.multiply(v.rotation, m, v.rotation);\n const ao = v.ao; \n v.ao = 0; \n resolve(v);\n v.ao = ao;\n};\n\n\nvar getRect = module.exports.getRect = function(v) {\n var width = 1.0/v.zoom;\n var height = width/v.aspect;\n var bottom = -height/2 + v.translation.y;\n var top = height/2 + v.translation.y;\n var left = -width/2 + v.translation.x;\n var right = width/2 + v.translation.x;\n return {\n bottom: bottom,\n top: top,\n left: left,\n right: right\n };\n};\n\n\nvar getBondRadius = module.exports.getBondRadius = function(v) {\n return v.bondScale * v.atomScale * \n (1 + (consts.MIN_ATOM_RADIUS - 1) * v.relativeAtomScale);\n};\n\n\n","import _has from './_has.js';\n\nvar toString = Object.prototype.toString;\nvar _isArguments = /*#__PURE__*/function () {\n return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {\n return toString.call(x) === '[object Arguments]';\n } : function _isArguments(x) {\n return _has('callee', x);\n };\n}();\n\nexport default _isArguments;","import _curry1 from './internal/_curry1.js';\nimport _has from './internal/_has.js';\nimport _isArguments from './internal/_isArguments.js';\n\n// cover IE < 9 keys issues\nvar hasEnumBug = ! /*#__PURE__*/{ toString: null }.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n// Safari bug\nvar hasArgsEnumBug = /*#__PURE__*/function () {\n 'use strict';\n\n return arguments.propertyIsEnumerable('length');\n}();\n\nvar contains = function contains(list, item) {\n var idx = 0;\n while (idx < list.length) {\n if (list[idx] === item) {\n return true;\n }\n idx += 1;\n }\n return false;\n};\n\n/**\n * Returns a list containing the names of all the enumerable own properties of\n * the supplied object.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own properties.\n * @see R.keysIn, R.values\n * @example\n *\n * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']\n */\nvar keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? /*#__PURE__*/_curry1(function keys(obj) {\n return Object(obj) !== obj ? [] : Object.keys(obj);\n}) : /*#__PURE__*/_curry1(function keys(obj) {\n if (Object(obj) !== obj) {\n return [];\n }\n var prop, nIdx;\n var ks = [];\n var checkArgsLength = hasArgsEnumBug && _isArguments(obj);\n for (prop in obj) {\n if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {\n ks[ks.length] = prop;\n }\n }\n if (hasEnumBug) {\n nIdx = nonEnumerableProps.length - 1;\n while (nIdx >= 0) {\n prop = nonEnumerableProps[nIdx];\n if (_has(prop, obj) && !contains(ks, prop)) {\n ks[ks.length] = prop;\n }\n nIdx -= 1;\n }\n }\n return ks;\n});\nexport default keys;","import _curry1 from './internal/_curry1.js';\n\n/**\n * Gives a single-word string description of the (native) type of a value,\n * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not\n * attempt to distinguish user Object types any further, reporting them all as\n * 'Object'.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Type\n * @sig (* -> {*}) -> String\n * @param {*} val The value to test\n * @return {String}\n * @example\n *\n * R.type({}); //=> \"Object\"\n * R.type(1); //=> \"Number\"\n * R.type(false); //=> \"Boolean\"\n * R.type('s'); //=> \"String\"\n * R.type(null); //=> \"Null\"\n * R.type([]); //=> \"Array\"\n * R.type(/[A-z]/); //=> \"RegExp\"\n * R.type(() => {}); //=> \"Function\"\n * R.type(undefined); //=> \"Undefined\"\n */\nvar type = /*#__PURE__*/_curry1(function type(val) {\n return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);\n});\nexport default type;","import _curry1 from './_curry1.js';\nimport _isPlaceholder from './_isPlaceholder.js';\n\n/**\n * Optimized internal two-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry2(fn) {\n return function f2(a, b) {\n switch (arguments.length) {\n case 0:\n return f2;\n case 1:\n return _isPlaceholder(a) ? f2 : _curry1(function (_b) {\n return fn(a, _b);\n });\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b);\n }) : fn(a, b);\n }\n };\n}","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\n\nconst RealAlignmentChart = lazy(LazyLoader.alignmentChart);\n\n/**\n * The Alignment Chart (MSA) component is used to align multiple genomic\n * or proteomic sequences from a FASTA or Clustal file. Among its\n * extensive set of features, the multiple sequence alignment chart\n * can display multiple subplots showing gap and conservation info,\n * alongside industry standard colorscale support and consensus sequence.\n * No matter what size your alignment is, Alignment Chart is able to display\n * your genes or proteins snappily thanks to the underlying WebGL architecture\n * powering the component. You can quickly scroll through your long sequence\n * with a slider or a heatmap overview.\n * Read more about the component here:\n * https://github.com/plotly/react-alignment-viewer\n */\nexport default class AlignmentChart extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nAlignmentChart.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * Dash-assigned callback that should be called whenever any of the\n * properties change.\n */\n setProps: PropTypes.func,\n\n /**\n * A Dash prop that returns data on clicking, hovering or resizing the viewer.\n */\n eventDatum: PropTypes.string,\n\n /**\n * Input data, either in FASTA or Clustal format.\n */\n data: PropTypes.string,\n\n /**\n *Format type of the input data, either in FASTA or Clustal.\n */\n extension: PropTypes.string,\n\n /**\n * Colorscale in 'buried', 'cinema', 'clustal', 'clustal2', 'helix', 'hydrophobicity'\n * 'lesk', 'mae', 'nucleotide', 'purine', 'strand', 'taylor', 'turn', 'zappo',\n * or your own colorscale as a {'nucleotide': COLOR} dict.\n * Note that this is NOT a standard plotly colorscale.\n */\n colorscale: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n\n /**\n * Opacity of the main plot as a value between 0 and 1.\n */\n opacity: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Color of the nucleotide labels, in common name, hex, rgb or rgba format.\n * If left blank, handled by the colorscale automatically.\n */\n textcolor: PropTypes.string,\n\n /**\n * Size of the nucleotide labels, as a number.\n */\n textsize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Toggles displaying sequence labels at left of alignment\n */\n showlabel: PropTypes.bool,\n\n /**\n * Toggles displaying sequence IDs at left of alignment.\n */\n showid: PropTypes.bool,\n\n /**\n * Enables the display of conservation secondary barplot where the most conserved\n * nucleotides or amino acids get greater bars.\n */\n showconservation: PropTypes.bool,\n\n /**\n * Color of the conservation secondary barplot, in common name, hex, rgb or rgba format.\n */\n conservationcolor: PropTypes.string,\n\n /**\n * Colorscale of the conservation barplot, in Plotly colorscales (e.g. 'Viridis')\n * or as custom Plotly colorscale under a list format.\n * Note that this conservationcolorscale argument\n * does NOT follow the same format as the colorscale argument.\n */\n conservationcolorscale: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.array,\n ]),\n\n /**\n * Opacity of the conservation secondary barplot as a value between 0 and 1.\n */\n conservationopacity: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string,\n ]),\n\n /**\n * Whether to use most conserved ratio (MLE) 'conservation'\n * or normalized entropy 'entropy' to determine conservation,\n * which is a value between 0 and 1 where 1 is most conserved.\n */\n conservationmethod: PropTypes.oneOf(['conservation', 'entropy']),\n\n /**\n * Whether to normalize the conservation barchart\n * By multiplying it elementwise with the gap barchart, as to\n * lower the conservation values across sequences regions with many gaps.\n */\n correctgap: PropTypes.bool,\n\n /**\n * Enables the display of gap secondary barplot where the sequence regions\n * with the fewest gaps get the greatest bars.\n */\n showgap: PropTypes.bool,\n\n /**\n * Color of the gap secondary barplot, in common name, hex, rgb or rgba format.\n */\n gapcolor: PropTypes.string,\n\n /**\n * Colorscale of the gap barplot, in Plotly colorscales (e.g. 'Viridis')\n * or as custom Plotly colorscale under a list format.\n * Note that this conservationcolorscale argument\n * does NOT follow the same format as the colorscale argument.\n */\n gapcolorscale: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),\n\n /**\n * Opacity of the gap secondary barplot as a value between 0 and 1.\n */\n gapopacity: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If both conservation and gap are enabled,\n * toggles whether to group bars or to stack them as separate subplots.\n * No effect if not both gap and conservation are shown.\n */\n groupbars: PropTypes.bool,\n\n /**\n * Displays toggling the consensus sequence, where each nucleotide in the\n * consensus sequence is the argmax of its distribution at a set nucleotide.\n */\n showconsensus: PropTypes.bool,\n\n /**\n * Sets how many pixels each nucleotide/amino acid on the Alignment Chart\n * takes up horizontally. The total number of tiles (numtiles) seen\n * horizontally is automatically determined by rounding\n * the Viewer width divided by the tile width.\n * the Viewwer width divided by the tile witdth.\n */\n tilewidth: PropTypes.number,\n\n /**\n * Sets how many pixels each nucleotide/amino acid on the Alignment Chart\n * takes up vertically.\n * If enabled, set height dynamically.\n */\n tileheight: PropTypes.number,\n\n /**\n * Toggles whether the overview should be a heatmap, a slider, or none.\n */\n overview: PropTypes.oneOf(['heatmap', 'slider', 'none']),\n\n /**\n * Sets how many tiles to display across horitontally. If enabled,\n * overrides tilewidth and sets the amount of tiles directly based off\n * that value.\n */\n numtiles: PropTypes.number,\n\n /**\n * If overview is set to 'scroll', determines how many tiles to skip\n * with each slider movement.\n * Has no effect if scroll is not enabled (such as with overview or none).\n */\n scrollskip: PropTypes.number,\n\n /**\n * Determines where to start annotating the first tile.\n * If let blank will be automatically determined by Plotly.\n * Equivalent to Plotly's tick0 property.\n * Does not function if overview mode 'slider' is applied. (Current bug)\n */\n tickstart: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Determines at what interval to keep annotating the tiles.\n * If left blank will be automatially determined by Plotly.\n * Equivalent to Plotly's dtick property.\n * Does not function if overview mode 'slider' is applied. (Current bug)\n */\n ticksteps: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Width of the Viewer.\n * Property takes precedence over tileswidth and numtiles\n * if either of them is set.\n */\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Width of the Viewer.\n * Property takes precedence over tilesheight if both\n * are set.\n */\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Sequences ids to display\n */\n sequenceIds: PropTypes.array,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n\nAlignmentChart.defaultProps = {\n // Data\n extension: 'fasta',\n colorscale: 'clustal2',\n opacity: null,\n textcolor: null,\n textsize: 10,\n showlabel: true,\n showid: true,\n showconservation: true,\n conservationcolor: null,\n conservationcolorscale: 'Viridis',\n conservationopacity: null,\n conservationmethod: 'entropy',\n correctgap: true,\n showgap: true,\n gapcolor: 'grey',\n gapcolorscale: null,\n gapopacity: null,\n groupbars: false,\n showconsensus: true,\n // Layout\n tilewidth: 16,\n tileheight: 16,\n numtiles: null,\n overview: 'heatmap',\n scrollskip: 10,\n tickstart: 1,\n ticksteps: 6,\n // Other\n width: null,\n height: null,\n sequenceIds: null,\n};\n\nexport const propTypes = AlignmentChart.propTypes;\nexport const defaultProps = AlignmentChart.defaultProps;\n","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\n\nconst RealCircos = lazy(LazyLoader.circos);\n\n/**\n * Dash Circos is a library used to analyze and interpret\n * data using a circular layout, based on the popular\n * 'Circos' graph. This Dash Bio component is a useful tool\n * for showcasing relationships between data/datasets in an\n * attractive, circular layout to highlight feature\n * interactions and relationships.\n */\nexport default class Circos extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nCircos.defaultProps = {\n config: {},\n size: 800,\n tracks: [],\n};\n\nCircos.propTypes = {\n /**\n * Allow for an SVG snapshot of the Circos graph to be downloaded.\n **/\n enableDownloadSVG: PropTypes.bool,\n\n /**\n * Allow for zooming and panning the Circos graph.\n **/\n enableZoomPan: PropTypes.bool,\n\n /**\n * The ID of the component to be used in Dash callbacks.\n */\n id: PropTypes.string,\n\n /**\n * The CSS styling of the div wrapping the component.\n */\n style: PropTypes.object,\n\n /**\n * A Dash prop that returns data on clicking or hovering of the tracks,\n * depending on what is specified for prop \"selectEvent\".\n */\n eventDatum: PropTypes.object,\n\n /**\n * A dictionary used to choose whether tracks should return\n * data on click, hover, or both, with the dash prop \"eventDatum\".\n * The keys of the dictionary represent the index of the list\n * specified for \"tracks\".\n * Ex:\n * selectEvent={\n \"0\": \"hover\",\n \"1\": \"click\",\n \"2\": \"both\"\n },\n */\n selectEvent: PropTypes.object,\n\n /**\n * Dash provided setProps.\n */\n setProps: PropTypes.func,\n\n /**\n * Data used to draw Circos layout blocks.\n */\n layout: PropTypes.arrayOf(\n PropTypes.shape({\n /**\n * The length of the block.\n */\n len: PropTypes.number.isRequired,\n\n /**\n * The color of the block.\n */\n color: PropTypes.string.isRequired,\n\n /**\n * The labels of the block.\n */\n label: PropTypes.string.isRequired,\n\n /**\n * The id of the block.\n */\n id: PropTypes.string.isRequired,\n })\n ).isRequired,\n\n /**\n * Configuration options for the graph layout.\n */\n config: PropTypes.shape({\n innerRadius: PropTypes.number,\n outerRadius: PropTypes.number,\n cornerRadius: PropTypes.number,\n gap: PropTypes.number,\n labels: PropTypes.shape({\n display: PropTypes.bool,\n size: PropTypes.number,\n color: PropTypes.string,\n radialOffset: PropTypes.number,\n }),\n ticks: PropTypes.shape({\n display: PropTypes.bool,\n color: PropTypes.string,\n spacing: PropTypes.number,\n labels: PropTypes.bool,\n labelSpacing: PropTypes.number,\n labelSuffix: PropTypes.string,\n labelDenominator: PropTypes.number,\n labelDisplay0: PropTypes.bool,\n labelSize: PropTypes.number,\n labelColor: PropTypes.string,\n labelFont: PropTypes.string,\n majorSpacing: PropTypes.number,\n size: PropTypes.shape({\n minor: PropTypes.number,\n major: PropTypes.number,\n }),\n }),\n }),\n\n /**\n * The overall size of the SVG container holding the\n * graph. Set on initilization and unchangeable thereafter.\n */\n size: PropTypes.number,\n\n /**\n * A list of tracks displayed on top of the base Circos layout.\n */\n tracks: PropTypes.arrayOf(\n PropTypes.shape({\n /**\n * The id of the track.\n */\n id: PropTypes.string,\n\n /**\n * The data that makes up the track, passed as a list of dicts with different keys depending on the track type.\n * See the docs section about a given track type to learn more about the required data format.\n */\n data: PropTypes.arrayOf(PropTypes.object),\n\n /**\n * The track configuration. Depending on the track type it will be a dict with different keys.\n * See the docs section about a given track type to learn more about available configuration options.\n */\n config: PropTypes.object,\n\n /**\n * The type of the track.\n **/\n type: PropTypes.oneOf([\n 'CHORDS',\n 'HEATMAP',\n 'HIGHLIGHT',\n 'HISTOGRAM',\n 'LINE',\n 'SCATTER',\n 'STACK',\n 'TEXT',\n ]),\n })\n ),\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n\nexport const propTypes = Circos.propTypes;\nexport const defaultProps = Circos.defaultProps;\n","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\n\nconst RealIdeogram = lazy(LazyLoader.ideogram);\n\n/**\n * The Ideogram component is used to draw and animate genome-wide\n * datasets for organisms such as human, mouse, and any other\n * eukaryote. The Ideogram component can be used to compare\n * homologous features between chromosomes, and depict\n * haploid, diploid, aneuploid genomes. It can also display\n * annotations on genomic data using histograms and overlays.\n *\n * Reference: https://eweitz.github.io/ideogram/\n * Component's props: https://github.com/eweitz/ideogram/blob/master/api.md\n */\n\nexport default class Ideogram extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nIdeogram.defaultProps = {\n organism: 'human',\n dataDir: 'https://unpkg.com/ideogram@1.5.0/dist/data/bands/native/',\n annotationsColor: '#F00',\n annotationsLayout: 'tracks',\n barWidth: 3,\n chrHeight: 400,\n chrMargin: 10,\n chrWidth: 10,\n ploidy: 1,\n rotatable: true,\n showBandLabels: false,\n showChromosomeLabels: true,\n showAnnotTooltip: true,\n showFullyBanded: true,\n showNonNuclearChromosomes: false,\n};\n\nIdeogram.propTypes = {\n /**\n * The ID used to identify this component in Dash callbacks and used to identify Ideogram\n * instances.\n */\n id: PropTypes.string.isRequired,\n\n /**\n * The component's inline styles\n */\n style: PropTypes.object,\n\n /**\n * Dash specific prop type connecting event handlers to front end.\n */\n setProps: PropTypes.func,\n\n /**\n * The CSS class of the component wrapper\n */\n className: PropTypes.string,\n\n /**\n * Layout of ideogram annotations.\n * One of \"tracks\", \"histogram\", or \"overlay\".\n *\n * \"tracks\": display annotations in tracks beside each chromosome.\n *\n * \"histogram\": display annotations in a histogram. Clusters annotations by location. Each\n * cluster/bin is shown as a bar, the height of which represents the number of annotations on\n * genomic range.\n *\n * \"overlay\": display annotations directly over chromosomes.\n */\n annotationsLayout: PropTypes.oneOf(['tracks', 'histogram', 'overlay']),\n\n /**\n * A list of annotation objects. Annotation objects can also have a name, color, shape, and\n * track index. At the moment there is more keys specified and the docs need updating.\n */\n annotations: PropTypes.arrayOf(\n PropTypes.shape({\n name: PropTypes.string,\n chr: PropTypes.string,\n start: PropTypes.number,\n stop: PropTypes.number,\n })\n ),\n\n /**\n * An absolute or relative URL directing to a JSON file containing annotation objects (JSON).\n */\n annotationsPath: PropTypes.string,\n\n /**\n * Use this prop in a dash callback to return annotationData when hovered.\n * It is read-only, i.e., it cannot be used with dash.dependencies.Output but only with\n * dash.dependencies.Input\n */\n annotationsData: PropTypes.string,\n\n /**\n * A list of objects with metadata for each track, e.g., id, display name, color, shape.\n */\n annotationTracks: PropTypes.arrayOf(PropTypes.object),\n\n /**\n * Not used if annotationsLayout is set to \"overlay\".\n * The height of histogram bars or the size of annotations tracks symbols\n */\n annotationHeight: PropTypes.number,\n\n /**\n * Color of annotations.\n */\n annotationsColor: PropTypes.string,\n\n /**\n * Scaling of histogram bars height\n * Only used if annotationsLayout is set to \"histogram\".\n * One of \"absolute\" or \"relative\".\n *\n * \"absolute\": sets bar height relative to tallest bar in all chromosomes.\n * \"relative\": sets bar height relative to tallest bar in each chromosome.\n */\n histogramScaling: PropTypes.oneOf(['absolute', 'relative']),\n\n /**\n * Pixel width of histogram bars.\n * Only used if annotationsLayout is set to \"histogram\".\n **/\n barWidth: PropTypes.number,\n\n /**\n * Whether to show a tooltip upon mousing over an annotation.\n */\n showAnnotTooltip: PropTypes.bool,\n\n /**\n * Default: latest RefSeq assembly for specified organism.\n * The genome assembly to display.\n * Takes assembly name (e.g., \"GRCh37\"),\n * RefSeq accession (e.g., \"GCF_000306695.2\"),\n * or GenBank accession (e.g., \"GCA_000005005.5\")\n */\n assembly: PropTypes.string,\n\n /**\n * Genomic coordinate range (e.g., \"chr1:104325484-119977655\") for a brush on a\n * chromosome. Useful when ideogram consists of one chromosome and you want to be\n * able to focus on a region within that chromosome,\n * and create an interactive sliding window to other regions\n */\n\n brush: PropTypes.string,\n\n /**\n * A dash callback that is activated when the 'brush' prop is used.\n * It will return an dictionary like so:\n * {'start': , 'end': , 'extent': }\n * where start is the left most edge, end is right most edge, and extent is the total width of\n * the brush.\n * It is read-only, i.e., it cannot be used with dash.dependencies.Output but only with\n * dash.dependencies.Input\n */\n brushData: PropTypes.shape({\n start: PropTypes.string,\n end: PropTypes.string,\n extent: PropTypes.string,\n }),\n\n /**\n * CSS styling and the id of the container holding the Ideogram in\n * react-ideogram.js, this is where all the d3 magic happens.\n */\n container: PropTypes.string,\n\n /**\n * The pixel height of the tallest chromosome in the ideogram\n */\n chrHeight: PropTypes.number,\n\n /**\n * The pixel space of margin between each chromosome.\n */\n chrMargin: PropTypes.number,\n\n /**\n * The pixel width of each chromosome.\n */\n chrWidth: PropTypes.number,\n\n /**\n * A list of the names of chromosomes to display. Useful for depicting a subset of the\n * chromosomes in the genome, e.g., a single chromosome.\n *\n * If Homology (between two different species):\n * Ex: chromosomes={\n * 'human': ['1'],\n * 'mouse': ['4']\n * }\n *\n * General case to specify specific chromosomes:\n * Ex: chromosomes=['1', '2']\n */\n chromosomes: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.string),\n PropTypes.object,\n ]),\n\n /**\n * Absolute or relative URL of the directory containing data needed to draw banded chromosomes.\n * You will need to set up your own database to grab data from a custom database.\n */\n dataDir: PropTypes.string,\n\n /**\n * Organism(s) to show chromosomes for. Supply organism's name as a string (e.g., \"human\") or\n * organism's NCBI Taxonomy ID (taxid, e.g., 9606) to display chromosomes from a single\n * organism, or an array of organisms' names or taxids to display chromosomes from multiple\n * species.\n */\n organism: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * Provide local JSON organism into this prop from a local user JSON file.\n * DataDir must not be initialized.\n */\n localOrganism: PropTypes.object,\n\n /**\n * Used to compare two chromosomes.\n * The keys \"chrOne\" and \"chrTwo\" represent one chromosome each. Organism is the taxID or name.\n * Start is an array, containing start one and start two, in this order. Stop is an array,\n * containing stop one, and stop two, in this order.\n * Ex: homology={\n * \"chrOne\": {\n * organism\": \"9606\",\n * \"start\": [50000, 155701383],\n * \"stop\": [900000, 156030895]\n * },\n * \"chrTwo\": {\n * organism\": \"10090\",\n * \"start\": [10001, 50000000],\n * \"stop\": [2781479, 57217415]\n * }\n * }\n */\n homology: PropTypes.shape({\n chrOne: PropTypes.shape({\n organism: PropTypes.string.isRequired,\n start: PropTypes.arrayOf(PropTypes.number.isRequired),\n stop: PropTypes.arrayOf(PropTypes.number.isRequired),\n }),\n chrTwo: PropTypes.shape({\n organism: PropTypes.string.isRequired,\n start: PropTypes.arrayOf(PropTypes.number.isRequired),\n stop: PropTypes.arrayOf(PropTypes.number.isRequired),\n }),\n }),\n\n /**\n * Use perspective: 'comparative' to enable annotations between two chromosomes,\n * either within the same organism or different organisms. Used for homology.\n */\n perspective: PropTypes.oneOf(['comparative']),\n\n /**\n * Whether to include abbreviation species name in chromosome label. Used for homology.\n */\n fullChromosomeLabels: PropTypes.bool,\n\n /**\n * The resolution of cytogenetic bands to show for each chromosome.\n * The quantity refers to an approximate value in bands per haploid set (bphs).\n * One of 450, 550, or 850.\n */\n resolution: PropTypes.number,\n\n /**\n * Whether annotations should be filterable or not.\n */\n filterable: PropTypes.bool,\n\n /**\n * The orientation of chromosomes on the page.\n */\n orientation: PropTypes.oneOf(['vertical', 'horizontal']),\n\n /**\n * The ploidy - number of chromosomes to depict for each chromosome set.\n */\n ploidy: PropTypes.number,\n\n /**\n * Description of ploidy in each chromosome set in terms of ancestry composition.\n */\n ploidyDesc: PropTypes.arrayOf(PropTypes.object),\n\n /**\n * A map associating ancestor labels to colors. Used to color\n * chromosomes from different ancestors in polyploid genomes.\n */\n ancestors: PropTypes.object,\n\n /**\n * List of objects describing segments of recombination among chromosomes in a chromosome set.\n */\n rangeSet: PropTypes.arrayOf(PropTypes.object),\n\n /**\n * Whether chromosomes are rotatable on click.\n */\n rotatable: PropTypes.bool,\n\n /**\n * Dash callback that returns true if rotated, and false if not.\n *\n */\n rotated: PropTypes.bool,\n\n /**\n * Useful for omitting chromosome Y in female animals.\n * Currently only supported for organisms that use XY sex-determination.\n */\n sex: PropTypes.oneOf(['male', 'female']),\n\n /**\n * Whether to show chromosome labels, e.g., 1, 2, 3, X, Y.\n */\n showChromosomeLabels: PropTypes.bool,\n\n /**\n * Whether to show cytogenetic band labels, e.g., 1q21.\n **/\n showBandLabels: PropTypes.bool,\n\n /**\n * Whether to show fully banded chromosomes for genomes that have sufficient data. Useful for\n * showing simpler chromosomes of cytogenetically well-characterized organisms, e.g., human,\n * beside chromosomes of less studied organisms, e.g., chimpanzee.\n */\n showFullyBanded: PropTypes.bool,\n\n /**\n * Whether to show non-nuclear chromosomes,\n * e.g., for mitochondrial (MT) and chloroplast (CP) DNA.\n */\n showNonNuclearChromosomes: PropTypes.bool,\n\n /**\n * Callback function to invoke after chromosome has rotated. (React)\n * onDidRotate: PropTypes.func,\n */\n\n /**\n * Dash event callback for hovering over data.\n * onMouseOver: PropTypes.func,\n */\n\n /**\n * Callback function to invoke when brush moves.\n * onBrushMove: PropTypes.func,\n */\n\n /**\n * Callback function to invoke when annotations are drawn. (React)\n * onDrawAnnots: PropTypes.func,\n */\n\n /**\n * Callback function to invoke when chromosomes are loaded,\n * i.e., rendered on the page. (React)\n * onLoad: PropTypes.func,\n */\n\n /**\n * Useful for putting ideogram into a small container,\n * or when dealing with genomes that have many chromosomes.\n * Note: Not fully working, needs to be fixed by developer.\n * rows: PropTypes.number,\n */\n\n /**\n * This is a work in progess and will hopefully be fixed in future releases.\n * https://eweitz.github.io/ideogram/annotations-heatmap\n * heatmaps: PropTypes.arrayOf(PropTypes.object),\n */\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n\nexport const defaultProps = Ideogram.defaultProps;\nexport const propTypes = Ideogram.propTypes;\n","import React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\nimport PropTypes from 'prop-types';\n\nconst RealIgv = lazy(LazyLoader.igv);\n/**\n * The Igv component is an interactive genome visualization component\n * developed by the Integrative Genomics Viewer (IGV) team. It uses an\n * example integration of igv.js and React (https://www.npmjs.com/package/igv).\n */\nexport default class Igv extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nIgv.defaultProps = {};\n\nIgv.propTypes = {\n /**\n * The ID of this component, used to identify dash components in callbacks.\n * The ID needs to be unique across all of the components in an app.\n */\n id: PropTypes.string,\n\n /**\n * Dash-assigned callback that should be called to report property changes\n * to Dash, to make them available for callbacks.\n */\n setProps: PropTypes.func,\n\n /**\n * Generic style overrides on the plot div\n */\n style: PropTypes.object,\n\n /**\n * className of the component div.\n */\n className: PropTypes.string,\n\n /**\n String identifier defining genome (e.g. \"hg19\"). See https://github.com/igvteam/igv.js/wiki/Reference-Genome\n for details and list of supported identifiers. Note: One (but only one) of\n either genome or reference properties must be set. If both are set,\n the genome property will be ignored.\n */\n\n genome: PropTypes.string,\n\n /**\n Object defining reference genome. see https://github.com/igvteam/igv.js/wiki/Reference-Genome\n Note: One (but only one) of either genome or reference properties must be set. If both are set,\n the genome property will be ignored.\n */\n reference: PropTypes.object,\n\n /**\n Initial genomic location(s). Either a string or an array of strings.\n If an array a viewport is created for each location.\n */\n locus: PropTypes.string,\n\n /**\n * Minimum window size in base pairs when zooming in\n */\n minimumBases: PropTypes.number,\n\n /**\n Array of configuration objects defining tracks initially displayed when app launches.\n see https://github.com/igvteam/igv.js/wiki/Tracks-2.0\n */\n tracks: PropTypes.array,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n\nexport const defaultProps = Igv.defaultProps;\nexport const propTypes = Igv.propTypes;\n","import React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\nimport PropTypes from 'prop-types';\n\nconst RealPileup = lazy(LazyLoader.pileup);\n/**\n * The Pileup component is a genome visualization component\n * developed by the the Hammerlab. It uses an\n * example integration of pileup.js and React (https://www.npmjs.com/package/pileup).\n */\nexport default class Pileup extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nPileup.defaultProps = {};\n\nPileup.propTypes = {\n /**\n * The ID of this component, used to identify dash components in callbacks.\n * The ID needs to be unique across all of the components in an app.\n */\n id: PropTypes.string,\n\n /**\n * Dash-assigned callback that should be called to report property changes\n * to Dash, to make them available for callbacks.\n */\n setProps: PropTypes.func,\n\n /**\n * Generic style overrides on the plot div\n */\n style: PropTypes.object,\n\n /**\n * className of the component div.\n */\n className: PropTypes.string,\n\n /**\n Object defining genomic location.\n Of the format: {contig: 'chr17', start: 7512384, stop: 7512544}\n */\n range: PropTypes.exact({\n /**\n * Name of contig to display. (ie. chr17)\n */\n contig: PropTypes.string,\n\n /**\n * Start location to display\n */\n start: PropTypes.number,\n\n /**\n * Stop location to display\n */\n stop: PropTypes.number,\n }),\n\n /**\n Object defining genomic reference.\n */\n reference: PropTypes.exact({\n /**\n * Label to display by reference\n */\n label: PropTypes.string,\n\n /**\n * Url of 2bit file.\n https://genome.ucsc.edu/goldenPath/help/twoBit.html\n */\n url: PropTypes.string,\n }),\n\n /**\n Array of configuration objects defining tracks initially displayed when app launches.\n See https://github.com/hammerlab/pileup.js#usage\n */\n tracks: PropTypes.arrayOf(\n PropTypes.exact({\n /**\n * Name of visualization. Must be one of\n (coverage, genome, genes, features, idiogram, location, scale,\n variants, genotypes, or pileup). For more info on visualization\n types supported by pileup.js see https://github.com/akmorrow13/pileup.js/blob/master/src/main/pileup.js.\n\n */\n\n viz: PropTypes.oneOf([\n 'coverage',\n 'genome',\n 'genes',\n 'features',\n 'idiogram',\n 'location',\n 'scale',\n 'variants',\n 'genotypes',\n 'pileup',\n ]),\n\n /**\n * Options that define viz details.\n Options depend on the viz type selected.\n */\n vizOptions: PropTypes.Object,\n\n /**\n * Label to display by track\n */\n label: PropTypes.string,\n\n /**\n * Data source to visualize. Must be one of\n (bam, vcf, alignmentJson, variantJson, featureJson, idiogramJson, cytoBand,\n vcf, twoBit, bigBed, GAReadAlignment, GAVariant, GAFeature, GAGene). For more info on\n data source types supported by pileup.js see https://github.com/hammerlab/pileup.js/blob/master/src/main/pileup.js\n */\n source: PropTypes.oneOf([\n 'bam',\n 'alignmentJson',\n 'variantJson',\n 'featureJson',\n 'idiogramJson',\n 'cytoBand',\n 'vcf',\n 'twoBit',\n 'bigBed',\n 'GAReadAlignment',\n 'GAVariant',\n 'GAFeature',\n 'GAGene',\n ]),\n\n /**\n * Options that define data source.\n Options depend on the source selected.\n */\n sourceOptions: PropTypes.Object,\n })\n ),\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n\nexport const defaultProps = Pileup.defaultProps;\nexport const propTypes = Pileup.propTypes;\n","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\n\nconst RealMolecule2dViewer = lazy(LazyLoader.molecule2dViewer);\n\n/**\n * The Molecule2dViewer component is used to render structural\n * formulae of molecules.\n * Read more about the component here:\n * https://github.com/Autodesk/molecule-2d-for-react\n */\nexport default class Molecule2dViewer extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nMolecule2dViewer.defaultProps = {\n width: 500,\n height: 500,\n modelData: {\n nodes: [],\n links: [],\n },\n};\n\nMolecule2dViewer.propTypes = {\n /**\n * The ID used to identify this component in callbacks.\n */\n id: PropTypes.string,\n\n /**\n * Dash-assigned callback that should be called whenever properties change.\n */\n setProps: PropTypes.func,\n\n /**\n * The selected atom IDs.\n */\n selectedAtomIds: PropTypes.arrayOf(PropTypes.number),\n\n /**\n * The width of the SVG element.\n */\n width: PropTypes.number,\n\n /**\n * The height of the SVG element.\n */\n height: PropTypes.number,\n\n /**\n * Description of the molecule to display.\n */\n modelData: PropTypes.shape({\n nodes: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number,\n atom: PropTypes.string,\n })\n ),\n links: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number,\n source: PropTypes.number | PropTypes.shape,\n target: PropTypes.number | PropTypes.shape,\n bond: PropTypes.number,\n strength: PropTypes.number,\n distance: PropTypes.number,\n })\n ),\n }),\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * The option of whether or not to allow scrolling to control\n * the zoom.\n */\n scrollZoom: PropTypes.bool,\n};\n\nexport const defaultProps = Molecule2dViewer.defaultProps;\nexport const propTypes = Molecule2dViewer.propTypes;\n","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\n\nconst RealMolecule3dViewer = lazy(LazyLoader.molecule3dViewer);\n\n/**\n * The Molecule3dViewer component is used to render schematic diagrams\n * of biomolecules. It can display ribbon-structure diagrams, or\n * render atoms in the molecule as sticks or spheres.\n * Read more about the component here:\n * https://github.com/Autodesk/molecule-3d-for-react\n */\nexport default class Molecule3dViewer extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nMolecule3dViewer.defaultProps = {\n selectionType: 'atom',\n backgroundColor: '#FFFFFF',\n backgroundOpacity: 0,\n zoom: {\n factor: 0.8,\n animationDuration: 0,\n fixedPath: false,\n },\n zoomTo: {\n sel: {},\n animationDuration: 0,\n fixedPath: false,\n },\n style: {\n height: 500,\n width: 500,\n },\n};\n\nMolecule3dViewer.propTypes = {\n /**\n * The ID used to identify this component in callbacks\n */\n id: PropTypes.string,\n\n /**\n * Dash-assigned callback that should be called whenever properties change\n */\n setProps: PropTypes.func,\n\n /**\n * The selection type - may be atom, residue or chain\n */\n selectionType: PropTypes.oneOf(['atom', 'residue', 'chain']),\n\n /**\n * Property to change the background color of the molecule viewer\n */\n backgroundColor: PropTypes.string,\n\n /**\n * Property to change the background opacity - ranges from 0 to 1\n */\n backgroundOpacity: PropTypes.number,\n\n /**\n * Property that can be used to change the representation of\n * the molecule. Options include sticks, cartoon and sphere\n */\n styles: PropTypes.arrayOf(\n PropTypes.shape({\n color: PropTypes.string,\n visualization_type: PropTypes.oneOf(['cartoon', 'sphere', 'stick']),\n })\n ),\n\n /**\n * The data that will be used to display the molecule in 3D\n * The data will be in JSON format\n * and should have two main dictionaries - atoms, bonds\n */\n modelData: PropTypes.shape({\n atoms: PropTypes.array,\n bonds: PropTypes.array,\n }),\n\n /**\n * Property to either show or hide labels\n */\n atomLabelsShown: PropTypes.bool,\n\n /**\n * Property that stores a list of all selected atoms\n */\n selectedAtomIds: PropTypes.array,\n\n /**\n * Labels corresponding to the atoms of the molecule.\n * Each label has a `text` field, a string containing the label content,\n * and can have many other styling fields as described in\n * https://3dmol.csb.pitt.edu/doc/types.html#LabelSpec\n */\n labels: PropTypes.arrayOf(PropTypes.object),\n\n /**\n * Add an isosurface from volumetric data provided in the `cube_file`\n */\n orbital: PropTypes.exact({\n /**\n * The filepath containing raw volumetric data for vertex coloring\n */\n cube_file: PropTypes.string,\n /**\n * The isovalue to draw the surface at\n */\n iso_val: PropTypes.number,\n /**\n * Transparency of the surface, between 0 and 1\n */\n opacity: PropTypes.number,\n /**\n * Color for the positive value of the isosurface orbital\n */\n positiveVolumetricColor: PropTypes.string,\n /**\n * Color for the negative value of the isosurface orbital\n */\n negativeVolumetricColor: PropTypes.string,\n }),\n\n /**\n * Zoom the current view by a constant factor, with optional parameters\n * to modify the duration and motion of the zoom animation.\n */\n zoom: PropTypes.exact({\n /**\n * Magnification factor. Values greater than 1 will zoom,\n * in, less than one will zoom out. Default 2.\n */\n factor: PropTypes.number,\n /**\n * An optional parameter that denotes the duration of a\n * zoom animation, in milliseconds.\n */\n animationDuration: PropTypes.number,\n /**\n * If true, animation is constrained to requested motion,\n * overriding updates that happen during the animation.\n */\n fixedPath: PropTypes.bool,\n }),\n\n /**\n * Zoom to center of atom selection.\n */\n zoomTo: PropTypes.exact({\n /**\n * Selection specification specifying model and atom properties\n * to select. Default: all atoms in viewer.\n */\n sel: PropTypes.exact({\n /**\n * Chain that the residue is located on.\n */\n chain: PropTypes.string,\n /**\n * The index value used to identify the residue;\n * residues are numbered sequentially starting from 1.\n */\n resi: PropTypes.number,\n }),\n /**\n * An optional parameter that denotes the duration of a zoom animation\n * , in milliseconds.\n */\n animationDuration: PropTypes.number,\n /**\n * If true, animation is constrained to requested motion,\n * overriding updates that happen during the animation.\n */\n fixedPath: PropTypes.bool,\n }),\n\n /**\n * Add a predefined renderable shape objects to the molecule.\n * Valid shape types are Arrow, Sphere, and Cylinder.\n */\n shapes: PropTypes.arrayOf(PropTypes.object),\n\n /**\n * The height (in px) of the container\n */\n height: PropTypes.number,\n\n /**\n * The width (in px) of the container\n */\n width: PropTypes.number,\n\n /**\n * Generic style overrides on the plot div\n */\n style: PropTypes.object,\n\n /**\n * Callback to re-render molecule viewer\n * when modelData is changed\n */\n onRenderNewData: PropTypes.func,\n\n /**\n * Callback to change append selectedAtomIds\n * when a selection is made\n */\n onChangeSelection: PropTypes.func,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n\nexport const defaultProps = Molecule3dViewer.defaultProps;\nexport const propTypes = Molecule3dViewer.propTypes;\n","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\n\nconst RealNeedlePlot = lazy(LazyLoader.needlePlot);\n\n/**\n * The Needle Plot component is used to visualize large datasets\n * containing categorical or numerical data. The lines and markers in\n * the plot correspond to bars in a histogram.\n **/\nexport default class NeedlePlot extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nNeedlePlot.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * The data that are displayed on the plot\n */\n mutationData: PropTypes.shape({\n /*\n coordinate of mutations on the protein sequence\n */\n x: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),\n /* value (could be the sample count), this property is not necessarily\n relevant, should match x in size\n */\n y: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),\n /*\n type of mutations, should match x in size\n */\n mutationGroups: PropTypes.arrayOf(PropTypes.string),\n /*\n protein domains coordinates on the protein sequence\n */\n domains: PropTypes.array,\n }),\n\n /**\n * Margins of the plot\n */\n margin: PropTypes.object,\n\n /**\n * Title of the x-axis.\n **/\n xlabel: PropTypes.string,\n\n /**\n * Title of the y-axis.\n **/\n ylabel: PropTypes.string,\n\n /**\n * If true, enables a rangeslider for the x-axis.\n **/\n rangeSlider: PropTypes.bool,\n\n /**\n * Options for the needle marking single site mutations\n */\n needleStyle: PropTypes.shape({\n // Color of the stems of the needles\n stemColor: PropTypes.string,\n // Thickness of the stems of the needles\n stemThickness: PropTypes.number,\n // Decides whether all stems have same height or not\n stemConstHeight: PropTypes.bool,\n // Size of the heads of the needlehead\n headSize: PropTypes.number,\n // Color of the heads of the needlehead\n headColor: PropTypes.oneOfType([\n /* different color for different mutations, must be larger or\n\t equal to the size of the mutationGroup prop\n\t */\n PropTypes.array,\n // same color for all needles\n PropTypes.string,\n ]),\n // Style of the heads of the needlehead\n headSymbol: PropTypes.oneOfType([\n /* different marker for different mutations, must be larger or\n\t equal to the size of the mutationGroup prop\n\t */\n PropTypes.array,\n // same marker for all needles\n PropTypes.string,\n ]),\n }),\n\n /**\n * Options for the protein domain coloring\n */\n domainStyle: PropTypes.shape({\n // Color of the protein domains\n domainColor: PropTypes.array,\n /**\n * The prop x sometimes contains smaller domains (e.g. multi-site\n mutations), if true, these are displayed\n */\n displayMinorDomains: PropTypes.bool,\n\n /**\n * Sets the angle at which the domain annotation\n * text is drawn with respect to the horizontal.\n */\n textangle: PropTypes.number,\n }),\n\n /**\n * An array of the points on the graph that have been clicked with Plotly.js clickEvents.\n */\n clickData: PropTypes.array,\n\n /**\n * Dash-assigned callback that should be called whenever any of the\n * properties change\n */\n setProps: PropTypes.func,\n\n /**\n * Width of the Plot\n */\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Height of the Plot.\n */\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n\nNeedlePlot.defaultProps = {\n mutationData: {\n x: [],\n y: [],\n domains: [],\n mutationGroups: [],\n },\n rangeSlider: false,\n needleStyle: {\n stemColor: '#444',\n stemThickness: 0.5,\n stemConstHeight: false,\n headSize: 5,\n headColor: [\n '#e41a1c',\n '#377eb8',\n '#4daf4a',\n '#984ea3',\n '#ff7f00',\n '#ffff33',\n '#a65628',\n '#f781bf',\n '#999999',\n '#e41a1c',\n '#377eb8',\n '#4daf4a',\n '#984ea3',\n '#ff7f00',\n '#ffff33',\n '#a65628',\n '#f781bf',\n '#999999',\n '#e41a1c',\n ],\n headSymbol: 'circle',\n },\n domainStyle: {\n displayMinorDomains: false,\n domainColor: [\n '#8dd3c7',\n '#ffffb3',\n '#bebada',\n '#fb8072',\n '#80b1d3',\n '#fdb462',\n '#b3de69',\n '#fccde5',\n '#d9d9d9',\n '#bc80bd',\n '#ccebc5',\n '#ffed6f',\n '#8dd3c7',\n '#ffffb3',\n '#bebada',\n '#fb8072',\n '#80b1d3',\n '#fdb462',\n '#b3de69',\n ],\n textangle: 0,\n },\n margin: {t: 100, l: 40, r: 0, b: 40},\n\n width: 700,\n\n height: 800,\n};\n\nexport const defaultProps = NeedlePlot.defaultProps;\nexport const propTypes = NeedlePlot.propTypes;\n","import React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\nimport PropTypes from 'prop-types';\n\nconst RealNglMoleculeViewer = lazy(LazyLoader.nglmoleculeViewer);\n/**\n * The NglMoleculeViewer is used to render schematic diagrams\n * of biomolecules in ribbon-structure representations.\n * Read more about the component here:\n * https://github.com/IvoLeist/dash_ngl\n * Read more about the used WebGL protein viewer here:\n * https://github.com/arose/ngl\n */\nexport default class NglMoleculeViewer extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nconst defaultHeight = '600px';\n\nconst defaultWidth = '600px';\n\nconst defaultStageParameters = {\n quality: 'medium',\n backgroundColor: 'white',\n cameraType: 'perspective',\n};\n\nconst defaultImageParameters = {\n antialias: true,\n transparent: true,\n trim: true,\n defaultFilename: 'dash-bio_ngl_output',\n};\n\nconst defaultData = [\n {\n filename: 'placeholder',\n ext: '',\n selectedValue: 'placeholder',\n chain: 'ALL',\n aaRange: 'ALL',\n chosen: {\n chosenAtoms: '',\n chosenResidues: '',\n },\n color: 'red',\n config: {\n input: '',\n type: 'text/plain',\n },\n uploaded: false,\n resetView: false,\n },\n];\n\nNglMoleculeViewer.defaultProps = {\n data: defaultData,\n width: defaultWidth,\n height: defaultHeight,\n stageParameters: defaultStageParameters,\n imageParameters: defaultImageParameters,\n downloadImage: false,\n molStyles: {\n representations: ['cartoon', 'axes+box'],\n chosenAtomsColor: '#ffffff',\n chosenAtomsRadius: 1,\n molSpacingXaxis: 100,\n sideByside: false,\n },\n};\n\nNglMoleculeViewer.propTypes = {\n /**\n * The ID of this component, used to identify dash components in callbacks.\n * The ID needs to be unique across all of the components in an app.\n */\n id: PropTypes.string,\n\n /**\n * Dash-assigned callback that should be called whenever properties change.\n */\n setProps: PropTypes.func,\n\n /**\n * The width (in px or as a number) of the container\n * in which the molecules will be displayed.\n */\n width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * The height (in px or as a number) of the container\n * in which the molecules will be displayed.\n */\n height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * Parameters (in JSON format) for the stage object of ngl.\n * Currently implemented are render quality, background color and camera type\n * quality: auto, low, medium, high (default: auto)\n * backgroundColor: white / black (default: white)\n * cameraType: perspective / orthographic (default: perspective)\n */\n stageParameters: PropTypes.exact({\n quality: PropTypes.string,\n backgroundColor: PropTypes.string,\n cameraType: PropTypes.string,\n }),\n\n /**\n * Parameters (in JSON format) for exporting the image\n */\n imageParameters: PropTypes.exact({\n antialias: PropTypes.bool,\n transparent: PropTypes.bool,\n trim: PropTypes.bool,\n defaultFilename: PropTypes.string,\n }),\n\n /**\n * flag if download image was selected\n */\n downloadImage: PropTypes.bool,\n\n /**\n * Variable which defines how many molecules should be shown and/or which chain\n * The following format needs to be used:\n * pdbID1.chain:start-end@atom1,atom2_pdbID2.chain:start-end\n * . indicates that only one chain should be shown\n * : indicates that a specific amino acids range should be shown (e.g. 1-50)\n * @ indicates that chosen atoms should be highlighted (e.g. @50,100,150)\n * _ indicates that more than one protein should be shown\n */\n pdbString: PropTypes.string,\n\n /**\n * The data (in JSON format) that will be used to display the molecule\n * filename: name of the used pdb/cif file\n * ext: file extensions (pdb or cif)\n * selectedValue: pdbString\n * chain: ALL if the whole molecule shoud be displayed, e.g. A for showing only chain A\n * aaRange: ALL if the whole molecule should be displayed, e.g. 1:50 for showing only 50 atoms\n * color: chain color\n * chosen.atoms: string of the chosen Atoms, e.g. 50,100,150\n * --> chosen eatoms changed to colored 'ball'\n * chosen.residues: string of the chosen residues, e.g. 50,100,150\n * --> C alpha of chosen residue changed to colored 'ball'\n * config.input: content of the pdb file\n * config.type: format of config.input\n * uploaded: bool if file from local storage (false) or uploaded by user (true)\n * resetView: bool if the selection did not change but the view should be resettet (true)\n */\n data: PropTypes.arrayOf(\n PropTypes.exact({\n filename: PropTypes.string.isRequired,\n ext: PropTypes.string,\n selectedValue: PropTypes.string.isRequired,\n chain: PropTypes.string.isRequired,\n aaRange: PropTypes.string.isRequired,\n color: PropTypes.string.isRequired,\n chosen: PropTypes.exact({\n residues: PropTypes.string.isRequired,\n atoms: PropTypes.string.isRequired,\n }),\n config: PropTypes.exact({\n input: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired,\n }),\n uploaded: PropTypes.bool.isRequired,\n resetView: PropTypes.bool.isRequired,\n })\n ),\n /**\n * The data (in JSON format) that will be used to style the displayed molecule\n * representations: one or multiple selected molecule representation\n * - Possible molecule styles:\n * 'backbone,'ball+stick','cartoon', 'hyperball','licorice','line',\n * 'ribbon',''rope','spacefill','surface','trace','tube'\n * - Possible additional representations:\n * 'axes','axes+box','helixorient','unitcell'\n * chosenAtomsColor: color of the 'ball+stick' representation of the chosen atoms\n * chosenAtomsRadius: radius of the 'ball+stick' representation of the chosen atoms\n * molSpacingXaxis: distance on the xAxis between each molecule\n */\n molStyles: PropTypes.exact({\n representations: PropTypes.arrayOf(PropTypes.string),\n chosenAtomsColor: PropTypes.string.isRequired,\n chosenAtomsRadius: PropTypes.number.isRequired,\n molSpacingXaxis: PropTypes.number.isRequired,\n sideByside: PropTypes.bool.isRequired,\n }),\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n\nexport const defaultProps = NglMoleculeViewer.defaultProps;\nexport const propTypes = NglMoleculeViewer.propTypes;\n","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\n\nconst RealOncoPrint = lazy(LazyLoader.oncoPrint);\n\n/**\n * The OncoPrint component is used to view multiple genetic alteration events\n * through an interactive and zoomable heatmap. It is a React/Dash port of the\n * popular oncoPrint() function from the BioConductor R package.\n * Under the hood, the rendering is done using Plotly.js built upon D3.\n * Plotly's interactivity allows the user to bind clicks and hovers to genetic\n * events, allowing the user to create complex bioinformatic apps or workflows\n * that rely on crossfiltering.\n * Read more about the component here:\n * https://github.com/plotly/react-oncoprint\n */\nexport default class OncoPrint extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nOncoPrint.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique to the component.\n */\n id: PropTypes.string,\n\n /**\n * Dash-assigned callback that should be called whenever any of the\n * properties change.\n */\n setProps: PropTypes.func,\n\n /**\n * A Dash prop that returns data on clicking, hovering or resizing the viewer.\n */\n eventDatum: PropTypes.object,\n\n /**\n * Input data, in CBioPortal format where each list entry is a dict\n * consisting of 'sample', 'gene', 'alteration', and 'type'\n */\n data: PropTypes.array,\n\n // TODO: Add remove empty columns prop\n\n /**\n * Adjusts the padding (as a proportion of whitespace) between two tracks.\n * Value is a ratio between 0 and 1.\n * Defaults to 0.05 (i.e., 5 percent). If set to 0, plot will look like a heatmap.\n */\n padding: PropTypes.number,\n\n /**\n * If not null, will override the default OncoPrint colorscale.\n * Default OncoPrint colorscale same as CBioPortal implementation.\n * Make your own colrscale as a {'mutation': COLOR} dict.\n * Supported mutation keys are ['MISSENSE, 'INFRAME', 'FUSION',\n * 'AMP', 'GAIN', 'HETLOSS', 'HMODEL', 'UP', 'DOWN']\n * Note that this is NOT a standard plotly colorscale.\n */\n colorscale: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),\n\n /**\n * Default color for the tracks, in common name, hex, rgb or rgba format.\n * If left blank, will default to a light grey rgb(190, 190, 190).\n */\n backgroundcolor: PropTypes.string,\n\n /**\n *.Toogles whether or not to show a legend on the right side of the plot,\n * with mutation information.\n */\n range: PropTypes.array,\n\n /**\n *.Toogles whether or not to show a legend on the right side of the plot,\n * with mutation information.\n */\n showlegend: PropTypes.bool,\n\n /**\n *.Toogles whether or not to show a heatmap overview of the tracks.\n */\n showoverview: PropTypes.bool,\n\n /**\n * Width of the OncoPrint.\n * Will disable auto-resizing of plots if set.\n */\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Height of the OncoPrint.\n * Will disable auto-resizing of plots if set.\n */\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n\nOncoPrint.defaultProps = {\n // Layout\n padding: 0.05,\n colorscale: null,\n backgroundcolor: 'rgb(190, 190, 190)',\n range: [null, null],\n showlegend: true,\n showoverview: true,\n width: null,\n height: 500,\n};\n\nexport const defaultProps = OncoPrint.defaultProps;\nexport const propTypes = OncoPrint.propTypes;\n","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\n\nconst RealSequenceViewer = lazy(LazyLoader.sequenceViewer);\n\n/**\n * The sequence viewer component is used to display sequences\n * that represent proteins, strands of genomic information, and\n * more. It can apply a coverage to the sequence supplied (with\n * clickable coverage sections that can display specific information,\n * and an optional legend to describe the color codes used),\n * search through the sequence for specific regex, capture\n * mouse selection events of subparts of the sequence, display a\n * count of the number of nucleotides or amino acids in the\n * sequence,\n * Read more about the component here:\n * https://github.com/FlyBase/react-sequence-viewer\n */\nexport default class SequenceViewer extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nSequenceViewer.defaultProps = {\n sequence: '-',\n showLineNumbers: true,\n wrapAminoAcids: true,\n charsPerLine: 40,\n toolbar: false,\n search: true,\n title: '',\n sequenceMaxHeight: '400px',\n badge: true,\n selection: [],\n coverage: [],\n};\n\n/* eslint-disable consistent-return, no-unused-vars */\n\nSequenceViewer.propTypes = {\n /**\n * The ID used to identify this component in Dash callbacks.\n */\n id: PropTypes.string,\n\n /**\n * The amino acid sequence that will be displayed.\n */\n\n sequence: PropTypes.string,\n\n /**\n * The option of whether or not to display line numbers.\n */\n showLineNumbers: PropTypes.bool,\n\n /**\n * The option of whether or not to display the list of amino acids\n * as broken up into separate lines of a fixed length set by\n * charsPerLine.\n */\n wrapAminoAcids: PropTypes.bool,\n\n /**\n * The number of amino acids that will display per line.\n */\n charsPerLine: PropTypes.number,\n\n /**\n * The option of whether or not to display a toolbar at the top\n * that allows the user to choose the number of letters per line.\n */\n toolbar: PropTypes.bool,\n\n /**\n * The option of whether or not to include a search bar in\n * the header. This supports regex.\n */\n search: PropTypes.bool,\n\n /**\n * A string that displays at the top of the component.\n */\n title: PropTypes.string,\n\n /**\n * The maximum height of the sequence.\n */\n sequenceMaxHeight: PropTypes.string,\n\n /**\n * The option of whether or not to display a badge showing the\n * amino acid count at the top of the component beside the title.\n */\n badge: PropTypes.bool,\n\n /**\n * A highlighted section of the sequence; the color of the highlight\n * can also be defined. Takes a list of format [min, max, color] where\n * min is a number that represents the starting index of the selection,\n * max is a number that represents the stopping index of the selection,\n * and color is a string that defines the highlight color.\n * Cannot be used at the same time as coverage.\n */\n selection: function(props, propName, componentName) {\n if (\n props[propName] !== undefined &&\n ((typeof props[propName][0] !== 'undefined' &&\n typeof props[propName][0] !== 'number') ||\n (typeof props[propName][1] !== 'undefined' &&\n typeof props[propName][1] !== 'number') ||\n (typeof props[propName][2] !== 'undefined' &&\n typeof props[propName][2] !== 'string'))\n ) {\n return new Error(\n 'Invalid prop value. Selection should be an array with type [number, number, string].'\n );\n }\n },\n\n /**\n * A coverage of the entire sequence; each section of the sequence\n * can have its own text color, background color, tooltip (on hover),\n * and an optional underscore. The props start and end represent the\n * beginning and terminating indices of the section in question.\n * Cannot be used at the same time as selection.\n */\n coverage: PropTypes.arrayOf(\n PropTypes.shape({\n start: PropTypes.number,\n end: PropTypes.number,\n color: PropTypes.string,\n bgcolor: PropTypes.string,\n tooltip: PropTypes.string,\n underscore: PropTypes.bool,\n onclick: PropTypes.func,\n })\n ),\n\n /**\n * A legend corresponding to the color codes above (optionally displayed).\n */\n legend: PropTypes.arrayOf(\n PropTypes.shape({\n name: PropTypes.string,\n color: PropTypes.string,\n underscore: PropTypes.bool,\n })\n ),\n\n /**\n * Contains the index of the section that was clicked last in\n * the coverage list supplied.\n */\n\n coverageClicked: PropTypes.number,\n\n /**\n * Contains information about the subsequence selected\n * by the mouse. Start and end refer to the initial and\n * final indices, respectively, of the subsequence, and\n * \"selection\" contains the string that is selected.\n */\n mouseSelection: PropTypes.shape({\n start: PropTypes.number,\n end: PropTypes.number,\n selection: PropTypes.string,\n }),\n\n /**\n * A list of the subparts selected using the\n * \"search\" function or the \"selection\" property.\n */\n subpartSelected: PropTypes.arrayOf(\n PropTypes.shape({\n start: PropTypes.number,\n end: PropTypes.number,\n sequence: PropTypes.string,\n })\n ),\n\n /**\n * Dash-assigned callback that should be called whenever any of the\n * properties change.\n */\n setProps: PropTypes.func,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n\nexport const defaultProps = SequenceViewer.defaultProps;\nexport const propTypes = SequenceViewer.propTypes;\n","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\n\nimport {speckView} from 'speck';\n\nconst RealSpeck = lazy(LazyLoader.speck);\n\n/**\n * The Speck component is a WebGL-based 3D molecule renderer.\n * Read more about the component here:\n * https://github.com/wwwtyro/speck\n **/\nexport default class Speck extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nSpeck.defaultProps = {\n view: speckView.new(),\n data: [],\n showLegend: false,\n style: {\n height: '600px',\n width: '600px',\n position: 'relative',\n },\n};\n\nSpeck.propTypes = {\n /**\n * The ID used to identify this component in Dash callbacks.\n */\n\n id: PropTypes.string,\n\n /**\n * The xyz file data; a list of atoms such that each atom\n * has a dictionary defining the x, y, and z coordinates\n * along with the atom's symbol.\n */\n\n data: PropTypes.arrayOf(\n PropTypes.shape({\n symbol: PropTypes.string,\n x: PropTypes.number,\n y: PropTypes.number,\n z: PropTypes.number,\n })\n ),\n\n /**\n * The option of whether or not to allow scrolling to control\n * the zoom.\n */\n\n scrollZoom: PropTypes.bool,\n\n /**\n * An object that determines and controls various parameters\n * related to how the molecule is displayed.\n */\n view: PropTypes.shape({\n aspect: PropTypes.number,\n zoom: PropTypes.number,\n translation: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number,\n }),\n atomScale: PropTypes.number,\n relativeAtomScale: PropTypes.number,\n bondScale: PropTypes.number,\n rotation: PropTypes.shape({}),\n ao: PropTypes.number,\n aoRes: PropTypes.number,\n brightness: PropTypes.number,\n outline: PropTypes.number,\n spf: PropTypes.number,\n bonds: PropTypes.bool,\n bondThreshold: PropTypes.number,\n bondShade: PropTypes.number,\n atomShade: PropTypes.number,\n resolution: PropTypes.number,\n dofStrength: PropTypes.number,\n dofPosition: PropTypes.number,\n fxaa: PropTypes.number,\n }),\n\n /**\n * One of several pre-loaded views: default, stick-ball, toon,\n * and licorice\n */\n presetView: PropTypes.oneOf(['default', 'stickball', 'toon', 'licorice']),\n\n /**\n * Dash-assigned callback that should be called whenever any of the\n * properties change.\n */\n\n setProps: PropTypes.func,\n\n /**\n * Generic style overrides on the plot div\n */\n style: PropTypes.object,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * The option of whether to show color legend\n */\n\n showLegend: PropTypes.bool,\n};\n\nexport const defaultProps = Speck.defaultProps;\nexport const propTypes = Speck.propTypes;\n","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport LazyLoader from '../LazyLoader';\n\nconst RealJsme = lazy(LazyLoader.jsme);\n\n/**\n * JSME is a molecule editor that supports drawing and\n * editing of molecules and reactions on in a web app,\n * supporting both desktop and mobile devices. A built-in\n * substituent menu and several keyboard shortcuts\n * provide speedy access to the most common editing features and allow easy\n * and fast creation of even large and complex molecules. The editor\n * is able to export molecules as SMILES, MDL/Symyx/Accelrys Molfile or\n * in its own compact format (one line textual representation of a molecule or\n * reaction including also atomic 2D coordinates). The SMILES code generated by the JSME\n * is canonical, i.e. independent on the way how the molecule was drawn.\n *\n * See more detailed documentation here: https://jsme-editor.github.io/help.html\n */\n\nexport default class Jsme extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nJsme.defaultProps = {\n height: '600px',\n width: '600px',\n options: 'newLook',\n id: 'jsme',\n};\n\nJsme.propTypes = {\n /**\n * The ID of this component, used to identify dash components in callbacks.\n * The ID needs to be unique across all of the components in an app.\n */\n\n id: PropTypes.string,\n /**\n * Dash-assigned callback that should be called to report property changes\n * to Dash, to make them available for callbacks.\n */\n setProps: PropTypes.func,\n\n /**\n * Generic style overrides on the plot div\n */\n style: PropTypes.object,\n\n /**\n * String that is a comma separated string of JSME options.\n * The available options are described on the\n * https://wiki.jmol.org/index.php/Jmol_JavaScript_Object/JME/Options\n */\n options: PropTypes.string,\n\n /**\n * The height of the JSME container. Can be set in px, % etc.\n */\n height: PropTypes.string,\n\n /**\n * The width of the JSME container. Can be set in px, % etc.\n */\n width: PropTypes.string,\n\n /**\n * A Dash prop that returns data when SMILE will be changed.\n */\n eventSmiles: PropTypes.string,\n\n /**\n * The molecule SMILE to display\n */\n smiles: PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n\nexport const propTypes = Jsme.propTypes;\nexport const defaultProps = Jsme.defaultProps;\n","const speckRenderer = require('../src/renderer.js');\nconst speckSystem = require('../src/system.js');\nconst speckView = require('../src/view.js');\nconst speckInteractions = require('../src/interactions.js');\nconst speckPresetViews = require('../src/presets.js');\nconst speckElements = require('../src/elements.js');\n\nmodule.exports = {\n speckRenderer,\n speckSystem,\n speckView,\n speckInteractions,\n speckPresetViews,\n speckElements\n}\n","\"use strict\";\n\nvar elements = require(\"./elements\");\n\nvar MIN_ATOM_RADIUS = Infinity;\nvar MAX_ATOM_RADIUS = -Infinity;\nfor (var i = 0; i <= 118; i++) {\n MIN_ATOM_RADIUS = Math.min(MIN_ATOM_RADIUS, elements[i].radius);\n MAX_ATOM_RADIUS = Math.max(MAX_ATOM_RADIUS, elements[i].radius);\n}\n\nmodule.exports.MIN_ATOM_RADIUS = MIN_ATOM_RADIUS;\nmodule.exports.MAX_ATOM_RADIUS = MAX_ATOM_RADIUS;","\"use strict\";\n\nvar glm = require(\"./gl-matrix\")\n\nvar elements = require(\"./elements\");\nvar consts = require(\"./const\");\n\nvar newSystem = module.exports.new = function() {\n return {\n atoms: [],\n farAtom: undefined,\n bonds: []\n }\n};\n\n\nvar calculateBonds = module.exports.calculateBonds = function(s) {\n var bonds = [];\n var sorted = s.atoms.slice();\n sorted.sort(function(a, b) {\n return a.z - b.z;\n });\n for (var i = 0; i < sorted.length; i++) {\n var a = sorted[i];\n var j = i + 1;\n while(j < sorted.length && sorted[j].z < sorted[i].z + 2.5 * 2 * consts.MAX_ATOM_RADIUS) {\n var b = sorted[j];\n var l = glm.vec3.fromValues(a.x, a.y, a.z);\n var m = glm.vec3.fromValues(b.x, b.y, b.z);\n var d = glm.vec3.distance(l, m);\n var ea = elements[a.symbol];\n var eb = elements[b.symbol];\n if (d < 2.5*(ea.radius+eb.radius)) {\n bonds.push({\n posA: {\n x: a.x,\n y: a.y,\n z: a.z\n },\n posB: {\n x: b.x,\n y: b.y,\n z: b.z\n },\n radA: ea.radius,\n radB: eb.radius,\n colA: {\n r: ea.color[0],\n g: ea.color[1],\n b: ea.color[2]\n },\n colB: {\n r: eb.color[0],\n g: eb.color[1],\n b: eb.color[2]\n },\n cutoff: d/(ea.radius+eb.radius)\n });\n }\n j++;\n }\n }\n bonds.sort(function(a, b) {\n return a.cutoff - b.cutoff;\n });\n s.bonds = bonds;\n}\n\n\nvar addAtom = module.exports.addAtom = function(s, symbol, x, y, z) {\n s.atoms.push({\n symbol: symbol,\n x: x,\n y: y,\n z: z,\n });\n};\n\nvar getCentroid = module.exports.getCentroid = function(s) {\n var xsum = 0;\n var ysum = 0;\n var zsum = 0;\n for (var i = 0; i < s.atoms.length; i++) {\n xsum += s.atoms[i].x;\n ysum += s.atoms[i].y;\n zsum += s.atoms[i].z;\n }\n return {\n x: xsum/s.atoms.length,\n y: ysum/s.atoms.length,\n z: zsum/s.atoms.length\n };\n};\n\nvar center = module.exports.center = function(s) {\n var shift = getCentroid(s);\n for (var i = 0; i < s.atoms.length; i++) {\n var atom = s.atoms[i];\n atom.x -= shift.x;\n atom.y -= shift.y;\n atom.z -= shift.z;\n }\n}\n\nvar getFarAtom = module.exports.getFarAtom = function(s) {\n if (s.farAtom !== undefined) {\n return s.farAtom;\n }\n s.farAtom = s.atoms[0];\n var maxd = 0.0;\n for (var i = 0; i < s.atoms.length; i++) {\n var atom = s.atoms[i];\n var r = elements[atom.symbol].radius;\n var rd = Math.sqrt(r*r + r*r + r*r) * 2.5;\n var d = Math.sqrt(atom.x*atom.x + atom.y*atom.y + atom.z*atom.z) + rd;\n if (d > maxd) {\n maxd = d;\n s.farAtom = atom;\n }\n }\n return s.farAtom;\n}\n\nvar getRadius = module.exports.getRadius = function(s) {\n var atom = getFarAtom(s);\n var r = consts.MAX_ATOM_RADIUS;\n var rd = Math.sqrt(r*r + r*r + r*r) * 2.5;\n return Math.sqrt(atom.x*atom.x + atom.y*atom.y + atom.z*atom.z) + rd;\n}\n","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"fornac\"] = factory();\n\telse\n\t\troot[\"fornac\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.rnaPlot = exports.RNAGraph = undefined;\n\n\tvar _rnagraph = __webpack_require__(1);\n\n\tObject.defineProperty(exports, 'RNAGraph', {\n\t enumerable: true,\n\t get: function get() {\n\t return _rnagraph.RNAGraph;\n\t }\n\t});\n\n\tvar _rnaplot = __webpack_require__(3);\n\n\tObject.defineProperty(exports, 'rnaPlot', {\n\t enumerable: true,\n\t get: function get() {\n\t return _rnaplot.rnaPlot;\n\t }\n\t});\n\texports.FornaContainer = FornaContainer;\n\n\t__webpack_require__(15);\n\n\tvar _d = __webpack_require__(17);\n\n\tvar _d2 = _interopRequireDefault(_d);\n\n\tvar _simplernaplot = __webpack_require__(4);\n\n\tvar _rnautils = __webpack_require__(2);\n\n\tvar _naview = __webpack_require__(5);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n\tfunction FornaContainer(element, passedOptions) {\n\t var self = this;\n\n\t self.options = {\n\t 'displayAllLinks': false,\n\t 'labelInterval': 10,\n\t 'applyForce': true,\n\t 'chargeDistance': 110,\n\t 'friction': 0.35,\n\t 'middleCharge': -30,\n\t 'otherCharge': -30,\n\t 'linkDistanceMultiplier': 15,\n\t 'initialSize': null,\n\t 'layout': 'standard-polygonal',\n\t 'allowPanningAndZooming': true,\n\t 'transitionDuration': 500,\n\t 'hoverPattern': '',\n\t 'resizeSvgOnResize': true //change the size of the svg when resizing the container\n\t //sometimes its beneficial to turn this off, especially when\n\t //performance is an issue\n\t };\n\n\t if (arguments.length > 1) {\n\t for (var option in passedOptions) {\n\t if (self.options.hasOwnProperty(option)) self.options[option] = passedOptions[option];\n\t }\n\t }\n\n\t if (self.options.initialSize !== null) {\n\t self.options.svgW = self.options.initialSize[0];\n\t self.options.svgH = self.options.initialSize[1];\n\t } else {\n\t self.options.svgW = 800;\n\t self.options.svgH = 800;\n\t }\n\n\t var fill = _d2.default.scale.category20();\n\n\t // mouse event vars\n\t var mousedownLink = null,\n\t mousedownNode = null,\n\t mouseupNode = null;\n\n\t var xScale = _d2.default.scale.linear().domain([0, self.options.svgW]).range([0, self.options.svgW]);\n\t var yScale = _d2.default.scale.linear().domain([0, self.options.svgH]).range([0, self.options.svgH]);\n\n\t var graph = self.graph = {\n\t 'nodes': [],\n\t 'links': []\n\t };\n\n\t self.linkStrengths = {\n\t 'pseudoknot': 0.00,\n\t 'proteinChain': 0.00,\n\t 'chainChain': 0.00,\n\t 'intermolecule': 10.00,\n\t 'external': 0.00,\n\t 'other': 10.00\n\t };\n\n\t self.displayParameters = {\n\t 'displayBackground': 'true',\n\t 'displayNumbering': 'true',\n\t 'displayNodeOutline': 'true',\n\t 'displayNodeLabel': 'true',\n\t 'displayLinks': 'true',\n\t 'displayPseudoknotLinks': 'true',\n\t 'displayProteinLinks': 'true'\n\t };\n\n\t self.colorScheme = 'structure';\n\t self.customColors = {};\n\t self.animation = self.options.applyForce;\n\t // don't listen to events because a model window is open somewhere\n\t self.deaf = false;\n\t self.rnas = {};\n\t self.extraLinks = []; //store links between different RNAs\n\n\t Array.prototype.equals = function (array) {\n\t // if the other array is a falsy value, return\n\t if (!array) return false;\n\n\t // compare lengths - can save a lot of time\n\t if (this.length != array.length) return false;\n\n\t for (var i = 0, l = this.length; i < l; i++) {\n\t // Check if we have nested arrays\n\t if (this[i] instanceof Array && array[i] instanceof Array) {\n\t // recurse into the nested arrays\n\t if (!this[i].equals(array[i])) return false;\n\t } else if (this[i] != array[i]) {\n\t // Warning - two different object instances will never be equal: {x:20} != {x:20}\n\t return false;\n\t }\n\t }\n\t return true;\n\t };\n\n\t self.createInitialLayout = function (structure, passedOptions) {\n\t // the default options\n\t var options = {\n\t 'sequence': '',\n\t 'name': 'empty',\n\t 'positions': [],\n\t 'labelInterval': self.options.labelInterval,\n\t 'avoidOthers': true,\n\t 'uids': [],\n\t 'circularizeExternal': true\n\t };\n\n\t if (arguments.length == 2) {\n\t for (var option in passedOptions) {\n\t if (options.hasOwnProperty(option)) options[option] = passedOptions[option];\n\t }\n\t }\n\n\t var rg = new _rnagraph.RNAGraph(options.sequence, structure, options.name);\n\t rg.circularizeExternal = options.circularizeExternal;\n\n\t var rnaJson = rg.recalculateElements();\n\n\t if (options.positions.length === 0) {\n\t // no provided positions means we need to calculate an initial layout\n\n\t if (self.options.layout == 'naview') {\n\t var naview = new _naview.NAView();\n\n\t var naViewPositions = naview.naview_xy_coordinates(rg.pairtable);\n\t options.positions = [];\n\t for (var _i = 0; _i < naViewPositions.nbase; _i++) {\n\t options.positions.push([naViewPositions.x[_i], naViewPositions.y[_i]]);\n\t }\n\t } else {\n\t options.positions = (0, _simplernaplot.simpleXyCoordinates)(rnaJson.pairtable);\n\t }\n\t }\n\n\t rnaJson = rnaJson.elementsToJson().addUids(options.uids).addPositions('nucleotide', options.positions).addLabels(1, options.labelInterval).reinforceStems().reinforceLoops().connectFakeNodes().reassignLinkUids().breakNodesToFakeNodes();\n\n\t return rnaJson;\n\t };\n\n\t self.addRNA = function (structure, passedOptions) {\n\t var rnaJson = self.createInitialLayout(structure, passedOptions);\n\n\t /*\n\t * Code to display the JSONs representing the structure\n\t *\n\t rnaJson.nodes[0].rna = null;\n\t rnaJson.nodes[0].nextNode = null;\n\t rnaJson.links[0].source = null;\n\t rnaJson.links[0].target = null;\n\t console.log(rnaJson.nodes[0]);\n\t console.log(rnaJson.links[0]);\n\t console.log(JSON.stringify(rnaJson.nodes[0],null,2));\n\t console.log(JSON.stringify(rnaJson.links[0],null,2));\n\t */\n\n\t if (arguments.length === 1) passedOptions = {};\n\n\t if ('extraLinks' in passedOptions) {\n\t // presumably the passed in links are within the passed molecule\n\t var newLinks = self.addExternalLinks(rnaJson, passedOptions.extraLinks);\n\n\t self.extraLinks = self.extraLinks.concat(newLinks);\n\t }\n\n\t if ('avoidOthers' in passedOptions) self.addRNAJSON(rnaJson, passedOptions.avoidOthers);else self.addRNAJSON(rnaJson, true);\n\n\t return rnaJson;\n\t };\n\n\t self.addExternalLinks = function (rnaJson, externalLinks) {\n\t var newLinks = [];\n\n\t for (var i = 0; i < externalLinks.length; i++) {\n\t var newLink = { linkType: 'external', value: 1, uid: generateUUID(),\n\t source: null, target: null };\n\t // check if the source node is an array\n\t if (Object.prototype.toString.call(externalLinks[i][0]) === '[object Array]') {\n\t for (var j = 0; j < rnaJson.nodes.length; j++) {\n\t if ('nucs' in rnaJson.nodes[j]) {\n\t if (rnaJson.nodes[j].nucs.equals(externalLinks[i][0])) {\n\t newLink.source = rnaJson.nodes[j];\n\t break;\n\t }\n\t }\n\t }\n\t } else {\n\t for (var j = 0; j < rnaJson.nodes.length; j++) {\n\t if (rnaJson.nodes[j].num == externalLinks[i][0]) {\n\t newLink.source = rnaJson.nodes[j];\n\t }\n\t }\n\t }\n\n\t // check if the target node is an array\n\t if (Object.prototype.toString.call(externalLinks[i][1]) === '[object Array]') {\n\t for (var j = 0; j < rnaJson.nodes.length; j++) {\n\t if ('nucs' in rnaJson.nodes[j]) {\n\t if (rnaJson.nodes[j].nucs.equals(externalLinks[i][1])) {\n\t newLink.target = rnaJson.nodes[j];\n\t }\n\t }\n\t }\n\t } else {\n\t for (var j = 0; j < rnaJson.nodes.length; j++) {\n\t if (rnaJson.nodes[j].num == externalLinks[i][1]) {\n\t newLink.target = rnaJson.nodes[j];\n\t }\n\t }\n\t }\n\n\t if (newLink.source == null || newLink.target == null) {\n\t console.log('ERROR: source or target of new link not found:', newLink, externalLinks[i]);\n\t continue;\n\t }\n\n\t newLinks.push(newLink);\n\t }\n\n\t return newLinks;\n\t };\n\n\t self.addRNAJSON = function (rnaGraph, avoidOthers) {\n\t // Add an RNAGraph, which contains nodes and links as part of the\n\t // structure\n\t // Each RNA will have uid to identify it\n\t // when it is modified, it is replaced in the global list of RNAs\n\t //\n\t var maxX, minX;\n\n\t if (avoidOthers) {\n\t if (self.graph.nodes.length > 0) maxX = _d2.default.max(self.graph.nodes.map(function (d) {\n\t return d.x;\n\t }));else maxX = 0;\n\n\t minX = _d2.default.min(rnaGraph.nodes.map(function (d) {\n\t return d.x;\n\t }));\n\n\t rnaGraph.nodes.forEach(function (node) {\n\t node.x += maxX - minX + 20;\n\t node.px += maxX - minX;\n\t });\n\t }\n\n\t rnaGraph.nodes.forEach(function (node) {\n\t node.rna = rnaGraph;\n\t });\n\n\t self.rnas[rnaGraph.uid] = rnaGraph;\n\t self.recalculateGraph();\n\n\t self.update();\n\t self.centerView();\n\n\t return rnaGraph;\n\t };\n\n\t function magnitude(x) {\n\t return Math.sqrt(x[0] * x[0] + x[1] * x[1]);\n\t }\n\n\t function positionAnyNode(d) {\n\t var endPoint = d;\n\t var startPoint = d.prevNode;\n\t var lengthMult = 6;\n\n\t if (startPoint === null) return;\n\n\t // does this node have a link pointing to it?\n\t if (!d.linked) return;\n\n\t // point back toward the previous node\n\t var u = [-(endPoint.x - startPoint.x), -(endPoint.y - startPoint.y)];\n\t u = [u[0] / magnitude(u), u[1] / magnitude(u)];\n\t var v = [-u[1], u[0]];\n\n\t var arrowTip = [d.radius * u[0], d.radius * u[1]];\n\n\t var path = 'M' + (arrowTip[0] + lengthMult * (u[0] + v[0]) / 2) + ',' + (arrowTip[1] + lengthMult * (u[1] + v[1]) / 2) + 'L' + arrowTip[0] + ',' + arrowTip[1] + 'L' + (arrowTip[0] + lengthMult * (u[0] - v[0]) / 2) + ',' + (arrowTip[1] + lengthMult * (u[1] - v[1]) / 2);\n\n\t _d2.default.select(this).attr('d', path);\n\t }\n\n\t function realLinkFilter(d) {\n\t return d.linkType == 'basepair' || d.linkType == 'backbone' || d.linkType == 'pseudoknot' || d.linkType == 'label_link' || d.linkType == 'external' || d.linkType == 'chain_chain';\n\t }\n\n\t self.transitionRNA = function (newStructure, nextFunction) {\n\t //transition from an RNA which is already displayed to a new structure\n\t var duration = self.options.transitionDuration;\n\n\t var uids = self.graph.nodes.filter(function (d) {\n\t return d.nodeType == 'nucleotide';\n\t }).map(function (d) {\n\t return d.uid;\n\t });\n\n\t var options = { 'uids': uids };\n\t var newRNAJson = self.createInitialLayout(newStructure, options);\n\n\t var gnodes = visNodes.selectAll('g.gnode').data(newRNAJson.nodes, nodeKey);\n\t var duration = self.options.transitionDuration;\n\n\t if (duration === 0) gnodes.attr('transform', function (d) {\n\t return 'translate(' + [d.x, d.y] + ')';\n\t });else {\n\t gnodes.transition().attr('transform', function (d) {\n\t return 'translate(' + [d.x, d.y] + ')';\n\t }).duration(duration);\n\t }\n\n\t var links = visLinks.selectAll('line.link').data(newRNAJson.links.filter(realLinkFilter), linkKey);\n\t var newNodes = self.createNewNodes(gnodes.enter()).attr('transform', function (d) {\n\t if (typeof d.x != 'undefined' && typeof d.y != 'undefined') return 'translate(' + [0, 0] + ')';else return '';\n\t });\n\n\t if (duration === 0) gnodes.exit().remove();else gnodes.exit().transition().attr('transform', function (d) {\n\t if (typeof d.x != 'undefined' && typeof d.y != 'undefined') return 'translate(' + [0, 0] + ')';else return '';\n\t });\n\n\t gnodes.select('path').each(positionAnyNode);\n\n\t self.graph.nodes = gnodes.data();\n\t self.updateStyle();\n\t self.centerView(duration);\n\n\t function endall(transition, callback) {\n\t if (transition.size() === 0) {\n\t setTimeout(callback, duration);\n\t }\n\t var n = 0;\n\t transition.each(function () {\n\t ++n;\n\t }).each('end', function () {\n\t if (! --n) callback.apply(this, arguments);\n\t });\n\t }\n\n\t function addNewLinks() {\n\t var newLinks = self.createNewLinks(links.enter());\n\t self.graph.links = links.data();\n\n\t self.updateStyle();\n\n\t if (typeof nextFunction != 'undefined') nextFunction();\n\t }\n\n\t links.exit().remove();\n\n\t if (duration === 0) {\n\t links.attr('x1', function (d) {\n\t return d.source.x;\n\t }).attr('y1', function (d) {\n\t return d.source.y;\n\t }).attr('x2', function (d) {\n\t return d.target.x;\n\t }).attr('y2', function (d) {\n\t return d.target.y;\n\t });\n\n\t var newLinks = self.createNewLinks(links.enter());\n\t self.graph.links = links.data();\n\n\t self.updateStyle();\n\t } else {\n\t links.transition().attr('x1', function (d) {\n\t return d.source.x;\n\t }).attr('y1', function (d) {\n\t return d.source.y;\n\t }).attr('x2', function (d) {\n\t return d.target.x;\n\t }).attr('y2', function (d) {\n\t return d.target.y;\n\t }).duration(duration).call(endall, addNewLinks);\n\t }\n\n\t if (duration === 0) {\n\t newNodes.attr('transform', function (d) {\n\t if (typeof d.x != 'undefined' && typeof d.y != 'undefined') return 'translate(' + [d.x, d.y] + ')';else return '';\n\t });\n\t } else {\n\t newNodes.transition().attr('transform', function (d) {\n\t if (typeof d.x != 'undefined' && typeof d.y != 'undefined') return 'translate(' + [d.x, d.y] + ')';else return '';\n\t });\n\t }\n\t };\n\n\t self.recalculateGraph = function () {\n\t // Condense all of the individual RNAs into one\n\t // collection of nodes and links\n\t self.graph.nodes = [];\n\t self.graph.links = [];\n\t for (var uid in self.rnas) {\n\t self.graph.nodes = self.graph.nodes.concat(self.rnas[uid].nodes);\n\t self.graph.links = self.graph.links.concat(self.rnas[uid].links);\n\t }\n\n\t // Create a lookup table so that we can access each node\n\t // based on its uid. This will be used to create the links\n\t // between different RNAs\n\t var uidsToNodes = {};\n\n\t for (var i = 0; i < self.graph.nodes.length; i++) {\n\t uidsToNodes[self.graph.nodes[i].uid] = self.graph.nodes[i];\n\t }self.graph.links.forEach(function (link) {\n\t link.source = uidsToNodes[link.source.uid];\n\t link.target = uidsToNodes[link.target.uid];\n\t });\n\n\t for (i = 0; i < self.extraLinks.length; i++) {\n\t // the actual node objects may have changed, so we hae to recreate\n\t // the extra links based on the uids\n\n\t if (!(self.extraLinks[i].target.uid in uidsToNodes)) {\n\t console.log('not there:', self.extraLinks[i]);\n\t }\n\n\t self.extraLinks[i].source = uidsToNodes[self.extraLinks[i].source.uid];\n\t self.extraLinks[i].target = uidsToNodes[self.extraLinks[i].target.uid];\n\n\t if (self.extraLinks[i].linkType == 'intermolecule') {\n\t //remove links to middle nodes\n\t fakeLinks = self.graph.links.filter(function (d) {\n\t return (d.source == self.extraLinks[i].source || d.source == self.extraLinks[i].target || d.target == self.extraLinks[i].source || d.target == self.extraLinks[i].source) && d.linkType == 'fake';\n\t });\n\n\t for (var j = 0; j < fakeLinks.length; j++) {\n\t var linkIndex = self.graph.links.indexOf(fakeLinks[j]);\n\t self.graph.links.splice(linkIndex, 1);\n\t }\n\t }\n\n\t graph.links.push(self.extraLinks[i]);\n\t }\n\t };\n\n\t self.addNodes = function addNodes(json) {\n\t // add a new set of nodes from a json file\n\n\t // Resolve the sources and targets of the links so that they\n\t // are not just indeces into an array\n\t json.links.forEach(function (entry) {\n\t if (typeof entry.source == 'number') entry.source = json.nodes[entry.source];\n\t if (typeof entry.target == 'number') entry.target = json.nodes[entry.target];\n\t });\n\n\t // Get the maximum x and y values of the current graph\n\t // so that we don't place a new structure on top of the\n\t // old one\n\t if (self.graph.nodes.length > 0) {\n\t maxX = _d2.default.max(self.graph.nodes.map(function (d) {\n\t return d.x;\n\t }));\n\t maxY = _d2.default.max(self.graph.nodes.map(function (d) {\n\t return d.y;\n\t }));\n\t } else {\n\t maxX = 0;\n\t maxY = 0;\n\t }\n\n\t json.nodes.forEach(function (entry) {\n\t if (!(entry.rna.uid in self.rnas)) {\n\t self.rnas[entry.rna.uid] = entry.rna;\n\t }\n\n\t entry.x += maxX;\n\t //entry.y += maxY;\n\n\t entry.px += maxX;\n\t //entry.py += maxY;\n\t });\n\n\t r = new _rnagraph.RNAGraph('', '');\n\t r.nodes = json.nodes;\n\t r.links = json.links;\n\n\t //self.addRNA(r);\n\t self.recalculateGraph();\n\n\t self.update();\n\t self.centerView();\n\t };\n\n\t self.addCustomColors = function addCustomColors(json) {\n\t // Add a json file containing the custom colors\n\t self.customColors = json;\n\t };\n\n\t self.addCustomColorsText = function (customColorsText) {\n\t var cs = new _rnautils.ColorScheme(customColorsText);\n\t self.customColors = cs.colorsJson;\n\t self.changeColorScheme('custom');\n\t };\n\n\t self.clearNodes = function clearNodes() {\n\t self.graph.nodes = [];\n\t self.graph.links = [];\n\n\t self.rnas = {};\n\t self.extraLinks = [];\n\n\t self.update();\n\t };\n\n\t self.toJSON = function toJSON() {\n\t var data = { 'rnas': self.rnas, 'extraLinks': self.extraLinks };\n\t var dataString = JSON.stringify(data, function (key, value) {\n\t //remove circular references\n\t if (key == 'rna') {\n\t return;\n\t } else {\n\t return value;\n\t }\n\t }, '\\t');\n\t return dataString;\n\t };\n\n\t self.fromJSON = function (jsonString) {\n\t var rnas, extraLinks;\n\n\t try {\n\t var data = JSON.parse(jsonString);\n\t rnas = data.rnas;\n\t extraLinks = data.extraLinks;\n\t } catch (err) {\n\t throw err;\n\t }\n\n\t for (var uid in rnas) {\n\t if (rnas[uid].type == 'rna') {\n\t r = new _rnagraph.RNAGraph();\n\n\t r.seq = rnas[uid].seq;\n\t r.dotbracket = rnas[uid].dotbracket;\n\t r.circular = rnas[uid].circular;\n\t r.pairtable = rnas[uid].pairtable;\n\t r.uid = rnas[uid].uid;\n\t r.structName = rnas[uid].structName;\n\t r.nodes = rnas[uid].nodes;\n\t r.links = rnas[uid].links;\n\t r.rnaLength = rnas[uid].rnaLength;\n\t r.elements = rnas[uid].elements;\n\t r.nucsToNodes = rnas[uid].nucsToNodes;\n\t r.pseudoknotPairs = rnas[uid].pseudoknotPairs;\n\t } else {\n\t r = new ProteinGraph();\n\t r.size = rnas[uid].size;\n\t r.nodes = rnas[uid].nodes;\n\t r.uid = rnas[uid].uid;\n\t }\n\n\t self.addRNAJSON(r, false);\n\t }\n\n\t extraLinks.forEach(function (link) {\n\t self.extraLinks.push(link);\n\t });\n\n\t self.recalculateGraph();\n\t self.update();\n\t };\n\n\t self.setSize = function () {\n\t if (self.options.initialSize != null) return;\n\n\t var svgH = _d2.default.select(element).node().offsetHeight;\n\t var svgW = _d2.default.select(element).node().offsetWidth;\n\n\t self.options.svgW = svgW;\n\t self.options.svgH = svgH;\n\n\t //Set the output range of the scales\n\t xScale.range([0, svgW]).domain([0, svgW]);\n\t yScale.range([0, svgH]).domain([0, svgH]);\n\n\t //re-attach the scales to the zoom behaviour\n\t self.zoomer.x(xScale).y(yScale);\n\n\t self.brusher.x(xScale).y(yScale);\n\n\t self.centerView();\n\n\t if (!self.options.resizeSvgOnResize) {\n\t return;\n\t }\n\n\t //resize the background\n\t /*\n\t rect.attr('width', svgW)\n\t .attr('height', svgH);\n\t */\n\n\t svg.attr('width', svgW).attr('height', svgH);\n\t };\n\n\t function changeColors(moleculeColors, d, scale) {\n\t if (moleculeColors.hasOwnProperty(d.num)) {\n\t var val = parseFloat(moleculeColors[d.num]);\n\n\t if (isNaN(val)) {\n\t // passed in color is not a scalar, so\n\t // treat it as a color\n\t return moleculeColors[d.num];\n\t } else {\n\t // the user passed in a float, let's use a colormap\n\t // to convert it to a color\n\t return scale(val);\n\t }\n\t } else {\n\t return 'white';\n\t }\n\t }\n\n\t self.setOutlineColor = function (color) {\n\t var nodes = visNodes.selectAll('g.gnode').select('[node_type=nucleotide]');\n\t nodes.style('fill', color);\n\t };\n\n\t self.changeColorScheme = function (newColorScheme) {\n\t var proteinNodes = visNodes.selectAll('[node_type=protein]');\n\n\t proteinNodes.classed('protein', true).attr('r', function (d) {\n\t return d.radius;\n\t });\n\n\t var gnodes = visNodes.selectAll('g.gnode');\n\t var circles = visNodes.selectAll('g.gnode').selectAll('circle');\n\t var nodes = visNodes.selectAll('g.gnode').select('[node_type=nucleotide]');\n\t self.colorScheme = newColorScheme;\n\n\t if (newColorScheme == 'sequence') {\n\t var scale = _d2.default.scale.ordinal().range(['#dbdb8d', '#98df8a', '#ff9896', '#aec7e8', '#aec7e8']).domain(['A', 'C', 'G', 'U', 'T']);\n\t nodes.style('fill', function (d) {\n\t return scale(d.name);\n\t });\n\t } else if (newColorScheme == 'structure') {\n\t var scale = _d2.default.scale.category10().domain(['s', 'm', 'i', 'e', 't', 'h', 'x']).range(['lightgreen', '#ff9896', '#dbdb8d', 'lightsalmon', 'lightcyan', 'lightblue', 'transparent']);\n\n\t nodes.style('fill', function (d) {\n\t return scale(d.elemType);\n\t });\n\t } else if (newColorScheme == 'positions') {\n\t nodes.style('fill', function (d) {\n\t var scale = _d2.default.scale.linear().range(['#98df8a', '#dbdb8d', '#ff9896']).interpolate(_d2.default.interpolateLab).domain([1, 1 + (d.rna.rnaLength - 1) / 2, d.rna.rnaLength]);\n\n\t return scale(d.num);\n\t });\n\t } else if (newColorScheme == 'custom') {\n\t // scale to be used in case the user passes scalar\n\t // values rather than color names\n\t if (typeof self.customColors != 'undefined' && 'domain' in self.customColors && 'range' in self.customColors) {\n\t var scale = _d2.default.scale.linear().interpolate(_d2.default.interpolateLab).domain(self.customColors.domain).range(self.customColors.range);\n\t }\n\n\t nodes.style('fill', function (d) {\n\t if (typeof self.customColors == 'undefined' || !self.customColors.hasOwnProperty('colorValues')) {\n\t return 'white';\n\t }\n\n\t if (self.customColors.colorValues.hasOwnProperty(d.structName) && self.customColors.colorValues[d.structName].hasOwnProperty(d.num)) {\n\t // if a molecule name is specified, it supercedes the default colors\n\t // (for which no molecule name has been specified)\n\t var moleculeColors = self.customColors.colorValues[d.structName];\n\t return changeColors(moleculeColors, d, scale);\n\t } else if (self.customColors.colorValues.hasOwnProperty('')) {\n\t var _moleculeColors = self.customColors.colorValues[''];\n\t return changeColors(_moleculeColors, d, scale);\n\t }\n\n\t return 'white';\n\t });\n\t }\n\t };\n\n\t self.setHoverPattern = function (newPattern) {\n\t self.options['hoverPattern'] = newPattern || '';\n\t };\n\n\t function mousedown() {}\n\n\t function mousemove() {\n\t if (!mousedownNode) return;\n\n\t mpos = _d2.default.mouse(vis.node());\n\t // update drag line\n\t dragLine.attr('x1', mousedownNode.x).attr('y1', mousedownNode.y).attr('x2', mpos[0]).attr('y2', mpos[1]);\n\t }\n\n\t function mouseup() {\n\t if (mousedownNode) {\n\t dragLine.attr('class', 'drag_line_hidden');\n\t }\n\n\t // clear mouse event vars\n\t resetMouseVars();\n\t //update()\n\t }\n\t //adapt size to window changes:\n\t window.addEventListener('resize', self.setSize, false);\n\n\t self.zoomer = _d2.default.behavior.zoom().scaleExtent([0.1, 10]).x(xScale).y(yScale).on('zoomstart', zoomstart).on('zoom', redraw);\n\n\t _d2.default.select(element).select('svg').remove();\n\n\t var svg = _d2.default.select(element).classed('forna-container', true).attr('tabindex', 1).on('keydown.brush', keydown).on('keyup.brush', keyup).each(function () {\n\t this.focus();\n\t }).append('svg:svg').attr('width', self.options.svgW).attr('height', self.options.svgH).attr('id', 'plotting-area');\n\n\t self.options.svg = svg;\n\n\t var svgGraph = svg.append('svg:g').on('mousemove', mousemove).on('mousedown', mousedown).on('mouseup', mouseup);\n\n\t if (self.options.allowPanningAndZooming) svgGraph.call(self.zoomer);\n\n\t /*\n\t var rect = svgGraph.append('svg:rect')\n\t .attr('width', self.options.svgW)\n\t .attr('height', self.options.svgH)\n\t .attr('fill', 'white')\n\t //.attr('stroke', 'grey')\n\t //.attr('stroke-width', 1)\n\t //.attr('pointer-events', 'all')\n\t .attr('id', 'zrect');\n\t */\n\n\t var brush = svgGraph.append('g').datum(function () {\n\t return { selected: false, previouslySelected: false };\n\t }).attr('class', 'brush');\n\n\t var vis = svgGraph.append('svg:g');\n\t var visLinks = vis.append('svg:g');\n\t var visNodes = vis.append('svg:g');\n\n\t self.brusher = _d2.default.svg.brush().x(xScale).y(yScale).on('brushstart', function (d) {\n\t var gnodes = visNodes.selectAll('g.gnode').selectAll('.outline_node');\n\t gnodes.each(function (d) {\n\t d.previouslySelected = ctrlKeydown && d.selected;\n\t });\n\t }).on('brush', function () {\n\t var gnodes = visNodes.selectAll('g.gnode').selectAll('.outline_node');\n\t var extent = _d2.default.event.target.extent();\n\n\t gnodes.classed('selected', function (d) {\n\t return d.selected = self.options.applyForce && d.previouslySelected ^ (extent[0][0] <= d.x && d.x < extent[1][0] && extent[0][1] <= d.y && d.y < extent[1][1]);\n\t });\n\t }).on('brushend', function () {\n\t _d2.default.event.target.clear();\n\t _d2.default.select(this).call(_d2.default.event.target);\n\t });\n\n\t brush.call(self.brusher).on('mousedown.brush', null).on('touchstart.brush', null).on('touchmove.brush', null).on('touchend.brush', null);\n\t brush.select('.background').style('cursor', 'auto');\n\n\t function zoomstart() {\n\t var node = visNodes.selectAll('g.gnode').selectAll('.outline_node');\n\t node.each(function (d) {\n\t d.selected = false;\n\t d.previouslySelected = false;\n\t });\n\t node.classed('selected', false);\n\t }\n\n\t function redraw() {\n\t vis.attr('transform', 'translate(' + _d2.default.event.translate + ')' + ' scale(' + _d2.default.event.scale + ')');\n\t }\n\n\t self.getBoundingBoxTransform = function () {\n\t // Center the view on the molecule(s) and scale it so that everything\n\t // fits in the window\n\n\t //no molecules, nothing to do\n\t if (self.graph.nodes.length === 0) return { 'translate': [0, 0], 'scale': 1 };\n\n\t // Get the bounding box\n\t var minX = _d2.default.min(self.graph.nodes.map(function (d) {\n\t return d.x;\n\t }));\n\t var minY = _d2.default.min(self.graph.nodes.map(function (d) {\n\t return d.y;\n\t }));\n\n\t var maxX = _d2.default.max(self.graph.nodes.map(function (d) {\n\t return d.x;\n\t }));\n\t var maxY = _d2.default.max(self.graph.nodes.map(function (d) {\n\t return d.y;\n\t }));\n\n\t // The width and the height of the molecule\n\t var molWidth = maxX - minX;\n\t var molHeight = maxY - minY;\n\n\t // how much larger the drawing area is than the width and the height\n\t var widthRatio = self.options.svgW / (molWidth + 1);\n\t var heightRatio = self.options.svgH / (molHeight + 1);\n\n\t // we need to fit it in both directions, so we scale according to\n\t // the direction in which we need to shrink the most\n\t var minRatio = Math.min(widthRatio, heightRatio) * 0.8;\n\n\t // the new dimensions of the molecule\n\t var newMolWidth = molWidth * minRatio;\n\t var newMolHeight = molHeight * minRatio;\n\n\t // translate so that it's in the center of the window\n\t var xTrans = -minX * minRatio + (self.options.svgW - newMolWidth) / 2;\n\t var yTrans = -minY * minRatio + (self.options.svgH - newMolHeight) / 2;\n\n\t return { 'translate': [xTrans, yTrans], 'scale': minRatio };\n\t };\n\n\t self.centerView = function (duration) {\n\t if (arguments.length === 0) duration = 0;\n\n\t var bbTransform = self.getBoundingBoxTransform();\n\n\t if (bbTransform === null) return;\n\n\t // do the actual moving\n\t vis.transition().attr('transform', 'translate(' + bbTransform.translate + ')' + ' scale(' + bbTransform.scale + ')').duration(duration);\n\n\t // tell the zoomer what we did so that next we zoom, it uses the\n\t // transformation we entered here\n\t self.zoomer.translate(bbTransform.translate);\n\t self.zoomer.scale(bbTransform.scale);\n\t };\n\n\t self.force = _d2.default.layout.force().charge(function (d) {\n\t if (d.nodeType == 'middle') {\n\t return self.options.middleCharge;\n\t } else return self.options.otherCharge;\n\t }).friction(self.options.friction).linkDistance(function (d) {\n\t return self.options.linkDistanceMultiplier * d.value;\n\t }).linkStrength(function (d) {\n\t if (d.linkType in self.linkStrengths) {\n\t return self.linkStrengths[d.linkType];\n\t } else {\n\t return self.linkStrengths.other;\n\t }\n\t }).gravity(0.000).nodes(self.graph.nodes).links(self.graph.links).chargeDistance(self.options.chargeDistance).size([self.options.svgW, self.options.svgH]);\n\n\t // line displayed when dragging new nodes\n\t var dragLine = vis.append('line').attr('class', 'drag_line').attr('x1', 0).attr('y1', 0).attr('x2', 0).attr('y2', 0);\n\n\t function resetMouseVars() {\n\t mousedownNode = null;\n\t mouseupNode = null;\n\t mousedownLink = null;\n\t }\n\n\t var shiftKeydown = false;\n\t var ctrlKeydown = false;\n\n\t function selectedNodes(mouseDownNode) {\n\t var gnodes = visNodes.selectAll('g.gnode');\n\n\t if (ctrlKeydown) {\n\t return gnodes.filter(function (d) {\n\t return d.selected;\n\t });\n\n\t //return d3.selectAll('[struct_name=' + mouseDownNode.struct_name + ']');\n\t } else {\n\t return gnodes.filter(function (d) {\n\t return d.selected;\n\t });\n\t //return d3.select(this);\n\t }\n\t }\n\n\t function dragstarted(d) {\n\t _d2.default.event.sourceEvent.stopPropagation();\n\n\t if (!d.selected && !ctrlKeydown) {\n\t // if this node isn't selected, then we have to unselect every other node\n\t var node = visNodes.selectAll('g.gnode').selectAll('.outline_node');\n\t node.classed('selected', function (p) {\n\t return p.selected = self.options.applyForce && (p.previouslySelected = false);\n\t });\n\t }\n\n\t _d2.default.select(this).select('.outline_node').classed('selected', function (p) {\n\t d.previouslySelected = d.selected;return d.selected = self.options.applyForce && true;\n\t });\n\n\t var toDrag = selectedNodes(d);\n\t toDrag.each(function (d1) {\n\t d1.fixed |= 2;\n\t });\n\n\t //d3.event.sourceEvent.stopPropagation();\n\t //d3.select(self).classed('dragging', true);\n\t //\n\t }\n\n\t function dragged(d) {\n\n\t var toDrag = selectedNodes(d);\n\n\t toDrag.each(function (d1) {\n\t d1.x += _d2.default.event.dx;\n\t d1.y += _d2.default.event.dy;\n\n\t d1.px += _d2.default.event.dx;\n\t d1.py += _d2.default.event.dy;\n\t });\n\n\t self.resumeForce();\n\t _d2.default.event.sourceEvent.preventDefault();\n\t }\n\n\t self.resumeForce = function () {\n\t if (self.animation) self.force.resume();\n\t };\n\n\t function dragended(d) {\n\t var toDrag = selectedNodes(d);\n\n\t toDrag.each(function (d1) {\n\t d1.fixed &= ~6;\n\t });\n\t }\n\n\t function collide(node) {\n\t var r = node.radius + 16,\n\t nx1 = node.x - r,\n\t nx2 = node.x + r,\n\t ny1 = node.y - r,\n\t ny2 = node.y + r;\n\t return function (quad, x1, y1, x2, y2) {\n\t if (quad.point && quad.point !== node) {\n\t var x = node.x - quad.point.x,\n\t y = node.y - quad.point.y,\n\t l = Math.sqrt(x * x + y * y),\n\t r = node.radius + quad.point.radius;\n\t if (l < r) {\n\t l = (l - r) / l * 0.1;\n\t node.x -= x *= l;\n\t node.y -= y *= l;\n\t quad.point.x += x;\n\t quad.point.y += y;\n\t }\n\t }\n\t return x1 > nx2 || x2 < nx1 || y1 > ny2 || y2 < ny1;\n\t };\n\t }\n\n\t var drag = _d2.default.behavior.drag()\n\t //.origin(function(d) { return d; })\n\t .on('dragstart', dragstarted).on('drag', dragged).on('dragend', dragended);\n\n\t function keydown() {\n\t if (self.deaf)\n\t // lalalalal, not listening\n\t return;\n\n\t if (shiftKeydown) return;\n\n\t switch (_d2.default.event.keyCode) {\n\t case 16:\n\t shiftKeydown = true;\n\t break;\n\t case 17:\n\t ctrlKeydown = true;\n\t break;\n\t case 67:\n\t //c\n\t self.centerView();\n\t break;\n\t }\n\n\t if (shiftKeydown || ctrlKeydown) {\n\t svgGraph.call(self.zoomer).on('mousedown.zoom', null).on('touchstart.zoom', null).on('touchmove.zoom', null).on('touchend.zoom', null);\n\n\t //svgGraph.on('zoom', null);\n\t vis.selectAll('g.gnode').on('mousedown.drag', null);\n\t }\n\n\t if (ctrlKeydown) {\n\t brush.select('.background').style('cursor', 'crosshair');\n\t brush.call(self.brusher);\n\t }\n\t }\n\n\t function keyup() {\n\t shiftKeydown = false;\n\t ctrlKeydown = false;\n\n\t brush.call(self.brusher).on('mousedown.brush', null).on('touchstart.brush', null).on('touchmove.brush', null).on('touchend.brush', null);\n\n\t brush.select('.background').style('cursor', 'auto');\n\t svgGraph.call(self.zoomer);\n\n\t vis.selectAll('g.gnode').call(drag);\n\t }\n\n\t _d2.default.select(element).on('keydown', keydown).on('keyup', keyup).on('contextmenu', function () {\n\t _d2.default.event.preventDefault();\n\t });\n\n\t var linkKey = function linkKey(d) {\n\t return d.uid;\n\t };\n\n\t var nodeKey = function nodeKey(d) {\n\t var key = d.uid;\n\t return key;\n\t };\n\n\t var updateRnaGraph = function updateRnaGraph(r) {\n\t var nucleotidePositions = r.getPositions('nucleotide');\n\t var labelPositions = r.getPositions('label');\n\n\t var uids = r.getUids();\n\n\t r.recalculateElements().elementsToJson().addPseudoknots().addPositions('nucleotide', nucleotidePositions).addUids(uids).addLabels(1, self.options.labelInterval).addPositions('label', labelPositions).reinforceStems().reinforceLoops().updateLinkUids();\n\t };\n\n\t var removeLink = function removeLink(d) {\n\t // remove a link between two nodes\n\t index = self.graph.links.indexOf(d);\n\n\t if (index > -1) {\n\t //remove a link\n\t //graph.links.splice(index, 1);\n\n\t // there should be two cases\n\t // 1. The link is within a single molecule\n\n\t if (d.source.rna == d.target.rna) {\n\t var r = d.source.rna;\n\n\t r.addPseudoknots();\n\t r.pairtable[d.source.num] = 0;\n\t r.pairtable[d.target.num] = 0;\n\n\t updateRnaGraph(r);\n\t } else {\n\t // 2. The link is between two different molecules\n\t extraLinkIndex = self.extraLinks.indexOf(d);\n\n\t self.extraLinks.splice(extraLinkIndex, 1);\n\t }\n\n\t self.recalculateGraph();\n\t }\n\n\t self.update();\n\t };\n\n\t var linkClick = function linkClick(d) {\n\t if (!shiftKeydown) {\n\t return;\n\t }\n\n\t var invalidLinks = { 'backbone': true,\n\t 'fake': true,\n\t 'fake_fake': true,\n\t 'label_link': true };\n\n\t if (d.linkType in invalidLinks) return;\n\n\t removeLink(d);\n\t };\n\n\t self.addLink = function (newLink) {\n\t // this means we have a new json, which means we have\n\t // to recalculate the structure and change the colors\n\t // appropriately\n\t //\n\t if (newLink.source.rna == newLink.target.rna) {\n\t r = newLink.source.rna;\n\n\t r.pairtable[newLink.source.num] = newLink.target.num;\n\t r.pairtable[newLink.target.num] = newLink.source.num;\n\n\t updateRnaGraph(r);\n\t } else {\n\t //Add an extra link\n\t newLink.linkType = 'intermolecule';\n\t self.extraLinks.push(newLink);\n\t }\n\t self.recalculateGraph();\n\t self.update();\n\t };\n\n\t var nodeMouseclick = function nodeMouseclick(d) {\n\t if (_d2.default.event.defaultPrevented) return;\n\n\t if (!ctrlKeydown) {\n\t //if the shift key isn't down, unselect everything\n\t var node = visNodes.selectAll('g.gnode').selectAll('.outline_node');\n\t node.classed('selected', function (p) {\n\t return p.selected = self.options.applyForce && (p.previouslySelected = false);\n\t });\n\t }\n\n\t // always select this node\n\t _d2.default.select(this).select('circle').classed('selected', d.selected = self.options.applyForce && !d.previouslySelected);\n\t };\n\n\t var nodeMouseup = function nodeMouseup(d) {\n\t if (mousedownNode) {\n\t mouseupNode = d;\n\n\t if (mouseupNode == mousedownNode) {\n\t resetMouseVars();return;\n\t }\n\t var newLink = { source: mousedownNode, target: mouseupNode, linkType: 'basepair', value: 1, uid: generateUUID() };\n\n\t for (i = 0; i < self.graph.links.length; i++) {\n\t if (self.graph.links[i].source == mousedownNode || self.graph.links[i].target == mousedownNode || self.graph.links[i].source == mouseupNode || self.graph.links[i].target == mouseupNode) {\n\n\t if (self.graph.links[i].linkType == 'basepair' || self.graph.links[i].linkType == 'pseudoknot') {\n\t return;\n\t }\n\t }\n\n\t if (self.graph.links[i].source == mouseupNode && self.graph.links[i].target == mousedownNode || self.graph.links[i].source == mousedownNode && self.graph.links[i].target == mouseupNode) {\n\t if (self.graph.links[i].linkType == 'backbone') {\n\t return;\n\t }\n\t }\n\t }\n\n\t if (mouseupNode.nodeType == 'middle' || mousedownNode.nodeType == 'middle' || mouseupNode.nodeType == 'label' || mousedownNode.nodeType == 'label') return;\n\n\t self.addLink(newLink);\n\t }\n\t };\n\n\t var nodeMousedown = function nodeMousedown(d) {\n\t if (!d.selected && !ctrlKeydown) {\n\t // if this node isn't selected, then we have to unselect every other node\n\t var node = visNodes.selectAll('g.gnode').selectAll('.outline_node');\n\t node.classed('selected', function (p) {\n\t return p.selected = p.previouslySelected = false;\n\t });\n\t }\n\n\t _d2.default.select(this).classed('selected', function (p) {\n\t d.previouslySelected = d.selected;return d.selected = self.options.applyForce && true;\n\t });\n\n\t if (!shiftKeydown) {\n\t return;\n\t }\n\n\t mousedownNode = d;\n\n\t dragLine.attr('class', 'drag_line').attr('x1', mousedownNode.x).attr('y1', mousedownNode.y).attr('x2', mousedownNode.x).attr('y2', mousedownNode.y);\n\n\t //gnodes.attr('pointer-events', 'none');\n\t };\n\n\t self.startAnimation = function () {\n\t self.animation = true;\n\t vis.selectAll('g.gnode').call(drag);\n\t self.force.start();\n\t };\n\n\t self.stopAnimation = function () {\n\t self.animation = false;\n\t vis.selectAll('g.gnode').on('mousedown.drag', null);\n\t self.force.stop();\n\t };\n\n\t self.setFriction = function (value) {\n\t self.force.friction(value);\n\t self.resumeForce();\n\t };\n\n\t self.setCharge = function (value) {\n\t self.force.charge(value);\n\t self.resumeForce();\n\t };\n\n\t self.setGravity = function (value) {\n\t self.force.gravity(value);\n\t self.resumeForce();\n\t };\n\n\t self.setPseudoknotStrength = function (value) {\n\t self.linkStrengths.pseudoknot = value;\n\t self.update();\n\t };\n\n\t self.displayBackground = function (value) {\n\t self.displayParameters.displayBackground = value;\n\t self.updateStyle();\n\t };\n\n\t self.displayNumbering = function (value) {\n\t self.displayParameters.displayNumbering = value;\n\t self.updateStyle();\n\t };\n\n\t self.displayNodeOutline = function (value) {\n\t self.displayParameters.displayNodeOutline = value;\n\t self.updateStyle();\n\t };\n\n\t self.displayNodeLabel = function (value) {\n\t self.displayParameters.displayNodeLabel = value;\n\t self.updateStyle();\n\t };\n\n\t self.displayLinks = function (value) {\n\t self.displayParameters.displayLinks = value;\n\t self.updateStyle();\n\t };\n\n\t self.displayPseudoknotLinks = function (value) {\n\t self.displayParameters.displayPseudoknotLinks = value;\n\t self.updateStyle();\n\t };\n\n\t self.displayProteinLinks = function (value) {\n\t self.displayParameters.displayProteinLinks = value;\n\t self.updateStyle();\n\t };\n\n\t self.updateStyle = function () {\n\t // Background\n\t //rect.classed('transparent', !self.displayParameters.displayBackground);\n\t // Numbering\n\t visNodes.selectAll('[node_type=label]').classed('transparent', !self.displayParameters.displayNumbering);\n\t visNodes.selectAll('[label_type=label]').classed('transparent', !self.displayParameters.displayNumbering);\n\t visLinks.selectAll('[linkType=label_link]').classed('transparent', !self.displayParameters.displayNumbering);\n\t // Node Outline\n\t svg.selectAll('circle').classed('hidden_outline', !self.displayParameters.displayNodeOutline);\n\t // Node Labels\n\t visNodes.selectAll('[label_type=nucleotide]').classed('transparent', !self.displayParameters.displayNodeLabel);\n\t // Links\n\t svg.selectAll('[link_type=real],[link_type=basepair],[link_type=backbone],[link_type=pseudoknot],[link_type=protein_chain],[link_type=chain_chain],[link_type=external]').classed('transparent', !self.displayParameters.displayLinks);\n\t // Pseudoknot Links\n\t svg.selectAll('[link_type=pseudoknot]').classed('transparent', !self.displayParameters.displayPseudoknotLinks);\n\t // Protein Links\n\t svg.selectAll('[link_type=protein_chain]').classed('transparent', !self.displayParameters.displayProteinLinks);\n\t // Fake Links\n\t visLinks.selectAll('[link_type=fake]').classed('transparent', !self.options.displayAllLinks);\n\t visLinks.selectAll('[link_type=fake_fake]').classed('transparent', !self.options.displayAllLinks);\n\t };\n\n\t function nudge(dx, dy) {\n\t node.filter(function (d) {\n\t return d.selected;\n\t }).attr('cx', function (d) {\n\t return d.x += dx;\n\t }).attr('cy', function (d) {\n\t return d.y += dy;\n\t });\n\n\t link.filter(function (d) {\n\t return d.source.selected;\n\t }).attr('x1', function (d) {\n\t return d.source.x;\n\t }).attr('y1', function (d) {\n\t return d.source.y;\n\t });\n\n\t link.filter(function (d) {\n\t return d.target.selected;\n\t }).attr('x2', function (d) {\n\t return d.target.x;\n\t }).attr('y2', function (d) {\n\t return d.target.y;\n\t });\n\n\t _d2.default.event.preventDefault();\n\t }\n\n\t self.createNewLinks = function (linksEnter) {\n\t var linkLines = linksEnter.append('svg:line');\n\n\t linkLines.append('svg:title').text(linkKey);\n\n\t linkLines.classed('link', true).attr('x1', function (d) {\n\t return d.source.x;\n\t }).attr('y1', function (d) {\n\t return d.source.y;\n\t }).attr('x2', function (d) {\n\t return d.target.x;\n\t }).attr('y2', function (d) {\n\t return d.target.y;\n\t }).attr('link_type', function (d) {\n\t return d.linkType;\n\t }).attr('class', function (d) {\n\t return _d2.default.select(this).attr('class') + ' ' + d.linkType;\n\t }).attr('pointer-events', function (d) {\n\t if (d.linkType == 'fake') return 'none';else return 'all';\n\t });\n\n\t /* We don't need to update the positions of the stabilizing links */\n\t /*\n\t basepairLinks = visLinks.selectAll('[link_type=basepair]');\n\t basepairLinks.classed('basepair', true);\n\t fakeLinks = visLinks.selectAll('[link_type=fake]')\n\t fakeLinks.classed('fake', true);\n\t intermolecule_links = vis_links.selectAll('[link_type=intermolecule]');\n\t intermolecule_links.classed('intermolecule', true);\n\t plink = vis_links.selectAll('[link_type=protein_chain],[link_type=chain_chain]');\n\t plink.classed('chain_chain', true);\n\t */\n\n\t return linkLines;\n\t };\n\n\t self.createNewNodes = function (gnodesEnter) {\n\t gnodesEnter = gnodesEnter.append('g').classed('noselect', true).classed('gnode', true).attr('struct_name', function (d) {\n\t return d.structName;\n\t }).attr('transform', function (d) {\n\t if (typeof d.x != 'undefined' && typeof d.y != 'undefined') return 'translate(' + [d.x, d.y] + ')';else return '';\n\t }).each(function (d) {\n\t d.selected = d.previouslySelected = false;\n\t });\n\n\t gnodesEnter.call(drag).on('mousedown', nodeMousedown).on('mousedrag', function (d) {}).on('mouseup', nodeMouseup).attr('num', function (d) {\n\t return 'n' + d.num;\n\t }).attr('rnum', function (d) {\n\t return 'n' + (d.rna.rnaLength - d.num + 1);\n\t }).on('click', nodeMouseclick).transition().duration(750).ease('elastic');\n\n\t // create nodes behind the circles which will serve to highlight them\n\t var labelAndProteinNodes = gnodesEnter.filter(function (d) {\n\t return d.nodeType == 'label' || d.nodeType == 'protein';\n\t });\n\n\t var nucleotideNodes = gnodesEnter.filter(function (d) {\n\t return d.nodeType == 'nucleotide';\n\t });\n\n\t labelAndProteinNodes.append('svg:circle').attr('class', 'outline_node').attr('r', function (d) {\n\t return d.radius + 1;\n\t });\n\n\t nucleotideNodes.append('svg:circle').attr('class', 'outline_node').attr('r', function (d) {\n\t return d.radius + 1;\n\t });\n\n\t labelAndProteinNodes.append('svg:circle').attr('class', 'node').classed('label', function (d) {\n\t return d.nodeType == 'label';\n\t }).attr('r', function (d) {\n\t if (d.nodeType == 'middle') return 0;else {\n\t return d.radius;\n\t }\n\t }).attr('node_type', function (d) {\n\t return d.nodeType;\n\t }).attr('node_num', function (d) {\n\t return d.num;\n\t });\n\n\t nucleotideNodes.append('svg:circle').attr('class', 'node').attr('node_type', function (d) {\n\t return d.nodeType;\n\t }).attr('node_num', function (d) {\n\t return d.num;\n\t }).attr('r', function (d) {\n\t return d.radius;\n\t }).append('svg:title').text(function (d) {\n\t if (d.nodeType == 'nucleotide') {\n\t return self.getTitleText(d);\n\t } else {\n\t return '';\n\t }\n\t });\n\n\t nucleotideNodes.append('svg:path').attr('class', 'node').attr('node_type', function (d) {\n\t return d.nodeType;\n\t }).attr('node_num', function (d) {\n\t return d.num;\n\t }).append('svg:title').text(function (d) {\n\t if (d.nodeType == 'nucleotide') {\n\t return self.getTitleText(d);\n\t } else {\n\t return '';\n\t }\n\t });\n\n\t var labelsEnter = gnodesEnter.append('text').text(function (d) {\n\t return d.name;\n\t }).attr('text-anchor', 'middle').attr('font-size', 8.0).attr('font-weight', 'bold').attr('y', 2.5).attr('class', 'node-label').attr('label_type', function (d) {\n\t return d.nodeType;\n\t });\n\n\t /*\n\t labelsEnter.text(function(d) {\n\t return d.num;\n\t });\n\t */\n\n\t labelsEnter.append('svg:title').text(function (d) {\n\t if (d.nodeType == 'nucleotide') {\n\t return self.getTitleText(d);\n\t } else {\n\t return '';\n\t }\n\t });\n\n\t return gnodesEnter;\n\t };\n\n\t var nodeTooltip = function nodeTooltip(d) {\n\t nodeTooltips = {};\n\t nodeTooltips.nucleotide = d.num;\n\t nodeTooltips.label = '';\n\t nodeTooltips.pseudo = '';\n\t nodeTooltips.middle = '';\n\t nodeTooltips.protein = d.structName;\n\t return nodeTooltips[d.nodeType];\n\t };\n\n\t self.update = function () {\n\t self.force.nodes(self.graph.nodes).links(self.graph.links);\n\n\t if (self.animation) {\n\t self.force.start();\n\t }\n\n\t var allLinks = visLinks.selectAll('line.link').data(self.graph.links.filter(realLinkFilter), linkKey);\n\n\t allLinks.attr('class', '').classed('link', true).attr('link_type', function (d) {\n\t return d.linkType;\n\t }).attr('class', function (d) {\n\t return _d2.default.select(this).attr('class') + ' ' + d.linkType;\n\t });\n\n\t var linksEnter = allLinks.enter();\n\t self.createNewLinks(linksEnter);\n\n\t allLinks.exit().remove();\n\n\t var domain = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];\n\t var colors = _d2.default.scale.category10().domain(domain);\n\n\t var gnodes = visNodes.selectAll('g.gnode').data(self.graph.nodes, nodeKey);\n\t //.attr('pointer-events', 'all');\n\n\t var gnodesEnter = gnodes.enter();\n\n\t self.createNewNodes(gnodesEnter);\n\t gnodes.exit().remove();\n\n\t //fake_nodes = self.graph.nodes.filter(function(d) { return d.nodeType == 'middle'; });\n\t //fakeNodes = self.graph.nodes.filter(function(d) { return true; });\n\t var realNodes = self.graph.nodes.filter(function (d) {\n\t return d.nodeType == 'nucleotide' || d.nodeType == 'label';\n\t });\n\n\t var xlink;\n\t if (self.displayFakeLinks) xlink = allLinks;else xlink = visLinks.selectAll('[link_type=real],[link_type=pseudoknot],[link_type=protein_chain],[link_type=chain_chain],[link_type=label_link],[link_type=backbone],[link_type=basepair],[link_type=intermolecule],[link_type=external]');\n\n\t var position;\n\n\t gnodes.selectAll('path').each(positionAnyNode);\n\n\t xlink.on('click', linkClick);\n\n\t self.force.on('tick', function () {\n\t var q = _d2.default.geom.quadtree(realNodes);\n\t var i = 0;\n\t var n = realNodes.length;\n\n\t while (++i < n) {\n\t q.visit(collide(realNodes[i]));\n\t }xlink.attr('x1', function (d) {\n\t return d.source.x;\n\t }).attr('y1', function (d) {\n\t return d.source.y;\n\t }).attr('x2', function (d) {\n\t return d.target.x;\n\t }).attr('y2', function (d) {\n\t return d.target.y;\n\t });\n\n\t // Translate the groups\n\t gnodes.attr('transform', function (d) {\n\t return 'translate(' + [d.x, d.y] + ')';\n\t });\n\n\t gnodes.select('path').each(positionAnyNode);\n\t });\n\n\t self.changeColorScheme(self.colorScheme);\n\n\t if (self.animation) {\n\t self.force.start();\n\t }\n\n\t self.updateStyle();\n\t };\n\n\t self.getTitleText = function (d) {\n\t var pattern = self.getHoverPattern(d);\n\t var result = pattern;\n\n\t var keys = pattern.split('${').slice(1).map(function (elem) {\n\t return elem.split('}')[0];\n\t });\n\n\t keys.forEach(function (key) {\n\t var fieldValue = d[key];\n\n\t if (!fieldValue) {\n\t console.warn('The property ' + key + ' isn\\'t correct node property');\n\t fieldValue = '';\n\t }\n\t result = result.replace('${' + key + '}', fieldValue);\n\t });\n\t return result;\n\t };\n\n\t self.getHoverPattern = function (d) {\n\t var structNameIsPresent = d['structName'] && d['structName'] !== 'empty';\n\t var defaultPattern = structNameIsPresent ? '${structName}:${num}' : '${nodeType}:${num}';\n\t var patternIsPresent = self.options['hoverPattern'] && self.options['hoverPattern'].length > 0;\n\t return patternIsPresent ? self.options['hoverPattern'] : defaultPattern;\n\t };\n\n\t self.setSize();\n\t}\n\n\t/************************* END FORNAF **********************************/\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.ProteinGraph = ProteinGraph;\n\texports.RNAGraph = RNAGraph;\n\texports.moleculesToJson = moleculesToJson;\n\n\tvar _rnautils = __webpack_require__(2);\n\n\tvar numberSort = function numberSort(a, b) {\n\t return a - b;\n\t};\n\n\tfunction generateUUID() {\n\t /* Stack Overflow: \n\t * http://stackoverflow.com/a/8809472/899470 \n\t */\n\t var d = new Date().getTime();\n\t var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n\t var r = (d + Math.random() * 16) % 16 | 0;\n\t d = Math.floor(d / 16);\n\t return (c == 'x' ? r : r & 0x3 | 0x8).toString(16);\n\t });\n\n\t return uuid;\n\t}\n\n\tfunction isNormalInteger(str) {\n\t //http://stackoverflow.com/a/10834843/899470\n\t return (/^\\+?(0|[1-9]\\d*)$/.test(str)\n\t );\n\t}\n\n\tif (typeof String.prototype.trim === 'undefined') {\n\t String.prototype.trim = function () {\n\t return String(this).replace(/^\\s+|\\s+$/g, '');\n\t };\n\t}\n\n\tfunction ProteinGraph(structName, size, uid) {\n\t var self = this;\n\n\t self.type = 'protein';\n\t self.size = size;\n\t self.nodes = [{ 'name': 'P',\n\t 'num': 1,\n\t 'radius': 3 * Math.sqrt(size),\n\t 'rna': self,\n\t 'nodeType': 'protein',\n\t 'structName': structName,\n\t 'elemType': 'p',\n\t 'size': size,\n\t 'uid': generateUUID() }];\n\n\t self.links = [];\n\t self.uid = generateUUID();\n\n\t self.addUids = function (uids) {\n\t for (var i = 0; i < uids.length; i++) {\n\t self.nodes[i].uid = uids[i];\n\t }return self;\n\t };\n\n\t self.getUids = function () {\n\t /* Get the positions of each node so that they\n\t * can be passed to elementsToJson later\n\t */\n\t uids = [];\n\t for (var i = 0; i < self.dotbracket.length; i++) {\n\t uids.push(self.nodes[i].uid);\n\t }return uids;\n\t };\n\t}\n\n\tfunction RNAGraph(seq, dotbracket, structName, startNumber) {\n\t var self = this;\n\n\t self.type = 'rna';\n\t self.circularizeExternal = false;\n\n\t if (arguments.length === 0) {\n\t self.seq = '';\n\t self.dotbracket = '';\n\t self.structName = '';\n\t } else {\n\t self.seq = seq;\n\t self.dotbracket = dotbracket; //i.e. ..((..))..\n\t self.structName = structName;\n\t }\n\n\t if (arguments.length < 4) {\n\t startNumber = 1;\n\t }\n\n\t self.circular = false;\n\n\t if (self.dotbracket.length > 0 && self.dotbracket[self.dotbracket.length - 1] == '*') {\n\t //circular RNA\n\t self.dotbracket = self.dotbracket.slice(0, self.dotbracket.length - 1);\n\t self.circular = true;\n\t }\n\n\t self.uid = generateUUID();\n\n\t self.elements = []; //store the elements and the \n\t //nucleotides they contain\n\t self.pseudoknotPairs = [];\n\t self.nucsToNodes = {};\n\n\t self.addUids = function (uids) {\n\t var nucleotideNodes = self.nodes.filter(function (d) {\n\t return d.nodeType == 'nucleotide';\n\t });\n\n\t for (var i = 0; i < uids.length && i < nucleotideNodes.length; i++) {\n\t nucleotideNodes[i].uid = uids[i];\n\t }return self;\n\t };\n\n\t self.computePairtable = function () {\n\t self.pairtable = _rnautils.rnaUtilities.dotbracketToPairtable(self.dotbracket);\n\t };\n\n\t self.removeBreaks = function (targetString) {\n\t // Remove all chain breaks (denoted with a '&', which indicate\n\t // that the input represents more than one strand)\n\t var breaks = [];\n\t var breakIndex = -1;\n\n\t while ((breakIndex = targetString.indexOf('&')) >= 0) {\n\t breaks.push(breakIndex);\n\t targetString = targetString.substring(0, breakIndex) + 'oo' + targetString.substring(breakIndex + 1, targetString.length);\n\t }\n\n\t return { targetString: targetString, breaks: breaks };\n\t };\n\n\t var ret = self.removeBreaks(self.dotbracket);\n\t self.dotbracket = ret.targetString;\n\t self.dotBracketBreaks = ret.breaks;\n\n\t ret = self.removeBreaks(self.seq);\n\t self.seq = ret.targetString;\n\t self.seqBreaks = ret.breaks;\n\n\t self.calculateStartNumberArray = function () {\n\t self.startNumberArray = [];\n\t var breaks = 0;\n\n\t for (var i = 0; i < self.dotbracket.length; i++) {\n\t self.startNumberArray.push(startNumber);\n\n\t if (self.dotbracket[i] == 'o') {\n\t startNumber = -i;\n\t }\n\t }\n\t };\n\n\t self.calculateStartNumberArray();\n\n\t self.rnaLength = self.dotbracket.length;\n\n\t if (!(0, _rnautils.arraysEqual)(self.dotBracketBreaks, self.seqBreaks)) {\n\t console.log('WARNING: Sequence and structure breaks not equal');\n\t console.log('WARNING: Using the breaks in the structure');\n\t }\n\n\t self.computePairtable();\n\n\t self.addPositions = function (nodeType, positions) {\n\t var labelNodes = self.nodes.filter(function (d) {\n\t return d.nodeType == nodeType;\n\t });\n\n\t for (var i = 0; i < labelNodes.length; i++) {\n\t labelNodes[i].x = positions[i][0];\n\t labelNodes[i].px = positions[i][0];\n\t labelNodes[i].y = positions[i][1];\n\t labelNodes[i].py = positions[i][1];\n\t }\n\n\t return self;\n\t };\n\n\t self.breakNodesToFakeNodes = function () {\n\t // convert all the nodes following breaks to fake nodes\n\t var labelNodes = self.nodes.filter(function (d) {\n\t return d.nodeType == 'nucleotide';\n\t });\n\n\t // if a node was an artifical break node, convert it to a middle\n\t for (var i = 0; i < labelNodes.length; i++) {\n\t if (self.dotbracket[i] == 'o') labelNodes[i].nodeType = 'middle';\n\t }\n\n\t for (var i = 0; i < self.elements.length; i++) {\n\t var broken = false;\n\n\t // change the elemType of the other nodes in the element containing\n\t // the break\n\t for (var j = 0; j < self.elements[i][2].length; j++) {\n\t if (self.dotBracketBreaks.indexOf(self.elements[i][2][j]) >= 0) broken = true;\n\t }\n\n\t if (broken) {\n\t self.elements[i][2].map(function (x) {\n\t if (x == 0) return;\n\t self.nodes[x - 1].elemType = 'e';\n\t });\n\t } else {\n\t self.elements[i][2].map(function (x) {\n\t if (x == 0) return;\n\t self.nodes[x - 1].elemType = self.elements[i][0];\n\t });\n\t }\n\t }\n\t return self;\n\t };\n\n\t self.getPositions = function (nodeType) {\n\t var positions = [];\n\t var nucleotideNodes = self.nodes.filter(function (d) {\n\t return d.nodeType == nodeType;\n\t });\n\n\t for (var i = 0; i < nucleotideNodes.length; i++) {\n\t positions.push([nucleotideNodes[i].x, nucleotideNodes[i].y]);\n\t }return positions;\n\t };\n\n\t self.getUids = function () {\n\t /* Get the positions of each node so that they\n\t * can be passed to elementsToJson later\n\t */\n\t var uids = [];\n\t for (var i = 0; i < self.dotbracket.length; i++) {\n\t uids.push(self.nodes[i].uid);\n\t }return uids;\n\t };\n\n\t self.reinforceStems = function () {\n\t var pt = self.pairtable;\n\t var relevantElements = self.elements.filter(function (d) {\n\t return d[0] == 's' && d[2].length >= 4;\n\t });\n\n\t for (var i = 0; i < relevantElements.length; i++) {\n\t var allNucs = relevantElements[i][2];\n\t var nucs = allNucs.slice(0, allNucs.length / 2);\n\n\t for (var j = 0; j < nucs.length - 1; j++) {\n\t self.addFakeNode([nucs[j], nucs[j + 1], pt[nucs[j + 1]], pt[nucs[j]]]);\n\t }\n\t }\n\n\t return self;\n\t };\n\n\t self.reinforceLoops = function () {\n\t /* \n\t * Add a set of fake nodes to enforce the structure\n\t */\n\t var filterNucs = function filterNucs(d) {\n\t return d !== 0 && d <= self.dotbracket.length;\n\t };\n\n\t for (var i = 0; i < self.elements.length; i++) {\n\t if (self.elements[i][0] == 's' || !self.circularizeExternal && self.elements[i][0] == 'e') continue;\n\n\t var nucs = self.elements[i][2].filter(filterNucs);\n\n\t if (self.elements[i][0] == 'e') {\n\t var newNode1 = { 'name': '',\n\t 'num': -3,\n\t //'radius': 18 * radius -6,\n\t 'radius': 0,\n\t 'rna': self,\n\t 'nodeType': 'middle',\n\t 'elemType': 'f',\n\t 'nucs': [],\n\t 'x': self.nodes[self.rnaLength - 1].x,\n\t 'y': self.nodes[self.rnaLength - 1].y,\n\t 'px': self.nodes[self.rnaLength - 1].px,\n\t 'py': self.nodes[self.rnaLength - 1].py,\n\t 'uid': generateUUID() };\n\t var newNode2 = { 'name': '',\n\t 'num': -2,\n\t //'radius': 18 * radius -6,\n\t 'radius': 0,\n\t 'rna': self,\n\t 'nodeType': 'middle',\n\t 'elemType': 'f',\n\t 'nucs': [],\n\t 'x': self.nodes[0].x,\n\t 'y': self.nodes[0].y,\n\t 'px': self.nodes[0].px,\n\t 'py': self.nodes[0].py,\n\t 'uid': generateUUID() };\n\n\t nucs.push(self.nodes.length + 1);\n\t nucs.push(self.nodes.length + 2);\n\t self.nodes.push(newNode1);\n\t self.nodes.push(newNode2);\n\t }\n\n\t self.addFakeNode(nucs);\n\t }\n\n\t return self;\n\t };\n\n\t self.updateLinkUids = function () {\n\t for (var i = 0; i < self.links.length; i++) {\n\t self.links[i].uid = self.links[i].source.uid + self.links[i].target.uid;\n\t }\n\n\t return self;\n\t };\n\n\t self.addFakeNode = function (nucs) {\n\t var linkLength = 18; //make sure this is consistent with the value in force.js\n\t var nodeWidth = 6;\n\t var angle = 3.1415 * 2 / (2 * nucs.length);\n\t var radius = linkLength / (2 * Math.tan(angle));\n\n\t var fakeNodeUid = '';\n\n\t for (var i = 0; i < nucs.length; i++) {\n\t fakeNodeUid += self.nodes[nucs[i] - 1].uid;\n\t }var newNode = { 'name': '',\n\t 'num': -1,\n\t //'radius': 18 * radius -6,\n\t 'radius': radius,\n\t 'rna': self,\n\t 'nodeType': 'middle',\n\t 'elemType': 'f',\n\t 'nucs': nucs,\n\t 'uid': fakeNodeUid };\n\t self.nodes.push(newNode);\n\n\t var newX = 0;\n\t var newY = 0;\n\t var coordsCounted = 0;\n\n\t angle = (nucs.length - 2) * 3.14159 / (2 * nucs.length);\n\t radius = 0.5 / Math.cos(angle);\n\n\t for (var j = 0; j < nucs.length; j++) {\n\t if (nucs[j] === 0 || nucs[j] > self.dotbracket.length) continue;\n\n\t //link to the center node\n\t self.links.push({ 'source': self.nodes[nucs[j] - 1],\n\t 'target': self.nodes[self.nodes.length - 1],\n\t 'linkType': 'fake',\n\t 'value': radius,\n\t 'uid': generateUUID() });\n\n\t if (nucs.length > 4) {\n\t //link across the loop\n\t self.links.push({ 'source': self.nodes[nucs[j] - 1],\n\t 'target': self.nodes[nucs[(j + Math.floor(nucs.length / 2)) % nucs.length] - 1],\n\t 'linkType': 'fake',\n\t 'value': radius * 2,\n\t 'uid': generateUUID() });\n\t }\n\n\t var ia = (nucs.length - 2) * 3.14159 / nucs.length;\n\t var c = 2 * Math.cos(3.14159 / 2 - ia / 2);\n\t //link to over-neighbor\n\t self.links.push({ 'source': self.nodes[nucs[j] - 1],\n\t 'target': self.nodes[nucs[(j + 2) % nucs.length] - 1],\n\t 'linkType': 'fake',\n\t 'value': c });\n\n\t // calculate the mean of the coordinats in this loop\n\t // and place the fake node there\n\t var fromNode = self.nodes[nucs[j] - 1];\n\t if ('x' in fromNode) {\n\t newX += fromNode.x;\n\t newY += fromNode.y;\n\n\t coordsCounted += 1;\n\t }\n\t }\n\n\t if (coordsCounted > 0) {\n\t // the nucleotides had set positions so we can calculate the position\n\t // of the fake node\n\t newNode.x = newX / coordsCounted;\n\t newNode.y = newY / coordsCounted;\n\t newNode.px = newNode.x;\n\t newNode.py = newNode.y;\n\t }\n\n\t return self;\n\t };\n\n\t self.connectFakeNodes = function () {\n\t var linkLength = 18;\n\n\t // We want to be able to connect all of the fake nodes\n\t // and create a structure consisting of just them\n\t var filterOutNonFakeNodes = function filterOutNonFakeNodes(d) {\n\t return d.nodeType == 'middle';\n\t };\n\n\t var nucsToNodes = {};\n\t var fakeNodes = self.nodes.filter(filterOutNonFakeNodes);\n\t var linked = new Set();\n\n\t // initialize the nucleotides to nodes\n\t for (var i = 1; i <= self.nodes.length; i++) {\n\t nucsToNodes[i] = [];\n\t }for (var i = 0; i < fakeNodes.length; i++) {\n\t var thisNode = fakeNodes[i];\n\n\t // each fake node represents a certain set of nucleotides (thisNode.nucs)\n\t for (var j = 0; j < thisNode.nucs.length; j++) {\n\t var thisNuc = thisNode.nucs[j];\n\n\t // check to see if this nucleotide has been seen in another fake node\n\t // if it has, then we add a link between the two nodes\n\t for (var k = 0; k < nucsToNodes[thisNuc].length; k++) {\n\t if (linked.has(JSON.stringify([nucsToNodes[thisNuc][k].uid, thisNode.uid].sort()))) continue; //already linked\n\n\t var distance = nucsToNodes[thisNuc][k].radius + thisNode.radius;\n\n\t self.links.push({ 'source': nucsToNodes[thisNuc][k],\n\t 'target': thisNode,\n\t 'value': distance / linkLength,\n\t 'linkType': 'fake_fake' });\n\n\t // note that we've already seen this link\n\t linked.add(JSON.stringify([nucsToNodes[thisNuc][k].uid, thisNode.uid].sort()));\n\t }\n\n\t nucsToNodes[thisNuc].push(thisNode);\n\t }\n\t }\n\n\t return self;\n\t };\n\n\t self.addExtraLinks = function (extraLinks) {\n\t if (typeof extraLinks == 'undefined') return self;\n\n\t for (var i = 0; i < extraLinks.length; i++) {\n\t var source = self.getNodeFromNucleotides(extraLinks[i].from);\n\t var target = self.getNodeFromNucleotides(extraLinks[i].to);\n\n\t var newLink = { 'source': source, 'target': target, 'linkType': 'extra',\n\t 'extraLinkType': extraLinks[i].linkType, 'uid': generateUUID() };\n\n\t self.links.push(newLink);\n\t }\n\n\t return self;\n\t };\n\n\t self.elementsToJson = function () {\n\t /* Convert a set of secondary structure elements to a json\n\t * representation of the graph that can be used with d3's\n\t * force-directed layout to generate a visualization of \n\t * the structure.\n\t */\n\t var pt = self.pairtable;\n\t var elements = self.elements;\n\n\t self.nodes = [];\n\t self.links = [];\n\n\t //create a reverse lookup so we can find out the type\n\t //of element that a node is part of\n\t var elemTypes = {};\n\n\t //sort so that we count stems last\n\t self.elements.sort();\n\n\t for (var i = 0; i < self.elements.length; i++) {\n\t var nucs = self.elements[i][2];\n\t for (var j = 0; j < nucs.length; j++) {\n\t elemTypes[nucs[j]] = self.elements[i][0];\n\t }\n\t }\n\n\t for (var i = 1; i <= pt[0]; i++) {\n\t var nodeName = self.seq[i - 1];\n\n\t if (self.dotBracketBreaks.indexOf(i - 1) >= 0 || self.dotBracketBreaks.indexOf(i - 2) >= 0) {\n\t nodeName = '';\n\t }\n\n\t //create a node for each nucleotide\n\t self.nodes.push({ 'name': nodeName,\n\t 'num': i + self.startNumberArray[i - 1] - 1,\n\t 'radius': 5,\n\t 'rna': self,\n\t 'nodeType': 'nucleotide',\n\t 'structName': self.structName,\n\t 'elemType': elemTypes[i],\n\t 'uid': generateUUID(),\n\t 'linked': false });\n\t }\n\n\t for (var i = 0; i < self.nodes.length; i++) {\n\t if (i === 0) self.nodes[i].prevNode = null;else {\n\t self.nodes[i].prevNode = self.nodes[i - 1];\n\t }\n\n\t if (i == self.nodes.length - 1) self.nodes[i].nextNode = null;else {\n\t self.nodes[i].nextNode = self.nodes[i + 1];\n\t }\n\t }\n\n\t for (var i = 1; i <= pt[0]; i++) {\n\n\t if (pt[i] !== 0) {\n\t // base-pair links\n\t self.links.push({ 'source': self.nodes[i - 1],\n\t 'target': self.nodes[pt[i] - 1],\n\t 'linkType': 'basepair',\n\t 'value': 1,\n\t 'uid': generateUUID() });\n\t }\n\n\t if (i > 1) {\n\t // backbone links\n\t if (self.dotBracketBreaks.indexOf(i - 1) === -1 && self.dotBracketBreaks.indexOf(i - 2) == -1 && self.dotBracketBreaks.indexOf(i - 3) == -1) {\n\t // there is no break in the strands here\n\t // we can add a backbone link\n\t self.links.push({ 'source': self.nodes[i - 2],\n\t 'target': self.nodes[i - 1],\n\t 'linkType': 'backbone',\n\t 'value': 1,\n\t 'uid': generateUUID() });\n\t self.nodes[i - 1].linked = true;\n\t }\n\t }\n\t }\n\n\t //add the pseudoknot links\n\t for (var i = 0; i < self.pseudoknotPairs.length; i++) {\n\t self.links.push({ 'source': self.nodes[self.pseudoknotPairs[i][0] - 1],\n\t 'target': self.nodes[self.pseudoknotPairs[i][1] - 1],\n\t 'linkType': 'pseudoknot',\n\t 'value': 1,\n\t 'uid': generateUUID() });\n\t }\n\n\t if (self.circular) {\n\t self.links.push({ 'source': self.nodes[0],\n\t 'target': self.nodes[self.rnaLength - 1],\n\t 'linkType': 'backbone',\n\t 'value': 1,\n\t 'uid': generateUUID() });\n\t }\n\n\t return self;\n\t };\n\n\t self.ptToElements = function (pt, level, i, j) {\n\t /* Convert a pair table to a list of secondary structure \n\t * elements:\n\t *\n\t * [['s',1,[2,3]]\n\t *\n\t * The 's' indicates that an element can be a stem. It can also be\n\t * an interior loop ('i'), a hairpin loop ('h') or a multiloop ('m')\n\t *\n\t * The second number (1 in this case) indicates the depth or\n\t * how many base pairs have to be broken to get to this element.\n\t *\n\t * Finally, there is the list of nucleotides which are part of\n\t * of this element.\n\t */\n\t var elements = [];\n\t var u5 = [i - 1];\n\t var u3 = [j + 1];\n\n\t if (i > j) return [];\n\n\t //iterate over the unpaired regions on either side\n\t //this is either 5' and 3' unpaired if level == 0\n\t //or an interior loop or a multiloop\n\t for (; pt[i] === 0; i++) {\n\t u5.push(i);\n\t }\n\t for (; pt[j] === 0; j--) {\n\t u3.push(j);\n\t }\n\n\t if (i > j) {\n\t //hairpin loop or one large unpaired molecule\n\t u5.push(i);\n\t if (level === 0) return [['e', level, u5.sort(numberSort)]];else {\n\t // check to see if we have chain breaks due\n\t // to multiple strands in the input\n\t var external = false;\n\t var left = [];\n\t var right = [];\n\t for (var k = 0; k < u5.length; k++) {\n\t if (external) right.push(u5[k]);else left.push(u5[k]);\n\n\t if (self.dotBracketBreaks.indexOf(u5[k]) >= 0) external = true;\n\t }\n\n\t if (external) {\n\t return [['h', level, u5.sort(numberSort)]];\n\t } else\n\t // if not, this is a simple hairpin loop\n\t return [['h', level, u5.sort(numberSort)]];\n\t }\n\t }\n\n\t if (pt[i] != j) {\n\t //multiloop\n\t var m = u5;\n\t var k = i;\n\n\t // the nucleotide before and the starting nucleotide\n\t m.push(k);\n\t while (k <= j) {\n\t // recurse into a stem\n\t elements = elements.concat(self.ptToElements(pt, level, k, pt[k]));\n\n\t // add the nucleotides between stems\n\t m.push(pt[k]);\n\t k = pt[k] + 1;\n\t for (; pt[k] === 0 && k <= j; k++) {\n\t m.push(k);\n\t }\n\t m.push(k);\n\t }\n\t m.pop();\n\t m = m.concat(u3);\n\n\t if (m.length > 0) {\n\t if (level === 0) elements.push(['e', level, m.sort(numberSort)]);else elements.push(['m', level, m.sort(numberSort)]);\n\t }\n\n\t return elements;\n\t }\n\n\t if (pt[i] === j) {\n\t //interior loop\n\t u5.push(i);\n\t u3.push(j);\n\n\t var combined = u5.concat(u3);\n\t if (combined.length > 4) {\n\t if (level === 0) elements.push(['e', level, u5.concat(u3).sort(numberSort)]);else elements.push(['i', level, u5.concat(u3).sort(numberSort)]);\n\t }\n\t }\n\n\t var s = [];\n\t //go through the stem\n\t while (pt[i] === j && i < j) {\n\t //one stem\n\t s.push(i);\n\t s.push(j);\n\n\t i += 1;\n\t j -= 1;\n\n\t level += 1;\n\t }\n\n\t u5 = [i - 1];\n\t u3 = [j + 1];\n\t elements.push(['s', level, s.sort(numberSort)]);\n\n\t return elements.concat(self.ptToElements(pt, level, i, j));\n\t };\n\n\t self.addLabels = function (startNumber, labelInterval) {\n\t if (arguments.length === 0) {\n\t startNumber = 1;\n\t labelInterval = 10;\n\t }\n\n\t if (arguments.length === 1) labelInterval = 10;\n\n\t if (labelInterval === 0) return self;\n\n\t if (labelInterval <= 0) console.log('The label interval entered in invalid:', labelInterval);\n\n\t for (var i = 1; i <= self.pairtable[0]; i++) {\n\t // add labels\n\t if (i % labelInterval === 0) {\n\t //create a node for each label\n\t var newX, newY;\n\n\t var thisNode = self.nodes[i - 1];\n\t var prevNode, nextNode;\n\t var prevVec, nextVec;\n\n\t if (self.rnaLength == 1) {\n\t nextVec = [thisNode.x - 15, thisNode.y];\n\t prevVec = [thisNode.x - 15, thisNode.y];\n\t } else {\n\t // if we're labelling the first node, then label it in relation to the last\n\t if (i == 1) prevNode = self.nodes[self.rnaLength - 1];else prevNode = self.nodes[i - 2];\n\n\t // if we're labelling the last node, then label it in relation to the first\n\t if (i == self.rnaLength) nextNode = self.nodes[0];else nextNode = self.nodes[i];\n\n\t // this nucleotide and its neighbors are paired\n\t if (self.pairtable[nextNode.num] !== 0 && self.pairtable[prevNode.num] !== 0 && self.pairtable[thisNode.num] !== 0) {\n\t prevNode = nextNode = self.nodes[self.pairtable[thisNode.num] - 1];\n\t }\n\n\t // this node is paired but at least one of its neighbors is unpaired\n\t // place the label in the direction of the two neighbors\n\t if (self.pairtable[thisNode.num] !== 0 && (self.pairtable[nextNode.num] === 0 || self.pairtable[prevNode.num] === 0)) {\n\t nextVec = [thisNode.x - nextNode.x, thisNode.y - nextNode.y];\n\t prevVec = [thisNode.x - prevNode.x, thisNode.y - prevNode.y];\n\t } else {\n\t nextVec = [nextNode.x - thisNode.x, nextNode.y - thisNode.y];\n\t prevVec = [prevNode.x - thisNode.x, prevNode.y - thisNode.y];\n\t }\n\t }\n\n\t var combinedVec = [nextVec[0] + prevVec[0], nextVec[1] + prevVec[1]];\n\t var vecLength = Math.sqrt(combinedVec[0] * combinedVec[0] + combinedVec[1] * combinedVec[1]);\n\t var normedVec = [combinedVec[0] / vecLength, combinedVec[1] / vecLength];\n\t var offsetVec = [-15 * normedVec[0], -15 * normedVec[1]];\n\n\t var newX = self.nodes[i - 1].x + offsetVec[0];\n\t var newY = self.nodes[i - 1].y + offsetVec[1];\n\n\t var newNode = { 'name': i + self.startNumberArray[i - 1] - 1,\n\t 'num': -1,\n\t 'radius': 6,\n\t 'rna': self,\n\t 'nodeType': 'label',\n\t 'structName': self.structName,\n\t 'elemType': 'l',\n\t 'x': newX,\n\t 'y': newY,\n\t 'px': newX,\n\t 'py': newY,\n\t 'uid': generateUUID() };\n\t var newLink = { 'source': self.nodes[i - 1],\n\t 'target': newNode,\n\t 'value': 1,\n\t 'linkType': 'label_link',\n\t 'uid': generateUUID() };\n\n\t self.nodes.push(newNode);\n\t self.links.push(newLink);\n\t }\n\t }\n\n\t return self;\n\t };\n\n\t self.recalculateElements = function () {\n\t self.removePseudoknots();\n\t self.elements = self.ptToElements(self.pairtable, 0, 1, self.dotbracket.length);\n\n\t if (self.circular) {\n\t //check to see if the external loop is a hairpin or a multiloop\n\t externalLoop = self.elements.filter(function (d) {\n\t if (d[0] == 'e') return true;\n\t });\n\n\t if (externalLoop.length > 0) {\n\t eloop = externalLoop[0];\n\t nucs = eloop[2].sort(numberSort);\n\n\t prev = nucs[0];\n\t hloop = true;\n\t numGreater = 0;\n\t for (var i = 1; i < nucs.length; i++) {\n\t if (nucs[i] - prev > 1) {\n\t numGreater += 1;\n\t }\n\t prev = nucs[i];\n\t }\n\n\t if (numGreater == 1) {\n\t eloop[0] = 'h';\n\t } else if (numGreater == 2) {\n\t eloop[0] = 'i';\n\t } else {\n\t eloop[0] = 'm';\n\t }\n\t }\n\t }\n\n\t return self;\n\t };\n\n\t self.reassignLinkUids = function () {\n\t // reassign uids to the links, corresponding to the uids of the two nodes\n\t // they connect\n\t var i;\n\n\t for (var i = 0; i < self.links.length; i++) {\n\t self.links[i].uid = self.links[i].source.uid + self.links[i].target.uid;\n\t }\n\n\t return self;\n\t };\n\n\t self.removePseudoknots = function () {\n\t if (self.pairtable.length > 1) self.pseudoknotPairs = self.pseudoknotPairs.concat(_rnautils.rnaUtilities.removePseudoknotsFromPairtable(self.pairtable));\n\n\t return self;\n\t };\n\n\t self.addPseudoknots = function () {\n\t /* Add all of the pseudoknot pairs which are stored outside\n\t * of the pairtable back to the pairtable\n\t */\n\t var pt = self.pairtable;\n\t var pseudoknotPairs = self.pseudoknotPairs;\n\n\t for (var i = 0; i < pseudoknotPairs.length; i++) {\n\t pt[pseudoknotPairs[i][0]] = pseudoknotPairs[i][1];\n\t pt[pseudoknotPairs[i][1]] = pseudoknotPairs[i][0];\n\t }\n\n\t self.pseudoknotPairs = [];\n\t return self;\n\t };\n\n\t self.addName = function (name) {\n\t if (typeof name == 'undefined') {\n\t self.name = '';\n\t return self;\n\t } else {\n\t self.name = name;\n\t return self;\n\t }\n\t };\n\n\t if (self.rnaLength > 0) self.recalculateElements();\n\t}\n\n\tfunction moleculesToJson(moleculesJson) {\n\t /* Convert a list of RNA and protein molecules to a list of RNAGraph\n\t * ProteinGraph and extraLinks structure */\n\n\t var nodes = {}; //index the nodes by uid\n\t var graphs = [];\n\t var extraLinks = [];\n\n\t // Create the graphs for each molecule\n\t for (var i = 0; i < moleculesJson.molecules.length; i++) {\n\t var molecule = moleculesJson.molecules[i];\n\t var rg;\n\n\t if (molecule.type == 'rna') {\n\t rg = new RNAGraph(molecule.seq, molecule.ss, molecule.header);\n\t rg.circularizeExternal = true;\n\t rg.elementsToJson().addPositions('nucleotide', molecule.positions).addLabels().reinforceStems().reinforceLoops();\n\t } else if (molecule.type == 'protein') {\n\t rg = new ProteinGraph(molecule.header, molecule.size);\n\t }\n\n\t rg.addUids(molecule.uids);\n\n\t for (var j = 0; j < rg.nodes.length; j++) {\n\t nodes[rg.nodes[j].uid] = rg.nodes[j];\n\t }\n\n\t graphs.push(rg);\n\t }\n\n\t //Add the extra links\n\t for (var i = 0; i < moleculesJson.extraLinks.length; i++) {\n\t link = moleculesJson.extraLinks[i];\n\n\t link.source = nodes[link.source];\n\t link.target = nodes[link.target];\n\t link.uid = generateUUID();\n\n\t extraLinks.push(link);\n\t }\n\n\t return { 'graphs': graphs, 'extraLinks': extraLinks };\n\t};\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t!function(r,t){ true?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.rnautils=t():r.rnautils=t()}(this,function(){return function(r){function t(n){if(e[n])return e[n].exports;var o=e[n]={exports:{},id:n,loaded:!1};return r[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var e={};return t.m=r,t.c=e,t.p=\"\",t(0)}([function(r,t,e){r.exports=e(1)},function(r,t){\"use strict\";function e(r,t){if(r===t)return!0;if(null===r||null===t)return!1;if(r.length!=t.length)return!1;for(var e=0;eabcdefghijklmnopqrstuvwxyz\".split(\"\"),r.inverseBrackets=function(r){for(var t={},e=0;e=o;o++){n[o]=new Array(t+1);for(var a=o;t>=a;a++)n[o][a]=0}for(var s=0,o=t-e-1;o>0;o--)for(var a=o+e+1;t>=a;a++){s=n[o][a-1];for(var i=a-e-1;i>=o;i--)r[i]===a&&(s=Math.max(s,(i>o?n[o][i-1]:0)+1+(a-i-1>0?n[i+1][a-1]:0)));n[o][a]=s}return s=n[1][t],n},r.backtrackMaximumMatching=function(t,e){var n=Array.apply(null,Array(t.length)).map(function(){return 0});return r.mmBt(t,n,e,1,t.length-1),n},r.mmBt=function(t,e,n,o,a){var s=t[o][a],i=0;if(!(i>a-o-1)){if(t[o][a-1]==s)return void r.mmBt(t,e,n,o,a-1);for(var l=a-i-1;l>=o;l--)if(n[a]===l){var u=l>o?t[o][l-1]:0,c=a-l-1>0?t[l+1][a-1]:0;if(u+c+1==s)return e[l]=a,e[a]=l,l>o&&r.mmBt(t,e,n,o,l-1),void r.mmBt(t,e,n,l+1,a-1)}console.log(\"FAILED!!!\"+o+\",\"+a+\": backtracking failed!\")}},r.dotbracketToPairtable=function(t){var e=Array.apply(null,new Array(t.length+1)).map(Number.prototype.valueOf,0);e[0]=t.length;for(var n={},o=0;o0)throw\"Unmatched base at position \"+n[c][0];return e},r.insertIntoStack=function(r,t,e){for(var n=0;r[n].length>0&&r[n][r[n].length-1]n?r.bracketLeft[r.insertIntoStack(e,n,t[n])]:r.bracketRight[r.deleteFromStack(e,n)]}return a},r.findUnmatched=function(t,e,n){for(var o,a=[],s=[],i=e,l=n,o=e;n>=o;o++)0!==t[o]&&(t[o]n)&&s.push([o,t[o]]);for(var o=i;l>=o;o++){for(;0===t[o]&&l>=o;)o++;for(n=t[o];t[o]===n;)o++,n--;a=a.concat(r.findUnmatched(t,o,n))}return s.length>0&&a.push(s),a},r.removePseudoknotsFromPairtable=function(t){for(var e=r.maximumMatching(t),n=r.backtrackMaximumMatching(e,t),o=[],a=1;ao)return[];for(;0===t[n];n++)l.push(n);for(;0===t[o];o--)u.push(o);if(n>o){if(l.push(n),0===e)return[[\"e\",e,l.sort(a)]];for(var c=!1,f=[],p=[],h=0;h=0&&(c=!0);return c?[[\"h\",e,l.sort(a)]]:[[\"h\",e,l.sort(a)]]}if(t[n]!=o){var m=l,h=n;for(m.push(h);o>=h;){for(i=i.concat(r.ptToElements(t,e,h,t[h],s)),m.push(t[h]),h=t[h]+1;0===t[h]&&o>=h;h++)m.push(h);m.push(h)}return m.pop(),m=m.concat(u),m.length>0&&(0===e?i.push([\"e\",e,m.sort(a)]):i.push([\"m\",e,m.sort(a)])),i}if(t[n]===o){l.push(n),u.push(o);var v=l.concat(u);v.length>4&&(0===e?i.push([\"e\",e,l.concat(u).sort(a)]):i.push([\"i\",e,l.concat(u).sort(a)]))}for(var g=[];t[n]===o&&o>n;)g.push(n),g.push(o),n+=1,o-=1,e+=1;return l=[n-1],u=[o+1],i.push([\"s\",e,g.sort(a)]),i.concat(r.ptToElements(t,e,n,o,s))}}function o(r){var t=this;return t.colorsText=r,t.parseRange=function(r){for(var t=r.split(\",\"),e=[],n=0;n=i;i++)e.push(i);else console.log(\"Malformed range (too many dashes):\",r)}return e},t.parseColorText=function(r){for(var e=r.split(\"\\n\"),n=\"\",o=1,a={colorValues:{\"\":{}},range:[\"white\",\"steelblue\"]},s=[],i=0;i\"!=e[i][0])for(var l=e[i].trim().split(/[\\s]+/),u=0;ur&&(n=r),r>o&&(o=r));for(a in t.colorsJson.colorValues[e])r=t.colorsJson.colorValues[e][a],\"number\"==typeof r&&(t.colorsJson.colorValues[e][a]=(r-n)/(o-n))}return t},t.parseColorText(t.colorsText),t}Object.defineProperty(t,\"__esModule\",{value:!0}),t.arraysEqual=e,t.RNAUtilities=n,t.ColorScheme=o;var a=function(r,t){return r-t};t.rnaUtilities=new n}])});\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.rnaPlot = rnaPlot;\n\n\tvar _simplernaplot = __webpack_require__(4);\n\n\tvar _rnagraph = __webpack_require__(1);\n\n\tvar _naview = __webpack_require__(5);\n\n\tvar _rnautils = __webpack_require__(2);\n\n\t__webpack_require__(11);\n\n\tfunction isNormalInteger(str) {\n\t //http://stackoverflow.com/a/10834843/899470\n\t return (/^\\+?(0|[1-9]\\d*)$/.test(str)\n\t );\n\t}\n\n\tif (typeof String.prototype.trim === 'undefined') {\n\t String.prototype.trim = function () {\n\t return String(this).replace(/^\\s+|\\s+$/g, '');\n\t };\n\t}\n\n\tfunction rnaPlot() {\n\t var options = {\n\t 'width': 400,\n\t 'height': 400,\n\t 'nucleotideRadius': 5,\n\t 'rnaEdgePadding': 0, // how far the leftmost, rightmost, topmost and bottomost\n\t // nucleotides are from the edge of the plot\n\t 'labelInterval': 0,\n\t 'showNucleotideLabels': true,\n\t 'startNucleotideNumber': 1,\n\t 'bundleExternalLinks': false\n\t };\n\n\t var xScale, yScale;\n\n\t function createTransformToFillViewport(xValues, yValues) {\n\t var molName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n\t // create transform that will scale the x and y values so that\n\t // they fill the available viewport\n\n\t // find out leftmost, rightmost, topmost, bottommost positions of each\n\t // nucleotide so that we can create a scale\n\t var xExtent = d3.extent(xValues);\n\t var yExtent = d3.extent(yValues);\n\n\t var NAME_OFFSET = 30;\n\t if (molName != '') yExtent[1] += NAME_OFFSET;\n\n\t // add the radius of the nucleotides\n\t xExtent[0] -= options.nucleotideRadius + options.rnaEdgePadding;\n\t yExtent[0] -= options.nucleotideRadius + options.rnaEdgePadding;\n\n\t xExtent[1] += options.nucleotideRadius + options.rnaEdgePadding;\n\t yExtent[1] += options.nucleotideRadius + options.rnaEdgePadding;\n\n\t // find out how wide and height the molecule\n\t var xRange = xExtent[1] - xExtent[0];\n\t var yRange = yExtent[1] - yExtent[0];\n\n\t // how much wider / taller is it than the available viewport\n\t var xExtra = xRange - options.width;\n\t var yExtra = yRange - options.height;\n\n\t // once we have a scale for one dimension, we can create the scale for the other\n\t // keeping the same expansion / shrinking ratio\n\t function createOtherScale(firstScale, newDomain, newRange) {\n\t var scaleFactor = (firstScale.range()[1] - firstScale.range()[0]) / (firstScale.domain()[1] - firstScale.domain()[0]);\n\t var newWidth = (newDomain[1] - newDomain[0]) * scaleFactor;\n\t var newMargin = (newRange[1] - newRange[0] - newWidth) / 2;\n\n\t return { 'scaleFactor': scaleFactor,\n\t 'scale': d3.scale.linear().domain(newDomain).range([newRange[0] + newMargin, newRange[1] - newMargin]) };\n\t }\n\n\t var ret;\n\n\t if (xExtra > yExtra) {\n\t // we have to shrink more in the x-dimension than the y\n\t xScale = d3.scale.linear().domain(xExtent).range([0, options.width]);\n\n\t ret = createOtherScale(xScale, yExtent, [0, options.height]);\n\t yScale = ret.scale;\n\t } else {\n\t // we have to shrink more in the x-dimension than the y\n\t yScale = d3.scale.linear().domain(yExtent).range([0, options.height]);\n\n\t ret = createOtherScale(yScale, xExtent, [0, options.width]);\n\t xScale = ret.scale;\n\t }\n\n\t var xOffset = xScale.range()[0] - xScale.domain()[0];\n\t var yOffset = yScale.range()[0] - yScale.domain()[0];\n\n\t return 'translate(' + -(xScale.domain()[0] * ret.scaleFactor - xScale.range()[0]) + ',' + -(yScale.domain()[0] * ret.scaleFactor - yScale.range()[0]) + ')' + 'scale(' + ret.scaleFactor + ')';\n\t }\n\n\t function createNucleotides(selection, nucleotideNodes) {\n\t // create groupings for each nucleotide and label\n\t var gs = selection.selectAll('.rna-base').data(nucleotideNodes).enter().append('svg:g').attr('transform', function (d) {\n\t return 'translate(' + d.x + ',' + d.y + ')';\n\t });\n\n\t var circles = gs.append('svg:circle').attr('r', options.nucleotideRadius).classed('rna-base', true);\n\n\t if (options.showNucleotideLabels) {\n\t var nucleotideLabels = gs.append('svg:text').text(function (d) {\n\t return d.name;\n\t }).attr('text-anchor', 'middle').attr('dominant-baseline', 'central').classed('nucleotide-label', true).append('svg:title').text(function (d) {\n\t return d.struct_name + ':' + d.num;\n\t });\n\t }\n\t }\n\n\t function createLabels(selection, labelNodes) {\n\t // create groupings for each nucleotide and label\n\n\t var gs = selection.selectAll('.rnaLabel').data(labelNodes).enter().append('svg:g').attr('transform', function (d) {\n\t return 'translate(' + d.x + ',' + d.y + ')';\n\t });\n\n\t var numberLabels = gs.append('svg:text').text(function (d) {\n\t return d.name;\n\t }).attr('text-anchor', 'middle').attr('font-weight', 'bold').attr('dominant-baseline', 'central').classed('number-label', true);\n\t }\n\n\t function createName(selection, name) {\n\t selection.append('svg:text').attr('transform', 'translate(' + xScale.invert(options.width / 2) + ',' + yScale.invert(options.height) + ')').attr('dy', -10).classed('rna-name', true).text(name);\n\t }\n\n\t function makeExternalLinksBundle(selection, links) {\n\t var nodesDict = {};\n\t var linksList = [];\n\t links = links.filter(function (d) {\n\t return d.linkType == 'correct' || d.linkType == 'incorrect' || d.linkType == 'extra';\n\t });\n\n\t selection.selectAll('[link-type=extra]').remove();\n\n\t for (var i = 0; i < links.length; i++) {\n\t if (links[i].source === null || links[i].target === null) continue;\n\n\t nodesDict[links[i].source.uid] = links[i].source;\n\t nodesDict[links[i].target.uid] = links[i].target;\n\n\t linksList.push({ 'source': links[i].source.uid, 'target': links[i].target.uid, 'linkType': links[i].linkType, 'extraLinkType': links[i].extraLinkType });\n\t }\n\n\t var fbundling = d3.ForceEdgeBundling().nodes(nodesDict).edges(linksList).compatibility_threshold(0.8).step_size(0.2);\n\t var results = fbundling();\n\n\t var d3line = d3.svg.line().x(function (d) {\n\t return d.x;\n\t }).y(function (d) {\n\t return d.y;\n\t }).interpolate('linear');\n\n\t for (var i = 0; i < results.length; i++) {\n\t var edge_subpoint_data = results[i];\n\t // for each of the arrays in the results\n\t // draw a line between the subdivions points for that edge\n\n\t selection.append('path').attr('d', d3line(edge_subpoint_data)).style('fill', 'none').attr('link-type', function (d) {\n\t return linksList[i].linkType;\n\t }).attr('extra-link-type', function (d) {\n\t return linksList[i].extraLinkType;\n\t }).style('stroke-opacity', 0.4); //use opacity as blending\n\t }\n\t }\n\n\t function createLinks(selection, links) {\n\t links = links.filter(function (d) {\n\t return d.source !== null && d.target !== null;\n\t });\n\t var gs = selection.selectAll('.rna-link').data(links).enter().append('svg:line').attr('x1', function (d) {\n\t return d.source.x;\n\t }).attr('x2', function (d) {\n\t return d.target.x;\n\t }).attr('y1', function (d) {\n\t return d.source.y;\n\t }).attr('y2', function (d) {\n\t return d.target.y;\n\t }).attr('link-type', function (d) {\n\t return d.linkType;\n\t }).attr('extra-link-type', function (d) {\n\t return d.extraLinkType;\n\t }).classed('rna-link', true);\n\t }\n\n\t function chart(selection) {\n\t selection.each(function (data) {\n\t // data should be a dictionary containing at least a structure\n\t // and possibly a sequence\n\t var rg = new _rnagraph.RNAGraph(data.sequence, data.structure, data.name).recalculateElements().elementsToJson().addName(data.name);\n\n\t data.rnaGraph = rg;\n\t // calculate the position of each nucleotide\n\t // the positions of the labels will be calculated in\n\t // the addLabels function\n\t //var positions = simpleXyCoordinates(rg.pairtable);\n\t var naview = new _naview.NAView();\n\n\t var naViewPositions = naview.naview_xy_coordinates(rg.pairtable);\n\t var positions = [];\n\t for (var i = 0; i < naViewPositions.nbase; i++) {\n\t positions.push([naViewPositions.x[i], naViewPositions.y[i]]);\n\t }\n\t rg.addPositions('nucleotide', positions).reinforceStems().reinforceLoops().addExtraLinks(data.extraLinks).addLabels(options.startNucleotideNumber, options.labelInterval);\n\n\t // create a transform that will fit the molecule to the\n\t // size of the viewport (canvas, svg, whatever)\n\t var fillViewportTransform = createTransformToFillViewport(rg.nodes.map(function (d) {\n\t return d.x;\n\t }), rg.nodes.map(function (d) {\n\t return d.y;\n\t }));\n\n\t var gTransform = d3.select(this).append('g').attr('transform', fillViewportTransform);\n\n\t var nucleotideNodes = rg.nodes.filter(function (d) {\n\t return d.nodeType == 'nucleotide';\n\t });\n\n\t var labelNodes = rg.nodes.filter(function (d) {\n\t return d.nodeType == 'label';\n\t });\n\n\t var links = rg.links;\n\n\t createLinks(gTransform, links);\n\t createNucleotides(gTransform, nucleotideNodes);\n\t createLabels(gTransform, labelNodes);\n\t createName(gTransform, data.name);\n\n\t if (options.bundleExternalLinks) {\n\t makeExternalLinksBundle(gTransform, links);\n\t }\n\t });\n\t }\n\n\t chart.width = function (_) {\n\t if (!arguments.length) return options.width;\n\t options.width = _;\n\t return chart;\n\t };\n\n\t chart.height = function (_) {\n\t if (!arguments.length) return options.height;\n\t options.height = _;\n\t return chart;\n\t };\n\n\t chart.showNucleotideLabels = function (_) {\n\t if (!arguments.length) return options.showNucleotideLabels;\n\t options.showNucleotideLabels = _;\n\t return chart;\n\t };\n\n\t chart.rnaEdgePadding = function (_) {\n\t if (!arguments.length) return options.rnaEdgePadding;\n\t options.rnaEdgePadding = _;\n\t return chart;\n\t };\n\n\t chart.nucleotideRadius = function (_) {\n\t if (!arguments.length) return options.nucleotideRadius;\n\t options.nucleotideRadius = _;\n\t return chart;\n\t };\n\n\t chart.labelInterval = function (_) {\n\t if (!arguments.length) return options.labelInterval;\n\t options.labelInterval = _;\n\t return chart;\n\t };\n\n\t chart.showNucleotideLabels = function (_) {\n\t if (!arguments.length) return options.showNucleotideLabels;\n\t options.showNucleotideLabels = _;\n\t return chart;\n\t };\n\n\t chart.startNucleotideNumber = function (_) {\n\t if (!arguments.length) return options.startNucleotideNumber;\n\t options.startNucleotideNumber = _;\n\t return chart;\n\t };\n\n\t chart.bundleExternalLinks = function (_) {\n\t if (!arguments.length) return options.bundleExternalLinks;\n\t options.bundleExternalLinks = _;\n\t return chart;\n\t };\n\n\t return chart;\n\t}\n\tvar number_sort = function number_sort(a, b) {\n\t return a - b;\n\t};\n\n\tfunction RNAUtilities() {\n\t var self = this;\n\n\t // the brackets to use when constructing dotbracket strings\n\t // with pseudoknots\n\t self.bracket_left = '([{ 0; i--) {\n\n\t for (var j = i + TURN + 1; j <= n; j++) {\n\t maximum = mm[i][j - 1];\n\n\t for (var l = j - TURN - 1; l >= i; l--) {\n\t if (pt[l] === j) {\n\n\t // we have a base pair here\n\t maximum = Math.max(maximum, (l > i ? mm[i][l - 1] : 0) + 1 + (j - l - 1 > 0 ? mm[l + 1][j - 1] : 0));\n\t }\n\t }\n\n\t mm[i][j] = maximum;\n\t }\n\t }maximum = mm[1][n];\n\n\t return mm;\n\t };\n\n\t self.backtrackMaximumMatching = function (mm, old_pt) {\n\t var pt = Array.apply(null, Array(mm.length)).map(function () {\n\t return 0;\n\t });\n\t //create an array containing zeros\n\n\t self.mm_bt(mm, pt, old_pt, 1, mm.length - 1);\n\t return pt;\n\t };\n\n\t self.mm_bt = function (mm, pt, old_pt, i, j) {\n\t // Create a pairtable from the backtracking\n\t var maximum = mm[i][j];\n\t var TURN = 0;\n\n\t if (j - i - 1 < TURN) return; /* no more pairs */\n\n\t if (mm[i][j - 1] == maximum) {\n\t /* j is unpaired */\n\t self.mm_bt(mm, pt, old_pt, i, j - 1);\n\t return;\n\t }\n\n\t for (var q = j - TURN - 1; q >= i; q--) {\n\t /* j is paired with some q */\n\t if (old_pt[j] !== q) continue;\n\n\t var left_part = q > i ? mm[i][q - 1] : 0;\n\t var enclosed_part = j - q - 1 > 0 ? mm[q + 1][j - 1] : 0;\n\n\t if (left_part + enclosed_part + 1 == maximum) {\n\t // there's a base pair between j and q\n\t pt[q] = j;\n\t pt[j] = q;\n\n\t if (i < q) self.mm_bt(mm, pt, old_pt, i, q - 1);\n\n\t self.mm_bt(mm, pt, old_pt, q + 1, j - 1);\n\t return;\n\t }\n\t }\n\n\t //alert(i + ',' + j + ': backtracking failed!');\n\t console.log('FAILED!!!' + i + ',' + j + ': backtracking failed!');\n\t };\n\n\t self.dotbracketToPairtable = function (dotbracket) {\n\t // create an array and initialize it to 0\n\t pt = Array.apply(null, new Array(dotbracket.length + 1)).map(Number.prototype.valueOf, 0);\n\n\t // the first element is always the length of the RNA molecule\n\t pt[0] = dotbracket.length;\n\n\t // store the pairing partners for each symbol\n\t stack = {};\n\t for (i = 0; i < self.bracket_left.length; i++) {\n\t stack[i] = [];\n\t }\n\n\t // lookup the index of each symbol in the bracket array\n\t inverse_bracket_left = self.inverse_brackets(self.bracket_left);\n\t inverse_bracket_right = self.inverse_brackets(self.bracket_right);\n\n\t for (i = 0; i < dotbracket.length; i++) {\n\t a = dotbracket[i];\n\t ni = i + 1;\n\n\t if (a == '.') {\n\t // unpaired\n\t pt[ni] = 0;\n\t } else {\n\t if (a in inverse_bracket_left) {\n\t // open pair?\n\t stack[inverse_bracket_left[a]].push(ni);\n\t } else if (a in inverse_bracket_right) {\n\t // close pair?\n\t j = stack[inverse_bracket_right[a]].pop();\n\n\t pt[ni] = j;\n\t pt[j] = ni;\n\t } else {\n\t throw 'Unknown symbol in dotbracket string';\n\t }\n\t }\n\t }\n\n\t for (key in stack) {\n\t if (stack[key].length > 0) {\n\t throw 'Unmatched base at position ' + stack[key][0];\n\t }\n\t }\n\n\t return pt;\n\t };\n\n\t self.insert_into_stack = function (stack, i, j) {\n\t var k = 0;\n\t while (stack[k].length > 0 && stack[k][stack[k].length - 1] < j) {\n\t k += 1;\n\t }\n\n\t stack[k].push(j);\n\t return k;\n\t };\n\n\t self.delete_from_stack = function (stack, j) {\n\t var k = 0;\n\t while (stack[k].length === 0 || stack[k][stack[k].length - 1] != j) {\n\t k += 1;\n\t }\n\t stack[k].pop();\n\t return k;\n\t };\n\n\t self.pairtableToDotbracket = function (pt) {\n\t // store the pairing partners for each symbol\n\t stack = {};\n\t for (i = 0; i < pt[0]; i++) {\n\t stack[i] = [];\n\t }\n\n\t seen = {};\n\t res = '';\n\t for (i = 1; i < pt[0] + 1; i++) {\n\t if (pt[i] !== 0 && pt[i] in seen) {\n\t throw 'Invalid pairtable contains duplicate entries';\n\t }\n\t seen[pt[i]] = true;\n\n\t if (pt[i] === 0) {\n\t res += '.';\n\t } else {\n\t if (pt[i] > i) {\n\t res += self.bracket_left[self.insert_into_stack(stack, i, pt[i])];\n\t } else {\n\t res += self.bracket_right[self.delete_from_stack(stack, i)];\n\t }\n\t }\n\t }\n\n\t return res;\n\t };\n\n\t self.find_unmatched = function (pt, from, to) {\n\t /*\n\t * Find unmatched nucleotides in this molecule.\n\t */\n\t var to_remove = [];\n\t var unmatched = [];\n\n\t var orig_from = from;\n\t var orig_to = to;\n\n\t for (var i = from; i <= to; i++) {\n\t if (pt[i] !== 0 && (pt[i] < from || pt[i] > to)) unmatched.push([i, pt[i]]);\n\t }for (i = orig_from; i <= orig_to; i++) {\n\t while (pt[i] === 0 && i <= orig_to) {\n\t i++;\n\t }to = pt[i];\n\n\t while (pt[i] === to) {\n\t i++;\n\t to--;\n\t }\n\n\t to_remove = to_remove.concat(self.find_unmatched(pt, i, to));\n\t }\n\n\t if (unmatched.length > 0) to_remove.push(unmatched);\n\n\t return to_remove;\n\t };\n\n\t self.removePseudoknotsFromPairtable = function (pt) {\n\t /* Remove the pseudoknots from this structure in such a fashion\n\t * that the least amount of base-pairs need to be broken\n\t *\n\t * The pairtable is manipulated in place and a list of tuples\n\t * indicating the broken base pairs is returned.\n\t */\n\n\t var mm = self.maximumMatching(pt);\n\t var new_pt = self.backtrackMaximumMatching(mm, pt);\n\t var removed = [];\n\n\t for (var i = 1; i < pt.length; i++) {\n\t if (pt[i] < i) continue;\n\n\t if (new_pt[i] != pt[i]) {\n\t removed.push([i, pt[i]]);\n\t pt[pt[i]] = 0;\n\t pt[i] = 0;\n\t }\n\t }\n\n\t return removed;\n\t };\n\t}\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t\"use strict\";\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.simpleXyCoordinates = simpleXyCoordinates;\n\tfunction simpleXyCoordinates(pair_table) {\n\t var INIT_ANGLE = 0.; /* initial bending angle */\n\t var INIT_X = 100.; /* coordinate of first digit */\n\t var INIT_Y = 100.; /* see above */\n\t var RADIUS = 15.;\n\n\t var x = [],\n\t y = [];\n\n\t var i, len;\n\t var alpha;\n\n\t len = pair_table[0];\n\t var angle = Array.apply(null, new Array(len + 5)).map(Number.prototype.valueOf, 0);\n\t var loop_size = Array.apply(null, new Array(16 + Math.floor(len / 5))).map(Number.prototype.valueOf, 0);\n\t var stack_size = Array.apply(null, new Array(16 + Math.floor(len / 5))).map(Number.prototype.valueOf, 0);\n\n\t var lp = 0;\n\t var stk = 0;\n\t var PIHALF = Math.PI / 2;\n\n\t var loop = function loop(i, j, pair_table)\n\t /* i, j are the positions AFTER the last pair of a stack; i.e\n\t i-1 and j+1 are paired. */\n\t {\n\t var count = 2; /* counts the VERTICES of a loop polygon; that's\n\t NOT necessarily the number of unpaired bases!\n\t Upon entry the loop has already 2 vertices, namely\n\t the pair i-1/j+1. */\n\n\t var r = 0,\n\t bubble = 0; /* bubble counts the unpaired digits in loops */\n\n\t var i_old, partner, k, l, start_k, start_l, fill, ladder;\n\t var begin, v, diff;\n\t var polygon;\n\n\t var remember = Array.apply(null, new Array(3 + Math.floor((j - i) / 5) * 2)).map(Number.prototype.valueOf, 0);\n\n\t i_old = i - 1, j++; /* j has now been set to the partner of the\n\t previous pair for correct while-loop\n\t termination. */\n\t while (i != j) {\n\t partner = pair_table[i];\n\t if (!partner || i == 0) i++, count++, bubble++;else {\n\t count += 2;\n\t k = i, l = partner; /* beginning of stack */\n\t remember[++r] = k;\n\t remember[++r] = l;\n\t i = partner + 1; /* next i for the current loop */\n\n\t start_k = k, start_l = l;\n\t ladder = 0;\n\t do {\n\t k++, l--, ladder++; /* go along the stack region */\n\t } while (pair_table[k] == l && pair_table[k] > k);\n\n\t fill = ladder - 2;\n\t if (ladder >= 2) {\n\t angle[start_k + 1 + fill] += PIHALF; /* Loop entries and */\n\t angle[start_l - 1 - fill] += PIHALF; /* exits get an */\n\t angle[start_k] += PIHALF; /* additional PI/2. */\n\t angle[start_l] += PIHALF; /* Why ? (exercise) */\n\t if (ladder > 2) {\n\t for (; fill >= 1; fill--) {\n\t angle[start_k + fill] = Math.PI; /* fill in the angles */\n\t angle[start_l - fill] = Math.PI; /* for the backbone */\n\t }\n\t }\n\t }\n\t stack_size[++stk] = ladder;\n\t if (k <= l) loop(k, l, pair_table);\n\t }\n\t }\n\n\t polygon = Math.PI * (count - 2) / count; /* bending angle in loop polygon */\n\t remember[++r] = j;\n\t begin = i_old < 0 ? 0 : i_old;\n\t for (v = 1; v <= r; v++) {\n\t diff = remember[v] - begin;\n\t for (fill = 0; fill <= diff; fill++) {\n\t angle[begin + fill] += polygon;\n\t }if (v > r) break;\n\t begin = remember[++v];\n\t }\n\t loop_size[++lp] = bubble;\n\t };\n\n\t loop(0, len + 1, pair_table);\n\t loop_size[lp] -= 2; /* correct for cheating with function loop */\n\n\t alpha = INIT_ANGLE;\n\t x[0] = INIT_X;\n\t y[0] = INIT_Y;\n\n\t var poss = [];\n\n\t poss.push([x[0], y[0]]);\n\t for (i = 1; i < len; i++) {\n\t x[i] = x[i - 1] + RADIUS * Math.cos(alpha);\n\t y[i] = y[i - 1] + RADIUS * Math.sin(alpha);\n\n\t poss.push([x[i], y[i]]);\n\t alpha += Math.PI - angle[i + 1];\n\t }\n\n\t return poss;\n\t}\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.NAView = NAView;\n\n\tvar _radloop = __webpack_require__(6);\n\n\tvar _connection = __webpack_require__(7);\n\n\tvar _region = __webpack_require__(9);\n\n\tvar _base = __webpack_require__(10);\n\n\tvar _loop = __webpack_require__(8);\n\n\tfunction NAView() {\n\t this.ANUM = 9999.0;\n\t this.MAXITER = 500;\n\n\t this.bases = [];\n\t this.nbase = null;\n\t this.nregion = null;\n\t this.loop_count = null;\n\n\t this.root = new _loop.Loop();\n\t this.loops = [];\n\n\t this.regions = [];\n\n\t this.rlphead = new _radloop.Radloop();\n\n\t this.lencut = 0.8;\n\t this.RADIUS_REDUCTION_FACTOR = 1.4;\n\n\t // show algorithm step by step\n\t this.angleinc = null;\n\n\t this._h = null;\n\n\t // private boolean noIterationFailureYet = true;\n\n\t this.HELIX_FACTOR = 0.6;\n\t this.BACKBONE_DISTANCE = 27;\n\t}\n\n\tNAView.prototype.naview_xy_coordinates = function (pair_table) {\n\t var x = [];\n\t var y = [];\n\t if (pair_table.length === 0 || pair_table[0] === 0) {\n\t return 0;\n\t }\n\t var i;\n\t this.nbase = pair_table[0];\n\t this.bases = [];\n\t for (var index = 0; index < this.nbase + 1; index++) {\n\t this.bases.push(new _base.Base());\n\t }\n\t this.regions = [];\n\t for (var index = 0; index < this.nbase + 1; index++) {\n\t this.regions.push(new _region.Region());\n\t }\n\t this.read_in_bases(pair_table);\n\t this.rlphead = null;\n\t this.find_regions();\n\t this.loop_count = 0;\n\t this.loops = [];\n\t for (var index = 0; index < this.nbase + 1; index++) {\n\t this.loops.push(new _loop.Loop());\n\t }\n\t this.construct_loop(0);\n\t this.find_central_loop();\n\t this.traverse_loop(this.root, null);\n\n\t for (i = 0; i < this.nbase; i++) {\n\t x.push(100 + this.BACKBONE_DISTANCE * this.bases[i + 1].getX());\n\t y.push(100 + this.BACKBONE_DISTANCE * this.bases[i + 1].getY());\n\t }\n\n\t return {\n\t nbase: this.nbase,\n\t x: x,\n\t y: y\n\t };\n\t};\n\n\tNAView.prototype.read_in_bases = function read_in_bases(pair_table) {\n\t var i = null;\n\t var npairs = null;\n\n\t // Set up an origin.\n\t this.bases.push(new _base.Base());\n\t this.bases[0].setMate(0);\n\t this.bases[0].setExtracted(false);\n\t this.bases[0].setX(this.ANUM);\n\t this.bases[0].setY(this.ANUM);\n\n\t for (npairs = 0, i = 1; i <= this.nbase; i++) {\n\t this.bases.push(new _base.Base());\n\t this.bases[i].setExtracted(false);\n\t this.bases[i].setX(this.ANUM);\n\t this.bases[i].setY(this.ANUM);\n\t this.bases[i].setMate(pair_table[i]);\n\t if (pair_table[i] > i) npairs++;\n\t }\n\t // must have at least 1 pair to avoid segfault\n\t if (npairs == 0) {\n\t this.bases[1].setMate(this.nbase);\n\t this.bases[this.nbase].setMate(1);\n\t }\n\t};\n\n\tNAView.prototype.find_regions = function find_regions() {\n\t var i = null;\n\t var mate = null;\n\t var nb1 = null;\n\n\t nb1 = this.nbase + 1;\n\t var mark = [];\n\t for (i = 0; i < nb1; i++) {\n\t mark.push(false);\n\t }\n\t this.nregion = 0;\n\t for (i = 0; i <= this.nbase; i++) {\n\t if ((mate = this.bases[i].getMate()) != 0 && !mark[i]) {\n\t this.regions[this.nregion].setStart1(i);\n\t this.regions[this.nregion].setEnd2(mate);\n\t mark[i] = true;\n\t mark[mate] = true;\n\t this.bases[i].setRegion(this.regions[this.nregion]);\n\t this.bases[mate].setRegion(this.regions[this.nregion]);\n\t for (i++, mate--; i < mate && this.bases[i].getMate() == mate; i++, mate--) {\n\t mark[mate] = true;\n\t mark[i] = true;\n\t this.bases[i].setRegion(this.regions[this.nregion]);\n\t this.bases[mate].setRegion(this.regions[this.nregion]);\n\t }\n\t this.regions[this.nregion].setEnd1(--i);\n\t this.regions[this.nregion].setStart2(mate + 1);\n\n\t this.nregion++;\n\t }\n\t }\n\t};\n\n\tNAView.prototype.construct_loop = function construct_loop(ibase) {\n\t var i = null;\n\t var mate = null;\n\t var retloop = new _loop.Loop();\n\t var lp = new _loop.Loop();\n\t var cp = new _connection.Connection();\n\t var rp = new _region.Region();\n\t var rlp = new _radloop.Radloop();\n\t retloop = this.loops[this.loop_count++];\n\t retloop.setNconnection(0);\n\t retloop.setDepth(0);\n\t retloop.setNumber(this.loop_count);\n\t retloop.setRadius(0.0);\n\n\t for (rlp = this.rlphead; rlp != null; rlp = rlp.getNext()) {\n\t if (rlp.getLoopnumber() == this.loop_count) retloop.setRadius(rlp.getRadius());\n\t }i = ibase;\n\t do {\n\t if ((mate = this.bases[i].getMate()) != 0) {\n\t rp = this.bases[i].getRegion();\n\t if (!this.bases[rp.getStart1()].isExtracted()) {\n\t if (i == rp.getStart1()) {\n\t this.bases[rp.getStart1()].setExtracted(true);\n\t this.bases[rp.getEnd1()].setExtracted(true);\n\t this.bases[rp.getStart2()].setExtracted(true);\n\t this.bases[rp.getEnd2()].setExtracted(true);\n\t lp = this.construct_loop(rp.getEnd1() < this.nbase ? rp.getEnd1() + 1 : 0);\n\t } else if (i == rp.getStart2()) {\n\t this.bases[rp.getStart2()].setExtracted(true);\n\t this.bases[rp.getEnd2()].setExtracted(true);\n\t this.bases[rp.getStart1()].setExtracted(true);\n\t this.bases[rp.getEnd1()].setExtracted(true);\n\t lp = this.construct_loop(rp.getEnd2() < this.nbase ? rp.getEnd2() + 1 : 0);\n\t } else {\n\t console.log(\"Something went terribly wrong ....\");\n\t }\n\t retloop.setNconnection(retloop.getNconnection() + 1);\n\t cp = new _connection.Connection();\n\t retloop.setConnection(retloop.getNconnection() - 1, cp);\n\t retloop.setConnection(retloop.getNconnection(), null);\n\t cp.setLoop(lp);\n\t cp.setRegion(rp);\n\t if (i == rp.getStart1()) {\n\t cp.setStart(rp.getStart1());\n\t cp.setEnd(rp.getEnd2());\n\t } else {\n\t cp.setStart(rp.getStart2());\n\t cp.setEnd(rp.getEnd1());\n\t }\n\t cp.setExtruded(false);\n\t cp.setBroken(false);\n\t lp.setNconnection(lp.getNconnection() + 1);\n\t cp = new _connection.Connection();\n\t lp.setConnection(lp.getNconnection() - 1, cp);\n\t lp.setConnection(lp.getNconnection(), null);\n\t cp.setLoop(retloop);\n\t cp.setRegion(rp);\n\t if (i == rp.getStart1()) {\n\t cp.setStart(rp.getStart2());\n\t cp.setEnd(rp.getEnd1());\n\t } else {\n\t cp.setStart(rp.getStart1());\n\t cp.setEnd(rp.getEnd2());\n\t }\n\t cp.setExtruded(false);\n\t cp.setBroken(false);\n\t }\n\t i = mate;\n\t }\n\t if (++i > this.nbase) i = 0;\n\t } while (i != ibase);\n\t return retloop;\n\t};\n\n\tNAView.prototype.find_central_loop = function find_central_loop() {\n\t var lp = new _loop.Loop();\n\t var maxconn = null;\n\t var maxdepth = null;\n\t var i = null;\n\n\t determine_depths.bind(this)();\n\t maxconn = 0;\n\t maxdepth = -1;\n\t for (i = 0; i < this.loop_count; i++) {\n\t lp = this.loops[i];\n\t if (lp.getNconnection() > maxconn) {\n\t maxdepth = lp.getDepth();\n\t maxconn = lp.getNconnection();\n\t this.root = lp;\n\t } else if (lp.getDepth() > maxdepth && lp.getNconnection() == maxconn) {\n\t maxdepth = lp.getDepth();\n\t this.root = lp;\n\t }\n\t }\n\t};\n\n\tfunction determine_depths() {\n\t var lp = new _loop.Loop();\n\t var i = null;\n\t var j = null;\n\n\t for (i = 0; i < this.loop_count; i++) {\n\t lp = this.loops[i];\n\t for (j = 0; j < this.loop_count; j++) {\n\t this.loops[j].setMark(false);\n\t }\n\t lp.setDepth(depth(lp));\n\t }\n\t}\n\n\tfunction depth(lp) {\n\t var count = null;\n\t var ret = null;\n\t var d = null;\n\n\t if (lp.getNconnection() <= 1) {\n\t return 0;\n\t }\n\t if (lp.isMark()) {\n\t return -1;\n\t }\n\t lp.setMark(true);\n\t count = 0;\n\t ret = 0;\n\t for (var i = 0; lp.getConnection(i) != null; i++) {\n\t d = depth(lp.getConnection(i).getLoop());\n\t if (d >= 0) {\n\t if (++count == 1) {\n\t ret = d;\n\t } else if (ret > d) {\n\t ret = d;\n\t }\n\t }\n\t }\n\t lp.setMark(false);\n\t return ret + 1;\n\t}\n\n\tNAView.prototype.traverse_loop = function traverse_loop(lp, anchor_connection) {\n\t var xs, ys, xe, ye, xn, yn, angleinc, r;\n\t var radius, xc, yc, xo, yo, astart, aend, a;\n\t var cp, cpnext, acp, cpprev;\n\t var i, j, n, ic;\n\t var da, maxang;\n\t var count, icstart, icend, icmiddle, icroot;\n\t var done, done_all_connections, rooted;\n\t var sign;\n\t var midx, midy, nrx, nry, mx, my, vx, vy, dotmv, nmidx, nmidy;\n\t var icstart1, icup, icdown, icnext, direction;\n\t var dan, dx, dy, rr;\n\t var cpx, cpy, cpnextx, cpnexty, cnx, cny, rcn, rc, lnx, lny, rl, ac, acn, sx, sy, dcp;\n\t var imaxloop = 0;\n\n\t angleinc = 2 * Math.PI / (this.nbase + 1);\n\t acp = null;\n\t icroot = -1;\n\t var indice = 0;\n\n\t for (ic = 0; (cp = lp.getConnection(indice)) != null; indice++, ic++) {\n\t xs = -Math.sin(angleinc * cp.getStart());\n\t ys = Math.cos(angleinc * cp.getStart());\n\t xe = -Math.sin(angleinc * cp.getEnd());\n\t ye = Math.cos(angleinc * cp.getEnd());\n\t xn = ye - ys;\n\t yn = xs - xe;\n\t r = Math.sqrt(xn * xn + yn * yn);\n\t cp.setXrad(xn / r);\n\t cp.setYrad(yn / r);\n\t cp.setAngle(Math.atan2(yn, xn));\n\t if (cp.getAngle() < 0.0) {\n\t cp.setAngle(cp.getAngle() + 2 * Math.PI);\n\t }\n\t if (anchor_connection != null && anchor_connection.getRegion() == cp.getRegion()) {\n\t acp = cp;\n\t icroot = ic;\n\t }\n\t }\n\t set_radius: while (true) {\n\t this.determine_radius(lp, this.lencut);\n\t radius = lp.getRadius() / this.RADIUS_REDUCTION_FACTOR;\n\t if (anchor_connection == null) {\n\t xc = yc = 0.0;\n\t } else {\n\t xo = (this.bases[acp.getStart()].getX() + this.bases[acp.getEnd()].getX()) / 2.0;\n\t yo = (this.bases[acp.getStart()].getY() + this.bases[acp.getEnd()].getY()) / 2.0;\n\t xc = xo - radius * acp.getXrad();\n\t yc = yo - radius * acp.getYrad();\n\t }\n\n\t // The construction of the connectors will proceed in blocks of\n\t // connected connectors, where a connected connector pairs means two\n\t // connectors that are forced out of the drawn circle because they\n\t // are too close together in angle.\n\n\t // First, find the start of a block of connected connectors\n\n\t if (icroot == -1) {\n\t icstart = 0;\n\t } else {\n\t icstart = icroot;\n\t }\n\t cp = lp.getConnection(icstart);\n\t count = 0;\n\t done = false;\n\t do {\n\t j = icstart - 1;\n\t if (j < 0) {\n\t j = lp.getNconnection() - 1;\n\t }\n\t cpprev = lp.getConnection(j);\n\t if (!this.connected_connection(cpprev, cp)) {\n\t done = true;\n\t } else {\n\t icstart = j;\n\t cp = cpprev;\n\t }\n\t if (++count > lp.getNconnection()) {\n\t // Here everything is connected. Break on maximum angular\n\t // separation between connections.\n\t maxang = -1.0;\n\t for (ic = 0; ic < lp.getNconnection(); ic++) {\n\t j = ic + 1;\n\t if (j >= lp.getNconnection()) {\n\t j = 0;\n\t }\n\t cp = lp.getConnection(ic);\n\t cpnext = lp.getConnection(j);\n\t ac = cpnext.getAngle() - cp.getAngle();\n\t if (ac < 0.0) {\n\t ac += 2 * Math.PI;\n\t }\n\t if (ac > maxang) {\n\t maxang = ac;\n\t imaxloop = ic;\n\t }\n\t }\n\t icend = imaxloop;\n\t icstart = imaxloop + 1;\n\t if (icstart >= lp.getNconnection()) {\n\t icstart = 0;\n\t }\n\t cp = lp.getConnection(icend);\n\t cp.setBroken(true);\n\t done = true;\n\t }\n\t } while (!done);\n\t done_all_connections = false;\n\t icstart1 = icstart;\n\t while (!done_all_connections) {\n\t count = 0;\n\t done = false;\n\t icend = icstart;\n\t rooted = false;\n\t while (!done) {\n\t cp = lp.getConnection(icend);\n\t if (icend == icroot) {\n\t rooted = true;\n\t }\n\t j = icend + 1;\n\t if (j >= lp.getNconnection()) {\n\t j = 0;\n\t }\n\t cpnext = lp.getConnection(j);\n\t if (this.connected_connection(cp, cpnext)) {\n\t if (++count >= lp.getNconnection()) {\n\t break;\n\t }\n\t icend = j;\n\t } else {\n\t done = true;\n\t }\n\t }\n\t icmiddle = this.find_ic_middle(icstart, icend, anchor_connection, acp, lp);\n\t ic = icup = icdown = icmiddle;\n\t done = false;\n\t direction = 0;\n\t while (!done) {\n\t if (direction < 0) {\n\t ic = icup;\n\t } else if (direction == 0) {\n\t ic = icmiddle;\n\t } else {\n\t ic = icdown;\n\t }\n\t if (ic >= 0) {\n\t cp = lp.getConnection(ic);\n\t if (anchor_connection == null || acp != cp) {\n\t if (direction == 0) {\n\t astart = cp.getAngle() - Math.asin(1.0 / 2.0 / radius);\n\t aend = cp.getAngle() + Math.asin(1.0 / 2.0 / radius);\n\t this.bases[cp.getStart()].setX(xc + radius * Math.cos(astart));\n\t this.bases[cp.getStart()].setY(yc + radius * Math.sin(astart));\n\t this.bases[cp.getEnd()].setX(xc + radius * Math.cos(aend));\n\t this.bases[cp.getEnd()].setY(yc + radius * Math.sin(aend));\n\t } else if (direction < 0) {\n\t j = ic + 1;\n\t if (j >= lp.getNconnection()) {\n\t j = 0;\n\t }\n\t cp = lp.getConnection(ic);\n\t cpnext = lp.getConnection(j);\n\t cpx = cp.getXrad();\n\t cpy = cp.getYrad();\n\t ac = (cp.getAngle() + cpnext.getAngle()) / 2.0;\n\t if (cp.getAngle() > cpnext.getAngle()) {\n\t ac -= Math.PI;\n\t }\n\t cnx = Math.cos(ac);\n\t cny = Math.sin(ac);\n\t lnx = cny;\n\t lny = -cnx;\n\t da = cpnext.getAngle() - cp.getAngle();\n\t if (da < 0.0) {\n\t da += 2 * Math.PI;\n\t }\n\t if (cp.isExtruded()) {\n\t if (da <= Math.PI / 2) {\n\t rl = 2.0;\n\t } else {\n\t rl = 1.5;\n\t }\n\t } else {\n\t rl = 1.0;\n\t }\n\t this.bases[cp.getEnd()].setX(this.bases[cpnext.getStart()].getX() + rl * lnx);\n\t this.bases[cp.getEnd()].setY(this.bases[cpnext.getStart()].getY() + rl * lny);\n\t this.bases[cp.getStart()].setX(this.bases[cp.getEnd()].getX() + cpy);\n\t this.bases[cp.getStart()].setY(this.bases[cp.getEnd()].getY() - cpx);\n\t } else {\n\t j = ic - 1;\n\t if (j < 0) {\n\t j = lp.getNconnection() - 1;\n\t }\n\t cp = lp.getConnection(j);\n\t cpnext = lp.getConnection(ic);\n\t cpnextx = cpnext.getXrad();\n\t cpnexty = cpnext.getYrad();\n\t ac = (cp.getAngle() + cpnext.getAngle()) / 2.0;\n\t if (cp.getAngle() > cpnext.getAngle()) {\n\t ac -= Math.PI;\n\t }\n\t cnx = Math.cos(ac);\n\t cny = Math.sin(ac);\n\t lnx = -cny;\n\t lny = cnx;\n\t da = cpnext.getAngle() - cp.getAngle();\n\t if (da < 0.0) {\n\t da += 2 * Math.PI;\n\t }\n\t if (cp.isExtruded()) {\n\t if (da <= Math.PI / 2) {\n\t rl = 2.0;\n\t } else {\n\t rl = 1.5;\n\t }\n\t } else {\n\t rl = 1.0;\n\t }\n\t this.bases[cpnext.getStart()].setX(this.bases[cp.getEnd()].getX() + rl * lnx);\n\t this.bases[cpnext.getStart()].setY(this.bases[cp.getEnd()].getY() + rl * lny);\n\t this.bases[cpnext.getEnd()].setX(this.bases[cpnext.getStart()].getX() - cpnexty);\n\t this.bases[cpnext.getEnd()].setY(this.bases[cpnext.getStart()].getY() + cpnextx);\n\t }\n\t }\n\t }\n\t if (direction < 0) {\n\t if (icdown == icend) {\n\t icdown = -1;\n\t } else if (icdown >= 0) {\n\t if (++icdown >= lp.getNconnection()) {\n\t icdown = 0;\n\t }\n\t }\n\t direction = 1;\n\t } else {\n\t if (icup == icstart) {\n\t icup = -1;\n\t } else if (icup >= 0) {\n\t if (--icup < 0) {\n\t icup = lp.getNconnection() - 1;\n\t }\n\t }\n\t direction = -1;\n\t }\n\t done = icup == -1 && icdown == -1;\n\t }\n\t icnext = icend + 1;\n\t if (icnext >= lp.getNconnection()) {\n\t icnext = 0;\n\t }\n\t if (icend != icstart && !(icstart == icstart1 && icnext == icstart1)) {\n\n\t // Move the bases just constructed (or the radius) so that\n\t // the bisector of the end points is radius distance away\n\t // from the loop center.\n\n\t cp = lp.getConnection(icstart);\n\t cpnext = lp.getConnection(icend);\n\t dx = this.bases[cpnext.getEnd()].getX() - this.bases[cp.getStart()].getX();\n\t dy = this.bases[cpnext.getEnd()].getY() - this.bases[cp.getStart()].getY();\n\t midx = this.bases[cp.getStart()].getX() + dx / 2.0;\n\t midy = this.bases[cp.getStart()].getY() + dy / 2.0;\n\t rr = Math.sqrt(dx * dx + dy * dy);\n\t mx = dx / rr;\n\t my = dy / rr;\n\t vx = xc - midx;\n\t vy = yc - midy;\n\t rr = Math.sqrt(dx * dx + dy * dy);\n\t vx /= rr;\n\t vy /= rr;\n\t dotmv = vx * mx + vy * my;\n\t nrx = dotmv * mx - vx;\n\t nry = dotmv * my - vy;\n\t rr = Math.sqrt(nrx * nrx + nry * nry);\n\t nrx /= rr;\n\t nry /= rr;\n\n\t // Determine which side of the bisector the center should\n\t // be.\n\n\t dx = this.bases[cp.getStart()].getX() - xc;\n\t dy = this.bases[cp.getStart()].getY() - yc;\n\t ac = Math.atan2(dy, dx);\n\t if (ac < 0.0) {\n\t ac += 2 * Math.PI;\n\t }\n\t dx = this.bases[cpnext.getEnd()].getX() - xc;\n\t dy = this.bases[cpnext.getEnd()].getY() - yc;\n\t acn = Math.atan2(dy, dx);\n\t if (acn < 0.0) {\n\t acn += 2 * Math.PI;\n\t }\n\t if (acn < ac) {\n\t acn += 2 * Math.PI;\n\t }\n\t if (acn - ac > Math.PI) {\n\t sign = -1;\n\t } else {\n\t sign = 1;\n\t }\n\t nmidx = xc + sign * radius * nrx;\n\t nmidy = yc + sign * radius * nry;\n\t if (rooted) {\n\t xc -= nmidx - midx;\n\t yc -= nmidy - midy;\n\t } else {\n\t for (ic = icstart;;) {\n\t cp = lp.getConnection(ic);\n\t i = cp.getStart();\n\t this.bases[i].setX(this.bases[i].getX() + nmidx - midx);\n\t this.bases[i].setY(this.bases[i].getY() + nmidy - midy);\n\t i = cp.getEnd();\n\t this.bases[i].setX(this.bases[i].getX() + nmidx - midx);\n\t this.bases[i].setY(this.bases[i].getY() + nmidy - midy);\n\t if (ic == icend) {\n\t break;\n\t }\n\t if (++ic >= lp.getNconnection()) {\n\t ic = 0;\n\t }\n\t }\n\t }\n\t }\n\t icstart = icnext;\n\t done_all_connections = icstart == icstart1;\n\t }\n\t for (ic = 0; ic < lp.getNconnection(); ic++) {\n\t cp = lp.getConnection(ic);\n\t j = ic + 1;\n\t if (j >= lp.getNconnection()) {\n\t j = 0;\n\t }\n\t cpnext = lp.getConnection(j);\n\t dx = this.bases[cp.getEnd()].getX() - xc;\n\t dy = this.bases[cp.getEnd()].getY() - yc;\n\t rc = Math.sqrt(dx * dx + dy * dy);\n\t ac = Math.atan2(dy, dx);\n\t if (ac < 0.0) {\n\t ac += 2 * Math.PI;\n\t }\n\t dx = this.bases[cpnext.getStart()].getX() - xc;\n\t dy = this.bases[cpnext.getStart()].getY() - yc;\n\t rcn = Math.sqrt(dx * dx + dy * dy);\n\t acn = Math.atan2(dy, dx);\n\t if (acn < 0.0) {\n\t acn += 2 * Math.PI;\n\t }\n\t if (acn < ac) {\n\t acn += 2 * Math.PI;\n\t }\n\t dan = acn - ac;\n\t dcp = cpnext.getAngle() - cp.getAngle();\n\t if (dcp <= 0.0) {\n\t dcp += 2 * Math.PI;\n\t }\n\t if (Math.abs(dan - dcp) > Math.PI) {\n\t if (cp.isExtruded()) {\n\t console.log(\"Warning from traverse_loop. Loop \" + lp.getNumber() + \" has crossed regions\\n\");\n\t } else if (cpnext.getStart() - cp.getEnd() != 1) {\n\t cp.setExtruded(true);\n\t continue set_radius; // remplacement du goto\n\t }\n\t }\n\t if (cp.isExtruded()) {\n\t this.construct_extruded_segment(cp, cpnext);\n\t } else {\n\t n = cpnext.getStart() - cp.getEnd();\n\t if (n < 0) {\n\t n += this.nbase + 1;\n\t }\n\t angleinc = dan / n;\n\t for (j = 1; j < n; j++) {\n\t i = cp.getEnd() + j;\n\t if (i > this.nbase) {\n\t i -= this.nbase + 1;\n\t }\n\t a = ac + j * angleinc;\n\t rr = rc + (rcn - rc) * (a - ac) / dan;\n\t this.bases[i].setX(xc + rr * Math.cos(a));\n\t this.bases[i].setY(yc + rr * Math.sin(a));\n\t }\n\t }\n\t }\n\t break;\n\t }\n\t for (ic = 0; ic < lp.getNconnection(); ic++) {\n\t if (icroot != ic) {\n\t cp = lp.getConnection(ic);\n\t //IM HERE\n\t this.generate_region(cp);\n\t this.traverse_loop(cp.getLoop(), cp);\n\t }\n\t }\n\t n = 0;\n\t sx = 0.0;\n\t sy = 0.0;\n\t for (ic = 0; ic < lp.getNconnection(); ic++) {\n\t j = ic + 1;\n\t if (j >= lp.getNconnection()) {\n\t j = 0;\n\t }\n\t cp = lp.getConnection(ic);\n\t cpnext = lp.getConnection(j);\n\t n += 2;\n\t sx += this.bases[cp.getStart()].getX() + this.bases[cp.getEnd()].getX();\n\t sy += this.bases[cp.getStart()].getY() + this.bases[cp.getEnd()].getY();\n\t if (!cp.isExtruded()) {\n\t for (j = cp.getEnd() + 1; j != cpnext.getStart(); j++) {\n\t if (j > this.nbase) {\n\t j -= this.nbase + 1;\n\t }\n\t n++;\n\t sx += this.bases[j].getX();\n\t sy += this.bases[j].getY();\n\t }\n\t }\n\t }\n\t lp.setX(sx / n);\n\t lp.setY(sy / n);\n\t};\n\n\tNAView.prototype.determine_radius = function determine_radius(lp, lencut) {\n\t var mindit, ci, dt, sumn, sumd, radius, dit;\n\t var i,\n\t j,\n\t end,\n\t start,\n\t imindit = 0;\n\t var cp = new _connection.Connection(),\n\t cpnext = new _connection.Connection();\n\t var rt2_2 = 0.7071068;\n\n\t do {\n\t mindit = 1.0e10;\n\t for (sumd = 0.0, sumn = 0.0, i = 0; i < lp.getNconnection(); i++) {\n\t cp = lp.getConnection(i);\n\t j = i + 1;\n\t if (j >= lp.getNconnection()) {\n\t j = 0;\n\t }\n\t cpnext = lp.getConnection(j);\n\t end = cp.getEnd();\n\t start = cpnext.getStart();\n\t if (start < end) {\n\t start += this.nbase + 1;\n\t }\n\t dt = cpnext.getAngle() - cp.getAngle();\n\t if (dt <= 0.0) {\n\t dt += 2 * Math.PI;\n\t }\n\t if (!cp.isExtruded()) {\n\t ci = start - end;\n\t } else {\n\t if (dt <= Math.PI / 2) {\n\t ci = 2.0;\n\t } else {\n\t ci = 1.5;\n\t }\n\t }\n\t sumn += dt * (1.0 / ci + 1.0);\n\t sumd += dt * dt / ci;\n\t dit = dt / ci;\n\t if (dit < mindit && !cp.isExtruded() && ci > 1.0) {\n\t mindit = dit;\n\t imindit = i;\n\t }\n\t }\n\t radius = sumn / sumd;\n\t if (radius < rt2_2) {\n\t radius = rt2_2;\n\t }\n\t if (mindit * radius < lencut) {\n\t lp.getConnection(imindit).setExtruded(true);\n\t }\n\t } while (mindit * radius < lencut);\n\t if (lp.getRadius() > 0.0) {\n\t radius = lp.getRadius();\n\t } else {\n\t lp.setRadius(radius);\n\t }\n\t};\n\n\tNAView.prototype.find_ic_middle = function find_ic_middle(icstart, icend, anchor_connection, acp, lp) {\n\t var count, ret, ic, i;\n\t var done;\n\n\t count = 0;\n\t ret = -1;\n\t ic = icstart;\n\t done = false;\n\t while (!done) {\n\t if (count++ > lp.getNconnection() * 2) {\n\t console.log(\"Infinite loop in 'find_ic_middle'\");\n\t }\n\t if (anchor_connection != null && lp.getConnection(ic) == acp) {\n\t ret = ic;\n\t }\n\t done = ic == icend;\n\t if (++ic >= lp.getNconnection()) {\n\t ic = 0;\n\t }\n\t }\n\t if (ret == -1) {\n\t for (i = 1, ic = icstart; i < (count + 1) / 2; i++) {\n\t if (++ic >= lp.getNconnection()) ic = 0;\n\t }\n\t ret = ic;\n\t }\n\t return ret;\n\t};\n\n\tNAView.prototype.construct_extruded_segment = function construct_extruded_segment(cp, cpnext) {\n\t var astart, aend1, aend2, aave, dx, dy, a1, a2, ac, rr, da, dac;\n\t var start, end, n, nstart, nend;\n\t var collision;\n\n\t astart = cp.getAngle();\n\t aend2 = aend1 = cpnext.getAngle();\n\t if (aend2 < astart) {\n\t aend2 += 2 * Math.PI;\n\t }\n\t aave = (astart + aend2) / 2.0;\n\t start = cp.getEnd();\n\t end = cpnext.getStart();\n\t n = end - start;\n\t if (n < 0) {\n\t n += this.nbase + 1;\n\t }\n\t da = cpnext.getAngle() - cp.getAngle();\n\t if (da < 0.0) {\n\t da += 2 * Math.PI;\n\t }\n\t if (n == 2) {\n\t this.construct_circle_segment(start, end);\n\t } else {\n\t dx = this.bases[end].getX() - this.bases[start].getX();\n\t dy = this.bases[end].getY() - this.bases[start].getY();\n\t rr = Math.sqrt(dx * dx + dy * dy);\n\t dx /= rr;\n\t dy /= rr;\n\t if (rr >= 1.5 && da <= Math.PI / 2) {\n\t nstart = start + 1;\n\t if (nstart > this.nbase) {\n\t nstart -= this.nbase + 1;\n\t }\n\t nend = end - 1;\n\t if (nend < 0) {\n\t nend += this.nbase + 1;\n\t }\n\t this.bases[nstart].setX(this.bases[start].getX() + 0.5 * dx);\n\t this.bases[nstart].setY(this.bases[start].getY() + 0.5 * dy);\n\t this.bases[nend].setX(this.bases[end].getX() - 0.5 * dx);\n\t this.bases[nend].setY(this.bases[end].getY() - 0.5 * dy);\n\t start = nstart;\n\t end = nend;\n\t }\n\t do {\n\t collision = false;\n\t this.construct_circle_segment(start, end);\n\t nstart = start + 1;\n\t if (nstart > this.nbase) {\n\t nstart -= this.nbase + 1;\n\t }\n\t dx = this.bases[nstart].getX() - this.bases[start].getX();\n\t dy = this.bases[nstart].getY() - this.bases[start].getY();\n\t a1 = Math.atan2(dy, dx);\n\t if (a1 < 0.0) {\n\t a1 += 2 * Math.PI;\n\t }\n\t dac = a1 - astart;\n\t if (dac < 0.0) {\n\t dac += 2 * Math.PI;\n\t }\n\t if (dac > Math.PI) {\n\t collision = true;\n\t }\n\t nend = end - 1;\n\t if (nend < 0) {\n\t nend += this.nbase + 1;\n\t }\n\t dx = this.bases[nend].getX() - this.bases[end].getX();\n\t dy = this.bases[nend].getY() - this.bases[end].getY();\n\t a2 = Math.atan2(dy, dx);\n\t if (a2 < 0.0) {\n\t a2 += 2 * Math.PI;\n\t }\n\t dac = aend1 - a2;\n\t if (dac < 0.0) {\n\t dac += 2 * Math.PI;\n\t }\n\t if (dac > Math.PI) {\n\t collision = true;\n\t }\n\t if (collision) {\n\t ac = this.minf2(aave, astart + 0.5);\n\t this.bases[nstart].setX(this.bases[start].getX() + Math.cos(ac));\n\t this.bases[nstart].setY(this.bases[start].getY() + Math.sin(ac));\n\t start = nstart;\n\t ac = this.maxf2(aave, aend2 - 0.5);\n\t this.bases[nend].setX(this.bases[end].getX() + Math.cos(ac));\n\t this.bases[nend].setY(this.bases[end].getY() + Math.sin(ac));\n\t end = nend;\n\t n -= 2;\n\t }\n\t } while (collision && n > 1);\n\t }\n\t};\n\n\tNAView.prototype.construct_circle_segment = function construct_circle_segment(start, end) {\n\t var dx, dy, rr, midx, midy, xn, yn, nrx, nry, mx, my, a;\n\t var l, j, i;\n\n\t dx = this.bases[end].getX() - this.bases[start].getX();\n\t dy = this.bases[end].getY() - this.bases[start].getY();\n\t rr = Math.sqrt(dx * dx + dy * dy);\n\t l = end - start;\n\t if (l < 0) {\n\t l += this.nbase + 1;\n\t }\n\t if (rr >= l) {\n\t dx /= rr;\n\t dy /= rr;\n\t for (j = 1; j < l; j++) {\n\t i = start + j;\n\t if (i > this.nbase) {\n\t i -= this.nbase + 1;\n\t }\n\t this.bases[i].setX(this.bases[start].getX() + dx * j / l);\n\t this.bases[i].setY(this.bases[start].getY() + dy * j / l);\n\t }\n\t } else {\n\t this.find_center_for_arc(l - 1, rr);\n\t dx /= rr;\n\t dy /= rr;\n\t midx = this.bases[start].getX() + dx * rr / 2.0;\n\t midy = this.bases[start].getY() + dy * rr / 2.0;\n\t xn = dy;\n\t yn = -dx;\n\t nrx = midx + this._h * xn;\n\t nry = midy + this._h * yn;\n\t mx = this.bases[start].getX() - nrx;\n\t my = this.bases[start].getY() - nry;\n\t rr = Math.sqrt(mx * mx + my * my);\n\t a = Math.atan2(my, mx);\n\t for (j = 1; j < l; j++) {\n\t i = start + j;\n\t if (i > this.nbase) {\n\t i -= this.nbase + 1;\n\t }\n\t this.bases[i].setX(nrx + rr * Math.cos(a + j * this.angleinc));\n\t this.bases[i].setY(nry + rr * Math.sin(a + j * this.angleinc));\n\t }\n\t }\n\t};\n\n\tNAView.prototype.find_center_for_arc = function find_center_for_arc(n, b) {\n\t var h, hhi, hlow, r, disc, theta, e, phi;\n\t var iter;\n\n\t hhi = (n + 1.0) / Math.PI;\n\t // changed to prevent div by zero if (ih)\n\t hlow = -hhi - b / (n + 1.000001 - b);\n\t if (b < 1) {\n\t // otherwise we might fail below (ih)\n\t hlow = 0;\n\t }\n\t iter = 0;\n\t do {\n\t h = (hhi + hlow) / 2.0;\n\t r = Math.sqrt(h * h + b * b / 4.0);\n\t disc = 1.0 - 0.5 / (r * r);\n\t if (Math.abs(disc) > 1.0) {\n\t console.log(\"Unexpected large magnitude discriminant = \" + disc + \" \" + r);\n\t }\n\t theta = Math.acos(disc);\n\t phi = Math.acos(h / r);\n\t e = theta * (n + 1) + 2 * phi - 2 * Math.PI;\n\t if (e > 0.0) {\n\t hlow = h;\n\t } else {\n\t hhi = h;\n\t }\n\t } while (Math.abs(e) > 0.0001 && ++iter < this.MAXITER);\n\t if (iter >= this.MAXITER) {\n\t if (noIterationFailureYet) {\n\t console.log(\"Iteration failed in find_center_for_arc\");\n\t noIterationFailureYet = false;\n\t }\n\t h = 0.0;\n\t theta = 0.0;\n\t }\n\t this._h = h;\n\t this.angleinc = theta;\n\t};\n\n\tNAView.prototype.generate_region = function generate_region(cp) {\n\t var l, start, end, i, mate;\n\t var rp;\n\n\t rp = cp.getRegion();\n\t l = 0;\n\t if (cp.getStart() == rp.getStart1()) {\n\t start = rp.getStart1();\n\t end = rp.getEnd1();\n\t } else {\n\t start = rp.getStart2();\n\t end = rp.getEnd2();\n\t }\n\t if (this.bases[cp.getStart()].getX() > this.ANUM - 100.0 || this.bases[cp.getEnd()].getX() > this.ANUM - 100.0) {\n\t console.log(\"Bad region passed to generate_region. Coordinates not defined.\");\n\t }\n\t for (i = start + 1; i <= end; i++) {\n\t l++;\n\t this.bases[i].setX(this.bases[cp.getStart()].getX() + this.HELIX_FACTOR * l * cp.getXrad());\n\t this.bases[i].setY(this.bases[cp.getStart()].getY() + this.HELIX_FACTOR * l * cp.getYrad());\n\t mate = this.bases[i].getMate();\n\t this.bases[mate].setX(this.bases[cp.getEnd()].getX() + this.HELIX_FACTOR * l * cp.getXrad());\n\t this.bases[mate].setY(this.bases[cp.getEnd()].getY() + this.HELIX_FACTOR * l * cp.getYrad());\n\t }\n\t};\n\n\tNAView.prototype.minf2 = function minf2(x1, x2) {\n\t return x1 < x2 ? x1 : x2;\n\t};\n\n\tNAView.prototype.maxf2 = function maxf2(x1, x2) {\n\t return x1 > x2 ? x1 : x2;\n\t};\n\n\tNAView.prototype.connected_connection = function connected_connection(cp, cpnext) {\n\t if (cp.isExtruded()) {\n\t return true;\n\t } else if (cp.getEnd() + 1 == cpnext.getStart()) {\n\t return true;\n\t } else {\n\t return false;\n\t }\n\t};\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports) {\n\n\t\"use strict\";\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t\tvalue: true\n\t});\n\texports.Radloop = Radloop;\n\tfunction Radloop() {\n\t\tthis.radius = null;\n\t\tthis.loopnumber = null;\n\t\tthis.next = null;\n\t\tthis.prev = null;\n\t}\n\n\tRadloop.prototype.getRadius = function () {\n\t\treturn this.radius;\n\t};\n\n\tRadloop.prototype.setRadius = function (radius) {\n\t\tthis.radius = radius;\n\t};\n\n\tRadloop.prototype.getLoopnumber = function () {\n\t\treturn this.loopnumber;\n\t};\n\n\tRadloop.prototype.setLoopnumber = function (loopnumber) {\n\t\tthis.loopnumber = loopnumber;\n\t};\n\n\tRadloop.prototype.getNext = function () {\n\t\treturn this.next;\n\t};\n\n\tRadloop.prototype.setNext = function (next) {\n\t\tthis.next = next;\n\t};\n\n\tRadloop.prototype.getPrev = function () {\n\t\treturn this.prev;\n\t};\n\n\tRadloop.prototype.setPrev = function (prev) {\n\t\tthis.prev = prev;\n\t};\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t\tvalue: true\n\t});\n\texports.Connection = Connection;\n\n\tvar _loop = __webpack_require__(8);\n\n\tvar _region = __webpack_require__(9);\n\n\tfunction Connection() {\n\t\tthis.loop = new _loop.Loop();\n\t\tthis.region = new _region.Region();\n\t\t// Start and end form the 1st base pair of the region.\n\t\tthis.start = null;\n\t\tthis.end = null;\n\t\tthis.xrad = null;\n\t\tthis.yrad = null;\n\t\tthis.angle = null;\n\t\t// True if segment between this connection and the\n\t\t// next must be extruded out of the circle\n\t\tthis.extruded = null;\n\t\t// True if the extruded segment must be drawn long.\n\t\tthis.broken = null;\n\n\t\tthis._isNull = false;\n\t}\n\n\tConnection.prototype.isNull = function () {\n\t\treturn this._isNull;\n\t};\n\n\tConnection.prototype.setNull = function (isNull) {\n\t\tthis._isNull = isNull;\n\t};\n\n\tConnection.prototype.getLoop = function () {\n\t\treturn this.loop;\n\t};\n\n\tConnection.prototype.setLoop = function (loop) {\n\t\tthis.loop = loop;\n\t};\n\n\tConnection.prototype.getRegion = function () {\n\t\treturn this.region;\n\t};\n\n\tConnection.prototype.setRegion = function (region) {\n\t\tthis.region = region;\n\t};\n\n\tConnection.prototype.getStart = function () {\n\t\treturn this.start;\n\t};\n\n\tConnection.prototype.setStart = function (start) {\n\t\tthis.start = start;\n\t};\n\n\tConnection.prototype.getEnd = function () {\n\t\treturn this.end;\n\t};\n\n\tConnection.prototype.setEnd = function (end) {\n\t\tthis.end = end;\n\t};\n\n\tConnection.prototype.getXrad = function () {\n\t\treturn this.xrad;\n\t};\n\n\tConnection.prototype.setXrad = function (xrad) {\n\t\tthis.xrad = xrad;\n\t};\n\n\tConnection.prototype.getYrad = function () {\n\t\treturn this.yrad;\n\t};\n\n\tConnection.prototype.setYrad = function (yrad) {\n\t\tthis.yrad = yrad;\n\t};\n\n\tConnection.prototype.getAngle = function () {\n\t\treturn this.angle;\n\t};\n\n\tConnection.prototype.setAngle = function (angle) {\n\t\tthis.angle = angle;\n\t};\n\n\tConnection.prototype.isExtruded = function () {\n\t\treturn this.extruded;\n\t};\n\n\tConnection.prototype.setExtruded = function (extruded) {\n\t\tthis.extruded = extruded;\n\t};\n\n\tConnection.prototype.isBroken = function () {\n\t\treturn this.broken;\n\t};\n\n\tConnection.prototype.setBroken = function (broken) {\n\t\tthis.broken = broken;\n\t};\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t\tvalue: true\n\t});\n\texports.Loop = Loop;\n\n\tvar _connection = __webpack_require__(7);\n\n\tfunction Loop() {\n\t\tthis.nconnection = null;\n\t\tthis.connections = [];\n\t\tthis._connections = [];\n\t\tthis.number = null;\n\t\tthis.depth = null;\n\t\tthis.mark = null;\n\t\tthis.x = null;\n\t\tthis.y = null;\n\t\tthis.radius = null;\n\t}\n\n\tLoop.prototype.getNconnection = function () {\n\t\treturn this.nconnection;\n\t};\n\n\tLoop.prototype.setNconnection = function (nconnection) {\n\t\tthis.nconnection = nconnection;\n\t};\n\n\tLoop.prototype.setConnection = function (i, c) {\n\t\tif (c != null) {\n\t\t\tthis._connections[i] = c;\n\t\t} else {\n\t\t\tif (!this._connections[i]) {\n\t\t\t\tthis._connections[i] = new _connection.Connection();\n\t\t\t}\n\t\t\tthis._connections[i].setNull(true);\n\t\t}\n\t};\n\n\tLoop.prototype.getConnection = function (i) {\n\t\tvar Connection = __webpack_require__(7);\n\t\tif (!this._connections[i]) {\n\t\t\tthis._connections[i] = new Connection();\n\t\t}\n\t\tvar c = this._connections[i];\n\t\tif (c.isNull()) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn c;\n\t\t}\n\t};\n\n\tLoop.prototype.addConnection = function (i, c) {\n\t\tthis._connections.push(c);\n\t};\n\n\tLoop.prototype.getNumber = function () {\n\t\treturn this.number;\n\t};\n\n\tLoop.prototype.setNumber = function (number) {\n\t\tthis.number = number;\n\t};\n\n\tLoop.prototype.getDepth = function () {\n\t\treturn this.depth;\n\t};\n\n\tLoop.prototype.setDepth = function (depth) {\n\t\tthis.depth = depth;\n\t};\n\n\tLoop.prototype.isMark = function () {\n\t\treturn this.mark;\n\t};\n\n\tLoop.prototype.setMark = function (mark) {\n\t\tthis.mark = mark;\n\t};\n\n\tLoop.prototype.getX = function () {\n\t\treturn this.x;\n\t};\n\n\tLoop.prototype.setX = function (x) {\n\t\tthis.x = x;\n\t};\n\n\tLoop.prototype.getY = function () {\n\t\treturn this.y;\n\t};\n\n\tLoop.prototype.setY = function (y) {\n\t\tthis.y = y;\n\t};\n\n\tLoop.prototype.getRadius = function () {\n\t\treturn this.radius;\n\t};\n\n\tLoop.prototype.setRadius = function (radius) {\n\t\tthis.radius = radius;\n\t};\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t\"use strict\";\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t\tvalue: true\n\t});\n\texports.Region = Region;\n\tfunction Region() {\n\t\tthis._start1 = null;\n\t\tthis._end1 = null;\n\t\tthis._start2 = null;\n\t\tthis._end2 = null;\n\t}\n\n\tRegion.prototype.getStart1 = function () {\n\t\treturn this._start1;\n\t};\n\n\tRegion.prototype.setStart1 = function (start1) {\n\t\tthis._start1 = start1;\n\t};\n\n\tRegion.prototype.getEnd1 = function () {\n\t\treturn this._end1;\n\t};\n\n\tRegion.prototype.setEnd1 = function (end1) {\n\t\tthis._end1 = end1;\n\t};\n\n\tRegion.prototype.getStart2 = function () {\n\t\treturn this._start2;\n\t};\n\n\tRegion.prototype.setStart2 = function (start2) {\n\t\tthis._start2 = start2;\n\t};\n\n\tRegion.prototype.getEnd2 = function () {\n\t\treturn this._end2;\n\t};\n\n\tRegion.prototype.setEnd2 = function (end2) {\n\t\tthis._end2 = end2;\n\t};\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t\tvalue: true\n\t});\n\texports.Base = Base;\n\n\tvar _region = __webpack_require__(9);\n\n\tfunction Base() {\n\t\tthis.mate = null;\n\t\tthis.x = null;\n\t\tthis.y = null;\n\t\tthis.extracted = null;\n\t\tthis.region = new _region.Region();\n\t}\n\n\tBase.prototype.getMate = function () {\n\t\treturn this.mate;\n\t};\n\n\tBase.prototype.setMate = function (mate) {\n\t\tthis.mate = mate;\n\t};\n\n\tBase.prototype.getX = function () {\n\t\treturn this.x;\n\t};\n\n\tBase.prototype.setX = function (x) {\n\t\tthis.x = x;\n\t};\n\n\tBase.prototype.getY = function () {\n\t\treturn this.y;\n\t};\n\n\tBase.prototype.setY = function (y) {\n\t\tthis.y = y;\n\t};\n\n\tBase.prototype.isExtracted = function () {\n\t\treturn this.extracted;\n\t};\n\n\tBase.prototype.setExtracted = function (extracted) {\n\t\tthis.extracted = extracted;\n\t};\n\n\tBase.prototype.getRegion = function () {\n\t\treturn this.region;\n\t};\n\n\tBase.prototype.setRegion = function (region) {\n\t\tthis.region = region;\n\t};\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t// style-loader: Adds some css to the DOM by adding a