text: webpackJsonp([8],{511:function(t,e){t.exports=function(t){function e(t){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",t)}try{"undefined"!=typeof execScript&&function(){return"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener}()?execScript(t):"undefined"!=typeof eval?eval.call(null,t):e("EvalError: No eval function available")}catch(t){e(t)}}},512:function(t,e,n){"use strict";function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(0),l=n.n(s),o=n(6),u=n.n(o),h=n(17),c=(n.n(h),Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t}),d=function(){function t(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,n,a){return n&&t(e.prototype,n),a&&t(e,a),e}}(),p=function(t){function e(t){return a(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return r(e,t),d(e,[{key:"componentWillMount",value:function(){}},{key:"genId",value:function(){if(this.props.name)return this.props.name;var t="jarviswidget-"+e.counter++;return t=t.toLowerCase().replace(/\W+/gm,"-"),t=location.pathname.substr(1).replace(/\//g,"-")+"--"+t}},{key:"render",value:function(){var t=this,e=this.props.color?"jarviswidget-color-"+this.props.color:"",n=u()("jarviswidget",e,{"jarviswidget-sortable":1==this.props.sortable}),a={};return this.widgetId=this.genId(),["colorbutton","editbutton","togglebutton","deletebutton","fullscreenbutton","custombutton","sortable"].forEach(function(e){t.props[e]||(a["data-widget-"+e]=!1)}),["hidden","collapsed"].forEach(function(e){t.props[e]&&(a["data-widget-"+e]=!0)}),["refresh","load"].forEach(function(e){t.props[e]&&(a["data-widget-"+e]=t.props[e])}),l.a.createElement("div",c({className:n,id:this.widgetId,ref:"widget"},a),this.props.children)}},{key:"componentDidMount",value:function(){$(this.refs[this.widgetId]).find(".widget-body").prepend("")}}]),e}(l.a.Component);p.counter=0,p.defaultProps={colorbutton:!1,editbutton:!1,togglebutton:!1,deletebutton:!1,fullscreenbutton:!1,custombutton:!1,collapsed:!1,sortable:!1,hidden:!1,color:!1,load:!1,refresh:!1};var m=p;e.a=m,p.Body=l.a.createClass({displayName:"Body",render:function(){var t=c({},this.props),e=t.children,n=t.props;return l.a.createElement("div",n,this.props.editbutton?l.a.createElement("div",{className:"jarviswidget-editbox"},l.a.createElement("input",{className:"form-control",type:"text"})):null,l.a.createElement("div",{className:"widget-body"},e))}});!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(p,"JarvisWidget","/home/this/WebstormProjects/trading-charts-demo/src/app/components/widgets/JarvisWidget.js"),__REACT_HOT_LOADER__.register(m,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/components/widgets/JarvisWidget.js"))}()},513:function(t,e,n){"use strict";function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",function(){return p});var s=n(519),l=(n.n(s),n(0)),o=n.n(l),u=n(17),h=(n.n(u),function(){function t(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,n,a){return n&&t(e.prototype,n),a&&t(e,a),e}}()),c=function(t){function e(){return a(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return r(e,t),h(e,[{key:"barChart",value:function(t){var e=t.data("sparkline-bar-color")||t.css("color")||"#0000f0",n=t.data("sparkline-height")||"26px",a=t.data("sparkline-barwidth")||5,i=t.data("sparkline-barspacing")||2,r=t.data("sparkline-negbar-color")||"#A90329",s=t.data("sparkline-barstacked-color")||["#A90329","#0099c6","#98AA56","#da532c","#4490B1","#6E9461","#990099","#B4CAD3"];t.sparkline(this.props.values||"html",{barColor:e,type:"bar",height:n,barWidth:a,barSpacing:i,stackedBarColor:s,negBarColor:r,zeroAxis:"false",tooltipContainer:this.container})}},{key:"lineChart",value:function(t){var e=t.data("sparkline-height")||"20px",n=t.data("sparkline-width")||"90px",a=t.data("sparkline-line-color")||t.css("color")||"#0000f0",i=t.data("sparkline-line-width")||1,r=t.data("fill-color")||"#c0d0f0",s=t.data("sparkline-spot-color")||"#f08000",l=t.data("sparkline-minspot-color")||"#ed1c24",o=t.data("sparkline-maxspot-color")||"#f08000",u=t.data("sparkline-highlightspot-color")||"#50f050",h=t.data("sparkline-highlightline-color")||"f02020",c=t.data("sparkline-spotradius")||1.5,d=t.data("sparkline-min-y"),p=t.data("sparkline-max-y"),m=t.data("sparkline-min-x"),f=t.data("sparkline-max-x"),g=t.data("min-val"),v=t.data("max-val"),y=t.data("norm-color")||"#c0c0c0",b=t.data("draw-normal")||!1;t.sparkline(this.props.values||"html",{type:"line",width:n,height:e,lineWidth:i,lineColor:a,fillColor:r,spotColor:s,minSpotColor:l,maxSpotColor:o,highlightSpotColor:u,highlightLineColor:h,spotRadius:c,chartRangeMin:d,chartRangeMax:p,chartRangeMinX:m,chartRangeMaxX:f,normalRangeMin:g,normalRangeMax:v,normalRangeColor:y,drawNormalOnTop:b,tooltipContainer:this.container})}},{key:"pieChart",value:function(t){var e=t.data("sparkline-piecolor")||["#B4CAD3","#4490B1","#98AA56","#da532c","#6E9461","#0099c6","#990099","#717D8A"],n=t.data("sparkline-piesize")||90,a=t.data("border-color")||"#45494C",i=t.data("sparkline-offset")||0;t.sparkline(this.props.values||"html",{type:"pie",width:n,height:n,tooltipFormat:'<span style="color: {{color}}">&#9679;</span> ({{percent.1}}%)',sliceColors:e,borderWidth:1,offset:i,borderColor:a,tooltipContainer:this.container})}},{key:"boxChart",value:function(t){var e=t.data("sparkline-width")||"auto",n=t.data("sparkline-height")||"auto",a=t.data("sparkline-boxraw"),i=t.data("sparkline-targetval"),r=t.data("sparkline-min"),s=t.data("sparkline-max"),l=t.data("sparkline-showoutlier")||!0,o=t.data("sparkline-outlier-iqr")||1.5,u=t.data("sparkline-spotradius")||1.5,h=t.css("color")||"#000000",c=t.data("fill-color")||"#c0d0f0",d=t.data("sparkline-whis-color")||"#000000",p=t.data("sparkline-outline-color")||"#303030",m=t.data("sparkline-outlinefill-color")||"#f0f0f0",f=t.data("sparkline-outlinemedian-color")||"#f00000",g=t.data("sparkline-outlinetarget-color")||"#40a020";t.sparkline(this.props.values||"html",{type:"box",width:e,height:n,raw:a,target:i,minValue:r,maxValue:s,showOutliers:l,outlierIQR:o,spotRadius:u,boxLineColor:h,boxFillColor:c,whiskerColor:d,outlierLineColor:p,outlierFillColor:m,medianColor:f,targetColor:g,tooltipContainer:this.container})}},{key:"bulletChart",value:function(t){var e=t.data("sparkline-height")||"auto",n=t.data("sparkline-width")||2,a=t.data("sparkline-bullet-color")||"#ed1c24",i=t.data("sparkline-performance-color")||"#3030f0",r=t.data("sparkline-bulletrange-color")||["#d3dafe","#a8b6ff","#7f94ff"];t.sparkline(this.props.values||"html",{type:"bullet",height:e,targetWidth:n,targetColor:a,performanceColor:i,rangeColors:r,tooltipContainer:this.container})}},{key:"discreteChart",value:function(t){var e=t.data("sparkline-height")||26,n=t.data("sparkline-width")||50,a=t.css("color"),i=t.data("sparkline-line-height")||5,r=t.data("sparkline-threshold"),s=t.data("sparkline-threshold-color")||"#ed1c24";t.sparkline(this.props.values||"html",{type:"discrete",width:n,height:e,lineColor:a,lineHeight:i,thresholdValue:r,thresholdColor:s,tooltipContainer:this.container})}},{key:"tristaneChart",value:function(t){var e=t.data("sparkline-height")||26,n=t.data("sparkline-posbar-color")||"#60f060",a=t.data("sparkline-negbar-color")||"#f04040",i=t.data("sparkline-zerobar-color")||"#909090",r=t.data("sparkline-barwidth")||5,s=t.data("sparkline-barspacing")||2,l=t.data("sparkline-zeroaxis");t.sparkline(this.props.values||"html",{type:"tristate",height:e,posBarColor:n,negBarColor:a,zeroBarColor:i,barWidth:r,barSpacing:s,zeroAxis:l,tooltipContainer:this.container})}},{key:"compositeBarChart",value:function(t){var e=t.data("sparkline-height")||"20px",n=t.data("sparkline-width")||"100%",a=t.data("sparkline-barwidth")||3,i=t.data("sparkline-line-width")||1,r=t.data("sparkline-color-top")||"#ed1c24",s=t.data("sparkline-color-bottom")||"#333333";t.sparkline(t.data("sparkline-bar-val"),{type:"bar",width:n,height:e,barColor:s,barWidth:a,tooltipContainer:this.container}),t.sparkline(t.data("sparkline-line-val"),{width:n,height:e,lineColor:r,lineWidth:i,composite:!0,fillColor:!1,tooltipContainer:this.container})}},{key:"compositeLineChart",value:function(t){var e=t.data("sparkline-height"),n=t.data("sparkline-width"),a=t.data("sparkline-bar-val"),i=t.data("sparkline-bar-val-spots-top"),r=t.data("sparkline-bar-val-spots-bottom"),s=t.data("sparkline-line-width-top"),l=t.data("sparkline-line-width-bottom"),o=t.data("sparkline-color-top"),u=t.data("sparkline-color-bottom"),h=t.data("sparkline-spotradius-top"),c=t.data("sparkline-spotradius-bottom"),d=t.data("sparkline-spot-color"),p=t.data("sparkline-minspot-color-top"),m=t.data("sparkline-maxspot-color-top"),f=t.data("sparkline-minspot-color-bottom"),g=t.data("sparkline-maxspot-color-bottom"),v=t.data("sparkline-highlightspot-color-top"),y=t.data("sparkline-highlightline-color-top"),b=t.data("sparkline-highlightspot-color-bottom"),k=t.data("sparkline-highlightline-color-bottom"),w=t.data("sparkline-fillcolor-top"),x=t.data("sparkline-fillcolor-bottom");t.sparkline(a,{type:"line",spotRadius:h,spotColor:d,minSpotColor:p,maxSpotColor:m,highlightSpotColor:v,highlightLineColor:y,valueSpots:i,lineWidth:s,width:n,height:e,lineColor:o,fillColor:w,tooltipContainer:this.container}),t.sparkline(t.data("sparkline-line-val"),{type:"line",spotRadius:c,spotColor:d,minSpotColor:f,maxSpotColor:g,highlightSpotColor:b,highlightLineColor:k,valueSpots:r,lineWidth:l,width:n,height:e,lineColor:u,composite:!0,fillColor:x,tooltipContainer:this.container})}},{key:"drawElement",value:function(t){var e=$(t),n=e.data("sparkline-type")||"bar";"bar"==n&&this.barChart(e),"line"==n&&this.lineChart(e),"pie"==n&&this.pieChart(e),"box"==n&&this.boxChart(e),"bullet"==n&&this.bulletChart(e),"discrete"==n&&this.discreteChart(e),"tristate"==n&&this.tristaneChart(e),"compositebar"==n&&this.compositeBarChart(e),"compositeline"==n&&this.compositeLineChart(e)}},{key:"drawSparklines",value:function(){var t=this,e=n.i(u.findDOMNode)(this);if(this.props.values)this.drawElement(e);else{var a=$(e).find(".sparkline:not(:has(>canvas))");[].forEach.call(a,function(e){t.drawElement(e)})}}},{key:"componentDidUpdate",value:function(){this.drawSparklines()}},{key:"componentDidMount",value:function(){this.drawSparklines()}},{key:"render",value:function(){var t=this.props.className+(this.props.values?" sparkline":"");return o.a.createElement("div",{className:t},this.props.children)}}]),e}(o.a.Component),d=c;e.b=d;var p=function(t){function e(){return a(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return r(e,t),e}(c);!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(c,"SparklineContainer","/home/this/WebstormProjects/trading-charts-demo/src/app/components/graphs/inline/SparklineContainer.js"),__REACT_HOT_LOADER__.register(p,"Sparkline","/home/this/WebstormProjects/trading-charts-demo/src/app/components/graphs/inline/SparklineContainer.js"),__REACT_HOT_LOADER__.register(d,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/components/graphs/inline/SparklineContainer.js"))}()},514:function(t,e,n){"use strict";function a(t,e){var n={};for(var a in t)e.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(t,a)&&(n[a]=t[a]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var l=n(0),o=n.n(l),u=n(513),h=function(){function t(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,n,a){return n&&t(e.prototype,n),a&&t(e,a),e}}(),c=function(t){function e(){var t,n,a,s;i(this,e);for(var l=arguments.length,o=Array(l),u=0;u<l;u++)o[u]=arguments[u];return n=a=r(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(o))),a.state={id:1,charts:[{id:1,values:[110,150,300,130,400,240,220,310,220,300,270,210]}]},a.handleAddChart=function(){var t;return(t=a).__handleAddChart__REACT_HOT_LOADER__.apply(t,arguments)},a.handleDeleteChart=function(){var t;return(t=a).__handleDeleteChart__REACT_HOT_LOADER__.apply(t,arguments)},s=n,r(a,s)}return s(e,t),h(e,[{key:"__handleDeleteChart__REACT_HOT_LOADER__",value:function(){return this.__handleDeleteChart__REACT_HOT_LOADER__.apply(this,arguments)}},{key:"__handleAddChart__REACT_HOT_LOADER__",value:function(){return this.__handleAddChart__REACT_HOT_LOADER__.apply(this,arguments)}},{key:"__handleAddChart__REACT_HOT_LOADER__",value:function(){var t=this.state.id,e=this.state.charts;t++;for(var n=[],a=0;a<10;a++)n.push(Math.floor(51*Math.random())+50);e.push({id:t,values:n}),this.setState({id:t,charts:e})}},{key:"__handleDeleteChart__REACT_HOT_LOADER__",value:function(t){var e=this.state.charts;this.setState({charts:e.filter(function(e){return e.id!==t})})}},{key:"render",value:function(){var t=this,e=this.state.charts,n=this.props,i=n.className;a(n,["className"]);return o.a.createElement("div",{className:"col-xs-12 col-sm-12 col-md-12 col-lg-12"},o.a.createElement("button",{className:"btn btn-default btn-xs",onClick:this.handleAddChart},o.a.createElement("i",{className:"fa fa-plus"})," chart"),o.a.createElement("ul",{id:"sparks",className:i,style:{textAlign:"left"}},e.map(function(e,n){return o.a.createElement("li",{key:n,className:"sparks-info"},o.a.createElement("div",{style:{textAlign:"center"}},"value ",e.id," ",o.a.createElement("button",{value:e.id,className:"btn btn-danger btn-xs",onClick:t.handleDeleteChart.bind(t,e.id)},o.a.createElement("i",{className:"fa fa-minus"}))),o.a.createElement(u.a,{className:"custom-sparkline txt-color-blue",values:e.values}))})))}}]),e}(o.a.Component),d=c;e.a=d;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(c,"Stats","/home/this/WebstormProjects/trading-charts-demo/src/app/components/common/Stats.js"),__REACT_HOT_LOADER__.register(d,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/components/common/Stats.js"))}()},515:function(t,e,n){"use strict";function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(0),l=n.n(s),o=n(70),u=n.n(o),h=function(){function t(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,n,a){return n&&t(e.prototype,n),a&&t(e,a),e}}(),c=function(t){function e(t){a(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={items:n.props.items||[],icon:n.props.icon||"fa fa-fw fa-home"},n}return r(e,t),h(e,[{key:"componentWillMount",value:function(){}},{key:"onNavigationChange",value:function(t){var e=t.item;e.route&&(this.state.items=[],this.state.icon="",this._addCrumb(e),this.forceUpdate())}},{key:"_addCrumb",value:function(t){this.state.items.unshift(t.title),!this.state.icon&&t.icon&&(this.state.icon=t.icon),t.parent&&this._addCrumb(t.parent)}},{key:"render",value:function(){var t=u.a.head(this.state.items);return l.a.createElement("div",{className:this.props.className+" big-breadcrumbs"},l.a.createElement("h1",{className:"page-title txt-color-blueDark"},l.a.createElement("i",{className:this.state.icon})," "+t,u.a.tail(this.state.items).map(function(t){return l.a.createElement("span",{key:u.a.uniqueId("big-breadcrumb-")},l.a.createElement("span",{className:"page-title-separator"},">"),t)})))}}]),e}(l.a.Component),d=c;e.a=d;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(c,"BigBreadcrumbs","/home/this/WebstormProjects/trading-charts-demo/src/app/components/navigation/components/BigBreadcrumbs.js"),__REACT_HOT_LOADER__.register(d,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/components/navigation/components/BigBreadcrumbs.js"))}()},516:function(t,e,n){"use strict";var a={grid:"article",widgets:".jarviswidget",localStorage:!0,deleteSettingsKey:"#deletesettingskey-options",settingsKeyLabel:"Reset settings?",deletePositionKey:"#deletepositionkey-options",positionKeyLabel:"Reset position?",sortable:!0,buttonsHidden:!1,toggleButton:!0,toggleClass:"fa fa-minus | fa fa-plus",toggleSpeed:200,onToggle:function(){},deleteButton:!0,deleteMsg:"Warning: This action cannot be undone!",deleteClass:"fa fa-times",deleteSpeed:200,onDelete:function(){},editButton:!0,editPlaceholder:".jarviswidget-editbox",editClass:"fa fa-cog | fa fa-save",editSpeed:200,onEdit:function(){},colorButton:!0,fullscreenButton:!0,fullscreenClass:"fa fa-expand | fa fa-compress",fullscreenDiff:3,onFullscreen:function(){},customButton:!1,customClass:"folder-10 | next-10",customStart:function(){alert("Hello you, this is a custom button...")},customEnd:function(){alert("bye, till next time...")},buttonOrder:"%refresh% %custom% %edit% %toggle% %fullscreen% %delete%",opacity:1,dragHandle:"> header",placeholderClass:"jarviswidget-placeholder",indicator:!0,indicatorTime:600,ajax:!0,timestampPlaceholder:".jarviswidget-timestamp",timestampFormat:"Last update: %m%/%d%/%y% %h%:%i%:%s%",refreshButton:!0,refreshButtonClass:"fa fa-refresh",labelError:"Sorry but there was a error:",labelUpdated:"Last Update:",labelRefresh:"Refresh",labelDelete:"Delete widget:",afterLoad:function(){},rtl:!1,onChange:function(){},onSave:function(){},ajaxnav:!0};e.a=a;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(a,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/components/widgets/WidgetDefaults.js")}()},517:function(t,e,n){"use strict";function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(520),l=(n.n(s),n(0)),o=n.n(l),u=n(516),h=function(){function t(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,n,a){return n&&t(e.prototype,n),a&&t(e,a),e}}(),c=function(t){function e(){return a(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return r(e,t),h(e,[{key:"render",value:function(){var t=this;return o.a.createElement("section",{id:"widget-grid",ref:function(e){return t.grid=e}},this.props.children)}},{key:"componentDidMount",value:function(){$(this.grid).jarvisWidgets(u.a)}}]),e}(o.a.Component),d=c;e.a=d;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(c,"WidgetGrid","/home/this/WebstormProjects/trading-charts-demo/src/app/components/widgets/WidgetGrid.js"),__REACT_HOT_LOADER__.register(d,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/components/widgets/WidgetGrid.js"))}()},518:function(t,e){t.exports="/**\n*\n* jquery.sparkline.js\n*\n* v@VERSION@\n* (c) Splunk, Inc\n* Contact: Gareth Watts (gareth@splunk.com)\n* http://omnipotent.net/jquery.sparkline/\n*\n* Generates inline sparkline charts from data supplied either to the method\n* or inline in HTML\n*\n* Compatible with Internet Explorer 6.0+ and modern browsers equipped with the canvas tag\n* (Firefox 2.0+, Safari, Opera, etc)\n*\n* License: New BSD License\n*\n* Copyright (c) 2012, Splunk Inc.\n* All rights reserved.\n*\n* Redistribution and use in source and binary forms, with or without modification,\n* are permitted provided that the following conditions are met:\n*\n*     * Redistributions of source code must retain the above copyright notice,\n*       this 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*     * Neither the name of Splunk Inc nor the names of its contributors may\n*       be used to endorse or promote products derived from this software without\n*       specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY\n* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT\n* SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT\n* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*\n*\n* Usage:\n*  $(selector).sparkline(values, options)\n*\n* If values is undefined or set to 'html' then the data values are read from the specified tag:\n*   <p>Sparkline: <span class=\"sparkline\">1,4,6,6,8,5,3,5</span></p>\n*   $('.sparkline').sparkline();\n* There must be no spaces in the enclosed data set\n*\n* Otherwise values must be an array of numbers or null values\n*    <p>Sparkline: <span id=\"sparkline1\">This text replaced if the browser is compatible</span></p>\n*    $('#sparkline1').sparkline([1,4,6,6,8,5,3,5])\n*    $('#sparkline2').sparkline([1,4,6,null,null,5,3,5])\n*\n* Values can also be specified in an HTML comment, or as a values attribute:\n*    <p>Sparkline: <span class=\"sparkline\">\x3c!--1,4,6,6,8,5,3,5 --\x3e</span></p>\n*    <p>Sparkline: <span class=\"sparkline\" values=\"1,4,6,6,8,5,3,5\"></span></p>\n*    $('.sparkline').sparkline();\n*\n* For line charts, x values can also be specified:\n*   <p>Sparkline: <span class=\"sparkline\">1:1,2.7:4,3.4:6,5:6,6:8,8.7:5,9:3,10:5</span></p>\n*    $('#sparkline1').sparkline([ [1,1], [2.7,4], [3.4,6], [5,6], [6,8], [8.7,5], [9,3], [10,5] ])\n*\n* By default, options should be passed in as the second argument to the sparkline function:\n*   $('.sparkline').sparkline([1,2,3,4], {type: 'bar'})\n*\n* Options can also be set by passing them on the tag itself.  This feature is disabled by default though\n* as there's a slight performance overhead:\n*   $('.sparkline').sparkline([1,2,3,4], {enableTagOptions: true})\n*   <p>Sparkline: <span class=\"sparkline\" sparkType=\"bar\" sparkBarColor=\"red\">loading</span></p>\n* Prefix all options supplied as tag attribute with \"spark\" (configurable by setting tagOptionsPrefix)\n*\n* Supported options:\n*   lineColor - Color of the line used for the chart\n*   fillColor - Color used to fill in the chart - Set to '' or false for a transparent chart\n*   width - Width of the chart - Defaults to 3 times the number of values in pixels\n*   height - Height of the chart - Defaults to the height of the containing element\n*   chartRangeMin - Specify the minimum value to use for the Y range of the chart - Defaults to the minimum value supplied\n*   chartRangeMax - Specify the maximum value to use for the Y range of the chart - Defaults to the maximum value supplied\n*   chartRangeClip - Clip out of range values to the max/min specified by chartRangeMin and chartRangeMax\n*   chartRangeMinX - Specify the minimum value to use for the X range of the chart - Defaults to the minimum value supplied\n*   chartRangeMaxX - Specify the maximum value to use for the X range of the chart - Defaults to the maximum value supplied\n*   composite - If true then don't erase any existing chart attached to the tag, but draw\n*           another chart over the top - Note that width and height are ignored if an\n*           existing chart is detected.\n*   tagValuesAttribute - Name of tag attribute to check for data values - Defaults to 'values'\n*   enableTagOptions - Whether to check tags for sparkline options\n*   tagOptionsPrefix - Prefix used for options supplied as tag attributes - Defaults to 'spark'\n*   disableHiddenCheck - If set to true, then the plugin will assume that charts will never be drawn into a\n*           hidden dom element, avoding a browser reflow\n*   disableInteraction - If set to true then all mouseover/click interaction behaviour will be disabled,\n*       making the plugin perform much like it did in 1.x\n*   disableTooltips - If set to true then tooltips will be disabled - Defaults to false (tooltips enabled)\n*   disableHighlight - If set to true then highlighting of selected chart elements on mouseover will be disabled\n*       defaults to false (highlights enabled)\n*   highlightLighten - Factor to lighten/darken highlighted chart values by - Defaults to 1.4 for a 40% increase\n*   tooltipContainer - Specify which DOM element the tooltip should be rendered into - defaults to document.body\n*   tooltipClassname - Optional CSS classname to apply to tooltips - If not specified then a default style will be applied\n*   tooltipOffsetX - How many pixels away from the mouse pointer to render the tooltip on the X axis\n*   tooltipOffsetY - How many pixels away from the mouse pointer to render the tooltip on the r axis\n*   tooltipFormatter  - Optional callback that allows you to override the HTML displayed in the tooltip\n*       callback is given arguments of (sparkline, options, fields)\n*   tooltipChartTitle - If specified then the tooltip uses the string specified by this setting as a title\n*   tooltipFormat - A format string or SPFormat object  (or an array thereof for multiple entries)\n*       to control the format of the tooltip\n*   tooltipPrefix - A string to prepend to each field displayed in a tooltip\n*   tooltipSuffix - A string to append to each field displayed in a tooltip\n*   tooltipSkipNull - If true then null values will not have a tooltip displayed (defaults to true)\n*   tooltipValueLookups - An object or range map to map field values to tooltip strings\n*       (eg. to map -1 to \"Lost\", 0 to \"Draw\", and 1 to \"Win\")\n*   numberFormatter - Optional callback for formatting numbers in tooltips\n*   numberDigitGroupSep - Character to use for group separator in numbers \"1,234\" - Defaults to \",\"\n*   numberDecimalMark - Character to use for the decimal point when formatting numbers - Defaults to \".\"\n*   numberDigitGroupCount - Number of digits between group separator - Defaults to 3\n*\n* There are 7 types of sparkline, selected by supplying a \"type\" option of 'line' (default),\n* 'bar', 'tristate', 'bullet', 'discrete', 'pie' or 'box'\n*    line - Line chart.  Options:\n*       spotColor - Set to '' to not end each line in a circular spot\n*       minSpotColor - If set, color of spot at minimum value\n*       maxSpotColor - If set, color of spot at maximum value\n*       spotRadius - Radius in pixels\n*       lineWidth - Width of line in pixels\n*       normalRangeMin\n*       normalRangeMax - If set draws a filled horizontal bar between these two values marking the \"normal\"\n*                      or expected range of values\n*       normalRangeColor - Color to use for the above bar\n*       drawNormalOnTop - Draw the normal range above the chart fill color if true\n*       defaultPixelsPerValue - Defaults to 3 pixels of width for each value in the chart\n*       highlightSpotColor - The color to use for drawing a highlight spot on mouseover - Set to null to disable\n*       highlightLineColor - The color to use for drawing a highlight line on mouseover - Set to null to disable\n*       valueSpots - Specify which points to draw spots on, and in which color.  Accepts a range map\n*\n*   bar - Bar chart.  Options:\n*       barColor - Color of bars for postive values\n*       negBarColor - Color of bars for negative values\n*       zeroColor - Color of bars with zero values\n*       nullColor - Color of bars with null values - Defaults to omitting the bar entirely\n*       barWidth - Width of bars in pixels\n*       colorMap - Optional mappnig of values to colors to override the *BarColor values above\n*                  can be an Array of values to control the color of individual bars or a range map\n*                  to specify colors for individual ranges of values\n*       barSpacing - Gap between bars in pixels\n*       zeroAxis - Centers the y-axis around zero if true\n*\n*   tristate - Charts values of win (>0), lose (<0) or draw (=0)\n*       posBarColor - Color of win values\n*       negBarColor - Color of lose values\n*       zeroBarColor - Color of draw values\n*       barWidth - Width of bars in pixels\n*       barSpacing - Gap between bars in pixels\n*       colorMap - Optional mappnig of values to colors to override the *BarColor values above\n*                  can be an Array of values to control the color of individual bars or a range map\n*                  to specify colors for individual ranges of values\n*\n*   discrete - Options:\n*       lineHeight - Height of each line in pixels - Defaults to 30% of the graph height\n*       thesholdValue - Values less than this value will be drawn using thresholdColor instead of lineColor\n*       thresholdColor\n*\n*   bullet - Values for bullet graphs msut be in the order: target, performance, range1, range2, range3, ...\n*       options:\n*       targetColor - The color of the vertical target marker\n*       targetWidth - The width of the target marker in pixels\n*       performanceColor - The color of the performance measure horizontal bar\n*       rangeColors - Colors to use for each qualitative range background color\n*\n*   pie - Pie chart. Options:\n*       sliceColors - An array of colors to use for pie slices\n*       offset - Angle in degrees to offset the first slice - Try -90 or +90\n*       borderWidth - Width of border to draw around the pie chart, in pixels - Defaults to 0 (no border)\n*       borderColor - Color to use for the pie chart border - Defaults to #000\n*\n*   box - Box plot. Options:\n*       raw - Set to true to supply pre-computed plot points as values\n*             values should be: low_outlier, low_whisker, q1, median, q3, high_whisker, high_outlier\n*             When set to false you can supply any number of values and the box plot will\n*             be computed for you.  Default is false.\n*       showOutliers - Set to true (default) to display outliers as circles\n*       outlierIQR - Interquartile range used to determine outliers.  Default 1.5\n*       boxLineColor - Outline color of the box\n*       boxFillColor - Fill color for the box\n*       whiskerColor - Line color used for whiskers\n*       outlierLineColor - Outline color of outlier circles\n*       outlierFillColor - Fill color of the outlier circles\n*       spotRadius - Radius of outlier circles\n*       medianColor - Line color of the median line\n*       target - Draw a target cross hair at the supplied value (default undefined)\n*\n*\n*\n*   Examples:\n*   $('#sparkline1').sparkline(myvalues, { lineColor: '#f00', fillColor: false });\n*   $('.barsparks').sparkline('html', { type:'bar', height:'40px', barWidth:5 });\n*   $('#tristate').sparkline([1,1,-1,1,0,0,-1], { type:'tristate' }):\n*   $('#discrete').sparkline([1,3,4,5,5,3,4,5], { type:'discrete' });\n*   $('#bullet').sparkline([10,12,12,9,7], { type:'bullet' });\n*   $('#pie').sparkline([1,1,2], { type:'pie' });\n*/\n\n/*jslint regexp: true, browser: true, jquery: true, white: true, nomen: false, plusplus: false, maxerr: 500, indent: 4 */\n\n(function(document, Math, undefined) { // performance/minified-size optimization\n(function(factory) {\n    if(typeof define === 'function' && define.amd) {\n        define(['jquery'], factory);\n    } else if (jQuery && !jQuery.fn.sparkline) {\n        factory(jQuery);\n    }\n}\n(function($) {\n    'use strict';\n\n    var UNSET_OPTION = {},\n        getDefaults, createClass, SPFormat, clipval, quartile, normalizeValue, normalizeValues,\n        remove, isNumber, all, sum, addCSS, ensureArray, formatNumber, RangeMap,\n        MouseHandler, Tooltip, barHighlightMixin,\n        line, bar, tristate, discrete, bullet, pie, box, defaultStyles, initStyles,\n        VShape, VCanvas_base, VCanvas_canvas, VCanvas_vml, pending, shapeCount = 0;\n\n\n    /**\n     * Default configuration settings\n     */\n    getDefaults = function () {\n        return {\n            // Settings common to most/all chart types\n            common: {\n                type: 'line',\n                lineColor: '#00f',\n                fillColor: '#cdf',\n                defaultPixelsPerValue: 3,\n                width: 'auto',\n                height: 'auto',\n                composite: false,\n                tagValuesAttribute: 'values',\n                tagOptionsPrefix: 'spark',\n                enableTagOptions: false,\n                enableHighlight: true,\n                highlightLighten: 1.4,\n                tooltipSkipNull: true,\n                tooltipPrefix: '',\n                tooltipSuffix: '',\n                disableHiddenCheck: false,\n                numberFormatter: false,\n                numberDigitGroupCount: 3,\n                numberDigitGroupSep: ',',\n                numberDecimalMark: '.',\n                disableTooltips: false,\n                disableInteraction: false\n            },\n            // Defaults for line charts\n            line: {\n                spotColor: '#f80',\n                highlightSpotColor: '#5f5',\n                highlightLineColor: '#f22',\n                spotRadius: 1.5,\n                minSpotColor: '#f80',\n                maxSpotColor: '#f80',\n                lineWidth: 1,\n                normalRangeMin: undefined,\n                normalRangeMax: undefined,\n                normalRangeColor: '#ccc',\n                drawNormalOnTop: false,\n                chartRangeMin: undefined,\n                chartRangeMax: undefined,\n                chartRangeMinX: undefined,\n                chartRangeMaxX: undefined,\n                tooltipFormat: new SPFormat('<span style=\"color: {{color}}\">&#9679;</span> {{prefix}}{{y}}{{suffix}}')\n            },\n            // Defaults for bar charts\n            bar: {\n                barColor: '#3366cc',\n                negBarColor: '#f44',\n                stackedBarColor: ['#3366cc', '#dc3912', '#ff9900', '#109618', '#66aa00',\n                    '#dd4477', '#0099c6', '#990099'],\n                zeroColor: undefined,\n                nullColor: undefined,\n                zeroAxis: true,\n                barWidth: 4,\n                barSpacing: 1,\n                chartRangeMax: undefined,\n                chartRangeMin: undefined,\n                chartRangeClip: false,\n                colorMap: undefined,\n                tooltipFormat: new SPFormat('<span style=\"color: {{color}}\">&#9679;</span> {{prefix}}{{value}}{{suffix}}')\n            },\n            // Defaults for tristate charts\n            tristate: {\n                barWidth: 4,\n                barSpacing: 1,\n                posBarColor: '#6f6',\n                negBarColor: '#f44',\n                zeroBarColor: '#999',\n                colorMap: {},\n                tooltipFormat: new SPFormat('<span style=\"color: {{color}}\">&#9679;</span> {{value:map}}'),\n                tooltipValueLookups: { map: { '-1': 'Loss', '0': 'Draw', '1': 'Win' } }\n            },\n            // Defaults for discrete charts\n            discrete: {\n                lineHeight: 'auto',\n                thresholdColor: undefined,\n                thresholdValue: 0,\n                chartRangeMax: undefined,\n                chartRangeMin: undefined,\n                chartRangeClip: false,\n                tooltipFormat: new SPFormat('{{prefix}}{{value}}{{suffix}}')\n            },\n            // Defaults for bullet charts\n            bullet: {\n                targetColor: '#f33',\n                targetWidth: 3, // width of the target bar in pixels\n                performanceColor: '#33f',\n                rangeColors: ['#d3dafe', '#a8b6ff', '#7f94ff'],\n                base: undefined, // set this to a number to change the base start number\n                tooltipFormat: new SPFormat('{{fieldkey:fields}} - {{value}}'),\n                tooltipValueLookups: { fields: {r: 'Range', p: 'Performance', t: 'Target'} }\n            },\n            // Defaults for pie charts\n            pie: {\n                offset: 0,\n                sliceColors: ['#3366cc', '#dc3912', '#ff9900', '#109618', '#66aa00',\n                    '#dd4477', '#0099c6', '#990099'],\n                borderWidth: 0,\n                borderColor: '#000',\n                tooltipFormat: new SPFormat('<span style=\"color: {{color}}\">&#9679;</span> {{value}} ({{percent.1}}%)')\n            },\n            // Defaults for box plots\n            box: {\n                raw: false,\n                boxLineColor: '#000',\n                boxFillColor: '#cdf',\n                whiskerColor: '#000',\n                outlierLineColor: '#333',\n                outlierFillColor: '#fff',\n                medianColor: '#f00',\n                showOutliers: true,\n                outlierIQR: 1.5,\n                spotRadius: 1.5,\n                target: undefined,\n                targetColor: '#4a2',\n                chartRangeMax: undefined,\n                chartRangeMin: undefined,\n                tooltipFormat: new SPFormat('{{field:fields}}: {{value}}'),\n                tooltipFormatFieldlistKey: 'field',\n                tooltipValueLookups: { fields: { lq: 'Lower Quartile', med: 'Median',\n                    uq: 'Upper Quartile', lo: 'Left Outlier', ro: 'Right Outlier',\n                    lw: 'Left Whisker', rw: 'Right Whisker'} }\n            }\n        };\n    };\n\n    // You can have tooltips use a css class other than jqstooltip by specifying tooltipClassname\n    defaultStyles = '.jqstooltip { ' +\n            'position: absolute;' +\n            'left: 0px;' +\n            'top: 0px;' +\n            'visibility: hidden;' +\n            'background: rgb(0, 0, 0) transparent;' +\n            'background-color: rgba(0,0,0,0.6);' +\n            'filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);' +\n            '-ms-filter: \"progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)\";' +\n            'color: white;' +\n            'font: 10px arial, san serif;' +\n            'text-align: left;' +\n            'white-space: nowrap;' +\n            'padding: 5px;' +\n            'border: 1px solid white;' +\n            'box-sizing: content-box;' +\n            'z-index: 10000;' +\n            '}' +\n            '.jqsfield { ' +\n            'color: white;' +\n            'font: 10px arial, san serif;' +\n            'text-align: left;' +\n            '}';\n\n\n    /**\n     * Utilities\n     */\n\n    createClass = function (/* [baseclass, [mixin, ...]], definition */) {\n        var Class, args;\n        Class = function () {\n            this.init.apply(this, arguments);\n        };\n        if (arguments.length > 1) {\n            if (arguments[0]) {\n                Class.prototype = $.extend(new arguments[0](), arguments[arguments.length - 1]);\n                Class._super = arguments[0].prototype;\n            } else {\n                Class.prototype = arguments[arguments.length - 1];\n            }\n            if (arguments.length > 2) {\n                args = Array.prototype.slice.call(arguments, 1, -1);\n                args.unshift(Class.prototype);\n                $.extend.apply($, args);\n            }\n        } else {\n            Class.prototype = arguments[0];\n        }\n        Class.prototype.cls = Class;\n        return Class;\n    };\n\n    /**\n     * Wraps a format string for tooltips\n     * {{x}}\n     * {{x.2}\n     * {{x:months}}\n     */\n    $.SPFormatClass = SPFormat = createClass({\n        fre: /\\{\\{([\\w.]+?)(:(.+?))?\\}\\}/g,\n        precre: /(\\w+)\\.(\\d+)/,\n\n        init: function (format, fclass) {\n            this.format = format;\n            this.fclass = fclass;\n        },\n\n        render: function (fieldset, lookups, options) {\n            var self = this,\n                fields = fieldset,\n                match, token, lookupkey, fieldvalue, prec;\n            return this.format.replace(this.fre, function () {\n                var lookup;\n                token = arguments[1];\n                lookupkey = arguments[3];\n                match = self.precre.exec(token);\n                if (match) {\n                    prec = match[2];\n                    token = match[1];\n                } else {\n                    prec = false;\n                }\n                fieldvalue = fields[token];\n                if (fieldvalue === undefined) {\n                    return '';\n                }\n                if (lookupkey && lookups && lookups[lookupkey]) {\n                    lookup = lookups[lookupkey];\n                    if (lookup.get) { // RangeMap\n                        return lookups[lookupkey].get(fieldvalue) || fieldvalue;\n                    } else {\n                        return lookups[lookupkey][fieldvalue] || fieldvalue;\n                    }\n                }\n                if (isNumber(fieldvalue)) {\n                    if (options.get('numberFormatter')) {\n                        fieldvalue = options.get('numberFormatter')(fieldvalue);\n                    } else {\n                        fieldvalue = formatNumber(fieldvalue, prec,\n                            options.get('numberDigitGroupCount'),\n                            options.get('numberDigitGroupSep'),\n                            options.get('numberDecimalMark'));\n                    }\n                }\n                return fieldvalue;\n            });\n        }\n    });\n\n    // convience method to avoid needing the new operator\n    $.spformat = function(format, fclass) {\n        return new SPFormat(format, fclass);\n    };\n\n    clipval = function (val, min, max) {\n        if (val < min) {\n            return min;\n        }\n        if (val > max) {\n            return max;\n        }\n        return val;\n    };\n\n    quartile = function (values, q) {\n        var vl;\n        if (q === 2) {\n            vl = Math.floor(values.length / 2);\n            return values.length % 2 ? values[vl] : (values[vl-1] + values[vl]) / 2;\n        } else {\n            if (values.length % 2 ) { // odd\n                vl = (values.length * q + q) / 4;\n                return vl % 1 ? (values[Math.floor(vl)] + values[Math.floor(vl) - 1]) / 2 : values[vl-1];\n            } else { //even\n                vl = (values.length * q + 2) / 4;\n                return vl % 1 ? (values[Math.floor(vl)] + values[Math.floor(vl) - 1]) / 2 :  values[vl-1];\n\n            }\n        }\n    };\n\n    normalizeValue = function (val) {\n        var nf;\n        switch (val) {\n            case 'undefined':\n                val = undefined;\n                break;\n            case 'null':\n                val = null;\n                break;\n            case 'true':\n                val = true;\n                break;\n            case 'false':\n                val = false;\n                break;\n            default:\n                nf = parseFloat(val);\n                if (val == nf) {\n                    val = nf;\n                }\n        }\n        return val;\n    };\n\n    normalizeValues = function (vals) {\n        var i, result = [];\n        for (i = vals.length; i--;) {\n            result[i] = normalizeValue(vals[i]);\n        }\n        return result;\n    };\n\n    remove = function (vals, filter) {\n        var i, vl, result = [];\n        for (i = 0, vl = vals.length; i < vl; i++) {\n            if (vals[i] !== filter) {\n                result.push(vals[i]);\n            }\n        }\n        return result;\n    };\n\n    isNumber = function (num) {\n        return !isNaN(parseFloat(num)) && isFinite(num);\n    };\n\n    formatNumber = function (num, prec, groupsize, groupsep, decsep) {\n        var p, i;\n        num = (prec === false ? parseFloat(num).toString() : num.toFixed(prec)).split('');\n        p = (p = $.inArray('.', num)) < 0 ? num.length : p;\n        if (p < num.length) {\n            num[p] = decsep;\n        }\n        for (i = p - groupsize; i > 0; i -= groupsize) {\n            num.splice(i, 0, groupsep);\n        }\n        return num.join('');\n    };\n\n    // determine if all values of an array match a value\n    // returns true if the array is empty\n    all = function (val, arr, ignoreNull) {\n        var i;\n        for (i = arr.length; i--; ) {\n            if (ignoreNull && arr[i] === null) continue;\n            if (arr[i] !== val) {\n                return false;\n            }\n        }\n        return true;\n    };\n\n    // sums the numeric values in an array, ignoring other values\n    sum = function (vals) {\n        var total = 0, i;\n        for (i = vals.length; i--;) {\n            total += typeof vals[i] === 'number' ? vals[i] : 0;\n        }\n        return total;\n    };\n\n    ensureArray = function (val) {\n        return $.isArray(val) ? val : [val];\n    };\n\n    // http://paulirish.com/2008/bookmarklet-inject-new-css-rules/\n    addCSS = function(css) {\n        var tag, iefail;\n        if (document.createStyleSheet) {\n            try {\n                document.createStyleSheet().cssText = css;\n                return;\n            } catch (e) {\n                // IE <= 9 maxes out at 31 stylesheets; inject into page instead.\n                iefail = true;\n            }\n        }\n        tag = document.createElement('style');\n        tag.type = 'text/css';\n        document.getElementsByTagName('head')[0].appendChild(tag);\n        if (iefail) {\n            document.styleSheets[document.styleSheets.length - 1].cssText = css;\n        } else {\n            tag[(typeof document.body.style.WebkitAppearance == 'string') /* webkit only */ ? 'innerText' : 'innerHTML'] = css;\n        }\n    };\n\n\n    // Provide a cross-browser interface to a few simple drawing primitives\n    $.fn.simpledraw = function (width, height, useExisting, interact) {\n        var target, mhandler;\n        if (useExisting && (target = this.data('_jqs_vcanvas'))) {\n            return target;\n        }\n\n        if ($.fn.sparkline.canvas === false) {\n            // We've already determined that neither Canvas nor VML are available\n            return false;\n\n        } else if ($.fn.sparkline.canvas === undefined) {\n            // No function defined yet -- need to see if we support Canvas or VML\n            var el = document.createElement('canvas');\n            if (!!(el.getContext && el.getContext('2d'))) {\n                // Canvas is available\n                $.fn.sparkline.canvas = function(width, height, target, interact) {\n                    return new VCanvas_canvas(width, height, target, interact);\n                };\n            } else if (document.namespaces && !document.namespaces.v) {\n                // VML is available\n                document.namespaces.add('v', 'urn:schemas-microsoft-com:vml', '#default#VML');\n                $.fn.sparkline.canvas = function(width, height, target, interact) {\n                    return new VCanvas_vml(width, height, target);\n                };\n            } else {\n                // Neither Canvas nor VML are available\n                $.fn.sparkline.canvas = false;\n                return false;\n            }\n        }\n\n        if (width === undefined) {\n            width = $(this).innerWidth();\n        }\n        if (height === undefined) {\n            height = $(this).innerHeight();\n        }\n\n        target = $.fn.sparkline.canvas(width, height, this, interact);\n\n        mhandler = $(this).data('_jqs_mhandler');\n        if (mhandler) {\n            mhandler.registerCanvas(target);\n        }\n        return target;\n    };\n\n    $.fn.cleardraw = function () {\n        var target = this.data('_jqs_vcanvas');\n        if (target) {\n            target.reset();\n        }\n    };\n\n\n    $.RangeMapClass = RangeMap = createClass({\n        init: function (map) {\n            var key, range, rangelist = [];\n            for (key in map) {\n                if (map.hasOwnProperty(key) && typeof key === 'string' && key.indexOf(':') > -1) {\n                    range = key.split(':');\n                    range[0] = range[0].length === 0 ? -Infinity : parseFloat(range[0]);\n                    range[1] = range[1].length === 0 ? Infinity : parseFloat(range[1]);\n                    range[2] = map[key];\n                    rangelist.push(range);\n                }\n            }\n            this.map = map;\n            this.rangelist = rangelist || false;\n        },\n\n        get: function (value) {\n            var rangelist = this.rangelist,\n                i, range, result;\n            if ((result = this.map[value]) !== undefined) {\n                return result;\n            }\n            if (rangelist) {\n                for (i = rangelist.length; i--;) {\n                    range = rangelist[i];\n                    if (range[0] <= value && range[1] >= value) {\n                        return range[2];\n                    }\n                }\n            }\n            return undefined;\n        }\n    });\n\n    // Convenience function\n    $.range_map = function(map) {\n        return new RangeMap(map);\n    };\n\n\n    MouseHandler = createClass({\n        init: function (el, options) {\n            var $el = $(el);\n            this.$el = $el;\n            this.options = options;\n            this.currentPageX = 0;\n            this.currentPageY = 0;\n            this.el = el;\n            this.splist = [];\n            this.tooltip = null;\n            this.over = false;\n            this.displayTooltips = !options.get('disableTooltips');\n            this.highlightEnabled = !options.get('disableHighlight');\n        },\n\n        registerSparkline: function (sp) {\n            this.splist.push(sp);\n            if (this.over) {\n                this.updateDisplay();\n            }\n        },\n\n        registerCanvas: function (canvas) {\n            var $canvas = $(canvas.canvas);\n            this.canvas = canvas;\n            this.$canvas = $canvas;\n            $canvas.mouseenter($.proxy(this.mouseenter, this));\n            $canvas.mouseleave($.proxy(this.mouseleave, this));\n            $canvas.click($.proxy(this.mouseclick, this));\n        },\n\n        reset: function (removeTooltip) {\n            this.splist = [];\n            if (this.tooltip && removeTooltip) {\n                this.tooltip.remove();\n                this.tooltip = undefined;\n            }\n        },\n\n        mouseclick: function (e) {\n            var clickEvent = $.Event('sparklineClick');\n            clickEvent.originalEvent = e;\n            clickEvent.sparklines = this.splist;\n            this.$el.trigger(clickEvent);\n        },\n\n        mouseenter: function (e) {\n            $(document.body).unbind('mousemove.jqs');\n            $(document.body).bind('mousemove.jqs', $.proxy(this.mousemove, this));\n            this.over = true;\n            this.currentPageX = e.pageX;\n            this.currentPageY = e.pageY;\n            this.currentEl = e.target;\n            if (!this.tooltip && this.displayTooltips) {\n                this.tooltip = new Tooltip(this.options);\n                this.tooltip.updatePosition(e.pageX, e.pageY);\n            }\n            this.updateDisplay();\n        },\n\n        mouseleave: function () {\n            $(document.body).unbind('mousemove.jqs');\n            var splist = this.splist,\n                 spcount = splist.length,\n                 needsRefresh = false,\n                 sp, i;\n            this.over = false;\n            this.currentEl = null;\n\n            if (this.tooltip) {\n                this.tooltip.remove();\n                this.tooltip = null;\n            }\n\n            for (i = 0; i < spcount; i++) {\n                sp = splist[i];\n                if (sp.clearRegionHighlight()) {\n                    needsRefresh = true;\n                }\n            }\n\n            if (needsRefresh) {\n                this.canvas.render();\n            }\n        },\n\n        mousemove: function (e) {\n            this.currentPageX = e.pageX;\n            this.currentPageY = e.pageY;\n            this.currentEl = e.target;\n            if (this.tooltip) {\n                this.tooltip.updatePosition(e.pageX, e.pageY);\n            }\n            this.updateDisplay();\n        },\n\n        updateDisplay: function () {\n            var splist = this.splist,\n                 spcount = splist.length,\n                 needsRefresh = false,\n                 offset = this.$canvas.offset(),\n                 localX = this.currentPageX - offset.left,\n                 localY = this.currentPageY - offset.top,\n                 tooltiphtml, sp, i, result, changeEvent;\n            if (!this.over) {\n                return;\n            }\n            for (i = 0; i < spcount; i++) {\n                sp = splist[i];\n                result = sp.setRegionHighlight(this.currentEl, localX, localY);\n                if (result) {\n                    needsRefresh = true;\n                }\n            }\n            if (needsRefresh) {\n                changeEvent = $.Event('sparklineRegionChange');\n                changeEvent.sparklines = this.splist;\n                this.$el.trigger(changeEvent);\n                if (this.tooltip) {\n                    tooltiphtml = '';\n                    for (i = 0; i < spcount; i++) {\n                        sp = splist[i];\n                        tooltiphtml += sp.getCurrentRegionTooltip();\n                    }\n                    this.tooltip.setContent(tooltiphtml);\n                }\n                if (!this.disableHighlight) {\n                    this.canvas.render();\n                }\n            }\n            if (result === null) {\n                this.mouseleave();\n            }\n        }\n    });\n\n\n    Tooltip = createClass({\n        sizeStyle: 'position: static !important;' +\n            'display: block !important;' +\n            'visibility: hidden !important;' +\n            'float: left !important;',\n\n        init: function (options) {\n            var tooltipClassname = options.get('tooltipClassname', 'jqstooltip'),\n                sizetipStyle = this.sizeStyle,\n                offset;\n            this.container = options.get('tooltipContainer') || document.body;\n            this.tooltipOffsetX = options.get('tooltipOffsetX', 10);\n            this.tooltipOffsetY = options.get('tooltipOffsetY', 12);\n            // remove any previous lingering tooltip\n            $('#jqssizetip').remove();\n            $('#jqstooltip').remove();\n            this.sizetip = $('<div/>', {\n                id: 'jqssizetip',\n                style: sizetipStyle,\n                'class': tooltipClassname\n            });\n            this.tooltip = $('<div/>', {\n                id: 'jqstooltip',\n                'class': tooltipClassname\n            }).appendTo(this.container);\n            // account for the container's location\n            offset = this.tooltip.offset();\n            this.offsetLeft = offset.left;\n            this.offsetTop = offset.top;\n            this.hidden = true;\n            $(window).unbind('resize.jqs scroll.jqs');\n            $(window).bind('resize.jqs scroll.jqs', $.proxy(this.updateWindowDims, this));\n            this.updateWindowDims();\n        },\n\n        updateWindowDims: function () {\n            this.scrollTop = $(window).scrollTop();\n            this.scrollLeft = $(window).scrollLeft();\n            this.scrollRight = this.scrollLeft + $(window).width();\n            this.updatePosition();\n        },\n\n        getSize: function (content) {\n            this.sizetip.html(content).appendTo(this.container);\n            this.width = this.sizetip.width() + 1;\n            this.height = this.sizetip.height();\n            this.sizetip.remove();\n        },\n\n        setContent: function (content) {\n            if (!content) {\n                this.tooltip.css('visibility', 'hidden');\n                this.hidden = true;\n                return;\n            }\n            this.getSize(content);\n            this.tooltip.html(content)\n                .css({\n                    'width': this.width,\n                    'height': this.height,\n                    'visibility': 'visible'\n                });\n            if (this.hidden) {\n                this.hidden = false;\n                this.updatePosition();\n            }\n        },\n\n        updatePosition: function (x, y) {\n            if (x === undefined) {\n                if (this.mousex === undefined) {\n                    return;\n                }\n                x = this.mousex - this.offsetLeft;\n                y = this.mousey - this.offsetTop;\n\n            } else {\n                this.mousex = x = x - this.offsetLeft;\n                this.mousey = y = y - this.offsetTop;\n            }\n            if (!this.height || !this.width || this.hidden) {\n                return;\n            }\n\n            y -= this.height + this.tooltipOffsetY;\n            x += this.tooltipOffsetX;\n\n            if (y < this.scrollTop) {\n                y = this.scrollTop;\n            }\n            if (x < this.scrollLeft) {\n                x = this.scrollLeft;\n            } else if (x + this.width > this.scrollRight) {\n                x = this.scrollRight - this.width;\n            }\n\n            this.tooltip.css({\n                'left': x,\n                'top': y\n            });\n        },\n\n        remove: function () {\n            this.tooltip.remove();\n            this.sizetip.remove();\n            this.sizetip = this.tooltip = undefined;\n            $(window).unbind('resize.jqs scroll.jqs');\n        }\n    });\n\n\n    initStyles = function() {\n        addCSS(defaultStyles);\n    };\n\n    $(initStyles);\n\n    pending = [];\n    $.fn.sparkline = function (userValues, userOptions) {\n        return this.each(function () {\n            var options = new $.fn.sparkline.options(this, userOptions),\n                 $this = $(this),\n                 render, i;\n            render = function () {\n                var values, width, height, tmp, mhandler, sp, vals;\n                if (userValues === 'html' || userValues === undefined) {\n                    vals = this.getAttribute(options.get('tagValuesAttribute'));\n                    if (vals === undefined || vals === null) {\n                        vals = $this.html();\n                    }\n                    values = vals.replace(/(^\\s*\x3c!--)|(--\x3e\\s*$)|\\s+/g, '').split(',');\n                } else {\n                    values = userValues;\n                }\n\n                width = options.get('width') === 'auto' ? values.length * options.get('defaultPixelsPerValue') : options.get('width');\n                if (options.get('height') === 'auto') {\n                    if (!options.get('composite') || !$.data(this, '_jqs_vcanvas')) {\n                        // must be a better way to get the line height\n                        tmp = document.createElement('span');\n                        tmp.innerHTML = 'a';\n                        $this.html(tmp);\n                        height = $(tmp).innerHeight() || $(tmp).height();\n                        $(tmp).remove();\n                        tmp = null;\n                    }\n                } else {\n                    height = options.get('height');\n                }\n\n                if (!options.get('disableInteraction')) {\n                    mhandler = $.data(this, '_jqs_mhandler');\n                    if (!mhandler) {\n                        mhandler = new MouseHandler(this, options);\n                        $.data(this, '_jqs_mhandler', mhandler);\n                    } else if (!options.get('composite')) {\n                        mhandler.reset();\n                    }\n                } else {\n                    mhandler = false;\n                }\n\n                if (options.get('composite') && !$.data(this, '_jqs_vcanvas')) {\n                    if (!$.data(this, '_jqs_errnotify')) {\n                        alert('Attempted to attach a composite sparkline to an element with no existing sparkline');\n                        $.data(this, '_jqs_errnotify', true);\n                    }\n                    return;\n                }\n\n                sp = new $.fn.sparkline[options.get('type')](this, values, options, width, height);\n\n                sp.render();\n\n                if (mhandler) {\n                    mhandler.registerSparkline(sp);\n                }\n            };\n            if (($(this).html() && !options.get('disableHiddenCheck') && $(this).is(':hidden')) || !$(this).parents('body').length) {\n                if (!options.get('composite') && $.data(this, '_jqs_pending')) {\n                    // remove any existing references to the element\n                    for (i = pending.length; i; i--) {\n                        if (pending[i - 1][0] == this) {\n                            pending.splice(i - 1, 1);\n                        }\n                    }\n                }\n                pending.push([this, render]);\n                $.data(this, '_jqs_pending', true);\n            } else {\n                render.call(this);\n            }\n        });\n    };\n\n    $.fn.sparkline.defaults = getDefaults();\n\n\n    $.sparkline_display_visible = function () {\n        var el, i, pl;\n        var done = [];\n        for (i = 0, pl = pending.length; i < pl; i++) {\n            el = pending[i][0];\n            if ($(el).is(':visible') && !$(el).parents().is(':hidden')) {\n                pending[i][1].call(el);\n                $.data(pending[i][0], '_jqs_pending', false);\n                done.push(i);\n            } else if (!$(el).closest('html').length && !$.data(el, '_jqs_pending')) {\n                // element has been inserted and removed from the DOM\n                // If it was not yet inserted into the dom then the .data request\n                // will return true.\n                // removing from the dom causes the data to be removed.\n                $.data(pending[i][0], '_jqs_pending', false);\n                done.push(i);\n            }\n        }\n        for (i = done.length; i; i--) {\n            pending.splice(done[i - 1], 1);\n        }\n    };\n\n\n    /**\n     * User option handler\n     */\n    $.fn.sparkline.options = createClass({\n        init: function (tag, userOptions) {\n            var extendedOptions, defaults, base, tagOptionType;\n            this.userOptions = userOptions = userOptions || {};\n            this.tag = tag;\n            this.tagValCache = {};\n            defaults = $.fn.sparkline.defaults;\n            base = defaults.common;\n            this.tagOptionsPrefix = userOptions.enableTagOptions && (userOptions.tagOptionsPrefix || base.tagOptionsPrefix);\n\n            tagOptionType = this.getTagSetting('type');\n            if (tagOptionType === UNSET_OPTION) {\n                extendedOptions = defaults[userOptions.type || base.type];\n            } else {\n                extendedOptions = defaults[tagOptionType];\n            }\n            this.mergedOptions = $.extend({}, base, extendedOptions, userOptions);\n        },\n\n\n        getTagSetting: function (key) {\n            var prefix = this.tagOptionsPrefix,\n                val, i, pairs, keyval;\n            if (prefix === false || prefix === undefined) {\n                return UNSET_OPTION;\n            }\n            if (this.tagValCache.hasOwnProperty(key)) {\n                val = this.tagValCache.key;\n            } else {\n                val = this.tag.getAttribute(prefix + key);\n                if (val === undefined || val === null) {\n                    val = UNSET_OPTION;\n                } else if (val.substr(0, 1) === '[') {\n                    val = val.substr(1, val.length - 2).split(',');\n                    for (i = val.length; i--;) {\n                        val[i] = normalizeValue(val[i].replace(/(^\\s*)|(\\s*$)/g, ''));\n                    }\n                } else if (val.substr(0, 1) === '{') {\n                    pairs = val.substr(1, val.length - 2).split(',');\n                    val = {};\n                    for (i = pairs.length; i--;) {\n                        keyval = pairs[i].split(':', 2);\n                        val[keyval[0].replace(/(^\\s*)|(\\s*$)/g, '')] = normalizeValue(keyval[1].replace(/(^\\s*)|(\\s*$)/g, ''));\n                    }\n                } else {\n                    val = normalizeValue(val);\n                }\n                this.tagValCache.key = val;\n            }\n            return val;\n        },\n\n        get: function (key, defaultval) {\n            var tagOption = this.getTagSetting(key),\n                result;\n            if (tagOption !== UNSET_OPTION) {\n                return tagOption;\n            }\n            return (result = this.mergedOptions[key]) === undefined ? defaultval : result;\n        }\n    });\n\n\n    $.fn.sparkline._base = createClass({\n        disabled: false,\n\n        init: function (el, values, options, width, height) {\n            this.el = el;\n            this.$el = $(el);\n            this.values = values;\n            this.options = options;\n            this.width = width;\n            this.height = height;\n            this.currentRegion = undefined;\n        },\n\n        /**\n         * Setup the canvas\n         */\n        initTarget: function () {\n            var interactive = !this.options.get('disableInteraction');\n            if (!(this.target = this.$el.simpledraw(this.width, this.height, this.options.get('composite'), interactive))) {\n                this.disabled = true;\n            } else {\n                this.canvasWidth = this.target.pixelWidth;\n                this.canvasHeight = this.target.pixelHeight;\n            }\n        },\n\n        /**\n         * Actually render the chart to the canvas\n         */\n        render: function () {\n            if (this.disabled) {\n                this.el.innerHTML = '';\n                return false;\n            }\n            return true;\n        },\n\n        /**\n         * Return a region id for a given x/y co-ordinate\n         */\n        getRegion: function (x, y) {\n        },\n\n        /**\n         * Highlight an item based on the moused-over x,y co-ordinate\n         */\n        setRegionHighlight: function (el, x, y) {\n            var currentRegion = this.currentRegion,\n                highlightEnabled = !this.options.get('disableHighlight'),\n                newRegion;\n            if (x > this.canvasWidth || y > this.canvasHeight || x < 0 || y < 0) {\n                return null;\n            }\n            newRegion = this.getRegion(el, x, y);\n            if (currentRegion !== newRegion) {\n                if (currentRegion !== undefined && highlightEnabled) {\n                    this.removeHighlight();\n                }\n                this.currentRegion = newRegion;\n                if (newRegion !== undefined && highlightEnabled) {\n                    this.renderHighlight();\n                }\n                return true;\n            }\n            return false;\n        },\n\n        /**\n         * Reset any currently highlighted item\n         */\n        clearRegionHighlight: function () {\n            if (this.currentRegion !== undefined) {\n                this.removeHighlight();\n                this.currentRegion = undefined;\n                return true;\n            }\n            return false;\n        },\n\n        renderHighlight: function () {\n            this.changeHighlight(true);\n        },\n\n        removeHighlight: function () {\n            this.changeHighlight(false);\n        },\n\n        changeHighlight: function (highlight)  {},\n\n        /**\n         * Fetch the HTML to display as a tooltip\n         */\n        getCurrentRegionTooltip: function () {\n            var options = this.options,\n                header = '',\n                entries = [],\n                fields, formats, formatlen, fclass, text, i,\n                showFields, showFieldsKey, newFields, fv,\n                formatter, format, fieldlen, j;\n            if (this.currentRegion === undefined) {\n                return '';\n            }\n            fields = this.getCurrentRegionFields();\n            formatter = options.get('tooltipFormatter');\n            if (formatter) {\n                return formatter(this, options, fields);\n            }\n            if (options.get('tooltipChartTitle')) {\n                header += '<div class=\"jqs jqstitle\">' + options.get('tooltipChartTitle') + '</div>\\n';\n            }\n            formats = this.options.get('tooltipFormat');\n            if (!formats) {\n                return '';\n            }\n            if (!$.isArray(formats)) {\n                formats = [formats];\n            }\n            if (!$.isArray(fields)) {\n                fields = [fields];\n            }\n            showFields = this.options.get('tooltipFormatFieldlist');\n            showFieldsKey = this.options.get('tooltipFormatFieldlistKey');\n            if (showFields && showFieldsKey) {\n                // user-selected ordering of fields\n                newFields = [];\n                for (i = fields.length; i--;) {\n                    fv = fields[i][showFieldsKey];\n                    if ((j = $.inArray(fv, showFields)) != -1) {\n                        newFields[j] = fields[i];\n                    }\n                }\n                fields = newFields;\n            }\n            formatlen = formats.length;\n            fieldlen = fields.length;\n            for (i = 0; i < formatlen; i++) {\n                format = formats[i];\n                if (typeof format === 'string') {\n                    format = new SPFormat(format);\n                }\n                fclass = format.fclass || 'jqsfield';\n                for (j = 0; j < fieldlen; j++) {\n                    if (!fields[j].isNull || !options.get('tooltipSkipNull')) {\n                        $.extend(fields[j], {\n                            prefix: options.get('tooltipPrefix'),\n                            suffix: options.get('tooltipSuffix')\n                        });\n                        text = format.render(fields[j], options.get('tooltipValueLookups'), options);\n                        entries.push('<div class=\"' + fclass + '\">' + text + '</div>');\n                    }\n                }\n            }\n            if (entries.length) {\n                return header + entries.join('\\n');\n            }\n            return '';\n        },\n\n        getCurrentRegionFields: function () {},\n\n        calcHighlightColor: function (color, options) {\n            var highlightColor = options.get('highlightColor'),\n                lighten = options.get('highlightLighten'),\n                parse, mult, rgbnew, i;\n            if (highlightColor) {\n                return highlightColor;\n            }\n            if (lighten) {\n                // extract RGB values\n                parse = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(color) || /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(color);\n                if (parse) {\n                    rgbnew = [];\n                    mult = color.length === 4 ? 16 : 1;\n                    for (i = 0; i < 3; i++) {\n                        rgbnew[i] = clipval(Math.round(parseInt(parse[i + 1], 16) * mult * lighten), 0, 255);\n                    }\n                    return 'rgb(' + rgbnew.join(',') + ')';\n                }\n\n            }\n            return color;\n        }\n\n    });\n\n    barHighlightMixin = {\n        changeHighlight: function (highlight) {\n            var currentRegion = this.currentRegion,\n                target = this.target,\n                shapeids = this.regionShapes[currentRegion],\n                newShapes;\n            // will be null if the region value was null\n            if (shapeids) {\n                newShapes = this.renderRegion(currentRegion, highlight);\n                if ($.isArray(newShapes) || $.isArray(shapeids)) {\n                    target.replaceWithShapes(shapeids, newShapes);\n                    this.regionShapes[currentRegion] = $.map(newShapes, function (newShape) {\n                        return newShape.id;\n                    });\n                } else {\n                    target.replaceWithShape(shapeids, newShapes);\n                    this.regionShapes[currentRegion] = newShapes.id;\n                }\n            }\n        },\n\n        render: function () {\n            var values = this.values,\n                target = this.target,\n                regionShapes = this.regionShapes,\n                shapes, ids, i, j;\n\n            if (!this.cls._super.render.call(this)) {\n                return;\n            }\n            for (i = values.length; i--;) {\n                shapes = this.renderRegion(i);\n                if (shapes) {\n                    if ($.isArray(shapes)) {\n                        ids = [];\n                        for (j = shapes.length; j--;) {\n                            shapes[j].append();\n                            ids.push(shapes[j].id);\n                        }\n                        regionShapes[i] = ids;\n                    } else {\n                        shapes.append();\n                        regionShapes[i] = shapes.id; // store just the shapeid\n                    }\n                } else {\n                    // null value\n                    regionShapes[i] = null;\n                }\n            }\n            target.render();\n        }\n    };\n\n\n    /**\n     * Line charts\n     */\n    $.fn.sparkline.line = line = createClass($.fn.sparkline._base, {\n        type: 'line',\n\n        init: function (el, values, options, width, height) {\n            line._super.init.call(this, el, values, options, width, height);\n            this.vertices = [];\n            this.regionMap = [];\n            this.xvalues = [];\n            this.yvalues = [];\n            this.yminmax = [];\n            this.hightlightSpotId = null;\n            this.lastShapeId = null;\n            this.initTarget();\n        },\n\n        getRegion: function (el, x, y) {\n            var i,\n                regionMap = this.regionMap; // maps regions to value positions\n            for (i = regionMap.length; i--;) {\n                if (regionMap[i] !== null && x >= regionMap[i][0] && x <= regionMap[i][1]) {\n                    return regionMap[i][2];\n                }\n            }\n            return undefined;\n        },\n\n        getCurrentRegionFields: function () {\n            var currentRegion = this.currentRegion;\n            return {\n                isNull: this.yvalues[currentRegion] === null,\n                x: this.xvalues[currentRegion],\n                y: this.yvalues[currentRegion],\n                color: this.options.get('lineColor'),\n                fillColor: this.options.get('fillColor'),\n                offset: currentRegion\n            };\n        },\n\n        renderHighlight: function () {\n            var currentRegion = this.currentRegion,\n                target = this.target,\n                vertex = this.vertices[currentRegion],\n                options = this.options,\n                spotRadius = options.get('spotRadius'),\n                highlightSpotColor = options.get('highlightSpotColor'),\n                highlightLineColor = options.get('highlightLineColor'),\n                highlightSpot, highlightLine;\n\n            if (!vertex) {\n                return;\n            }\n            if (spotRadius && highlightSpotColor) {\n                highlightSpot = target.drawCircle(vertex[0], vertex[1],\n                    spotRadius, undefined, highlightSpotColor);\n                this.highlightSpotId = highlightSpot.id;\n                target.insertAfterShape(this.lastShapeId, highlightSpot);\n            }\n            if (highlightLineColor) {\n                highlightLine = target.drawLine(vertex[0], this.canvasTop, vertex[0],\n                    this.canvasTop + this.canvasHeight, highlightLineColor);\n                this.highlightLineId = highlightLine.id;\n                target.insertAfterShape(this.lastShapeId, highlightLine);\n            }\n        },\n\n        removeHighlight: function () {\n            var target = this.target;\n            if (this.highlightSpotId) {\n                target.removeShapeId(this.highlightSpotId);\n                this.highlightSpotId = null;\n            }\n            if (this.highlightLineId) {\n                target.removeShapeId(this.highlightLineId);\n                this.highlightLineId = null;\n            }\n        },\n\n        scanValues: function () {\n            var values = this.values,\n                valcount = values.length,\n                xvalues = this.xvalues,\n                yvalues = this.yvalues,\n                yminmax = this.yminmax,\n                i, val, isStr, isArray, sp;\n            for (i = 0; i < valcount; i++) {\n                val = values[i];\n                isStr = typeof(values[i]) === 'string';\n                isArray = typeof(values[i]) === 'object' && values[i] instanceof Array;\n                sp = isStr && values[i].split(':');\n                if (isStr && sp.length === 2) { // x:y\n                    xvalues.push(Number(sp[0]));\n                    yvalues.push(Number(sp[1]));\n                    yminmax.push(Number(sp[1]));\n                } else if (isArray) {\n                    xvalues.push(val[0]);\n                    yvalues.push(val[1]);\n                    yminmax.push(val[1]);\n                } else {\n                    xvalues.push(i);\n                    if (values[i] === null || values[i] === 'null') {\n                        yvalues.push(null);\n                    } else {\n                        yvalues.push(Number(val));\n                        yminmax.push(Number(val));\n                    }\n                }\n            }\n            if (this.options.get('xvalues')) {\n                xvalues = this.options.get('xvalues');\n            }\n\n            this.maxy = this.maxyorg = Math.max.apply(Math, yminmax);\n            this.miny = this.minyorg = Math.min.apply(Math, yminmax);\n\n            this.maxx = Math.max.apply(Math, xvalues);\n            this.minx = Math.min.apply(Math, xvalues);\n\n            this.xvalues = xvalues;\n            this.yvalues = yvalues;\n            this.yminmax = yminmax;\n\n        },\n\n        processRangeOptions: function () {\n            var options = this.options,\n                normalRangeMin = options.get('normalRangeMin'),\n                normalRangeMax = options.get('normalRangeMax');\n\n            if (normalRangeMin !== undefined) {\n                if (normalRangeMin < this.miny) {\n                    this.miny = normalRangeMin;\n                }\n                if (normalRangeMax > this.maxy) {\n                    this.maxy = normalRangeMax;\n                }\n            }\n            if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.miny)) {\n                this.miny = options.get('chartRangeMin');\n            }\n            if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.maxy)) {\n                this.maxy = options.get('chartRangeMax');\n            }\n            if (options.get('chartRangeMinX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMinX') < this.minx)) {\n                this.minx = options.get('chartRangeMinX');\n            }\n            if (options.get('chartRangeMaxX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMaxX') > this.maxx)) {\n                this.maxx = options.get('chartRangeMaxX');\n            }\n\n        },\n\n        drawNormalRange: function (canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey) {\n            var normalRangeMin = this.options.get('normalRangeMin'),\n                normalRangeMax = this.options.get('normalRangeMax'),\n                ytop = canvasTop + Math.round(canvasHeight - (canvasHeight * ((normalRangeMax - this.miny) / rangey))),\n                height = Math.round((canvasHeight * (normalRangeMax - normalRangeMin)) / rangey);\n            this.target.drawRect(canvasLeft, ytop, canvasWidth, height, undefined, this.options.get('normalRangeColor')).append();\n        },\n\n        render: function () {\n            var options = this.options,\n                target = this.target,\n                canvasWidth = this.canvasWidth,\n                canvasHeight = this.canvasHeight,\n                vertices = this.vertices,\n                spotRadius = options.get('spotRadius'),\n                regionMap = this.regionMap,\n                rangex, rangey, yvallast,\n                canvasTop, canvasLeft,\n                vertex, path, paths, x, y, xnext, xpos, xposnext,\n                last, next, yvalcount, lineShapes, fillShapes, plen,\n                valueSpots, hlSpotsEnabled, color, xvalues, yvalues, i;\n\n            if (!line._super.render.call(this)) {\n                return;\n            }\n\n            this.scanValues();\n            this.processRangeOptions();\n\n            xvalues = this.xvalues;\n            yvalues = this.yvalues;\n\n            if (!this.yminmax.length || this.yvalues.length < 2) {\n                // empty or all null valuess\n                return;\n            }\n\n            canvasTop = canvasLeft = 0;\n\n            rangex = this.maxx - this.minx === 0 ? 1 : this.maxx - this.minx;\n            rangey = this.maxy - this.miny === 0 ? 1 : this.maxy - this.miny;\n            yvallast = this.yvalues.length - 1;\n\n            if (spotRadius && (canvasWidth < (spotRadius * 4) || canvasHeight < (spotRadius * 4))) {\n                spotRadius = 0;\n            }\n            if (spotRadius) {\n                // adjust the canvas size as required so that spots will fit\n                hlSpotsEnabled = options.get('highlightSpotColor') &&  !options.get('disableInteraction');\n                if (hlSpotsEnabled || options.get('minSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.miny)) {\n                    canvasHeight -= Math.ceil(spotRadius);\n                }\n                if (hlSpotsEnabled || options.get('maxSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.maxy)) {\n                    canvasHeight -= Math.ceil(spotRadius);\n                    canvasTop += Math.ceil(spotRadius);\n                }\n                if (hlSpotsEnabled ||\n                     ((options.get('minSpotColor') || options.get('maxSpotColor')) && (yvalues[0] === this.miny || yvalues[0] === this.maxy))) {\n                    canvasLeft += Math.ceil(spotRadius);\n                    canvasWidth -= Math.ceil(spotRadius);\n                }\n                if (hlSpotsEnabled || options.get('spotColor') ||\n                    (options.get('minSpotColor') || options.get('maxSpotColor') &&\n                        (yvalues[yvallast] === this.miny || yvalues[yvallast] === this.maxy))) {\n                    canvasWidth -= Math.ceil(spotRadius);\n                }\n            }\n\n\n            canvasHeight--;\n\n            if (options.get('normalRangeMin') !== undefined && !options.get('drawNormalOnTop')) {\n                this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey);\n            }\n\n            path = [];\n            paths = [path];\n            last = next = null;\n            yvalcount = yvalues.length;\n            for (i = 0; i < yvalcount; i++) {\n                x = xvalues[i];\n                xnext = xvalues[i + 1];\n                y = yvalues[i];\n                xpos = canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex));\n                xposnext = i < yvalcount - 1 ? canvasLeft + Math.round((xnext - this.minx) * (canvasWidth / rangex)) : canvasWidth;\n                next = xpos + ((xposnext - xpos) / 2);\n                regionMap[i] = [last || 0, next, i];\n                last = next;\n                if (y === null) {\n                    if (i) {\n                        if (yvalues[i - 1] !== null) {\n                            path = [];\n                            paths.push(path);\n                        }\n                        vertices.push(null);\n                    }\n                } else {\n                    if (y < this.miny) {\n                        y = this.miny;\n                    }\n                    if (y > this.maxy) {\n                        y = this.maxy;\n                    }\n                    if (!path.length) {\n                        // previous value was null\n                        path.push([xpos, canvasTop + canvasHeight]);\n                    }\n                    vertex = [xpos, canvasTop + Math.round(canvasHeight - (canvasHeight * ((y - this.miny) / rangey)))];\n                    path.push(vertex);\n                    vertices.push(vertex);\n                }\n            }\n\n            lineShapes = [];\n            fillShapes = [];\n            plen = paths.length;\n            for (i = 0; i < plen; i++) {\n                path = paths[i];\n                if (path.length) {\n                    if (options.get('fillColor')) {\n                        path.push([path[path.length - 1][0], (canvasTop + canvasHeight)]);\n                        fillShapes.push(path.slice(0));\n                        path.pop();\n                    }\n                    // if there's only a single point in this path, then we want to display it\n                    // as a vertical line which means we keep path[0]  as is\n                    if (path.length > 2) {\n                        // else we want the first value\n                        path[0] = [path[0][0], path[1][1]];\n                    }\n                    lineShapes.push(path);\n                }\n            }\n\n            // draw the fill first, then optionally the normal range, then the line on top of that\n            plen = fillShapes.length;\n            for (i = 0; i < plen; i++) {\n                target.drawShape(fillShapes[i],\n                    options.get('fillColor'), options.get('fillColor')).append();\n            }\n\n            if (options.get('normalRangeMin') !== undefined && options.get('drawNormalOnTop')) {\n                this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey);\n            }\n\n            plen = lineShapes.length;\n            for (i = 0; i < plen; i++) {\n                target.drawShape(lineShapes[i], options.get('lineColor'), undefined,\n                    options.get('lineWidth')).append();\n            }\n\n            if (spotRadius && options.get('valueSpots')) {\n                valueSpots = options.get('valueSpots');\n                if (valueSpots.get === undefined) {\n                    valueSpots = new RangeMap(valueSpots);\n                }\n                for (i = 0; i < yvalcount; i++) {\n                    color = valueSpots.get(yvalues[i]);\n                    if (color) {\n                        target.drawCircle(canvasLeft + Math.round((xvalues[i] - this.minx) * (canvasWidth / rangex)),\n                            canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[i] - this.miny) / rangey))),\n                            spotRadius, undefined,\n                            color).append();\n                    }\n                }\n\n            }\n            if (spotRadius && options.get('spotColor') && yvalues[yvallast] !== null) {\n                target.drawCircle(canvasLeft + Math.round((xvalues[xvalues.length - 1] - this.minx) * (canvasWidth / rangex)),\n                    canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[yvallast] - this.miny) / rangey))),\n                    spotRadius, undefined,\n                    options.get('spotColor')).append();\n            }\n            if (this.maxy !== this.minyorg) {\n                if (spotRadius && options.get('minSpotColor')) {\n                    x = xvalues[$.inArray(this.minyorg, yvalues)];\n                    target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)),\n                        canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.minyorg - this.miny) / rangey))),\n                        spotRadius, undefined,\n                        options.get('minSpotColor')).append();\n                }\n                if (spotRadius && options.get('maxSpotColor')) {\n                    x = xvalues[$.inArray(this.maxyorg, yvalues)];\n                    target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)),\n                        canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.maxyorg - this.miny) / rangey))),\n                        spotRadius, undefined,\n                        options.get('maxSpotColor')).append();\n                }\n            }\n\n            this.lastShapeId = target.getLastShapeId();\n            this.canvasTop = canvasTop;\n            target.render();\n        }\n    });\n\n\n    /**\n     * Bar charts\n     */\n    $.fn.sparkline.bar = bar = createClass($.fn.sparkline._base, barHighlightMixin, {\n        type: 'bar',\n\n        init: function (el, values, options, width, height) {\n            var barWidth = parseInt(options.get('barWidth'), 10),\n                barSpacing = parseInt(options.get('barSpacing'), 10),\n                chartRangeMin = options.get('chartRangeMin'),\n                chartRangeMax = options.get('chartRangeMax'),\n                chartRangeClip = options.get('chartRangeClip'),\n                stackMin = Infinity,\n                stackMax = -Infinity,\n                isStackString, groupMin, groupMax, stackRanges,\n                numValues, i, vlen, range, zeroAxis, xaxisOffset, min, max, clipMin, clipMax,\n                stacked, vlist, j, slen, svals, val, yoffset, yMaxCalc, canvasHeightEf;\n            bar._super.init.call(this, el, values, options, width, height);\n\n            // scan values to determine whether to stack bars\n            for (i = 0, vlen = values.length; i < vlen; i++) {\n                val = values[i];\n                isStackString = typeof(val) === 'string' && val.indexOf(':') > -1;\n                if (isStackString || $.isArray(val)) {\n                    stacked = true;\n                    if (isStackString) {\n                        val = values[i] = normalizeValues(val.split(':'));\n                    }\n                    val = remove(val, null); // min/max will treat null as zero\n                    groupMin = Math.min.apply(Math, val);\n                    groupMax = Math.max.apply(Math, val);\n                    if (groupMin < stackMin) {\n                        stackMin = groupMin;\n                    }\n                    if (groupMax > stackMax) {\n                        stackMax = groupMax;\n                    }\n                }\n            }\n\n            this.stacked = stacked;\n            this.regionShapes = {};\n            this.barWidth = barWidth;\n            this.barSpacing = barSpacing;\n            this.totalBarWidth = barWidth + barSpacing;\n            this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing);\n\n            this.initTarget();\n\n            if (chartRangeClip) {\n                clipMin = chartRangeMin === undefined ? -Infinity : chartRangeMin;\n                clipMax = chartRangeMax === undefined ? Infinity : chartRangeMax;\n            }\n\n            numValues = [];\n            stackRanges = stacked ? [] : numValues;\n            var stackTotals = [];\n            var stackRangesNeg = [];\n            for (i = 0, vlen = values.length; i < vlen; i++) {\n                if (stacked) {\n                    vlist = values[i];\n                    values[i] = svals = [];\n                    stackTotals[i] = 0;\n                    stackRanges[i] = stackRangesNeg[i] = 0;\n                    for (j = 0, slen = vlist.length; j < slen; j++) {\n                        val = svals[j] = chartRangeClip ? clipval(vlist[j], clipMin, clipMax) : vlist[j];\n                        if (val !== null) {\n                            if (val > 0) {\n                                stackTotals[i] += val;\n                            }\n                            if (stackMin < 0 && stackMax > 0) {\n                                if (val < 0) {\n                                    stackRangesNeg[i] += Math.abs(val);\n                                } else {\n                                    stackRanges[i] += val;\n                                }\n                            } else {\n                                stackRanges[i] += Math.abs(val - (val < 0 ? stackMax : stackMin));\n                            }\n                            numValues.push(val);\n                        }\n                    }\n                } else {\n                    val = chartRangeClip ? clipval(values[i], clipMin, clipMax) : values[i];\n                    val = values[i] = normalizeValue(val);\n                    if (val !== null) {\n                        numValues.push(val);\n                    }\n                }\n            }\n            this.max = max = Math.max.apply(Math, numValues);\n            this.min = min = Math.min.apply(Math, numValues);\n            this.stackMax = stackMax = stacked ? Math.max.apply(Math, stackTotals) : max;\n            this.stackMin = stackMin = stacked ? Math.min.apply(Math, numValues) : min;\n\n            if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < min)) {\n                min = options.get('chartRangeMin');\n            }\n            if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > max)) {\n                max = options.get('chartRangeMax');\n            }\n\n            this.zeroAxis = zeroAxis = options.get('zeroAxis', true);\n            if (min <= 0 && max >= 0 && zeroAxis) {\n                xaxisOffset = 0;\n            } else if (zeroAxis == false) {\n                xaxisOffset = min;\n            } else if (min > 0) {\n                xaxisOffset = min;\n            } else {\n                xaxisOffset = max;\n            }\n            this.xaxisOffset = xaxisOffset;\n\n            range = stacked ? (Math.max.apply(Math, stackRanges) + Math.max.apply(Math, stackRangesNeg)) : max - min;\n\n            // as we plot zero/min values a single pixel line, we add a pixel to all other\n            // values - Reduce the effective canvas size to suit\n            this.canvasHeightEf = (zeroAxis && min < 0) ? this.canvasHeight - 2 : this.canvasHeight - 1;\n\n            if (min < xaxisOffset) {\n                yMaxCalc = (stacked && max >= 0) ? stackMax : max;\n                yoffset = (yMaxCalc - xaxisOffset) / range * this.canvasHeight;\n                if (yoffset !== Math.ceil(yoffset)) {\n                    this.canvasHeightEf -= 2;\n                    yoffset = Math.ceil(yoffset);\n                }\n            } else {\n                yoffset = this.canvasHeight;\n            }\n            this.yoffset = yoffset;\n\n            if ($.isArray(options.get('colorMap'))) {\n                this.colorMapByIndex = options.get('colorMap');\n                this.colorMapByValue = null;\n            } else {\n                this.colorMapByIndex = null;\n                this.colorMapByValue = options.get('colorMap');\n                if (this.colorMapByValue && this.colorMapByValue.get === undefined) {\n                    this.colorMapByValue = new RangeMap(this.colorMapByValue);\n                }\n            }\n\n            this.range = range;\n        },\n\n        getRegion: function (el, x, y) {\n            var result = Math.floor(x / this.totalBarWidth);\n            return (result < 0 || result >= this.values.length) ? undefined : result;\n        },\n\n        getCurrentRegionFields: function () {\n            var currentRegion = this.currentRegion,\n                values = ensureArray(this.values[currentRegion]),\n                result = [],\n                value, i;\n            for (i = values.length; i--;) {\n                value = values[i];\n                result.push({\n                    isNull: value === null,\n                    value: value,\n                    color: this.calcColor(i, value, currentRegion),\n                    offset: currentRegion\n                });\n            }\n            return result;\n        },\n\n        calcColor: function (stacknum, value, valuenum) {\n            var colorMapByIndex = this.colorMapByIndex,\n                colorMapByValue = this.colorMapByValue,\n                options = this.options,\n                color, newColor;\n            if (this.stacked) {\n                color = options.get('stackedBarColor');\n            } else {\n                color = (value < 0) ? options.get('negBarColor') : options.get('barColor');\n            }\n            if (value === 0 && options.get('zeroColor') !== undefined) {\n                color = options.get('zeroColor');\n            }\n            if (colorMapByValue && (newColor = colorMapByValue.get(value))) {\n                color = newColor;\n            } else if (colorMapByIndex && colorMapByIndex.length > valuenum) {\n                color = colorMapByIndex[valuenum];\n            }\n            return $.isArray(color) ? color[stacknum % color.length] : color;\n        },\n\n        /**\n         * Render bar(s) for a region\n         */\n        renderRegion: function (valuenum, highlight) {\n            var vals = this.values[valuenum],\n                options = this.options,\n                xaxisOffset = this.xaxisOffset,\n                result = [],\n                range = this.range,\n                stacked = this.stacked,\n                target = this.target,\n                x = valuenum * this.totalBarWidth,\n                canvasHeightEf = this.canvasHeightEf,\n                yoffset = this.yoffset,\n                y, height, color, isNull, yoffsetNeg, i, valcount, val, minPlotted, allMin;\n\n            vals = $.isArray(vals) ? vals : [vals];\n            valcount = vals.length;\n            val = vals[0];\n            isNull = all(null, vals);\n            allMin = all(xaxisOffset, vals, true);\n\n            if (isNull) {\n                if (options.get('nullColor')) {\n                    color = highlight ? options.get('nullColor') : this.calcHighlightColor(options.get('nullColor'), options);\n                    y = (yoffset > 0) ? yoffset - 1 : yoffset;\n                    return target.drawRect(x, y, this.barWidth - 1, 0, color, color);\n                } else {\n                    return undefined;\n                }\n            }\n            yoffsetNeg = yoffset;\n            for (i = 0; i < valcount; i++) {\n                val = vals[i];\n\n                if (stacked && val === xaxisOffset) {\n                    if (!allMin || minPlotted) {\n                        continue;\n                    }\n                    minPlotted = true;\n                }\n\n                if (range > 0) {\n                    height = Math.floor(canvasHeightEf * ((Math.abs(val - xaxisOffset) / range))) + 1;\n                } else {\n                    height = 1;\n                }\n                if (val < xaxisOffset || (val === xaxisOffset && yoffset === 0)) {\n                    y = yoffsetNeg;\n                    yoffsetNeg += height;\n                } else {\n                    y = yoffset - height;\n                    yoffset -= height;\n                }\n                color = this.calcColor(i, val, valuenum);\n                if (highlight) {\n                    color = this.calcHighlightColor(color, options);\n                }\n                result.push(target.drawRect(x, y, this.barWidth - 1, height - 1, color, color));\n            }\n            if (result.length === 1) {\n                return result[0];\n            }\n            return result;\n        }\n    });\n\n\n    /**\n     * Tristate charts\n     */\n    $.fn.sparkline.tristate = tristate = createClass($.fn.sparkline._base, barHighlightMixin, {\n        type: 'tristate',\n\n        init: function (el, values, options, width, height) {\n            var barWidth = parseInt(options.get('barWidth'), 10),\n                barSpacing = parseInt(options.get('barSpacing'), 10);\n            tristate._super.init.call(this, el, values, options, width, height);\n\n            this.regionShapes = {};\n            this.barWidth = barWidth;\n            this.barSpacing = barSpacing;\n            this.totalBarWidth = barWidth + barSpacing;\n            this.values = $.map(values, Number);\n            this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing);\n\n            if ($.isArray(options.get('colorMap'))) {\n                this.colorMapByIndex = options.get('colorMap');\n                this.colorMapByValue = null;\n            } else {\n                this.colorMapByIndex = null;\n                this.colorMapByValue = options.get('colorMap');\n                if (this.colorMapByValue && this.colorMapByValue.get === undefined) {\n                    this.colorMapByValue = new RangeMap(this.colorMapByValue);\n                }\n            }\n            this.initTarget();\n        },\n\n        getRegion: function (el, x, y) {\n            return Math.floor(x / this.totalBarWidth);\n        },\n\n        getCurrentRegionFields: function () {\n            var currentRegion = this.currentRegion;\n            return {\n                isNull: this.values[currentRegion] === undefined,\n                value: this.values[currentRegion],\n                color: this.calcColor(this.values[currentRegion], currentRegion),\n                offset: currentRegion\n            };\n        },\n\n        calcColor: function (value, valuenum) {\n            var values = this.values,\n                options = this.options,\n                colorMapByIndex = this.colorMapByIndex,\n                colorMapByValue = this.colorMapByValue,\n                color, newColor;\n\n            if (colorMapByValue && (newColor = colorMapByValue.get(value))) {\n                color = newColor;\n            } else if (colorMapByIndex && colorMapByIndex.length > valuenum) {\n                color = colorMapByIndex[valuenum];\n            } else if (values[valuenum] < 0) {\n                color = options.get('negBarColor');\n            } else if (values[valuenum] > 0) {\n                color = options.get('posBarColor');\n            } else {\n                color = options.get('zeroBarColor');\n            }\n            return color;\n        },\n\n        renderRegion: function (valuenum, highlight) {\n            var values = this.values,\n                options = this.options,\n                target = this.target,\n                canvasHeight, height, halfHeight,\n                x, y, color;\n\n            canvasHeight = target.pixelHeight;\n            halfHeight = Math.round(canvasHeight / 2);\n\n            x = valuenum * this.totalBarWidth;\n            if (values[valuenum] < 0) {\n                y = halfHeight;\n                height = halfHeight - 1;\n            } else if (values[valuenum] > 0) {\n                y = 0;\n                height = halfHeight - 1;\n            } else {\n                y = halfHeight - 1;\n                height = 2;\n            }\n            color = this.calcColor(values[valuenum], valuenum);\n            if (color === null) {\n                return;\n            }\n            if (highlight) {\n                color = this.calcHighlightColor(color, options);\n            }\n            return target.drawRect(x, y, this.barWidth - 1, height - 1, color, color);\n        }\n    });\n\n\n    /**\n     * Discrete charts\n     */\n    $.fn.sparkline.discrete = discrete = createClass($.fn.sparkline._base, barHighlightMixin, {\n        type: 'discrete',\n\n        init: function (el, values, options, width, height) {\n            discrete._super.init.call(this, el, values, options, width, height);\n\n            this.regionShapes = {};\n            this.values = values = $.map(values, Number);\n            this.min = Math.min.apply(Math, values);\n            this.max = Math.max.apply(Math, values);\n            this.range = this.max - this.min;\n            this.width = width = options.get('width') === 'auto' ? values.length * 2 : this.width;\n            this.interval = Math.floor(width / values.length);\n            this.itemWidth = width / values.length;\n            if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.min)) {\n                this.min = options.get('chartRangeMin');\n            }\n            if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.max)) {\n                this.max = options.get('chartRangeMax');\n            }\n            this.initTarget();\n            if (this.target) {\n                this.lineHeight = options.get('lineHeight') === 'auto' ? Math.round(this.canvasHeight * 0.3) : options.get('lineHeight');\n            }\n        },\n\n        getRegion: function (el, x, y) {\n            return Math.floor(x / this.itemWidth);\n        },\n\n        getCurrentRegionFields: function () {\n            var currentRegion = this.currentRegion;\n            return {\n                isNull: this.values[currentRegion] === undefined,\n                value: this.values[currentRegion],\n                offset: currentRegion\n            };\n        },\n\n        renderRegion: function (valuenum, highlight) {\n            var values = this.values,\n                options = this.options,\n                min = this.min,\n                max = this.max,\n                range = this.range,\n                interval = this.interval,\n                target = this.target,\n                canvasHeight = this.canvasHeight,\n                lineHeight = this.lineHeight,\n                pheight = canvasHeight - lineHeight,\n                ytop, val, color, x;\n\n            val = clipval(values[valuenum], min, max);\n            x = valuenum * interval;\n            ytop = Math.round(pheight - pheight * ((val - min) / range));\n            color = (options.get('thresholdColor') && val < options.get('thresholdValue')) ? options.get('thresholdColor') : options.get('lineColor');\n            if (highlight) {\n                color = this.calcHighlightColor(color, options);\n            }\n            return target.drawLine(x, ytop, x, ytop + lineHeight, color);\n        }\n    });\n\n\n    /**\n     * Bullet charts\n     */\n    $.fn.sparkline.bullet = bullet = createClass($.fn.sparkline._base, {\n        type: 'bullet',\n\n        init: function (el, values, options, width, height) {\n            var min, max, vals;\n            bullet._super.init.call(this, el, values, options, width, height);\n\n            // values: target, performance, range1, range2, range3\n            this.values = values = normalizeValues(values);\n            // target or performance could be null\n            vals = values.slice();\n            vals[0] = vals[0] === null ? vals[2] : vals[0];\n            vals[1] = values[1] === null ? vals[2] : vals[1];\n            min = Math.min.apply(Math, values);\n            max = Math.max.apply(Math, values);\n            if (options.get('base') === undefined) {\n                min = min < 0 ? min : 0;\n            } else {\n                min = options.get('base');\n            }\n            this.min = min;\n            this.max = max;\n            this.range = max - min;\n            this.shapes = {};\n            this.valueShapes = {};\n            this.regiondata = {};\n            this.width = width = options.get('width') === 'auto' ? '4.0em' : width;\n            this.target = this.$el.simpledraw(width, height, options.get('composite'));\n            if (!values.length) {\n                this.disabled = true;\n            }\n            this.initTarget();\n        },\n\n        getRegion: function (el, x, y) {\n            var shapeid = this.target.getShapeAt(el, x, y);\n            return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined;\n        },\n\n        getCurrentRegionFields: function () {\n            var currentRegion = this.currentRegion;\n            return {\n                fieldkey: currentRegion.substr(0, 1),\n                value: this.values[currentRegion.substr(1)],\n                region: currentRegion\n            };\n        },\n\n        changeHighlight: function (highlight) {\n            var currentRegion = this.currentRegion,\n                shapeid = this.valueShapes[currentRegion],\n                shape;\n            delete this.shapes[shapeid];\n            switch (currentRegion.substr(0, 1)) {\n                case 'r':\n                    shape = this.renderRange(currentRegion.substr(1), highlight);\n                    break;\n                case 'p':\n                    shape = this.renderPerformance(highlight);\n                    break;\n                case 't':\n                    shape = this.renderTarget(highlight);\n                    break;\n            }\n            this.valueShapes[currentRegion] = shape.id;\n            this.shapes[shape.id] = currentRegion;\n            this.target.replaceWithShape(shapeid, shape);\n        },\n\n        renderRange: function (rn, highlight) {\n            var rangeval = this.values[rn],\n                rangewidth = Math.round(this.canvasWidth * ((rangeval - this.min) / this.range)),\n                color = this.options.get('rangeColors')[rn - 2];\n            if (highlight) {\n                color = this.calcHighlightColor(color, this.options);\n            }\n            return this.target.drawRect(0, 0, rangewidth - 1, this.canvasHeight - 1, color, color);\n        },\n\n        renderPerformance: function (highlight) {\n            var perfval = this.values[1],\n                perfwidth = Math.round(this.canvasWidth * ((perfval - this.min) / this.range)),\n                color = this.options.get('performanceColor');\n            if (highlight) {\n                color = this.calcHighlightColor(color, this.options);\n            }\n            return this.target.drawRect(0, Math.round(this.canvasHeight * 0.3), perfwidth - 1,\n                Math.round(this.canvasHeight * 0.4) - 1, color, color);\n        },\n\n        renderTarget: function (highlight) {\n            var targetval = this.values[0],\n                x = Math.round(this.canvasWidth * ((targetval - this.min) / this.range) - (this.options.get('targetWidth') / 2)),\n                targettop = Math.round(this.canvasHeight * 0.10),\n                targetheight = this.canvasHeight - (targettop * 2),\n                color = this.options.get('targetColor');\n            if (highlight) {\n                color = this.calcHighlightColor(color, this.options);\n            }\n            return this.target.drawRect(x, targettop, this.options.get('targetWidth') - 1, targetheight - 1, color, color);\n        },\n\n        render: function () {\n            var vlen = this.values.length,\n                target = this.target,\n                i, shape;\n            if (!bullet._super.render.call(this)) {\n                return;\n            }\n            for (i = 2; i < vlen; i++) {\n                shape = this.renderRange(i).append();\n                this.shapes[shape.id] = 'r' + i;\n                this.valueShapes['r' + i] = shape.id;\n            }\n            if (this.values[1] !== null) {\n                shape = this.renderPerformance().append();\n                this.shapes[shape.id] = 'p1';\n                this.valueShapes.p1 = shape.id;\n            }\n            if (this.values[0] !== null) {\n                shape = this.renderTarget().append();\n                this.shapes[shape.id] = 't0';\n                this.valueShapes.t0 = shape.id;\n            }\n            target.render();\n        }\n    });\n\n\n    /**\n     * Pie charts\n     */\n    $.fn.sparkline.pie = pie = createClass($.fn.sparkline._base, {\n        type: 'pie',\n\n        init: function (el, values, options, width, height) {\n            var total = 0, i;\n\n            pie._super.init.call(this, el, values, options, width, height);\n\n            this.shapes = {}; // map shape ids to value offsets\n            this.valueShapes = {}; // maps value offsets to shape ids\n            this.values = values = $.map(values, Number);\n\n            if (options.get('width') === 'auto') {\n                this.width = this.height;\n            }\n\n            if (values.length > 0) {\n                for (i = values.length; i--;) {\n                    total += values[i];\n                }\n            }\n            this.total = total;\n            this.initTarget();\n            this.radius = Math.floor(Math.min(this.canvasWidth, this.canvasHeight) / 2);\n        },\n\n        getRegion: function (el, x, y) {\n            var shapeid = this.target.getShapeAt(el, x, y);\n            return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined;\n        },\n\n        getCurrentRegionFields: function () {\n            var currentRegion = this.currentRegion;\n            return {\n                isNull: this.values[currentRegion] === undefined,\n                value: this.values[currentRegion],\n                percent: this.values[currentRegion] / this.total * 100,\n                color: this.options.get('sliceColors')[currentRegion % this.options.get('sliceColors').length],\n                offset: currentRegion\n            };\n        },\n\n        changeHighlight: function (highlight) {\n            var currentRegion = this.currentRegion,\n                 newslice = this.renderSlice(currentRegion, highlight),\n                 shapeid = this.valueShapes[currentRegion];\n            delete this.shapes[shapeid];\n            this.target.replaceWithShape(shapeid, newslice);\n            this.valueShapes[currentRegion] = newslice.id;\n            this.shapes[newslice.id] = currentRegion;\n        },\n\n        renderSlice: function (valuenum, highlight) {\n            var target = this.target,\n                options = this.options,\n                radius = this.radius,\n                borderWidth = options.get('borderWidth'),\n                offset = options.get('offset'),\n                circle = 2 * Math.PI,\n                values = this.values,\n                total = this.total,\n                next = offset ? (2*Math.PI)*(offset/360) : 0,\n                start, end, i, vlen, color;\n\n            vlen = values.length;\n            for (i = 0; i < vlen; i++) {\n                start = next;\n                end = next;\n                if (total > 0) {  // avoid divide by zero\n                    end = next + (circle * (values[i] / total));\n                }\n                if (valuenum === i) {\n                    color = options.get('sliceColors')[i % options.get('sliceColors').length];\n                    if (highlight) {\n                        color = this.calcHighlightColor(color, options);\n                    }\n\n                    return target.drawPieSlice(radius, radius, radius - borderWidth, start, end, undefined, color);\n                }\n                next = end;\n            }\n        },\n\n        render: function () {\n            var target = this.target,\n                values = this.values,\n                options = this.options,\n                radius = this.radius,\n                borderWidth = options.get('borderWidth'),\n                shape, i;\n\n            if (!pie._super.render.call(this)) {\n                return;\n            }\n            if (borderWidth) {\n                target.drawCircle(radius, radius, Math.floor(radius - (borderWidth / 2)),\n                    options.get('borderColor'), undefined, borderWidth).append();\n            }\n            for (i = values.length; i--;) {\n                if (values[i]) { // don't render zero values\n                    shape = this.renderSlice(i).append();\n                    this.valueShapes[i] = shape.id; // store just the shapeid\n                    this.shapes[shape.id] = i;\n                }\n            }\n            target.render();\n        }\n    });\n\n\n    /**\n     * Box plots\n     */\n    $.fn.sparkline.box = box = createClass($.fn.sparkline._base, {\n        type: 'box',\n\n        init: function (el, values, options, width, height) {\n            box._super.init.call(this, el, values, options, width, height);\n            this.values = $.map(values, Number);\n            this.width = options.get('width') === 'auto' ? '4.0em' : width;\n            this.initTarget();\n            if (!this.values.length) {\n                this.disabled = 1;\n            }\n        },\n\n        /**\n         * Simulate a single region\n         */\n        getRegion: function () {\n            return 1;\n        },\n\n        getCurrentRegionFields: function () {\n            var result = [\n                { field: 'lq', value: this.quartiles[0] },\n                { field: 'med', value: this.quartiles[1] },\n                { field: 'uq', value: this.quartiles[2] }\n            ];\n            if (this.loutlier !== undefined) {\n                result.push({ field: 'lo', value: this.loutlier});\n            }\n            if (this.routlier !== undefined) {\n                result.push({ field: 'ro', value: this.routlier});\n            }\n            if (this.lwhisker !== undefined) {\n                result.push({ field: 'lw', value: this.lwhisker});\n            }\n            if (this.rwhisker !== undefined) {\n                result.push({ field: 'rw', value: this.rwhisker});\n            }\n            return result;\n        },\n\n        render: function () {\n            var target = this.target,\n                values = this.values,\n                vlen = values.length,\n                options = this.options,\n                canvasWidth = this.canvasWidth,\n                canvasHeight = this.canvasHeight,\n                minValue = options.get('chartRangeMin') === undefined ? Math.min.apply(Math, values) : options.get('chartRangeMin'),\n                maxValue = options.get('chartRangeMax') === undefined ? Math.max.apply(Math, values) : options.get('chartRangeMax'),\n                canvasLeft = 0,\n                lwhisker, loutlier, iqr, q1, q2, q3, rwhisker, routlier, i,\n                size, unitSize;\n\n            if (!box._super.render.call(this)) {\n                return;\n            }\n\n            if (options.get('raw')) {\n                if (options.get('showOutliers') && values.length > 5) {\n                    loutlier = values[0];\n                    lwhisker = values[1];\n                    q1 = values[2];\n                    q2 = values[3];\n                    q3 = values[4];\n                    rwhisker = values[5];\n                    routlier = values[6];\n                } else {\n                    lwhisker = values[0];\n                    q1 = values[1];\n                    q2 = values[2];\n                    q3 = values[3];\n                    rwhisker = values[4];\n                }\n            } else {\n                values.sort(function (a, b) { return a - b; });\n                q1 = quartile(values, 1);\n                q2 = quartile(values, 2);\n                q3 = quartile(values, 3);\n                iqr = q3 - q1;\n                if (options.get('showOutliers')) {\n                    lwhisker = rwhisker = undefined;\n                    for (i = 0; i < vlen; i++) {\n                        if (lwhisker === undefined && values[i] > q1 - (iqr * options.get('outlierIQR'))) {\n                            lwhisker = values[i];\n                        }\n                        if (values[i] < q3 + (iqr * options.get('outlierIQR'))) {\n                            rwhisker = values[i];\n                        }\n                    }\n                    loutlier = values[0];\n                    routlier = values[vlen - 1];\n                } else {\n                    lwhisker = values[0];\n                    rwhisker = values[vlen - 1];\n                }\n            }\n            this.quartiles = [q1, q2, q3];\n            this.lwhisker = lwhisker;\n            this.rwhisker = rwhisker;\n            this.loutlier = loutlier;\n            this.routlier = routlier;\n\n            unitSize = canvasWidth / (maxValue - minValue + 1);\n            if (options.get('showOutliers')) {\n                canvasLeft = Math.ceil(options.get('spotRadius'));\n                canvasWidth -= 2 * Math.ceil(options.get('spotRadius'));\n                unitSize = canvasWidth / (maxValue - minValue + 1);\n                if (loutlier < lwhisker) {\n                    target.drawCircle((loutlier - minValue) * unitSize + canvasLeft,\n                        canvasHeight / 2,\n                        options.get('spotRadius'),\n                        options.get('outlierLineColor'),\n                        options.get('outlierFillColor')).append();\n                }\n                if (routlier > rwhisker) {\n                    target.drawCircle((routlier - minValue) * unitSize + canvasLeft,\n                        canvasHeight / 2,\n                        options.get('spotRadius'),\n                        options.get('outlierLineColor'),\n                        options.get('outlierFillColor')).append();\n                }\n            }\n\n            // box\n            target.drawRect(\n                Math.round((q1 - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight * 0.1),\n                Math.round((q3 - q1) * unitSize),\n                Math.round(canvasHeight * 0.8),\n                options.get('boxLineColor'),\n                options.get('boxFillColor')).append();\n            // left whisker\n            target.drawLine(\n                Math.round((lwhisker - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight / 2),\n                Math.round((q1 - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight / 2),\n                options.get('lineColor')).append();\n            target.drawLine(\n                Math.round((lwhisker - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight / 4),\n                Math.round((lwhisker - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight - canvasHeight / 4),\n                options.get('whiskerColor')).append();\n            // right whisker\n            target.drawLine(Math.round((rwhisker - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight / 2),\n                Math.round((q3 - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight / 2),\n                options.get('lineColor')).append();\n            target.drawLine(\n                Math.round((rwhisker - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight / 4),\n                Math.round((rwhisker - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight - canvasHeight / 4),\n                options.get('whiskerColor')).append();\n            // median line\n            target.drawLine(\n                Math.round((q2 - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight * 0.1),\n                Math.round((q2 - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight * 0.9),\n                options.get('medianColor')).append();\n            if (options.get('target')) {\n                size = Math.ceil(options.get('spotRadius'));\n                target.drawLine(\n                    Math.round((options.get('target') - minValue) * unitSize + canvasLeft),\n                    Math.round((canvasHeight / 2) - size),\n                    Math.round((options.get('target') - minValue) * unitSize + canvasLeft),\n                    Math.round((canvasHeight / 2) + size),\n                    options.get('targetColor')).append();\n                target.drawLine(\n                    Math.round((options.get('target') - minValue) * unitSize + canvasLeft - size),\n                    Math.round(canvasHeight / 2),\n                    Math.round((options.get('target') - minValue) * unitSize + canvasLeft + size),\n                    Math.round(canvasHeight / 2),\n                    options.get('targetColor')).append();\n            }\n            target.render();\n        }\n    });\n\n\n    // Setup a very simple \"virtual canvas\" to make drawing the few shapes we need easier\n    // This is accessible as $(foo).simpledraw()\n\n    VShape = createClass({\n        init: function (target, id, type, args) {\n            this.target = target;\n            this.id = id;\n            this.type = type;\n            this.args = args;\n        },\n        append: function () {\n            this.target.appendShape(this);\n            return this;\n        }\n    });\n\n    VCanvas_base = createClass({\n        _pxregex: /(\\d+)(px)?\\s*$/i,\n\n        init: function (width, height, target) {\n            if (!width) {\n                return;\n            }\n            this.width = width;\n            this.height = height;\n            this.target = target;\n            this.lastShapeId = null;\n            if (target[0]) {\n                target = target[0];\n            }\n            $.data(target, '_jqs_vcanvas', this);\n        },\n\n        drawLine: function (x1, y1, x2, y2, lineColor, lineWidth) {\n            return this.drawShape([[x1, y1], [x2, y2]], lineColor, lineWidth);\n        },\n\n        drawShape: function (path, lineColor, fillColor, lineWidth) {\n            return this._genShape('Shape', [path, lineColor, fillColor, lineWidth]);\n        },\n\n        drawCircle: function (x, y, radius, lineColor, fillColor, lineWidth) {\n            return this._genShape('Circle', [x, y, radius, lineColor, fillColor, lineWidth]);\n        },\n\n        drawPieSlice: function (x, y, radius, startAngle, endAngle, lineColor, fillColor) {\n            return this._genShape('PieSlice', [x, y, radius, startAngle, endAngle, lineColor, fillColor]);\n        },\n\n        drawRect: function (x, y, width, height, lineColor, fillColor) {\n            return this._genShape('Rect', [x, y, width, height, lineColor, fillColor]);\n        },\n\n        getElement: function () {\n            return this.canvas;\n        },\n\n        /**\n         * Return the most recently inserted shape id\n         */\n        getLastShapeId: function () {\n            return this.lastShapeId;\n        },\n\n        /**\n         * Clear and reset the canvas\n         */\n        reset: function () {\n            alert('reset not implemented');\n        },\n\n        _insert: function (el, target) {\n            $(target).html(el);\n        },\n\n        /**\n         * Calculate the pixel dimensions of the canvas\n         */\n        _calculatePixelDims: function (width, height, canvas) {\n            // XXX This should probably be a configurable option\n            var match;\n            match = this._pxregex.exec(height);\n            if (match) {\n                this.pixelHeight = match[1];\n            } else {\n                this.pixelHeight = $(canvas).height();\n            }\n            match = this._pxregex.exec(width);\n            if (match) {\n                this.pixelWidth = match[1];\n            } else {\n                this.pixelWidth = $(canvas).width();\n            }\n        },\n\n        /**\n         * Generate a shape object and id for later rendering\n         */\n        _genShape: function (shapetype, shapeargs) {\n            var id = shapeCount++;\n            shapeargs.unshift(id);\n            return new VShape(this, id, shapetype, shapeargs);\n        },\n\n        /**\n         * Add a shape to the end of the render queue\n         */\n        appendShape: function (shape) {\n            alert('appendShape not implemented');\n        },\n\n        /**\n         * Replace one shape with another\n         */\n        replaceWithShape: function (shapeid, shape) {\n            alert('replaceWithShape not implemented');\n        },\n\n        /**\n         * Insert one shape after another in the render queue\n         */\n        insertAfterShape: function (shapeid, shape) {\n            alert('insertAfterShape not implemented');\n        },\n\n        /**\n         * Remove a shape from the queue\n         */\n        removeShapeId: function (shapeid) {\n            alert('removeShapeId not implemented');\n        },\n\n        /**\n         * Find a shape at the specified x/y co-ordinates\n         */\n        getShapeAt: function (el, x, y) {\n            alert('getShapeAt not implemented');\n        },\n\n        /**\n         * Render all queued shapes onto the canvas\n         */\n        render: function () {\n            alert('render not implemented');\n        }\n    });\n\n\n    VCanvas_canvas = createClass(VCanvas_base, {\n        init: function (width, height, target, interact) {\n            VCanvas_canvas._super.init.call(this, width, height, target);\n            this.canvas = document.createElement('canvas');\n            if (target[0]) {\n                target = target[0];\n            }\n            $.data(target, '_jqs_vcanvas', this);\n            $(this.canvas).css({ display: 'inline-block', width: width, height: height, verticalAlign: 'top' });\n            this._insert(this.canvas, target);\n            this._calculatePixelDims(width, height, this.canvas);\n            this.canvas.width = this.pixelWidth;\n            this.canvas.height = this.pixelHeight;\n            this.interact = interact;\n            this.shapes = {};\n            this.shapeseq = [];\n            this.currentTargetShapeId = undefined;\n            $(this.canvas).css({width: this.pixelWidth, height: this.pixelHeight});\n        },\n\n        _getContext: function (lineColor, fillColor, lineWidth) {\n            var context = this.canvas.getContext('2d');\n            if (lineColor !== undefined) {\n                context.strokeStyle = lineColor;\n            }\n            context.lineWidth = lineWidth === undefined ? 1 : lineWidth;\n            if (fillColor !== undefined) {\n                context.fillStyle = fillColor;\n            }\n            return context;\n        },\n\n        reset: function () {\n            var context = this._getContext();\n            context.clearRect(0, 0, this.pixelWidth, this.pixelHeight);\n            this.shapes = {};\n            this.shapeseq = [];\n            this.currentTargetShapeId = undefined;\n        },\n\n        _drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) {\n            var context = this._getContext(lineColor, fillColor, lineWidth),\n                i, plen;\n            context.beginPath();\n            context.moveTo(path[0][0] + 0.5, path[0][1] + 0.5);\n            for (i = 1, plen = path.length; i < plen; i++) {\n                context.lineTo(path[i][0] + 0.5, path[i][1] + 0.5); // the 0.5 offset gives us crisp pixel-width lines\n            }\n            if (lineColor !== undefined) {\n                context.stroke();\n            }\n            if (fillColor !== undefined) {\n                context.fill();\n            }\n            if (this.targetX !== undefined && this.targetY !== undefined &&\n                context.isPointInPath(this.targetX, this.targetY)) {\n                this.currentTargetShapeId = shapeid;\n            }\n        },\n\n        _drawCircle: function (shapeid, x, y, radius, lineColor, fillColor, lineWidth) {\n            var context = this._getContext(lineColor, fillColor, lineWidth);\n            context.beginPath();\n            context.arc(x, y, radius, 0, 2 * Math.PI, false);\n            if (this.targetX !== undefined && this.targetY !== undefined &&\n                context.isPointInPath(this.targetX, this.targetY)) {\n                this.currentTargetShapeId = shapeid;\n            }\n            if (lineColor !== undefined) {\n                context.stroke();\n            }\n            if (fillColor !== undefined) {\n                context.fill();\n            }\n        },\n\n        _drawPieSlice: function (shapeid, x, y, radius, startAngle, endAngle, lineColor, fillColor) {\n            var context = this._getContext(lineColor, fillColor);\n            context.beginPath();\n            context.moveTo(x, y);\n            context.arc(x, y, radius, startAngle, endAngle, false);\n            context.lineTo(x, y);\n            context.closePath();\n            if (lineColor !== undefined) {\n                context.stroke();\n            }\n            if (fillColor) {\n                context.fill();\n            }\n            if (this.targetX !== undefined && this.targetY !== undefined &&\n                context.isPointInPath(this.targetX, this.targetY)) {\n                this.currentTargetShapeId = shapeid;\n            }\n        },\n\n        _drawRect: function (shapeid, x, y, width, height, lineColor, fillColor) {\n            return this._drawShape(shapeid, [[x, y], [x + width, y], [x + width, y + height], [x, y + height], [x, y]], lineColor, fillColor);\n        },\n\n        appendShape: function (shape) {\n            this.shapes[shape.id] = shape;\n            this.shapeseq.push(shape.id);\n            this.lastShapeId = shape.id;\n            return shape.id;\n        },\n\n        replaceWithShape: function (shapeid, shape) {\n            var shapeseq = this.shapeseq,\n                i;\n            this.shapes[shape.id] = shape;\n            for (i = shapeseq.length; i--;) {\n                if (shapeseq[i] == shapeid) {\n                    shapeseq[i] = shape.id;\n                }\n            }\n            delete this.shapes[shapeid];\n        },\n\n        replaceWithShapes: function (shapeids, shapes) {\n            var shapeseq = this.shapeseq,\n                shapemap = {},\n                sid, i, first;\n\n            for (i = shapeids.length; i--;) {\n                shapemap[shapeids[i]] = true;\n            }\n            for (i = shapeseq.length; i--;) {\n                sid = shapeseq[i];\n                if (shapemap[sid]) {\n                    shapeseq.splice(i, 1);\n                    delete this.shapes[sid];\n                    first = i;\n                }\n            }\n            for (i = shapes.length; i--;) {\n                shapeseq.splice(first, 0, shapes[i].id);\n                this.shapes[shapes[i].id] = shapes[i];\n            }\n\n        },\n\n        insertAfterShape: function (shapeid, shape) {\n            var shapeseq = this.shapeseq,\n                i;\n            for (i = shapeseq.length; i--;) {\n                if (shapeseq[i] === shapeid) {\n                    shapeseq.splice(i + 1, 0, shape.id);\n                    this.shapes[shape.id] = shape;\n                    return;\n                }\n            }\n        },\n\n        removeShapeId: function (shapeid) {\n            var shapeseq = this.shapeseq,\n                i;\n            for (i = shapeseq.length; i--;) {\n                if (shapeseq[i] === shapeid) {\n                    shapeseq.splice(i, 1);\n                    break;\n                }\n            }\n            delete this.shapes[shapeid];\n        },\n\n        getShapeAt: function (el, x, y) {\n            this.targetX = x;\n            this.targetY = y;\n            this.render();\n            return this.currentTargetShapeId;\n        },\n\n        render: function () {\n            var shapeseq = this.shapeseq,\n                shapes = this.shapes,\n                shapeCount = shapeseq.length,\n                context = this._getContext(),\n                shapeid, shape, i;\n            context.clearRect(0, 0, this.pixelWidth, this.pixelHeight);\n            for (i = 0; i < shapeCount; i++) {\n                shapeid = shapeseq[i];\n                shape = shapes[shapeid];\n                this['_draw' + shape.type].apply(this, shape.args);\n            }\n            if (!this.interact) {\n                // not interactive so no need to keep the shapes array\n                this.shapes = {};\n                this.shapeseq = [];\n            }\n        }\n\n    });\n\n\n    VCanvas_vml = createClass(VCanvas_base, {\n        init: function (width, height, target) {\n            var groupel;\n            VCanvas_vml._super.init.call(this, width, height, target);\n            if (target[0]) {\n                target = target[0];\n            }\n            $.data(target, '_jqs_vcanvas', this);\n            this.canvas = document.createElement('span');\n            $(this.canvas).css({ display: 'inline-block', position: 'relative', overflow: 'hidden', width: width, height: height, margin: '0px', padding: '0px', verticalAlign: 'top'});\n            this._insert(this.canvas, target);\n            this._calculatePixelDims(width, height, this.canvas);\n            this.canvas.width = this.pixelWidth;\n            this.canvas.height = this.pixelHeight;\n            groupel = '<v:group coordorigin=\"0 0\" coordsize=\"' + this.pixelWidth + ' ' + this.pixelHeight + '\"' +\n                    ' style=\"position:absolute;top:0;left:0;width:' + this.pixelWidth + 'px;height=' + this.pixelHeight + 'px;\"></v:group>';\n            this.canvas.insertAdjacentHTML('beforeEnd', groupel);\n            this.group = $(this.canvas).children()[0];\n            this.rendered = false;\n            this.prerender = '';\n        },\n\n        _drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) {\n            var vpath = [],\n                initial, stroke, fill, closed, vel, plen, i;\n            for (i = 0, plen = path.length; i < plen; i++) {\n                vpath[i] = '' + (path[i][0]) + ',' + (path[i][1]);\n            }\n            initial = vpath.splice(0, 1);\n            lineWidth = lineWidth === undefined ? 1 : lineWidth;\n            stroke = lineColor === undefined ? ' stroked=\"false\" ' : ' strokeWeight=\"' + lineWidth + 'px\" strokeColor=\"' + lineColor + '\" ';\n            fill = fillColor === undefined ? ' filled=\"false\"' : ' fillColor=\"' + fillColor + '\" filled=\"true\" ';\n            closed = vpath[0] === vpath[vpath.length - 1] ? 'x ' : '';\n            vel = '<v:shape coordorigin=\"0 0\" coordsize=\"' + this.pixelWidth + ' ' + this.pixelHeight + '\" ' +\n                 ' id=\"jqsshape' + shapeid + '\" ' +\n                 stroke +\n                 fill +\n                ' style=\"position:absolute;left:0px;top:0px;height:' + this.pixelHeight + 'px;width:' + this.pixelWidth + 'px;padding:0px;margin:0px;\" ' +\n                ' path=\"m ' + initial + ' l ' + vpath.join(', ') + ' ' + closed + 'e\">' +\n                ' </v:shape>';\n            return vel;\n        },\n\n        _drawCircle: function (shapeid, x, y, radius, lineColor, fillColor, lineWidth) {\n            var stroke, fill, vel;\n            x -= radius;\n            y -= radius;\n            stroke = lineColor === undefined ? ' stroked=\"false\" ' : ' strokeWeight=\"' + lineWidth + 'px\" strokeColor=\"' + lineColor + '\" ';\n            fill = fillColor === undefined ? ' filled=\"false\"' : ' fillColor=\"' + fillColor + '\" filled=\"true\" ';\n            vel = '<v:oval ' +\n                 ' id=\"jqsshape' + shapeid + '\" ' +\n                stroke +\n                fill +\n                ' style=\"position:absolute;top:' + y + 'px; left:' + x + 'px; width:' + (radius * 2) + 'px; height:' + (radius * 2) + 'px\"></v:oval>';\n            return vel;\n\n        },\n\n        _drawPieSlice: function (shapeid, x, y, radius, startAngle, endAngle, lineColor, fillColor) {\n            var vpath, startx, starty, endx, endy, stroke, fill, vel;\n            if (startAngle === endAngle) {\n                return '';  // VML seems to have problem when start angle equals end angle.\n            }\n            if ((endAngle - startAngle) === (2 * Math.PI)) {\n                startAngle = 0.0;  // VML seems to have a problem when drawing a full circle that doesn't start 0\n                endAngle = (2 * Math.PI);\n            }\n\n            startx = x + Math.round(Math.cos(startAngle) * radius);\n            starty = y + Math.round(Math.sin(startAngle) * radius);\n            endx = x + Math.round(Math.cos(endAngle) * radius);\n            endy = y + Math.round(Math.sin(endAngle) * radius);\n\n            if (startx === endx && starty === endy) {\n                if ((endAngle - startAngle) < Math.PI) {\n                    // Prevent very small slices from being mistaken as a whole pie\n                    return '';\n                }\n                // essentially going to be the entire circle, so ignore startAngle\n                startx = endx = x + radius;\n                starty = endy = y;\n            }\n\n            if (startx === endx && starty === endy && (endAngle - startAngle) < Math.PI) {\n                return '';\n            }\n\n            vpath = [x - radius, y - radius, x + radius, y + radius, startx, starty, endx, endy];\n            stroke = lineColor === undefined ? ' stroked=\"false\" ' : ' strokeWeight=\"1px\" strokeColor=\"' + lineColor + '\" ';\n            fill = fillColor === undefined ? ' filled=\"false\"' : ' fillColor=\"' + fillColor + '\" filled=\"true\" ';\n            vel = '<v:shape coordorigin=\"0 0\" coordsize=\"' + this.pixelWidth + ' ' + this.pixelHeight + '\" ' +\n                 ' id=\"jqsshape' + shapeid + '\" ' +\n                 stroke +\n                 fill +\n                ' style=\"position:absolute;left:0px;top:0px;height:' + this.pixelHeight + 'px;width:' + this.pixelWidth + 'px;padding:0px;margin:0px;\" ' +\n                ' path=\"m ' + x + ',' + y + ' wa ' + vpath.join(', ') + ' x e\">' +\n                ' </v:shape>';\n            return vel;\n        },\n\n        _drawRect: function (shapeid, x, y, width, height, lineColor, fillColor) {\n            return this._drawShape(shapeid, [[x, y], [x, y + height], [x + width, y + height], [x + width, y], [x, y]], lineColor, fillColor);\n        },\n\n        reset: function () {\n            this.group.innerHTML = '';\n        },\n\n        appendShape: function (shape) {\n            var vel = this['_draw' + shape.type].apply(this, shape.args);\n            if (this.rendered) {\n                this.group.insertAdjacentHTML('beforeEnd', vel);\n            } else {\n                this.prerender += vel;\n            }\n            this.lastShapeId = shape.id;\n            return shape.id;\n        },\n\n        replaceWithShape: function (shapeid, shape) {\n            var existing = $('#jqsshape' + shapeid),\n                vel = this['_draw' + shape.type].apply(this, shape.args);\n            existing[0].outerHTML = vel;\n        },\n\n        replaceWithShapes: function (shapeids, shapes) {\n            // replace the first shapeid with all the new shapes then toast the remaining old shapes\n            var existing = $('#jqsshape' + shapeids[0]),\n                replace = '',\n                slen = shapes.length,\n                i;\n            for (i = 0; i < slen; i++) {\n                replace += this['_draw' + shapes[i].type].apply(this, shapes[i].args);\n            }\n            existing[0].outerHTML = replace;\n            for (i = 1; i < shapeids.length; i++) {\n                $('#jqsshape' + shapeids[i]).remove();\n            }\n        },\n\n        insertAfterShape: function (shapeid, shape) {\n            var existing = $('#jqsshape' + shapeid),\n                 vel = this['_draw' + shape.type].apply(this, shape.args);\n            existing[0].insertAdjacentHTML('afterEnd', vel);\n        },\n\n        removeShapeId: function (shapeid) {\n            var existing = $('#jqsshape' + shapeid);\n            this.group.removeChild(existing[0]);\n        },\n\n        getShapeAt: function (el, x, y) {\n            var shapeid = el.id.substr(8);\n            return shapeid;\n        },\n\n        render: function () {\n            if (!this.rendered) {\n                // batch the intial render into a single repaint\n                this.group.innerHTML = this.prerender;\n                this.rendered = true;\n            }\n        }\n    });\n\n\n}))}(document, Math));\n"},519:function(t,e,n){n(511)(n(518))},520:function(t,e){!function(t,e,n,a){function i(e,n){this.obj=t(e),this.o=t.extend({},t.fn[r].defaults,n),this.objId=this.obj.attr("id"),this.pwCtrls=".jarviswidget-ctrls",this.widget=this.obj.find(this.o.widgets),this.toggleClass=this.o.toggleClass.split("|"),this.editClass=this.o.editClass.split("|"),this.fullscreenClass=this.o.fullscreenClass.split("|"),this.customClass=this.o.customClass.split("|"),this.storage={enabled:this.o.localStorage},this.initialized=!1,this.init()}var r="jarvisWidgets",s=("ontouchstart"in e||e.DocumentTouch&&n instanceof DocumentTouch?"touchstart":"click")+"."+r;i.prototype={_runLoaderWidget:function(t){var e=this;!0===e.o.indicator&&t.parents(e.o.widgets).find(".jarviswidget-loader:first").stop(!0,!0).fadeIn(100).delay(e.o.indicatorTime).fadeOut(100)},_getPastTimestamp:function(t){var e=this,n=new Date(t),a=n.getMonth()+1,i=n.getDate(),r=n.getFullYear(),s=n.getHours(),l=n.getMinutes(),o=n.getUTCSeconds();return a<10&&(a="0"+a),i<10&&(i="0"+i),s<10&&(s="0"+s),l<10&&(l="0"+l),o<10&&(o="0"+o),e.o.timestampFormat.replace(/%d%/g,i).replace(/%m%/g,a).replace(/%y%/g,r).replace(/%h%/g,s).replace(/%i%/g,l).replace(/%s%/g,o)},_loadAjaxFile:function(e,n,a){var i=this;e.find(".widget-body").load(n,function(n,a,r){var s=t(this);if("error"==a&&s.html('<h4 class="alert alert-danger">'+i.o.labelError+"<b> "+r.status+" "+r.statusText+"</b></h4>"),"success"==a){var l=e.find(i.o.timestampPlaceholder);l.length&&l.html(i._getPastTimestamp(new Date)),"function"==typeof i.o.afterLoad&&i.o.afterLoad.call(this,e)}i=null}),this._runLoaderWidget(a)},_loadKeys:function(){var t=this;if(!0===t.o.ajaxnav){var e=location.hash.replace(/^#/,"");t.storage.keySettings="Plugin_settings_"+e+"_"+t.objId,t.storage.keyPosition="Plugin_position_"+e+"_"+t.objId}else if(!1===t.initialized){var e=t.o.pageKey||location.pathname;t.storage.keySettings="jarvisWidgets_settings_"+e+"_"+t.objId,t.storage.keyPosition="jarvisWidgets_position_"+e+"_"+t.objId}},_saveSettingsWidget:function(){var e=this,n=e.storage;e._loadKeys();var a=e.obj.find(e.o.widgets).map(function(){var e={};return e.id=t(this).attr("id"),e.style=t(this).attr("data-widget-attstyle"),e.title=t(this).children("header").children("h2").text(),e.hidden="none"==t(this).css("display")?1:0,e.collapsed=t(this).hasClass("jarviswidget-collapsed")?1:0,e}).get(),i=JSON.stringify({widget:a});n.enabled&&n.getKeySettings!=i&&(localStorage.setItem(n.keySettings,i),n.getKeySettings=i),"function"==typeof e.o.onSave&&e.o.onSave.call(this,null,i,n.keySettings)},_savePositionWidget:function(){var e=this,n=e.storage;e._loadKeys();var a=e.obj.find(e.o.grid+".sortable-grid").map(function(){return{section:t(this).find(e.o.widgets).map(function(){return{id:t(this).attr("id")}}).get()}}).get(),i=JSON.stringify({grid:a});n.enabled&&n.getKeyPosition!=i&&(localStorage.setItem(n.keyPosition,i),n.getKeyPosition=i),"function"==typeof e.o.onSave&&e.o.onSave.call(this,i,n.keyPosition)},init:function(){var e=this;if(!e.initialized){if(e._initStorage(e.storage),t("#"+e.objId).length||alert("It looks like your using a class instead of an ID, dont do that!"),!0===e.o.rtl&&t("body").addClass("rtl"),t(e.o.grid).each(function(){t(this).find(e.o.widgets).length&&t(this).addClass("sortable-grid")}),e.storage.enabled&&e.storage.getKeyPosition){var n=JSON.parse(e.storage.getKeyPosition);for(var a in n.grid){var i=e.obj.find(e.o.grid+".sortable-grid").eq(a);for(var l in n.grid[a].section)i.append(t("#"+n.grid[a].section[l].id))}}if(e.storage.enabled&&e.storage.getKeySettings){var o=JSON.parse(e.storage.getKeySettings);for(var a in o.widget){var u=t("#"+o.widget[a].id);o.widget[a].style&&u.removeClassPrefix("jarviswidget-color-").addClass(o.widget[a].style).attr("data-widget-attstyle",""+o.widget[a].style),1==o.widget[a].hidden?u.hide(1):u.show(1).removeAttr("data-widget-hidden"),1==o.widget[a].collapsed&&u.addClass("jarviswidget-collapsed").children("div").hide(1),u.children("header").children("h2").text()!=o.widget[a].title&&u.children("header").children("h2").text(o.widget[a].title)}}if(e.widget.each(function(){var n,a,i,r,s,l,o,u,h=t(this),c=t(this).children("header");if(!c.parent().attr("role")){!0===h.data("widget-hidden")&&h.hide(),!0===h.data("widget-collapsed")&&h.addClass("jarviswidget-collapsed").children("div").hide(),n=!0===e.o.customButton&&void 0===h.data("widget-custombutton")&&0!==e.customClass[0].length?'<a href="javascript:void(0);" class="button-icon jarviswidget-custom-btn"><i class="'+e.customClass[0]+'"></i></a>':"",a=!0===e.o.deleteButton&&void 0===h.data("widget-deletebutton")?'<a href="javascript:void(0);" class="button-icon jarviswidget-delete-btn" rel="tooltip" title="Delete" data-placement="bottom"><i class="'+e.o.deleteClass+'"></i></a>':"",i=!0===e.o.editButton&&void 0===h.data("widget-editbutton")?'<a href="javascript:void(0);" class="button-icon jarviswidget-edit-btn" rel="tooltip" title="Edit" data-placement="bottom"><i class="'+e.editClass[0]+'"></i></a>':"",r=!0===e.o.fullscreenButton&&void 0===h.data("widget-fullscreenbutton")?'<a href="javascript:void(0);" class="button-icon jarviswidget-fullscreen-btn" rel="tooltip" title="Fullscreen" data-placement="bottom"><i class="'+e.fullscreenClass[0]+'"></i></a>':"",!0===e.o.colorButton&&void 0===h.data("widget-colorbutton")?(s='<a data-toggle="dropdown" class="dropdown-toggle color-box selector" href="javascript:void(0);"></a><ul class="dropdown-menu arrow-box-up-right color-select pull-right"><li><span class="bg-color-green" data-widget-setstyle="jarviswidget-color-green" rel="tooltip" data-placement="left" data-original-title="Green Grass"></span></li><li><span class="bg-color-greenDark" data-widget-setstyle="jarviswidget-color-greenDark" rel="tooltip" data-placement="top" data-original-title="Dark Green"></span></li><li><span class="bg-color-greenLight" data-widget-setstyle="jarviswidget-color-greenLight" rel="tooltip" data-placement="top" data-original-title="Light Green"></span></li><li><span class="bg-color-purple" data-widget-setstyle="jarviswidget-color-purple" rel="tooltip" data-placement="top" data-original-title="Purple"></span></li><li><span class="bg-color-magenta" data-widget-setstyle="jarviswidget-color-magenta" rel="tooltip" data-placement="top" data-original-title="Magenta"></span></li><li><span class="bg-color-pink" data-widget-setstyle="jarviswidget-color-pink" rel="tooltip" data-placement="right" data-original-title="Pink"></span></li><li><span class="bg-color-pinkDark" data-widget-setstyle="jarviswidget-color-pinkDark" rel="tooltip" data-placement="left" data-original-title="Fade Pink"></span></li><li><span class="bg-color-blueLight" data-widget-setstyle="jarviswidget-color-blueLight" rel="tooltip" data-placement="top" data-original-title="Light Blue"></span></li><li><span class="bg-color-teal" data-widget-setstyle="jarviswidget-color-teal" rel="tooltip" data-placement="top" data-original-title="Teal"></span></li><li><span class="bg-color-blue" data-widget-setstyle="jarviswidget-color-blue" rel="tooltip" data-placement="top" data-original-title="Ocean Blue"></span></li><li><span class="bg-color-blueDark" data-widget-setstyle="jarviswidget-color-blueDark" rel="tooltip" data-placement="top" data-original-title="Night Sky"></span></li><li><span class="bg-color-darken" data-widget-setstyle="jarviswidget-color-darken" rel="tooltip" data-placement="right" data-original-title="Night"></span></li><li><span class="bg-color-yellow" data-widget-setstyle="jarviswidget-color-yellow" rel="tooltip" data-placement="left" data-original-title="Day Light"></span></li><li><span class="bg-color-orange" data-widget-setstyle="jarviswidget-color-orange" rel="tooltip" data-placement="bottom" data-original-title="Orange"></span></li><li><span class="bg-color-orangeDark" data-widget-setstyle="jarviswidget-color-orangeDark" rel="tooltip" data-placement="bottom" data-original-title="Dark Orange"></span></li><li><span class="bg-color-red" data-widget-setstyle="jarviswidget-color-red" rel="tooltip" data-placement="bottom" data-original-title="Red Rose"></span></li><li><span class="bg-color-redLight" data-widget-setstyle="jarviswidget-color-redLight" rel="tooltip" data-placement="bottom" data-original-title="Light Red"></span></li><li><span class="bg-color-white" data-widget-setstyle="jarviswidget-color-white" rel="tooltip" data-placement="right" data-original-title="Purity"></span></li><li><a href="javascript:void(0);" class="jarviswidget-remove-colors" data-widget-setstyle="" rel="tooltip" data-placement="bottom" data-original-title="Reset widget color to default">Remove</a></li></ul>',c.prepend('<div class="widget-toolbar">'+s+"</div>")):s="",!0===e.o.toggleButton&&void 0===h.data("widget-togglebutton")?(o=!0===h.data("widget-collapsed")||h.hasClass("jarviswidget-collapsed")?e.toggleClass[1]:e.toggleClass[0],l='<a href="javascript:void(0);" class="button-icon jarviswidget-toggle-btn" rel="tooltip" title="Collapse" data-placement="bottom"><i class="'+o+'"></i></a>'):l="",u=!0===e.o.refreshButton&&!1!==h.data("widget-refreshbutton")&&h.data("widget-load")?'<a href="javascript:void(0);" class="button-icon jarviswidget-refresh-btn" data-loading-text="&nbsp;&nbsp;Loading...&nbsp;" rel="tooltip" title="Refresh" data-placement="bottom"><i class="'+e.o.refreshButtonClass+'"></i></a>':"";var d=e.o.buttonOrder.replace(/%refresh%/g,u).replace(/%delete%/g,a).replace(/%custom%/g,n).replace(/%fullscreen%/g,r).replace(/%edit%/g,i).replace(/%toggle%/g,l);""===u&&""===a&&""===n&&""===r&&""===i&&""===l||c.prepend('<div class="jarviswidget-ctrls">'+d+"</div>"),!0===e.o.sortable&&void 0===h.data("widget-sortable")&&h.addClass("jarviswidget-sortable"),h.find(e.o.editPlaceholder).length&&h.find(e.o.editPlaceholder).find("input").val(t.trim(c.children("h2").text())),c.append('<span class="jarviswidget-loader"><i class="fa fa-refresh fa-spin"></i></span>'),h.attr("role","widget").children("div").attr("role","content").prev("header").attr("role","heading").children("div").attr("role","menu")}}),!0===e.o.buttonsHidden&&t(e.o.pwCtrls).hide(),e.obj.find("[data-widget-load]").each(function(){var n=t(this),a=n.children(),i=n.data("widget-load"),r=1e3*n.data("widget-refresh");n.children();n.find(".jarviswidget-ajax-placeholder").length||(n.children("widget-body").append('<div class="jarviswidget-ajax-placeholder">'+e.o.loadingLabel+"</div>"),n.data("widget-refresh")>0?(e._loadAjaxFile(n,i,a),t.intervalArr.push(setInterval(function(){e._loadAjaxFile(n,i,a)},r))):e._loadAjaxFile(n,i,a))}),!0===e.o.sortable&&jQuery.ui){var h=e.obj.find(e.o.grid+".sortable-grid").not("[data-widget-excludegrid]");h.sortable({items:h.find(e.o.widgets+".jarviswidget-sortable"),connectWith:h,placeholder:e.o.placeholderClass,cursor:"move",revert:!0,opacity:e.o.opacity,delay:200,cancel:".button-icon, #jarviswidget-fullscreen-mode > div",zIndex:1e4,handle:e.o.dragHandle,forcePlaceholderSize:!0,forceHelperSize:!0,update:function(t,n){e._runLoaderWidget(n.item.children()),e._savePositionWidget(),"function"==typeof e.o.onChange&&e.o.onChange.call(this,n.item)}})}!0===e.o.buttonsHidden&&e.widget.children("header").on("mouseenter."+r,function(){t(this).children(e.o.pwCtrls).stop(!0,!0).fadeTo(100,1)}).on("mouseleave."+r,function(){t(this).children(e.o.pwCtrls).stop(!0,!0).fadeTo(100,0)}),e._clickEvents(),e.storage.enabled&&(t(e.o.deleteSettingsKey).on(s,this,function(t){confirm(e.o.settingsKeyLabel)&&localStorage.removeItem(keySettings),t.preventDefault()}),t(e.o.deletePositionKey).on(s,this,function(t){confirm(e.o.positionKeyLabel)&&localStorage.removeItem(keyPosition),t.preventDefault()})),initialized=!0}},_initStorage:function(t){t.enabled=t.enabled&&!!function(){var t,e=+new Date;try{return localStorage.setItem(e,e),t=localStorage.getItem(e)==e,localStorage.removeItem(e),t}catch(t){}}(),this._loadKeys(),t.enabled&&(t.getKeySettings=localStorage.getItem(t.keySettings),t.getKeyPosition=localStorage.getItem(t.keyPosition))},_clickEvents:function(){function n(){if(t("#jarviswidget-fullscreen-mode").length){var n=t(e).height(),i=t("#jarviswidget-fullscreen-mode").children(a.o.widgets).children("header").height();t("#jarviswidget-fullscreen-mode").children(a.o.widgets).children("div").height(n-i-15)}}var a=this,i=a.widget.children("header");i.on(s,".jarviswidget-toggle-btn",function(e){var n=t(this),i=n.parents(a.o.widgets);a._runLoaderWidget(n),i.hasClass("jarviswidget-collapsed")?n.children().removeClass(a.toggleClass[1]).addClass(a.toggleClass[0]).parents(a.o.widgets).removeClass("jarviswidget-collapsed").children("[role=content]").slideDown(a.o.toggleSpeed,function(){a._saveSettingsWidget()}):n.children().removeClass(a.toggleClass[0]).addClass(a.toggleClass[1]).parents(a.o.widgets).addClass("jarviswidget-collapsed").children("[role=content]").slideUp(a.o.toggleSpeed,function(){a._saveSettingsWidget()}),"function"==typeof a.o.onToggle&&a.o.onToggle.call(this,i),e.preventDefault()}),i.on(s,".jarviswidget-fullscreen-btn",function(e){var i=t(this).parents(a.o.widgets),r=i.children("div");a._runLoaderWidget(t(this)),t("#jarviswidget-fullscreen-mode").length?(t(".nooverflow").removeClass("nooverflow"),i.unwrap("div").children("div").removeAttr("style").end().find(".jarviswidget-fullscreen-btn:first").children().removeClass(a.fullscreenClass[1]).addClass(a.fullscreenClass[0]).parents(a.pwCtrls).children("a").show(),r.hasClass("jarviswidget-visible")&&r.hide().removeClass("jarviswidget-visible")):(t("body").addClass("nooverflow"),i.wrap('<div id="jarviswidget-fullscreen-mode"/>').parent().find(".jarviswidget-fullscreen-btn:first").children().removeClass(a.fullscreenClass[0]).addClass(a.fullscreenClass[1]).parents(a.pwCtrls).children("a:not(.jarviswidget-fullscreen-btn)").hide(),r.is(":hidden")&&r.show().addClass("jarviswidget-visible")),n(),"function"==typeof a.o.onFullscreen&&a.o.onFullscreen.call(this,i),e.preventDefault()}),t(e).on("resize."+r,function(){n()}),i.on(s,".jarviswidget-edit-btn",function(e){var n=t(this).parents(a.o.widgets);a._runLoaderWidget(t(this)),n.find(a.o.editPlaceholder).is(":visible")?t(this).children().removeClass(a.editClass[1]).addClass(a.editClass[0]).parents(a.o.widgets).find(a.o.editPlaceholder).slideUp(a.o.editSpeed,function(){a._saveSettingsWidget()}):t(this).children().removeClass(a.editClass[0]).addClass(a.editClass[1]).parents(a.o.widgets).find(a.o.editPlaceholder).slideDown(a.o.editSpeed),"function"==typeof a.o.onEdit&&a.o.onEdit.call(this,n),e.preventDefault()}),t(a.o.editPlaceholder).find("input").keyup(function(){t(this).parents(a.o.widgets).children("header").children("h2").text(t(this).val())}),i.on(s,"[data-widget-setstyle]",function(e){var n=t(this).data("widget-setstyle"),i="";t(this).parents(a.o.editPlaceholder).find("[data-widget-setstyle]").each(function(){i+=t(this).data("widget-setstyle")+" "}),t(this).parents(a.o.widgets).attr("data-widget-attstyle",""+n).removeClassPrefix("jarviswidget-color-").addClass(n),a._runLoaderWidget(t(this)),a._saveSettingsWidget(),e.preventDefault()}),i.on(s,".jarviswidget-custom-btn",function(e){var n=t(this).parents(a.o.widgets);a._runLoaderWidget(t(this)),t(this).children("."+a.customClass[0]).length?(t(this).children().removeClass(a.customClass[0]).addClass(a.customClass[1]),"function"==typeof a.o.customStart&&a.o.customStart.call(this,n)):(t(this).children().removeClass(a.customClass[1]).addClass(a.customClass[0]),"function"==typeof a.o.customEnd&&a.o.customEnd.call(this,n)),a._saveSettingsWidget(),e.preventDefault()}),i.on(s,".jarviswidget-delete-btn",function(e){var n=t(this).parents(a.o.widgets),i=n.attr("id"),r=n.children("header").children("h2").text();t.SmartMessageBox?t.SmartMessageBox({title:"<i class='fa fa-times' style='color:#ed1c24'></i> "+a.o.labelDelete+' "'+r+'"',content:a.o.deleteMsg,buttons:"[No][Yes]"},function(e){"Yes"==e&&(a._runLoaderWidget(t(this)),t("#"+i).fadeOut(a.o.deleteSpeed,function(){t(this).remove(),"function"==typeof a.o.onDelete&&a.o.onDelete.call(this,n)}))}):t("#"+i).fadeOut(a.o.deleteSpeed,function(){t(this).remove(),"function"==typeof a.o.onDelete&&a.o.onDelete.call(this,n)}),e.preventDefault()}),i.on(s,".jarviswidget-refresh-btn",function(e){var n=t(this).parents(a.o.widgets),i=n.data("widget-load"),r=n.children(),s=t(this);s.button("loading"),r.addClass("widget-body-ajax-loading"),setTimeout(function(){s.button("reset"),r.removeClass("widget-body-ajax-loading"),a._loadAjaxFile(n,i,r)},1e3),e.preventDefault()}),i=null},destroy:function(){var n=this,a="."+r;n.obj.find(n.o.grid+".sortable-grid").not("[data-widget-excludegrid]").sortable("destroy"),n.widget.children("header").off(a),t(n.o.deleteSettingsKey).off(a),t(n.o.deletePositionKey).off(a),t(e).off(a),n.obj.removeData(r)}},t.fn[r]=function(e){return this.each(function(){var n=t(this),a=n.data(r);if(!a){var s="object"==typeof e&&e;n.data(r,a=new i(this,s))}"string"==typeof e&&a[e]()})},t.fn[r].defaults={grid:"section",widgets:".jarviswidget",localStorage:!0,deleteSettingsKey:"",settingsKeyLabel:"Reset settings?",deletePositionKey:"",positionKeyLabel:"Reset position?",sortable:!0,buttonsHidden:!1,toggleButton:!0,toggleClass:"min-10 | plus-10",toggleSpeed:200,onToggle:function(){},deleteButton:!0,deleteMsg:"Warning: This action cannot be undone",deleteClass:"trashcan-10",deleteSpeed:200,onDelete:function(){},editButton:!0,editPlaceholder:".jarviswidget-editbox",editClass:"pencil-10 | delete-10",editSpeed:200,onEdit:function(){},colorButton:!0,fullscreenButton:!0,fullscreenClass:"fullscreen-10 | normalscreen-10",fullscreenDiff:3,onFullscreen:function(){},customButton:!0,customClass:"",customStart:function(){},customEnd:function(){},buttonOrder:"%refresh% %delete% %custom% %edit% %fullscreen% %toggle%",opacity:1,dragHandle:"> header",placeholderClass:"jarviswidget-placeholder",indicator:!0,indicatorTime:600,ajax:!0,loadingLabel:"loading...",timestampPlaceholder:".jarviswidget-timestamp",timestampFormat:"Last update: %m%/%d%/%y% %h%:%i%:%s%",refreshButton:!0,refreshButtonClass:"refresh-10",labelError:"Sorry but there was a error:",labelUpdated:"Last Update:",labelRefresh:"Refresh",labelDelete:"Delete widget:",afterLoad:function(){},rtl:!1,onChange:function(){},onSave:function(){},ajaxnav:!0},t.fn.removeClassPrefix=function(e){return this.each(function(n,a){var i=a.className.split(" ").map(function(t){return 0===t.indexOf(e)?"":t});a.className=t.trim(i.join(" "))}),this}}(jQuery,window,document)},521:function(t,e,n){"use strict";var a=n(514),i=(n(522),n(515)),r=n(517),s=n(512);n.d(e,"b",function(){return a.a}),n.d(e,"a",function(){return i.a}),n.d(e,"c",function(){return r.a}),n.d(e,"d",function(){return s.a})},538:function(t,e,n){"use strict";function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(0),l=n.n(s),o=n(70),u=n.n(o),h=n(573),c=(n.n(h),n(17)),d=(n.n(c),function(){function t(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,n,a){return n&&t(e.prototype,n),a&&t(e,a),e}}()),p=function(t){function e(){return a(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return r(e,t),d(e,[{key:"componentDidMount",value:function(){var t=$(n.i(c.findDOMNode)(this)),e={rules:{},messages:{},errorElement:"em",errorClass:"invalid",highlight:function(t,e,n){$(t).addClass(e).removeClass(n),$(t).parent().addClass("state-error").removeClass("state-success")},unhighlight:function(t,e,n){$(t).removeClass(e).addClass(n),$(t).parent().removeClass("state-error").addClass("state-success")},errorPlacement:function(t,e){e.parent(".input-group").length?t.insertAfter(e.parent()):t.insertAfter(e)}};t.find("[data-smart-validate-input], [smart-validate-input]").each(function(){var t=$(this),n=t.attr("name");e.rules[n]={},void 0!=t.data("required")&&(e.rules[n].required=!0),void 0!=t.data("email")&&(e.rules[n].email=!0),void 0!=t.data("maxlength")&&(e.rules[n].maxlength=t.data("maxlength")),void 0!=t.data("minlength")&&(e.rules[n].minlength=t.data("minlength")),t.data("message")?e.messages[n]=t.data("message"):u.a.forEach(t.data(),function(t,a){if(0==a.search(/message/)){e.messages[n]||(e.messages[n]={});var i=a.toLowerCase().replace(/^message/,"");e.messages[n][i]=t}})}),t.validate(u.a.extend(e,this.props.options))}},{key:"render",value:function(){return this.props.children}}]),e}(l.a.Component),m=p;e.a=m;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(p,"UiValidate","/home/this/WebstormProjects/trading-charts-demo/src/app/components/forms/validation/UiValidate.js"),__REACT_HOT_LOADER__.register(m,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/components/forms/validation/UiValidate.js"))}()},548:function(t,e,n){"use strict";function a(t,e){var n={};for(var a in t)e.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(t,a)&&(n[a]=t[a]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var l=n(0),o=n.n(l),u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},h=function(){function t(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,n,a){return n&&t(e.prototype,n),a&&t(e,a),e}}(),c=function(t){function e(){return i(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return s(e,t),h(e,[{key:"componentDidMount",value:function(){var t=[],e=this.props,n=$(this.refs.input);e.minRestrict&&t.push(function(t){$(e.minRestrict).datepicker("option","minDate",t)}),e.maxRestrict&&t.push(function(t){$(e.maxRestrict).datepicker("option","maxDate",t)}),t.push(function(t){n.triggerHandler("change");var e=n.closest("form");if("function"==typeof e.bootstrapValidator)try{e.bootstrapValidator("revalidateField",n)}catch(t){console.log(t.message)}});var a={prevText:'<i class="fa fa-chevron-left"></i>',nextText:'<i class="fa fa-chevron-right"></i>',onSelect:function(e){t.forEach(function(t){t.call(t,e)})}};e.numberOfMonths&&(a.numberOfMonths=e.numberOfMonths),e.dateFormat&&(a.dateFormat=e.dateFormat),e.defaultDate&&(a.defaultDate=e.defaultDate),e.changeMonth&&(a.changeMonth=e.changeMonth),n.datepicker(a)}},{key:"render",value:function(){var t=u({},this.props),e=(t.minRestrict,t.maxRestrict,t.changesMonth,t.numberOfMonths,t.dateFormat,t.defaultDate,t.changeMonth,a(t,["minRestrict","maxRestrict","changesMonth","numberOfMonths","dateFormat","defaultDate","changeMonth"]));return o.a.createElement("input",u({type:"text"},e,{ref:"input"}))}}]),e}(o.a.Component),d=c;e.a=d;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(c,"UiDatepicker","/home/this/WebstormProjects/trading-charts-demo/src/app/components/forms/inputs/UiDatepicker.js"),__REACT_HOT_LOADER__.register(d,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/components/forms/inputs/UiDatepicker.js"))}()},559:function(t,e,n){"use strict";function a(t,e){var n={};for(var a in t)e.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(t,a)&&(n[a]=t[a]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var l=n(0),o=n.n(l),u=n(615),h=(n.n(u),Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t}),c=function(){function t(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,n,a){return n&&t(e.prototype,n),a&&t(e,a),e}}(),d=function(t){function e(){return i(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return s(e,t),c(e,[{key:"componentDidMount",value:function(){var t={};this.props.maskPlaceholder&&(t.placeholder=this.props.maskPlaceholder),$(this.refs.input).mask(this.props.mask,t)}},{key:"render",value:function(){var t=h({},this.props),e=(t.maskPlaceholder,t.mask,a(t,["maskPlaceholder","mask"]));return o.a.createElement("input",h({ref:"input"},e))}}]),e}(o.a.Component),p=d;e.a=p;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(d,"MaskedInput","/home/this/WebstormProjects/trading-charts-demo/src/app/components/forms/inputs/MaskedInput.js"),__REACT_HOT_LOADER__.register(p,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/components/forms/inputs/MaskedInput.js"))}()},568:function(t,e){t.exports='/*!\r\n * jQuery Validation Plugin v1.17.0\r\n *\r\n * https://jqueryvalidation.org/\r\n *\r\n * Copyright (c) 2017 Jörn Zaefferer\r\n * Released under the MIT license\r\n */\r\n(function( factory ) {\r\n\tif ( typeof define === "function" && define.amd ) {\r\n\t\tdefine( ["jquery"], factory );\r\n\t} else if (typeof module === "object" && module.exports) {\r\n\t\tmodule.exports = factory( require( "jquery" ) );\r\n\t} else {\r\n\t\tfactory( jQuery );\r\n\t}\r\n}(function( $ ) {\r\n\r\n$.extend( $.fn, {\n\n\t// https://jqueryvalidation.org/validate/\n\tvalidate: function( options ) {\n\n\t\t// If nothing is selected, return nothing; can\'t chain anyway\n\t\tif ( !this.length ) {\n\t\t\tif ( options && options.debug && window.console ) {\n\t\t\t\tconsole.warn( "Nothing selected, can\'t validate, returning nothing." );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Check if a validator for this form was already created\n\t\tvar validator = $.data( this[ 0 ], "validator" );\n\t\tif ( validator ) {\n\t\t\treturn validator;\n\t\t}\n\n\t\t// Add novalidate tag if HTML5.\n\t\tthis.attr( "novalidate", "novalidate" );\n\n\t\tvalidator = new $.validator( options, this[ 0 ] );\n\t\t$.data( this[ 0 ], "validator", validator );\n\n\t\tif ( validator.settings.onsubmit ) {\n\n\t\t\tthis.on( "click.validate", ":submit", function( event ) {\n\n\t\t\t\t// Track the used submit button to properly handle scripted\n\t\t\t\t// submits later.\n\t\t\t\tvalidator.submitButton = event.currentTarget;\n\n\t\t\t\t// Allow suppressing validation by adding a cancel class to the submit button\n\t\t\t\tif ( $( this ).hasClass( "cancel" ) ) {\n\t\t\t\t\tvalidator.cancelSubmit = true;\n\t\t\t\t}\n\n\t\t\t\t// Allow suppressing validation by adding the html5 formnovalidate attribute to the submit button\n\t\t\t\tif ( $( this ).attr( "formnovalidate" ) !== undefined ) {\n\t\t\t\t\tvalidator.cancelSubmit = true;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// Validate the form on submit\n\t\t\tthis.on( "submit.validate", function( event ) {\n\t\t\t\tif ( validator.settings.debug ) {\n\n\t\t\t\t\t// Prevent form submit to be able to see console output\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t\tfunction handle() {\n\t\t\t\t\tvar hidden, result;\n\n\t\t\t\t\t// Insert a hidden input as a replacement for the missing submit button\n\t\t\t\t\t// The hidden input is inserted in two cases:\n\t\t\t\t\t//   - A user defined a `submitHandler`\n\t\t\t\t\t//   - There was a pending request due to `remote` method and `stopRequest()`\n\t\t\t\t\t//     was called to submit the form in case it\'s valid\n\t\t\t\t\tif ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) ) {\n\t\t\t\t\t\thidden = $( "<input type=\'hidden\'/>" )\n\t\t\t\t\t\t\t.attr( "name", validator.submitButton.name )\n\t\t\t\t\t\t\t.val( $( validator.submitButton ).val() )\n\t\t\t\t\t\t\t.appendTo( validator.currentForm );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( validator.settings.submitHandler ) {\n\t\t\t\t\t\tresult = validator.settings.submitHandler.call( validator, validator.currentForm, event );\n\t\t\t\t\t\tif ( hidden ) {\n\n\t\t\t\t\t\t\t// And clean up afterwards; thanks to no-block-scope, hidden can be referenced\n\t\t\t\t\t\t\thidden.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( result !== undefined ) {\n\t\t\t\t\t\t\treturn result;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// Prevent submit for invalid forms or custom submit handlers\n\t\t\t\tif ( validator.cancelSubmit ) {\n\t\t\t\t\tvalidator.cancelSubmit = false;\n\t\t\t\t\treturn handle();\n\t\t\t\t}\n\t\t\t\tif ( validator.form() ) {\n\t\t\t\t\tif ( validator.pendingRequest ) {\n\t\t\t\t\t\tvalidator.formSubmitted = true;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn handle();\n\t\t\t\t} else {\n\t\t\t\t\tvalidator.focusInvalid();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn validator;\n\t},\n\n\t// https://jqueryvalidation.org/valid/\n\tvalid: function() {\n\t\tvar valid, validator, errorList;\n\n\t\tif ( $( this[ 0 ] ).is( "form" ) ) {\n\t\t\tvalid = this.validate().form();\n\t\t} else {\n\t\t\terrorList = [];\n\t\t\tvalid = true;\n\t\t\tvalidator = $( this[ 0 ].form ).validate();\n\t\t\tthis.each( function() {\n\t\t\t\tvalid = validator.element( this ) && valid;\n\t\t\t\tif ( !valid ) {\n\t\t\t\t\terrorList = errorList.concat( validator.errorList );\n\t\t\t\t}\n\t\t\t} );\n\t\t\tvalidator.errorList = errorList;\n\t\t}\n\t\treturn valid;\n\t},\n\n\t// https://jqueryvalidation.org/rules/\n\trules: function( command, argument ) {\n\t\tvar element = this[ 0 ],\n\t\t\tsettings, staticRules, existingRules, data, param, filtered;\n\n\t\t// If nothing is selected, return empty object; can\'t chain anyway\n\t\tif ( element == null ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !element.form && element.hasAttribute( "contenteditable" ) ) {\n\t\t\telement.form = this.closest( "form" )[ 0 ];\n\t\t\telement.name = this.attr( "name" );\n\t\t}\n\n\t\tif ( element.form == null ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( command ) {\n\t\t\tsettings = $.data( element.form, "validator" ).settings;\n\t\t\tstaticRules = settings.rules;\n\t\t\texistingRules = $.validator.staticRules( element );\n\t\t\tswitch ( command ) {\n\t\t\tcase "add":\n\t\t\t\t$.extend( existingRules, $.validator.normalizeRule( argument ) );\n\n\t\t\t\t// Remove messages from rules, but allow them to be set separately\n\t\t\t\tdelete existingRules.messages;\n\t\t\t\tstaticRules[ element.name ] = existingRules;\n\t\t\t\tif ( argument.messages ) {\n\t\t\t\t\tsettings.messages[ element.name ] = $.extend( settings.messages[ element.name ], argument.messages );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase "remove":\n\t\t\t\tif ( !argument ) {\n\t\t\t\t\tdelete staticRules[ element.name ];\n\t\t\t\t\treturn existingRules;\n\t\t\t\t}\n\t\t\t\tfiltered = {};\n\t\t\t\t$.each( argument.split( /\\s/ ), function( index, method ) {\n\t\t\t\t\tfiltered[ method ] = existingRules[ method ];\n\t\t\t\t\tdelete existingRules[ method ];\n\t\t\t\t} );\n\t\t\t\treturn filtered;\n\t\t\t}\n\t\t}\n\n\t\tdata = $.validator.normalizeRules(\n\t\t$.extend(\n\t\t\t{},\n\t\t\t$.validator.classRules( element ),\n\t\t\t$.validator.attributeRules( element ),\n\t\t\t$.validator.dataRules( element ),\n\t\t\t$.validator.staticRules( element )\n\t\t), element );\n\n\t\t// Make sure required is at front\n\t\tif ( data.required ) {\n\t\t\tparam = data.required;\n\t\t\tdelete data.required;\n\t\t\tdata = $.extend( { required: param }, data );\n\t\t}\n\n\t\t// Make sure remote is at back\n\t\tif ( data.remote ) {\n\t\t\tparam = data.remote;\n\t\t\tdelete data.remote;\n\t\t\tdata = $.extend( data, { remote: param } );\n\t\t}\n\n\t\treturn data;\n\t}\n} );\n\n// Custom selectors\n$.extend( $.expr.pseudos || $.expr[ ":" ], {\t\t// \'|| $.expr[ ":" ]\' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support\n\n\t// https://jqueryvalidation.org/blank-selector/\n\tblank: function( a ) {\n\t\treturn !$.trim( "" + $( a ).val() );\n\t},\n\n\t// https://jqueryvalidation.org/filled-selector/\n\tfilled: function( a ) {\n\t\tvar val = $( a ).val();\n\t\treturn val !== null && !!$.trim( "" + val );\n\t},\n\n\t// https://jqueryvalidation.org/unchecked-selector/\n\tunchecked: function( a ) {\n\t\treturn !$( a ).prop( "checked" );\n\t}\n} );\n\n// Constructor for validator\n$.validator = function( options, form ) {\n\tthis.settings = $.extend( true, {}, $.validator.defaults, options );\n\tthis.currentForm = form;\n\tthis.init();\n};\n\n// https://jqueryvalidation.org/jQuery.validator.format/\n$.validator.format = function( source, params ) {\n\tif ( arguments.length === 1 ) {\n\t\treturn function() {\n\t\t\tvar args = $.makeArray( arguments );\n\t\t\targs.unshift( source );\n\t\t\treturn $.validator.format.apply( this, args );\n\t\t};\n\t}\n\tif ( params === undefined ) {\n\t\treturn source;\n\t}\n\tif ( arguments.length > 2 && params.constructor !== Array  ) {\n\t\tparams = $.makeArray( arguments ).slice( 1 );\n\t}\n\tif ( params.constructor !== Array ) {\n\t\tparams = [ params ];\n\t}\n\t$.each( params, function( i, n ) {\n\t\tsource = source.replace( new RegExp( "\\\\{" + i + "\\\\}", "g" ), function() {\n\t\t\treturn n;\n\t\t} );\n\t} );\n\treturn source;\n};\n\n$.extend( $.validator, {\n\n\tdefaults: {\n\t\tmessages: {},\n\t\tgroups: {},\n\t\trules: {},\n\t\terrorClass: "error",\n\t\tpendingClass: "pending",\n\t\tvalidClass: "valid",\n\t\terrorElement: "label",\n\t\tfocusCleanup: false,\n\t\tfocusInvalid: true,\n\t\terrorContainer: $( [] ),\n\t\terrorLabelContainer: $( [] ),\n\t\tonsubmit: true,\n\t\tignore: ":hidden",\n\t\tignoreTitle: false,\n\t\tonfocusin: function( element ) {\n\t\t\tthis.lastActive = element;\n\n\t\t\t// Hide error label and remove error class on focus if enabled\n\t\t\tif ( this.settings.focusCleanup ) {\n\t\t\t\tif ( this.settings.unhighlight ) {\n\t\t\t\t\tthis.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );\n\t\t\t\t}\n\t\t\t\tthis.hideThese( this.errorsFor( element ) );\n\t\t\t}\n\t\t},\n\t\tonfocusout: function( element ) {\n\t\t\tif ( !this.checkable( element ) && ( element.name in this.submitted || !this.optional( element ) ) ) {\n\t\t\t\tthis.element( element );\n\t\t\t}\n\t\t},\n\t\tonkeyup: function( element, event ) {\n\n\t\t\t// Avoid revalidate the field when pressing one of the following keys\n\t\t\t// Shift       => 16\n\t\t\t// Ctrl        => 17\n\t\t\t// Alt         => 18\n\t\t\t// Caps lock   => 20\n\t\t\t// End         => 35\n\t\t\t// Home        => 36\n\t\t\t// Left arrow  => 37\n\t\t\t// Up arrow    => 38\n\t\t\t// Right arrow => 39\n\t\t\t// Down arrow  => 40\n\t\t\t// Insert      => 45\n\t\t\t// Num lock    => 144\n\t\t\t// AltGr key   => 225\n\t\t\tvar excludedKeys = [\n\t\t\t\t16, 17, 18, 20, 35, 36, 37,\n\t\t\t\t38, 39, 40, 45, 144, 225\n\t\t\t];\n\n\t\t\tif ( event.which === 9 && this.elementValue( element ) === "" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) {\n\t\t\t\treturn;\n\t\t\t} else if ( element.name in this.submitted || element.name in this.invalid ) {\n\t\t\t\tthis.element( element );\n\t\t\t}\n\t\t},\n\t\tonclick: function( element ) {\n\n\t\t\t// Click on selects, radiobuttons and checkboxes\n\t\t\tif ( element.name in this.submitted ) {\n\t\t\t\tthis.element( element );\n\n\t\t\t// Or option elements, check parent select in that case\n\t\t\t} else if ( element.parentNode.name in this.submitted ) {\n\t\t\t\tthis.element( element.parentNode );\n\t\t\t}\n\t\t},\n\t\thighlight: function( element, errorClass, validClass ) {\n\t\t\tif ( element.type === "radio" ) {\n\t\t\t\tthis.findByName( element.name ).addClass( errorClass ).removeClass( validClass );\n\t\t\t} else {\n\t\t\t\t$( element ).addClass( errorClass ).removeClass( validClass );\n\t\t\t}\n\t\t},\n\t\tunhighlight: function( element, errorClass, validClass ) {\n\t\t\tif ( element.type === "radio" ) {\n\t\t\t\tthis.findByName( element.name ).removeClass( errorClass ).addClass( validClass );\n\t\t\t} else {\n\t\t\t\t$( element ).removeClass( errorClass ).addClass( validClass );\n\t\t\t}\n\t\t}\n\t},\n\n\t// https://jqueryvalidation.org/jQuery.validator.setDefaults/\n\tsetDefaults: function( settings ) {\n\t\t$.extend( $.validator.defaults, settings );\n\t},\n\n\tmessages: {\n\t\trequired: "This field is required.",\n\t\tremote: "Please fix this field.",\n\t\temail: "Please enter a valid email address.",\n\t\turl: "Please enter a valid URL.",\n\t\tdate: "Please enter a valid date.",\n\t\tdateISO: "Please enter a valid date (ISO).",\n\t\tnumber: "Please enter a valid number.",\n\t\tdigits: "Please enter only digits.",\n\t\tequalTo: "Please enter the same value again.",\n\t\tmaxlength: $.validator.format( "Please enter no more than {0} characters." ),\n\t\tminlength: $.validator.format( "Please enter at least {0} characters." ),\n\t\trangelength: $.validator.format( "Please enter a value between {0} and {1} characters long." ),\n\t\trange: $.validator.format( "Please enter a value between {0} and {1}." ),\n\t\tmax: $.validator.format( "Please enter a value less than or equal to {0}." ),\n\t\tmin: $.validator.format( "Please enter a value greater than or equal to {0}." ),\n\t\tstep: $.validator.format( "Please enter a multiple of {0}." )\n\t},\n\n\tautoCreateRanges: false,\n\n\tprototype: {\n\n\t\tinit: function() {\n\t\t\tthis.labelContainer = $( this.settings.errorLabelContainer );\n\t\t\tthis.errorContext = this.labelContainer.length && this.labelContainer || $( this.currentForm );\n\t\t\tthis.containers = $( this.settings.errorContainer ).add( this.settings.errorLabelContainer );\n\t\t\tthis.submitted = {};\n\t\t\tthis.valueCache = {};\n\t\t\tthis.pendingRequest = 0;\n\t\t\tthis.pending = {};\n\t\t\tthis.invalid = {};\n\t\t\tthis.reset();\n\n\t\t\tvar groups = ( this.groups = {} ),\n\t\t\t\trules;\n\t\t\t$.each( this.settings.groups, function( key, value ) {\n\t\t\t\tif ( typeof value === "string" ) {\n\t\t\t\t\tvalue = value.split( /\\s/ );\n\t\t\t\t}\n\t\t\t\t$.each( value, function( index, name ) {\n\t\t\t\t\tgroups[ name ] = key;\n\t\t\t\t} );\n\t\t\t} );\n\t\t\trules = this.settings.rules;\n\t\t\t$.each( rules, function( key, value ) {\n\t\t\t\trules[ key ] = $.validator.normalizeRule( value );\n\t\t\t} );\n\n\t\t\tfunction delegate( event ) {\n\n\t\t\t\t// Set form expando on contenteditable\n\t\t\t\tif ( !this.form && this.hasAttribute( "contenteditable" ) ) {\n\t\t\t\t\tthis.form = $( this ).closest( "form" )[ 0 ];\n\t\t\t\t\tthis.name = $( this ).attr( "name" );\n\t\t\t\t}\n\n\t\t\t\tvar validator = $.data( this.form, "validator" ),\n\t\t\t\t\teventType = "on" + event.type.replace( /^validate/, "" ),\n\t\t\t\t\tsettings = validator.settings;\n\t\t\t\tif ( settings[ eventType ] && !$( this ).is( settings.ignore ) ) {\n\t\t\t\t\tsettings[ eventType ].call( validator, this, event );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$( this.currentForm )\n\t\t\t\t.on( "focusin.validate focusout.validate keyup.validate",\n\t\t\t\t\t":text, [type=\'password\'], [type=\'file\'], select, textarea, [type=\'number\'], [type=\'search\'], " +\n\t\t\t\t\t"[type=\'tel\'], [type=\'url\'], [type=\'email\'], [type=\'datetime\'], [type=\'date\'], [type=\'month\'], " +\n\t\t\t\t\t"[type=\'week\'], [type=\'time\'], [type=\'datetime-local\'], [type=\'range\'], [type=\'color\'], " +\n\t\t\t\t\t"[type=\'radio\'], [type=\'checkbox\'], [contenteditable], [type=\'button\']", delegate )\n\n\t\t\t\t// Support: Chrome, oldIE\n\t\t\t\t// "select" is provided as event.target when clicking a option\n\t\t\t\t.on( "click.validate", "select, option, [type=\'radio\'], [type=\'checkbox\']", delegate );\n\n\t\t\tif ( this.settings.invalidHandler ) {\n\t\t\t\t$( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler );\n\t\t\t}\n\t\t},\n\n\t\t// https://jqueryvalidation.org/Validator.form/\n\t\tform: function() {\n\t\t\tthis.checkForm();\n\t\t\t$.extend( this.submitted, this.errorMap );\n\t\t\tthis.invalid = $.extend( {}, this.errorMap );\n\t\t\tif ( !this.valid() ) {\n\t\t\t\t$( this.currentForm ).triggerHandler( "invalid-form", [ this ] );\n\t\t\t}\n\t\t\tthis.showErrors();\n\t\t\treturn this.valid();\n\t\t},\n\n\t\tcheckForm: function() {\n\t\t\tthis.prepareForm();\n\t\t\tfor ( var i = 0, elements = ( this.currentElements = this.elements() ); elements[ i ]; i++ ) {\n\t\t\t\tthis.check( elements[ i ] );\n\t\t\t}\n\t\t\treturn this.valid();\n\t\t},\n\n\t\t// https://jqueryvalidation.org/Validator.element/\n\t\telement: function( element ) {\n\t\t\tvar cleanElement = this.clean( element ),\n\t\t\t\tcheckElement = this.validationTargetFor( cleanElement ),\n\t\t\t\tv = this,\n\t\t\t\tresult = true,\n\t\t\t\trs, group;\n\n\t\t\tif ( checkElement === undefined ) {\n\t\t\t\tdelete this.invalid[ cleanElement.name ];\n\t\t\t} else {\n\t\t\t\tthis.prepareElement( checkElement );\n\t\t\t\tthis.currentElements = $( checkElement );\n\n\t\t\t\t// If this element is grouped, then validate all group elements already\n\t\t\t\t// containing a value\n\t\t\t\tgroup = this.groups[ checkElement.name ];\n\t\t\t\tif ( group ) {\n\t\t\t\t\t$.each( this.groups, function( name, testgroup ) {\n\t\t\t\t\t\tif ( testgroup === group && name !== checkElement.name ) {\n\t\t\t\t\t\t\tcleanElement = v.validationTargetFor( v.clean( v.findByName( name ) ) );\n\t\t\t\t\t\t\tif ( cleanElement && cleanElement.name in v.invalid ) {\n\t\t\t\t\t\t\t\tv.currentElements.push( cleanElement );\n\t\t\t\t\t\t\t\tresult = v.check( cleanElement ) && result;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\trs = this.check( checkElement ) !== false;\n\t\t\t\tresult = result && rs;\n\t\t\t\tif ( rs ) {\n\t\t\t\t\tthis.invalid[ checkElement.name ] = false;\n\t\t\t\t} else {\n\t\t\t\t\tthis.invalid[ checkElement.name ] = true;\n\t\t\t\t}\n\n\t\t\t\tif ( !this.numberOfInvalids() ) {\n\n\t\t\t\t\t// Hide error containers on last error\n\t\t\t\t\tthis.toHide = this.toHide.add( this.containers );\n\t\t\t\t}\n\t\t\t\tthis.showErrors();\n\n\t\t\t\t// Add aria-invalid status for screen readers\n\t\t\t\t$( element ).attr( "aria-invalid", !rs );\n\t\t\t}\n\n\t\t\treturn result;\n\t\t},\n\n\t\t// https://jqueryvalidation.org/Validator.showErrors/\n\t\tshowErrors: function( errors ) {\n\t\t\tif ( errors ) {\n\t\t\t\tvar validator = this;\n\n\t\t\t\t// Add items to error list and map\n\t\t\t\t$.extend( this.errorMap, errors );\n\t\t\t\tthis.errorList = $.map( this.errorMap, function( message, name ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tmessage: message,\n\t\t\t\t\t\telement: validator.findByName( name )[ 0 ]\n\t\t\t\t\t};\n\t\t\t\t} );\n\n\t\t\t\t// Remove items from success list\n\t\t\t\tthis.successList = $.grep( this.successList, function( element ) {\n\t\t\t\t\treturn !( element.name in errors );\n\t\t\t\t} );\n\t\t\t}\n\t\t\tif ( this.settings.showErrors ) {\n\t\t\t\tthis.settings.showErrors.call( this, this.errorMap, this.errorList );\n\t\t\t} else {\n\t\t\t\tthis.defaultShowErrors();\n\t\t\t}\n\t\t},\n\n\t\t// https://jqueryvalidation.org/Validator.resetForm/\n\t\tresetForm: function() {\n\t\t\tif ( $.fn.resetForm ) {\n\t\t\t\t$( this.currentForm ).resetForm();\n\t\t\t}\n\t\t\tthis.invalid = {};\n\t\t\tthis.submitted = {};\n\t\t\tthis.prepareForm();\n\t\t\tthis.hideErrors();\n\t\t\tvar elements = this.elements()\n\t\t\t\t.removeData( "previousValue" )\n\t\t\t\t.removeAttr( "aria-invalid" );\n\n\t\t\tthis.resetElements( elements );\n\t\t},\n\n\t\tresetElements: function( elements ) {\n\t\t\tvar i;\n\n\t\t\tif ( this.settings.unhighlight ) {\n\t\t\t\tfor ( i = 0; elements[ i ]; i++ ) {\n\t\t\t\t\tthis.settings.unhighlight.call( this, elements[ i ],\n\t\t\t\t\t\tthis.settings.errorClass, "" );\n\t\t\t\t\tthis.findByName( elements[ i ].name ).removeClass( this.settings.validClass );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\telements\n\t\t\t\t\t.removeClass( this.settings.errorClass )\n\t\t\t\t\t.removeClass( this.settings.validClass );\n\t\t\t}\n\t\t},\n\n\t\tnumberOfInvalids: function() {\n\t\t\treturn this.objectLength( this.invalid );\n\t\t},\n\n\t\tobjectLength: function( obj ) {\n\t\t\t/* jshint unused: false */\n\t\t\tvar count = 0,\n\t\t\t\ti;\n\t\t\tfor ( i in obj ) {\n\n\t\t\t\t// This check allows counting elements with empty error\n\t\t\t\t// message as invalid elements\n\t\t\t\tif ( obj[ i ] !== undefined && obj[ i ] !== null && obj[ i ] !== false ) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn count;\n\t\t},\n\n\t\thideErrors: function() {\n\t\t\tthis.hideThese( this.toHide );\n\t\t},\n\n\t\thideThese: function( errors ) {\n\t\t\terrors.not( this.containers ).text( "" );\n\t\t\tthis.addWrapper( errors ).hide();\n\t\t},\n\n\t\tvalid: function() {\n\t\t\treturn this.size() === 0;\n\t\t},\n\n\t\tsize: function() {\n\t\t\treturn this.errorList.length;\n\t\t},\n\n\t\tfocusInvalid: function() {\n\t\t\tif ( this.settings.focusInvalid ) {\n\t\t\t\ttry {\n\t\t\t\t\t$( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] )\n\t\t\t\t\t.filter( ":visible" )\n\t\t\t\t\t.focus()\n\n\t\t\t\t\t// Manually trigger focusin event; without it, focusin handler isn\'t called, findLastActive won\'t have anything to find\n\t\t\t\t\t.trigger( "focusin" );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// Ignore IE throwing errors when focusing hidden elements\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tfindLastActive: function() {\n\t\t\tvar lastActive = this.lastActive;\n\t\t\treturn lastActive && $.grep( this.errorList, function( n ) {\n\t\t\t\treturn n.element.name === lastActive.name;\n\t\t\t} ).length === 1 && lastActive;\n\t\t},\n\n\t\telements: function() {\n\t\t\tvar validator = this,\n\t\t\t\trulesCache = {};\n\n\t\t\t// Select all valid inputs inside the form (no submit or reset buttons)\n\t\t\treturn $( this.currentForm )\n\t\t\t.find( "input, select, textarea, [contenteditable]" )\n\t\t\t.not( ":submit, :reset, :image, :disabled" )\n\t\t\t.not( this.settings.ignore )\n\t\t\t.filter( function() {\n\t\t\t\tvar name = this.name || $( this ).attr( "name" ); // For contenteditable\n\t\t\t\tif ( !name && validator.settings.debug && window.console ) {\n\t\t\t\t\tconsole.error( "%o has no name assigned", this );\n\t\t\t\t}\n\n\t\t\t\t// Set form expando on contenteditable\n\t\t\t\tif ( this.hasAttribute( "contenteditable" ) ) {\n\t\t\t\t\tthis.form = $( this ).closest( "form" )[ 0 ];\n\t\t\t\t\tthis.name = name;\n\t\t\t\t}\n\n\t\t\t\t// Select only the first element for each name, and only those with rules specified\n\t\t\t\tif ( name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\trulesCache[ name ] = true;\n\t\t\t\treturn true;\n\t\t\t} );\n\t\t},\n\n\t\tclean: function( selector ) {\n\t\t\treturn $( selector )[ 0 ];\n\t\t},\n\n\t\terrors: function() {\n\t\t\tvar errorClass = this.settings.errorClass.split( " " ).join( "." );\n\t\t\treturn $( this.settings.errorElement + "." + errorClass, this.errorContext );\n\t\t},\n\n\t\tresetInternals: function() {\n\t\t\tthis.successList = [];\n\t\t\tthis.errorList = [];\n\t\t\tthis.errorMap = {};\n\t\t\tthis.toShow = $( [] );\n\t\t\tthis.toHide = $( [] );\n\t\t},\n\n\t\treset: function() {\n\t\t\tthis.resetInternals();\n\t\t\tthis.currentElements = $( [] );\n\t\t},\n\n\t\tprepareForm: function() {\n\t\t\tthis.reset();\n\t\t\tthis.toHide = this.errors().add( this.containers );\n\t\t},\n\n\t\tprepareElement: function( element ) {\n\t\t\tthis.reset();\n\t\t\tthis.toHide = this.errorsFor( element );\n\t\t},\n\n\t\telementValue: function( element ) {\n\t\t\tvar $element = $( element ),\n\t\t\t\ttype = element.type,\n\t\t\t\tval, idx;\n\n\t\t\tif ( type === "radio" || type === "checkbox" ) {\n\t\t\t\treturn this.findByName( element.name ).filter( ":checked" ).val();\n\t\t\t} else if ( type === "number" && typeof element.validity !== "undefined" ) {\n\t\t\t\treturn element.validity.badInput ? "NaN" : $element.val();\n\t\t\t}\n\n\t\t\tif ( element.hasAttribute( "contenteditable" ) ) {\n\t\t\t\tval = $element.text();\n\t\t\t} else {\n\t\t\t\tval = $element.val();\n\t\t\t}\n\n\t\t\tif ( type === "file" ) {\n\n\t\t\t\t// Modern browser (chrome & safari)\n\t\t\t\tif ( val.substr( 0, 12 ) === "C:\\\\fakepath\\\\" ) {\n\t\t\t\t\treturn val.substr( 12 );\n\t\t\t\t}\n\n\t\t\t\t// Legacy browsers\n\t\t\t\t// Unix-based path\n\t\t\t\tidx = val.lastIndexOf( "/" );\n\t\t\t\tif ( idx >= 0 ) {\n\t\t\t\t\treturn val.substr( idx + 1 );\n\t\t\t\t}\n\n\t\t\t\t// Windows-based path\n\t\t\t\tidx = val.lastIndexOf( "\\\\" );\n\t\t\t\tif ( idx >= 0 ) {\n\t\t\t\t\treturn val.substr( idx + 1 );\n\t\t\t\t}\n\n\t\t\t\t// Just the file name\n\t\t\t\treturn val;\n\t\t\t}\n\n\t\t\tif ( typeof val === "string" ) {\n\t\t\t\treturn val.replace( /\\r/g, "" );\n\t\t\t}\n\t\t\treturn val;\n\t\t},\n\n\t\tcheck: function( element ) {\n\t\t\telement = this.validationTargetFor( this.clean( element ) );\n\n\t\t\tvar rules = $( element ).rules(),\n\t\t\t\trulesCount = $.map( rules, function( n, i ) {\n\t\t\t\t\treturn i;\n\t\t\t\t} ).length,\n\t\t\t\tdependencyMismatch = false,\n\t\t\t\tval = this.elementValue( element ),\n\t\t\t\tresult, method, rule, normalizer;\n\n\t\t\t// Prioritize the local normalizer defined for this element over the global one\n\t\t\t// if the former exists, otherwise user the global one in case it exists.\n\t\t\tif ( typeof rules.normalizer === "function" ) {\n\t\t\t\tnormalizer = rules.normalizer;\n\t\t\t} else if (\ttypeof this.settings.normalizer === "function" ) {\n\t\t\t\tnormalizer = this.settings.normalizer;\n\t\t\t}\n\n\t\t\t// If normalizer is defined, then call it to retreive the changed value instead\n\t\t\t// of using the real one.\n\t\t\t// Note that `this` in the normalizer is `element`.\n\t\t\tif ( normalizer ) {\n\t\t\t\tval = normalizer.call( element, val );\n\n\t\t\t\tif ( typeof val !== "string" ) {\n\t\t\t\t\tthrow new TypeError( "The normalizer should return a string value." );\n\t\t\t\t}\n\n\t\t\t\t// Delete the normalizer from rules to avoid treating it as a pre-defined method.\n\t\t\t\tdelete rules.normalizer;\n\t\t\t}\n\n\t\t\tfor ( method in rules ) {\n\t\t\t\trule = { method: method, parameters: rules[ method ] };\n\t\t\t\ttry {\n\t\t\t\t\tresult = $.validator.methods[ method ].call( this, val, element, rule.parameters );\n\n\t\t\t\t\t// If a method indicates that the field is optional and therefore valid,\n\t\t\t\t\t// don\'t mark it as valid when there are no other rules\n\t\t\t\t\tif ( result === "dependency-mismatch" && rulesCount === 1 ) {\n\t\t\t\t\t\tdependencyMismatch = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tdependencyMismatch = false;\n\n\t\t\t\t\tif ( result === "pending" ) {\n\t\t\t\t\t\tthis.toHide = this.toHide.not( this.errorsFor( element ) );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !result ) {\n\t\t\t\t\t\tthis.formatAndAdd( element, rule );\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} catch ( e ) {\n\t\t\t\t\tif ( this.settings.debug && window.console ) {\n\t\t\t\t\t\tconsole.log( "Exception occurred when checking element " + element.id + ", check the \'" + rule.method + "\' method.", e );\n\t\t\t\t\t}\n\t\t\t\t\tif ( e instanceof TypeError ) {\n\t\t\t\t\t\te.message += ".  Exception occurred when checking element " + element.id + ", check the \'" + rule.method + "\' method.";\n\t\t\t\t\t}\n\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( dependencyMismatch ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( this.objectLength( rules ) ) {\n\t\t\t\tthis.successList.push( element );\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t// Return the custom message for the given element and validation method\n\t\t// specified in the element\'s HTML5 data attribute\n\t\t// return the generic message if present and no method specific message is present\n\t\tcustomDataMessage: function( element, method ) {\n\t\t\treturn $( element ).data( "msg" + method.charAt( 0 ).toUpperCase() +\n\t\t\t\tmethod.substring( 1 ).toLowerCase() ) || $( element ).data( "msg" );\n\t\t},\n\n\t\t// Return the custom message for the given element name and validation method\n\t\tcustomMessage: function( name, method ) {\n\t\t\tvar m = this.settings.messages[ name ];\n\t\t\treturn m && ( m.constructor === String ? m : m[ method ] );\n\t\t},\n\n\t\t// Return the first defined argument, allowing empty strings\n\t\tfindDefined: function() {\n\t\t\tfor ( var i = 0; i < arguments.length; i++ ) {\n\t\t\t\tif ( arguments[ i ] !== undefined ) {\n\t\t\t\t\treturn arguments[ i ];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn undefined;\n\t\t},\n\n\t\t// The second parameter \'rule\' used to be a string, and extended to an object literal\n\t\t// of the following form:\n\t\t// rule = {\n\t\t//     method: "method name",\n\t\t//     parameters: "the given method parameters"\n\t\t// }\n\t\t//\n\t\t// The old behavior still supported, kept to maintain backward compatibility with\n\t\t// old code, and will be removed in the next major release.\n\t\tdefaultMessage: function( element, rule ) {\n\t\t\tif ( typeof rule === "string" ) {\n\t\t\t\trule = { method: rule };\n\t\t\t}\n\n\t\t\tvar message = this.findDefined(\n\t\t\t\t\tthis.customMessage( element.name, rule.method ),\n\t\t\t\t\tthis.customDataMessage( element, rule.method ),\n\n\t\t\t\t\t// \'title\' is never undefined, so handle empty string as undefined\n\t\t\t\t\t!this.settings.ignoreTitle && element.title || undefined,\n\t\t\t\t\t$.validator.messages[ rule.method ],\n\t\t\t\t\t"<strong>Warning: No message defined for " + element.name + "</strong>"\n\t\t\t\t),\n\t\t\t\ttheregex = /\\$?\\{(\\d+)\\}/g;\n\t\t\tif ( typeof message === "function" ) {\n\t\t\t\tmessage = message.call( this, rule.parameters, element );\n\t\t\t} else if ( theregex.test( message ) ) {\n\t\t\t\tmessage = $.validator.format( message.replace( theregex, "{$1}" ), rule.parameters );\n\t\t\t}\n\n\t\t\treturn message;\n\t\t},\n\n\t\tformatAndAdd: function( element, rule ) {\n\t\t\tvar message = this.defaultMessage( element, rule );\n\n\t\t\tthis.errorList.push( {\n\t\t\t\tmessage: message,\n\t\t\t\telement: element,\n\t\t\t\tmethod: rule.method\n\t\t\t} );\n\n\t\t\tthis.errorMap[ element.name ] = message;\n\t\t\tthis.submitted[ element.name ] = message;\n\t\t},\n\n\t\taddWrapper: function( toToggle ) {\n\t\t\tif ( this.settings.wrapper ) {\n\t\t\t\ttoToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );\n\t\t\t}\n\t\t\treturn toToggle;\n\t\t},\n\n\t\tdefaultShowErrors: function() {\n\t\t\tvar i, elements, error;\n\t\t\tfor ( i = 0; this.errorList[ i ]; i++ ) {\n\t\t\t\terror = this.errorList[ i ];\n\t\t\t\tif ( this.settings.highlight ) {\n\t\t\t\t\tthis.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );\n\t\t\t\t}\n\t\t\t\tthis.showLabel( error.element, error.message );\n\t\t\t}\n\t\t\tif ( this.errorList.length ) {\n\t\t\t\tthis.toShow = this.toShow.add( this.containers );\n\t\t\t}\n\t\t\tif ( this.settings.success ) {\n\t\t\t\tfor ( i = 0; this.successList[ i ]; i++ ) {\n\t\t\t\t\tthis.showLabel( this.successList[ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( this.settings.unhighlight ) {\n\t\t\t\tfor ( i = 0, elements = this.validElements(); elements[ i ]; i++ ) {\n\t\t\t\t\tthis.settings.unhighlight.call( this, elements[ i ], this.settings.errorClass, this.settings.validClass );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.toHide = this.toHide.not( this.toShow );\n\t\t\tthis.hideErrors();\n\t\t\tthis.addWrapper( this.toShow ).show();\n\t\t},\n\n\t\tvalidElements: function() {\n\t\t\treturn this.currentElements.not( this.invalidElements() );\n\t\t},\n\n\t\tinvalidElements: function() {\n\t\t\treturn $( this.errorList ).map( function() {\n\t\t\t\treturn this.element;\n\t\t\t} );\n\t\t},\n\n\t\tshowLabel: function( element, message ) {\n\t\t\tvar place, group, errorID, v,\n\t\t\t\terror = this.errorsFor( element ),\n\t\t\t\telementID = this.idOrName( element ),\n\t\t\t\tdescribedBy = $( element ).attr( "aria-describedby" );\n\n\t\t\tif ( error.length ) {\n\n\t\t\t\t// Refresh error/success class\n\t\t\t\terror.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );\n\n\t\t\t\t// Replace message on existing label\n\t\t\t\terror.html( message );\n\t\t\t} else {\n\n\t\t\t\t// Create error element\n\t\t\t\terror = $( "<" + this.settings.errorElement + ">" )\n\t\t\t\t\t.attr( "id", elementID + "-error" )\n\t\t\t\t\t.addClass( this.settings.errorClass )\n\t\t\t\t\t.html( message || "" );\n\n\t\t\t\t// Maintain reference to the element to be placed into the DOM\n\t\t\t\tplace = error;\n\t\t\t\tif ( this.settings.wrapper ) {\n\n\t\t\t\t\t// Make sure the element is visible, even in IE\n\t\t\t\t\t// actually showing the wrapped element is handled elsewhere\n\t\t\t\t\tplace = error.hide().show().wrap( "<" + this.settings.wrapper + "/>" ).parent();\n\t\t\t\t}\n\t\t\t\tif ( this.labelContainer.length ) {\n\t\t\t\t\tthis.labelContainer.append( place );\n\t\t\t\t} else if ( this.settings.errorPlacement ) {\n\t\t\t\t\tthis.settings.errorPlacement.call( this, place, $( element ) );\n\t\t\t\t} else {\n\t\t\t\t\tplace.insertAfter( element );\n\t\t\t\t}\n\n\t\t\t\t// Link error back to the element\n\t\t\t\tif ( error.is( "label" ) ) {\n\n\t\t\t\t\t// If the error is a label, then associate using \'for\'\n\t\t\t\t\terror.attr( "for", elementID );\n\n\t\t\t\t\t// If the element is not a child of an associated label, then it\'s necessary\n\t\t\t\t\t// to explicitly apply aria-describedby\n\t\t\t\t} else if ( error.parents( "label[for=\'" + this.escapeCssMeta( elementID ) + "\']" ).length === 0 ) {\n\t\t\t\t\terrorID = error.attr( "id" );\n\n\t\t\t\t\t// Respect existing non-error aria-describedby\n\t\t\t\t\tif ( !describedBy ) {\n\t\t\t\t\t\tdescribedBy = errorID;\n\t\t\t\t\t} else if ( !describedBy.match( new RegExp( "\\\\b" + this.escapeCssMeta( errorID ) + "\\\\b" ) ) ) {\n\n\t\t\t\t\t\t// Add to end of list if not already present\n\t\t\t\t\t\tdescribedBy += " " + errorID;\n\t\t\t\t\t}\n\t\t\t\t\t$( element ).attr( "aria-describedby", describedBy );\n\n\t\t\t\t\t// If this element is grouped, then assign to all elements in the same group\n\t\t\t\t\tgroup = this.groups[ element.name ];\n\t\t\t\t\tif ( group ) {\n\t\t\t\t\t\tv = this;\n\t\t\t\t\t\t$.each( v.groups, function( name, testgroup ) {\n\t\t\t\t\t\t\tif ( testgroup === group ) {\n\t\t\t\t\t\t\t\t$( "[name=\'" + v.escapeCssMeta( name ) + "\']", v.currentForm )\n\t\t\t\t\t\t\t\t\t.attr( "aria-describedby", error.attr( "id" ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( !message && this.settings.success ) {\n\t\t\t\terror.text( "" );\n\t\t\t\tif ( typeof this.settings.success === "string" ) {\n\t\t\t\t\terror.addClass( this.settings.success );\n\t\t\t\t} else {\n\t\t\t\t\tthis.settings.success( error, element );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.toShow = this.toShow.add( error );\n\t\t},\n\n\t\terrorsFor: function( element ) {\n\t\t\tvar name = this.escapeCssMeta( this.idOrName( element ) ),\n\t\t\t\tdescriber = $( element ).attr( "aria-describedby" ),\n\t\t\t\tselector = "label[for=\'" + name + "\'], label[for=\'" + name + "\'] *";\n\n\t\t\t// \'aria-describedby\' should directly reference the error element\n\t\t\tif ( describer ) {\n\t\t\t\tselector = selector + ", #" + this.escapeCssMeta( describer )\n\t\t\t\t\t.replace( /\\s+/g, ", #" );\n\t\t\t}\n\n\t\t\treturn this\n\t\t\t\t.errors()\n\t\t\t\t.filter( selector );\n\t\t},\n\n\t\t// See https://api.jquery.com/category/selectors/, for CSS\n\t\t// meta-characters that should be escaped in order to be used with JQuery\n\t\t// as a literal part of a name/id or any selector.\n\t\tescapeCssMeta: function( string ) {\n\t\t\treturn string.replace( /([\\\\!"#$%&\'()*+,./:;<=>?@\\[\\]^`{|}~])/g, "\\\\$1" );\n\t\t},\n\n\t\tidOrName: function( element ) {\n\t\t\treturn this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name );\n\t\t},\n\n\t\tvalidationTargetFor: function( element ) {\n\n\t\t\t// If radio/checkbox, validate first element in group instead\n\t\t\tif ( this.checkable( element ) ) {\n\t\t\t\telement = this.findByName( element.name );\n\t\t\t}\n\n\t\t\t// Always apply ignore filter\n\t\t\treturn $( element ).not( this.settings.ignore )[ 0 ];\n\t\t},\n\n\t\tcheckable: function( element ) {\n\t\t\treturn ( /radio|checkbox/i ).test( element.type );\n\t\t},\n\n\t\tfindByName: function( name ) {\n\t\t\treturn $( this.currentForm ).find( "[name=\'" + this.escapeCssMeta( name ) + "\']" );\n\t\t},\n\n\t\tgetLength: function( value, element ) {\n\t\t\tswitch ( element.nodeName.toLowerCase() ) {\n\t\t\tcase "select":\n\t\t\t\treturn $( "option:selected", element ).length;\n\t\t\tcase "input":\n\t\t\t\tif ( this.checkable( element ) ) {\n\t\t\t\t\treturn this.findByName( element.name ).filter( ":checked" ).length;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn value.length;\n\t\t},\n\n\t\tdepend: function( param, element ) {\n\t\t\treturn this.dependTypes[ typeof param ] ? this.dependTypes[ typeof param ]( param, element ) : true;\n\t\t},\n\n\t\tdependTypes: {\n\t\t\t"boolean": function( param ) {\n\t\t\t\treturn param;\n\t\t\t},\n\t\t\t"string": function( param, element ) {\n\t\t\t\treturn !!$( param, element.form ).length;\n\t\t\t},\n\t\t\t"function": function( param, element ) {\n\t\t\t\treturn param( element );\n\t\t\t}\n\t\t},\n\n\t\toptional: function( element ) {\n\t\t\tvar val = this.elementValue( element );\n\t\t\treturn !$.validator.methods.required.call( this, val, element ) && "dependency-mismatch";\n\t\t},\n\n\t\tstartRequest: function( element ) {\n\t\t\tif ( !this.pending[ element.name ] ) {\n\t\t\t\tthis.pendingRequest++;\n\t\t\t\t$( element ).addClass( this.settings.pendingClass );\n\t\t\t\tthis.pending[ element.name ] = true;\n\t\t\t}\n\t\t},\n\n\t\tstopRequest: function( element, valid ) {\n\t\t\tthis.pendingRequest--;\n\n\t\t\t// Sometimes synchronization fails, make sure pendingRequest is never < 0\n\t\t\tif ( this.pendingRequest < 0 ) {\n\t\t\t\tthis.pendingRequest = 0;\n\t\t\t}\n\t\t\tdelete this.pending[ element.name ];\n\t\t\t$( element ).removeClass( this.settings.pendingClass );\n\t\t\tif ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {\n\t\t\t\t$( this.currentForm ).submit();\n\n\t\t\t\t// Remove the hidden input that was used as a replacement for the\n\t\t\t\t// missing submit button. The hidden input is added by `handle()`\n\t\t\t\t// to ensure that the value of the used submit button is passed on\n\t\t\t\t// for scripted submits triggered by this method\n\t\t\t\tif ( this.submitButton ) {\n\t\t\t\t\t$( "input:hidden[name=\'" + this.submitButton.name + "\']", this.currentForm ).remove();\n\t\t\t\t}\n\n\t\t\t\tthis.formSubmitted = false;\n\t\t\t} else if ( !valid && this.pendingRequest === 0 && this.formSubmitted ) {\n\t\t\t\t$( this.currentForm ).triggerHandler( "invalid-form", [ this ] );\n\t\t\t\tthis.formSubmitted = false;\n\t\t\t}\n\t\t},\n\n\t\tpreviousValue: function( element, method ) {\n\t\t\tmethod = typeof method === "string" && method || "remote";\n\n\t\t\treturn $.data( element, "previousValue" ) || $.data( element, "previousValue", {\n\t\t\t\told: null,\n\t\t\t\tvalid: true,\n\t\t\t\tmessage: this.defaultMessage( element, { method: method } )\n\t\t\t} );\n\t\t},\n\n\t\t// Cleans up all forms and elements, removes validator-specific events\n\t\tdestroy: function() {\n\t\t\tthis.resetForm();\n\n\t\t\t$( this.currentForm )\n\t\t\t\t.off( ".validate" )\n\t\t\t\t.removeData( "validator" )\n\t\t\t\t.find( ".validate-equalTo-blur" )\n\t\t\t\t\t.off( ".validate-equalTo" )\n\t\t\t\t\t.removeClass( "validate-equalTo-blur" );\n\t\t}\n\n\t},\n\n\tclassRuleSettings: {\n\t\trequired: { required: true },\n\t\temail: { email: true },\n\t\turl: { url: true },\n\t\tdate: { date: true },\n\t\tdateISO: { dateISO: true },\n\t\tnumber: { number: true },\n\t\tdigits: { digits: true },\n\t\tcreditcard: { creditcard: true }\n\t},\n\n\taddClassRules: function( className, rules ) {\n\t\tif ( className.constructor === String ) {\n\t\t\tthis.classRuleSettings[ className ] = rules;\n\t\t} else {\n\t\t\t$.extend( this.classRuleSettings, className );\n\t\t}\n\t},\n\n\tclassRules: function( element ) {\n\t\tvar rules = {},\n\t\t\tclasses = $( element ).attr( "class" );\n\n\t\tif ( classes ) {\n\t\t\t$.each( classes.split( " " ), function() {\n\t\t\t\tif ( this in $.validator.classRuleSettings ) {\n\t\t\t\t\t$.extend( rules, $.validator.classRuleSettings[ this ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t\treturn rules;\n\t},\n\n\tnormalizeAttributeRule: function( rules, type, method, value ) {\n\n\t\t// Convert the value to a number for number inputs, and for text for backwards compability\n\t\t// allows type="date" and others to be compared as strings\n\t\tif ( /min|max|step/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {\n\t\t\tvalue = Number( value );\n\n\t\t\t// Support Opera Mini, which returns NaN for undefined minlength\n\t\t\tif ( isNaN( value ) ) {\n\t\t\t\tvalue = undefined;\n\t\t\t}\n\t\t}\n\n\t\tif ( value || value === 0 ) {\n\t\t\trules[ method ] = value;\n\t\t} else if ( type === method && type !== "range" ) {\n\n\t\t\t// Exception: the jquery validate \'range\' method\n\t\t\t// does not test for the html5 \'range\' type\n\t\t\trules[ method ] = true;\n\t\t}\n\t},\n\n\tattributeRules: function( element ) {\n\t\tvar rules = {},\n\t\t\t$element = $( element ),\n\t\t\ttype = element.getAttribute( "type" ),\n\t\t\tmethod, value;\n\n\t\tfor ( method in $.validator.methods ) {\n\n\t\t\t// Support for <input required> in both html5 and older browsers\n\t\t\tif ( method === "required" ) {\n\t\t\t\tvalue = element.getAttribute( method );\n\n\t\t\t\t// Some browsers return an empty string for the required attribute\n\t\t\t\t// and non-HTML5 browsers might have required="" markup\n\t\t\t\tif ( value === "" ) {\n\t\t\t\t\tvalue = true;\n\t\t\t\t}\n\n\t\t\t\t// Force non-HTML5 browsers to return bool\n\t\t\t\tvalue = !!value;\n\t\t\t} else {\n\t\t\t\tvalue = $element.attr( method );\n\t\t\t}\n\n\t\t\tthis.normalizeAttributeRule( rules, type, method, value );\n\t\t}\n\n\t\t// \'maxlength\' may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs\n\t\tif ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) {\n\t\t\tdelete rules.maxlength;\n\t\t}\n\n\t\treturn rules;\n\t},\n\n\tdataRules: function( element ) {\n\t\tvar rules = {},\n\t\t\t$element = $( element ),\n\t\t\ttype = element.getAttribute( "type" ),\n\t\t\tmethod, value;\n\n\t\tfor ( method in $.validator.methods ) {\n\t\t\tvalue = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );\n\t\t\tthis.normalizeAttributeRule( rules, type, method, value );\n\t\t}\n\t\treturn rules;\n\t},\n\n\tstaticRules: function( element ) {\n\t\tvar rules = {},\n\t\t\tvalidator = $.data( element.form, "validator" );\n\n\t\tif ( validator.settings.rules ) {\n\t\t\trules = $.validator.normalizeRule( validator.settings.rules[ element.name ] ) || {};\n\t\t}\n\t\treturn rules;\n\t},\n\n\tnormalizeRules: function( rules, element ) {\n\n\t\t// Handle dependency check\n\t\t$.each( rules, function( prop, val ) {\n\n\t\t\t// Ignore rule when param is explicitly false, eg. required:false\n\t\t\tif ( val === false ) {\n\t\t\t\tdelete rules[ prop ];\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( val.param || val.depends ) {\n\t\t\t\tvar keepRule = true;\n\t\t\t\tswitch ( typeof val.depends ) {\n\t\t\t\tcase "string":\n\t\t\t\t\tkeepRule = !!$( val.depends, element.form ).length;\n\t\t\t\t\tbreak;\n\t\t\t\tcase "function":\n\t\t\t\t\tkeepRule = val.depends.call( element, element );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( keepRule ) {\n\t\t\t\t\trules[ prop ] = val.param !== undefined ? val.param : true;\n\t\t\t\t} else {\n\t\t\t\t\t$.data( element.form, "validator" ).resetElements( $( element ) );\n\t\t\t\t\tdelete rules[ prop ];\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Evaluate parameters\n\t\t$.each( rules, function( rule, parameter ) {\n\t\t\trules[ rule ] = $.isFunction( parameter ) && rule !== "normalizer" ? parameter( element ) : parameter;\n\t\t} );\n\n\t\t// Clean number parameters\n\t\t$.each( [ "minlength", "maxlength" ], function() {\n\t\t\tif ( rules[ this ] ) {\n\t\t\t\trules[ this ] = Number( rules[ this ] );\n\t\t\t}\n\t\t} );\n\t\t$.each( [ "rangelength", "range" ], function() {\n\t\t\tvar parts;\n\t\t\tif ( rules[ this ] ) {\n\t\t\t\tif ( $.isArray( rules[ this ] ) ) {\n\t\t\t\t\trules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];\n\t\t\t\t} else if ( typeof rules[ this ] === "string" ) {\n\t\t\t\t\tparts = rules[ this ].replace( /[\\[\\]]/g, "" ).split( /[\\s,]+/ );\n\t\t\t\t\trules[ this ] = [ Number( parts[ 0 ] ), Number( parts[ 1 ] ) ];\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tif ( $.validator.autoCreateRanges ) {\n\n\t\t\t// Auto-create ranges\n\t\t\tif ( rules.min != null && rules.max != null ) {\n\t\t\t\trules.range = [ rules.min, rules.max ];\n\t\t\t\tdelete rules.min;\n\t\t\t\tdelete rules.max;\n\t\t\t}\n\t\t\tif ( rules.minlength != null && rules.maxlength != null ) {\n\t\t\t\trules.rangelength = [ rules.minlength, rules.maxlength ];\n\t\t\t\tdelete rules.minlength;\n\t\t\t\tdelete rules.maxlength;\n\t\t\t}\n\t\t}\n\n\t\treturn rules;\n\t},\n\n\t// Converts a simple string to a {string: true} rule, e.g., "required" to {required:true}\n\tnormalizeRule: function( data ) {\n\t\tif ( typeof data === "string" ) {\n\t\t\tvar transformed = {};\n\t\t\t$.each( data.split( /\\s/ ), function() {\n\t\t\t\ttransformed[ this ] = true;\n\t\t\t} );\n\t\t\tdata = transformed;\n\t\t}\n\t\treturn data;\n\t},\n\n\t// https://jqueryvalidation.org/jQuery.validator.addMethod/\n\taddMethod: function( name, method, message ) {\n\t\t$.validator.methods[ name ] = method;\n\t\t$.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ];\n\t\tif ( method.length < 3 ) {\n\t\t\t$.validator.addClassRules( name, $.validator.normalizeRule( name ) );\n\t\t}\n\t},\n\n\t// https://jqueryvalidation.org/jQuery.validator.methods/\n\tmethods: {\n\n\t\t// https://jqueryvalidation.org/required-method/\n\t\trequired: function( value, element, param ) {\n\n\t\t\t// Check if dependency is met\n\t\t\tif ( !this.depend( param, element ) ) {\n\t\t\t\treturn "dependency-mismatch";\n\t\t\t}\n\t\t\tif ( element.nodeName.toLowerCase() === "select" ) {\n\n\t\t\t\t// Could be an array for select-multiple or a string, both are fine this way\n\t\t\t\tvar val = $( element ).val();\n\t\t\t\treturn val && val.length > 0;\n\t\t\t}\n\t\t\tif ( this.checkable( element ) ) {\n\t\t\t\treturn this.getLength( value, element ) > 0;\n\t\t\t}\n\t\t\treturn value.length > 0;\n\t\t},\n\n\t\t// https://jqueryvalidation.org/email-method/\n\t\temail: function( value, element ) {\n\n\t\t\t// From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address\n\t\t\t// Retrieved 2014-01-14\n\t\t\t// If you have a problem with this implementation, report a bug against the above spec\n\t\t\t// Or use custom methods to implement your own email validation\n\t\t\treturn this.optional( element ) || /^[a-zA-Z0-9.!#$%&\'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value );\n\t\t},\n\n\t\t// https://jqueryvalidation.org/url-method/\n\t\turl: function( value, element ) {\n\n\t\t\t// Copyright (c) 2010-2013 Diego Perini, MIT licensed\n\t\t\t// https://gist.github.com/dperini/729294\n\t\t\t// see also https://mathiasbynens.be/demo/url-regex\n\t\t\t// modified to allow protocol-relative URLs\n\t\t\treturn this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})).?)(?::\\d{2,5})?(?:[/?#]\\S*)?$/i.test( value );\n\t\t},\n\n\t\t// https://jqueryvalidation.org/date-method/\n\t\tdate: function( value, element ) {\n\t\t\treturn this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );\n\t\t},\n\n\t\t// https://jqueryvalidation.org/dateISO-method/\n\t\tdateISO: function( value, element ) {\n\t\t\treturn this.optional( element ) || /^\\d{4}[\\/\\-](0?[1-9]|1[012])[\\/\\-](0?[1-9]|[12][0-9]|3[01])$/.test( value );\n\t\t},\n\n\t\t// https://jqueryvalidation.org/number-method/\n\t\tnumber: function( value, element ) {\n\t\t\treturn this.optional( element ) || /^(?:-?\\d+|-?\\d{1,3}(?:,\\d{3})+)?(?:\\.\\d+)?$/.test( value );\n\t\t},\n\n\t\t// https://jqueryvalidation.org/digits-method/\n\t\tdigits: function( value, element ) {\n\t\t\treturn this.optional( element ) || /^\\d+$/.test( value );\n\t\t},\n\n\t\t// https://jqueryvalidation.org/minlength-method/\n\t\tminlength: function( value, element, param ) {\n\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength( value, element );\n\t\t\treturn this.optional( element ) || length >= param;\n\t\t},\n\n\t\t// https://jqueryvalidation.org/maxlength-method/\n\t\tmaxlength: function( value, element, param ) {\n\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength( value, element );\n\t\t\treturn this.optional( element ) || length <= param;\n\t\t},\n\n\t\t// https://jqueryvalidation.org/rangelength-method/\n\t\trangelength: function( value, element, param ) {\n\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength( value, element );\n\t\t\treturn this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );\n\t\t},\n\n\t\t// https://jqueryvalidation.org/min-method/\n\t\tmin: function( value, element, param ) {\n\t\t\treturn this.optional( element ) || value >= param;\n\t\t},\n\n\t\t// https://jqueryvalidation.org/max-method/\n\t\tmax: function( value, element, param ) {\n\t\t\treturn this.optional( element ) || value <= param;\n\t\t},\n\n\t\t// https://jqueryvalidation.org/range-method/\n\t\trange: function( value, element, param ) {\n\t\t\treturn this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] );\n\t\t},\n\n\t\t// https://jqueryvalidation.org/step-method/\n\t\tstep: function( value, element, param ) {\n\t\t\tvar type = $( element ).attr( "type" ),\n\t\t\t\terrorMessage = "Step attribute on input type " + type + " is not supported.",\n\t\t\t\tsupportedTypes = [ "text", "number", "range" ],\n\t\t\t\tre = new RegExp( "\\\\b" + type + "\\\\b" ),\n\t\t\t\tnotSupported = type && !re.test( supportedTypes.join() ),\n\t\t\t\tdecimalPlaces = function( num ) {\n\t\t\t\t\tvar match = ( "" + num ).match( /(?:\\.(\\d+))?$/ );\n\t\t\t\t\tif ( !match ) {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Number of digits right of decimal point.\n\t\t\t\t\treturn match[ 1 ] ? match[ 1 ].length : 0;\n\t\t\t\t},\n\t\t\t\ttoInt = function( num ) {\n\t\t\t\t\treturn Math.round( num * Math.pow( 10, decimals ) );\n\t\t\t\t},\n\t\t\t\tvalid = true,\n\t\t\t\tdecimals;\n\n\t\t\t// Works only for text, number and range input types\n\t\t\t// TODO find a way to support input types date, datetime, datetime-local, month, time and week\n\t\t\tif ( notSupported ) {\n\t\t\t\tthrow new Error( errorMessage );\n\t\t\t}\n\n\t\t\tdecimals = decimalPlaces( param );\n\n\t\t\t// Value can\'t have too many decimals\n\t\t\tif ( decimalPlaces( value ) > decimals || toInt( value ) % toInt( param ) !== 0 ) {\n\t\t\t\tvalid = false;\n\t\t\t}\n\n\t\t\treturn this.optional( element ) || valid;\n\t\t},\n\n\t\t// https://jqueryvalidation.org/equalTo-method/\n\t\tequalTo: function( value, element, param ) {\n\n\t\t\t// Bind to the blur event of the target in order to revalidate whenever the target field is updated\n\t\t\tvar target = $( param );\n\t\t\tif ( this.settings.onfocusout && target.not( ".validate-equalTo-blur" ).length ) {\n\t\t\t\ttarget.addClass( "validate-equalTo-blur" ).on( "blur.validate-equalTo", function() {\n\t\t\t\t\t$( element ).valid();\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn value === target.val();\n\t\t},\n\n\t\t// https://jqueryvalidation.org/remote-method/\n\t\tremote: function( value, element, param, method ) {\n\t\t\tif ( this.optional( element ) ) {\n\t\t\t\treturn "dependency-mismatch";\n\t\t\t}\n\n\t\t\tmethod = typeof method === "string" && method || "remote";\n\n\t\t\tvar previous = this.previousValue( element, method ),\n\t\t\t\tvalidator, data, optionDataString;\n\n\t\t\tif ( !this.settings.messages[ element.name ] ) {\n\t\t\t\tthis.settings.messages[ element.name ] = {};\n\t\t\t}\n\t\t\tprevious.originalMessage = previous.originalMessage || this.settings.messages[ element.name ][ method ];\n\t\t\tthis.settings.messages[ element.name ][ method ] = previous.message;\n\n\t\t\tparam = typeof param === "string" && { url: param } || param;\n\t\t\toptionDataString = $.param( $.extend( { data: value }, param.data ) );\n\t\t\tif ( previous.old === optionDataString ) {\n\t\t\t\treturn previous.valid;\n\t\t\t}\n\n\t\t\tprevious.old = optionDataString;\n\t\t\tvalidator = this;\n\t\t\tthis.startRequest( element );\n\t\t\tdata = {};\n\t\t\tdata[ element.name ] = value;\n\t\t\t$.ajax( $.extend( true, {\n\t\t\t\tmode: "abort",\n\t\t\t\tport: "validate" + element.name,\n\t\t\t\tdataType: "json",\n\t\t\t\tdata: data,\n\t\t\t\tcontext: validator.currentForm,\n\t\t\t\tsuccess: function( response ) {\n\t\t\t\t\tvar valid = response === true || response === "true",\n\t\t\t\t\t\terrors, message, submitted;\n\n\t\t\t\t\tvalidator.settings.messages[ element.name ][ method ] = previous.originalMessage;\n\t\t\t\t\tif ( valid ) {\n\t\t\t\t\t\tsubmitted = validator.formSubmitted;\n\t\t\t\t\t\tvalidator.resetInternals();\n\t\t\t\t\t\tvalidator.toHide = validator.errorsFor( element );\n\t\t\t\t\t\tvalidator.formSubmitted = submitted;\n\t\t\t\t\t\tvalidator.successList.push( element );\n\t\t\t\t\t\tvalidator.invalid[ element.name ] = false;\n\t\t\t\t\t\tvalidator.showErrors();\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrors = {};\n\t\t\t\t\t\tmessage = response || validator.defaultMessage( element, { method: method, parameters: value } );\n\t\t\t\t\t\terrors[ element.name ] = previous.message = message;\n\t\t\t\t\t\tvalidator.invalid[ element.name ] = true;\n\t\t\t\t\t\tvalidator.showErrors( errors );\n\t\t\t\t\t}\n\t\t\t\t\tprevious.valid = valid;\n\t\t\t\t\tvalidator.stopRequest( element, valid );\n\t\t\t\t}\n\t\t\t}, param ) );\n\t\t\treturn "pending";\n\t\t}\n\t}\n\n} );\n\r\n// Ajax mode: abort\n// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});\n// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()\n\nvar pendingRequests = {},\n\tajax;\n\n// Use a prefilter if available (1.5+)\nif ( $.ajaxPrefilter ) {\n\t$.ajaxPrefilter( function( settings, _, xhr ) {\n\t\tvar port = settings.port;\n\t\tif ( settings.mode === "abort" ) {\n\t\t\tif ( pendingRequests[ port ] ) {\n\t\t\t\tpendingRequests[ port ].abort();\n\t\t\t}\n\t\t\tpendingRequests[ port ] = xhr;\n\t\t}\n\t} );\n} else {\n\n\t// Proxy ajax\n\tajax = $.ajax;\n\t$.ajax = function( settings ) {\n\t\tvar mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,\n\t\t\tport = ( "port" in settings ? settings : $.ajaxSettings ).port;\n\t\tif ( mode === "abort" ) {\n\t\t\tif ( pendingRequests[ port ] ) {\n\t\t\t\tpendingRequests[ port ].abort();\n\t\t\t}\n\t\t\tpendingRequests[ port ] = ajax.apply( this, arguments );\n\t\t\treturn pendingRequests[ port ];\n\t\t}\n\t\treturn ajax.apply( this, arguments );\n\t};\n}\nreturn $;\r\n}));'},573:function(t,e,n){n(511)(n(568))},586:function(t,e,n){"use strict";var a=[{key:"244",value:"Aaland Islands"},{key:"1",value:"Afghanistan"},{key:"2",value:"Albania"},{key:"3",value:"Algeria"},{key:"4",value:"American Samoa"},{key:"5",value:"Andorra"},{key:"6",value:"Angola"},{key:"7",value:"Anguilla"},{key:"8",value:"Antarctica"},{key:"9",value:"Antigua and Barbuda"},{key:"10",value:"Argentina"},{key:"11",value:"Armenia"},{key:"12",value:"Aruba"},{key:"13",value:"Australia"},{key:"14",value:"Austria"},{key:"15",value:"Azerbaijan"},{key:"16",value:"Bahamas"},{key:"17",value:"Bahrain"},{key:"18",value:"Bangladesh"},{key:"19",value:"Barbados"},{key:"20",value:"Belarus"},{key:"21",value:"Belgium"},{key:"22",value:"Belize"},{key:"23",value:"Benin"},{key:"24",value:"Bermuda"},{key:"25",value:"Bhutan"},{key:"26",value:"Bolivia"},{key:"245",value:"Bonaire, Sint Eustatius and Saba"},{key:"27",value:"Bosnia and Herzegovina"},{key:"28",value:"Botswana"},{key:"29",value:"Bouvet Island"},{key:"30",value:"Brazil"},{key:"31",value:"British Indian Ocean Territory"},{key:"32",value:"Brunei Darussalam"},{key:"33",value:"Bulgaria"},{key:"34",value:"Burkina Faso"},{key:"35",value:"Burundi"},{key:"36",value:"Cambodia"},{key:"37",value:"Cameroon"},{key:"38",value:"Canada"},{key:"251",value:"Canary Islands"},{key:"39",value:"Cape Verde"},{key:"40",value:"Cayman Islands"},{key:"41",value:"Central African Republic"},{key:"42",value:"Chad"},{key:"43",value:"Chile"},{key:"44",value:"China"},{key:"45",value:"Christmas Island"},{key:"46",value:"Cocos (Keeling) Islands"},{key:"47",value:"Colombia"},{key:"48",value:"Comoros"},{key:"49",value:"Congo"},{key:"50",value:"Cook Islands"},{key:"51",value:"Costa Rica"},{key:"52",value:"Cote D'Ivoire"},{key:"53",value:"Croatia"},{key:"54",value:"Cuba"},{key:"246",value:"Curacao"},{key:"55",value:"Cyprus"},{key:"56",value:"Czech Republic"},{key:"237",value:"Democratic Republic of Congo"},{key:"57",value:"Denmark"},{key:"58",value:"Djibouti"},{key:"59",value:"Dominica"},{key:"60",value:"Dominican Republic"},{key:"61",value:"East Timor"},{key:"62",value:"Ecuador"},{key:"63",value:"Egypt"},{key:"64",value:"El Salvador"},{key:"65",value:"Equatorial Guinea"},{key:"66",value:"Eritrea"},{key:"67",value:"Estonia"},{key:"68",value:"Ethiopia"},{key:"69",value:"Falkland Islands (Malvinas)"},{key:"70",value:"Faroe Islands"},{key:"71",value:"Fiji"},{key:"72",value:"Finland"},{key:"74",value:"France, skypolitan"},{key:"75",value:"French Guiana"},{key:"76",value:"French Polynesia"},{key:"77",value:"French Southern Territories"},{key:"126",value:"FYROM"},{key:"78",value:"Gabon"},{key:"79",value:"Gambia"},{key:"80",value:"Georgia"},{key:"81",value:"Germany"},{key:"82",value:"Ghana"},{key:"83",value:"Gibraltar"},{key:"84",value:"Greece"},{key:"85",value:"Greenland"},{key:"86",value:"Grenada"},{key:"87",value:"Guadeloupe"},{key:"88",value:"Guam"},{key:"89",value:"Guatemala"},{key:"241",value:"Guernsey"},{key:"90",value:"Guinea"},{key:"91",value:"Guinea-Bissau"},{key:"92",value:"Guyana"},{key:"93",value:"Haiti"},{key:"94",value:"Heard and Mc Donald Islands"},{key:"95",value:"Honduras"},{key:"96",value:"Hong Kong"},{key:"97",value:"Hungary"},{key:"98",value:"Iceland"},{key:"99",value:"India"},{key:"100",value:"Indonesia"},{key:"101",value:"Iran (Islamic Republic of)"},{key:"102",value:"Iraq"},{key:"103",value:"Ireland"},{key:"104",value:"Israel"},{key:"105",value:"Italy"},{key:"106",value:"Jamaica"},{key:"107",value:"Japan"},{key:"240",value:"Jersey"},{key:"108",value:"Jordan"},{key:"109",value:"Kazakhstan"},{key:"110",value:"Kenya"},{key:"111",value:"Kiribati"},{key:"113",value:"Korea, Republic of"},{key:"114",value:"Kuwait"},{key:"115",value:"Kyrgyzstan"},{key:"116",value:"Lao People's Democratic Republic"},{key:"117",value:"Latvia"},{key:"118",value:"Lebanon"},{key:"119",value:"Lesotho"},{key:"120",value:"Liberia"},{key:"121",value:"Libyan Arab Jamahiriya"},{key:"122",value:"Liechtenstein"},{key:"123",value:"Lithuania"},{key:"124",value:"Luxembourg"},{key:"125",value:"Macau"},{key:"127",value:"Madagascar"},{key:"128",value:"Malawi"},{key:"129",value:"Malaysia"},{key:"130",value:"Maldives"},{key:"131",value:"Mali"},{key:"132",value:"Malta"},{key:"133",value:"Marshall Islands"},{key:"134",value:"Martinique"},{key:"135",value:"Mauritania"},{key:"136",value:"Mauritius"},{key:"137",value:"Mayotte"},{key:"138",value:"Mexico"},{key:"139",value:"Micronesia, Federated States of"},{key:"140",value:"Moldova, Republic of"},{key:"141",value:"Monaco"},{key:"142",value:"Mongolia"},{key:"242",value:"Montenegro"},{key:"143",value:"Montserrat"},{key:"144",value:"Morocco"},{key:"145",value:"Mozambique"},{key:"146",value:"Myanmar"},{key:"147",value:"Namibia"},{key:"148",value:"Nauru"},{key:"149",value:"Nepal"},{key:"150",value:"Netherlands"},{key:"151",value:"Netherlands Antilles"},{key:"152",value:"New Caledonia"},{key:"153",value:"New Zealand"},{key:"154",value:"Nicaragua"},{key:"155",value:"Niger"},{key:"156",value:"Nigeria"},{key:"157",value:"Niue"},{key:"158",value:"Norfolk Island"},{key:"112",value:"North Korea"},{key:"159",value:"Northern Mariana Islands"},{key:"160",value:"Norway"},{key:"161",value:"Oman"},{key:"162",value:"Pakistan"},{key:"163",value:"Palau"},{key:"247",value:"Palestinian Territory, Occupied"},{key:"164",value:"Panama"},{key:"165",value:"Papua New Guinea"},{key:"166",value:"Paraguay"},{key:"167",value:"Peru"},{key:"168",value:"Philippines"},{key:"169",value:"Pitcairn"},{key:"170",value:"Poland"},{key:"171",value:"Portugal"},{key:"172",value:"Puerto Rico"},{key:"173",value:"Qatar"},{key:"174",value:"Reunion"},{key:"175",value:"Romania"},{key:"176",value:"Russian Federation"},{key:"177",value:"Rwanda"},{key:"178",value:"Saint Kitts and Nevis"},{key:"179",value:"Saint Lucia"},{key:"180",value:"Saint Vincent and the Grenadines"},{key:"181",value:"Samoa"},{key:"182",value:"San Marino"},{key:"183",value:"Sao Tome and Principe"},{key:"184",value:"Saudi Arabia"},{key:"185",value:"Senegal"},{key:"243",value:"Serbia"},{key:"186",value:"Seychelles"},{key:"187",value:"Sierra Leone"},{key:"188",value:"Singapore"},{key:"189",value:"Slovak Republic"},{key:"190",value:"Slovenia"},{key:"191",value:"Solomon Islands"},{key:"192",value:"Somalia"},{key:"193",value:"South Africa"},{key:"194",value:"South Georgia &amp; South Sandwich Islands"},{key:"248",value:"South Sudan"},{key:"195",value:"Spain"},{key:"196",value:"Sri Lanka"},{key:"249",value:"St. Barthelemy"},{key:"197",value:"St. Helena"},{key:"250",value:"St. Martin (French part)"},{key:"198",value:"St. Pierre and Miquelon"},{key:"199",value:"Sudan"},{key:"200",value:"Suriname"},{key:"201",value:"Svalbard and Jan Mayen Islands"},{key:"202",value:"Swaziland"},{key:"203",value:"Sweden"},{key:"204",value:"Switzerland"},{key:"205",value:"Syrian Arab Republic"},{key:"206",value:"Taiwan"},{key:"207",value:"Tajikistan"},{key:"208",value:"Tanzania, United Republic of"},{key:"209",value:"Thailand"},{key:"210",value:"Togo"},{key:"211",value:"Tokelau"},{key:"212",value:"Tonga"},{key:"213",value:"Trinidad and Tobago"},{key:"214",value:"Tunisia"},{key:"215",value:"Turkey"},{key:"216",value:"Turkmenistan"},{key:"217",value:"Turks and Caicos Islands"},{key:"218",value:"Tuvalu"},{key:"219",value:"Uganda"},{key:"220",value:"Ukraine"},{key:"221",value:"United Arab Emirates"},{key:"222",value:"United Kingdom"},{key:"223",value:"United States"},{key:"224",value:"United States Minor Outlying Islands"},{key:"225",value:"Uruguay"},{key:"226",value:"Uzbekistan"},{key:"227",value:"Vanuatu"},{key:"228",value:"Vatican City State (Holy See)"},{key:"229",value:"Venezuela"},{key:"230",value:"Viet Nam"},{key:"231",value:"Virgin Islands (British)"},{key:"232",value:"Virgin Islands (U.S.)"},{key:"233",value:"Wallis and Futuna Islands"},{key:"234",value:"Western Sahara"},{key:"235",value:"Yemen"},{key:"238",value:"Zambia"},{key:"239",value:"Zimbabwe"}];e.a=a;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(a,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/components/forms/commons/countries.js")}()},603:function(t,e){t.exports='(function (factory) {\n    if (typeof define === \'function\' && define.amd) {\n        // AMD. Register as an anonymous module.\n        define([\'jquery\'], factory);\n    } else if (typeof exports === \'object\') {\n        // Node/CommonJS\n        factory(require(\'jquery\'));\n    } else {\n        // Browser globals\n        factory(jQuery);\n    }\n}(function ($) {\n\nvar ua = navigator.userAgent,\n\tiPhone = /iphone/i.test(ua),\n\tchrome = /chrome/i.test(ua),\n\tandroid = /android/i.test(ua),\n\tcaretTimeoutId;\n\n$.mask = {\n\t//Predefined character definitions\n\tdefinitions: {\n\t\t\'9\': "[0-9]",\n\t\t\'a\': "[A-Za-z]",\n\t\t\'*\': "[A-Za-z0-9]"\n\t},\n\tautoclear: true,\n\tdataName: "rawMaskFn",\n\tplaceholder: \'_\'\n};\n\n$.fn.extend({\n\t//Helper Function for Caret positioning\n\tcaret: function(begin, end) {\n\t\tvar range;\n\n\t\tif (this.length === 0 || this.is(":hidden") || this.get(0) !== document.activeElement) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (typeof begin == \'number\') {\n\t\t\tend = (typeof end === \'number\') ? end : begin;\n\t\t\treturn this.each(function() {\n\t\t\t\tif (this.setSelectionRange) {\n\t\t\t\t\tthis.setSelectionRange(begin, end);\n\t\t\t\t} else if (this.createTextRange) {\n\t\t\t\t\trange = this.createTextRange();\n\t\t\t\t\trange.collapse(true);\n\t\t\t\t\trange.moveEnd(\'character\', end);\n\t\t\t\t\trange.moveStart(\'character\', begin);\n\t\t\t\t\trange.select();\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tif (this[0].setSelectionRange) {\n\t\t\t\tbegin = this[0].selectionStart;\n\t\t\t\tend = this[0].selectionEnd;\n\t\t\t} else if (document.selection && document.selection.createRange) {\n\t\t\t\trange = document.selection.createRange();\n\t\t\t\tbegin = 0 - range.duplicate().moveStart(\'character\', -100000);\n\t\t\t\tend = begin + range.text.length;\n\t\t\t}\n\t\t\treturn { begin: begin, end: end };\n\t\t}\n\t},\n\tunmask: function() {\n\t\treturn this.trigger("unmask");\n\t},\n\tmask: function(mask, settings) {\n\t\tvar input,\n\t\t\tdefs,\n\t\t\ttests,\n\t\t\tpartialPosition,\n\t\t\tfirstNonMaskPos,\n            lastRequiredNonMaskPos,\n            len,\n            oldVal;\n\n\t\tif (!mask && this.length > 0) {\n\t\t\tinput = $(this[0]);\n            var fn = input.data($.mask.dataName)\n\t\t\treturn fn?fn():undefined;\n\t\t}\n\n\t\tsettings = $.extend({\n\t\t\tautoclear: $.mask.autoclear,\n\t\t\tplaceholder: $.mask.placeholder, // Load default placeholder\n\t\t\tcompleted: null\n\t\t}, settings);\n\n\n\t\tdefs = $.mask.definitions;\n\t\ttests = [];\n\t\tpartialPosition = len = mask.length;\n\t\tfirstNonMaskPos = null;\n\n\t\tmask = String(mask);\n\n\t\t$.each(mask.split(""), function(i, c) {\n\t\t\tif (c == \'?\') {\n\t\t\t\tlen--;\n\t\t\t\tpartialPosition = i;\n\t\t\t} else if (defs[c]) {\n\t\t\t\ttests.push(new RegExp(defs[c]));\n\t\t\t\tif (firstNonMaskPos === null) {\n\t\t\t\t\tfirstNonMaskPos = tests.length - 1;\n\t\t\t\t}\n                if(i < partialPosition){\n                    lastRequiredNonMaskPos = tests.length - 1;\n                }\n\t\t\t} else {\n\t\t\t\ttests.push(null);\n\t\t\t}\n\t\t});\n\n\t\treturn this.trigger("unmask").each(function() {\n\t\t\tvar input = $(this),\n\t\t\t\tbuffer = $.map(\n    \t\t\t\tmask.split(""),\n    \t\t\t\tfunction(c, i) {\n    \t\t\t\t\tif (c != \'?\') {\n    \t\t\t\t\t\treturn defs[c] ? getPlaceholder(i) : c;\n    \t\t\t\t\t}\n    \t\t\t\t}),\n\t\t\t\tdefaultBuffer = buffer.join(\'\'),\n\t\t\t\tfocusText = input.val();\n\n            function tryFireCompleted(){\n                if (!settings.completed) {\n                    return;\n                }\n\n                for (var i = firstNonMaskPos; i <= lastRequiredNonMaskPos; i++) {\n                    if (tests[i] && buffer[i] === getPlaceholder(i)) {\n                        return;\n                    }\n                }\n                settings.completed.call(input);\n            }\n\n            function getPlaceholder(i){\n                if(i < settings.placeholder.length)\n                    return settings.placeholder.charAt(i);\n                return settings.placeholder.charAt(0);\n            }\n\n\t\t\tfunction seekNext(pos) {\n\t\t\t\twhile (++pos < len && !tests[pos]);\n\t\t\t\treturn pos;\n\t\t\t}\n\n\t\t\tfunction seekPrev(pos) {\n\t\t\t\twhile (--pos >= 0 && !tests[pos]);\n\t\t\t\treturn pos;\n\t\t\t}\n\n\t\t\tfunction shiftL(begin,end) {\n\t\t\t\tvar i,\n\t\t\t\t\tj;\n\n\t\t\t\tif (begin<0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfor (i = begin, j = seekNext(end); i < len; i++) {\n\t\t\t\t\tif (tests[i]) {\n\t\t\t\t\t\tif (j < len && tests[i].test(buffer[j])) {\n\t\t\t\t\t\t\tbuffer[i] = buffer[j];\n\t\t\t\t\t\t\tbuffer[j] = getPlaceholder(j);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tj = seekNext(j);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twriteBuffer();\n\t\t\t\tinput.caret(Math.max(firstNonMaskPos, begin));\n\t\t\t}\n\n\t\t\tfunction shiftR(pos) {\n\t\t\t\tvar i,\n\t\t\t\t\tc,\n\t\t\t\t\tj,\n\t\t\t\t\tt;\n\n\t\t\t\tfor (i = pos, c = getPlaceholder(pos); i < len; i++) {\n\t\t\t\t\tif (tests[i]) {\n\t\t\t\t\t\tj = seekNext(i);\n\t\t\t\t\t\tt = buffer[i];\n\t\t\t\t\t\tbuffer[i] = c;\n\t\t\t\t\t\tif (j < len && tests[j].test(t)) {\n\t\t\t\t\t\t\tc = t;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction androidInputEvent(e) {\n\t\t\t\tvar curVal = input.val();\n\t\t\t\tvar pos = input.caret();\n\t\t\t\tif (oldVal && oldVal.length && oldVal.length > curVal.length ) {\n\t\t\t\t\t// a deletion or backspace happened\n\t\t\t\t\tcheckVal(true);\n\t\t\t\t\twhile (pos.begin > 0 && !tests[pos.begin-1])\n\t\t\t\t\t\tpos.begin--;\n\t\t\t\t\tif (pos.begin === 0)\n\t\t\t\t\t{\n\t\t\t\t\t\twhile (pos.begin < firstNonMaskPos && !tests[pos.begin])\n\t\t\t\t\t\t\tpos.begin++;\n\t\t\t\t\t}\n\t\t\t\t\tinput.caret(pos.begin,pos.begin);\n\t\t\t\t} else {\n\t\t\t\t\tvar pos2 = checkVal(true);\n\t\t\t\t\tvar lastEnteredValue = curVal.charAt(pos.begin);\n\t\t\t\t\tif (pos.begin < len){\n\t\t\t\t\t\tif(!tests[pos.begin]){\n\t\t\t\t\t\t\tpos.begin++;\n\t\t\t\t\t\t\tif(tests[pos.begin].test(lastEnteredValue)){\n\t\t\t\t\t\t\t\tpos.begin++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif(tests[pos.begin].test(lastEnteredValue)){\n\t\t\t\t\t\t\t\tpos.begin++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tinput.caret(pos.begin,pos.begin);\n\t\t\t\t}\n\t\t\t\ttryFireCompleted();\n\t\t\t}\n\n\n\t\t\tfunction blurEvent(e) {\n                checkVal();\n\n                if (input.val() != focusText)\n                    input.change();\n            }\n\n\t\t\tfunction keydownEvent(e) {\n                if (input.prop("readonly")){\n                    return;\n                }\n\n\t\t\t\tvar k = e.which || e.keyCode,\n\t\t\t\t\tpos,\n\t\t\t\t\tbegin,\n\t\t\t\t\tend;\n                    oldVal = input.val();\n\t\t\t\t//backspace, delete, and escape get special treatment\n\t\t\t\tif (k === 8 || k === 46 || (iPhone && k === 127)) {\n\t\t\t\t\tpos = input.caret();\n\t\t\t\t\tbegin = pos.begin;\n\t\t\t\t\tend = pos.end;\n\n\t\t\t\t\tif (end - begin === 0) {\n\t\t\t\t\t\tbegin=k!==46?seekPrev(begin):(end=seekNext(begin-1));\n\t\t\t\t\t\tend=k===46?seekNext(end):end;\n\t\t\t\t\t}\n\t\t\t\t\tclearBuffer(begin, end);\n\t\t\t\t\tshiftL(begin, end - 1);\n\n\t\t\t\t\te.preventDefault();\n\t\t\t\t} else if( k === 13 ) { // enter\n\t\t\t\t\tblurEvent.call(this, e);\n\t\t\t\t} else if (k === 27) { // escape\n\t\t\t\t\tinput.val(focusText);\n\t\t\t\t\tinput.caret(0, checkVal());\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction keypressEvent(e) {\n                if (input.prop("readonly")){\n                    return;\n                }\n\n\t\t\t\tvar k = e.which || e.keyCode,\n\t\t\t\t\tpos = input.caret(),\n\t\t\t\t\tp,\n\t\t\t\t\tc,\n\t\t\t\t\tnext;\n\n\t\t\t\tif (e.ctrlKey || e.altKey || e.metaKey || k < 32) {//Ignore\n\t\t\t\t\treturn;\n\t\t\t\t} else if ( k && k !== 13 ) {\n\t\t\t\t\tif (pos.end - pos.begin !== 0){\n\t\t\t\t\t\tclearBuffer(pos.begin, pos.end);\n\t\t\t\t\t\tshiftL(pos.begin, pos.end-1);\n\t\t\t\t\t}\n\n\t\t\t\t\tp = seekNext(pos.begin - 1);\n\t\t\t\t\tif (p < len) {\n\t\t\t\t\t\tc = String.fromCharCode(k);\n\t\t\t\t\t\tif (tests[p].test(c)) {\n\t\t\t\t\t\t\tshiftR(p);\n\n\t\t\t\t\t\t\tbuffer[p] = c;\n\t\t\t\t\t\t\twriteBuffer();\n\t\t\t\t\t\t\tnext = seekNext(p);\n\n\t\t\t\t\t\t\tif(android){\n\t\t\t\t\t\t\t\t//Path for CSP Violation on FireFox OS 1.1\n\t\t\t\t\t\t\t\tvar proxy = function() {\n\t\t\t\t\t\t\t\t\t$.proxy($.fn.caret,input,next)();\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\tsetTimeout(proxy,0);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tinput.caret(next);\n\t\t\t\t\t\t\t}\n                            if(pos.begin <= lastRequiredNonMaskPos){\n\t\t                         tryFireCompleted();\n                             }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction clearBuffer(start, end) {\n\t\t\t\tvar i;\n\t\t\t\tfor (i = start; i < end && i < len; i++) {\n\t\t\t\t\tif (tests[i]) {\n\t\t\t\t\t\tbuffer[i] = getPlaceholder(i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction writeBuffer() { input.val(buffer.join(\'\')); }\n\n\t\t\tfunction checkVal(allow) {\n\t\t\t\t//try to place characters where they belong\n\t\t\t\tvar test = input.val(),\n\t\t\t\t\tlastMatch = -1,\n\t\t\t\t\ti,\n\t\t\t\t\tc,\n\t\t\t\t\tpos;\n\n\t\t\t\tfor (i = 0, pos = 0; i < len; i++) {\n\t\t\t\t\tif (tests[i]) {\n\t\t\t\t\t\tbuffer[i] = getPlaceholder(i);\n\t\t\t\t\t\twhile (pos++ < test.length) {\n\t\t\t\t\t\t\tc = test.charAt(pos - 1);\n\t\t\t\t\t\t\tif (tests[i].test(c)) {\n\t\t\t\t\t\t\t\tbuffer[i] = c;\n\t\t\t\t\t\t\t\tlastMatch = i;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (pos > test.length) {\n\t\t\t\t\t\t\tclearBuffer(i + 1, len);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n                        if (buffer[i] === test.charAt(pos)) {\n                            pos++;\n                        }\n                        if( i < partialPosition){\n                            lastMatch = i;\n                        }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (allow) {\n\t\t\t\t\twriteBuffer();\n\t\t\t\t} else if (lastMatch + 1 < partialPosition) {\n\t\t\t\t\tif (settings.autoclear || buffer.join(\'\') === defaultBuffer) {\n\t\t\t\t\t\t// Invalid value. Remove it and replace it with the\n\t\t\t\t\t\t// mask, which is the default behavior.\n\t\t\t\t\t\tif(input.val()) input.val("");\n\t\t\t\t\t\tclearBuffer(0, len);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Invalid value, but we opt to show the value to the\n\t\t\t\t\t\t// user and allow them to correct their mistake.\n\t\t\t\t\t\twriteBuffer();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\twriteBuffer();\n\t\t\t\t\tinput.val(input.val().substring(0, lastMatch + 1));\n\t\t\t\t}\n\t\t\t\treturn (partialPosition ? i : firstNonMaskPos);\n\t\t\t}\n\n\t\t\tinput.data($.mask.dataName,function(){\n\t\t\t\treturn $.map(buffer, function(c, i) {\n\t\t\t\t\treturn tests[i]&&c!=getPlaceholder(i) ? c : null;\n\t\t\t\t}).join(\'\');\n\t\t\t});\n\n\n\t\t\tinput\n\t\t\t\t.one("unmask", function() {\n\t\t\t\t\tinput\n\t\t\t\t\t\t.off(".mask")\n\t\t\t\t\t\t.removeData($.mask.dataName);\n\t\t\t\t})\n\t\t\t\t.on("focus.mask", function() {\n                    if (input.prop("readonly")){\n                        return;\n                    }\n\n\t\t\t\t\tclearTimeout(caretTimeoutId);\n\t\t\t\t\tvar pos;\n\n\t\t\t\t\tfocusText = input.val();\n\n\t\t\t\t\tpos = checkVal();\n\n\t\t\t\t\tcaretTimeoutId = setTimeout(function(){\n                        if(input.get(0) !== document.activeElement){\n                            return;\n                        }\n\t\t\t\t\t\twriteBuffer();\n\t\t\t\t\t\tif (pos == mask.replace("?","").length) {\n\t\t\t\t\t\t\tinput.caret(0, pos);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tinput.caret(pos);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 10);\n\t\t\t\t})\n\t\t\t\t.on("blur.mask", blurEvent)\n\t\t\t\t.on("keydown.mask", keydownEvent)\n\t\t\t\t.on("keypress.mask", keypressEvent)\n\t\t\t\t.on("input.mask paste.mask", function() {\n                    if (input.prop("readonly")){\n                        return;\n                    }\n\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\tvar pos=checkVal(true);\n\t\t\t\t\t\tinput.caret(pos);\n                        tryFireCompleted();\n\t\t\t\t\t}, 0);\n\t\t\t\t});\n                if (chrome && android)\n                {\n                    input\n                        .off(\'input.mask\')\n                        .on(\'input.mask\', androidInputEvent);\n                }\n\t\t\t\tcheckVal(); //Perform initial check for existing values\n\t\t});\n\t}\n});\n}));\n'},615:function(t,e,n){n(511)(n(603))},777:function(t,e,n){"use strict";function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(0),l=n.n(s),o=n(586),u=function(){function t(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,n,a){return n&&t(e.prototype,n),a&&t(e,a),e}}(),h=function(t){function e(){return a(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return r(e,t),u(e,[{key:"onSubmit",value:function(t){t.preventDefault(),console.log("checkout submit stuff")}},{key:"render",value:function(){return l.a.createElement("form",{id:"checkout-form",className:"smart-form",noValidate:"novalidate",onSubmit:this.onSubmit},l.a.createElement("fieldset",null,l.a.createElement("div",{className:"row"},l.a.createElement("section",{className:"col col-6"},l.a.createElement("label",{className:"input"}," ",l.a.createElement("i",{className:"icon-prepend fa fa-user"}),l.a.createElement("input",{type:"text",name:"fname",placeholder:"First name"}))),l.a.createElement("section",{className:"col col-6"},l.a.createElement("label",{className:"input"}," ",l.a.createElement("i",{className:"icon-prepend fa fa-user"}),l.a.createElement("input",{type:"text",name:"lname",placeholder:"Last name"})))),l.a.createElement("div",{className:"row"},l.a.createElement("section",{className:"col col-6"},l.a.createElement("label",{className:"input"}," ",l.a.createElement("i",{className:"icon-prepend fa fa-envelope-o"}),l.a.createElement("input",{type:"email",name:"email",placeholder:"E-mail"}))),l.a.createElement("section",{className:"col col-6"},l.a.createElement("label",{className:"input"}," ",l.a.createElement("i",{className:"icon-prepend fa fa-phone"}),l.a.createElement("input",{type:"tel",name:"phone",placeholder:"Phone","data-smart-masked-input":"(999) 999-9999"}))))),l.a.createElement("fieldset",null,l.a.createElement("div",{className:"row"},l.a.createElement("section",{className:"col col-5"},l.a.createElement("label",{className:"select"},l.a.createElement("select",{name:"country"},l.a.createElement("option",{value:"0",defaultValue:!0,disabled:!0},"Country"),this.props.countries.map(function(t){return l.a.createElement("option",{key:t.key+t.value,value:t.key},t.value)}))," ",l.a.createElement("i",null)," ")),l.a.createElement("section",{className:"col col-4"},l.a.createElement("label",{className:"input"},l.a.createElement("input",{type:"text",name:"city",placeholder:"City"}))),l.a.createElement("section",{className:"col col-3"},l.a.createElement("label",{className:"input"},l.a.createElement("input",{type:"text",name:"code",placeholder:"Post code"})))),l.a.createElement("section",null,l.a.createElement("label",{htmlFor:"address2",className:"input"},l.a.createElement("input",{type:"text",name:"address2",id:"address2",placeholder:"Address"}))),l.a.createElement("section",null,l.a.createElement("label",{className:"textarea"},l.a.createElement("textarea",{rows:"3",name:"info",placeholder:"Additional info"})))),l.a.createElement("fieldset",null,l.a.createElement("section",null,l.a.createElement("div",{className:"inline-group"},l.a.createElement("label",{className:"radio"},l.a.createElement("input",{type:"radio",name:"radio-inline",defaultChecked:!0}),l.a.createElement("i",null),"Visa"),l.a.createElement("label",{className:"radio"},l.a.createElement("input",{type:"radio",name:"radio-inline"}),l.a.createElement("i",null),"MasterCard"),l.a.createElement("label",{className:"radio"},l.a.createElement("input",{type:"radio",name:"radio-inline"}),l.a.createElement("i",null),"American Express"))),l.a.createElement("section",null,l.a.createElement("label",{className:"input"},l.a.createElement("input",{type:"text",name:"name",placeholder:"Name on card"}))),l.a.createElement("div",{className:"row"},l.a.createElement("section",{className:"col col-10"},l.a.createElement("label",{className:"input"},l.a.createElement("input",{type:"text",name:"card",placeholder:"Card number","data-mask":"9999-9999-9999-9999"}))),l.a.createElement("section",{className:"col col-2"},l.a.createElement("label",{className:"input"},l.a.createElement("input",{type:"text",name:"cvv",placeholder:"CVV2","data-mask":"999"})))),l.a.createElement("div",{className:"row"},l.a.createElement("label",{className:"label col col-4"},"Expiration date"),l.a.createElement("section",{className:"col col-5"},l.a.createElement("label",{className:"select"},l.a.createElement("select",{name:"month",defaultValue:"0"},l.a.createElement("option",{value:"0",disabled:!0},"Month"),l.a.createElement("option",{value:"1"},"January"),l.a.createElement("option",{value:"1"},"February"),l.a.createElement("option",{value:"3"},"March"),l.a.createElement("option",{value:"4"},"April"),l.a.createElement("option",{value:"5"},"May"),l.a.createElement("option",{value:"6"},"June"),l.a.createElement("option",{value:"7"},"July"),l.a.createElement("option",{value:"8"},"August"),l.a.createElement("option",{value:"9"},"September"),l.a.createElement("option",{value:"10"},"October"),l.a.createElement("option",{value:"11"},"November"),l.a.createElement("option",{value:"12"},"December"))," ",l.a.createElement("i",null)," ")),l.a.createElement("section",{className:"col col-3"},l.a.createElement("label",{className:"input"},l.a.createElement("input",{type:"text",name:"year",placeholder:"Year","data-mask":"2099"}))))),l.a.createElement("footer",null,l.a.createElement("button",{type:"submit",className:"btn btn-primary"},"Validate Form")))}}]),e}(l.a.Component);h.defaultProps={countries:o.a};var c=h;e.a=c;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(h,"CheckoutForm","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/forms/components/layouts/CheckoutForm.js"),__REACT_HOT_LOADER__.register(c,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/forms/components/layouts/CheckoutForm.js"))}()},778:function(t,e,n){"use strict";function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(0),l=n.n(s),o=n(538),u=(n(559),n(548),function(){function t(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,n,a){return n&&t(e.prototype,n),a&&t(e,a),e}}()),h={rules:{name:{required:!0},email:{required:!0,email:!0},url:{url:!0},comment:{required:!0}},messages:{name:{required:"Enter your name"},email:{required:"Enter your email address",email:"Enter a VALID email"},url:{email:"Enter a VALID url"},comment:{required:"Please enter your comment"}}},c=function(t){function e(){return a(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return r(e,t),u(e,[{key:"onSubmit",value:function(t){t.preventDefault(),console.log("submit stuff")}},{key:"render",value:function(){return l.a.createElement(o.a,{options:h},l.a.createElement("form",{id:"comment-form",className:"smart-form",noValidate:"novalidate",onSubmit:this.onSubmit},l.a.createElement("header",null,"Comment form"),l.a.createElement("fieldset",null,l.a.createElement("div",{className:"row"},l.a.createElement("section",{className:"col col-4"},l.a.createElement("label",{className:"label"},"Name"),l.a.createElement("label",{className:"input"}," ",l.a.createElement("i",{className:"icon-append fa fa-user"}),l.a.createElement("input",{type:"text",name:"name"}))),l.a.createElement("section",{className:"col col-4"},l.a.createElement("label",{className:"label"},"E-mail"),l.a.createElement("label",{className:"input"}," ",l.a.createElement("i",{className:"icon-append fa fa-envelope-o"}),l.a.createElement("input",{type:"email",name:"email"}))),l.a.createElement("section",{className:"col col-4"},l.a.createElement("label",{className:"label"},"Website"),l.a.createElement("label",{className:"input"}," ",l.a.createElement("i",{className:"icon-append fa fa-globe"}),l.a.createElement("input",{type:"url",name:"url"})))),l.a.createElement("section",null,l.a.createElement("label",{className:"label"},"Comment"),l.a.createElement("label",{className:"textarea"}," ",l.a.createElement("i",{className:"icon-append fa fa-comment"})," ",l.a.createElement("textarea",{rows:"4",name:"comment"})),l.a.createElement("div",{className:"note"},'You may use these HTML tags and attributes: <a href="" title="">, <abbr title="">, <acronym title="">, <b>, <blockquote cite="">, <cite>, < code>, <del datetime="">, <em>, <i>, <q cite="">, <strike>, < strong>.'))),l.a.createElement("footer",null,l.a.createElement("button",{type:"submit",name:"submit",className:"btn btn-primary"},"Validate Form")),l.a.createElement("div",{className:"message"},l.a.createElement("i",{className:"fa fa-check fa-lg"}),l.a.createElement("p",null,"Your comment was successfully added!"))))}}]),e}(l.a.Component),d=c;e.a=d;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(h,"validationOptions","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/forms/components/layouts/CommentForm.js"),__REACT_HOT_LOADER__.register(c,"CommentForm","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/forms/components/layouts/CommentForm.js"),__REACT_HOT_LOADER__.register(d,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/forms/components/layouts/CommentForm.js"))}()},779:function(t,e,n){"use strict";function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(0),l=n.n(s),o=function(){function t(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,n,a){return n&&t(e.prototype,n),a&&t(e,a),e}}(),u={rules:{name:{required:!0},email:{required:!0,email:!0},message:{required:!0,minlength:10}},messages:{name:{required:"Please enter your name"},email:{required:"Please enter your email address",email:"Please enter a VALID email address"},message:{required:"Please enter your message"}}},h=function(t){function e(){return a(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return r(e,t),o(e,[{key:"onSubmit",value:function(t){t.preventDefault(),console.log("submit stuff")}},{key:"render",value:function(){return l.a.createElement(UiValidate,{options:u},l.a.createElement("form",{id:"contact-form",className:"smart-form",noValidate:"novalidate",onSubmit:this.onSubmit},l.a.createElement("header",null,"Contacts form"),l.a.createElement("fieldset",null,l.a.createElement("div",{className:"row"},l.a.createElement("section",{className:"col col-6"},l.a.createElement("label",{className:"label"},"Name"),l.a.createElement("label",{className:"input"},l.a.createElement("i",{className:"icon-append fa fa-user"}),l.a.createElement("input",{type:"text",name:"name",id:"named"}))),l.a.createElement("section",{className:"col col-6"},l.a.createElement("label",{className:"label"},"E-mail"),l.a.createElement("label",{className:"input"},l.a.createElement("i",{className:"icon-append fa fa-envelope-o"}),l.a.createElement("input",{type:"email",name:"email",id:"emaild"})))),l.a.createElement("section",null,l.a.createElement("label",{className:"label"},"Subject"),l.a.createElement("label",{className:"input"},l.a.createElement("i",{className:"icon-append fa fa-tag"}),l.a.createElement("input",{type:"text",name:"subject",id:"subject"}))),l.a.createElement("section",null,l.a.createElement("label",{className:"label"},"Message"),l.a.createElement("label",{className:"textarea"},l.a.createElement("i",{className:"icon-append fa fa-comment"}),l.a.createElement("textarea",{rows:"4",name:"message",id:"message"}))),l.a.createElement("section",null,l.a.createElement("label",{className:"checkbox"},l.a.createElement("input",{type:"checkbox",name:"copy",id:"copy"}),l.a.createElement("i",null),"Send a copy to my e-mail address"))),l.a.createElement("footer",null,l.a.createElement("button",{type:"submit",className:"btn btn-primary"},"Validate Form")),l.a.createElement("div",{className:"message"},l.a.createElement("i",{className:"fa fa-thumbs-up"}),l.a.createElement("p",null,"Your message was successfully sent!"))))}}]),e}(l.a.Component),c=h;e.a=c;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(u,"validationOptions","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/forms/components/layouts/ContactsForm.js"),__REACT_HOT_LOADER__.register(h,"ContactsForm","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/forms/components/layouts/ContactsForm.js"),__REACT_HOT_LOADER__.register(c,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/forms/components/layouts/ContactsForm.js"))}()},780:function(t,e,n){"use strict";function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(0),l=n.n(s),o=n(538),u=n(559),h=n(548),c=function(){function t(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,n,a){return n&&t(e.prototype,n),a&&t(e,a),e}}(),d={rules:{name:{required:!0},email:{required:!0,email:!0},phone:{required:!0},interested:{required:!0},budget:{required:!0}},messages:{name:{required:"Please enter your name"},email:{required:"Please enter your email address",email:"Please enter a VALID email address"},phone:{required:"Please enter your phone number"},interested:{required:"Please select interested service"},budget:{required:"Please select your budget"}}},p=function(t){function e(){var t,n,r,s;a(this,e);for(var l=arguments.length,o=Array(l),u=0;u<l;u++)o[u]=arguments[u];return n=r=i(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(o))),r.state={fileInputValue:""},r.onFileInputChange=function(){var t;return(t=r).__onFileInputChange__REACT_HOT_LOADER__.apply(t,arguments)},s=n,i(r,s)}return r(e,t),c(e,[{key:"__onFileInputChange__REACT_HOT_LOADER__",value:function(){return this.__onFileInputChange__REACT_HOT_LOADER__.apply(this,arguments)}},{key:"onSubmit",value:function(t){t.preventDefault(),console.log("submit stuff")}},{key:"__onFileInputChange__REACT_HOT_LOADER__",value:function(t){this.setState({fileInputValue:t.target.value})}},{key:"render",value:function(){return l.a.createElement(o.a,{options:d},l.a.createElement("form",{id:"order-form",className:"smart-form",noValidate:"novalidate",onSubmit:this.onSubmit},l.a.createElement("header",null,"Order services"),l.a.createElement("fieldset",null,l.a.createElement("div",{className:"row"},l.a.createElement("section",{className:"col col-6"},l.a.createElement("label",{className:"input"}," ",l.a.createElement("i",{className:"icon-append fa fa-user"}),l.a.createElement("input",{type:"text",name:"name",placeholder:"Name"}))),l.a.createElement("section",{className:"col col-6"},l.a.createElement("label",{className:"input"}," ",l.a.createElement("i",{className:"icon-append fa fa-briefcase"}),l.a.createElement("input",{type:"text",name:"company",placeholder:"Company"})))),l.a.createElement("div",{className:"row"},l.a.createElement("section",{className:"col col-6"},l.a.createElement("label",{className:"input"}," ",l.a.createElement("i",{className:"icon-append fa fa-envelope-o"}),l.a.createElement("input",{type:"email",name:"email",placeholder:"E-mail"}))),l.a.createElement("section",{className:"col col-6"},l.a.createElement("label",{className:"input"}," ",l.a.createElement("i",{className:"icon-append fa fa-phone"}),l.a.createElement(u.a,{type:"tel",name:"phone",placeholder:"Phone",mask:"(999) 999-9999"}))))),l.a.createElement("fieldset",null,l.a.createElement("div",{className:"row"},l.a.createElement("section",{className:"col col-6"},l.a.createElement("label",{className:"select"},l.a.createElement("select",{name:"interested",defaultValue:"0"},l.a.createElement("option",{value:"0",disabled:!0},"Interested in"),l.a.createElement("option",{value:"1"},"design"),l.a.createElement("option",{value:"1"},"development"),l.a.createElement("option",{value:"2"},"illustration"),l.a.createElement("option",{value:"2"},"branding"),l.a.createElement("option",{value:"3"},"video"))," ",l.a.createElement("i",null)," ")),l.a.createElement("section",{className:"col col-6"},l.a.createElement("label",{className:"select"},l.a.createElement("select",{name:"budget",defaultValue:"0"},l.a.createElement("option",{value:"0",disabled:!0},"Budget"),l.a.createElement("option",{value:"1"},"less than 5000$"),l.a.createElement("option",{value:"2"},"5000$ - 10000$"),l.a.createElement("option",{value:"3"},"10000$ - 20000$"),l.a.createElement("option",{value:"4"},"more than 20000$"))," ",l.a.createElement("i",null)," "))),l.a.createElement("div",{className:"row"},l.a.createElement("section",{className:"col col-6"},l.a.createElement("label",{className:"input"}," ",l.a.createElement("i",{className:"icon-append fa fa-calendar"}),l.a.createElement(h.a,{type:"text",name:"startdate",id:"startdate",minRestrict:"#finishdate",placeholder:"Expected start date"}))),l.a.createElement("section",{className:"col col-6"},l.a.createElement("label",{className:"input"}," ",l.a.createElement("i",{className:"icon-append fa fa-calendar"}),l.a.createElement(h.a,{type:"text",name:"finishdate",id:"finishdate",maxRestrict:"#startdate",placeholder:"Expected finish date"})))),l.a.createElement("section",null,l.a.createElement("div",{className:"input input-file"},l.a.createElement("span",{className:"button"},l.a.createElement("input",{id:"file2",type:"file",name:"file2",onChange:this.onFileInputChange}),"Browse"),l.a.createElement("input",{type:"text",value:this.state.fileInputValue,placeholder:"Include some files",readOnly:!0}))),l.a.createElement("section",null,l.a.createElement("label",{className:"textarea"}," ",l.a.createElement("i",{className:"icon-append fa fa-comment"}),l.a.createElement("textarea",{rows:"5",name:"comment",placeholder:"Tell us about your project"})))),l.a.createElement("footer",null,l.a.createElement("button",{type:"submit",className:"btn btn-primary"},"Validate Form"))))}}]),e}(l.a.Component),m=p;e.a=m;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(d,"validationOptions","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/forms/components/layouts/OrderForm.js"),__REACT_HOT_LOADER__.register(p,"OrderForm","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/forms/components/layouts/OrderForm.js"),__REACT_HOT_LOADER__.register(m,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/forms/components/layouts/OrderForm.js"))}()},781:function(t,e,n){"use strict";function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(0),l=n.n(s),o=n(538),u=n(548),h=function(){function t(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,n,a){return n&&t(e.prototype,n),a&&t(e,a),e}}(),c={rules:{username:{required:!0},email:{required:!0,email:!0},password:{required:!0,minlength:3,maxlength:20},passwordConfirm:{required:!0,minlength:3,maxlength:20,equalTo:"#password"},firstname:{required:!0},lastname:{required:!0},gender:{required:!0},terms:{required:!0}},messages:{login:{required:"Please enter your login"},email:{required:"Please enter your email address",email:"Please enter a VALID email address"},password:{required:"Please enter your password"},passwordConfirm:{required:"Please enter your password one more time",equalTo:"Please enter the same password as above"},firstname:{required:"Please select your first name"},lastname:{required:"Please select your last name"},gender:{required:"Please select your gender"},terms:{required:"You must agree with Terms and Conditions"}}},d=function(t){function e(){return a(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return r(e,t),h(e,[{key:"onSubmit",value:function(t){t.preventDefault(),console.log("submit stuff")}},{key:"render",value:function(){return l.a.createElement(o.a,{options:c},l.a.createElement("form",{id:"smart-form-register",className:"smart-form",noValidate:"novalidate",onSubmit:this.onSubmit},l.a.createElement("header",null,"Registration form"),l.a.createElement("fieldset",null,l.a.createElement("section",null,l.a.createElement("label",{className:"input"}," ",l.a.createElement("i",{className:"icon-append fa fa-user"}),l.a.createElement("input",{type:"text",name:"username",placeholder:"Username"}),l.a.createElement("b",{className:"tooltip tooltip-bottom-right"},"Needed to enter the website")," ")),l.a.createElement("section",null,l.a.createElement("label",{className:"input"}," ",l.a.createElement("i",{className:"icon-append fa fa-envelope-o"}),l.a.createElement("input",{type:"email",name:"email",placeholder:"Email address"}),l.a.createElement("b",{className:"tooltip tooltip-bottom-right"},"Needed to verify your account")," ")),l.a.createElement("section",null,l.a.createElement("label",{className:"input"}," ",l.a.createElement("i",{className:"icon-append fa fa-lock"}),l.a.createElement("input",{type:"password",name:"password",placeholder:"Password",id:"password"}),l.a.createElement("b",{className:"tooltip tooltip-bottom-right"},"Don't forget your password")," ")),l.a.createElement("section",null,l.a.createElement("label",{className:"input"}," ",l.a.createElement("i",{className:"icon-append fa fa-lock"}),l.a.createElement("input",{type:"password",name:"passwordConfirm",placeholder:"Confirm password"}),l.a.createElement("b",{className:"tooltip tooltip-bottom-right"},"Don't forget your password")," "))),l.a.createElement("fieldset",null,l.a.createElement("div",{className:"row"},l.a.createElement("section",{className:"col col-6"},l.a.createElement("label",{className:"input"},l.a.createElement("input",{type:"text",name:"firstname",placeholder:"First name"}))),l.a.createElement("section",{className:"col col-6"},l.a.createElement("label",{className:"input"},l.a.createElement("input",{type:"text",name:"lastname",placeholder:"Last name"})))),l.a.createElement("div",{className:"row"},l.a.createElement("section",{className:"col col-6"},l.a.createElement("label",{className:"select"},l.a.createElement("select",{name:"gender",defaultValue:"0"},l.a.createElement("option",{value:"0",disabled:!0},"Gender"),l.a.createElement("option",{value:"1"},"Male"),l.a.createElement("option",{value:"2"},"Female"),l.a.createElement("option",{value:"3"},"Prefer not to answer"))," ",l.a.createElement("i",null)," ")),l.a.createElement("section",{className:"col col-6"},l.a.createElement("label",{className:"input"}," ",l.a.createElement("i",{className:"icon-append fa fa-calendar"}),l.a.createElement(u.a,{type:"text",name:"request",placeholder:"Request activation on",dateFormat:"dd/mm/yy"})))),l.a.createElement("section",null,l.a.createElement("label",{className:"checkbox"},l.a.createElement("input",{type:"checkbox",name:"subscription",id:"subscription"}),l.a.createElement("i",null),"I want to receive news and special offers"),l.a.createElement("label",{className:"checkbox"},l.a.createElement("input",{type:"checkbox",name:"terms",id:"terms"}),l.a.createElement("i",null),"I agree with the Terms and Conditions"))),l.a.createElement("footer",null,l.a.createElement("button",{type:"submit",className:"btn btn-primary"},"Validate Form"))))}}]),e}(l.a.Component),p=d;e.a=p;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(c,"validationOptions","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/forms/components/layouts/RegistrationForm.js"),__REACT_HOT_LOADER__.register(d,"RegistrationForm","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/forms/components/layouts/RegistrationForm.js"),__REACT_HOT_LOADER__.register(p,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/forms/components/layouts/RegistrationForm.js"))}()},782:function(t,e,n){"use strict";function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(0),l=n.n(s),o=n(538),u=(n(559),n(548),function(){function t(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,n,a){return n&&t(e.prototype,n),a&&t(e,a),e}}()),h={rules:{name:{required:!0},email:{required:!0,email:!0},review:{required:!0,minlength:20},quality:{required:!0},reliability:{required:!0},overall:{required:!0}},messages:{name:{required:"Please enter your name"},email:{required:"Please enter your email address",email:'<i class="fa fa-warning"></i><strong>Please enter a VALID email addres</strong>'},review:{required:"Please enter your review"},quality:{required:"Please rate quality of the product"},reliability:{required:"Please rate reliability of the product"},overall:{required:"Please rate the product"}}},c=function(t){function e(){return a(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return r(e,t),u(e,[{key:"onSubmit",value:function(t){t.preventDefault(),console.log("submit stuff")}},{key:"render",value:function(){return l.a.createElement(o.a,{options:h},l.a.createElement("form",{id:"review-form",className:"smart-form",noValidate:"novalidate",onSubmit:this.onSubmit},l.a.createElement("header",null,"Review form"),l.a.createElement("fieldset",null,l.a.createElement("section",null,l.a.createElement("label",{className:"input"}," ",l.a.createElement("i",{className:"icon-append fa fa-user"}),l.a.createElement("input",{type:"text",name:"name",id:"name",placeholder:"Your name"}))),l.a.createElement("section",null,l.a.createElement("label",{className:"input"}," ",l.a.createElement("i",{className:"icon-append fa fa-envelope-o"}),l.a.createElement("input",{type:"email",name:"email",id:"email",placeholder:"Your e-mail"}))),l.a.createElement("section",null,l.a.createElement("label",{className:"label"}),l.a.createElement("label",{className:"textarea"}," ",l.a.createElement("i",{className:"icon-append fa fa-comment"}),l.a.createElement("textarea",{rows:"3",name:"review",id:"review",placeholder:"Text of the review"}))),l.a.createElement("section",null,l.a.createElement("div",{className:"rating"},l.a.createElement("input",{type:"radio",name:"quality",id:"quality-5"}),l.a.createElement("label",{htmlFor:"quality-5"},l.a.createElement("i",{className:"fa fa-star"})),l.a.createElement("input",{type:"radio",name:"quality",id:"quality-4"}),l.a.createElement("label",{htmlFor:"quality-4"},l.a.createElement("i",{className:"fa fa-star"})),l.a.createElement("input",{type:"radio",name:"quality",id:"quality-3"}),l.a.createElement("label",{htmlFor:"quality-3"},l.a.createElement("i",{className:"fa fa-star"})),l.a.createElement("input",{type:"radio",name:"quality",id:"quality-2"}),l.a.createElement("label",{htmlFor:"quality-2"},l.a.createElement("i",{className:"fa fa-star"})),l.a.createElement("input",{type:"radio",name:"quality",id:"quality-1"}),l.a.createElement("label",{htmlFor:"quality-1"},l.a.createElement("i",{className:"fa fa-star"})),"Quality of the product"),l.a.createElement("div",{className:"rating"},l.a.createElement("input",{type:"radio",name:"reliability",id:"reliability-5"}),l.a.createElement("label",{htmlFor:"reliability-5"},l.a.createElement("i",{className:"fa fa-star"})),l.a.createElement("input",{type:"radio",name:"reliability",id:"reliability-4"}),l.a.createElement("label",{htmlFor:"reliability-4"},l.a.createElement("i",{className:"fa fa-star"})),l.a.createElement("input",{type:"radio",name:"reliability",id:"reliability-3"}),l.a.createElement("label",{htmlFor:"reliability-3"},l.a.createElement("i",{className:"fa fa-star"})),l.a.createElement("input",{type:"radio",name:"reliability",id:"reliability-2"}),l.a.createElement("label",{htmlFor:"reliability-2"},l.a.createElement("i",{className:"fa fa-star"})),l.a.createElement("input",{type:"radio",name:"reliability",id:"reliability-1"}),l.a.createElement("label",{htmlFor:"reliability-1"},l.a.createElement("i",{className:"fa fa-star"})),"Reliability of the product"),l.a.createElement("div",{className:"rating"},l.a.createElement("input",{type:"radio",name:"overall",id:"overall-5"}),l.a.createElement("label",{htmlFor:"overall-5"},l.a.createElement("i",{className:"fa fa-star"})),l.a.createElement("input",{type:"radio",name:"overall",id:"overall-4"}),l.a.createElement("label",{htmlFor:"overall-4"},l.a.createElement("i",{className:"fa fa-star"})),l.a.createElement("input",{type:"radio",name:"overall",id:"overall-3"}),l.a.createElement("label",{htmlFor:"overall-3"},l.a.createElement("i",{className:"fa fa-star"})),l.a.createElement("input",{type:"radio",name:"overall",id:"overall-2"}),l.a.createElement("label",{htmlFor:"overall-2"},l.a.createElement("i",{className:"fa fa-star"})),l.a.createElement("input",{type:"radio",name:"overall",id:"overall-1"}),l.a.createElement("label",{htmlFor:"overall-1"},l.a.createElement("i",{className:"fa fa-star"})),"Overall rating"))),l.a.createElement("footer",null,l.a.createElement("button",{type:"submit",className:"btn btn-primary"},"Validate Form"))))}}]),e}(l.a.Component),d=c;e.a=d;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(h,"validationOptions","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/forms/components/layouts/ReviewForm.js"),__REACT_HOT_LOADER__.register(c,"ReviewForm","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/forms/components/layouts/ReviewForm.js"),__REACT_HOT_LOADER__.register(d,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/forms/components/layouts/ReviewForm.js"))}()},790:function(t,e,n){"use strict";function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=n(0),l=n.n(s),o=n(521),u=n(777),h=n(780),c=n(782),d=n(781),p=n(778),m=n(779),f=function(){function t(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,n,a){return n&&t(e.prototype,n),a&&t(e,a),e}}(),g=function(t){function e(){return a(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return r(e,t),f(e,[{key:"render",value:function(){return l.a.createElement("div",{id:"content"},l.a.createElement("div",{className:"row"},l.a.createElement(o.a,{items:["Forms","Form Layouts"],icon:"fa fa-fw fa-pencil-square-o",className:"col-xs-12 col-sm-9 col-md-9 col-lg-9"}),l.a.createElement("div",{className:"col-xs-12 col-sm-3 col-md-3 col-lg-3"})),l.a.createElement("div",{className:"alert alert-block alert-success"},l.a.createElement("h4",{className:"alert-heading"},l.a.createElement("i",{className:"fa fa-check-square-o"})," Check validation!"),l.a.createElement("p",null,"You may also check the form validation by clicking on the form action button. Please try and see the results below!")),l.a.createElement(o.c,null,l.a.createElement("div",{className:"row"},l.a.createElement("article",{className:"col-sm-12 col-md-12 col-lg-6"},l.a.createElement(o.d,{editbutton:!1,custombutton:!1},l.a.createElement("header",null,l.a.createElement("span",{className:"widget-icon"}," ",l.a.createElement("i",{className:"fa fa-edit"})," "),l.a.createElement("h2",null,"Checkout Form ")),l.a.createElement("div",null,l.a.createElement("div",{className:"widget-body no-padding"},l.a.createElement(u.a,null)))),l.a.createElement(o.d,{editbutton:!1,custombutton:!1},l.a.createElement("header",null,l.a.createElement("span",{className:"widget-icon"}," ",l.a.createElement("i",{className:"fa fa-edit"})," "),l.a.createElement("h2",null,"Order form ")),l.a.createElement("div",null,l.a.createElement("div",{className:"widget-body no-padding"},l.a.createElement(h.a,null)))),l.a.createElement(o.d,{editbutton:!1,custombutton:!1},l.a.createElement("header",null,l.a.createElement("span",{className:"widget-icon"}," ",l.a.createElement("i",{className:"fa fa-edit"})," "),l.a.createElement("h2",null,"Review form ")),l.a.createElement("div",null,l.a.createElement("div",{className:"widget-body no-padding"},l.a.createElement(c.a,null))))),l.a.createElement("article",{className:"col-sm-12 col-md-12 col-lg-6"},l.a.createElement(o.d,{editbutton:!1,custombutton:!1},l.a.createElement("header",null,l.a.createElement("span",{className:"widget-icon"}," ",l.a.createElement("i",{className:"fa fa-edit"})," "),l.a.createElement("h2",null,"Registration form")),l.a.createElement("div",null,l.a.createElement("div",{className:"widget-body no-padding"},l.a.createElement(d.a,null)))),l.a.createElement(o.d,{editbutton:!1,custombutton:!1},l.a.createElement("header",null,l.a.createElement("span",{className:"widget-icon"}," ",l.a.createElement("i",{className:"fa fa-edit"})," "),l.a.createElement("h2",null,"Comment form ")),l.a.createElement("div",null,l.a.createElement("div",{className:"widget-body no-padding"},l.a.createElement(p.a,null)))),l.a.createElement(o.d,{editbutton:!1,custombutton:!1},l.a.createElement("header",null,l.a.createElement("span",{className:"widget-icon"}," ",l.a.createElement("i",{className:"fa fa-edit"})," "),l.a.createElement("h2",null,"Contacts form ")),l.a.createElement("div",null,l.a.createElement("div",{className:"widget-body no-padding"},l.a.createElement(m.a,null))))))))}}]),e}(l.a.Component),v=g;e.default=v;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(g,"FormLayouts","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/forms/containers/FormLayouts.js"),__REACT_HOT_LOADER__.register(v,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/forms/containers/FormLayouts.js"))}()}});