!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.PlotlyFinance=e()}}(function(){return function e(t,n,o){function r(a,l){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!l&&c)return c(a,!0);if(i)return i(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var f=n[a]={exports:{}};t[a][0].call(f.exports,function(e){var n=t[a][1][e];return r(n?n:e)},f,f.exports,e,t,n,o)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;aa&&(e[r]=i.slice(0,a))}if(void 0!==n)for(o=0;oa&&(e[r]=i.slice(0,a));return e}},{}],6:[function(e,t,n){"use strict";t.exports=function(e,t){if(void 0===t.dflt)return e;var n=[t.dflt];return void 0!==t.values?(n=n.concat(t.values),-1===n.indexOf(e)&&(e=t.dflt)):e=void 0===e?t.dflt:e,e}},{}],7:[function(e,t,n){"use strict";function o(e){this.open=e.open,this.high=e.high,this.low=e.low,this.close=e.close,this.len=this.open.length,this.x=e.dates[0]instanceof Date?e.dates.map(function(e){return e.getTime()}):this.open.map(function(e,t){return t})}t.exports=o;var r=o.prototype;r.getIncrData=function(){for(var e=this,t=["Low","Open","Close","High",""],n=[],o=[],r=[],i=[],a=[],l=[],c=0;ce.open[c]&&(n.push(e.x[c]),o.push(e.open[c]),r.push(e.close[c]-e.open[c]),i=i.concat([e.x[c],e.x[c],e.x[c],e.x[c],null]),a=a.concat([e.low[c],e.open[c],e.close[c],e.high[c],null]),l=l.concat(t));return{x:n,open:o,diff:r,xStick:i,yStick:a,text:l}},r.getDecrData=function(){for(var e=this,t=["Low","Close","Open","High",""],n=[],o=[],r=[],i=[],a=[],l=[],c=0;ce.open[t]?(e.incrX.push(e.allX[t]),e.incrY.push(e.allY[t])):(e.decrX.push(e.allX[t]),e.decrY.push(e.allY[t])))},i.getIncrData=function(){var e=this,t=[];return e.incrX.forEach(function(){t=t.concat(e.textSignature)}),{x:r(e.incrX),y:r(e.incrY),text:t}},i.getDecrData=function(){var e=this,t=[];return e.decrX.forEach(function(){t=t.concat(e.textSignature)}),{x:r(e.decrX),y:r(e.decrY),text:t}}},{"../lib/flatten-2d-array":4}],10:[function(e,t,n){"use strict";function o(e,t){var n=e.getIncrData();return l({type:"scatter",mode:"lines",x:n.x,y:n.y,text:a(t.text,{dflt:n.text}),name:a(t.name,{dflt:"Increasing"}),line:a(t.line,{dflt:{color:c.DEFAULT_INCREASING_COLOR,width:1}}),showlegend:void 0!==t.name},t)}function r(e,t){var n=e.getDecrData();return l({type:"scatter",mode:"lines",x:n.x,y:n.y,text:a(t.text,{dflt:n.text}),name:a(t.name,{dflt:"Decreasing"}),line:a(t.line,{dflt:{color:c.DEFAULT_DECREASING_COLOR,width:1}}),showlegend:a(t.showlegend,{dflt:!1,values:[!0,!1]})},t)}var i=e("../lib/set-arrays"),a=e("../lib/set-opt"),l=e("../lib/extend-flat"),c=e("../lib/consts"),s=e("./ohlc-factory"),f=e("./validate-data");t.exports=function(e,t){if(e=i(e,["open","high","low","close"],["dates"])){f(e),void 0===t&&(t={});var n=a(t.direction,{dflt:"both",values:["increasing","decreasing"]});delete t.direction;var l=new s(e),c=[];return-1!==["both","increasing"].indexOf(n)&&c.push(o(l,t)),-1!==["both","decreasing"].indexOf(n)&&c.push(r(l,t)),{data:c,layout:{xaxis:{type:e.dates[0]instanceof Date?"date":"linear",zeroline:!1},hovermode:"closest"}}}}},{"../lib/consts":2,"../lib/extend-flat":3,"../lib/set-arrays":5,"../lib/set-opt":6,"./ohlc-factory":9,"./validate-data":11}],11:[function(e,t,n){"use strict";t.exports=function(e){[e.open,e.low,e.close].forEach(function(t){e.high.forEach(function(e,n){if(et[n])throw new Error(["Oops! Looks like some of your low values","are greather than the corresponding open,","high, or close values."].join(" "))})})}},{}]},{},[1])(1)});