Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@redsift/d3-rs-core

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@redsift/d3-rs-core - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

7

dist/js/d3-rs-core.es2015.js

@@ -116,9 +116,4 @@ import { select } from 'd3-selection';

var index$1 = (index && typeof index === 'object' && 'default' in index ? index['default'] : index);
var BezierEasing = (index && typeof index === 'object' && 'default' in index ? index['default'] : index);
var BezierEasing = Object.freeze({
default: index$1
});
function circle(start, end, step, l, cx, cy, sx, sy) {

@@ -125,0 +120,0 @@ if (cx === undefined) cx = 0;

@@ -116,9 +116,4 @@ (function (global, factory) {

var index$1 = (index && typeof index === 'object' && 'default' in index ? index['default'] : index);
var BezierEasing = (index && typeof index === 'object' && 'default' in index ? index['default'] : index);
var BezierEasing = Object.freeze({
default: index$1
});
function circle(start, end, step, l, cx, cy, sx, sy) {

@@ -125,0 +120,0 @@ if (cx === undefined) cx = 0;

2

dist/js/d3-rs-core.umd.min.js

@@ -1,1 +0,1 @@

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("d3-selection"),require("d3-scale"),require("d3-axis"),require("d3-time-format"),require("d3-time")):"function"==typeof define&&define.amd?define(["exports","d3-selection","d3-scale","d3-axis","d3-time-format","d3-time"],n):n(t.RedsiftD3=t.RedsiftD3||{},t.d3,t.d3,t.d3,t.d3,t.d3)}(this,function(t,n,e,r,a,i){"use strict";function l(t,n){return n={exports:{}},t(n,n.exports),n.exports}function o(t,n,e,r,a,i,l,o){void 0===a&&(a=0),void 0===i&&(i=0),void 0===l&&(l=0),void 0===o&&(o=0);for(var u=[],s=t;n>=s;s+=e){var c=s/360*2*Math.PI-Math.PI/2,d=Math.sin(c),f=Math.cos(c),h=r*f+l*f,p=r*d+o*d;u.push([h+a,p+i])}return u}function u(t,n,e,r){var a=r-n,i=e-t,l=Math.atan2(a,i);return 180*l/Math.PI}function s(){function t(t){var A=3,M=!1;b>r&&(M=!0,A=2,a=4,c=8);var R=r/2-30,E=R+a,T=x+(p.length>0?w:0);t.each(function(t){function a(t,n){var e=t.valueText;void 0===e?e=s+m(t.value):"function"==typeof e&&(e=e()),v=n,b.select("#segment-label-"+n).classed("hover",!0).text(e)}function x(t){return{showTick:function(n,e){b.selectAll(t).filter(function(t,n){return n===e}).attr("style","opacity: 1.0")},hideAllTicks:function(){b.selectAll(t).attr("style","opacity: 0.0")}}}var w=d3.select(this).select("svg"),b=null,P=null,C=e+T,F=!1;w.empty()?(F=!0,w=y.svgRoot(this,C,r),b=w.append("g").attr("class",h+(M?" d3-small":"")).attr("transform","translate("+(e/2+T)+","+r/2+")")):(b=w.select("."+h),P=b.select(".segment-label")),w.attr("width",C).attr("height",r);var D=[1,d3.max(t,function(t){return t.value})],S=d3.scale.linear().domain(D).range([0,R]),B=t.map(function(t,n){return t.name}),I=B.length,O=d3.scale.linear().domain(D).range([0,-R]),z=b.selectAll("line").data(B);z.enter().append("line").classed("spokes",!0).attr("transform",function(t,n){return"rotate("+360*n/I+")"}),z.attr("y2",-R-c);var j=d3.svg.arc().startAngle(function(t,n){return 2*n*Math.PI/I}).endAngle(function(t,n){return 2*(n+1)*Math.PI/I}).innerRadius(0);b.selectAll(".segment-bg").data(t).enter().append("path").attr("class","segment-bg").each(function(t){t.outerRadius=R+2*c}).attr("d",j).on("mouseover",a).on("mouseout",function(t,n){var e=B[n];v=null,b.select("#segment-label-"+n).classed("hover",!1).text(e)});var L=b.selectAll(".segment").data(t);L.attr("class","update"),L.enter().append("path").attr("class","segment"),L.each(function(t,n){u?void 0!==t.animateFrom?t.outerRadius=S(t.animateFrom):t.outerRadius=0:t.outerRadius=S(t.value),n===v&&a(t,n)}).attr("d",j).attr("class",function(t){return"segment "+(t.classed?t.classed:"")}).style("fill",function(t){return"function"==typeof t.color?t.color():t.color}),L.exit().remove(),u&&L.transition().ease(u).duration(o).delay(function(t,n){return i+n*l}).attrTween("d",function(t,n){var e=d3.interpolate(t.outerRadius,S(t.value));return function(r){return t.outerRadius=e(r),j(t,n)}}).each("end",function(){f&&f()});var q=null,N=null,U=null;F?(q=b.append("circle").attr("class","outer-line"),N=b.append("g").attr("class","x axis label"),U=b.append("g").attr("class","xb axis label")):(q=b.select(".outer-line"),N=b.select(".x"),U=b.select(".xb")),q.attr("r",R);var G=(e+(T-k))/2;N.attr("transform","translate(-"+G+",0)"),U.attr("transform","translate(-"+G+",0)");var H=d3.svg.axis().scale(O).orient(d).ticks(A).tickFormat(function(t){return s+m(t)});u&&(N=N.transition().ease(u).duration(o)),N.call(H);var W=x(".tick-line");if(b.select(".x").selectAll("text").on("mouseover",W.showTick).on("mouseout",W.hideAllTicks),0!==p.length){u&&(U=U.transition().ease(u).duration(o));var J=d3.svg.axis().scale(O).orient("left"===d?"right":"left").tickValues([p]).tickFormat(function(t,n){if(g.length>n){var e=g[n];if(null!=e)return e}return s+m(t)});U.call(J),b.selectAll(".band-line").data(p).enter().append("circle").attr("r",function(t){return S(t)}).classed("band-line",!0);var V=x(".band-line");b.select(".xb").selectAll("text").on("mouseover",V.showTick).on("mouseout",V.hideAllTicks)}b.selectAll(".tick-line").data(O.ticks(A)).enter().append("circle").attr("r",function(t){return S(t)}).classed("tick-line",!0);var Y=null;null==P?(P=b.append("g").attr("class","segment-label label"),Y=P.append("def").append("path").attr("id","label-path-"+n)):Y=P.select("#label-path-"+n),Y.attr("d","m0 "+-E+" a"+E+" "+E+" 0 1,1 -0.01 0"),P.selectAll("text").data(B).enter().append("text").style("text-anchor","middle").append("textPath").attr("id",function(t,n){return"segment-label-"+n}).attr("xlink:href","#label-path-"+n).attr("startOffset",function(t,n){return 100*n/I+50/I+"%"}).text(function(t){return t})})}var n=A++,e=300,r=e,a=8,i=0,l=100,o=y.redsiftDuration(),u=y.redsiftEasing(),s="",c=14,d="left",f=null,h="d3-rc",p=[],g=[],v=null,m=d3.format(".0f"),x=50,w=40,k=30;return t.band=function(n,e){return arguments.length?(Array.isArray(n)||(n=[n]),Array.isArray(e)||(e=[e]),p=n,g=e,t):p},t.width=function(n){return arguments.length?(e=n,r=n,t):e},t.animationEnd=function(n){return arguments.length?(f=n,t):f},t.animation=function(n){return arguments.length?(u=n,t):u},t.animationDelay=function(n){return arguments.length?(i=n,t):i},t.animationSegmentDelay=function(n){return arguments.length?(l=n,t):l},t.animationDuration=function(n){return arguments.length?(o=n,t):o},t.prefix=function(n){return arguments.length?(s=n,t):s},t.labelOrient=function(n){return arguments.length?(d=n,t):d},t}function c(){function t(t){t.each(function(t){var l=y.svgRoot(this,n,e,"svg-padding-left svg-padding-top"),o=l.append("g").attr("class",r),u=1,s=t.map(function(t){return Array.isArray(t.color)?u=Math.max(u,t.color.length):t.color=[t.color],t}),c=o.selectAll("g").data(s).enter().append("g").attr("transform",function(t,n){return"translate(0,"+(1+n)*(a+i)+")"}),d=c.append("g").attr("class",function(t){return"swatch "+(t.classed?t.classed:"")}),f=(a+i)*u;d.selectAll("rect").data(function(t){return t.color}).enter().append("rect").style("fill",function(t){return t}).attr("x",function(t,n){return f-(a+i)*(n+1)}).attr("y",-a+i).attr("width",a).attr("height",a),c.append("text").attr("class","label").attr("x",f).text(function(t){return t.title})})}var n=300,e=n,r="d3-lc",a=16,i=4;return t.width=function(r){return arguments.length?(n=r,e=r,t):n},t.sample=function(n){return arguments.length?(a=n,t):a},t}function d(){function t(t){var u=d3.svg.arc().outerRadius(n).innerRadius(e);t.each(function(t){var n=d3.select(this).selectAll("path."+r).data(t);n.enter().append("path").attr("class",r),n.exit().remove(),o?n.transition().ease(o).duration(l).attr("d",u).each("end",function(){i&&i()}):n.attr("d",u),a&&n.style("fill",a)})}var n=100,e=0,r="pie",a=null,i=null,l=y.redsiftDuration(),o=y.redsiftEasing();return t.animationEnd=function(n){return arguments.length?(i=n,t):i},t.animation=function(n){return arguments.length?(o=n,t):o},t.animationDuration=function(n){return arguments.length?(l=n,t):l},t.fill=function(n){return arguments.length?(a=n,t):a},t.classed=function(n){return arguments.length?(r=n,t):r},t.outerRadius=function(e){return arguments.length?(n=e,t):n},t.innerRadius=function(n){return arguments.length?(e=n,t):e},t}function f(){function t(t){t.each(function(){var t,a=d3.select(this),i=a.text().split(n).reverse(),l=[],o=[],u=0,s=a.attr("x"),c=a.attr("y"),d=a.attr("width"),f=a.attr("height"),h=a.text(null).append("tspan");for(d=null!=d?parseInt(d):r,null!=f&&(f=parseInt(f));t=i.pop();)if(l.push(t),h.text(l.join(e)),h.node().getComputedTextLength()>d){l.pop(),h.attr("x",s).attr("y",c),o.push([h,u]);var p=h.node().getBBox();u+=p.height;var g=l.join(e);if(l=[t],null!=f&&u>f){h.text(g+"…"),h=null,l=[];break}h.text(g),h=a.append("tspan").text(null)}0!==l.length&&(h.text(l.join(e)),h.attr("x",s).attr("y",c),o.push([h,u])),o.forEach(function(t){t[0].attr("dy",t[1])})})}var n=/\s+/,e=" ",r=0;return t.width=function(n){return arguments.length?(r=n,t):r},t.split=function(e){return arguments.length?(n=e,t):n},t.join=function(n){return arguments.length?(e=n,t):e},t}function h(t){function e(){h=i-c-u}function r(){p=l-o-s}function a(e){var r=e.selection?e.selection():e,u=void 0!==e.selection;r.each(function(){var r=n.select(this),s=r.select(a.self());s.empty()&&(s=r.append("svg").attr("version","1.1").attr("xmlns","http://www.w3.org/2000/svg").attr("xmlns:xlink","http://www.w3.org/1999/xlink").attr("preserveAspectRatio","xMidYMid meet").attr("id",t),s.append("defs"),s.append("g").attr("class","inner"));var f=s.select("defs"),h=f.selectAll("style").data(g?[g]:[]);h.exit().remove(),h=h.enter().append("style").attr("type","text/css").merge(h),h.text(g);var p=s.select(a.child());s.attr("class",v),u===!0&&(s=s.transition(e),p=p.transition(e)),s.attr("width",i*d).attr("height",l*d).attr("viewBox","0 0 "+i+" "+l),p.attr("transform","translate("+c+","+o+")")})}var i=300,l=150,o=16,u=16,s=16,c=16,d=1,f="g.inner",h=-1,p=-1,g=null,v="svg-svg";return e(),r(),a.self=function(){return"svg"+(t?"#"+t:"")},a.child=function(){return f},a.childDefs=function(){return"defs"},a.childWidth=function(){return h},a.childHeight=function(){return p},a.id=function(){return t},a.classed=function(t){return arguments.length?(v=t,a):v},a.style=function(t){return arguments.length?(g=t,a):g},a.width=function(t){return arguments.length?(i=t,e(),a):i},a.height=function(t){return arguments.length?(l=t,r(),a):i},a.scale=function(t){return arguments.length?(d=t,a):d},a.margin=function(t){return arguments.length?(void 0!==t.top?(o=t.top,u=t.right,s=t.bottom,c=t.left):(o=t,u=t,s=t,c=t),e(),r(),a):{top:o,right:u,bottom:s,left:c}},a}function p(){function t(t){return 0!=t.getMinutes()}function n(t){t.each(function(t){var n=[d3.min(t,function(t){return t.start}),d3.max(t,function(t){return t.end})],h=t.filter(function(t){return null!=t.status});h=h.map(function(t,n){for(var e=0,r=0;r<h.length&&!(r>=n);r++){var a=h[r],i=a.start>=t.start&&a.start<t.end||a.end>t.start&&a.end<=t.end;i&&(e=a.index+1)}return t.index=e,t});var v=e.scaleTime().domain(n).rangeRound([0,l]),m=r.axisBottom().scale(v).tickFormat(a.timeFormat("%Hh")).ticks(i.timeMinute,30).tickPadding(4).tickSize(-o,0),x=d3.select(this).append("g").attr("class","schedule"),y=x.append("g").attr("class","x axis").attr("transform","translate(0, "+o+")").call(m);y.selectAll("g.x.axis g.tick text").attr("style",R).attr("transform","translate(-10,0)"),y.selectAll("g.x.axis g.tick line").attr("style",E);var w=x.append("g").attr("class","events"),k=w.selectAll("g.event").data(h).enter().append("g").attr("class","event").attr("transform",function(t){return"translate("+v(t.start)+","+t.index*(u+s)+")"});k.append("rect").attr("style",b).attr("width",function(t){return v(t.end)-v(t.start)}).attr("height",u);var T=f();k.append("text").attr("style",A).attr("x",c).attr("y",p).attr("width",function(t){return v(t.end)-v(t.start)-c-d}).attr("height",u-p-g).text(function(t){return console.log("d: "+JSON.stringify(t,null,4)),t.summary}).call(T),k.append("text").attr("class","symbol").attr("x",function(t){return v(t.end)-v(t.start)-d}).attr("y",u-g).attr("style",M).text("♚")})}var l=300,o=150,u=32,s=2,c=4,d=4,p=2,g=2,v="#7F736F",m="#AB9A94",x="#F7EEED",y="10px",w="12px",b=function(t){var n="#FFDF53",e="0.8";return"proposed"===t.status?(n="#50AFFA",e="1.0"):"confirmed"===t.status&&(n="#37D192"),"fill:"+n+";opacity:"+e},A=function(t){var n=v;return"proposed"===t.status&&(n=x),"dominant-baseline: text-before-edge; font-size: "+y+";fill:"+n},M=function(t){var n="none";return t.self===!0&&(n=x),"dominant-baseline: text-after-edge; text-anchor: end; font-size: "+y+";fill:"+n},R=function(n){var e=v;return t(n)&&(e="none"),"font-size: "+w+";fill: "+e},E=function(n){var e="1.6px";return t(n)&&(e="0.4px"),"stroke-width: "+e+";stroke: "+m};return n.width=function(t){return arguments.length?(l=t,n):l},n.height=function(t){return arguments.length?(o=t,n):o},n.eventHeight=function(t){return arguments.length?(u=t,n):u},n.eventPadding=function(t){return arguments.length?(s=t,n):s},n.textPadding=function(t){return arguments.length?(void 0!==t.top?(p=t.top,d=t.right,g=t.bottom,c=t.left):(p=t,d=t,g=t,c=t),n):{top:p,right:d,bottom:g,left:c}},n.rasterize=function(t,e,r,a,i){var l=1.91;null==a||0==a?a=Math.round(r/l):null!=r&&0!=r||(r=Math.round(a*l));var o=h().width(r).height(a).scale(i).style(k);n.width(o.childWidth()).height(o.childHeight());var u=t.call(o);u.select(o.child()).datum(e).call(n)},n}function g(){function t(t){var u=[],s=[];t.enter().append("g").attr("class",function(t,e){var r=e%2===0?" even":" odd";return n+r+" row-"+e}),t.exit().remove(),t.each(function(t){var n=d3.select(this).selectAll("."+e).data(t);n.enter().append("text").attr("class",function(t,n){var r=n%2===0?" even":" odd";return e+r+" column-"+n}),n.exit().remove(),n.attr("text-anchor",r).attr("dominant-baseline","text-before-edge").text(a);var i=[],l=[];n.each(function(){i.push(this.getBBox()),l.push(this)}),u.push(i),s.push(l)}),o&&o.selectAll(".grid").remove();for(var c=0,d=i,f=u.map(function(t){t&&t.length>c&&(c=t.length);var n=d3.max(t,function(t){return t.height});return void 0===n&&(n=0),d+=n+2*i,n}),h=[],p=0,g=0;c>g;g++){var v=u.map(function(t){return t&&t.length>g?t[g].width:0}),m=d3.max(v);if(h.push(m),o){var x=w.line().classed("grid column column-"+g).arrowStart(!1).arrowEnd(!1).interpolation(style);o.datum([[p,0],[p,d]]).call(x)}p+=m+2*l}if(o){var y=w.line().classed("grid end column column-"+g).arrowStart(!1).arrowEnd(!1).interpolation(style);o.datum([[p,0],[p,d]]).call(y)}var b=i,A=0;if(s.forEach(function(t,n){if(A=l,t.forEach(function(t,n){d3.select(t).attr("x",A).attr("y",b),A+=h[n]+2*l}),o){var e=w.line().classed("grid row row-"+n).arrowStart(!1).arrowEnd(!1).interpolation(style);A!==l&&o.datum([[0,b-i],[A-l,b-i]]).call(e)}b+=f[n]+2*i}),o){var k=w.line().classed("grid end row row-"+s.length).arrowStart(!1).arrowEnd(!1).interpolation(style);A!==l&&o.datum([[0,b],[A-l,b]]).call(k)}}var n="row",e="column",r="start",a=function(t){return t},i=0,l=0,o=null;return t.tx=function(n){return arguments.length?(l=n,t):l},t.ty=function(n){return arguments.length?(i=n,t):i},t.formatter=function(n){return arguments.length?(a=n,t):a},t.rowClassed=function(e){return arguments.length?(n=e,t):n},t.columnClassed=function(n){return arguments.length?(e=n,t):e},t.grid=function(n){return arguments.length?(o=n,t):o},t}var v=l(function(t){function n(t,n){return 1-3*n+3*t}function e(t,n){return 3*n-6*t}function r(t){return 3*t}function a(t,a,i){return((n(a,i)*t+e(a,i))*t+r(a))*t}function i(t,a,i){return 3*n(a,i)*t*t+2*e(a,i)*t+r(a)}function l(t,n,e,r,i){var l,o,u=0;do o=n+(e-n)/2,l=a(o,r,i)-t,l>0?e=o:n=o;while(Math.abs(l)>c&&++u<d);return o}function o(t,n,e,r){for(var l=0;u>l;++l){var o=i(n,e,r);if(0===o)return n;var s=a(n,e,r)-t;n-=s/o}return n}var u=4,s=.001,c=1e-7,d=10,f=11,h=1/(f-1),p="function"==typeof Float32Array;t.exports=function(t,n,e,r){function u(n){for(var r=0,a=1,u=f-1;a!==u&&c[a]<=n;++a)r+=h;--a;var d=(n-c[a])/(c[a+1]-c[a]),p=r+d*h,g=i(p,t,e);return g>=s?o(n,p,t,e):0===g?p:l(n,r,r+h,t,e)}if(!(t>=0&&1>=t&&e>=0&&1>=e))throw new Error("bezier x values must be in [0, 1] range");var c=p?new Float32Array(f):new Array(f);if(t!==n||e!==r)for(var d=0;f>d;++d)c[d]=a(d*h,t,e);return function(i){return t===n&&e===r?i:0===i?0:1===i?1:a(u(i),n,r)}}}),m=v&&"object"==typeof v&&"default"in v?v["default"]:v,x=Object.freeze({"default":m}),y={svgRoot:function(t,n,e,r){var a=d3.select(t).append("svg").attr("version","1.1").attr("xmlns","http://www.w3.org/2000/svg").attr("width",n).attr("height",e);return null!=r&&a.attr("class",r),a.node().setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),a},redsiftDuration:function(){return 400},redsiftEasing:function(){var t=this.redsiftBezier();return function(n){return t(n)}},redsiftBezier:function(){return x(.175,.885,.335,1.155)},preconnectTo:function(t){var n=document.createElement("link");n.rel="preconnect",n.href=t,document.head.appendChild(n)},createCSSRuleSheet:function(t){var n=document.createElement("style");t&&n.setAttribute("media",t),n.appendChild(document.createTextNode("")),document.head.appendChild(n);var e=n.sheet;return function(t,n,r){"insertRule"in e?e.insertRule(t+"{"+n+"}",r):"addRule"in e&&e.addRule(t,n,r)}},createShadowFilter:function(t,n,e,r,a,i){void 0===e&&(e=1),void 0===r&&(r="rgba(230,230,230,0.6)"),void 0===a&&(a=1.1),void 0===i&&(i="10px");var l=t.append("filter").attr("id",n).attr("x","-"+i).attr("y","-"+i).attr("width","120").attr("height","120");l.append("feMorphology").attr("operator","dilate").attr("radius",e).attr("in","SourceAlpha").attr("result","TEMPLATE"),l.append("feFlood").attr("flood-color",r).attr("result","COLOUR"),l.append("feComposite").attr("in","COLOUR").attr("in2","TEMPLATE").attr("operator","in").attr("result","TEMPLATE_COLOUR"),l.append("feGaussianBlur").attr("stdDeviation",a).attr("result","BG");var o=l.append("feMerge");o.append("feMergeNode").attr("in","BG"),o.append("feMergeNode").attr("in","SourceGraphic")},createDefs:function(t){void 0===t&&(t="body");var n=d3.select(t).append("svg").attr("style","display: block; width: 0px; height: 0px;").append("defs");return n},createMask:function(t,n,e){var r=t.append("mask").attr("id",n);return r.append("rect").attr("x",-200).attr("y",-200).attr("width",800).attr("height",800).attr("fill",e),r},createDiagonal:function(t,n,e,r,a,i){null==e?e=45:"object"==typeof e&&(i=e.s,r=e.w,a=e.h,e=e.ang),void 0===r&&(r=3),void 0===a&&(a=3),void 0===i&&(i=4);var l=t.append("pattern").attr("id",n).attr("width",i).attr("height",i).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate("+e+")");return l.append("rect").attr("class","background").attr("width",i).attr("height",i),l.append("rect").attr("class","foreground").attr("width",r).attr("height",a).attr("transform","translate(0,0)"),l},createCircle:o,arcLine:function(){function t(t){var a=d3.svg.line();n&&(a=a.interpolate(n));var i=180*t.startAngle/Math.PI,l=180*t.endAngle/Math.PI,u=o(i,l,e,r);return a(u)}var n=null,e=1,r=100;return t.interpolation=function(e){return arguments.length?(n=e,t):n},t.degreeSteps=function(n){return arguments.length?(e=n,t):e},t.outerRadius=function(n){return arguments.length?(r=n,t):r},t},scalePattern:function(t,n){return null==n||1===n?t:{ang:t.ang,w:t.w*n,h:t.h*n,s:t.s*n}}},w={line:function(){function t(t){t.each(function(t){if(null==t)return void console.log("no data for line");if(t.length<2)return void console.log(t.length+" data items not supported by line");Array.isArray(t[0])||(t=t.map(function(t){return[t.x,t.y]})),(c||d)&&(null==c&&(c=function(t){return t}),null==d&&(d=function(t){return t}),t=t.map(function(t){return[c(t[0]),d(t[1])]}));var f=t[0][0],h=t[0][1],p=t[t.length-1][0],g=t[t.length-1][1],v=o*l,m=s,x=l,y=d3.svg.line();null!=n&&(y=y.interpolate(n));var w=d3.select(this);if(i){var b=w.select("."+i);b.empty()&&(b=w.append("path").attr("class","bgstroke "+i)),b.attr("d",d3.svg.line()(t))}var A=w.select("."+e);A.empty()&&(A=w.append("path").attr("class",e)),A.attr("d",y(t));var k=e+" arrow",M=0;if(r){M=u(f,h,t[1][0],t[1][1]);var R=w.select("g.as."+e);R.empty()&&(R=w.append("g").attr("class","as "+e));var E=R.select("path");E.empty()&&(E=R.append("path").attr("class",k)),R.attr("transform","rotate("+M+", "+f+", "+h+")"),E.attr("d",y([[f+x-m,h+v],[f-m,h],[f+x-m,h-v]]))}a&&(M=u(p,g,t[t.length-2][0],t[t.length-2][1]),R=w.select("g.ae."+e),R.empty()&&(R=w.append("g").attr("class","ae "+e)),E=R.select("path"),E.empty()&&(E=R.append("path").attr("class",k)),R.attr("transform","rotate("+M+", "+p+", "+g+")"),E.attr("d",y([[p+x-m,g+v],[p-m,g],[p+x-m,g-v]])))})}var n=null,e="line",r=!0,a=!0,i=null,l=12,o=.4,s=6,c=null,d=null;return t.bgline=function(n){return arguments.length?(i=n,t):i},t.xscale=function(n){return arguments.length?(c=n,t):c},t.yscale=function(n){return arguments.length?(d=n,t):d},t.arrowStart=function(n){return arguments.length?(r=n,t):r},t.arrowEnd=function(n){return arguments.length?(a=n,t):a},t.classed=function(n){return arguments.length?(e=n,t):e},t.interpolation=function(e){return arguments.length?(n=e,t):n},t},box:function(){function t(t){t.each(function(t){if(void 0===t)return void console.log("no data for box");var s=d3.select(this),c=s.select("path."+e);if(c.empty()&&(c=s.append("path").attr("class",e)),Array.isArray(t)){if(t.length<4)return void console.log(t.length+" data items not supported by box")}else{if(t.t){var d=s.select("text."+e),f=1;d.empty()&&(d=s.append("text").attr("class",e),f=1),void 0!==a&&d.attr("text-anchor",a),void 0!==r&&d.attr("dominant-baseline",r);var h=t.tx||0,p=t.ty||0;d.attr("x",t.x+h).attr("y",t.y+p).text(t.t),o?d.attr("style",o):i&&d.attr("style",i);var g=d.node().getBBox();t.width=void 0===t.width?g.width*f+2*h:t.width,t.height=void 0===t.height?g.height+p:t.height,u&&(t.x=g.x-h,t.y=g.y-p)}t=[[t.x,t.y],[t.x,t.y+t.height],[t.x+t.width,t.y+t.height],[t.x+t.width,t.y],[t.x,t.y]]}var v=d3.svg.line();null!=n&&(v=v.interpolate(n)),c.attr("d",v(t)),l?c.attr("style",l):i&&c.attr("style",i)})}var n=null,e="box",r="hanging",a="start",i=null,l=null,o=null,u=!1;return t.bound=function(n){return arguments.length?(u=n,t):u},t.style=function(n){return arguments.length?(i=n,t):i},t.styleBox=function(n){return arguments.length?(l=n,t):l},t.styleText=function(n){return arguments.length?(o=n,t):o},t.anchor=function(n){return arguments.length?(a=n,t):a},t.baseline=function(n){return arguments.length?(r=n,t):r},t.classed=function(n){return arguments.length?(e=n,t):e},t.interpolation=function(e){return arguments.length?(n=e,t):n},t},spokes:function(){function t(t){t.each(function(t){var a=d3.svg.line().interpolate(e),i=d3.select(this).selectAll("path."+r).data(t);i.enter().append("path").attr("class",r),i.exit().remove(),i.attr("d",function(t,e){var r=n,i=t.startAngle-Math.PI/2,l=r*Math.cos(i),o=r*Math.sin(i),u=t.endAngle-Math.PI/2,s=r*Math.cos(u),c=r*Math.sin(u);return a([[s,c],[0,0],[l,o]])})})}var n=100,e=null,r="spokes";return t.classed=function(n){return arguments.length?(r=n,t):r},t.radius=function(e){return arguments.length?(n=e,t):n},t.interpolation=function(n){return arguments.length?(e=n,t):e},t},radial:function(){function t(t){t.each(function(){var t=d3.scale.linear().domain([0,a]).range([i,l]),o=d3.svg.line.radial().interpolate(e).radius(n).angle(function(n,e){return t(e)}),u=[];a>0&&(u=[d3.range(a+1)]);var s=d3.select(this).selectAll("path."+r).data(u);s.enter().append("path").attr("class",r),s.exit().remove(),s.attr("d",function(t){return o(t)})})}var n=100,e=null,r="radial",a=90,i=0,l=2*Math.PI;return t.startAngle=function(n){return arguments.length?(i=n,t):i},t.endAngle=function(n){return arguments.length?(l=n,t):l},t.classed=function(n){return arguments.length?(r=n,t):r},t.points=function(n){return arguments.length?(a=n,t):a},t.radius=function(e){return arguments.length?(n=e,t):n},t.interpolation=function(n){return arguments.length?(e=n,t):e},t}},b=200,A=0,k="text { font: 10px sans-serif; } \n",M={radialChart:s,legendChart:c,pieChart:d,scheduleChart:p,matrix:g,tspanWrap:f},R=33.75,E={Tools:y,Reusable:M,Components:w,Constants:{Angle:R,Patterns:{crosshatch1:{ang:45,w:4,h:4,s:5},crosshatch2:{ang:45,w:3,h:4,s:5},crosshatch3:{ang:45,w:3,h:3,s:5},diagonal1:{ang:R,w:5,h:4,s:5},diagonal2:{ang:R,w:5,h:3,s:5},diagonal3:{ang:R,w:5,h:2,s:5},blocks:{ang:0,w:3,h:4,s:5},redsift:{ang:R,w:3,h:3,s:5}}}};t.D3=E});
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("d3-selection"),require("d3-scale"),require("d3-axis"),require("d3-time-format"),require("d3-time")):"function"==typeof define&&define.amd?define(["exports","d3-selection","d3-scale","d3-axis","d3-time-format","d3-time"],n):n(t.RedsiftD3=t.RedsiftD3||{},t.d3,t.d3,t.d3,t.d3,t.d3)}(this,function(t,n,e,r,a,i){"use strict";function l(t,n){return n={exports:{}},t(n,n.exports),n.exports}function o(t,n,e,r,a,i,l,o){void 0===a&&(a=0),void 0===i&&(i=0),void 0===l&&(l=0),void 0===o&&(o=0);for(var u=[],s=t;n>=s;s+=e){var c=s/360*2*Math.PI-Math.PI/2,d=Math.sin(c),f=Math.cos(c),h=r*f+l*f,p=r*d+o*d;u.push([h+a,p+i])}return u}function u(t,n,e,r){var a=r-n,i=e-t,l=Math.atan2(a,i);return 180*l/Math.PI}function s(){function t(t){var b=3,M=!1;w>r&&(M=!0,b=2,a=4,c=8);var R=r/2-30,E=R+a,T=y+(p.length>0?A:0);t.each(function(t){function a(t,n){var e=t.valueText;void 0===e?e=s+m(t.value):"function"==typeof e&&(e=e()),v=n,A.select("#segment-label-"+n).classed("hover",!0).text(e)}function y(t){return{showTick:function(n,e){A.selectAll(t).filter(function(t,n){return n===e}).attr("style","opacity: 1.0")},hideAllTicks:function(){A.selectAll(t).attr("style","opacity: 0.0")}}}var w=d3.select(this).select("svg"),A=null,P=null,C=e+T,F=!1;w.empty()?(F=!0,w=x.svgRoot(this,C,r),A=w.append("g").attr("class",h+(M?" d3-small":"")).attr("transform","translate("+(e/2+T)+","+r/2+")")):(A=w.select("."+h),P=A.select(".segment-label")),w.attr("width",C).attr("height",r);var D=[1,d3.max(t,function(t){return t.value})],S=d3.scale.linear().domain(D).range([0,R]),B=t.map(function(t,n){return t.name}),I=B.length,O=d3.scale.linear().domain(D).range([0,-R]),z=A.selectAll("line").data(B);z.enter().append("line").classed("spokes",!0).attr("transform",function(t,n){return"rotate("+360*n/I+")"}),z.attr("y2",-R-c);var L=d3.svg.arc().startAngle(function(t,n){return 2*n*Math.PI/I}).endAngle(function(t,n){return 2*(n+1)*Math.PI/I}).innerRadius(0);A.selectAll(".segment-bg").data(t).enter().append("path").attr("class","segment-bg").each(function(t){t.outerRadius=R+2*c}).attr("d",L).on("mouseover",a).on("mouseout",function(t,n){var e=B[n];v=null,A.select("#segment-label-"+n).classed("hover",!1).text(e)});var j=A.selectAll(".segment").data(t);j.attr("class","update"),j.enter().append("path").attr("class","segment"),j.each(function(t,n){u?void 0!==t.animateFrom?t.outerRadius=S(t.animateFrom):t.outerRadius=0:t.outerRadius=S(t.value),n===v&&a(t,n)}).attr("d",L).attr("class",function(t){return"segment "+(t.classed?t.classed:"")}).style("fill",function(t){return"function"==typeof t.color?t.color():t.color}),j.exit().remove(),u&&j.transition().ease(u).duration(o).delay(function(t,n){return i+n*l}).attrTween("d",function(t,n){var e=d3.interpolate(t.outerRadius,S(t.value));return function(r){return t.outerRadius=e(r),L(t,n)}}).each("end",function(){f&&f()});var q=null,N=null,U=null;F?(q=A.append("circle").attr("class","outer-line"),N=A.append("g").attr("class","x axis label"),U=A.append("g").attr("class","xb axis label")):(q=A.select(".outer-line"),N=A.select(".x"),U=A.select(".xb")),q.attr("r",R);var G=(e+(T-k))/2;N.attr("transform","translate(-"+G+",0)"),U.attr("transform","translate(-"+G+",0)");var H=d3.svg.axis().scale(O).orient(d).ticks(b).tickFormat(function(t){return s+m(t)});u&&(N=N.transition().ease(u).duration(o)),N.call(H);var W=y(".tick-line");if(A.select(".x").selectAll("text").on("mouseover",W.showTick).on("mouseout",W.hideAllTicks),0!==p.length){u&&(U=U.transition().ease(u).duration(o));var J=d3.svg.axis().scale(O).orient("left"===d?"right":"left").tickValues([p]).tickFormat(function(t,n){if(g.length>n){var e=g[n];if(null!=e)return e}return s+m(t)});U.call(J),A.selectAll(".band-line").data(p).enter().append("circle").attr("r",function(t){return S(t)}).classed("band-line",!0);var V=y(".band-line");A.select(".xb").selectAll("text").on("mouseover",V.showTick).on("mouseout",V.hideAllTicks)}A.selectAll(".tick-line").data(O.ticks(b)).enter().append("circle").attr("r",function(t){return S(t)}).classed("tick-line",!0);var Y=null;null==P?(P=A.append("g").attr("class","segment-label label"),Y=P.append("def").append("path").attr("id","label-path-"+n)):Y=P.select("#label-path-"+n),Y.attr("d","m0 "+-E+" a"+E+" "+E+" 0 1,1 -0.01 0"),P.selectAll("text").data(B).enter().append("text").style("text-anchor","middle").append("textPath").attr("id",function(t,n){return"segment-label-"+n}).attr("xlink:href","#label-path-"+n).attr("startOffset",function(t,n){return 100*n/I+50/I+"%"}).text(function(t){return t})})}var n=b++,e=300,r=e,a=8,i=0,l=100,o=x.redsiftDuration(),u=x.redsiftEasing(),s="",c=14,d="left",f=null,h="d3-rc",p=[],g=[],v=null,m=d3.format(".0f"),y=50,A=40,k=30;return t.band=function(n,e){return arguments.length?(Array.isArray(n)||(n=[n]),Array.isArray(e)||(e=[e]),p=n,g=e,t):p},t.width=function(n){return arguments.length?(e=n,r=n,t):e},t.animationEnd=function(n){return arguments.length?(f=n,t):f},t.animation=function(n){return arguments.length?(u=n,t):u},t.animationDelay=function(n){return arguments.length?(i=n,t):i},t.animationSegmentDelay=function(n){return arguments.length?(l=n,t):l},t.animationDuration=function(n){return arguments.length?(o=n,t):o},t.prefix=function(n){return arguments.length?(s=n,t):s},t.labelOrient=function(n){return arguments.length?(d=n,t):d},t}function c(){function t(t){t.each(function(t){var l=x.svgRoot(this,n,e,"svg-padding-left svg-padding-top"),o=l.append("g").attr("class",r),u=1,s=t.map(function(t){return Array.isArray(t.color)?u=Math.max(u,t.color.length):t.color=[t.color],t}),c=o.selectAll("g").data(s).enter().append("g").attr("transform",function(t,n){return"translate(0,"+(1+n)*(a+i)+")"}),d=c.append("g").attr("class",function(t){return"swatch "+(t.classed?t.classed:"")}),f=(a+i)*u;d.selectAll("rect").data(function(t){return t.color}).enter().append("rect").style("fill",function(t){return t}).attr("x",function(t,n){return f-(a+i)*(n+1)}).attr("y",-a+i).attr("width",a).attr("height",a),c.append("text").attr("class","label").attr("x",f).text(function(t){return t.title})})}var n=300,e=n,r="d3-lc",a=16,i=4;return t.width=function(r){return arguments.length?(n=r,e=r,t):n},t.sample=function(n){return arguments.length?(a=n,t):a},t}function d(){function t(t){var u=d3.svg.arc().outerRadius(n).innerRadius(e);t.each(function(t){var n=d3.select(this).selectAll("path."+r).data(t);n.enter().append("path").attr("class",r),n.exit().remove(),o?n.transition().ease(o).duration(l).attr("d",u).each("end",function(){i&&i()}):n.attr("d",u),a&&n.style("fill",a)})}var n=100,e=0,r="pie",a=null,i=null,l=x.redsiftDuration(),o=x.redsiftEasing();return t.animationEnd=function(n){return arguments.length?(i=n,t):i},t.animation=function(n){return arguments.length?(o=n,t):o},t.animationDuration=function(n){return arguments.length?(l=n,t):l},t.fill=function(n){return arguments.length?(a=n,t):a},t.classed=function(n){return arguments.length?(r=n,t):r},t.outerRadius=function(e){return arguments.length?(n=e,t):n},t.innerRadius=function(n){return arguments.length?(e=n,t):e},t}function f(){function t(t){t.each(function(){var t,a=d3.select(this),i=a.text().split(n).reverse(),l=[],o=[],u=0,s=a.attr("x"),c=a.attr("y"),d=a.attr("width"),f=a.attr("height"),h=a.text(null).append("tspan");for(d=null!=d?parseInt(d):r,null!=f&&(f=parseInt(f));t=i.pop();)if(l.push(t),h.text(l.join(e)),h.node().getComputedTextLength()>d){l.pop(),h.attr("x",s).attr("y",c),o.push([h,u]);var p=h.node().getBBox();u+=p.height;var g=l.join(e);if(l=[t],null!=f&&u>f){h.text(g+"…"),h=null,l=[];break}h.text(g),h=a.append("tspan").text(null)}0!==l.length&&(h.text(l.join(e)),h.attr("x",s).attr("y",c),o.push([h,u])),o.forEach(function(t){t[0].attr("dy",t[1])})})}var n=/\s+/,e=" ",r=0;return t.width=function(n){return arguments.length?(r=n,t):r},t.split=function(e){return arguments.length?(n=e,t):n},t.join=function(n){return arguments.length?(e=n,t):e},t}function h(t){function e(){h=i-c-u}function r(){p=l-o-s}function a(e){var r=e.selection?e.selection():e,u=void 0!==e.selection;r.each(function(){var r=n.select(this),s=r.select(a.self());s.empty()&&(s=r.append("svg").attr("version","1.1").attr("xmlns","http://www.w3.org/2000/svg").attr("xmlns:xlink","http://www.w3.org/1999/xlink").attr("preserveAspectRatio","xMidYMid meet").attr("id",t),s.append("defs"),s.append("g").attr("class","inner"));var f=s.select("defs"),h=f.selectAll("style").data(g?[g]:[]);h.exit().remove(),h=h.enter().append("style").attr("type","text/css").merge(h),h.text(g);var p=s.select(a.child());s.attr("class",v),u===!0&&(s=s.transition(e),p=p.transition(e)),s.attr("width",i*d).attr("height",l*d).attr("viewBox","0 0 "+i+" "+l),p.attr("transform","translate("+c+","+o+")")})}var i=300,l=150,o=16,u=16,s=16,c=16,d=1,f="g.inner",h=-1,p=-1,g=null,v="svg-svg";return e(),r(),a.self=function(){return"svg"+(t?"#"+t:"")},a.child=function(){return f},a.childDefs=function(){return"defs"},a.childWidth=function(){return h},a.childHeight=function(){return p},a.id=function(){return t},a.classed=function(t){return arguments.length?(v=t,a):v},a.style=function(t){return arguments.length?(g=t,a):g},a.width=function(t){return arguments.length?(i=t,e(),a):i},a.height=function(t){return arguments.length?(l=t,r(),a):i},a.scale=function(t){return arguments.length?(d=t,a):d},a.margin=function(t){return arguments.length?(void 0!==t.top?(o=t.top,u=t.right,s=t.bottom,c=t.left):(o=t,u=t,s=t,c=t),e(),r(),a):{top:o,right:u,bottom:s,left:c}},a}function p(){function t(t){return 0!=t.getMinutes()}function n(t){t.each(function(t){var n=[d3.min(t,function(t){return t.start}),d3.max(t,function(t){return t.end})],h=t.filter(function(t){return null!=t.status});h=h.map(function(t,n){for(var e=0,r=0;r<h.length&&!(r>=n);r++){var a=h[r],i=a.start>=t.start&&a.start<t.end||a.end>t.start&&a.end<=t.end;i&&(e=a.index+1)}return t.index=e,t});var v=e.scaleTime().domain(n).rangeRound([0,l]),m=r.axisBottom().scale(v).tickFormat(a.timeFormat("%Hh")).ticks(i.timeMinute,30).tickPadding(4).tickSize(-o,0),x=d3.select(this).append("g").attr("class","schedule"),y=x.append("g").attr("class","x axis").attr("transform","translate(0, "+o+")").call(m);y.selectAll("g.x.axis g.tick text").attr("style",R).attr("transform","translate(-10,0)"),y.selectAll("g.x.axis g.tick line").attr("style",E);var w=x.append("g").attr("class","events"),A=w.selectAll("g.event").data(h).enter().append("g").attr("class","event").attr("transform",function(t){return"translate("+v(t.start)+","+t.index*(u+s)+")"});A.append("rect").attr("style",b).attr("width",function(t){return v(t.end)-v(t.start)}).attr("height",u);var T=f();A.append("text").attr("style",k).attr("x",c).attr("y",p).attr("width",function(t){return v(t.end)-v(t.start)-c-d}).attr("height",u-p-g).text(function(t){return console.log("d: "+JSON.stringify(t,null,4)),t.summary}).call(T),A.append("text").attr("class","symbol").attr("x",function(t){return v(t.end)-v(t.start)-d}).attr("y",u-g).attr("style",M).text("♚")})}var l=300,o=150,u=32,s=2,c=4,d=4,p=2,g=2,v="#7F736F",m="#AB9A94",x="#F7EEED",y="10px",w="12px",b=function(t){var n="#FFDF53",e="0.8";return"proposed"===t.status?(n="#50AFFA",e="1.0"):"confirmed"===t.status&&(n="#37D192"),"fill:"+n+";opacity:"+e},k=function(t){var n=v;return"proposed"===t.status&&(n=x),"dominant-baseline: text-before-edge; font-size: "+y+";fill:"+n},M=function(t){var n="none";return t.self===!0&&(n=x),"dominant-baseline: text-after-edge; text-anchor: end; font-size: "+y+";fill:"+n},R=function(n){var e=v;return t(n)&&(e="none"),"font-size: "+w+";fill: "+e},E=function(n){var e="1.6px";return t(n)&&(e="0.4px"),"stroke-width: "+e+";stroke: "+m};return n.width=function(t){return arguments.length?(l=t,n):l},n.height=function(t){return arguments.length?(o=t,n):o},n.eventHeight=function(t){return arguments.length?(u=t,n):u},n.eventPadding=function(t){return arguments.length?(s=t,n):s},n.textPadding=function(t){return arguments.length?(void 0!==t.top?(p=t.top,d=t.right,g=t.bottom,c=t.left):(p=t,d=t,g=t,c=t),n):{top:p,right:d,bottom:g,left:c}},n.rasterize=function(t,e,r,a,i){var l=1.91;null==a||0==a?a=Math.round(r/l):null!=r&&0!=r||(r=Math.round(a*l));var o=h().width(r).height(a).scale(i).style(A);n.width(o.childWidth()).height(o.childHeight());var u=t.call(o);u.select(o.child()).datum(e).call(n)},n}function g(){function t(t){var u=[],s=[];t.enter().append("g").attr("class",function(t,e){var r=e%2===0?" even":" odd";return n+r+" row-"+e}),t.exit().remove(),t.each(function(t){var n=d3.select(this).selectAll("."+e).data(t);n.enter().append("text").attr("class",function(t,n){var r=n%2===0?" even":" odd";return e+r+" column-"+n}),n.exit().remove(),n.attr("text-anchor",r).attr("dominant-baseline","text-before-edge").text(a);var i=[],l=[];n.each(function(){i.push(this.getBBox()),l.push(this)}),u.push(i),s.push(l)}),o&&o.selectAll(".grid").remove();for(var c=0,d=i,f=u.map(function(t){t&&t.length>c&&(c=t.length);var n=d3.max(t,function(t){return t.height});return void 0===n&&(n=0),d+=n+2*i,n}),h=[],p=0,g=0;c>g;g++){var v=u.map(function(t){return t&&t.length>g?t[g].width:0}),m=d3.max(v);if(h.push(m),o){var x=y.line().classed("grid column column-"+g).arrowStart(!1).arrowEnd(!1).interpolation(style);o.datum([[p,0],[p,d]]).call(x)}p+=m+2*l}if(o){var w=y.line().classed("grid end column column-"+g).arrowStart(!1).arrowEnd(!1).interpolation(style);o.datum([[p,0],[p,d]]).call(w)}var b=i,A=0;if(s.forEach(function(t,n){if(A=l,t.forEach(function(t,n){d3.select(t).attr("x",A).attr("y",b),A+=h[n]+2*l}),o){var e=y.line().classed("grid row row-"+n).arrowStart(!1).arrowEnd(!1).interpolation(style);A!==l&&o.datum([[0,b-i],[A-l,b-i]]).call(e)}b+=f[n]+2*i}),o){var k=y.line().classed("grid end row row-"+s.length).arrowStart(!1).arrowEnd(!1).interpolation(style);A!==l&&o.datum([[0,b],[A-l,b]]).call(k)}}var n="row",e="column",r="start",a=function(t){return t},i=0,l=0,o=null;return t.tx=function(n){return arguments.length?(l=n,t):l},t.ty=function(n){return arguments.length?(i=n,t):i},t.formatter=function(n){return arguments.length?(a=n,t):a},t.rowClassed=function(e){return arguments.length?(n=e,t):n},t.columnClassed=function(n){return arguments.length?(e=n,t):e},t.grid=function(n){return arguments.length?(o=n,t):o},t}var v=l(function(t){function n(t,n){return 1-3*n+3*t}function e(t,n){return 3*n-6*t}function r(t){return 3*t}function a(t,a,i){return((n(a,i)*t+e(a,i))*t+r(a))*t}function i(t,a,i){return 3*n(a,i)*t*t+2*e(a,i)*t+r(a)}function l(t,n,e,r,i){var l,o,u=0;do o=n+(e-n)/2,l=a(o,r,i)-t,l>0?e=o:n=o;while(Math.abs(l)>c&&++u<d);return o}function o(t,n,e,r){for(var l=0;u>l;++l){var o=i(n,e,r);if(0===o)return n;var s=a(n,e,r)-t;n-=s/o}return n}var u=4,s=.001,c=1e-7,d=10,f=11,h=1/(f-1),p="function"==typeof Float32Array;t.exports=function(t,n,e,r){function u(n){for(var r=0,a=1,u=f-1;a!==u&&c[a]<=n;++a)r+=h;--a;var d=(n-c[a])/(c[a+1]-c[a]),p=r+d*h,g=i(p,t,e);return g>=s?o(n,p,t,e):0===g?p:l(n,r,r+h,t,e)}if(!(t>=0&&1>=t&&e>=0&&1>=e))throw new Error("bezier x values must be in [0, 1] range");var c=p?new Float32Array(f):new Array(f);if(t!==n||e!==r)for(var d=0;f>d;++d)c[d]=a(d*h,t,e);return function(i){return t===n&&e===r?i:0===i?0:1===i?1:a(u(i),n,r)}}}),m=v&&"object"==typeof v&&"default"in v?v["default"]:v,x={svgRoot:function(t,n,e,r){var a=d3.select(t).append("svg").attr("version","1.1").attr("xmlns","http://www.w3.org/2000/svg").attr("width",n).attr("height",e);return null!=r&&a.attr("class",r),a.node().setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),a},redsiftDuration:function(){return 400},redsiftEasing:function(){var t=this.redsiftBezier();return function(n){return t(n)}},redsiftBezier:function(){return m(.175,.885,.335,1.155)},preconnectTo:function(t){var n=document.createElement("link");n.rel="preconnect",n.href=t,document.head.appendChild(n)},createCSSRuleSheet:function(t){var n=document.createElement("style");t&&n.setAttribute("media",t),n.appendChild(document.createTextNode("")),document.head.appendChild(n);var e=n.sheet;return function(t,n,r){"insertRule"in e?e.insertRule(t+"{"+n+"}",r):"addRule"in e&&e.addRule(t,n,r)}},createShadowFilter:function(t,n,e,r,a,i){void 0===e&&(e=1),void 0===r&&(r="rgba(230,230,230,0.6)"),void 0===a&&(a=1.1),void 0===i&&(i="10px");var l=t.append("filter").attr("id",n).attr("x","-"+i).attr("y","-"+i).attr("width","120").attr("height","120");l.append("feMorphology").attr("operator","dilate").attr("radius",e).attr("in","SourceAlpha").attr("result","TEMPLATE"),l.append("feFlood").attr("flood-color",r).attr("result","COLOUR"),l.append("feComposite").attr("in","COLOUR").attr("in2","TEMPLATE").attr("operator","in").attr("result","TEMPLATE_COLOUR"),l.append("feGaussianBlur").attr("stdDeviation",a).attr("result","BG");var o=l.append("feMerge");o.append("feMergeNode").attr("in","BG"),o.append("feMergeNode").attr("in","SourceGraphic")},createDefs:function(t){void 0===t&&(t="body");var n=d3.select(t).append("svg").attr("style","display: block; width: 0px; height: 0px;").append("defs");return n},createMask:function(t,n,e){var r=t.append("mask").attr("id",n);return r.append("rect").attr("x",-200).attr("y",-200).attr("width",800).attr("height",800).attr("fill",e),r},createDiagonal:function(t,n,e,r,a,i){null==e?e=45:"object"==typeof e&&(i=e.s,r=e.w,a=e.h,e=e.ang),void 0===r&&(r=3),void 0===a&&(a=3),void 0===i&&(i=4);var l=t.append("pattern").attr("id",n).attr("width",i).attr("height",i).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate("+e+")");return l.append("rect").attr("class","background").attr("width",i).attr("height",i),l.append("rect").attr("class","foreground").attr("width",r).attr("height",a).attr("transform","translate(0,0)"),l},createCircle:o,arcLine:function(){function t(t){var a=d3.svg.line();n&&(a=a.interpolate(n));var i=180*t.startAngle/Math.PI,l=180*t.endAngle/Math.PI,u=o(i,l,e,r);return a(u)}var n=null,e=1,r=100;return t.interpolation=function(e){return arguments.length?(n=e,t):n},t.degreeSteps=function(n){return arguments.length?(e=n,t):e},t.outerRadius=function(n){return arguments.length?(r=n,t):r},t},scalePattern:function(t,n){return null==n||1===n?t:{ang:t.ang,w:t.w*n,h:t.h*n,s:t.s*n}}},y={line:function(){function t(t){t.each(function(t){if(null==t)return void console.log("no data for line");if(t.length<2)return void console.log(t.length+" data items not supported by line");Array.isArray(t[0])||(t=t.map(function(t){return[t.x,t.y]})),(c||d)&&(null==c&&(c=function(t){return t}),null==d&&(d=function(t){return t}),t=t.map(function(t){return[c(t[0]),d(t[1])]}));var f=t[0][0],h=t[0][1],p=t[t.length-1][0],g=t[t.length-1][1],v=o*l,m=s,x=l,y=d3.svg.line();null!=n&&(y=y.interpolate(n));var w=d3.select(this);if(i){var b=w.select("."+i);b.empty()&&(b=w.append("path").attr("class","bgstroke "+i)),b.attr("d",d3.svg.line()(t))}var A=w.select("."+e);A.empty()&&(A=w.append("path").attr("class",e)),A.attr("d",y(t));var k=e+" arrow",M=0;if(r){M=u(f,h,t[1][0],t[1][1]);var R=w.select("g.as."+e);R.empty()&&(R=w.append("g").attr("class","as "+e));var E=R.select("path");E.empty()&&(E=R.append("path").attr("class",k)),R.attr("transform","rotate("+M+", "+f+", "+h+")"),E.attr("d",y([[f+x-m,h+v],[f-m,h],[f+x-m,h-v]]))}a&&(M=u(p,g,t[t.length-2][0],t[t.length-2][1]),R=w.select("g.ae."+e),R.empty()&&(R=w.append("g").attr("class","ae "+e)),E=R.select("path"),E.empty()&&(E=R.append("path").attr("class",k)),R.attr("transform","rotate("+M+", "+p+", "+g+")"),E.attr("d",y([[p+x-m,g+v],[p-m,g],[p+x-m,g-v]])))})}var n=null,e="line",r=!0,a=!0,i=null,l=12,o=.4,s=6,c=null,d=null;return t.bgline=function(n){return arguments.length?(i=n,t):i},t.xscale=function(n){return arguments.length?(c=n,t):c},t.yscale=function(n){return arguments.length?(d=n,t):d},t.arrowStart=function(n){return arguments.length?(r=n,t):r},t.arrowEnd=function(n){return arguments.length?(a=n,t):a},t.classed=function(n){return arguments.length?(e=n,t):e},t.interpolation=function(e){return arguments.length?(n=e,t):n},t},box:function(){function t(t){t.each(function(t){if(void 0===t)return void console.log("no data for box");var s=d3.select(this),c=s.select("path."+e);if(c.empty()&&(c=s.append("path").attr("class",e)),Array.isArray(t)){if(t.length<4)return void console.log(t.length+" data items not supported by box")}else{if(t.t){var d=s.select("text."+e),f=1;d.empty()&&(d=s.append("text").attr("class",e),f=1),void 0!==a&&d.attr("text-anchor",a),void 0!==r&&d.attr("dominant-baseline",r);var h=t.tx||0,p=t.ty||0;d.attr("x",t.x+h).attr("y",t.y+p).text(t.t),o?d.attr("style",o):i&&d.attr("style",i);var g=d.node().getBBox();t.width=void 0===t.width?g.width*f+2*h:t.width,t.height=void 0===t.height?g.height+p:t.height,u&&(t.x=g.x-h,t.y=g.y-p)}t=[[t.x,t.y],[t.x,t.y+t.height],[t.x+t.width,t.y+t.height],[t.x+t.width,t.y],[t.x,t.y]]}var v=d3.svg.line();null!=n&&(v=v.interpolate(n)),c.attr("d",v(t)),l?c.attr("style",l):i&&c.attr("style",i)})}var n=null,e="box",r="hanging",a="start",i=null,l=null,o=null,u=!1;return t.bound=function(n){return arguments.length?(u=n,t):u},t.style=function(n){return arguments.length?(i=n,t):i},t.styleBox=function(n){return arguments.length?(l=n,t):l},t.styleText=function(n){return arguments.length?(o=n,t):o},t.anchor=function(n){return arguments.length?(a=n,t):a},t.baseline=function(n){return arguments.length?(r=n,t):r},t.classed=function(n){return arguments.length?(e=n,t):e},t.interpolation=function(e){return arguments.length?(n=e,t):n},t},spokes:function(){function t(t){t.each(function(t){var a=d3.svg.line().interpolate(e),i=d3.select(this).selectAll("path."+r).data(t);i.enter().append("path").attr("class",r),i.exit().remove(),i.attr("d",function(t,e){var r=n,i=t.startAngle-Math.PI/2,l=r*Math.cos(i),o=r*Math.sin(i),u=t.endAngle-Math.PI/2,s=r*Math.cos(u),c=r*Math.sin(u);return a([[s,c],[0,0],[l,o]])})})}var n=100,e=null,r="spokes";return t.classed=function(n){return arguments.length?(r=n,t):r},t.radius=function(e){return arguments.length?(n=e,t):n},t.interpolation=function(n){return arguments.length?(e=n,t):e},t},radial:function(){function t(t){t.each(function(){var t=d3.scale.linear().domain([0,a]).range([i,l]),o=d3.svg.line.radial().interpolate(e).radius(n).angle(function(n,e){return t(e)}),u=[];a>0&&(u=[d3.range(a+1)]);var s=d3.select(this).selectAll("path."+r).data(u);s.enter().append("path").attr("class",r),s.exit().remove(),s.attr("d",function(t){return o(t)})})}var n=100,e=null,r="radial",a=90,i=0,l=2*Math.PI;return t.startAngle=function(n){return arguments.length?(i=n,t):i},t.endAngle=function(n){return arguments.length?(l=n,t):l},t.classed=function(n){return arguments.length?(r=n,t):r},t.points=function(n){return arguments.length?(a=n,t):a},t.radius=function(e){return arguments.length?(n=e,t):n},t.interpolation=function(n){return arguments.length?(e=n,t):e},t}},w=200,b=0,A="text { font: 10px sans-serif; } \n",k={radialChart:s,legendChart:c,pieChart:d,scheduleChart:p,matrix:g,tspanWrap:f},M=33.75,R={Tools:x,Reusable:k,Components:y,Constants:{Angle:M,Patterns:{crosshatch1:{ang:45,w:4,h:4,s:5},crosshatch2:{ang:45,w:3,h:4,s:5},crosshatch3:{ang:45,w:3,h:3,s:5},diagonal1:{ang:M,w:5,h:4,s:5},diagonal2:{ang:M,w:5,h:3,s:5},diagonal3:{ang:M,w:5,h:2,s:5},blocks:{ang:0,w:3,h:4,s:5},redsift:{ang:M,w:3,h:3,s:5}}}};t.D3=R});
{
"name": "@redsift/d3-rs-core",
"version": "0.1.1",
"version": "0.1.2",
"description": "Core library with common functionality to be used by D3 components.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -1,2 +0,2 @@

import * as BezierEasing from 'bezier-easing';
import BezierEasing from 'bezier-easing';

@@ -3,0 +3,0 @@ function circle(start, end, step, l, cx, cy, sx, sy) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc